Add it to creaturescripts.xml as "kill" event. Remember to 'register' it in login.lua!
After kill it will show:
Someone [123] killed Somebody [321] !
Friend requested it on MSN, he said that all scripts from otland are bugged [on 0.4].
Script tested on rev. 3777
That code check if 'cid' did 'last hit' is 0.4:
After kill it will show:
Someone [123] killed Somebody [321] !
Lua:
function onKill(cid, target, damage, flags)
if(isPlayer(cid) and isPlayer(target)) then
if(flags % 2 == 1) then
doBroadcastMessage(getCreatureName(cid) .. " [" .. getPlayerLevel(cid) .. "] killed " .. getCreatureName(target) .. " [" .. getPlayerLevel(target) .. "] !")
end
end
return true
end
Script tested on rev. 3777
That code check if 'cid' did 'last hit' is 0.4:
Lua:
if(flags % 2 == 1) then
Last edited: