é possivel fazer aprimorar ?
Gostaria do seguinte:
Item "0000" - 30 min de x2
Item "0000" - 30 min de x3
Item "0000" - 30 min de x5
Item "0000" - 30 min de x7
Desde já agradeço.
Por Administrador, 15 de ago. de 2016 em Actions e Talkactions
info
Grupo: Artesão
Registrado: 26/04/09
Posts: 120
Reputação: +2

é possivel fazer aprimorar ?
Gostaria do seguinte:
Item "0000" - 30 min de x2
Item "0000" - 30 min de x3
Item "0000" - 30 min de x5
Item "0000" - 30 min de x7
Desde já agradeço.
Em 15/08/2016 at 17:08, Daniel disse:function onUse(cid, item, fromPosition, itemEx, toPosition) local player = Player(cid) if player:getStorageValue(1234) >= os.time() then player:say('You already have double exp!', TALKTYPE_MONSTER_SAY) return true end player:setStorageValue(1234, os.time() + 7200) Item(item.uid):remove(1) player:say('Your 2 hours of double XP has started!', TALKTYPE_MONSTER_SAY) player:registerEvent("dblxp") return true end
Essa parte adiciono aonde?
info
Grupo: Marquês
Registrado: 03/02/13
Posts: 1.2k
Reputação: +254
Gênero: Masculino
Char no Tibia: Partiu Baladinha

2 horas atrás, iStark disse:Essa parte adiciono aonde?
data/actions
43 minutos atrás, Lumus disse:data/actions
Fiz isso. Mas do use no item da um erro na distro " nill player " algo assim
Oi, fui testar aqui e da esse erro.
[02/09/2017 10:47:32] [Error - Action Interface]
[02/09/2017 10:47:32] data/actions/scripts/dblxp.lua:onUse
[02/09/2017 10:47:32] Description:
[02/09/2017 10:47:32] data/actions/scripts/dblxp.lua:2: attempt to call global 'Player' (a nil value)
[02/09/2017 10:47:32] stack traceback:
[02/09/2017 10:47:32] data/actions/scripts/dblxp.lua:2: in function <data/actions/scripts/dblxp.lua:1>
Estou usando PDA
Em 02/09/2017 em 08:49, EBR disse:Oi, fui testar aqui e da esse erro.
[02/09/2017 10:47:32] [Error - Action Interface]
[02/09/2017 10:47:32] data/actions/scripts/dblxp.lua:onUse
[02/09/2017 10:47:32] Description:
[02/09/2017 10:47:32] data/actions/scripts/dblxp.lua:2: attempt to call global 'Player' (a nil value)
[02/09/2017 10:47:32] stack traceback:
[02/09/2017 10:47:32] data/actions/scripts/dblxp.lua:2: in function <data/actions/scripts/dblxp.lua:1>
Estou usando PDA
to com mismo error
Em 02/09/2017 em 08:49, EBR disse:Oi, fui testar aqui e da esse erro.
[02/09/2017 10:47:32] [Error - Action Interface]
[02/09/2017 10:47:32] data/actions/scripts/dblxp.lua:onUse
[02/09/2017 10:47:32] Description:
[02/09/2017 10:47:32] data/actions/scripts/dblxp.lua:2: attempt to call global 'Player' (a nil value)
[02/09/2017 10:47:32] stack traceback:
[02/09/2017 10:47:32] data/actions/scripts/dblxp.lua:2: in function <data/actions/scripts/dblxp.lua:1>
Estou usando PDA
up
info
Grupo: Administrador
Registrado: 08/07/05
Posts: 5.8k
Reputação: +1.4k
Gênero: Outro
Action abaixo, escolha o item que quiser para o script.
Tempo (é em segundos): 7200 = 2 Horas
Como converter: https://www.google.com.br/#q=2+horas+em+segundos
function onUse(cid, item, fromPosition, itemEx, toPosition) local player = Player(cid) if player:getStorageValue(1234) >= os.time() then player:say('You already have double exp!', TALKTYPE_MONSTER_SAY) return true end player:setStorageValue(1234, os.time() + 7200) Item(item.uid):remove(1) player:say('Your 2 hours of double XP has started!', TALKTYPE_MONSTER_SAY) player:registerEvent("dblxp") return trueendEm creaturescripts.xml
Em creaturescripts/scripts crie dblxp.lua
function onThink(creature, interval) local player = Player(creature) if not player then return true end if player:getStorageValue(1234) < os.time() then player:sendTextMessage(MESSAGE_STATUS_WARNING, "Your double XP has ended!") player:unregisterEvent("dblxp") end return trueendCréditos: RazorBlade
Editado Agosto 15 por Daniel