local TEMPLO_CORES = { [00] = { [01] = {LEVER = {23496, 23500}, POS = {3692, 1708, 05}}, [02] = {LEVER = {23497, 23501}, POS = {3693, 1708, 05}}, [03] = {LEVER = {23498, 23502}, POS = {3694, 1708, 05}}, [04] = {LEVER = {23499, 23503}, POS = {3695, 1708, 05}}, [05] = {LEVER = {09827, 09828}, POS = {3696, 1708, 05}}, }; [01] = { [01] = {23500, 23497, 23498, 23499, 09828}, -- O X X X O [02] = {23496, 23501, 23502, 23499, 09827}, -- X O O X X [03] = {23496, 23501, 23498, 23503, 09827}, -- X O X O X [04] = {23500, 23501, 23498, 23499, 09827}, -- O O X X X [05] = {23496, 23497, 23502, 23503, 09827}, -- X X O O X [06] = {23500, 23497, 23502, 23499, 09827}, -- O X O X X [07] = {23496, 23501, 23498, 23499, 09828}, -- X O X X O [08] = {23496, 23497, 23502, 23499, 09828}, -- X X O X O [09] = {23500, 23497, 23498, 23503, 09827}, -- O X X O X }; } local function onResetLever() for X = 01, 05 do local alaPos = Position(TEMPLO_CORES[00][X].POS[01], TEMPLO_CORES[00][X].POS[02], TEMPLO_CORES[00][X].POS[03]) local item = Tile(alaPos):getItemById(TEMPLO_CORES[00][X].LEVER[02]) or false if item then item:transform(TEMPLO_CORES[00][X].LEVER[01]) alaPos:sendMagicEffect(13) end end end function onUse(player, item, fromPosition, target, toPosition, isHotkey) local QUEST_UNLOCK = { [10155] = 10812; -- FIRST HERO QUEST [10156] = 10813; -- DEAD TREE QUEST [10157] = 10816; -- BEAR CAVE QUEST [10158] = 10817; -- WASP CAVE QUEST [10159] = 10818; -- SPIDER CAVE QUEST [10160] = 10819; -- WINTER WOLF CAVE QUEST [10161] = 10820; -- GIANT POWER QUEST [10162] = 10821; -- MOSS SHIP QUEST [10163] = 10822; -- TORTOISE QUEST [10164] = 10823; -- JACK REAPER QUEST [10165] = 10824; -- TERRAMITE QUEST [10166] = 10825; -- UNDEAD SWAMP QUEST [10167] = 10826; -- FROZEN FURY QUEST [10168] = 10827; -- LEAF FORTRESS QUEST [10169] = 10815; -- SEAGULL ISLAND QUEST [10170] = _SYSTEM.RECYCLER_STORAGE; -- MEMORIAS [10172] = _SYSTEM.RECYCLER_STORAGE; -- MEMORIAS [10173] = _SYSTEM.RECYCLER_STORAGE; -- MEMORIAS [10174] = _SYSTEM.RECYCLER_STORAGE; -- MEMORIAS [10175] = _SYSTEM.RECYCLER_STORAGE; -- ARVORE DA MORTE [10176] = _SYSTEM.RECYCLER_STORAGE; -- TEMPLO DAS CORES [10177] = _SYSTEM.RECYCLER_STORAGE; -- TEMPLO DAS CORES [10180] = _SYSTEM.RECYCLER_STORAGE; -- TEMPLO DAS CORES [10181] = _SYSTEM.RECYCLER_STORAGE; -- TEMPLO DAS CORES [10182] = _SYSTEM.RECYCLER_STORAGE; -- TEMPLO DAS CORES [10183] = 10958; -- ENIGMA DA SERPENTE [10184] = 10958; -- ENIGMA DA SERPENTE [10185] = 10958; -- ENIGMA DA SERPENTE } if item.uid == 10186 then if player:getStorageValue(_QUESTLOG[169].UID_01) == 05 then player:setStorageValue(_QUESTLOG[169].UID_01, 06) player:teleportTo({x=3651, y=1707, z=07}) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) doBackpack(player, 12) addEvent(function() player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") end, 2 * 1000) return false end end if item.uid == 10187 then if player:getStorageValue(_QUESTLOG[171].UID_01) == 02 then player:setStorageValue(_QUESTLOG[171].UID_01, 03) doBackpack(player, 12) player:sendCancelMessage("@RemoveMarkMap") player:getPosition():sendMagicEffect(13) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") end return false end if item.uid == 10188 then if player:getStorageValue(_QUESTLOG[171].UID_01) == 03 then player:setStorageValue(_QUESTLOG[171].UID_01, 04) doBackpack(player, 12) player:sendCancelMessage("@RemoveMarkMap") player:getPosition():sendMagicEffect(13) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") end return false end if item.uid == 10189 then if player:getStorageValue(_QUESTLOG[171].UID_01) == 04 then player:setStorageValue(_QUESTLOG[171].UID_01, 05) doBackpack(player, 12) player:sendCancelMessage("@RemoveMarkMap") player:getPosition():sendMagicEffect(13) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") end return false end if item.uid == 10190 then if player:getStorageValue(_QUESTLOG[175].UID_01) == 02 then player:setStorageValue(_QUESTLOG[175].UID_01, 03) doBackpack(player, 12) player:sendCancelMessage("@RemoveMarkMap") player:getPosition():sendMagicEffect(13) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") end return false end if item.uid == 10191 then if player:getStorageValue(_QUESTLOG[176].UID_01) == 02 then player:setStorageValue(_QUESTLOG[176].UID_01, 03) doBackpack(player, 12) player:sendCancelMessage("@RemoveMarkMap") player:getPosition():sendMagicEffect(13) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") end return false end if item.uid == 10192 then if player:getStorageValue(_QUESTLOG[180].UID_01) == 02 then player:setStorageValue(_QUESTLOG[180].UID_01, 03) doBackpack(player, 12) player:sendCancelMessage("@RemoveMarkMap") player:getPosition():sendMagicEffect(13) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") end return false end if item.uid == 10193 then if player:getStorageValue(_QUESTLOG[180].UID_01) == 03 then player:setStorageValue(_QUESTLOG[180].UID_01, 04) doBackpack(player, 12) player:sendCancelMessage("@RemoveMarkMap") player:getPosition():sendMagicEffect(13) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") end return false end if item.uid == 10194 then if player:getStorageValue(_QUESTLOG[180].UID_01) == 04 then player:setStorageValue(_QUESTLOG[180].UID_01, 05) doBackpack(player, 12) player:sendCancelMessage("@RemoveMarkMap") player:getPosition():sendMagicEffect(13) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") end return false end if item.uid == 10195 then if player:getStorageValue(_QUESTLOG[188].UID_01) == 02 then player:setStorageValue(_QUESTLOG[188].UID_01, 03) doBackpack(player, 12) player:sendCancelMessage("@RemoveMarkMap") player:getPosition():sendMagicEffect(13) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") end return false end if item.uid == 10196 then if player:getStorageValue(_QUESTLOG[195].UID_01) == 02 then player:setStorageValue(_QUESTLOG[195].UID_01, 03) doBackpack(player, 12) player:sendCancelMessage("@RemoveMarkMap") player:getPosition():sendMagicEffect(13) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") end return false end if item.uid == 10199 then if player:getStorageValue(_QUESTLOG[121].UID_01) == 04 then player:teleportTo({x=3577, y=1673, z=08}) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) elseif player:getStorageValue(_QUESTLOG[121].UID_01) == 03 then player:teleportTo({x=3577, y=1673, z=08}) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) elseif player:getStorageValue(_QUESTLOG[121].UID_01) == 02 then player:setStorageValue(_QUESTLOG[121].UID_01, 03) player:teleportTo({x=3577, y=1673, z=08}) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) doBackpack(player, 12) player:sendCancelMessage("@RemoveMarkMap") player:getPosition():sendMagicEffect(13) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") end return false end if item.uid == 10272 then if player:getStorageValue(_QUESTLOG[186].UID_01) == 02 then player:setStorageValue(_QUESTLOG[186].UID_01, 03) doBackpack(player, 12) player:sendCancelMessage("@RemoveMarkMap") player:getPosition():sendMagicEffect(13) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") return false end end if item.uid == 10273 then if player:getStorageValue(_QUESTLOG[197].UID_01) == 02 then player:setStorageValue(_QUESTLOG[197].UID_01, 03) player:setStorageValue(11034, 00) player:getPosition():sendMagicEffect(13) addEvent(function() player:say('Eso debe ser suerte.', TALKTYPE_SAY) end, 2000) addEvent(function() player:say('Que desastre...', TALKTYPE_SAY) end, 6000) addEvent(function() player:say('Deben haber sido los mercenarios. Necesito advertir a Towncryer.', TALKTYPE_SAY) end, 10000) addEvent(function() local from = {x=3876, y=1529, z=04} local to = {x=3882, y=1531, z=04} for A = from.x, to.x do for B = from.y, to.y do for C = from.z, to.z do local tile = Tile(A, B, C) local others = tile:getTopCreature() if tile then if others and others:isPlayer() and others ~= player then others:teleportTo({x=3890, y=1533, z=05}) others:getPosition():sendMagicEffect(CONST_ME_TELEPORT) return false end end end end end end, 12000) addEvent(function() Game.createMonster("Mercenario", {x=3882, y=1529, z=04}) Game.createMonster("Mercenario", {x=3882, y=1531, z=04}) addEvent(function() if player then Game.createMonster("Mercenario", {x=3882, y=1529, z=04}) Game.createMonster("Mercenario", {x=3882, y=1531, z=04}) addEvent(function() Game.createMonster("Mercenario", {x=3882, y=1529, z=04}) Game.createMonster("Mercenario", {x=3882, y=1531, z=04}) return false end, 10000) else return false end end, 10000) end, 13000) return false end end -- 10272 > 10299 if QUEST_UNLOCK[item.uid] then if player:getStorageValue(QUEST_UNLOCK[item.uid]) == 01 then player:setStorageValue(QUEST_UNLOCK[item.uid], 02) doBackpack(player, 12) player:sendCancelMessage("@RemoveMarkMap") player:sendCancelMessage("@LoadQuestMap") player:sendCancelMessage("@LoadQuestWindows") player:getPosition():sendMagicEffect(13) addEvent(function() player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") end, 5000) end end if item.uid == 10160 then local msg = [[ Carta Oculta: Oh hombre. Lo logre! ¿Conoces esos lobos blancos que casi nos atrapan? Entonces, entre en su guarida y encontre este loco mecanismo en el suelo. En realidad encontre dos. Mientras estaba encima de uno, ¡en un abrir y cerrar de ojos fui teletransportado! Del otro lado me di cuenta que esto paso cuando el lobo paso por encima del otro mecanismo. Eso es una locura, ¿no? Deje tu equipo alli. Creo que estara seguro hasta que regreses. Cuando leas esta carta, rompela. ]] player:popupFYI(msg) elseif item.uid == 10163 then local msg = [[ Donatelo, ¿estas escuchando? Cenaremos huevos de tortuga. Repito, huevos de tortuga para cenar. jajajaja Buen viaje, compañero. ]] player:popupFYI(msg) elseif item.uid == 10170 then if player:getStorageValue(_QUESTLOG[121].UID_01) == 04 then player:teleportTo({x=3567, y=1679, z=10}) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) else if player:getStorageValue(_SYSTEM.RECYCLER_STORAGE) < 01 then player:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 01) player:getPosition():sendMagicEffect(13) elseif player:getStorageValue(_QUESTLOG[121].UID_01) == 04 then player:teleportTo({x=3567, y=1678, z=10}) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) end end elseif item.uid == 10171 then if player:getStorageValue(_QUESTLOG[121].UID_01) == 01 then player:setStorageValue(_QUESTLOG[121].UID_01, 02) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") player:getPosition():sendMagicEffect(13) doBackpack(player, 12) player:sendCancelMessage("@RemoveMarkMap") player:sendCancelMessage("@LoadQuestWindows") return true end elseif item.uid == 10172 then if player:getStorageValue(_SYSTEM.RECYCLER_STORAGE) < 01 then player:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 01) player:getPosition():sendMagicEffect(13) else player:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil) end elseif item.uid == 10173 then if player:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 01 then player:setStorageValue(_SYSTEM.RECYCLER_STORAGE, 02) player:getPosition():sendMagicEffect(13) else player:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil) end elseif item.uid == 10174 then if player:getStorageValue(_SYSTEM.RECYCLER_STORAGE) == 02 then player:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil) player:setStorageValue(_QUESTLOG[121].UID_01, 05) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") player:getPosition():sendMagicEffect(13) doBackpack(player, 12) player:sendCancelMessage("@RemoveMarkMap") player:sendCancelMessage("@LoadQuestWindows") return true else player:setStorageValue(_SYSTEM.RECYCLER_STORAGE, nil) end --[[ ARVORE DA MORTE elseif item.uid == 10175 then if player:getStorageValue(QUEST_UNLOCK[item.uid]) < 01 then player:setStorageValue(QUEST_UNLOCK[item.uid], 01) player:getPosition():sendMagicEffect(13) else player:setStorageValue(QUEST_UNLOCK[item.uid], nil) end]] elseif item.uid == 10176 then if player:getStorageValue(_QUESTLOG[122].UID_01) == 02 then if player:getStorageValue(QUEST_UNLOCK[item.uid]) > 00 then player:setStorageValue(QUEST_UNLOCK[item.uid], nil) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[ ERROR ]\nReinicio de arboles!") player:getPosition():sendMagicEffect(03) return true else local Sequencia = 02 local Position_1 = Position(TEMPLO_CORES[00][01].POS[01], TEMPLO_CORES[00][01].POS[02], TEMPLO_CORES[00][01].POS[03]) local Lamp_1 = Tile(Position_1):getItemById(TEMPLO_CORES[01][Sequencia][01]) local Position_2 = Position(TEMPLO_CORES[00][02].POS[01], TEMPLO_CORES[00][02].POS[02], TEMPLO_CORES[00][02].POS[03]) local Lamp_2 = Tile(Position_2):getItemById(TEMPLO_CORES[01][Sequencia][02]) local Position_3 = Position(TEMPLO_CORES[00][03].POS[01], TEMPLO_CORES[00][03].POS[02], TEMPLO_CORES[00][03].POS[03]) local Lamp_3 = Tile(Position_3):getItemById(TEMPLO_CORES[01][Sequencia][03]) local Position_4 = Position(TEMPLO_CORES[00][04].POS[01], TEMPLO_CORES[00][04].POS[02], TEMPLO_CORES[00][04].POS[03]) local Lamp_4 = Tile(Position_4):getItemById(TEMPLO_CORES[01][Sequencia][04]) local Position_5 = Position(TEMPLO_CORES[00][05].POS[01], TEMPLO_CORES[00][05].POS[02], TEMPLO_CORES[00][05].POS[03]) local Lamp_5 = Tile(Position_5):getItemById(TEMPLO_CORES[01][Sequencia][05]) if Lamp_1 and Lamp_2 and Lamp_3 and Lamp_4 and Lamp_5 then player:setStorageValue(QUEST_UNLOCK[item.uid], 01) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[ 01 / 05 ]") player:getPosition():sendMagicEffect(13) onResetLever() return true else player:setStorageValue(QUEST_UNLOCK[item.uid], nil) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[ ERROR ]\nReinicio de arboles!") player:getPosition():sendMagicEffect(03) onResetLever() return true end end end elseif item.uid == 10177 then if player:getStorageValue(_QUESTLOG[122].UID_01) == 02 then if player:getStorageValue(QUEST_UNLOCK[item.uid]) == 01 then local Sequencia = 03 local Position_1 = Position(TEMPLO_CORES[00][01].POS[01], TEMPLO_CORES[00][01].POS[02], TEMPLO_CORES[00][01].POS[03]) local Lamp_1 = Tile(Position_1):getItemById(TEMPLO_CORES[01][Sequencia][01]) local Position_2 = Position(TEMPLO_CORES[00][02].POS[01], TEMPLO_CORES[00][02].POS[02], TEMPLO_CORES[00][02].POS[03]) local Lamp_2 = Tile(Position_2):getItemById(TEMPLO_CORES[01][Sequencia][02]) local Position_3 = Position(TEMPLO_CORES[00][03].POS[01], TEMPLO_CORES[00][03].POS[02], TEMPLO_CORES[00][03].POS[03]) local Lamp_3 = Tile(Position_3):getItemById(TEMPLO_CORES[01][Sequencia][03]) local Position_4 = Position(TEMPLO_CORES[00][04].POS[01], TEMPLO_CORES[00][04].POS[02], TEMPLO_CORES[00][04].POS[03]) local Lamp_4 = Tile(Position_4):getItemById(TEMPLO_CORES[01][Sequencia][04]) local Position_5 = Position(TEMPLO_CORES[00][05].POS[01], TEMPLO_CORES[00][05].POS[02], TEMPLO_CORES[00][05].POS[03]) local Lamp_5 = Tile(Position_5):getItemById(TEMPLO_CORES[01][Sequencia][05]) if Lamp_1 and Lamp_2 and Lamp_3 and Lamp_4 and Lamp_5 then player:setStorageValue(QUEST_UNLOCK[item.uid], 02) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[ 02 / 05 ]") player:getPosition():sendMagicEffect(13) onResetLever() return true else player:setStorageValue(QUEST_UNLOCK[item.uid], nil) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[ ERROR ]\nReinicio de arboles!") player:getPosition():sendMagicEffect(03) onResetLever() return true end else player:setStorageValue(QUEST_UNLOCK[item.uid], nil) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[ ERROR ]\nReinicio de arboles!") player:getPosition():sendMagicEffect(03) onResetLever() return true end end elseif item.uid == 10180 then if player:getStorageValue(_QUESTLOG[122].UID_01) == 02 then if player:getStorageValue(QUEST_UNLOCK[item.uid]) == 02 then local Sequencia = 06 local Position_1 = Position(TEMPLO_CORES[00][01].POS[01], TEMPLO_CORES[00][01].POS[02], TEMPLO_CORES[00][01].POS[03]) local Lamp_1 = Tile(Position_1):getItemById(TEMPLO_CORES[01][Sequencia][01]) local Position_2 = Position(TEMPLO_CORES[00][02].POS[01], TEMPLO_CORES[00][02].POS[02], TEMPLO_CORES[00][02].POS[03]) local Lamp_2 = Tile(Position_2):getItemById(TEMPLO_CORES[01][Sequencia][02]) local Position_3 = Position(TEMPLO_CORES[00][03].POS[01], TEMPLO_CORES[00][03].POS[02], TEMPLO_CORES[00][03].POS[03]) local Lamp_3 = Tile(Position_3):getItemById(TEMPLO_CORES[01][Sequencia][03]) local Position_4 = Position(TEMPLO_CORES[00][04].POS[01], TEMPLO_CORES[00][04].POS[02], TEMPLO_CORES[00][04].POS[03]) local Lamp_4 = Tile(Position_4):getItemById(TEMPLO_CORES[01][Sequencia][04]) local Position_5 = Position(TEMPLO_CORES[00][05].POS[01], TEMPLO_CORES[00][05].POS[02], TEMPLO_CORES[00][05].POS[03]) local Lamp_5 = Tile(Position_5):getItemById(TEMPLO_CORES[01][Sequencia][05]) if Lamp_1 and Lamp_2 and Lamp_3 and Lamp_4 and Lamp_5 then player:setStorageValue(QUEST_UNLOCK[item.uid], 03) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[ 03 / 05 ]") player:getPosition():sendMagicEffect(13) onResetLever() return true else player:setStorageValue(QUEST_UNLOCK[item.uid], nil) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[ ERROR ]\nReinicio de arboles!") player:getPosition():sendMagicEffect(03) onResetLever() return true end else player:setStorageValue(QUEST_UNLOCK[item.uid], nil) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[ ERROR ]\nReinicio de arboles!") player:getPosition():sendMagicEffect(03) onResetLever() return true end end elseif item.uid == 10181 then if player:getStorageValue(_QUESTLOG[122].UID_01) == 02 then if player:getStorageValue(QUEST_UNLOCK[item.uid]) == 03 then local Sequencia = 07 local Position_1 = Position(TEMPLO_CORES[00][01].POS[01], TEMPLO_CORES[00][01].POS[02], TEMPLO_CORES[00][01].POS[03]) local Lamp_1 = Tile(Position_1):getItemById(TEMPLO_CORES[01][Sequencia][01]) local Position_2 = Position(TEMPLO_CORES[00][02].POS[01], TEMPLO_CORES[00][02].POS[02], TEMPLO_CORES[00][02].POS[03]) local Lamp_2 = Tile(Position_2):getItemById(TEMPLO_CORES[01][Sequencia][02]) local Position_3 = Position(TEMPLO_CORES[00][03].POS[01], TEMPLO_CORES[00][03].POS[02], TEMPLO_CORES[00][03].POS[03]) local Lamp_3 = Tile(Position_3):getItemById(TEMPLO_CORES[01][Sequencia][03]) local Position_4 = Position(TEMPLO_CORES[00][04].POS[01], TEMPLO_CORES[00][04].POS[02], TEMPLO_CORES[00][04].POS[03]) local Lamp_4 = Tile(Position_4):getItemById(TEMPLO_CORES[01][Sequencia][04]) local Position_5 = Position(TEMPLO_CORES[00][05].POS[01], TEMPLO_CORES[00][05].POS[02], TEMPLO_CORES[00][05].POS[03]) local Lamp_5 = Tile(Position_5):getItemById(TEMPLO_CORES[01][Sequencia][05]) if Lamp_1 and Lamp_2 and Lamp_3 and Lamp_4 and Lamp_5 then player:setStorageValue(QUEST_UNLOCK[item.uid], 04) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[ 04 / 05 ]") player:getPosition():sendMagicEffect(13) onResetLever() return true else player:setStorageValue(QUEST_UNLOCK[item.uid], nil) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[ ERROR ]\nReinicio de arboles!") player:getPosition():sendMagicEffect(03) onResetLever() return true end else player:setStorageValue(QUEST_UNLOCK[item.uid], nil) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[ ERROR ]\nReinicio de arboles!") player:getPosition():sendMagicEffect(03) onResetLever() return true end end elseif item.uid == 10182 then if player:getStorageValue(_QUESTLOG[122].UID_01) == 02 then if player:getStorageValue(QUEST_UNLOCK[item.uid]) == 04 then local Sequencia = 08 local Position_1 = Position(TEMPLO_CORES[00][01].POS[01], TEMPLO_CORES[00][01].POS[02], TEMPLO_CORES[00][01].POS[03]) local Lamp_1 = Tile(Position_1):getItemById(TEMPLO_CORES[01][Sequencia][01]) local Position_2 = Position(TEMPLO_CORES[00][02].POS[01], TEMPLO_CORES[00][02].POS[02], TEMPLO_CORES[00][02].POS[03]) local Lamp_2 = Tile(Position_2):getItemById(TEMPLO_CORES[01][Sequencia][02]) local Position_3 = Position(TEMPLO_CORES[00][03].POS[01], TEMPLO_CORES[00][03].POS[02], TEMPLO_CORES[00][03].POS[03]) local Lamp_3 = Tile(Position_3):getItemById(TEMPLO_CORES[01][Sequencia][03]) local Position_4 = Position(TEMPLO_CORES[00][04].POS[01], TEMPLO_CORES[00][04].POS[02], TEMPLO_CORES[00][04].POS[03]) local Lamp_4 = Tile(Position_4):getItemById(TEMPLO_CORES[01][Sequencia][04]) local Position_5 = Position(TEMPLO_CORES[00][05].POS[01], TEMPLO_CORES[00][05].POS[02], TEMPLO_CORES[00][05].POS[03]) local Lamp_5 = Tile(Position_5):getItemById(TEMPLO_CORES[01][Sequencia][05]) if Lamp_1 and Lamp_2 and Lamp_3 and Lamp_4 and Lamp_5 then player:setStorageValue(QUEST_UNLOCK[item.uid], nil) player:teleportTo({x=3693, y=1713, z=03}) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) local from = {x=3691, y=1708, z=05} local to = {x=3696, y=1717, z=05} for A = from.x, to.x do for B = from.y, to.y do for C = from.z, to.z do local tile = Tile(A, B, C) if tile ~= nil then local creature = tile:getTopCreature() if creature and creature:isPlayer() then creature:teleportTo({x=3693, y=1713, z=03}) creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) end end end end end doBackpack(player, 12) player:sendCancelMessage("@RemoveMarkMap") player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[ 05 / 05 ]") onResetLever() return true else player:setStorageValue(QUEST_UNLOCK[item.uid], nil) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[ ERROR ]\nReinicio de arboles!") player:getPosition():sendMagicEffect(03) onResetLever() return true end else player:setStorageValue(QUEST_UNLOCK[item.uid], nil) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[ ERROR ]\nReinicio de arboles!") player:getPosition():sendMagicEffect(03) onResetLever() return true end end elseif item.uid == 10183 then if player:getStorageValue(QUEST_UNLOCK[item.uid]) == 01 then player:setStorageValue(QUEST_UNLOCK[item.uid], 02) player:getPosition():sendMagicEffect(13) return true end elseif item.uid == 10184 then if player:getStorageValue(QUEST_UNLOCK[item.uid]) >= 02 then local ProcurarID_1 = 3032 local ProcurarID_2 = 3022 local ProcurarID_3 = 3213 local QntPlayer = 01 local POS_A = Tile(3556, 1895, 08) local crea_a = POS_A:getTopCreature() local POS_B = Tile(3556, 1896, 08) local crea_b = POS_B:getTopCreature() local QNT_PLA_1 = 0 local POS_PLA_1 = 0 local EXT_PLA_1 = 0 local QNT_PLA_2 = 0 local POS_PLA_2 = 0 local EXT_PLA_2 = 0 local QNT_PLA_3 = 0 local POS_PLA_3 = 0 local EXT_PLA_3 = 0 if crea_a and crea_a:isPlayer() then if crea_a:getStorageValue(QUEST_UNLOCK[item.uid]) >= 02 then QntPlayer = QntPlayer + 01 if crea_b and crea_b:isPlayer() then if crea_b:getStorageValue(QUEST_UNLOCK[item.uid]) >= 02 then QntPlayer = QntPlayer + 01 end end end end if QntPlayer == 03 then doBackpack(player, 03, 03, 01, 01, ProcurarID_1) -- Procurar QNT_PLA_1 = doBackpack(player, 04) POS_PLA_1 = doBackpack(player, 05) EXT_PLA_1 = doBackpack(player, 06) if QNT_PLA_1 > 00 then if crea_a and crea_a:isPlayer() then doBackpack(crea_a, 03, 03, 01, 01, ProcurarID_2) -- Procurar QNT_PLA_2 = doBackpack(crea_a, 04) POS_PLA_2 = doBackpack(crea_a, 05) EXT_PLA_2 = doBackpack(crea_a, 06) if QNT_PLA_2 > 00 then if crea_b and crea_b:isPlayer() then doBackpack(crea_b, 03, 03, 01, 01, ProcurarID_3) -- Procurar QNT_PLA_3 = doBackpack(crea_b, 04) POS_PLA_3 = doBackpack(crea_b, 05) EXT_PLA_3 = doBackpack(crea_b, 06) if QNT_PLA_3 > 00 then if QNT_PLA_1 > 01 then player:setStorageValue(_BACKPACK[03][EXT_PLA_1][POS_PLA_1].UID_04, (QNT_PLA_1 - 01)) else doBackpack(player, 02, 03, EXT_PLA_1, POS_PLA_1) end if player:getStorageValue(QUEST_UNLOCK[item.uid]) < 100 then player:setStorageValue(QUEST_UNLOCK[item.uid], 03) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") end player:sendCancelMessage("@ReloadBackpack 03 01") player:teleportTo({x=3543, y=1899, z=08}) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) if QNT_PLA_2 > 01 then crea_a:setStorageValue(_BACKPACK[03][EXT_PLA_2][POS_PLA_2].UID_04, (QNT_PLA_2 - 01)) else doBackpack(crea_a, 02, 03, EXT_PLA_2, POS_PLA_2) end if crea_a:getStorageValue(QUEST_UNLOCK[item.uid]) < 100 then crea_a:setStorageValue(QUEST_UNLOCK[item.uid], 03) crea_a:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") end crea_a:sendCancelMessage("@ReloadBackpack 03 01") crea_a:teleportTo({x=3543, y=1899, z=08}) crea_a:getPosition():sendMagicEffect(CONST_ME_TELEPORT) if QNT_PLA_3 > 01 then crea_b:setStorageValue(_BACKPACK[03][EXT_PLA_3][POS_PLA_3].UID_04, (QNT_PLA_3 - 01)) else doBackpack(crea_b, 02, 03, EXT_PLA_3, POS_PLA_3) end if crea_b:getStorageValue(QUEST_UNLOCK[item.uid]) < 100 then crea_b:setStorageValue(QUEST_UNLOCK[item.uid], 03) crea_b:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") end crea_b:sendCancelMessage("@ReloadBackpack 03 01") crea_b:teleportTo({x=3543, y=1899, z=08}) crea_b:getPosition():sendMagicEffect(CONST_ME_TELEPORT) return true end end end end end end player:teleportTo({x=3554, y=1901, z=08}) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) if crea_a and crea_a:isPlayer() then crea_a:teleportTo({x=3554, y=1901, z=08}) crea_a:getPosition():sendMagicEffect(CONST_ME_TELEPORT) end if crea_b and crea_a:isPlayer() then crea_b:teleportTo({x=3554, y=1901, z=08}) crea_b:getPosition():sendMagicEffect(CONST_ME_TELEPORT) end return true else player:teleportTo({x=3554, y=1901, z=08}) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) if crea_a and crea_a:isPlayer() then crea_a:teleportTo({x=3554, y=1901, z=08}) crea_a:getPosition():sendMagicEffect(CONST_ME_TELEPORT) end if crea_b and crea_a:isPlayer() then crea_b:teleportTo({x=3554, y=1901, z=08}) crea_b:getPosition():sendMagicEffect(CONST_ME_TELEPORT) end end if item.itemid == 1945 then item:transform(item.itemid + 1) else item:transform(item.itemid - 1) end elseif item.uid == 10185 then if player:getStorageValue(QUEST_UNLOCK[item.uid]) == 03 then local ProcurarID_1 = 3243 local ProcurarID_2 = 3031 local QNT_PLA_1 = 0 local POS_PLA_1 = 0 local EXT_PLA_1 = 0 local QNT_PLA_2 = 0 local POS_PLA_2 = 0 local EXT_PLA_2 = 0 doBackpack(player, 03, 03, 01, 01, ProcurarID_1) -- Procurar QNT_PLA_1 = doBackpack(player, 04) POS_PLA_1 = doBackpack(player, 05) EXT_PLA_1 = doBackpack(player, 06) if QNT_PLA_1 > 00 then doBackpack(player, 03, 03, 01, 01, ProcurarID_2) -- Procurar QNT_PLA_2 = doBackpack(player, 04) POS_PLA_2 = doBackpack(player, 05) EXT_PLA_2 = doBackpack(player, 06) if QNT_PLA_2 > 00 then if QNT_PLA_1 > 01 then player:setStorageValue(_BACKPACK[03][EXT_PLA_1][POS_PLA_1].UID_04, (QNT_PLA_1 - 01)) else doBackpack(player, 02, 03, EXT_PLA_1, POS_PLA_1) end if QNT_PLA_2 > 01 then player:setStorageValue(_BACKPACK[03][EXT_PLA_2][POS_PLA_2].UID_04, (QNT_PLA_2 - 01)) else doBackpack(player, 02, 03, EXT_PLA_2, POS_PLA_2) end player:sendCancelMessage("@ReloadBackpack 03 01") if player:getStorageValue(QUEST_UNLOCK[item.uid]) < 100 then player:setStorageValue(QUEST_UNLOCK[item.uid], 04) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Su diario de Missiones fue actualizado.") player:getPosition():sendMagicEffect(13) return true end else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Se requiere oferta.") player:getPosition():sendMagicEffect(03) return true end else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Se requiere oferta.") player:getPosition():sendMagicEffect(03) return true end end if item.itemid == 1945 then item:transform(item.itemid + 1) else item:transform(item.itemid - 1) end end return false end