|
mystic Newbie
Joined: 10 Jan 2004 Posts: 9 Location: USA
|
Posted: Sat Jan 10, 2004 1:44 am
help with status bar |
ok i want to know how to extract text from the mud i am playing, such as Hp: 4120(4120) Tactics: 426(426) Xp: 10,656 and transfer that to the status bar i dont know if that is possible but in the screen shots it showed hp and mana and i wondered if i could transfer it from game to status bar and a way to keep it updated so during combat it doesnt get old?[^] please help i am in dire need hehe thanks for your time
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Jan 10, 2004 2:14 am |
You extract the information using a trigger (see #TRIGGER command). You store the information using variables (see #VARIABLE command). You display the information on the status bar with the #STATUS command. For the sample line you provided the commands would be something like this, for command-line entry.
#TR {HP: (%d)~((%d)~) Tactics: (%d)~((%d)~) Xp: (%n)} {#VA hp %1;#VA maxhp %2;#VA tac %3;#VA maxtac %4;#VA xp %5} {} {prompt}
#ST {HP: @hp~(@maxhp~) Tactics: @tac~(@maxtac~) Xp: @xp}
NOTE: Additional spaces may be necessary in the trigger pattern |
|
|
|
mystic Newbie
Joined: 10 Jan 2004 Posts: 9 Location: USA
|
Posted: Sat Jan 10, 2004 2:32 am |
ya thanks for all the info but like where do i enter it (sorry i am really new to this)
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Jan 10, 2004 2:45 am |
"for command-line entry"
Enter it at the command line. That's the box where you do most of your typing. It's usually at the bottom of the main window. |
|
|
|
mystic Newbie
Joined: 10 Jan 2004 Posts: 9 Location: USA
|
Posted: Sat Jan 10, 2004 2:48 am |
so what copy paste it all and enter it or sections at a time (sorry again i am totally lost)
|
|
|
|
user0101 Apprentice
Joined: 01 Aug 2003 Posts: 100 Location: USA
|
Posted: Sat Jan 10, 2004 6:22 am |
Yes. Instead of writing code and compiling it for use, all you need to do is copy and paste the code he wrote into the command line, and press enter. zMUD will parse it all and create everything for you. Sometimes, it is better for everyone to show some ambition and try to solve the problem yourself, you will remember the solution more clearly and it will save everyone some time in the process :)
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Jan 10, 2004 9:50 am |
Yes, copy-paste the whole thing. It's actually two lines, and if you use the clipboard it should preserve the carriage-return between them.
I've separated the two lines below, in case you prefer to enter them one at a time.
#TR {HP: (%d)~((%d)~) Tactics: (%d)~((%d)~) Xp: (%n)} {#VA hp %1;#VA maxhp %2;#VA tac %3;#VA maxtac %4;#VA xp %5} {} {prompt}
#ST {HP: @hp~(@maxhp~) Tactics: @tac~(@maxtac~) Xp: @xp} |
|
|
|
mystic Newbie
Joined: 10 Jan 2004 Posts: 9 Location: USA
|
Posted: Sat Jan 10, 2004 5:05 pm |
ok i did exactly as you said and this is what happened
HP: () Tactics: () Xp:
i am beginning to think maybe this isnt possible on this mud well thanks for all the help |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Jan 10, 2004 5:49 pm |
In that case, the trigger probably isn't working. That's because the trigger pattern doesn't EXACTLY match the MUD output. That's because some places in the MUD output have more than one space. As I said in my NOTE in my first reply:
ADDITIONAL SPACES MAY BE NEEDED IN THE TRIGGER PATTERN
The forum only displays one space. Find where the extra spaces are needed and add them. |
|
|
|
|
|