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


Joined: 06 Dec 2003
Posts: 2
Location: USA

PostPosted: Mon Dec 08, 2003 3:27 pm   

Variable collection
 
Howdy all.

I'm trying to get the following line to trigger a variable collection:

HP: 512/466 CP: 436/436 E:100% R:92% C:57% S: 94% ENEMY: 0%


I tried using &varnames and it didn't work. can someone help me create a trigger to change each number into a variable?
Reply with quote
Toetag
Magician


Joined: 10 Oct 2000
Posts: 356
Location: USA

PostPosted: Mon Dec 08, 2003 4:50 pm   
 
Try something like:

HP: (%d)/(%d) CP: (%d)/(%d) E:(%d)~% R:(%d)~% C:(%d)~% S: (%d)~% ENEMY: (%d)~%

hpmax = %1
hp = %2
cpmax = %3
cp = %4
e = %5
r = %6
c = %7
s = %8
enemy = %9
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Mon Dec 08, 2003 5:26 pm   
 
#TRIGGER {HP: (%d)/(%d) CP: (%d)/(%d) E:(%d)~% R:(%d)~% C:(%d)~% S: (%d)~% ENEMY: (%d)~%} {HPmax=%1;HP=%2;CPmax=%3;CP=%4;E=%5;R=%6;C=%7;S=%8;ENEMY=%9}

Just had to add the ~ infront of the trigger % you had
so: E:100% Would be: E:(%d)~% or: E: &%d{E}

then the experession would look like this:

#TRIGGER {HP: &%d{HPmax}/&%d{HP} CP: &%d{CPmax}/&%d{CP} E:&%d{E}~% R:&%d{R}~% C:&%d{C}~% S: &%d{S}~% ENEMY: &%d{ENEMY}~%} {}

This is coverd in hte help file under 'Pattern Matching'
Reply with quote
Toetag
Magician


Joined: 10 Oct 2000
Posts: 356
Location: USA

PostPosted: Mon Dec 08, 2003 5:36 pm   
 
you lost me on that one mega. "had to add ~", where did i leave it off?

HP: (%d)/(%d) CP: (%d)/(%d) E:(%d)~% R:(%d)~% C:(%d)~% S: (%d)~% ENEMY: (%d)~%
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Mon Dec 08, 2003 5:40 pm   
 
not You, I ment him, but i was writing the message when you posted yours.
hehehe
Reply with quote
Toetag
Magician


Joined: 10 Oct 2000
Posts: 356
Location: USA

PostPosted: Mon Dec 08, 2003 5:59 pm   
 
okay.

seeing as how he didn't display a trigger, didn't see how you were correcting him and it through me a bit..

alls well that ends well, anyhow.
Reply with quote
webwolf
Newbie


Joined: 06 Dec 2003
Posts: 2
Location: USA

PostPosted: Mon Dec 08, 2003 6:02 pm   
 
Ok, awesome. Thanks for the help!
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