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
Detreax
Newbie


Joined: 18 Jul 2003
Posts: 3

PostPosted: Sun Jul 20, 2003 5:59 am   

Need help with this trigger/variable
 
Okay here is my problem. I want to store into variables the max hit points, max mana, and max movement from the following string:

You have 298(298) hit, 544(544) mana and 192(192) movement points.

Here is what i did. the problem is that it only captures the end parathesis for each. I attempted to stick the max values in brackets but that didn't work at all then. here is what i attempted. Please tell me how i can fix it.

#TRIGGER {You have %1(%2) hit, %3(%4) mana and %5(%6) movement points.} {#VARIABLE maxhp %2;#VARIABLE maxmp %4;#VARIABlE maxmv %6

any help would be helpful.

THnxs,
Detreax
Reply with quote
Detreax
Newbie


Joined: 18 Jul 2003
Posts: 3

PostPosted: Sun Jul 20, 2003 6:47 am   
 
Figured it out. all i had to do was do this:

#TRIGGER {You have %d~(%2~) hit, %d~(%4~) mana and %d(~%6~) movement points.} {#VARIABLE maxhp %2;#VARIABLE maxmp %4;#VARIABLE maxmv %6}
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Jul 20, 2003 2:50 pm   
 
It's surprising that you found out about %d but only used it for half the values.
#TR {You have %d~((%d)~) hit, %d~((%d)~) mana and %d~((%d)~) movement points.} {#VAR maxhp %1;#VAR maxmp %2;#VAR maxmv %3}
Reply with quote
Detreax
Newbie


Joined: 18 Jul 2003
Posts: 3

PostPosted: Mon Jul 21, 2003 4:23 am   
 
I didn't use the %d just to keep it straight to me. I already knew about it. I'm used to zmud 4.x so getting use to 6.62 is taking a little bit.
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