Ir para conteúdo
  • Cadastre-se

[AJUDA] Arrumar script com addEvent


Posts Recomendados

Bom, estou criando um script que terá uma certa funcionalidade e no momento tenho a base(aparência) dele..


function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)

ipos1 = {x=998, y=1008, z=7, stackpos=1}
iget1 = getThingFromPos(ipos1)

ipos2 = {x=998, y=1009, z=7, stackpos=1}
iget2 = getThingFromPos(ipos2)

ipos3 = {x=998, y=1010, z=7, stackpos=1}
iget3 = getThingFromPos(ipos3)

ipos4 = {x=998, y=1011, z=7, stackpos=1}
iget4 = getThingFromPos(ipos4)

ipos5 = {x=998, y=1012, z=7, stackpos=1}
iget5 = getThingFromPos(ipos5)

ipos6 = {x=997, y=1011, z=7, stackpos=1}
iget6 = getThingFromPos(ipos6)

ipos7 = {x=997, y=1012, z=7, stackpos=1}
iget7 = getThingFromPos(ipos7)

ipos8 = {x=999, y=1012, z=7, stackpos=1}
iget8 = getThingFromPos(ipos8)

ipos9 = {x=999, y=1011, z=7, stackpos=1}
iget9 = getThingFromPos(ipos9)



if item.itemid == 10044 then
addEvent(function() doRemoveItem(iget1.uid,1)  doCreateItem(8641,ipos1) end, 200)
addEvent(function() doRemoveItem(iget2.uid,1)  doCreateItem(8649,ipos2) end, 300)
addEvent(function() doRemoveItem(iget3.uid,1)  doCreateItem(8668,ipos3) end, 400)
addEvent(function() doRemoveItem(iget4.uid,1)  doCreateItem(11457,ipos4) end, 500)
addEvent(function() doRemoveItem(iget6.uid,1)  doCreateItem(11459,ipos6) end, 500)
addEvent(function() doRemoveItem(iget9.uid,1)  doCreateItem(11460,ipos9) end, 500)
addEvent(function() doRemoveItem(iget5.uid,1)  doCreateItem(11458,ipos5) end, 600)
addEvent(function() doRemoveItem(iget7.uid,1)  doCreateItem(11461,ipos7) end, 600)
addEvent(function() doRemoveItem(iget8.uid,1)  doCreateItem(11462,ipos8) end, 600)

end
if item.itemid == 10045 then
addEvent(function() doRemoveItem(iget1.uid,10)  doCreateItem(8642,ipos1) end, 200)
addEvent(function() doRemoveItem(iget2.uid,10)  doCreateItem(8653,ipos2) end, 300)
addEvent(function() doRemoveItem(iget3.uid,10)  doCreateItem(8662,ipos3) end, 300)
addEvent(function() doRemoveItem(iget4.uid,10)  doCreateItem(11450,ipos4) end, 500)
addEvent(function() doRemoveItem(iget6.uid,10)  doCreateItem(11452,ipos6) end, 500)
addEvent(function() doRemoveItem(iget9.uid,10)  doCreateItem(11463,ipos9) end, 500)
addEvent(function() doRemoveItem(iget5.uid,10)  doCreateItem(11451,ipos5) end, 600)
addEvent(function() doRemoveItem(iget7.uid,10)  doCreateItem(11454,ipos7) end, 600)
addEvent(function() doRemoveItem(iget8.uid,10)  doCreateItem(11464,ipos8) end, 600)
end
end
 

 

ps: tentei doTransformItem de diversas formas diferentes no addEvent, incluindo em function e não deu resultado.

 

 

O script dessa maneira está 100% funcional, porém na distro da isso:

 

[28/06/2015 20:11:35] [Error - Action Interface]
[28/06/2015 20:11:35] In a timer event called from:
[28/06/2015 20:11:35] data/actions/scripts/fornalha.lua:onUse
[28/06/2015 20:11:35] Description:
[28/06/2015 20:11:35] (luaDoRemoveItem) Item not found

[28/06/2015 20:11:35] [Error - Action Interface]
[28/06/2015 20:11:35] In a timer event called from:
[28/06/2015 20:11:35] data/actions/scripts/fornalha.lua:onUse
[28/06/2015 20:11:35] Description:
[28/06/2015 20:11:35] (luaDoRemoveItem) Item not found

[28/06/2015 20:11:35] [Error - Action Interface]
[28/06/2015 20:11:35] In a timer event called from:
[28/06/2015 20:11:35] data/actions/scripts/fornalha.lua:onUse
[28/06/2015 20:11:35] Description:
[28/06/2015 20:11:35] (luaDoRemoveItem) Item not found

[28/06/2015 20:11:35] [Error - Action Interface]
[28/06/2015 20:11:35] In a timer event called from:
[28/06/2015 20:11:35] data/actions/scripts/fornalha.lua:onUse
[28/06/2015 20:11:35] Description:
[28/06/2015 20:11:35] (luaDoRemoveItem) Item not found

