Petracyus Myth
Member
So a friend of mine is trying to run a script with this basic function: when you kill a player, you get a "shadow coin" and it goes to your inventory, but it is not working so i do not know what to do. Help?
TFS V8.2 (Tibia client 8.6)
creaturescripts.xml:
shadowcoin.lua:
TFS V8.2 (Tibia client 8.6)
creaturescripts.xml:
Code:
<event type="kill" name="shadowcoin" event="script" value="shadowcoin.lua"/>
shadowcoin.lua:
Code:
local config = {
shadowCoinID = 9970,
platinumCoinID = 2152
}
function onKill(cid, target)
if isPlayer(target) then
doPlayerAddItem(cid, config.shadowCoinID, 1)
doPlayerAddItem(cid, config.platinumCoinID, math.random(2))
end
return 1
end