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

level Chest (easy for you that knows lua)

fro

New Member
Joined
Nov 11, 2010
Messages
123
Reaction score
1
Well I got this chest that gives you 150k when using it,
but I want it to be like you NEED level 100 to be able to get 150k (use the chest)

im using this:

LUA:
  function onUse(cid, item, frompos, item2, topos)

        if item.uid == 62623 then
        queststatus = getPlayerStorageValue(cid,5640)
        if queststatus == -1 then
        doPlayerSendTextMessage(cid,22,"You have found 15 crystal coins.")
        doPlayerAddItem(cid,2160,15)
        setPlayerStorageValue(cid,5640,1)
        else
        doPlayerSendTextMessage(cid,22,"It is empty.")
        end
        else
        return 0
        end

        return 1
        end

+rep
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerStorageValue(cid, 5640) == -1 then
		if getPlayerLevel(cid) >= 100 then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found 15 crystal coins.')
			doPlayerAddItem(cid, 2160, 15)
			setPlayerStorageValue(cid, 5640, 1)
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You need level 100 or higher to use this chest.')
		end
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'It is empty.')
	end
	return true
end
 
Back
Top