GodalonexD 4 Postado Julho 11, 2009 Share Postado Julho 11, 2009 BOM GENTE, no meu otserv ANIHI ta bugada, num meche a alavanca nem o God nem o CM,Gm ou coisa assim to precisando de script dela que pelo menos o God puxe, se arruma uma que funcione normal pra mim ta melhor ainda Agraçedo!!! Link para o comentário https://xtibia.com/forum/topic/116053-quest-bugada-preciso-do-script/ Compartilhar em outros sites More sharing options...
tozinho123 0 Postado Julho 11, 2009 Share Postado Julho 11, 2009 (editado) claroo fera ta ai: local playerPosition = --aqui vc bota a posição daqueles 4 tiles que os player ficam para ser teleportados{ {x = 247, y = 659, z = 13, stackpos = STACKPOS_TOP_CREATURE}, --tile 1 {x = 247, y = 660, z = 13, stackpos = STACKPOS_TOP_CREATURE}, --tile 2 {x = 247, y = 661, z = 13, stackpos = STACKPOS_TOP_CREATURE}, --tile 3 {x = 247, y = 662, z = 13, stackpos = STACKPOS_TOP_CREATURE} --tile 4 } local newPosition = --aqui a pos da sala onde ficam os demons { {x = 189, y = 650, z = 13}, -- pos que o player do tile 1 sera teleportado {x = 189, y = 651, z = 13}, -- pos que o player do tile 2 sera teleportado {x = 189, y = 652, z = 13}, -- pos que o player do tile 3 sera teleportado {x = 189, y = 653, z = 13} -- pos que o player do tile 4 sera teleportado } local demonsPos = --aqui a pos dos 6 demons a serem sumonados(se quiser que sejam mais demons eh soh adicionar mais linhas { {x = 189, y = 650, z = 13}, -- demon 1 {x = 189, y = 651, z = 13}, -- demon 2 {x = 189, y = 652, z = 13}, -- demon 3 e assim por diante {x = 189, y = 653, z = 13}, {x = 189, y = 653, z = 13}, {x = 189, y = 653, z = 13} } -- Do not modify the declaration lines below. local player = {0, 0, 0, 0} local failed = TRUE function onUse(cid, item, fromPosition, itemEx, toPosition) if item.itemid == 1945 then doTransformItem(item.uid, item.itemid + 1) elseif item.itemid == 1946 then doTransformItem(item.uid, item.itemid - 1) end for i = 1, 4 do player = getThingfromPos(playerPosition) if player.itemid > 0 then if isPlayer(player.uid) == TRUE then if getPlayerStorageValue(player.uid, 30015) == -1 then if getPlayerLevel(player.uid) >= 100 then failed = FALSE end end end end if failed == TRUE then doPlayerSendCancel(cid, "Sorry, not possible.") return TRUE end failed = TRUE end for i = 1, #demonsPos do var = getThingFromPos(demonPos) if(isCreature(var.uid)) then doRemoveCreature(var.uid) end doSummonCreature("Demon", demonsPos) end for i = 1, 4 do doSendMagicEffect(playerPosition, CONST_ME_POFF) doTeleportThing(player.uid, newPosition, FALSE) doSendMagicEffect(newPosition, CONST_ME_ENERGYAREA) end return TRUE end esse script nao foi feito por min porem eu fiz algumas modificações nele qualquer problema me manda uma mensagem blz :smile_positivo: Editado Julho 12, 2009 por Tozao Link para o comentário https://xtibia.com/forum/topic/116053-quest-bugada-preciso-do-script/#findComment-761163 Compartilhar em outros sites More sharing options...
GodalonexD 4 Postado Julho 11, 2009 Autor Share Postado Julho 11, 2009 local demonsPos = --aqui a pos dos 6 demons a serem sumonados(se quiser que sejam mais demons eh soh adicionar mais linhas { {x = 189, y = 650, z = 13}, -- demon 1 {x = 189, y = 651, z = 13}, -- demon 2 {x = 189, y = 652, z = 13}, -- demon 3 e assim por diante {x = 189, y = 653, z = 13} {x = 189, y = 653, z = 13} {x = 189, y = 653, z = 13} } é pra coloca onde os demons estao? oieoei Link para o comentário https://xtibia.com/forum/topic/116053-quest-bugada-preciso-do-script/#findComment-761191 Compartilhar em outros sites More sharing options...
satan666 12 Postado Julho 12, 2009 Share Postado Julho 12, 2009 e pra por a pos onde serao sumonados os demons dentro da sala. e outra depois disso {x = 189, y = 653, z = 13} poe uma virgula no final "," so nao ponhe na ultima {x = 189, y = 653, z = 13} antes disso "}". ou seja ficando assim: {{x = 189, y = 650, z = 13}, -- demon 1 {x = 189, y = 651, z = 13}, -- demon 2 {x = 189, y = 652, z = 13}, -- demon 3 e assim por diante {x = 189, y = 653, z = 13}, {x = 189, y = 653, z = 13}, {x = 189, y = 653, z = 13} --ultima nao ponhe a virgula } Link para o comentário https://xtibia.com/forum/topic/116053-quest-bugada-preciso-do-script/#findComment-761325 Compartilhar em outros sites More sharing options...
tozinho123 0 Postado Julho 12, 2009 Share Postado Julho 12, 2009 eh, se vc nao quiser que sumone pelo script apague essa parte: local demonsPos = --aqui a pos dos 6 demons a serem sumonados(se quiser que sejam mais demons eh soh adicionar mais linhas{ {x = 189, y = 650, z = 13}, -- demon 1 {x = 189, y = 651, z = 13}, -- demon 2 {x = 189, y = 652, z = 13}, -- demon 3 e assim por diante {x = 189, y = 653, z = 13} {x = 189, y = 653, z = 13} {x = 189, y = 653, z = 13} } e essa: for i = 1, #demonsPos dodoSummonCreature("Demon", demonsPos) end mas eu te recomendo deixar assim porque alguem pode deixar todos os demons com pouca vida e outra pessoa entra e só da alguns hits, tambem tem outra coisa substitua: for i = 1, #demonsPos dodoSummonCreature("Demon", demonsPos) end por: for i = 1, #demonsPos dovar = getThingFromPos(demonPos) doRemoveCreature(var.uid) doSummonCreature("Demon", demonsPos) end tinha esquecido de arruma isso :S Link para o comentário https://xtibia.com/forum/topic/116053-quest-bugada-preciso-do-script/#findComment-761340 Compartilhar em outros sites More sharing options...
GodalonexD 4 Postado Julho 12, 2009 Autor Share Postado Julho 12, 2009 (editado) [12/07/2009 02:11:55] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/quests/annihilator.lua) [12/07/2009 02:11:55] data/actions/scripts/quests/annihilator.lua:2: unexpected symbol near '{' AFZ deu isso ae, sera que eu coloquei errado ou o ot que tem erro? so neub nessa parte apoapoaspoapso Editado Julho 12, 2009 por TitanicoxD Link para o comentário https://xtibia.com/forum/topic/116053-quest-bugada-preciso-do-script/#findComment-761372 Compartilhar em outros sites More sharing options...
tozinho123 0 Postado Julho 12, 2009 Share Postado Julho 12, 2009 (editado) ta, usa esse script aqui: claroo fera ta ai:local playerPosition = { {x = 247, y = 659, z = 13, stackpos = STACKPOS_TOP_CREATURE}, {x = 247, y = 660, z = 13, stackpos = STACKPOS_TOP_CREATURE}, {x = 247, y = 661, z = 13, stackpos = STACKPOS_TOP_CREATURE}, {x = 247, y = 662, z = 13, stackpos = STACKPOS_TOP_CREATURE} } local newPosition = { {x = 189, y = 650, z = 13}, {x = 189, y = 651, z = 13}, {x = 189, y = 652, z = 13}, {x = 189, y = 653, z = 13} } local demonsPos = --aqui a pos dos 6 demons a serem sumonados(se quiser que sejam mais demons eh soh adicionar mais linhas { {x = 189, y = 650, z = 13}, {x = 189, y = 651, z = 13}, {x = 189, y = 652, z = 13}, {x = 189, y = 653, z = 13}, {x = 189, y = 653, z = 13}, {x = 189, y = 653, z = 13} } -- Do not modify the declaration lines below. local player = {0, 0, 0, 0} local failed = TRUE function onUse(cid, item, fromPosition, itemEx, toPosition) if item.itemid == 1945 then doTransformItem(item.uid, item.itemid + 1) elseif item.itemid == 1946 then doTransformItem(item.uid, item.itemid - 1) end for i = 1, 4 do player = getThingfromPos(playerPosition) if player.itemid > 0 then if isPlayer(player.uid) == TRUE then if getPlayerStorageValue(player.uid, 30015) == -1 then if getPlayerLevel(player.uid) >= 100 then failed = FALSE end end end end if failed == TRUE then doPlayerSendCancel(cid, "Sorry, not possible.") return TRUE end failed = TRUE end for i = 1, #demonsPos do var = getThingFromPos(demonPos) if(isCreature(var.uid)) then doRemoveCreature(var.uid) end doSummonCreature("Demon", demonsPos) end for i = 1, 4 do doSendMagicEffect(playerPosition, CONST_ME_POFF) doTeleportThing(player.uid, newPosition, FALSE) doSendMagicEffect(newPosition, CONST_ME_ENERGYAREA) end return TRUE end Editado Julho 12, 2009 por Tozao Link para o comentário https://xtibia.com/forum/topic/116053-quest-bugada-preciso-do-script/#findComment-761516 Compartilhar em outros sites More sharing options...
GodalonexD 4 Postado Julho 12, 2009 Autor Share Postado Julho 12, 2009 [12/07/2009 16:02:56] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/quests/annihilator.lua) [12/07/2009 16:02:56] data/actions/scripts/quests/annihilator.lua:23: '}' expected (to close '{' at line 18) near '{' o ot e 8.42 sera que é isso? ou eu to colocando luga errado seila rlax o ot e aquele do alissow... ja pedi pra ele arruma mais ninguem respondeu ate agora ta fogo Vlws ae pela ajuda voces mesmo assim Link para o comentário https://xtibia.com/forum/topic/116053-quest-bugada-preciso-do-script/#findComment-761538 Compartilhar em outros sites More sharing options...
satan666 12 Postado Julho 12, 2009 Share Postado Julho 12, 2009 cara e como eu postei acima o erro esta aqui. local demonsPos ={ {x = 189, y = 650, z = 13}, {x = 189, y = 651, z = 13}, {x = 189, y = 652, z = 13}, {x = 189, y = 653, z = 13} {x = 189, y = 653, z = 13} {x = 189, y = 653, z = 13} } falta as virgulas no array. {x = 189, y = 653, z = 13}, so a ultima e que nao tem virgula. {x = 189, y = 653, z = 13} essa que fica antes disso " } " Link para o comentário https://xtibia.com/forum/topic/116053-quest-bugada-preciso-do-script/#findComment-761550 Compartilhar em outros sites More sharing options...
GodalonexD 4 Postado Julho 12, 2009 Autor Share Postado Julho 12, 2009 [12/07/2009 17:08:35] data/actions/scripts/quests/annihilator.lua:48: attempt to get length of global 'demonsPos' (a nil value) [12/07/2009 17:08:35] stack traceback: [12/07/2009 17:08:35] data/actions/scripts/quests/annihilator.lua:48: in function <data/actions/scripts/quests/annihilator.lua:22> [12/07/2009 17:08:35] Lua Script Error: [Action Interface] [12/07/2009 17:08:35] data/actions/scripts/quests/annihilator.lua:onUse [12/07/2009 17:08:35] data/actions/scripts/quests/annihilator.lua:48: attempt to get length of global 'demonsPos' (a nil value) [12/07/2009 17:08:35] stack traceback: [12/07/2009 17:08:35] data/actions/scripts/quests/annihilator.lua:48: in function <data/actions/scripts/quests/annihilator.lua:22> LIGO DE BOA SEM DA AQUELE ERRO, MAIS NA HORA USE NA ALAVANCA DA ISSO AE AFZ AOIAOIASOIA Link para o comentário https://xtibia.com/forum/topic/116053-quest-bugada-preciso-do-script/#findComment-761560 Compartilhar em outros sites More sharing options...
satan666 12 Postado Julho 12, 2009 Share Postado Julho 12, 2009 falta a stakpos dos bichos na array demonpos. Link para o comentário https://xtibia.com/forum/topic/116053-quest-bugada-preciso-do-script/#findComment-761573 Compartilhar em outros sites More sharing options...
tozinho123 0 Postado Julho 12, 2009 Share Postado Julho 12, 2009 (editado) pera ae fera, eu vo testa no meu ot e fazer as modificações e depois posto aqui desculpe pelos erros EDIT ta ai agora 100% sem bug ele tira todos os monstros e faz tudo certo local playerPosition = { {x = 499, y = 605, z = 6, stackpos = STACKPOS_TOP_CREATURE}, {x = 500, y = 605, z = 6, stackpos = STACKPOS_TOP_CREATURE}, {x = 501, y = 605, z = 6, stackpos = STACKPOS_TOP_CREATURE}, {x = 502, y = 605, z = 6, stackpos = STACKPOS_TOP_CREATURE}, } local newPosition = { {x = 498, y = 604, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 499, y = 604, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 500, y = 604, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 501, y = 604, z = 7, stackpos = STACKPOS_TOP_CREATURE}, } local demonsPos = { {x = 498, y = 602, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 500, y = 602, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 499, y = 606, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 501, y = 606, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 502, y = 604, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 503, y = 604, z = 7, stackpos = STACKPOS_TOP_CREATURE}, } -- Do not modify the declaration lines below. local player = {0, 0, 0, 0} local failed = TRUE local trash = {x=503, y=602, z=7} function doCleanArea(x,ex,y,ey,z) for x = x,ex do for y = y,ey do pos = {x=x, y=y, z=z, stackpos = 253} var = getThingFromPos(pos) if(isCreature(var.uid) == TRUE) then doRemoveCreature(var.uid) end end end end function onUse(cid, item, fromPosition, itemEx, toPosition) if item.itemid == 1945 then doTransformItem(item.uid, item.itemid + 1) elseif item.itemid == 1946 then doTransformItem(item.uid, item.itemid - 1) end for i = 1, 4 do player = getThingfromPos(playerPosition) if player.itemid > 0 then if isPlayer(player.uid) == TRUE then if getPlayerLevel(player.uid) >= 100 then failed = FALSE end end end if failed == TRUE then doPlayerSendCancel(cid, "Sorry, not possible.") return TRUE end failed = TRUE end doCleanArea(498, 503, 602, 606, 7) for i = 1, #demonsPos do doSummonCreature("Demon", demonsPos) end for i = 1, 4 do doSendMagicEffect(playerPosition, CONST_ME_POFF) doTeleportThing(player.uid, newPosition, FALSE) doSendMagicEffect(newPosition, CONST_ME_ENERGYAREA) end return TRUE end agora vai funciona :smile_positivo: Editado Julho 12, 2009 por Tozao Link para o comentário https://xtibia.com/forum/topic/116053-quest-bugada-preciso-do-script/#findComment-761610 Compartilhar em outros sites More sharing options...
GodalonexD 4 Postado Julho 13, 2009 Autor Share Postado Julho 13, 2009 Velho funciono perfeitamente Vlws mesmo ae... mais agora eu preciso de um npc que carrege a soft boots porque tenho o npc que carrega mais ele pega a worm soft boots e num devolve a soft bots carregada resumindo, ele rouba! AHUASHUAHSAUHSAUHSAUSH Link para o comentário https://xtibia.com/forum/topic/116053-quest-bugada-preciso-do-script/#findComment-761747 Compartilhar em outros sites More sharing options...
GodalonexD 4 Postado Julho 13, 2009 Autor Share Postado Julho 13, 2009 lol ta funcionando mais na hora que tem 4 carinha que puxa alavanca trava tudo e parece esse erro [13/07/2009 04:46:46] Lua Script Error: [Action Interface] [13/07/2009 04:46:47] data/actions/scripts/quests/annihilator.lua:onUse [13/07/2009 04:46:47] luaDoCreateMonster(). Cannot create monster: Demon [13/07/2009 04:46:47] Lua Script Error: [Action Interface] [13/07/2009 04:46:47] data/actions/scripts/quests/annihilator.lua:onUse [13/07/2009 04:46:48] luaDoCreateMonster(). Cannot create monster: Demon da um monte desse ai e os char sao teleportados depois der trave ahaushuah mais a quest ta funcionando.. eu to achando porque no map na anihi os demon ja tem em baixo e no script ele sumonna num é? num entendo dessas coisas so to dando um paupite ahsuaHUSHa Link para o comentário https://xtibia.com/forum/topic/116053-quest-bugada-preciso-do-script/#findComment-761789 Compartilhar em outros sites More sharing options...
tozinho123 0 Postado Julho 14, 2009 Share Postado Julho 14, 2009 (editado) sim mais eu esqueci de falar vc tem que mudar a function doCleanArea, vou explicar procure isso no script: doCleanArea(498, 503, 602, 606, 7) vc tem que colocar assim: doCleanArea(X inicial, X final, Y inicial, Y final, Z) por exemplo se sua sala começa da anihi começa em x=1200, y=800, z=7 e termina em x=1210, y=813, z=7 deixe assim: doCleanArea(1200, 1210, 800, 813, 7) espero que tenha entendido :smile_positivo: EDIT o npc da soft boots: local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) -- OTServ event handling functions start function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end -- OTServ event handling functions end function creatureSayCallback(cid, type, msg) -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself. if(npcHandler.focus ~= cid) then return false end if msgcontains(msg, 'specialised') or msgcontains(msg, 'boot') then selfSay('Yes, my fathers was a great one blacksmith, it was a wise person , but when he decided to teach me he dies and i just learn about the lovely boots. So, did you bring me some boots? which one?') elseif msgcontains(msg, 'worn soft boots') or msgcontains(msg, 'worn soft boot') then selfSay('Did you like that i fix your worn soft boots? it will cost 10000 golds') talk_state = 1 end if msgcontains(msg, 'yes') and talk_state == 1 then if getPlayerItemCount(cid,6530) >= 1 and getPlayerMoney(cid) >= 10000 then doPlayerTakeItem(cid,6530,1) doPlayerRemoveMoney(cid, 10000) selfSay('Here you are.') doPlayerAddItem(cid,2640,1) else selfSay('Sorry, you don\'t have the item.') end end if msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 5) then selfSay('Ok then.') talk_state = 0 end -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself. return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) ese script nao eh meu eu peguei aqui no forum mesmo e só postei aqui Editado Julho 14, 2009 por Tozao Link para o comentário https://xtibia.com/forum/topic/116053-quest-bugada-preciso-do-script/#findComment-762683 Compartilhar em outros sites More sharing options...
Posts Recomendados