|
Luci_Heru Newbie
Joined: 23 Apr 2006 Posts: 1
|
Posted: 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 |
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: 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... ;) |
|
|
|
|
|