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


Joined: 05 Dec 2004
Posts: 9

PostPosted: Wed Dec 08, 2004 4:17 am   

Damage Counter
 
#TRIGGER {You * (%d) time[s, ]with (%x) (%w)!$} {#ADD @CharName %item( @DamVals, %ismember( "%1", @DamWords));#ADDITEM PlayerFighters @CharName;#COL 3}

okay what this trigger does is adds the damage done by myself to a variable that my char name is called, I have another alias that reports the damaeg and then removes the variable, but what I want it to do is count the numbre of hits,(%d) is the number of hits :p, but I want it to be in a variable close to @charname, is there anyway to put 2 vars into one variable with still using the #ADD function for both variablse?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Dec 08, 2004 10:22 am   
 
The #ADD command only works with a basic numeric variable. In order to combine the 2 sets of data into a single variable you would have to use a list or record, and #ADD won't work with them. You would have to do a few more manipulations and use the %eval function.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Wed Dec 08, 2004 1:19 pm   
 
Actually You can use #ADD with a record variable you just have to format it like %rec.key. I wrote a a how-to article for using record variables but never got around to adding it into the KB however doing a search for HOW-TO it should come up

syntax:
#ADD charname.varone 1
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Trin
Newbie


Joined: 05 Dec 2004
Posts: 9

PostPosted: Sat Dec 11, 2004 3:27 am   
 
Thanks for the info, helped ALOT

I made an alias to report the damage but when I report it ONE variable gets messed up and is screwing with everything else

#ADD DamTotal {@(%i.damage)}
#ADD DamTotal {@{%i.damage}}
#ADD DamTotal {@%i.damage}
#ADD DamTotal @(%i.damage

Ive tried practically everything, but when it calls for the %i.damage (%i being the players name), it only brings @%i to DamTotal and makes the variable like this:

#VAR Damtotal {0Damage=17002|Hit=48}

I want it just to add the damage Number, not add everything
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