ScythePhantom 83 Postado Junho 27, 2013 Share Postado Junho 27, 2013 (editado) #Edit, resolvido. Editado Dezembro 4, 2013 por ScythePhantom Link para o comentário https://xtibia.com/forum/topic/216716-exhausted/ Compartilhar em outros sites More sharing options...
0 Enself 44 Postado Junho 27, 2013 Share Postado Junho 27, 2013 (editado) Tenta ai function onUse(cid, item, fromPosition, itemEx, toPosition) local exhausted = 60 -- Tempo em segundos if getPlayerStorageValue(cid, 112333) > os.time() then doPlayerSendCancel(cid, "You are exhausted.") return true end setPlayerStorageValue(cid, 112333, os.time() + exhausted) end return true function Wall() local x = true local B = { {1054,{x=1084, y=859, z=7, stackpos = 1}}, -- id da parede e pos da parede {1054,{x=1084, y=860, z=7, stackpos = 1}} } for i = 1, #B do if getTileItemById(B[i][2], B[i][1]).uid == 0 then x = false end if x == true then doRemoveItem(getThingfromPos(B[i][2]).uid,1) else doCreateItem(B[i][1], 1, B[i][2]) end end end Wall() addEvent(Wall, 5000) doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end Editado Junho 27, 2013 por Enself Link para o comentário https://xtibia.com/forum/topic/216716-exhausted/#findComment-1534855 Compartilhar em outros sites More sharing options...
0 ScythePhantom 83 Postado Junho 27, 2013 Autor Share Postado Junho 27, 2013 [27/06/2013 11:37:45] [Error - LuaScriptInterface::loadFile] data/actions/scripts/custom/Removewall.lua:13: '<eof>' expected near 'function' [27/06/2013 11:37:45] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/custom/Removewall.lua) [27/06/2013 11:37:45] data/actions/scripts/custom/Removewall.lua:13: '<eof>' expected near 'function' Deu erro.. Link para o comentário https://xtibia.com/forum/topic/216716-exhausted/#findComment-1534858 Compartilhar em outros sites More sharing options...
0 Enself 44 Postado Junho 27, 2013 Share Postado Junho 27, 2013 function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 2521512) > os.time() then doPlayerSendCancel(cid, "You are exhausted.") end setPlayerStorageValue(cid, 2521512, os.time() + 60) end function Wall() local x = true local B = { {1054,{x=1084, y=859, z=7, stackpos = 1}}, -- id da parede e pos da parede {1054,{x=1084, y=860, z=7, stackpos = 1}} } for i = 1, #B do if getTileItemById(B[2], B[1]).uid == 0 then x = false end if x == true then doRemoveItem(getThingfromPos(B[2]).uid,1) else doCreateItem(B[1], 1, B[2]) end end end Wall() addEvent(Wall, 5000) doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end return true end Link para o comentário https://xtibia.com/forum/topic/216716-exhausted/#findComment-1534860 Compartilhar em outros sites More sharing options...
0 ScythePhantom 83 Postado Junho 27, 2013 Autor Share Postado Junho 27, 2013 [27/06/2013 12:10:53] [Error - LuaScriptInterface::loadFile] data/actions/scripts/custom/Removewall.lua:28: '<eof>' expected near 'end' [27/06/2013 12:10:53] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/custom/Removewall.lua) [27/06/2013 12:10:53] data/actions/scripts/custom/Removewall.lua:28: '<eof>' expected near 'end' Deu erro.. Link para o comentário https://xtibia.com/forum/topic/216716-exhausted/#findComment-1534862 Compartilhar em outros sites More sharing options...
0 Enself 44 Postado Junho 27, 2013 Share Postado Junho 27, 2013 function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 2521512) > os.time() then doPlayerSendCancel(cid, "You are exhausted.") end setPlayerStorageValue(cid, 2521512, os.time() + 60) return true end function Wall() local x = true local B = { {1054,{x=1084, y=859, z=7, stackpos = 1}}, -- id da parede e pos da parede {1054,{x=1084, y=860, z=7, stackpos = 1}} } for i = 1, #B do if getTileItemById(B[i][2], B[i][1]).uid == 0 then x = false end if x == true then doRemoveItem(getThingfromPos(B[i][2]).uid,1) else doCreateItem(B[i][1], 1, B[i][2]) end end end Wall() addEvent(Wall, 5000) doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end Pelomenos pega cara? tenta isso... Link para o comentário https://xtibia.com/forum/topic/216716-exhausted/#findComment-1534868 Compartilhar em outros sites More sharing options...
0 ScythePhantom 83 Postado Junho 27, 2013 Autor Share Postado Junho 27, 2013 [27/06/2013 12:37:32] [Error - LuaScriptInterface::loadFile] data/actions/scripts/custom/Removewall.lua:29: '<eof>' expected near 'end' [27/06/2013 12:37:32] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/custom/Removewall.lua) [27/06/2013 12:37:32] data/actions/scripts/custom/Removewall.lua:29: '<eof>' expected near 'end' Denovo lindão.. Link para o comentário https://xtibia.com/forum/topic/216716-exhausted/#findComment-1534869 Compartilhar em outros sites More sharing options...
0 Roksas 846 Postado Junho 27, 2013 Share Postado Junho 27, 2013 Bom amigao, farei de uma maneira bem simples, aqui vai: function onUse(cid, item, frompos, item2, topos) local wallPos = {x = 998, y = 995, z = 7, stackpos = 1} local wallRem = getThingFromPos(wallPos) local exhau = 60 local timeBack = 12 if getPlayerStorageValue(cid, 12229) > os.time() then return doPlayerSendCancel(cid, "You are exhausted, wait "..getPlayerStorageValue(cid, 12229) - os.time().." seconds.") and true end if wallRem.itemid == 1054 then doRemoveItem(wallRem.uid, 1) addEvent(doCreateItem, timeBack * 1000, 1054, wallPos) setPlayerStorageValue(cid, 12229, os.time() + exhau) else doPlayerSendCancel(cid, "No have wall in this position.") end return true end Basta configurar as coordenadas (x, y, z) na "primeira" linha do codigo goodlucks. Link para o comentário https://xtibia.com/forum/topic/216716-exhausted/#findComment-1534872 Compartilhar em outros sites More sharing options...
0 ScythePhantom 83 Postado Junho 27, 2013 Autor Share Postado Junho 27, 2013 Realmente incrível, nossa depois de muito tempo conseguir.. como tô feliz.. a felicidade danada, rep+. Link para o comentário https://xtibia.com/forum/topic/216716-exhausted/#findComment-1534873 Compartilhar em outros sites More sharing options...
0 AdilsonHacker 98 Postado Junho 27, 2013 Share Postado Junho 27, 2013 Reportado Para Que Movam! Link para o comentário https://xtibia.com/forum/topic/216716-exhausted/#findComment-1534875 Compartilhar em outros sites More sharing options...
0 Roksas 846 Postado Junho 27, 2013 Share Postado Junho 27, 2013 Tópico movido para a seção de dúvidas e pedidos resolvidos. Link para o comentário https://xtibia.com/forum/topic/216716-exhausted/#findComment-1534876 Compartilhar em outros sites More sharing options...
Pergunta
ScythePhantom 83
#Edit, resolvido.
Editado por ScythePhantomLink para o comentário
https://xtibia.com/forum/topic/216716-exhausted/Compartilhar em outros sites
10 respostass a esta questão
Posts Recomendados