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


Joined: 23 Apr 2006
Posts: 1

PostPosted: Sun Apr 23, 2006 5:48 am   

Kill count trigger
 
#class {Kill Count}
#TRIGGER {You say '(*) Down'} {#add %1_killed 1;#var %1_killed;#say %1 has been killed by Lokee.}
#Trigger {You say 'Kill count (*)'} {#var %1_killed}
#CLASS 0

My mud has very strict rules on how many kills you get per enemy every day. So me and a friend made a trigger where if you said the players name then down, it adds a variable.

It works pretty good, but we need a way to reset all the _killed variables.

Thanks for the help
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Sun Apr 23, 2006 11:55 pm   
 
Something like this should get you started

#CLASS {Kill Count}
#VAR killCount {} {}
#ALIAS resetKills {#variable killCount {%null} {%null}}
#TRIGGER {You say '(*) Down'} {#say %1 has been killed by Lokee.;#add killCount.%1 (1)}
#TRIGGER {You say 'Kill count (*)'} {#say @killCount.%1}
#CLASS 0

It uses a single variable to store each kill count, so far easier to reset the counts
Read up on #addkey for an overview of the key/value bits used.
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
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