Suxex
Member
I have a problem with this script. There's no error in console but I don't get a storage.
edit: it's loaded correctly in creaturescript.xml and login.lua
Code:
local monster ={ ["lizard magistratus"] = {storage = 42330, kills = 4, popup = "You have killed enough magistratus, go talk to Zlak again."},
["lizard noble"] = {storage = 42331, kills = 6, popup = "You have killed enough nobles, go talk to Zlak again."}
}
function onKill(cid,target)
local m = monster[string.lower(getCreatureName(target))]
if(not m) then
return true
end
if getPlayerStorageValue(cid,m.storage) == m.kills then
doPlayerPopupFYI(cid, m.popup)
return true
end
if getPlayerStorageValue(cid,m.storage) >= 0 and getPlayerStorageValue(cid,m.storage) <= 4 then
setPlayerStorageValue(cid,m.storage,getPlayerStorageValue(cid,m.storage) +1)
return true
end
setPlayerStorageValue(cid, m.storage, getPlayerStorageValue(cid,m.storage) +1)
return true
end
edit: it's loaded correctly in creaturescript.xml and login.lua
Last edited: