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


Joined: 11 Dec 2003
Posts: 17
Location: Netherlands

PostPosted: Wed Jan 21, 2004 4:01 pm   

How2: add/substract 1
 
Zmud 4.62 on VME2.0 (valheru.com)

The bracer I have can have a max load of five charges.
I would like to keep track somewhere (pref in the status line) how many charges there currently are (as there is no way to check).

The string I get when it's loaded.
PATTERN: You feel your bracer of lightning pulse as it fills with power.
COMMAND: (this is where it should add 1)

The string I get when it's used.
PATTERN: Your bracer of lightning glows in a bright blue color.
COMMAND: (this is where is should substract 1)

Is it possible someone could help me out in lamer terms with an example.
I can take it from there on I hope Smile

I hope I wrote this clear enough, if not, please ask
Reply with quote
musishun00
Wanderer


Joined: 16 Dec 2003
Posts: 77
Location: USA

PostPosted: Wed Jan 21, 2004 4:06 pm   
 
Not sure exactly what the commands are in 4.62, but if the #ADD command works, then try this:

#TRIGGER {You feel your bracer of lightning pulse as it fills with power.} {#ADD bracer_charges 1}
#TRIGGER {Your bracer of lightning glows in a bright blue color.} {#ADD bracer_charges -1}

Hope this works!
Reply with quote
yared
Beginner


Joined: 11 Dec 2003
Posts: 17
Location: Netherlands

PostPosted: Wed Jan 21, 2004 4:13 pm   
 
Thanks!

add works, it aint that ancient [:p]

I've added this one
PATTERN: The bracer of lightning has not charged enough power yet.
COMMAND: #UNVAR bracer_charges

Just to be sure it's set to ZERO when it's empty.

Where can I read the variable other then going to variables?
Is it possible to show the variable on the statusline?
Reply with quote
yared
Beginner


Joined: 11 Dec 2003
Posts: 17
Location: Netherlands

PostPosted: Wed Jan 21, 2004 4:32 pm   
 
quote:
Originally posted by yared

Thanks!

add works, it aint that ancient [:p]

I've added this one but it's not working as it removes the variable totally (of course) and I just want it reset to 0.
PATTERN: The bracer of lightning has not charged enough power yet.
COMMAND: #UNVAR bracer_charges

Where can I see the variable output other then going to variables?
Is it possible to show the variable on the statusline?

Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Wed Jan 21, 2004 5:11 pm   
 
#ST {Bracer Charger: @bracer_charges}
Reply with quote
yared
Beginner


Joined: 11 Dec 2003
Posts: 17
Location: Netherlands

PostPosted: Wed Jan 21, 2004 5:47 pm   
 
Thanks all, got it running for multiple charge weapons AND it looks good in the statusline!

Another happy customer [:I]
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