Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion Goto page 1, 2, 3  Next
Xerakon
Apprentice


Joined: 10 May 2011
Posts: 111

PostPosted: Mon Jul 09, 2012 10:54 pm   

GUI
 
Can cmud be set up to serve as a GUI? Something like this:

http://www.godwars2.org/images/plugin_row.png

I tried googling around and a quick browse through the first few pages of the forums hasn't shown much promise.

MUD I play on is asking for GUIs for all mud clients, and there are only a few that use cmud like myself. MSDP is also supported for this.

Thanks!
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Jul 10, 2012 12:24 am   
 
CMud cannot do background images nor can is customize the graphic look of windows and other visual components (ie, buttons). Beyond that, it can already do as much if not more than Mushclient.
_________________
EDIT: I didn't like my old signature
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Jul 10, 2012 1:38 pm   
 
You could probably even simulate the background image by using undocked windows over one big window with the background image. Since you can make buttons, guages, multiple windows, graphical maps, and customized output to any window you want, Cmud really is a GUI.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4662
Location: Pensacola, FL, USA

PostPosted: Tue Jul 10, 2012 1:48 pm   
 
or stick an image on an oversize button
_________________
Discord: Shalimarwildcat
Reply with quote
Xerakon
Apprentice


Joined: 10 May 2011
Posts: 111

PostPosted: Tue Jul 10, 2012 4:38 pm   
 
Okay, so I started on this and made a new window, then added an alias to attempt to bring up the image, from what I had seen searching around. Trying to use the alias inside the window brings up a bar that shows loading the image, but upon completion, nothing appears.
Code:

<window name="Background" width="432" height="133" host="none" enabled="false" id="403">
  <uid>{79835390-437F-4808-8187-CD77076051F1}</uid>
  <packages>LegendsoftheJedi</packages>
  <alias name="bgrefresh" id="404">
    <value>#MXP {}</value>
  </alias>
</window>
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Jul 10, 2012 5:47 pm   
 
Try:
Code:
#MXP {<IMAGE myimage.jpg>}

substituting the filename of the image you want. The image should probably be in your Cmud folder, probably in your session folder. There are a few other possible options for the MXP Image tag, which can control size and alignment. Check out the MXP page: http://www.zuggsoft.com/zmud/mxp.htm#Images.
Reply with quote
Xerakon
Apprentice


Joined: 10 May 2011
Posts: 111

PostPosted: Tue Jul 10, 2012 7:40 pm   
 
Hrm, okay. I got it working. Had to change the extension to .bmp, and keep the full pathto in the tag for some reason though. Is there any way to have the image stretch to fit any screen? Or does it manually have to be adjusted each time?

NVM, found it myself. Just had to sort the correct syntax out. =)
Code:

#MXP {<IMAGE 'C:\Users\Jeremy\Desktop\background.bmp' W=100%>}
Reply with quote
Xerakon
Apprentice


Joined: 10 May 2011
Posts: 111

PostPosted: Tue Jul 10, 2012 8:15 pm   
 
Trying to find info for MSDP and CMUD. I've seen that there are a few packages that can be downloaded to help make them work, but does CMUD not support MSDP from the get-go?
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Tue Jul 10, 2012 9:18 pm   
 
It doesn't, you'll need to use telnet triggers.
Reply with quote
Xerakon
Apprentice


Joined: 10 May 2011
Posts: 111

PostPosted: Tue Jul 10, 2012 9:31 pm   
 
Do you have any examples of that? I've tried using other people's mods, which include a the sendsdb command, but I'm not getting any response from the MUD, even when it tries to pull up the MSDP commands.
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Tue Jul 10, 2012 9:56 pm   
 
Well, you would use telnet triggers to fire on the MSDP data being sent from the mud. #sendsb would be used to send things to the mud via MSDP. If you post an example of MSDP data being sent from the script debugger window (use the raw input/output option) we can help you write a trigger for it, but without knowing what you need to trigger on, it'll be hard.
Reply with quote
Xerakon
Apprentice


