• 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 Chest Help

Strashni

minera.servegame.com
Joined
May 10, 2009
Messages
230
Reaction score
0
Location
Montenegro
Hey...can someone give me a script for chest for money...it's in thais temple,and i need script on that chest are 5cc and can open 45lvl+...
 
Hiho,

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local storage = 2000

        if item.uid == 1740 and getPlayerLevel(cid) >= 45 then
                        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a abit money.")
                        doPlayerAddItem(cid, 2160, 5)
                        doPlayerSetStorageValue(cid, storage, 1)
                else
                        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Go out and fight!")
end
 
Last edited:
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local storage = 2000

        if item.uid == 1740 and getPlayerLevel(cid) >= 45 and getplayerstoragevalue(cid, storage) == -1 then
                        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a abit money.")
                        doPlayerAddItem(cid, 2160, 5)
                        doPlayerSetStorageValue(cid, storage, 1)
                else
                        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Go out and fight!")
end

go to actions.xml and set a actionid.

go into map editor.

add a chest with the id 1740 and give the actionid which you added.
 
Back
Top