• 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!

Lua server crash

dervin13

Active Member
Joined
Apr 26, 2008
Messages
459
Solutions
1
Reaction score
28
when i kill the monster of this quest the server goes down... the problem is in something in this script... someone know how to solve it?

function onKill(cid, target)
if(isMonster(target)) then
if(ZLAK_MISSIONS[string.lower(getCreatureName(target))]) then
if(getPlayerStorageValue(cid, STORAGE_ZLAK) == ZLAK_MISSIONS[string.lower(getCreatureName(target))].STORAGE_ZLAK) then
local STORAGE = string.explode(string.lower(getCreatureName(target)), " ")
if(getPlayerStorageValue(cid, ZLAK_MISSIONS[string.lower(getCreatureName(target))].STORAGE) < ZLAK_MISSIONS[string.lower(getCreatureName(target))].MAX_STORAGE_VALUE) then
setPlayerStorageValue(cid, ZLAK_MISSIONS[string.lower(getCreatureName(target))].STORAGE, math.max(0, getPlayerStorageValue(cid, ZLAK_MISSIONS[string.lower(getCreatureName(target))].STORAGE)) + 1)
end
end
elseif(ZALAMON_FORMS[string.lower(getCreatureName(target))]) then
doSummonCreature(ZALAMON_FORMS[string.lower(getCreatureName(target))].NEW_FORM, getCreaturePosition(target))
doCreatureSay(target, ZALAMON_FORMS[string.lower(getCreatureName(target))].TEXT, TALKTYPE_ORANGE_1)
elseif(SOUL_PARTS[string.lower(getCreatureName(target))]) then
doItemSetAttribute(doCreateItem(12278, 1, getCreaturePosition(target)), "aid", SOUL_PARTS[string.lower(getCreatureName(target))])
end
end
return true
end

the error is about the STORAGE i thinkk...
 
Last edited:
no, it's to count the dead monsters putting a storage... so when get the max storage it will not count any more and you will can talk with npc and get another mission...
 
Back
Top