• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

onKill not working... (HELP)

Joined
Jul 16, 2010
Messages
1,014
Reaction score
24
Location
Brazil
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:
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
 
Back
Top Bottom