Joined: 10 May 2011
Posts: 111

PostPosted: Mon Jul 16, 2012 5:47 pm   
 
I'm still having issues trying to make the MUD respond to any msdp information. Working with the mud admin on it right now.
Reply with quote
Xerakon
Apprentice


Joined: 10 May 2011
Posts: 111

PostPosted: Tue Jul 17, 2012 7:28 am   
 
Having issues making this trigger work as well. Any thoughts?

As seen on MUD:
Code:

Health: 4961/4961 [OOC: ||||||] (AP: 12/12) Movement: 2637/2690 >


Code:

<trigger priority="6730" id="673">
  <pattern>Health: (%d)/(%d) (*) (AP: (%d)/(%d)) Movement: (%d)/(%d) ></pattern>
  <value>#VAR //Shared/Score/hp (%1)
#VAR //Shared/Score/maxhp (%2)
#VAR //Shared/Score/move (%6)
#VAR //Shared/Score/maxmove (%7)</value>
</trigger>
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Jul 17, 2012 2:38 pm   
 
Your trigger pattern needs literal parentheses, which need to be quoted. You haven't quoted them. In addition, your move and maxmove are not actually the 6th and 7th captured values because you have unnecessarily captured the asterisk pattern. The pattern should be:
Code:
Health: (%d)/(%d) * ~(AP: (%d)/(%d)~) Movement: (%d)/(%d) >

That should make the move and maxmove %6 and %7 as you expected.
Reply with quote
hogarius
Adept


Joined: 29 Jan 2003
Posts: 221
Location: islands.genesismuds.org

PostPosted: Tue Jul 17, 2012 2:59 pm   
 
Wouldn't move and maxmove be %5 and %6 in your pattern, Rehab?
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Jul 17, 2012 7:41 pm   
 
Blast, you're right. Oh well. Either put the parentheses back around (*) or make move and movement %5 and %6.
Reply with quote
Xerakon
Apprentice


Joined: 10 May 2011
Posts: 111

PostPosted: Fri Jul 27, 2012 8:33 pm   
 
Finally got the MSDP working. Here's the script I used, courtesy of Splif on MUDBytes.

Code:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <button name="hp1" type="Gauge" autosize="false" width="150" height="16" inset="true" toolstyle="true" color="#00B300" gaugelowcol="red" gaugebackcol="silver" priority="3">
    <caption>%if(@OPPONENT_HEALTH  = 0, No Target, @OPPONENT_NAME is @OPPONENT_HEALTH_PCT ~% Alive)</caption>
    <value>#show @OPPONENT_NAME is @OPPONENT_HEALTH_PCT % alive</value>
    <expr>@OPPONENT_HEALTH</expr>
    <gaugemax>@OPPONENT_HEALTH_MAX</gaugemax>
    <gaugelow>@OPPONENT_HEALTH_MAX/3</gaugelow>
  </button>
  <button name="hp" type="Gauge" autosize="false" width="150" height="16" inset="true" toolstyle="true" color="#00B300" gaugelowcol="red" gaugebackcol="silver" priority="5">
    <caption>%if(@HEALTH  = 0, @CHARACTER_NAME is @HEALTH_PCT ~% Alive, @CHARACTER_NAME is @HEALTH_PCT ~% Alive)</caption>
    <value>#show @HEALTH_PCT % alive</value>
    <expr>@HEALTH</expr>
    <gaugemax>@HEALTH_MAX</gaugemax>
    <gaugelow>@HEALTH_MAX/3</gaugelow>
  </button>
  <trigger type="Telnet" param="69" priority="20" trigontrig="false" newline="false" prompt="true">
    <pattern><![CDATA[<IAC><WILL><69>]]></pattern>
    <value>#SENDRAW %char(255)%char(253)%char(69)</value>
  </trigger>
  <trigger type="Telnet" param="69" priority="5920">
    <pattern>(@MSDPVAR)([%w|_])(@MSDPVAL)(*)</pattern>
    <value>#var {%trim(%2)} {%trim(%delete(%4,1,1))}
