EvoSoft
Is Da Mapper
Hi!
I have this script where the guy who last hits the creature gets the storage value.
I want it to be EVERYONE who did dmg to the creature.
Here's the script:
I have this script where the guy who last hits the creature gets the storage value.
I want it to be EVERYONE who did dmg to the creature.
Here's the script:
LUA:
function onKill(cid, target)
local config = {
["zugurosh"] = {amount = 1, storage = 32991, doorstorage = 1994},
["madareth"] = {amount = 1, storage = 32992, doorstorage = 1995},
["latrivian"] = {amount = 1, storage = 32993, doorstorage = 1996},
["annihilion"] = {amount = 1, storage = 32994, doorstorage = 1997},
["hellgorak"] = {amount = 1, storage = 32994, doorstorage = 1998}
}
local monster = config[getCreatureName(target):lower()]
if(isPlayer(target)) or not monster then
return true
end
if getPlayerStorageValue(cid, monster.storage) >= -1 and (getPlayerStorageValue(cid, monster.storage) +1) < monster.amount then
setPlayerStorageValue(cid, monster.storage, getPlayerStorageValue(cid, monster.storage) +1)
end
if (getPlayerStorageValue(cid, monster.storage) +1) == monster.amount then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations, you have killed "..getCreatureName(target).."s and can now pass to the next door.")
setPlayerStorageValue(cid, monster.storage, getPlayerStorageValue(cid, monster.storage) +1)
setPlayerStorageValue(cid, monster.doorstorage, 1)
end
return true
end
Last edited: