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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
thePhos
Newbie


Joined: 13 May 2002
Posts: 4
Location: USA

PostPosted: Sat Apr 13, 2002 12:50 pm   

Seperating parts of a trigger
 
Hi all,

I'm a total newbie to ZMud, so there may be an easy solution to this that I'm just not getting.

What I get from the MUD (TCS, for anyone who cares) is the following, before every prompt:

[100/100hp 100/100en]

Now, what I'd like to do is seperate that into its component parts, and put them in variables so I can send it to the status line. I'd also like ZMUD to NOT echo this line in my active window.

Now, I've read most of the help files, and from what I've read, I thought the following should work (but, of course, it doesn't)

#TR {[(%d)~/~(%d)hp (%d)~/~(%d)en]}}
#VAR CurHP %1
#VAR MaxHP %2
#VAR CurEnd %3
#VAR MaxEnd %4

Now this triggers the trigger, but doesn't properly map the variables. I think this is because of the leading string characters and the fact that is is all jumbled together. Is there any way I can correct this?

And does anyone know how I can avoid sending this to my active window, so I get the information only in my Status window?

Thanks in advance for your help.



===Harpoonz=>
Reply with quote
Agroamar
Beginner


Joined: 09 Feb 2002
Posts: 10
Location: USA

PostPosted: Sat Apr 13, 2002 2:15 pm   
 
well the brackets are a special char and why are you putting those curly things after the / ? You put that only before a special char such as [, ?, and the other ones (er, I won't list them all here.) also... Why you closing off your trigger if you want stuff to act upon it? If you want your trigger to create variables based on the information... You need the var creation in the second brackets... er.. hrm not explaining it well... but here see this:

#TR {~[(%d)~/(%d)hp (%d)~/(%d)en~]} {#VAR CurHP %1;#VAR MaxHP %2;#VAR CurEnd %3;#VAR MaxEnd %4;}

that should work, of course I haven't tested it... Just test it see if it works, let me know results :)
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Apr 13, 2002 3:47 pm   
 
Agroamar's trigger is correct, although it doesn't need the ; at the end or the ~ before the /'s.

This will probably need to be a prompt type trigger. You can avoid seeing this info in the main window with the #GAG command. You might get a blank line its place.

#TR {~[(%d)/(%d)hp (%d)/(%d)en~]} {#GAG;#VAR CurHP %1;#VAR MaxHP %2;#VAR CurEnd %3;#VAR MaxEnd %4} {} {nocr|prompt}

LightBulb
Vague questions get vague answers
Reply with quote
Agroamar
Beginner


Joined: 09 Feb 2002
Posts: 10
Location: USA

PostPosted: Sat Apr 13, 2002 3:52 pm   
 
Ooh Thanks lightbulb for clearing up my Trigger, I thought Harpoonz might have known something I didn't with the slashes *snicker*, and I did NOT mean to add that extra semi-colon.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
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