#MATH HEALTH_PCT ((@HEALTH * 100)/@HEALTH_MAX)</value>
  </trigger>
  <alias name="Vreport">
    <value>#SENDSB 69 %CHAR(1)REPORT%CHAR(2)MSDP_SERVER_ID%CHAR(2)WORLD_TIME%CHAR(2)CHARACTER_NAME%CHAR(2)LEVEL%CHAR(2)CLASS%CHAR(2)HEALTH%CHAR(2)HEALTH_MAX%CHAR(2)MANA%CHAR(2)MANA_MAX%CHAR(2)MOVEMENT%CHAR(2)MOVEMENT_MAX%CHAR(2)AC%CHAR(2)HONOR%CHAR(2)DRACHMA%CHAR(2)ALIGNMENT%CHAR(2)EXPERIENCE%CHAR(2)MONEY%CHAR(2)STR%CHAR(2)CON%CHAR(2)DEX%CHAR(2)WIS%CHAR(2)INT%CHAR(2)STR_PERM%CHAR(2)DEX_PERM%CHAR(2)CON_PERM%CHAR(2)WIS_PERM%CHAR(2)INT_PERM%CHAR(2)HITROLL%CHAR(2)DAMROLL%CHAR(2)OPPONENT_HEALTH%CHAR(2)OPPONENT_HEALTH_MAX%CHAR(2)OPPONENT_LEVEL%CHAR(2)OPPONENT_NAME%CHAR(2)AREA_NAME%CHAR(2)ROOM_NAME%CHAR(2)ROOM_VNUM%CHAR(2)TERRAIN%CHAR(2)CONTINENT</value>
  </alias>
</cmud>


This brings up the basic MSDP variables from the muds, and adds 2 status bars. Have a lot of variable changes to bring out full functionality from the MUD I play, as well as re-arranging gauges and figuring out what I want it to look like on mine, but just wanted to post the script for anyone else that was wondering.

The next issue that I'm having is with %if.

Code:

%if(@/MSDP/Vars/HEALTH_PCT = 100, @/MSDP/Vars/HEALTH_PCT ~%, @/MSDP/Vars/HEALTH of @/MSDP/Vars/HEALTH_MAX)


When health drops below 100%, I'm trying to make it so that it will read 123/456 instead of 123 of 456, but the / keeps acting as a division sign instead of a slash. Can I get assistance on this one please?

Thanks!
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Fri Jul 27, 2012 9:19 pm   
 
Escape the / just like you do the %.
Reply with quote
Xerakon
Apprentice


Joined: 10 May 2011
Posts: 111

PostPosted: Fri Jul 27, 2012 9:31 pm   
 
Thanks!

Okay, on to a little debugging of the script.

Using the 'vreport' alias draws up the following (from the debugger):

Code:

