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
cxs410
Beginner


Joined: 04 Oct 2005
Posts: 20

PostPosted: Tue Oct 04, 2005 8:05 pm   

Newbie Question..
 
i'm trying to grab my hp/maxhp's from my mud but i'm having a hard time getting it working.. I undersand the variable's and all that good stuff but for some reason i can't get the pattern to match.

hp: 38(38)

I was trying hp: %d(%d) but that doesn't match.. any help?
Reply with quote
Maelstrom
Apprentice


Joined: 10 Feb 2005
Posts: 158

PostPosted: Tue Oct 04, 2005 8:11 pm   
 
Sure thing. Parenths IE ( and ) need to be escaped because they are used in the trigger line also to tell ZMud to capture whatever is enclosed. Try the below:
#TRIGGER {^hp: (%d)~((%d)~)}

In the body of the trigger (note the extra parenths now) you can use %1 %2 to refer to the captured hps...
Reply with quote
cxs410
Beginner


Joined: 04 Oct 2005
Posts: 20

PostPosted: Tue Oct 04, 2005 8:16 pm   
 
Thanks a ton.. that helps explain alot of things!
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