This will setstoragevalue to the first player on the monster death list.
I want the same but giving the storage to every one who hit the monster.
server: cryingdamson6pl1-gui
I know, this script sux, but i dont really know how to make good ones
I want the same but giving the storage to every one who hit the monster.
server: cryingdamson6pl1-gui
Code:
function onDeath(cid, corpse, deathList)
local killer = deathList[1]
local pirates = 30624
local out = 30600
local killed = getPlayerStorageValue(killer, 30624)
if isPlayer(killer) then
if getPlayerStorageValue(killer, out) == 1 then
if getPlayerStorageValue(killer, pirates) < 9 then
doPlayerSetStorageValue(killer, pirates, killed + 1)
doPlayerSendTextMessage(killer, MESSAGE_STATUS_CONSOLE_BLUE, "" .. getPlayerStorageValue(killer, pirates) .. " pirates defeated.")
else
doPlayerSendTextMessage(killer, MESSAGE_STATUS_CONSOLE_RED, "You have killed the required number.")
end
end
end
return TRUE
end
I know, this script sux, but i dont really know how to make good ones