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

how to make chest with levels ?

Xei

...
Joined
Apr 29, 2009
Messages
280
Reaction score
1
i need to make a chest that only lvl 60 cant take the quest
thanks!
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local chest = {
		storage = 43418,
        level = 100
	}
	if getPlayerStorageValue(cid, chest.storage) == -1 then
		if getPlayerLevel(cid) >= chest.level then
			doPlayerAddItem(cid, 2136, 1)
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have claimed your prize!")
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORKS)
            setPlayerStorageValue(cid, chest.storage, 1)
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may open this chest.")
		end
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.")
	end
	return true
end
 
thaks but 1 more question
when i click on chest it dont put item in bp i must take it from the chest..how i make it come auto in my bp ?
 
Back
Top