• 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 Kill monster get storage..ERROR

Suxex

Member
Joined
Aug 13, 2007
Messages
391
Reaction score
5
Location
Halland - Getinge
I have a problem with this script. There's no error in console but I don't get a storage.

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:
Back
Top