Killing the boss does not give item, 0 errors in the console
Lua:
local monster = "Magnum Boss"
local t = {
{8301, 1, chance = 70},
{2299, 1, chance = 10},
{2314, 1, chance = 30},
{11230, 1, chance = 40}
}
function onKill(cid, target, lastHit)
local chance = math.random(1, 100)
local r = t[math.random(#t)]
if isPlayer(cid) and getCreatureName(target) == monster then
if r.chance >= chance then
doPlayerAddItem(cid, r[1], r[2], math.random(1, r.count))
doPlayerSendTextMessage(cid, 20, "add items from boss.")
end
end
return true
end
Last edited: