Caktchup 9 Postado Janeiro 4, 2016 Share Postado Janeiro 4, 2016 Olá, eu coloquei um script de quest ele ta dando erro não sei o que fazer kkk... Meu Script function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, 19075) < 1 then = storage unica somente para essa quest doPlayerSendTextMessage(cid,22,"Parabens voce completo a missao do Gem aqui esta sua recompensa!") local bag = doPlayerAddItem(cid, 2153, 1, 2156, 1, 2154, 1, 2160, 15) = MESMA COISA QUE A BAIXO doAddContainerItem(bag, 2153, 1, 2156, 1, 2154, 1, 2160, 15) = MESMA COISA QUE A CIMA setPlayerStorageValue(cid, 19075, 1) = Confirmando se o player já terminou a quest else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce que recompensa de novo. vai faze outra missao.") end return TRUE end Error [04/01/2016 21:32:20] [Error - LuaScriptInterface::loadFile] data/actions/scripts/gem.lua:3: unexpected symbol near '=' [04/01/2016 21:32:20] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/gem.lua) [04/01/2016 21:32:20] data/actions/scripts/gem.lua:3: unexpected symbol near '=' Link para o comentário https://xtibia.com/forum/topic/238634-erro-script-quest/ Compartilhar em outros sites More sharing options...
0 Akzs 56 Postado Janeiro 5, 2016 Share Postado Janeiro 5, 2016 (editado) Testa esse. function onUse(cid, item, fromPosition, itemEx, toPosition) if (getPlayerStorageValue(cid, 19075) == EMPTY_STORAGE) then doPlayerSendTextMessage(cid,22,"Parabens voce completo a missao do Gem aqui esta sua recompensa!") doPlayerAddItem(cid,2153,1) doPlayerAddItem(cid,2156,1) doPlayerAddItem(cid,2154,1) doPlayerAddItem(cid,2160,15) doTeleportThing(cid, {x= 99, y= 189, z= 7}) setPlayerStorageValue(cid, 19075, 1) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYDAMAGE) else doPlayerSendTextMessage(cid,22,"Voce que recompensa de novo. vai faze outra missao.") end return true end Ou esse function onUse(cid, item, fromPosition, itemEx, toPosition) a = 19075 if getPlayerStorageValue(cid, a) < 1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a "..getItemNameById(id)..".") doPlayerAddItem(cid,2153,1) doPlayerAddItem(cid,2156,1) doPlayerAddItem(cid,2154,1) doPlayerAddItem(cid,2160,15) doPlayerSetStorageValue(cid, a, 1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.") end return TRUE end Editado Janeiro 5, 2016 por Akzs Link para o comentário https://xtibia.com/forum/topic/238634-erro-script-quest/#findComment-1680054 Compartilhar em outros sites More sharing options...
0 Marco Oliveira 205 Postado Janeiro 4, 2016 Share Postado Janeiro 4, 2016 (editado) Tente esse script: function onUse(cid, item) if getPlayerStorageValue(cid, 19075) ~= 1 then doPlayerAddItem(cid, 2153, 1) doPlayerAddItem(cid, 2156, 1) doPlayerAddItem(cid, 2154, 1) doPlayerAddItem(cid, 2160, 15) setPlayerStorageValue(cid, 19075, 1) else doPlayerSendCancel(cid, "It is empty.") end return true end Tente também: function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, 19075) < 1 then -- Storage da quest. doPlayerSendTextMessage(cid,22,"Parabens voce completo a missao do Gem aqui esta sua recompensa!") local bag = doPlayerAddItem(cid, 2153, 1, 2156, 1, 2154, 1, 2160, 15) -- Itens da quest. doAddContainerItem(bag, 2153, 1, 2156, 1, 2154, 1, 2160, 15) -- Itens da quest. setPlayerStorageValue(cid, 19075, 1) -- Verificar storage else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce que recompensa de novo. vai faze outra missao.") end return TRUE end Editado Janeiro 5, 2016 por Marco Oliveira Link para o comentário https://xtibia.com/forum/topic/238634-erro-script-quest/#findComment-1680041 Compartilhar em outros sites More sharing options...
0 Caktchup 9 Postado Janeiro 5, 2016 Autor Share Postado Janeiro 5, 2016 Amigo o 1 pego, so que quando eu clico no bau ele nao da nada ele so abre. meu actions.xml ta assim <action actionid="2057" event="script" value="gem.lua"/> eu botei 2057 no action id e no unique id. O bau que eu to usando e o 1606 Link para o comentário https://xtibia.com/forum/topic/238634-erro-script-quest/#findComment-1680043 Compartilhar em outros sites More sharing options...
0 Marco Oliveira 205 Postado Janeiro 5, 2016 Share Postado Janeiro 5, 2016 Teste o segundo novamente, veja se da algum tipo de erro. Link para o comentário https://xtibia.com/forum/topic/238634-erro-script-quest/#findComment-1680044 Compartilhar em outros sites More sharing options...
0 Caktchup 9 Postado Janeiro 5, 2016 Autor Share Postado Janeiro 5, 2016 Amigo o 2 script deu erro [04/01/2016 22:40:31] [Error - Action Interface] [04/01/2016 22:40:31] data/actions/scripts/gem.lua:onUse [04/01/2016 22:40:31] Description: [04/01/2016 22:40:31] (luaDoPlayerAddItem) Player not found [04/01/2016 22:40:31] [Error - Action Interface] [04/01/2016 22:40:31] data/actions/scripts/gem.lua:onUse [04/01/2016 22:40:31] Description: [04/01/2016 22:40:31] (luaDoAddContainerItem) Container not found tipo apareceu a mensagem Parabens voce completo a missao do Gem aqui esta sua recompensa! Link para o comentário https://xtibia.com/forum/topic/238634-erro-script-quest/#findComment-1680047 Compartilhar em outros sites More sharing options...
0 Marco Oliveira 205 Postado Janeiro 5, 2016 Share Postado Janeiro 5, 2016 Em actions\scripts\quests\gem.lua function onUse(cid, item) if getPlayerStorageValue(cid, 19075) ~= 1 then doPlayerAddItem(cid, 2153, 1) doPlayerAddItem(cid, 2156, 1) doPlayerAddItem(cid, 2154, 1) doPlayerAddItem(cid, 2160, 15) setPlayerStorageValue(cid, 19075, 1) else doPlayerSendCancel(cid, "It is empty.") end return true end Em data\actions\actions.xml <action actionid="2057" event="script" value="quests/gem.lua"/> Adicione no bau a actionid e a uniqueid referente a quest (2057). Testei no meu servidor 8.60 e funcionou perfeitamente. Link para o comentário https://xtibia.com/forum/topic/238634-erro-script-quest/#findComment-1680050 Compartilhar em outros sites More sharing options...
0 Akzs 56 Postado Janeiro 5, 2016 Share Postado Janeiro 5, 2016 (editado) function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, 19075) < 1 then doPlayerSendTextMessage(cid,22,"Parabens voce completo a missao do Gem aqui esta sua recompensa!") local bag = doPlayerAddItem(cid, 2153, 1, 2156, 1, 2154, 1, 2160, 15) doAddContainerItem(bag, 2153, 1, 2156, 1, 2154, 1, 2160, 15) setPlayerStorageValue(cid, 19075, 1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce que recompensa de novo. vai faze outra missao.") end return TRUE end Editado Janeiro 5, 2016 por Akzs Link para o comentário https://xtibia.com/forum/topic/238634-erro-script-quest/#findComment-1680051 Compartilhar em outros sites More sharing options...
0 Caktchup 9 Postado Janeiro 5, 2016 Autor Share Postado Janeiro 5, 2016 Quando vou clicar no bau aparece Em actions\scripts\quests\gem.lua function onUse(cid, item) if getPlayerStorageValue(cid, 19075) ~= 1 then doPlayerAddItem(cid, 2153, 1) doPlayerAddItem(cid, 2156, 1) doPlayerAddItem(cid, 2154, 1) doPlayerAddItem(cid, 2160, 15) setPlayerStorageValue(cid, 19075, 1) else doPlayerSendCancel(cid, "It is empty.") end return true end Em data\actions\actions.xml Adicione no bau a actionid e a uniqueid referente a quest (2057). Testei no meu servidor 8.60 e funcionou perfeitamente. Quando clica no bau não da nenhum erro mais so fala que o bau ta vazio AKZS o seu aparece a mensagem que recebeu o item mais o item não aparece na bp só aparece aquela mensagem do script que pego a recompensa mais não recebe nada e não da nenhum erro... Link para o comentário https://xtibia.com/forum/topic/238634-erro-script-quest/#findComment-1680052 Compartilhar em outros sites More sharing options...
0 Marco Oliveira 205 Postado Janeiro 5, 2016 Share Postado Janeiro 5, 2016 Quando vou clicar no bau aparece Quando clica no bau não da nenhum erro mais so fala que o bau ta vazio AKZS o seu aparece a mensagem que recebeu o item mais o item não aparece na bp só aparece aquela mensagem do script que pego a recompensa mais não recebe nada e não da nenhum erro... Isso por que seu character já possui a storage, tente pegar o baú com outro character. Link para o comentário https://xtibia.com/forum/topic/238634-erro-script-quest/#findComment-1680057 Compartilhar em outros sites More sharing options...
0 Caktchup 9 Postado Janeiro 5, 2016 Autor Share Postado Janeiro 5, 2016 (editado) Cara o 1 Script deu certo sem erro sem nada te amooo Obrigado a vocês 2 amos S2 Editado Janeiro 5, 2016 por Caktchup Link para o comentário https://xtibia.com/forum/topic/238634-erro-script-quest/#findComment-1680059 Compartilhar em outros sites More sharing options...
0 Danihcv 335 Postado Janeiro 8, 2016 Share Postado Janeiro 8, 2016 Tópico movido para dúvidas / pedidos resolvidos. Link para o comentário https://xtibia.com/forum/topic/238634-erro-script-quest/#findComment-1680383 Compartilhar em outros sites More sharing options...
Pergunta
Caktchup 9
Olá, eu coloquei um script de quest ele ta dando erro não sei o que fazer kkk...
Meu Script
Link para o comentário
https://xtibia.com/forum/topic/238634-erro-script-quest/Compartilhar em outros sites
11 respostass a esta questão
Posts Recomendados