0.0011 | ><IAC><SB><69><1>REPORT<2>CHARACTER_NAME<2>LEVEL<2>CLASS<2>HEALTH<2>HEALTH_MAX<2>MANA<2>MANA_MAX<2>MOVEMENT<2>MOVEMENT_MAX<2>MONEY<2>STR<2>CON<2>DEX<2>WIS<2>INT<2>CHA<2>STR_PERM<2>DEX_PERM<2>CON_PERM<2>WIS_PERM<2>INT_PERM<2>CHA_PERM<2>HITROLL<2>DAMROLL<2>OPPONENT_HEALTH<2>OPPONENT_HEALTH_MAX<2>OPPONENT_LEVEL<2>OPPONENT_NAME<2>CONTINENT<IAC><SE>
1.3370 | i  Legends  *<IAC><SB><69><1>CHARACTER_NAME<2>Demeter<IAC><SE><IAC><SB><69><1>HEALTH<2>1350<IAC><SE><IAC><SB><69><1>HEALTH_MAX<2>1350<IAC><SE><IAC><SB><69><1>LEVEL<2>100<IAC><SE><IAC><SB><69><1>CLASS<2>Combat<IAC><SE><IAC><SB><69><1>MANA<2>0<IAC><SE><IAC><SB><69><1>MANA_MAX<2>200<IAC><SE><IAC><SB><69><1>MONEY<2>187630<IAC><SE><IAC><SB><69><1>MOVEMENT<2>1987<IAC><SE><IAC><SB><69><1>MOVEMENT_MAX<2>1990<IAC><SE><IAC><SB><69><1>HITROLL<2>13<IAC><SE><IAC><SB><69><1>DAMROLL<2>9<IAC><SE><IAC><SB><69><1>STR<2>21<IAC><SE><IAC><SB><69><1>INT<2>16<IAC><SE><IAC><SB><69><1>WIS<2>19<IAC><SE><IAC><SB><69><1>DEX<2>19<IAC><SE><IAC><SB><69><1>CON<2>23<IAC><SE><IAC><SB><69><1>CHA<2>15<IAC><SE><IAC><SB><69><1>STR_PERM<2>21<IAC><SE><IAC><SB><69><1>INT_PERM<2>16<IAC><SE><IAC><SB><69><1>WIS_PERM<2>19<IAC><SE><IAC><SB><69><1>DEX_PERM<2>19<IAC><SE><IAC><SB><69><1>CON_PERM<2>21<IAC><SE><IAC><SB><69><1>CHA_PERM<2>16<IAC><SE><IAC><SB><69><1>OPPONENT_HEALTH<2>0<IAC><SE><IAC><SB><69><1>OPPONENT_HEALTH_MAX<2>0<IAC><SE><IAC><SB><69><1>OPPONENT_NAME<2><IAC><SE>


Now, as you can see, every variable pulls up a response. However, not all of them are turned into actual variables. For example, DEX_PERM generates the variable, but DEX does not. Others, like HITROLL and DAMROLL also do not generate.

Thanks!
Reply with quote
Xerakon
Apprentice


Joined: 10 May 2011
Posts: 111

PostPosted: Fri Jul 27, 2012 11:22 pm   
 
Also looking for help creating these variables:

Code:

Account                   Amount   
22869                      10000       
56946                      5000     


The numbers on the left need each be a variable, and the numbers on the right their own variable as well.
For example, 22869 as 'bank22869' and 10000 as 'credits22869' the same for the line below.

Thanks!
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4662
Location: Pensacola, FL, USA

PostPosted: Sat Jul 28, 2012 4:46 pm   
 
#trigger {^(%d)%s(%s)$} {#ADDKEY bank {%concat("bank", %1)=%2 credits}}

then you can use #SHOWDB @bank
_________________
Discord: Shalimarwildcat
Reply with quote
Xerakon
Apprentice


Joined: 10 May 2011
Posts: 111

PostPosted: Sat Jul 28, 2012 5:31 pm   
 
Hey Shalimar, thanks for the quick response!

No dice on it. The pattern doesn't seem to be firing.

Debug:

Code:

0.0048 | i  Legends  >bank list<CR><LF>
0.5560 | i  Legends  *<ESC>[1;37m<ESC>[1;37m<LF><CR>
0.0000 | Account                   Amount    <LF><CR>
0.0000 | <ESC>[1;31m22869                      2000000     <LF><CR>
0.0000 | <ESC>[1;31m56946                      2000000     <LF><CR><LF><CR>
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Sat Jul 28, 2012 5:46 pm   
 
The second %s should be a %d (%s matches spaces, %d matches digits).
Reply with quote
Xerakon
Apprentice


Joined: 10 May 2011
Posts: 111

PostPosted: Sat Jul 28, 2012 5:53 pm   
 
Still returning nothing.
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Sat Jul 28, 2012 7:37 pm   
 
Oh, I see - shalimar put a $ at the end of the trigger pattern, which means match at the end of the line, but there's a bunch of spaces after the numbers, which wasn't visible in your original post. You'll need to remove that. So to recap, the final pattern should be "^(%d)%s(%d)".
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net