Fortera Global
Intermediate OT User
- Joined
- Nov 20, 2015
- Messages
- 1,180
- Solutions
- 2
- Reaction score
- 117
This is a script to add kills and death in the char, the famous KD.
I would like to just to get kills/death If the killer is not within a pvp zone area.
I want to say that: if you are in pvp area, you will not count kill/death for not getting unjustified.
tfs 1.2
I would like to just to get kills/death If the killer is not within a pvp zone area.
I want to say that: if you are in pvp area, you will not count kill/death for not getting unjustified.
tfs 1.2
Lua:
function onKill(creature, target)
if creature:isPlayer() and target:isPlayer() then
return true
end
creature:say("+1 Kill", TALKTYPE_ORANGE_1)
creature:setStorageValue(167912, math.max(0, creature:getStorageValue(167912)) + 1)
return true
end
function onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)
creature:say("+1 Death", TALKTYPE_ORANGE_1)
creature:setStorageValue(167913, math.max(0, creature:getStorageValue(167913)) + 1)
return true
end