[28/06/2015 20:11:35] [Error - Action Interface]
[28/06/2015 20:11:35] In a timer event called from:
[28/06/2015 20:11:35] data/actions/scripts/fornalha.lua:onUse
[28/06/2015 20:11:35] Description:
[28/06/2015 20:11:35] (luaDoRemoveItem) Item not found

[28/06/2015 20:11:35] [Error - Action Interface]
[28/06/2015 20:11:35] In a timer event called from:
[28/06/2015 20:11:35] data/actions/scripts/fornalha.lua:onUse
[28/06/2015 20:11:35] Description:
[28/06/2015 20:11:35] (luaDoRemoveItem) Item not found

[28/06/2015 20:11:35] [Error - Action Interface]
[28/06/2015 20:11:35] In a timer event called from:
[28/06/2015 20:11:35] data/actions/scripts/fornalha.lua:onUse
[28/06/2015 20:11:35] Description:
[28/06/2015 20:11:35] (luaDoRemoveItem) Item not found

[28/06/2015 20:11:35] [Error - Action Interface]
[28/06/2015 20:11:35] In a timer event called from:
[28/06/2015 20:11:35] data/actions/scripts/fornalha.lua:onUse
[28/06/2015 20:11:35] Description:
[28/06/2015 20:11:35] (luaDoRemoveItem) Item not found

[28/06/2015 20:11:35] [Error - Action Interface]
[28/06/2015 20:11:35] In a timer event called from:
[28/06/2015 20:11:35] data/actions/scripts/fornalha.lua:onUse
[28/06/2015 20:11:36] Description:
[28/06/2015 20:11:36] (luaDoRemoveItem) Item not found

[28/06/2015 20:11:36] [Error - Action Interface]
[28/06/2015 20:11:36] In a timer event called from:
[28/06/2015 20:11:36] data/actions/scripts/fornalha.lua:onUse
[28/06/2015 20:11:36] Description:
[28/06/2015 20:11:36] (luaDoRemoveItem) Item not found

[28/06/2015 20:11:36] [Error - Action Interface]
[28/06/2015 20:11:36] In a timer event called from:
[28/06/2015 20:11:36] data/actions/scripts/fornalha.lua:onUse
[28/06/2015 20:11:36] Description:
[28/06/2015 20:11:36] (luaDoRemoveItem) Item not found

[28/06/2015 20:11:36] [Error - Action Interface]
[28/06/2015 20:11:36] In a timer event called from:
[28/06/2015 20:11:36] data/actions/scripts/fornalha.lua:onUse
[28/06/2015 20:11:36] Description:
[28/06/2015 20:11:36] (luaDoRemoveItem) Item not found

[28/06/2015 20:11:36] [Error - Action Interface]
[28/06/2015 20:11:37] In a timer event called from:
[28/06/2015 20:11:37] data/actions/scripts/fornalha.lua:onUse
[28/06/2015 20:11:37] Description:
[28/06/2015 20:11:37] (luaDoRemoveItem) Item not found

[28/06/2015 20:11:37] [Error - Action Interface]
[28/06/2015 20:11:37] In a timer event called from:
[28/06/2015 20:11:37] data/actions/scripts/fornalha.lua:onUse
[28/06/2015 20:11:37] Description:
[28/06/2015 20:11:37] (luaDoRemoveItem) Item not found

[28/06/2015 20:11:37] [Error - Action Interface]
[28/06/2015 20:11:37] In a timer event called from:
[28/06/2015 20:11:37] data/actions/scripts/fornalha.lua:onUse
[28/06/2015 20:11:37] Description:
[28/06/2015 20:11:37] (luaDoRemoveItem) Item not found

[28/06/2015 20:11:37] [Error - Action Interface]
[28/06/2015 20:11:37] In a timer event called from:
[28/06/2015 20:11:37] data/actions/scripts/fornalha.lua:onUse
[28/06/2015 20:11:37] Description:
[28/06/2015 20:11:37] (luaDoRemoveItem) Item not found

[28/06/2015 20:11:37] [Error - Action Interface]
[28/06/2015 20:11:37] In a timer event called from:
[28/06/2015 20:11:37] data/actions/scripts/fornalha.lua:onUse
[28/06/2015 20:11:37] Description:
[28/06/2015 20:11:37] (luaDoRemoveItem) Item not found

[28/06/2015 20:11:37] [Error - Action Interface]
[28/06/2015 20:11:37] In a timer event called from:
[28/06/2015 20:11:37] data/actions/scripts/fornalha.lua:onUse
[28/06/2015 20:11:37] Description:
[28/06/2015 20:11:37] (luaDoRemoveItem) Item not found

 

 

Precisando de ajuda.. esse script terá grande importância em meu server e foi a melhor maneira que encontrei de fazê-lo, porém da o erro na distro ;x

grato desde já!

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo