PHP Code:
function onCreated() {
setTimer(0.05);
}
function onWasH1t() {
this.last_attacker = player.account;
}
function onTimeOut() {
if (this.hearts == "0" || this.hearts == NULL) {
findplayer(this.last_attacker).addweapon("SomeWeaponName");
}
setTimer(0.05);
}
(Remember to change "WasH1T" and change the "1" to an "i")
I believe that should be the final script, or something around there. =)
Also, remember rule one of posting in the scripting section of the Graal Forums.
Quote:
1. Be clear on your ability level. In other words, do not post asking for scripts, or asking people to fix scripts that are above your ability level. If you are writing a script to aid learning, then try writing a simpler script. If you are looking for a script for a server, then the best solution is probably to hire a scripter.
|