View Full Version : player.pl or something else to update a counter?
Irreverent
09-07-2009, 12:52 PM
Each time a person dies is there a way to run commands on them? Like death_counter = death_counter + 1? Vice versa, if someone kills something that they get a kill_counter?
trevius
09-07-2009, 05:03 PM
If you are talking about NPCs vs Players, then you could probably use this:
sub EVENT_SLAY - Triggered whenever an NPC kills someone.
And then just use quest globals to keep track of your scores.
For players killing NPCs, you can just use this:
sub EVENT_KILLED_MERIT - Triggered on NPC death when you are in the group credited with doing the most damage to said loottable NPC.
If you want to keep track of player vs player, I haven't tried it, but maybe you could use EVENT_ZONE and check the players current HPs when they zone to see if they are <= 0. If so, then you up the counter for them being killed, but I don't know how you would up a counter for killing another player.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.