local lever = {
[5550] = {type = "items", amount = 5, id = 2379},
[5551] = {type = "items", amount = 5, id = 7901},
[5552] = {type = "items", amount = 5, id = 2492},
[5553] = {type = "items", amount = 5, id = 2469},
[5554] = {type = "items", amount = 5, id = 2510},
[5555] = {type = "items", amount = 5, id = 2514},
[5556] = {type = "items", amount = 5, id = 2003},
[5557] = {type = "items", amount = 5, id = 2480},
[5558] = {type = "items", amount = 5, id = 2387},
[5559] = {type = "outfit", amount = 5, name="Deadpool", sex = {[0] = 221, [1] = 221}, addon = 3, storage = 785481}
}
local storage,exausted = 98762,10
local stackable = {8303,8310} -- coloque o ID aqui dos que só vem 1
function onUse(cid,item,fromPosition,itemEx,toPosition)
local ret = lever[item.actionid]
if getPoints(cid) < ret.amount then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Você precisa de "..ret.amount.." points.") return true
elseif getPlayerStorageValue(cid, storage) >= os.time() then
doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, storage) - os.time() .. " seconds to use this item again.") return true
end
if ret.type == "items" then
doPlayerAddItem(cid, ret.id, isItemStackable(ret.id) and isInArray(stackable, ret.id) and 1 or 100)
doPlayerSendTextMessage(cid,22,"Você comprou um " .. getItemNameById(ret.id))
elseif ret.type == "outfit" then
if getPlayerStorageValue(cid, ret.storage) > 0 then
doPlayerSendCancel(cid, "voce ja comprou essa outfit.") return true
end
setPlayerStorageValue(cid, ret.storage, 1)
doPlayerSendTextMessage(cid,22,"Você recebeu uma outfit: " .. ret.name)
doPlayerAddOutfit(cid, ret.sex[getPlayerSex(cid)], ret.addon)
end
removePoints(cid, ret.amount)
setPlayerStorageValue(cid, storage, os.time()+exausted)
doSendMagicEffect(getCreaturePosition(cid), math.random(28,30))
return true
end
agora poderá outras outfits quando quiser.