local NINHO_DIFICULTY = { ["FACIL"] = {01, 30}; ["MEDIO"] = {02, 70}; ["DIFICIL"] = {03, 125}; ["IMPOSSIVEL"] = {04, 185}; } function onSay(player, words, param) local split = param:splitTrimmed(" ") local Dificuldade = split[01] local OnlineCoins = player:getStorageValue(_SYSTEM.ONLINE_COIN) local CursedPoints = NINHO_DIFICULTY[Dificuldade][01] local party = player:getParty() if _DEBUG_MODE then local _TYPE = { ["1"] = 'Facil', ["2"] = 'Medio', ["3"] = 'Dificil', ["4"] = 'Impossivel', } if _TYPE[split[01]] then print("[TALK - CURSEDTREE] " ..player:getName().. " - " .._TYPE[split[01]]) else print("[TALK - CURSEDTREE] " ..player:getName().. " - " ..split[01]) end end if party then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Você precisa sair de sua Party para poder entrar.") return false end if player:getLevel() < NINHO_DIFICULTY[Dificuldade][02] then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Você precisa ser nível " ..NINHO_DIFICULTY[Dificuldade][02].. " ou maior para poder entrar.") return false end if _CHEATS.CURSED_ONLINE_FREE or OnlineCoins >= CursedPoints then local from = {x=4043, y=934, z=08} local to = {x=4067, y=955, z=08} 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 creature = tile:getTopCreature() if creature and creature:isPlayer() then player:popupFYI("Outro jogador está usando a área no momento. Tente novamente mais tarde.") return false end end end end 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 creature = tile:getTopCreature() if creature and creature:isMonster() then doRemoveCreature(creature:getId()) end end end end if _CHEATS.CURSED_ONLINE_FREE == false then player:setStorageValue(_SYSTEM.ONLINE_COIN, (OnlineCoins - CursedPoints)) end player:setStorageValue(_SYSTEM.GLOBAL_INDEX[02], 00) player:setStorageValue(_SYSTEM.CURSED_TREE, NINHO_DIFICULTY[Dificuldade][01]) player:setStorageValue(_SYSTEM.GLOBAL_INDEX[01], NINHO_DIFICULTY[Dificuldade][01]) player:teleportTo({x=4054, y=941, z=08}) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) doBackpack(player, 11) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Clique nas partes da Arvore para dar inicio ao desafio.") else player:popupFYI("Você não possui Pontos Online suficientes.") end return false end