johnsamir
Advanced OT User
Hello
I've created this simple revscript based on others scripts function. the script is not working and is not giving
at data/scripts reward.lua
at creaturescripts/login.lua
I've created this simple revscript based on others scripts function. the script is not working and is not giving
at data/scripts reward.lua
Code:
local killevent = CreatureEvent("kill_rewards")
local reward, count = 2152, 3
function onKill(player, target)
if player:getPlayer() and target:getPlayer() then
if player:getIp() ~= target:getIp() then
player:addItem(reward, count)
player:addSoul(2)
end
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, 'You may not get a reward by killing a player with the same IP as yours.')
end
return true
end
killevent:register()
at creaturescripts/login.lua
Lua:
player:registerEvent("kill_rewards")