Desculpa Pelo Topico Acabei De Criar a Conta,So Iniciante.
Script:
local lever = {
[6001] = {3,11257},
[6002] = {3,2527},
[6003] = {3,2644},
[6004] = {3,9928},
[6005] = {3,9929},
[6006] = {3,9927},
[6007] = {3,10219},
[6008] = {7,7735},
[6009] = {7,6534},
[6010] = {7,7405},
[6011] = {7,7423},
[6012] = {7,7389},
[6013] = {7,5907},
[6014] = {7,2352},
[6015] = {15,7426},
[6016] = {15,2424},
[6017] = {15,2441},
[6018] = {15,8980},
[6019] = {15,7433},
[6020] = {15,8858},
[6021] = {15,8979},
[6022] = {15,8976},
[6023] = {15,5978}
}
local storage,exausted = 98762,10
local Stackable = {11257,2527,2644,9928,9929,9927,10219,7735,6534,7405,7423,7389,5907,2352,7426,2424,2441,8980,7433,8858,8979,8976,5978} -- coloque o ID aqui dos que só vem 1
function onUse(cid,item,fromPosition,itemEx,toPosition)
if getPoints(cid) < lever[item.actionid][1] then
return doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Você precisa de "..lever[item.actionid][1].." points.")
elseif getPlayerStorageValue(cid, storage) >= os.time() then
return doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, storage) - os.time() .. " seconds to use this item again.")
end
doPlayerAddItem(cid,lever[item.actionid][2], isItemStackable(lever[item.actionid][2]) and isInArray(Stackable, lever[item.actionid][2]) and 1 or 100)
removePoints(cid,lever[item.actionid][1])
setPlayerStorageValue(cid, storage, os.time()+exausted)
doPlayerSendTextMessage(cid,22,"Você comprou um " .. getItemNameById(lever[item.actionid][2]))
doSendMagicEffect(getCreaturePosition(cid), math.random(28,30))
return true
end
Tag:
<action actiond="6001-6023" script="pointsbau.lua"/>
Erro No Distro:
O erro nao esta mais acontecendo
Atenciosamente,
InfinityOts.