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

Donator Chest

Triggah

TrigCore
Joined
Aug 1, 2007
Messages
436
Reaction score
2
My server doesnt save items and so i need a donator chest that if u have a specific storage value u can use this chest once per login, 100 total uses.

can anyone help with that?
 
Not Tested

Lua:
local cfg = { storage = 12345, item = 2400 }

function onUse(cid, item, fromPos, itemEx, toPos)
local vipAccess = getPlayerStorageValue(cid, cfg.storage)
local name = getItemNameById(cfg.item)
    if vipAccess == -1 then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You must be a donator to open this chest.")
    else
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have found a ".. name ..".")
	doPlayerAddItem(cid, cfg.item, 1)
    end
    return TRUE
end
 
Back
Top