Quando der meu REP+ dos outros topicos eu te ajudo. Acho injusto all te ajuda e voce ignora sem dar rep.
info
Group: Artesão
Joined: 20/04/10
Posts: 109
Reputation: +23
Tibia Character: Charles Mil

info
Group: Conde
Joined: 11/02/09
Posts: 559
Reputation: +7
Tibia Character: Deep Druid

Acabei de dar um rep, é que só posso dar 1 por dia ![]()
info
Group: Marquês
Joined: 02/08/12
Posts: 1k
Reputation: +234
Tibia Character: Maurolkit

Tenta esse
function onUse(cid, item) local storagetime = 12312 if getPlayerStorageValue(cid, storagetime) - os.time() <= 0 then doPlayerAddItem(cid, xxx, 1) setPlayerStorageValue(cid, storagetime, os.time() + 86400 ) else doPlayerSendTextMessage(cid, 28, "Sorry, you need wait [".. getPlayerStorageValue(cid, storagetime) - os.time() .."] for use this try.") end return true end
Você só arruma oque ele vai dar a tag você sabe ( eu acho )
info
Group: Conde
Joined: 11/02/09
Posts: 559
Reputation: +7
Tibia Character: Deep Druid

Tá sei, mas agora eu queria uma quest assim que pegue uma bp com todos os slots "20" dentro dela com 1kk ou seja 20kk .. pode ser?
info
Group: Marquês
Joined: 02/08/12
Posts: 1k
Reputation: +234
Tibia Character: Maurolkit

Está ai
function onUse(cid, item) local storagetime = 12312 backpack = doPlayerAddItem(cid, id_da_backpack, 1) if getPlayerStorageValue(cid, storagetime) - os.time() <= 0 then doAddContainerItem(backpack, 2160, 2000) setPlayerStorageValue(cid, storagetime, os.time() + 86400 ) else doPlayerSendTextMessage(cid, 28, "Sorry, you need wait [".. getPlayerStorageValue(cid, storagetime) - os.time() .."] for use this try.") end return true end
Você só muda o id da backpack
Edited Agosto 4 by Skymagnum
info
Group: Campones
Joined: 12/06/12
Posts: 99
Reputation: +8

Acabei de dar um rep, é que só posso dar 1 por dia
CARA VC SABE QUE SO PODE DAR UM REP POR DIA INTAO NAO FAÇA MUITOS PEDIDOS DE UMA VES SO FAÇA UM TENTE RESOLVER DA ALGUNS DIAS AJUDE ALGUEM E DEPOIS FAÇA OUTRO PEDIDO E NAO IGNORE AS PESSOAS QUE AJUDAM VC.
SHADOWNZINHO
Edited Agosto 4 by Shadownzinho
info
Group: Conde
Joined: 11/02/09
Posts: 559
Reputation: +7
Tibia Character: Deep Druid

O script não está funcionando só diz que você tem tal tempo pra poder fazer a quest novamente, mas não pega nenhum item !
info
Group: Conde
Joined: 04/08/12
Posts: 762
Reputation: +80

Tente esse:
function onUse(cid, item, frompos, item2, topos)
bag = doPlayerAddItem(cid, 1988, 1)
if item.uid == 2103 then
queststatus = getPlayerStorageValue(cid,2103)
if queststatus == -1 then
doPlayerSendTextMessage(cid,25,"You have found 20kk.")
doAddContainerItem(bag, 2160, 2000)
setPlayerStorageValue(cid,2103,1)
else
oPlayerSendTextMessage(cid,25,"It is empty.")
end
else
return 0
end
return 1
end
Vermelho: item
Laranja: Quantidade (1kk = 100)
Edited Agosto 4 by Newtonnotwen
info
Group: Marquês
Joined: 02/08/12
Posts: 1k
Reputation: +234
Tibia Character: Maurolkit

Estranho pois eu testei no meu servidor e funcionou
info
Group: Conde
Joined: 04/08/12
Posts: 762
Reputation: +80

@Skymagnum
Aqui também funcionou o seu.
O meu também ta funcionando.
-------------------------------------------------------
@MattheusOT
Da algum erro no console?
Edited Agosto 4 by Newtonnotwen
info
Group: Herói
Joined: 20/05/10
Posts: 3.4k
Reputation: +1.5k
Gender: Masculino

no servidor do matheus nunca funciona nada, incrível isso
info
Group: Conde
Joined: 11/02/09
Posts: 559
Reputation: +7
Tibia Character: Deep Druid

Agora está funcionando, só que quando o player pega a backpack com os 20kk depois se ele clicar ele continua pegando backpacks mas não tem problema .
Mattheus* , é que sou burro cara ):
local time = 1 -- tempo em horas function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 3917) < os.time() then bp = doPlayerAddItem(cid, 1988, 1) doAddContainerItem(bp, 2160, 2000) setPlayerStorageValue(cid, 3917, os.time() + time*60*60) else doPlayerSendCancel(cid, "Você deve esperar ".. getPlayerStorageValue(cid, 3917) - os.time() .." horas.") end return true end
info
Group: Marquês
Joined: 02/08/12
Posts: 1k
Reputation: +234
Tibia Character: Maurolkit

Pronto Atualizei (com a ajuda do Maxwelden)
agora retorna hora minutos e segundos
function getTime(seconds) local seconds = 86400 local h = math.floor(s/3600) local m = math.floor((s - h * 3600) / 60) return h, m, (s - h * 3600) - m * 60 end function onUse(cid, item) local storagetime = 12312 local hora, minuto, segundo = getTime(seconds) backpack = doPlayerAddItem(cid, id_da_backpack, 1) if getPlayerStorageValue(cid, storagetime) - os.time() <= 0 then doAddContainerItem(backpack, 2160, 2000) setPlayerStorageValue(cid, storagetime, os.time() + seconds ) else doPlayerSendTextMessage(cid, 28, "Você deve esperar " ..hora .. " hora(s), ".. minuto .. " minuto(s) e ".. segundo .. " segundo(s), para usar novamente") end return true end






info
Group: Conde
Joined: 11/02/09
Posts: 559
Reputation: +7
Tibia Character: Deep Druid
Gostaria de um script de uma chest que você só pode fazer 1 vez por dia ..