local STEP_1 = 00 local STEP_2 = 00 local STEP_3 = 00 local FastEffect = 400 local PATH_EFFECT = { [01] = { [01] = {3979, 1860, 14}, [02] = {4001, 1859, 14}, [03] = {4000, 1847, 14}, [04] = {3992, 1848, 14}, [05] = {3993, 1856, 14}, [06] = {3996, 1855, 14}, [07] = {3995, 1851, 14}, }; [02] = { [01] = {4062, 1860, 14}, [02] = {4084, 1859, 14}, [03] = {4083, 1847, 14}, [04] = {4075, 1848, 14}, [05] = {4076, 1856, 14}, [06] = {4079, 1855, 14}, [07] = {4078, 1851, 14}, }; [03] = { [01] = {4145, 1860, 14}, [02] = {4167, 1859, 14}, [03] = {4166, 1847, 14}, [04] = {4158, 1848, 14}, [05] = {4159, 1856, 14}, [06] = {4162, 1855, 14}, [07] = {4161, 1851, 14}, }; } local WAY_EFFECT = { [01] = 22; [02] = 12; [03] = 08; [04] = 08; [05] = 03; [06] = 04; [07] = 11; } function onEffectPath(pos, count, cid, idd) local player = Player(cid) if idd == 01 then if STEP_1 > 00 then if STEP_1 == 01 then if count == WAY_EFFECT[STEP_1] then local tile = Tile(pos.x + 1, pos.y, pos.z) local playerPosition = tile:getTopCreature() if playerPosition ~= nil then if playerPosition:isPlayer() then if playerPosition:getDirection() == 00 then STEP_1 = 02 local EffectPos = Position(PATH_EFFECT[idd][STEP_1][01], PATH_EFFECT[idd][STEP_1][02], PATH_EFFECT[idd][STEP_1][03]) local id = 01 EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, idd) else STEP_1 = 00 return true end else STEP_1 = 00 return true end else STEP_1 = 00 return true end else local position = Position(pos.x + 1, pos.y, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end elseif STEP_1 == 02 then if count == WAY_EFFECT[STEP_1] then local tile = Tile(pos.x, pos.y - 1, pos.z) local playerPosition = tile:getTopCreature() if playerPosition ~= nil then if playerPosition:isPlayer() then if playerPosition:getDirection() == 03 then STEP_1 = 03 local EffectPos = Position(PATH_EFFECT[idd][STEP_1][01], PATH_EFFECT[idd][STEP_1][02], PATH_EFFECT[idd][STEP_1][03]) local id = 01 EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, idd) else STEP_1 = 00 return true end else STEP_1 = 00 return true end else STEP_1 = 00 return true end else local position = Position(pos.x, pos.y - 1, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end elseif STEP_1 == 03 then if count == WAY_EFFECT[STEP_1] then local tile = Tile(pos.x - 1, pos.y, pos.z) local playerPosition = tile:getTopCreature() if playerPosition ~= nil then if playerPosition:isPlayer() then if playerPosition:getDirection() == 02 then STEP_1 = 04 local EffectPos = Position(PATH_EFFECT[idd][STEP_1][01], PATH_EFFECT[idd][STEP_1][02], PATH_EFFECT[idd][STEP_1][03]) local id = 01 EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, idd) else STEP_1 = 00 return true end else STEP_1 = 00 return true end else STEP_1 = 00 return true end else local position = Position(pos.x - 1, pos.y, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end elseif STEP_1 == 04 then if count == WAY_EFFECT[STEP_1] then local tile = Tile(pos.x, pos.y + 1, pos.z) local playerPosition = tile:getTopCreature() if playerPosition ~= nil then if playerPosition:isPlayer() then if playerPosition:getDirection() == 01 then STEP_1 = 05 local EffectPos = Position(PATH_EFFECT[idd][STEP_1][01], PATH_EFFECT[idd][STEP_1][02], PATH_EFFECT[idd][STEP_1][03]) local id = 01 EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, idd) else STEP_1 = 00 return true end else STEP_1 = 00 return true end else STEP_1 = 00 return true end else local position = Position(pos.x, pos.y + 1, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end elseif STEP_1 == 05 then if count == WAY_EFFECT[STEP_1] then local tile = Tile(pos.x + 1, pos.y, pos.z) local playerPosition = tile:getTopCreature() if playerPosition ~= nil then if playerPosition:isPlayer() then if playerPosition:getDirection() == 00 then STEP_1 = 06 local EffectPos = Position(PATH_EFFECT[idd][STEP_1][01], PATH_EFFECT[idd][STEP_1][02], PATH_EFFECT[idd][STEP_1][03]) local id = 01 EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, idd) else STEP_1 = 00 return true end else STEP_1 = 00 return true end else STEP_1 = 00 return true end else local position = Position(pos.x + 1, pos.y, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end elseif STEP_1 == 06 then if count == WAY_EFFECT[STEP_1] then local tile = Tile(pos.x, pos.y - 1, pos.z) local playerPosition = tile:getTopCreature() if playerPosition ~= nil then if playerPosition:isPlayer() then if playerPosition:getDirection() == 03 then STEP_1 = 07 local EffectPos = Position(PATH_EFFECT[idd][STEP_1][01], PATH_EFFECT[idd][STEP_1][02], PATH_EFFECT[idd][STEP_1][03]) local id = 01 EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, idd) else STEP_1 = 00 return true end else STEP_1 = 00 return true end else STEP_1 = 00 return true end else local position = Position(pos.x, pos.y - 1, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end elseif STEP_1 == 07 then if count == WAY_EFFECT[STEP_1] then local party = player:getParty() if not party then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Clique na estátua para finalizar.") player:setStorageValue(_SYSTEM.DANGEROUS[10][01].STORAGE, 08) player:setStorageValue(_SYSTEM.DANGEROUS[10][01].RECOMPENSA[01], _SYSTEM.DANGEROUS[10][01].RECOMPENSA[02]) player:getPosition():sendMagicEffect(15) else local members = party:getMembers() members[#members + 1] = party:getLeader() for _, member in ipairs(members) do member:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Clique na estátua para finalizar.") member:setStorageValue(_SYSTEM.DANGEROUS[10][01].STORAGE, 08) member:getPosition():sendMagicEffect(15) end end return true else local position = Position(pos.x - 1, pos.y, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end end end end if idd == 02 then if STEP_2 > 00 then if STEP_2 == 01 then if count == WAY_EFFECT[STEP_2] then local tile = Tile(pos.x + 1, pos.y, pos.z) local playerPosition = tile:getTopCreature() if playerPosition ~= nil then if playerPosition:isPlayer() then if playerPosition:getDirection() == 00 then STEP_2 = 02 local EffectPos = Position(PATH_EFFECT[idd][STEP_2][01], PATH_EFFECT[idd][STEP_2][02], PATH_EFFECT[idd][STEP_2][03]) local id = 01 EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, idd) else STEP_2 = 00 return true end else STEP_2 = 00 return true end else STEP_2 = 00 return true end else local position = Position(pos.x + 1, pos.y, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end elseif STEP_2 == 02 then if count == WAY_EFFECT[STEP_2] then local tile = Tile(pos.x, pos.y - 1, pos.z) local playerPosition = tile:getTopCreature() if playerPosition ~= nil then if playerPosition:isPlayer() then if playerPosition:getDirection() == 03 then STEP_2 = 03 local EffectPos = Position(PATH_EFFECT[idd][STEP_2][01], PATH_EFFECT[idd][STEP_2][02], PATH_EFFECT[idd][STEP_2][03]) local id = 01 EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, idd) else STEP_2 = 00 return true end else STEP_2 = 00 return true end else STEP_2 = 00 return true end else local position = Position(pos.x, pos.y - 1, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end elseif STEP_2 == 03 then if count == WAY_EFFECT[STEP_2] then local tile = Tile(pos.x - 1, pos.y, pos.z) local playerPosition = tile:getTopCreature() if playerPosition ~= nil then if playerPosition:isPlayer() then if playerPosition:getDirection() == 02 then STEP_2 = 04 local EffectPos = Position(PATH_EFFECT[idd][STEP_2][01], PATH_EFFECT[idd][STEP_2][02], PATH_EFFECT[idd][STEP_2][03]) local id = 01 EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, idd) else STEP_2 = 00 return true end else STEP_2 = 00 return true end else STEP_2 = 00 return true end else local position = Position(pos.x - 1, pos.y, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end elseif STEP_2 == 04 then if count == WAY_EFFECT[STEP_2] then local tile = Tile(pos.x, pos.y + 1, pos.z) local playerPosition = tile:getTopCreature() if playerPosition ~= nil then if playerPosition:isPlayer() then if playerPosition:getDirection() == 01 then STEP_2 = 05 local EffectPos = Position(PATH_EFFECT[idd][STEP_2][01], PATH_EFFECT[idd][STEP_2][02], PATH_EFFECT[idd][STEP_2][03]) local id = 01 EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, idd) else STEP_2 = 00 return true end else STEP_2 = 00 return true end else STEP_2 = 00 return true end else local position = Position(pos.x, pos.y + 1, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end elseif STEP_2 == 05 then if count == WAY_EFFECT[STEP_2] then local tile = Tile(pos.x + 1, pos.y, pos.z) local playerPosition = tile:getTopCreature() if playerPosition ~= nil then if playerPosition:isPlayer() then if playerPosition:getDirection() == 00 then STEP_2 = 06 local EffectPos = Position(PATH_EFFECT[idd][STEP_2][01], PATH_EFFECT[idd][STEP_2][02], PATH_EFFECT[idd][STEP_2][03]) local id = 01 EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, idd) else STEP_2 = 00 return true end else STEP_2 = 00 return true end else STEP_2 = 00 return true end else local position = Position(pos.x + 1, pos.y, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end elseif STEP_2 == 06 then if count == WAY_EFFECT[STEP_2] then local tile = Tile(pos.x, pos.y - 1, pos.z) local playerPosition = tile:getTopCreature() if playerPosition ~= nil then if playerPosition:isPlayer() then if playerPosition:getDirection() == 03 then STEP_2 = 07 local EffectPos = Position(PATH_EFFECT[idd][STEP_2][01], PATH_EFFECT[idd][STEP_2][02], PATH_EFFECT[idd][STEP_2][03]) local id = 01 EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, idd) else STEP_2 = 00 return true end else STEP_2 = 00 return true end else STEP_2 = 00 return true end else local position = Position(pos.x, pos.y - 1, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end elseif STEP_2 == 07 then if count == WAY_EFFECT[STEP_2] then local party = player:getParty() if not party then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Clique na estátua para finalizar.") player:setStorageValue(_SYSTEM.DANGEROUS[10][01].STORAGE, 08) player:setStorageValue(_SYSTEM.DANGEROUS[10][01].RECOMPENSA[01], _SYSTEM.DANGEROUS[10][01].RECOMPENSA[02]) player:getPosition():sendMagicEffect(15) else local members = party:getMembers() members[#members + 1] = party:getLeader() for _, member in ipairs(members) do member:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Clique na estátua para finalizar.") member:setStorageValue(_SYSTEM.DANGEROUS[10][01].STORAGE, 08) member:getPosition():sendMagicEffect(15) end end return true else local position = Position(pos.x - 1, pos.y, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end end end end if idd == 03 then if STEP_3 > 00 then if STEP_3 == 01 then if count == WAY_EFFECT[STEP_3] then local tile = Tile(pos.x + 1, pos.y, pos.z) local playerPosition = tile:getTopCreature() if playerPosition ~= nil then if playerPosition:isPlayer() then if playerPosition:getDirection() == 00 then STEP_3 = 02 local EffectPos = Position(PATH_EFFECT[idd][STEP_3][01], PATH_EFFECT[idd][STEP_3][02], PATH_EFFECT[idd][STEP_3][03]) local id = 01 EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, idd) else STEP_3 = 00 return true end else STEP_3 = 00 return true end else STEP_3 = 00 return true end else local position = Position(pos.x + 1, pos.y, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end elseif STEP_3 == 02 then if count == WAY_EFFECT[STEP_3] then local tile = Tile(pos.x, pos.y - 1, pos.z) local playerPosition = tile:getTopCreature() if playerPosition ~= nil then if playerPosition:isPlayer() then if playerPosition:getDirection() == 03 then STEP_3 = 03 local EffectPos = Position(PATH_EFFECT[idd][STEP_3][01], PATH_EFFECT[idd][STEP_3][02], PATH_EFFECT[idd][STEP_3][03]) local id = 01 EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, idd) else STEP_3 = 00 return true end else STEP_3 = 00 return true end else STEP_3 = 00 return true end else local position = Position(pos.x, pos.y - 1, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end elseif STEP_3 == 03 then if count == WAY_EFFECT[STEP_3] then local tile = Tile(pos.x - 1, pos.y, pos.z) local playerPosition = tile:getTopCreature() if playerPosition ~= nil then if playerPosition:isPlayer() then if playerPosition:getDirection() == 02 then STEP_3 = 04 local EffectPos = Position(PATH_EFFECT[idd][STEP_3][01], PATH_EFFECT[idd][STEP_3][02], PATH_EFFECT[idd][STEP_3][03]) local id = 01 EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, idd) else STEP_3 = 00 return true end else STEP_3 = 00 return true end else STEP_3 = 00 return true end else local position = Position(pos.x - 1, pos.y, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end elseif STEP_3 == 04 then if count == WAY_EFFECT[STEP_3] then local tile = Tile(pos.x, pos.y + 1, pos.z) local playerPosition = tile:getTopCreature() if playerPosition ~= nil then if playerPosition:isPlayer() then if playerPosition:getDirection() == 01 then STEP_3 = 05 local EffectPos = Position(PATH_EFFECT[idd][STEP_3][01], PATH_EFFECT[idd][STEP_3][02], PATH_EFFECT[idd][STEP_3][03]) local id = 01 EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, idd) else STEP_3 = 00 return true end else STEP_3 = 00 return true end else STEP_3 = 00 return true end else local position = Position(pos.x, pos.y + 1, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end elseif STEP_3 == 05 then if count == WAY_EFFECT[STEP_3] then local tile = Tile(pos.x + 1, pos.y, pos.z) local playerPosition = tile:getTopCreature() if playerPosition ~= nil then if playerPosition:isPlayer() then if playerPosition:getDirection() == 00 then STEP_3 = 06 local EffectPos = Position(PATH_EFFECT[idd][STEP_3][01], PATH_EFFECT[idd][STEP_3][02], PATH_EFFECT[idd][STEP_3][03]) local id = 01 EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, idd) else STEP_3 = 00 return true end else STEP_3 = 00 return true end else STEP_3 = 00 return true end else local position = Position(pos.x + 1, pos.y, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end elseif STEP_3 == 06 then if count == WAY_EFFECT[STEP_3] then local tile = Tile(pos.x, pos.y - 1, pos.z) local playerPosition = tile:getTopCreature() if playerPosition ~= nil then if playerPosition:isPlayer() then if playerPosition:getDirection() == 03 then STEP_3 = 07 local EffectPos = Position(PATH_EFFECT[idd][STEP_3][01], PATH_EFFECT[idd][STEP_3][02], PATH_EFFECT[idd][STEP_3][03]) local id = 01 EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, idd) else STEP_3 = 00 return true end else STEP_3 = 00 return true end else STEP_3 = 00 return true end else local position = Position(pos.x, pos.y - 1, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end elseif STEP_3 == 07 then if count == WAY_EFFECT[STEP_3] then local party = player:getParty() if not party then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Clique na estátua para finalizar.") player:setStorageValue(_SYSTEM.DANGEROUS[10][01].STORAGE, 08) player:setStorageValue(_SYSTEM.DANGEROUS[10][01].RECOMPENSA[01], _SYSTEM.DANGEROUS[10][01].RECOMPENSA[02]) player:getPosition():sendMagicEffect(15) else local members = party:getMembers() members[#members + 1] = party:getLeader() for _, member in ipairs(members) do member:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Clique na estátua para finalizar.") member:setStorageValue(_SYSTEM.DANGEROUS[10][01].STORAGE, 08) member:getPosition():sendMagicEffect(15) end end return true else local position = Position(pos.x - 1, pos.y, pos.z) count = count + 1 position:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, position, count, player.uid, idd) end end end end end function onUse(player, item, fromPosition, target, toPosition, isHotkey) local party = player:getParty() -- PATH EFFECT if item.uid == 10600 then if player:getStorageValue(_SYSTEM.DANGEROUS[10][01].STORAGE) == 07 then if STEP_1 == 00 then STEP_1 = 01 local id = 01 local EffectPos = Position(PATH_EFFECT[01][STEP_1][01], PATH_EFFECT[01][STEP_1][02], PATH_EFFECT[01][STEP_1][03]) EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, 01) return true else player:getPosition():sendMagicEffect(03) return true end else player:getPosition():sendMagicEffect(03) return true end end if item.uid == 10601 then if player:getStorageValue(_SYSTEM.DANGEROUS[10][01].STORAGE) == 07 then if STEP_2 == 00 then STEP_2 = 01 local id = 01 local EffectPos = Position(PATH_EFFECT[02][STEP_2][01], PATH_EFFECT[02][STEP_2][02], PATH_EFFECT[02][STEP_2][03]) EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, 02) return true else player:getPosition():sendMagicEffect(03) return true end else player:getPosition():sendMagicEffect(03) return true end end if item.uid == 10602 then if player:getStorageValue(_SYSTEM.DANGEROUS[10][01].STORAGE) == 07 then if STEP_3 == 00 then STEP_3 = 01 local id = 01 local EffectPos = Position(PATH_EFFECT[03][STEP_3][01], PATH_EFFECT[03][STEP_3][02], PATH_EFFECT[03][STEP_3][03]) EffectPos:sendMagicEffect(38) addEvent(onEffectPath, FastEffect, EffectPos, id, player.uid, 03) return true else player:getPosition():sendMagicEffect(03) return true end else player:getPosition():sendMagicEffect(03) return true end end return true end