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


Joined: 13 Oct 2002
Posts: 1
Location: Australia

PostPosted: Fri Nov 21, 2003 12:20 am   

help needed to seperate values for trigger
 
I am unable to get this set of numbers broken down

Hp: 2055(2055) Gp: 2675(2675) Xp: 192877(2400000)

I think the Brakets are causing problems
I tried so far
Hp: %d((%d)) Gp: %d((%d)) Xp: %d((%d))
doesnt work

any ideas to make it fit these vars
@hplev = %1
@hpmax = %2
@gplev = %3
@gpmax = %4
@xplev = %5
@xpmax = %6
#show %1 %2 %3 %4 %5 %6

thnks in advance
Tony
Reply with quote
Cuttlefish
Apprentice


Joined: 28 Oct 2003
Posts: 164

PostPosted: Fri Nov 21, 2003 2:45 am   
 
You were oh-so-close. You need to "escape" out the literal parentheses so the pattern matcher will realize you're talking about real parens and not just the special grouping parentheses. Use the quote character ~ in front of them.

Hp: (%d)~((%d)~) Gp: (%d)~((%d)~) Xp: (%d)~((%d)~)

Or, you could get fancier and do this:

#TRIGGER {Hp: &%dhplev~(&%dhpmax~) Gp: &%dgplev~(&%dgpmax~) Xp: &%dxplev~(&%dxpmax~)}

This will save you from having to assign those values yourself. Smile
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