Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''system''.



Mais opções de pesquisa

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • A Cidade OTBR
    • OTServ Brasil
    • Atendimento
    • Taverna
  • Projetos Open Source
    • Canary
    • OTServBR-Global
    • Mehah OTClient
    • MyAAC
  • OpenTibia
    • Notícias e Discussões
    • Suporte - Dúvidas, Bugs, Erros
    • Downloads
    • Tutoriais
    • Show-Off
  • Outros
    • Design

Encontrado 21 registros

  1. Boa Tarde! Alguem tem a page do tradeoff atualizado ?? pois oque eu utilizo e uma versão bem antiga, nela a gente nao pode pesquisar o items. se alguem tiver, pode disponibilizar ?? REP++ Já nessa versão pode.
  2. Scripting Bug Auto Loot System

    Estou usando o TFS 0.4 Rev 3887, e estou usando o seguinte sistema de auto loot: Porém após matar algumas criaturas surge o seguinte erro: Vi que outras pessoas tiveram o mesmo erro e já até tentei uma solução que o próprio criador do mod disse (em outro forum), no entanto é uma postagem antiga e não resultou em nada. Se alguém puder me ajudar agradeço.
  3. Scripting OTX3.1 - Reward system

    OTX 3.1 Global FULL, Versão: 10/11.44 Ao matar o boss aparece a mensagem " you not the owner" . Mas existe um porém, a mensagem so aparece quando o boss é sumonado por action/creaturescript. Quando o CM através do comando /m sumona o boss ou através de uma raid automatica o systema de reward funciona perfeitamente. Nestes últimos dias tenho tentado arrumar esse bug do reward system no servidor, porém sem sucesso. Analisando nos talkaction o comando "/m" achei interessante essa parte: Será que nesses scripts (action/creaturescript) que sumonam os bosses eu não tenha que usar algum atributo semelhante a este? Alguem tem uma solução?
  4. Town Portal System (based Dota 2)

    Um mano gringo aí pediu algo do tipo, e eu precisava me familiarizar melhor com a orientação a objetos usada em Lua do TFS 1.3, então fiz esse action, onde o player que possui um scroll pode fazer um portal para seu templo, que é usado dando USE mesmo, e sua party inteira pode ir junto para seus respectivos templos se não estiverem pz locked ou com battle, e caso o player não esteja em uma party, apenas o mesmo pode entrar no portal. Tags XML: <action actionid="43443" script="townportalsystem.lua"/> <action itemid="SCROLLID HERE" script="townportalsystem.lua"/> Arquivo townportalsystem.lua em data/actions/scripts/: -- Town Portal Scroll System based in Dota 2 -- by Nazo local config = { portalId = 1231, -- change to portal item id portalTime = 30, -- portal duration in seconds scrollId = 1232, -- change to scroll item id effect = CONST_ME_POFF -- effect id or CONST that appears at the end of time } local function removePortal(portal) if(portal) portal:remove() portal:getPosition():sendMagicEffect(config.effect) else print("A bug has deleted the portal") end end function onUse(player, item, fromPosition, target, toPosition, isHotkey) if(item:getId()==config.scrollId) then portal = Game.createItem(config.portalId, 1, player:getPosition()) if(player:getParty()) then portal:setCustomAttribute("party", player:getParty()) else portal:setCustomAttribute("owner", player:getName()) end portal:setAction(43443) addEvent(removePortal, config.portalTime * 1000, portal) item:remove() else if(not player:isPzLocked() and not player:getCondition(CONDITION_INFIGHT, CONDITIONID_DEFAULT)) then if(item:getCustomAttribute("party")) then if(player:getParty()==item:getCustomAttribute("party")) then player:teleportTo(player:getTown():getTemplePosition(), true) else player:popupFYI("You do not participate in the portal creator's party.") end elseif(item:getCustomAttribute("name") and player:getName() == item:getCustomAttribute("name")) then player:teleportTo(player:getTown():getTemplePosition(), true) else player:popupFYI("You isn't the owner.") end else player:popupFYI("You are PZ locked or in battle.") end end return true end Obs: fiz e testei apenas no TFS 1.3. Obs²: se desejar trocar a action, lembre-se de mudar no código também, procurando por "setAction".
  5. [8.0+] !pet <> O pet system chegou!

    Pet System Você fala !pet e terá um cachorrinho de estimação, falando !pet outra vez ele sumirá, não é possível fazer pets em zonas de proteção. Se seu pet morrer não importa, é possível fazer ele quantas vezes quiser. No futuro estarei adicionando mais tipos de pet como gatos e esquilos, mas por enquanto é só o cachorro. Na pasta data/talkactions/scripts de seu ot crie um arquivo com nome de pet.lua e coloque isto: function doPlayerAddSummon(cid, name, pos) local creature = doSummonCreature(name, pos) doConvinceCreature(cid, creature) return creature end function onSay(cid, words, param) local petUid = 0 local pos = getCreaturePosition(cid) local store = getPlayerStorageValue(cid, 1000) if words == "!pet" then if store == -1 then if getTilePzInfo(pos) == FALSE then petUid = doPlayerAddSummon(cid, "Dog", pos) setPlayerStorageValue(cid, 1000, petUid) else doPlayerSendCancel(cid, "You can not call your pet in a protection zone.") end else if isCreature(store) == TRUE then doRemoveCreature(store) setPlayerStorageValue(cid, 1000, 0) else if getTilePzInfo(pos) == FALSE then petUid = doPlayerAddSummon(cid, "Dog", pos) setPlayerStorageValue(cid, 1000, petUid) else doPlayerSendCancel(cid, "You can not call your pet in a protection zone.") end end end end end Agora só falta adicionar esta tag no talkactions.xml na pasta data/talkactions: <talkaction words="!pet" script="pet.lua"/> Não era necessário colocar isto abaixo no script, mas para futuras modificações que farei será importante: Até a próxima e se doarem OT$ ficarei muito feliz. E não esqueçam das sugestões, elas são importantes mas nada muito difícil por favor.
  6. Advanced Pet System With Races!

    - Sistema: Advanced Pet System With Races - Autor: josejunior23 - Servidor Testado: 8.54 ~ 8.60 - Descrição: - sempre quiz ter um pet system? mais nunca econtrou algum avançado? - com varias coisas e tals? - grande pakas e todo complicado pra configurar? - então seus problemas acabaram ou começaram, sei lá! - Como Instalar: - Apenas, cole na pasta do server, NÃO É NA PASTA DATA! - coloque o NPC (Pet Trainer) em seu mapa. - Pronto! Informações/Como Usar - FastInfo - Comandos - Como usar as shortkeys - Como adicionar magias IMPORTANTE! OUTROS! IMAGENS! COMO POSTAR UM ERRO(BUG) * caso seu erro, não seja postado assim...eu nem sequer vou ligar. motivo: montes de pessoas não sabem configurar e removem por exemplo até uma ',' que pode bugar todo o script...por isso...mais atenção! ERROS ARRUMADOS AJUDA? Download Link: caso algum admin puder por em anexos o download, era melhor! obrigado =)
  7. Sistema Character's Market System

    Olá. Trouxe para vocês meu sistema de compra e venda de personagens ingame através de talkactions. Scripts: data/talkactions/talkactions.xml: <talkaction words="!character" script="char_market.lua"/> data/talkactions/scripts/char_market.lua: data/lib/characters_market_lib.lua: data/creaturescripts/creaturescripts.xml: <event type="login" name="MarketLogin" script="characters_market.lua"/> data/creaturescripts/characters_market.lua: Configure aqui: CHAR_MARKET_LEVEL = 30 -- Level mínimo que o character deve ter para ser vendido CHAR_MARKET_MIN_PRICE = 100 -- Preço mínimo de um character CHAR_MARKET_MAX_PRICE = 1000000 -- Preço máximo de um character Comandos: !character - Parâmetros: - buy nome -- Compra o personagem - sell nome -- Coloca o personagem à venda - remove nome -- Remove o personagem da lista de vendas - list -- Vê a lista de personagens disponíveis para compra Observações: - O script era um MOD, eu o alterei para sistema pouco antes de postar. Então, caso dê conflitos, seja qual for o motivo, reporte no tópico; - Algumas variáveis foram alteradas, então posso ter esquecido de mudar alguma no script; - Em algumas versões de TFS, o comando !character list dá erro. A razão é desconhecida. Caso tenha alguma solução, poste aqui no tópico para que o erro seja corrigido; - Eu sei que o script tem coisas que poderiam ser alteradas para deixá-lo mais "limpo", mas na época que escrevi o código eu ainda estava começando a fazer sistemas um pouco mais complexos. Até mais, bom uso.
  8. Mudar PVP a cada x tempo

    Nome: PVP Change Criado por: Fir3z_ Servidor Testado: TFS 0.4_dev (8.6x) Descrição: A cada x tempo, o servidor muda o pvp Vi esse tipo de sistema em um servidor há muito tempo, então pensei em fazer pro meu servidor... O sistema simplesmente vai fazer com que a cada x tempo o pvp vai mudar, de pvp pra no-pvp, e vice versa... Em globalevents.xml adicione essa linha: <globalevent name="pvpchange" interval="7200000" event="script" value="pvpchange.lua"/> interval= tempo (7200000 = 2 horas, 3600000 = 1 hora) Crie um arquivo chamado pvpchange.lua dentro de scripts: function onThink(interval) if getWorldType() == 1 then setWorldType(WORLDTYPE_OPEN) pvpatual = "PVP" else setWorldType(WORLDTYPE_OPTIONAL) pvpatual = "NO-PVP" end doBroadcastMessage("O mundo atual esta: " .. pvpatual .. ".") return true end Pronto.
  9. Lumberjack - Lenhador

    ┌──────────────────────────────────────────────────┐ │Nome: Lumberjack │Versão do script: 2.0.0 │Tipo do script: Action │Servidor Testado: The Forgotten Server 0.4 Doomed Elderberry │Autor: Lwkass └──────────────────────────────────────────────────┘ Características : Versão 2.0 Changelog : Instalação : By: Lwkass,Grato~
  10. Lib Spell (POO) !

    ┌───────────────────────────────────────────────┐ │Nome: Spell System │Versão do script: 1.0.0 │Tipo do script: System/Lib │Servidor Testado: The Forgotten Server 0.4.0 Crying Damson │Autor: Lwkass └───────────────────────────────────────────────┘ Bem, é uma lib que criei para criação de spells, também para mostrar um sistema com "POO" em lua, já vou dizendo que não é super super útil (talvez seja para alguns), mas como eu estava com vontade de fazer pode acabar ajudando a diminuir codes também. Caracteristicas: Script: Apenas um script, crie um arquivo Lua com o nome de Spell-class.lua na pasta data/lib: --[[ @ Spell System By Lwkass form OTServerBrasil ! @ Version: 1.0.0 - Any questions (msn): [email protected] ]] ----------===================------------- ---- CONFIGURATIONS ----------===================------------- SpellOptions = { sendCastSay = true, -- true = Vai mandar uma mensagem sempre que usar uma spell showAnimatedValues = true, -- true = Ativa efeito animado onlySpellOwnerSeeAnimation = true -- true = Apenas o usuario da spell ve a animacao } ---- Constantes SPELL_TYPE_DIRECTION = 0 SPELL_TYPE_AREA = 1 ----------===================------------- ---- GENERAL FUNCTIONS ----------===================------------- function getPosByArea(area, topleftpos) arr = {} for y, a in pairs(area) do arr[y] = {} for x, tile in pairs(a) do arr[y][x] = {x=(x-1)+topleftpos.x, y=(y-1)+topleftpos.y, z=topleftpos.z} end end return arr end function rotateArea(area, angle) final = {} angle = math.rad(angle) for y, a in pairs(area) do for x, tile in pairs(a) do temp = {x = (x * math.cos(angle) + y * math.sin(angle)), y = (x * (-math.sin(angle)) + y * math.cos(angle))} e_x, e_y = (temp.x < 0 and #a + (temp.x) + 1 or temp.x), ((temp.y < 0 and #area + (temp.y) + 1 or temp.y)) final[e_y] = final[e_y] or {} table.insert(final[e_y], e_x, tile or 0) end end return final end ----------===================------------- SpellTile = {} function SpellTile:create(combat, effect, damage) --[[ - Cria uma SpellTile Param: #1 (combat) = combat para o tile, válido todos os combats do tibia (exemplo: COMBAT_PHYSICALDAMAGE, COMBAT_ENERGYDAMAGE, COMBAT_MANADRAIN, etc...) #2 (effect) = efeito para o tile, válido todos os efeitos do tibia (exemplo: CONST_ME_DRAWBLOOD, CONST_ME_LOSEENERGY, CONST_ME_POOF, etc...) #3 (damage) = tabela de dano, que deve seguir esse modelo: {min = -dano_minimo, max = -dano_maximo} ]] return setmetatable({ combat = combat, effect = effect, damage = damage }, { __index = self }) end function SpellTile:setCondition(condition) --[[ - Define uma condição para o SpellTile e retorna uma cópia do próprio SpellTile Param: #1 (condition) = Precisa ser uma condition válida do tibia, exemplo: condition = createConditionObject(CONDITION_POISON) setConditionParam(condition, CONDITION_PARAM_DELAYED, 1) addDamageCondition(condition, 10, 2000, -10) ]] copy = SpellTile:create(self.combat, self.effect, self.damage) copy.delay = self.delay copy.center = self.center copy.condition = condition return copy end function SpellTile:setSpellCenter() --[[ - Define que esse SpellTile é o centro da magia e retorna uma cópia do próprio SpellTile ]] copy = SpellTile:create(self.combat, self.effect, self.damage) copy.delay = self.delay copy.center = true return copy end function SpellTile:delay(mili) --[[ - Define um delay para lançar o spelltile e retorna uma cópia do próprio SpellTile Param: #1 (mili) = Tempo em milisegundos até lançar o spelltile ]] copy = SpellTile:create(self.combat, self.effect, self.damage) copy.delay = mili return copy end ----------===================------------- --[[ @ Spell System By Lwkass form OTServerBrasil ! @ Version: 1.0.0 - Any questions (msn): [email protected] ]] ----------===================------------- Spell = {} -- Construtor function Spell:create(spellwords, spelltype, options) --[[ - Cria uma nova spell Param: #1 (spellwords) = Palavras mágicas da spell #2 (spelltype) = Tipo da spell, é necessário utilizar os valores que estão no Spell-class.lua, por exemplo: SPELL_TYPE_DIRECTION (para spell com direção) ou SPELL_TYPE_AREA (para spell com area) #3 (options) = uma tabela com opções da spell, pode possuir esses valores (não é necessário colocar todos !): options = { level = 1, -- Level necessario maglevel = 1, -- Magic Level necessario mana = 100, -- Mana necessaria maxDistance = 3, -- Distancia máxima needWeapon = true, -- Se precisa estar usando alguma arma vocation = {1,2,3,4,5}, -- Vocações que podem usar a magia sex = 0, -- Sexo que pode usar a magia group = 2 -- Group minimo para usar a magia } ]] return setmetatable({ spellwords = spellwords, spelltype = spelltype, level = options and options.level or 0, maglevel = options and options.maglevel or 0, mana = options and options.mana or 0, options = options or {} }, { __index = self }) end -- Setters & Getters function Spell:setArea(area) --[[ - Define a area da spell Param: #1 (area) = Uma tabela que segue o modelo padrão de magias (exemplo: {{1,1,1},{1,1,1},{0,3,1}}) ]] self.area = area end function Spell:setOption(option, value) --[[ - Define as opções Param: #1 (option) = opção (exemplo: mana, level...) #2 (value) = valor ou novo valor ]] self.options = self.options or {} self.options[option] = value end function Spell:setMaxDistance(n) --[[ - Define a distancia máxima para usar a spell, pode-se definir direto através da tabela options também (maxDistance = distancia) Param: #1 (n) = Distancia máxima ]] self:setOption("maxDistance", n) end function Spell:setDefaultTile(tile) --[[ - Define a spellTile padrão para a spell (usa-se a marcação 1 na area) Param: #1 (tile) = precisa ser um spellTile ]] self.dftTile = tile end -- Others function Spell:getCreatureMark() --[[ - Procura e retorna a posição do tile que seja igual a 3 ou que esteja com a marcação tile.center = true ]] for y, b in pairs(self.area) do for x, d in pairs( do if ((type(d) == "table" and d.center) or d == 3) then return {x = x,y = y} end end end end -- Main Function function Spell:cast(cid, target) --[[ - Lança a magia Param: #1 (cid) = usuario da magia #2 (target) = alvo da magia (se necessário) ]] if (not isCreature(cid)) then return print('[spellClass - Warning / "'.. self.spellwords ..'"]: The cid must be a creature !') end -- Target checks if (target) then if (not isCreature(target)) then -- Target is not selected return doPlayerSendCancel(cid, "You need a target.") end if (self.spelltype == SPELL_TYPE_DIRECTION) then return print('[spellClass - Warning / "'.. self.spellwords ..'"]: Set the spelltype to SPELL_TYPE_AREA or remove the param target from the method \'cast\' !') end end -- Options for option, value in pairs(self.options) do if (target and option == "maxDistance" and type(value) == "number") then if (getDistanceBetween(getThingPos(cid), getThingPos(target)) > value) then return doPlayerSendCancel(cid, "Target too far.") end elseif (option == "needWeapon" and value) then if (getPlayerWeapon(cid).uid == 0) then return doPlayerSendCancel(cid, "You need be using a weapon.") end elseif (option == "vocation" and type(value) == "table") then if (not isInArray(value, getPlayerVocation(cid))) then return doPlayerSendCancel(cid, "Your vocation can't use this spell.") end elseif (option == "sex" and type(value) == "number") then if (not getPlayerSex(cid) == value) then return doPlayerSendCancel(cid, "Your sex can't use this spell.") end elseif (option == "group" and type(value) == "number") then if (not getPlayerGroupId(cid) >= value) then return doPlayerSendCancel(cid, "You can't use this spell.") end end end -- Cid checks if (isPlayer(cid)) then if (getPlayerLevel(cid) >= self.level) then if (getPlayerMagLevel(cid) >= self.maglevel) then if (getCreatureMana(cid) >= self.mana) then doCreatureAddMana(cid, -(self.mana)) if (SpellOptions.showAnimatedValues) then doSendAnimatedText(getThingPos(cid), self.mana, COLOR_PURPLE, (SpellOptions.onlySpellOwnerSeeAnimation and cid or false)) end else return doPlayerSendCancel(cid, "You need " .. self.mana .. " of mana to use this spell.") end else return doPlayerSendCancel(cid, "You need magic level " .. self.maglevel .. " or greater to use this spell.") end else return doPlayerSendCancel(cid, "You need level " .. self.level .. " or greater to use this spell.") end end -- Direction change if (self.spelltype == SPELL_TYPE_DIRECTION) then local dir = {[0] = 0, [1] = 270, [2] = 180, [3] = 90} self:setArea(rotateArea(self.area, dir[getCreatureLookDirection(cid)])) end -- Main local playerPos, player = getThingPos((target or cid)), self:getCreatureMark() local theArea = getPosByArea(self.area, {x=playerPos.x - player.x + 1, y=playerPos.y - player.y + 1, z=playerPos.z}) if (SpellOptions.sendCastSay) then doCreatureSay(cid, getCreatureName(cid) .. " casts " .. self.spellwords .. " !", TALKTYPE_MONSTER) end for y, b in pairs(self.area) do for x, _tile in pairs( do local tilePos = theArea[y][x] local tile = ((_tile == 1) and self.dftTile or _tile) if (tile ~= 0 and tile ~= 3) then if (tile.condition) then doAreaCombatCondition(cid, tilePos, {1}, tile.condition, tile.conditionEffect or CONST_ME_NONE) end addEvent(doAreaCombatHealth, tile.delay or -1, cid, tile.combat, tilePos, {1}, tile.damage.min, tile.damage.max, tile.effect) end end end return true end --[[ @ Spell System By Lwkass form OTServerBrasil ! @ Version: 1.0.0 - Any questions (msn): [email protected] ]] Caso seu server não carregue automaticamente o script, tente adicionar essa linha a qualquer outro arquivo lua da pasta lib: dofile('data/lib/Spell-class.lua') Pronto ! Aqui um exemplo de spell com esse sistema: function onCastSpell(cid, var) spell = Spell:create("spell", SPELL_TYPE_DIRECTION, {mana = 100, level = 10, maglevel = 5}) tile = SpellTile:create(COMBAT_PHYSICALDAMAGE, 15, {min = -1, max = -2}):delay(500) spell:setArea({ {tile, tile, tile}, {0, tile, 0}, {0, tile, 0}, {0, 3, 0} }) spell:cast(cid) end Usos: Você pode usar assim também a area se quiser: spell:setArea({ {tile:delay(10), tile, tile:delay(620)}, {0, tile:delay(100), 0}, {0, tile, 0}, {0, 3, 0} }) Cada spelltile vai aparecer no delay que estiver ali marcado e os que não estiverem aparecerão no delay = 500 (que está definido em 'tile'). ---- Para adicionar conditions pode ser feito assim: local condition = createConditionObject(CONDITION_FIRE) setConditionParam(condition, CONDITION_PARAM_DELAYED, 1) addDamageCondition(condition, 10, 2000, -10) spell:setArea({ {tile:delay(10), tile, tile:delay(620)}, {0, tile:delay(100):setCondition(condition), 0}, {0, tile, 0}, {0, 3, 0} }) Apenas o tile que está com o setCondition vai receber a condition ! ---- Para uma spell de area que é lançada em um alvo é necessário deixar a spell dessa maneira: function onCastSpell(cid, var) spell = Spell:create("spell", SPELL_TYPE_AREA, {mana = 100, level = 10, maglevel = 5}) tile = SpellTile:create(COMBAT_PHYSICALDAMAGE, 15, {min = -1, max = -2}):delay(500) spell:setArea({ {tile, tile, tile}, {0, tile, 0}, {0, tile:setSpellCenter(), 0} }) spell:cast(cid, getCreatureTarget(cid)) end ---- Mas caso você queira definir um spelltile como padrão para a spell (Sempre que usar o 1 na area esse spelltile será chamado), você pode fazer assim: function onCastSpell(cid, var) spell = Spell:create("spell", SPELL_TYPE_DIRECTION, {mana = 100, level = 10, maglevel = 5}) spell:setDefaultTile(SpellTile:create(COMBAT_ENERGYDAMAGE, 30, {min = -1, max = -2})) -- Define o tile padrão tile = SpellTile:create(COMBAT_PHYSICALDAMAGE, 15, {min = -1, max = -2}):delay(500) spell:setArea({ {tile, tile, tile}, {1, 1, 1}, {1, tile, 1}, {0, 3, 0} }) spell:cast(cid) end Então sempre que usar o numero 1 na area ele será substituido pelo spelltile padrão ! Todas as funções estão comentadas, em caso de dúvida sobre como usar uma função, leia o código-fonte ou pergunte aqui mesmo
  11. The Zodiac ~

    ┌──────────────────────────────────────────────────┐ │Nome: Sign of Zodiac │Versão do script: 1.0.0 │Tipo do script: Sistema (Creature Script, Talkaction e Lib) │Servidor Testado: The Forgotten Server 0.4.0 Doomed Elderberry │Autor: Lwkass └──────────────────────────────────────────────────┘ Por mais que o feedback do meu ultimo post (Lib para criar Spell) tenha sido pouco, vou postar mais um script... É um sistema de Signo do Zodíaco, onde cada signo da um bônus (por enquanto apenas 2), a ideia está bem inicial, mas pretende continua-lo. - Características: - Explicando: Para escolher o signo o player deve colocar o dia e o mês do aniversário e o sistema automaticamente coloca o signo, comando: Só para deixar claro como o sistema funciona, usando de exemplo o signo de Leão (Leo) que é do elemento Fire: * Se receber um dano do elemento Fire, absorve 5% (modificável) do dano total, ou seja, o dano seria igual a 95% do que seria (dano absorvido indicado por animatedText). * Se matar um monstro que tenha uma defesa contra Fire maior que 0% ganha bônus de 10% (modificável) da exp total, ou seja, ganha-se 110% (exp extra indicada por animatedText). Se o signo fosse do elemento Earth, então seria a mesma coisa só que com o elemento Earth, se fosse Ice ou Lighting a mesma coisa. Pode-se usar o comando !zodiac info para informações. - Script: Primeiro, na pasta data/lib (caso a pasta não exista, crie) do seu servidor crie um arquivo Lua com o nome zodiac-Lib.lua (Lib com maiúscula) e salve com isso dentro: --[[ Sign of Zodiac System v1.0.0 by: Lwkass ([email protected]) ]] Zodiac = { constant = { OPTION_PERCENT_BLOCK = 5, -- In Percent OPTION_EXTRA_EXP_RATE = 10, -- In Percent STORAGE_SIGN = 16161, elements = { ["Fire"] = { combat = COMBAT_FIREDAMAGE, color = COLOR_ORANGE }, ["Earth"] = { combat = COMBAT_EARTHDAMAGE, color = COLOR_LIGHTGREEN }, ["Lighting"] = { combat = COMBAT_ENERGYDAMAGE, color = COLOR_TEAL }, ["Ice"] = { combat = COMBAT_ICEDAMAGE, color = COLOR_LIGHTBLUE } } }, signs = { ["Aries"] = { date = {"21/03", "20/04"}, element = "Fire" }, ["Taurus"] = { date = {"21/04", "20/05"}, element = "Earth" }, ["Gemini"] = { date = {"21/05", "20/06"}, element = "Lighting" }, ["Cancer"] = { date = {"21/06", "21/07"}, element = "Ice" }, ["Leo"] = { date = {"22/07", "22/08"}, element = "Fire" }, ["Virgo"] = { date = {"23/08", "22/09"}, element = "Earth" }, ["Libra"] = { date = {"23/09", "22/10"}, element = "Lighting" }, ["Scorpio"] = { date = {"23/10", "21/11"}, element = "Ice" }, ["Sagittarius"] = { date = {"22/11", "21/12"}, element = "Fire" }, ["Capricorn"] = { date = {"22/12", "20/01"}, element = "Earth" }, ["Aquarius"] = { date = {"21/01", "19/02"}, element = "Lighting" }, ["Pisces"] = { date = {"20/02", "20/03"}, element = "Ice" } }, getSignInfo = function (signName) return Zodiac.signs[signName] end, set = function (cid, signName) setPlayerStorageValue(cid, Zodiac.constant.STORAGE_SIGN, signName) end, get = function (cid) return getPlayerStorageValue(cid, Zodiac.constant.STORAGE_SIGN), Zodiac.getSignInfo(getPlayerStorageValue(cid, Zodiac.constant.STORAGE_SIGN)) or 0 end, getElement = function (cid) return Zodiac.getSignInfo(getPlayerStorageValue(cid, Zodiac.constant.STORAGE_SIGN)).element end, getSign = function (cid, day, month) for sign, info in pairs(Zodiac.signs) do _, _, beginDay, beginMonth = info.date[1]:find("(%d+)/(%d+)") _, _, endDay, endMonth = info.date[2]:find("(%d+)/(%d+)") beginDay, beginMonth, endDay, endMonth = tonumber(beginDay), tonumber(beginMonth), tonumber(endDay), tonumber(endMonth) if ((month == beginMonth and day >= beginDay) or (month == endMonth and day <= endDay)) then return sign, info end end end } Agora na pasta data/creaturescripts/scripts: No arquivo login.lua adicione isso antes do return: -- Zodiac registerCreatureEvent(cid, "zodiacKill") registerCreatureEvent(cid, "zodiacStats") if (getPlayerLastLogin(cid) <= 0 or getPlayerStorageValue(cid, 16160) == 1) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Please, when is your birthday date ? (Example: !zodiac day/month = !zodiac 1/2, !zodiac 23/7,...)") setPlayerStorageValue(cid, 16160, 1) -- Talk state else doPlayerSetSpecialDescription(cid, ", sign of " .. getPlayerStorageValue(cid, 16161)) end E crie esses arquivos: zodiacKill.lua dofile('data/lib/zodiac-Lib.lua') function getMonsterPath(monstername) f = io.open ("data/monster/monsters.xml", 'r') for line in f:lines() do _, _, name, path, file_name = string.find(line, '<monster name="(.+)" file="(.+)/(.+).xml"/>') if (name and path and file_name and name:lower() == monstername:lower()) then f:close() return path .. "/" .. file_name .. ".xml" end end end function getMonsterElementDefense(monstername, element) f = io.open ("data/monster/" .. getMonsterPath(monstername), 'r') for line in f:lines() do if (string.find(line, '</elements>')) then break end _, _, n = string.find(line, '<element '.. element:lower() ..'Percent="([-%d]+)"/>') if (n) then f:close() return tonumber(n) end end f:close() return 0 end ------- function onKill(cid, target, lastHit) if (isMonster(target) and getMonsterElementDefense(getCreatureName(target), (Zodiac.getElement(cid) == "Lighting" and "Energy" or Zodiac.getElement(cid))) > 0) then local exp_bonus = math.ceil(getMonsterInfo(getCreatureName(target)).experience * (Zodiac.constant.OPTION_EXTRA_EXP_RATE/100)) doSendAnimatedText(getThingPos(cid), exp_bonus, COLOR_GREY) doPlayerAddExperience(cid, exp_bonus) end return true end zodiacStats.lua dofile('data/lib/zodiac-Lib.lua') function onStatsChange(cid, attacker, type, combat, value) playerSign = Zodiac.get(cid) if (combat == Zodiac.constant.elements[Zodiac.getElement(cid)].combat) then valuem = math.ceil(value*(Zodiac.constant.OPTION_PERCENT_BLOCK/100)) doCreatureAddHealth(cid, valuem) doSendAnimatedText(getThingPos(cid), "+"..valuem, Zodiac.constant.elements[Zodiac.getElement(cid)].color) end return true end Certo, agora no arquivo data/creaturescripts/creaturescripts.xml, adicione isso: <event type="statschange" name="zodiacStats" event="script" value="zodiacStats.lua"/> <event type="kill" name="zodiacKill" event="script" value="zodiacKill.lua"/> Na pasta data/talkactions/scripts, adicione um arquivo Lua com o nome de zodiacTalk.lua: dofile('data/lib/zodiac-Lib.lua') function onSay(cid, words, param, channel) if (param:len() == 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can use '!zodiac day/month' or '!zodiac info'") return true end playerSign, Info = Zodiac.get(cid) if (type(playerSign) == "string" and param:lower() == "info") then doPlayerPopupFYI(cid, [[ Zodiac Informations ~ ------------------------------- * Sign: ]] .. playerSign .. [[ * Element: ]] .. Info.element .. [[ * Bonus: +]] .. Zodiac.constant.OPTION_EXTRA_EXP_RATE .. [[% experience of ]] .. Zodiac.getElement(cid) .. [[ monsters +]] .. Zodiac.constant.OPTION_PERCENT_BLOCK .. [[% of defense in attacks with ]] .. Zodiac.getElement(cid) .. [[ element ]]) elseif (getPlayerStorageValue(cid, 16160) == 1) then _, _, day, month = string.find(param, "(%d+)/(%d+)") day, month = tonumber(day), tonumber(month) if (day and month and day > 0 and day <= 31 and month > 0 and month <= 12) then Zodiac.set(cid, Zodiac.getSign(cid, day, month)) playerSign = Zodiac.get(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param) doSendMagicEffect(getThingPos(cid), math.random(28, 30)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You sign of zodiac is " .. playerSign .. " which is of element " .. Zodiac.getElement(cid) .. " !") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can see more information saying '!zodiac info', remember this...") setPlayerStorageValue(cid, 16160, -1) else doPlayerSendCancel(cid, "You put a invalid date.") end end return true end Coloque essa tag no arquivo data/talkactions/talkactions.xml <talkaction words="!zodiac" event="script" value="zodiacTalk.lua"/> ChangeLog: E é isso ! Qualquer dúvida, sugestão, critica só dizer ^^
  12. Limit Break System (v2) !

    ┌──────────────────────────────────────────────────┐ │Nome: Limit Break │Versão do script: 2.0.0 │Tipo do script: Creature Script │Servidor Testado: The Forgotten Server 0.4 Doomed Elderberry │Autor: Lwkass └──────────────────────────────────────────────────┘ O Script é simples e baseado em um sistema do FF7, a cada hit que o player levar, ele carrega uma porcentagem de limit break e quando chegar a 100% o próximo hit melee (melee = ataque normal) liberará o Limit Break. Caracteristicas: Scripts: Na pasta data/creaturescripts/scripts, salve os dois scripts abaixo: limitbreaker.lua ------------------------------------------------ -- Limit Breaker System -- By: Lwkass from OTServBrasil dofile("data/lib/limitBreakerLib.lua") function onStatsChange(cid, attacker, type, combat, value) if (combat == COMBAT_HEALING) then return true end multiplier = (combat == COMBAT_PHYSICALDAMAGE and 1 or 1.5) limitBreak = LimitBreak:get(cid) if (limitBreak.percent < 100) then limitBreak(limitBreak.percent + math.ceil(((value*100)/(getCreatureMaxHealth(cid)*0.7)) * multiplier)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You charged +' .. math.ceil(((value*100)/(getCreatureMaxHealth(cid)*0.7)) * multiplier) .. '% of Limit Break [' .. limitBreak.percent .. '%/100%]' .. (isCreature(attacker) and (' by a attack of ' .. getCreatureName(attacker)) or '') .. '.') else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your Limit Break is full !") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) end return true end -- By: Lwkass from OTServBrasil -- limitbreaker_release.lua ------------------------------------------------ -- Limit Breaker System -- By: Lwkass from OTServBrasil dofile("data/lib/limitBreakerLib.lua") function onAttack(cid, target) limitBreak = LimitBreak:get(cid) if (limitBreak.percent >= 100) then if (getDistanceBetween(getThingPos(cid), getThingPos(target)) <= 1) then doCreatureSay(cid, "Arghh!", TALKTYPE_MONSTER) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) limitBreak:cast(target) limitBreak(0) limitBreak:addExp(1) else doPlayerSendDefaultCancel(cid, RETURNVALUE_DESTINATIONOUTOFREACH) end end return true end -- By: Lwkass from OTServBrasil Agora no arquivo creaturescripts.xml da pasta data/creaturescripts, adicione: <event type="statschange" name="limitbreaker" event="script" value="limitbreaker.lua"/> <event type="attack" name="limitbreaker_release" event="script" value="limitbreaker_release.lua"/> Aproveitando, na pasta data/creaturescripts/scripts, no arquivo login.lua do seu servidor, adicione essas linhas antes do return: registerCreatureEvent(cid, "limitbreaker") registerCreatureEvent(cid, "limitbreaker_release") Só mais uma coisinha, na pasta data/lib (caso não exista a pasta lib, crie) crie um arquivo com o nome limitBreakerLib.lua e salve isso dentro: ------------------------------------------------ -- Limit Breaker System -- By: Lwkass from OTServBrasil local config = { OPTION_CAST_SPELL = false, -- Cast spell when limit break is full EXP_RATING = 1, -- Exp rating of limit break exp || (exp * rating). STORAGE_LIMIT_PERCENT = 13015, STORAGE_LIMIT_LEVEL = 13016, STORAGE_LIMIT_EXP = 13017 } ------------------------------------------------ LimitBreak = {} function LimitBreak:get(cid) _lb = setmetatable({ player = cid, level = getPlayerStorageValue(cid, config.STORAGE_LIMIT_LEVEL), percent = getPlayerStorageValue(cid, config.STORAGE_LIMIT_PERCENT) }, { __index = self, __call = function(t, p) if (p > 100) then p = 100 end rawset(t, 'percent', p); setPlayerStorageValue(cid, config.STORAGE_LIMIT_PERCENT, p) end }) if (config.OPTION_CAST_SPELL) then -- spell limitBreak_spell = Spell:create("Limit Break", SPELL_TYPE_AREA, { maxDistance = 1 }) local weapon = (getPlayerWeapon(cid).uid > 0 and (((getItemInfo(getPlayerWeapon(cid).itemid)["attack"]) + getItemInfo(getPlayerWeapon(cid).itemid)["extraAttack"])*0.8) or 1) limitBreak_spell:setDefaultTile(SpellTile:create(COMBAT_PHYSICALDAMAGE, 34, {min = -(getPlayerLevel(cid)*3.6 + weapon), max = -(getPlayerLevel(cid)*4.9 + weapon)})) limitBreak_spell:setArea({ {1, 1, 1}, {1, 3, 1}, {1, 1, 1} }) _lb:setSpell(limitBreak_spell) end return _lb end function LimitBreak:getSpell() return self.spell end function LimitBreak:setSpell(spell) self.spell = spell end function LimitBreak:cast(target) if (self:getLevel() < 0) then self:setLevel(1) end if (self:getExp() < 0) then self:setExp(0) end if (config.OPTION_CAST_SPELL and self:getSpell()) then self:getSpell():cast(self.player) else local weapon = (getPlayerWeapon(self.player).uid > 0 and (((getItemInfo(getPlayerWeapon(self.player).itemid)["attack"]) + getItemInfo(getPlayerWeapon(self.player).itemid)["extraAttack"])*0.8) or 0) doTargetCombatHealth(self.player, target, COMBAT_PHYSICALDAMAGE, -(getPlayerLevel(self.player) * 2.5 + weapon + self:getLevel() * 3.6), -(getPlayerLevel(self.player) * 3.5 + weapon + self:getLevel() * 4.9), 34) end end function LimitBreak:setLevel(lvl) setPlayerStorageValue(self.player, config.STORAGE_LIMIT_LEVEL, lvl) end function LimitBreak:getLevel() return getPlayerStorageValue(self.player, config.STORAGE_LIMIT_LEVEL) end function LimitBreak:addLevel(n) n = n or 1; self:setLevel(self:getLevel() + n) end function LimitBreak:setExp(xp) setPlayerStorageValue(self.player, config.STORAGE_LIMIT_EXP, xp) end function LimitBreak:getExp() return getPlayerStorageValue(self.player, config.STORAGE_LIMIT_EXP) end function LimitBreak:addExp(xp) xp = (xp or 1) * config.EXP_RATING self:setExp(self:getExp() + xp) if (self:getExp() >= (self:getLevel() * 2)) then self:setExp(0) self:addLevel() doPlayerSendTextMessage(self.player, MESSAGE_EVENT_ORANGE, "Your Limit Break is level " .. self:getLevel() .. " now.") doSendMagicEffect(getThingPos(self.player), CONST_ME_MAGIC_GREEN) end end -- By: Lwkass from OTServBrasil Fiz uma lib pra ficar mais organizado. A spell deve ser definida no arquivo limitBreakerLib.lua onde está marcado "--spell", funciona apenas com a minha Lib de Spell, mas, por padrão está definida uma magia que pega em volta do player (foto abaixo). Precisa também ir na parte das configurações do Limit Break e definir OPTION_CAST_SPELL como true (na linha 6 do limitBreakerLib.lua) ---- Screenshot: Mensagem quando se leva algum hit. Limit Break como Dano Melee. Limit Break como Spell. ChangeLog: Prontinho Qualquer dúvida/sugestão só falar Ta simplesinho o sistema, mas é provável que eu adicione mais coisas depois
  13. Email System v1.3.9

    -- Name: E-mail System -- Version: 1.3.9 -- Credits: Conde2 -- Tested: TFS 0.3.4(5) Crying Damson _________________________ Sobre: Este é um simples sistema de e-mails, que te possibilita mandar mensagens para todos os players, ate os offiline. Necessário criar uma pasta chama "email" dentro da pasta DATA OBS: NECESSITA DA LIB EXHAUSTION DO TFS !! Comandos: Código: Agora vamos ao que interessa... Abra a pasta data/talkactions/script e adicione isso em um arquivo lua chamado email.lua. Dentro desse arquivo adicione esse Script: EMAIL_BLOCK = 6364 EMAIL_ANTI_SPAWN = 15 EMAIL_MIN_MENSSAGE = 10 EMAIL_MAX_MENSSAGE = 100 EMAIL_STORAGE_ANTI_SPAWN = 6365 function onSay(cid, words, param) if words == "!sendemail" then if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param. Please use: !sendemail name, menssage") return TRUE end local t = string.explode(param, ",") if(not t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "No menssage specified.") return TRUE end if (getPlayerGUIDByName(t[1]) == 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " not exist.") return TRUE end if (string.len(t[2]) <= EMAIL_MIN_MENSSAGE) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't send this menssage, because so short.") return TRUE end if (string.len(t[2]) > EMAIL_MAX_MENSSAGE) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't send this menssage, because so long.") return TRUE end local id = getPlayerIdByName(""..t[1].."") if (getDataBaseStorage(id,EMAIL_BLOCK) == 1) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, the player: " .. t[1] .. " has been blocked yours menssages.") return TRUE end if exhaustion.check(cid, EMAIL_STORAGE_ANTI_SPAWN) == TRUE then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Please wait a ".. exhaustion.get(cid, EMAIL_STORAGE_ANTI_SPAWN) .." secondes to send other email.") return TRUE end local directory = "data//email//".. t[1] ..".txt" if onFile("exist", directory) == FALSE then onFile("create", directory, "BY: ".. getCreatureName(cid) .." [" .. os.date("%d/%m/%Y %H:%M:%S") .. "] ".. t[2] .."\n") doPlayerSendTextMessage(cid, 22, "You have send to ".. t[1] .." this menssage: " .. t[2] .. ".") exhaustion.make(cid, EMAIL_STORAGE_ANTI_SPAWN, EMAIL_ANTI_SPAWN) else onFile("update", directory, "BY: ".. getCreatureName(cid) .." [" .. os.date("%d/%m/%Y %H:%M:%S") .. "] ".. t[2] .."") doPlayerSendTextMessage(cid, 22, "You have send to ".. t[1] .." this menssage: " .. t[2] .. "") exhaustion.make(cid, EMAIL_STORAGE_ANTI_SPAWN, EMAIL_ANTI_SPAWN) end local target = getPlayerByNameWildcard(""..t[1].."") if(target == 0) then target = getCreatureByName(""..t[1].."") if(target == 0) then return TRUE end end local tmp = getCreaturePosition(target) if (isOnline(""..t[1].."") == TRUE) then addEvent(doSendAnimatedText, 1, tmp, "Menssage!", TEXTCOLOR_PURPLE) addEvent(doSendAnimatedText, 1000, tmp, "Menssage!", TEXTCOLOR_PURPLE) addEvent(doSendAnimatedText, 2000, tmp, "Menssage!", TEXTCOLOR_PURPLE) doPlayerSendTextMessage(target, 19, " A new menssage arrived, look your email box. (!checkemail)!!") end elseif words == "!checkemail" then local name = getCreatureName(cid) local directory = "data//email//".. name ..".txt" if onFile("exist", directory) == FALSE or onFile("load", directory) == nil then doPlayerSendTextMessage(cid, 22, "Sorry you don't have any menssage.") else for line in io.lines(directory) do doShowTextDialog(cid,7528, "You have menssages: \n \n ".. line .." \n \n \n For look the next menssage click in the button: OK") end end elseif words == "!deleteemail" then local name = getCreatureName(cid) local directory = "data//email//".. name ..".txt" if onFile("exist", directory) == TRUE and onFile("load", directory) ~= nil then onFile("delete", directory) onFile("erase", directory) doPlayerSendTextMessage(cid, 22, "Sucessful!! You have deleted all yours menssages !!") else doPlayerSendTextMessage(cid, 22, "Sorry you don't have any menssage to delete.") end elseif words == "!blockemail" then setPlayerStorageValue(cid, EMAIL_BLOCK, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You has been bloked your e-mail. Please relog to make effect.") elseif words == "!unblockemail" then setPlayerStorageValue(cid, EMAIL_BLOCK, 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You has been unbloked your e-mail. Please relog to make effect.") end end Agora vá em data/global.lua Ou em data/lib/data.lua e adicione isso na última linha: function isOnline(name) -- by mock local players = getOnlinePlayers() name = string.lower(name) for i, player in ipairs(players) do player = string.lower(player) if name == player then return TRUE end end return FALSE end function getDataBaseStorage(pid,value_id) -- by Conde2 local coisa = db.getResult("SELECT * FROM `player_storage` WHERE `player_id` = ".. pid .." AND `key` ="..value_id..";") if coisa:getID() == -1 then return -1 else return coisa:getDataInt("value") end end function onFile(type, directory, content) -- by Conde2 local master = 0 if type == "create" then local file = io.open(directory, "w") master = file:write(content) file:close() elseif type == "erase" then local file = io.open(directory, "w+") master = file:write("") file:close() elseif type == "load" then local file = io.open(directory,"r") master = file:read() file:close() elseif type == "update" then local file = io.open(directory, "a+") master = file:write(content.."\n") file:close() elseif type == "return" then local file = io.open(directory, "a+") master = file:write(" "..content) file:close() elseif type == "delete" then os.remove(directory) elseif type == "exist" then file = io.open(directory) if file == nil then master = FALSE else master = TRUE end end return master end Tags: E finalmente vá para data/talkactions/talkactions.xml Abra ele com um bloco de notas e adicione isso: <talkaction words="!sendemail" event="script" value="email.lua"/> <talkaction words="!deleteemail" event="script" value="email.lua"/> <talkaction words="!checkemail" event="script" value="email.lua"/> <talkaction words="!blockemail" event="script" value="email.lua"/> <talkaction words="!unblockemail" event="script" value="email.lua"/> Configurando: Para configurar basta ir em data/talkactions/email.lua e editar isso: EMAIL_BLOCK = 6364 EMAIL_ANTI_SPAWN = 15 EMAIL_MIN_MENSSAGE = 10 EMAIL_MAX_MENSSAGE = 100 EMAIL_STORAGE_ANTI_SPAWN = 6365 # Storage value para bloquear / desbloquear o email. # O tempo que o player terá que esperar para mandar outra mensagem (Em segundos) # Quantas letras no mínimo a mensagem tem que ter para poder ser enviada. # Quantas letras no máximo deverá ter a menssagem. # Storage para definir o exausted !! NÃO AUTORIZO A POSTAGEM DESSE SCRIPT EM QUALQUER OUTRO FÓRUM SEM MINHA AUTORIZAÇÃO
  14. Order System (Pokemon)

    Informações sobre o script: • Nome: Sistema de Order (controlar o pokemon), composto por uma biblioteca e uma action. • Autor: mastercraft • Versão do Tibia/Server: Testado em TFS 0.36pl1 (Tibia 8.54). Acredito que o melhor sistema de order que tenha aparecido na net foi o meu, enfim, eu melhorei o sistema de ordenar o pokemon andar até tal lugar. Antes era bem limitado, agora o sistema ficou bem parecido com aquele do SvkE, feito apenas em lua. Primeiramente, crie um arquivo chamado move.lua na pasta data/lib. Se você usa a mesma lib, mas a da versão do pokemon dash, substitua, pois esta é atualizada. Coloque isso dentro do arquivo: function doPushCreature(uid,direction,distance,time) if isCreature(uid) == TRUE then local rand = (2*math.random(0,1))-1 local rand2 = math.random(-1,0) if direction == 0 then signal = {0,rand,-rand,rand,-rand,0,-1,-1,-1,0,0,0} elseif direction == 1 then signal = {1,1,1,0,0,0,0,rand,-rand,rand,-rand,0} elseif direction == 2 then signal = {0,rand,-rand,rand,-rand,0,1,1,1,0,0,0} elseif direction == 3 then signal = {-1,-1,-1,0,0,0,0,rand,-rand,rand,-rand,0} elseif direction == 4 then signal = {-1,rand2,(-rand2)-1,0,1,rand2+1,rand2,0} elseif direction == 5 then signal = {1,-rand2,-((-rand2)-1),0,1,rand2+1,rand2,0} elseif direction == 6 then signal = {-1,rand2,(-rand2)-1,0,-1,(-rand2)-1,rand2,0} else signal = {1,-rand2,-((-rand2)-1),0,-1,(-rand2)-1,rand2,0} end local pos = getThingPos(uid) nsig = #signal nvar = 0 repeat nvar = nvar+1 newpos = {x=pos.x+(signal[nvar]),y=pos.y+(signal[(nsig/2)+nvar]),z=pos.z} newtile = {x=newpos.x,y=newpos.y,z=newpos.z,stackpos=0} until getTileThingByPos(newtile).uid ~= 0 and hasProperty(getTileThingByPos(newtile).uid,3) == FALSE and queryTileAddThing(uid,newpos) == 1 or nvar == (nsig/2) if distance == nil or distance == 1 then doTeleportThing(uid,newpos,TRUE) else distance = distance-1 doTeleportThing(uid,newpos,TRUE) if time ~= nil then addEvent(doPushCreature,time,uid,direction,distance,time) else addEvent(doPushCreature,500,uid,direction,distance ,500) end end end end function walkTo(cid, direction, finalpos) if not isCreature(cid) then return false end if isWalkable(getPosByDir(getThingPos(cid), direction), cid, 0, 0) and direction <= 3 then doPushCreature(cid, direction, 1, 0) return true end if direction >= 4 then if direction == 4 then if math.random(1,2) == 1 then if isWalkable(getPosByDir(getThingPos(cid), 3), cid, 0, 0) then newdir = 3 else newdir = 2 end else if isWalkable(getPosByDir(getThingPos(cid), 2), cid, 0, 0) then newdir = 2 else newdir = 3 end end elseif direction == 5 then if math.random(1,2) == 1 then if isWalkable(getPosByDir(getThingPos(cid), 2), cid, 0, 0) then newdir = 2 else newdir = 1 end else if isWalkable(getPosByDir(getThingPos(cid), 1), cid, 0, 0) then newdir = 1 else newdir = 2 end end elseif direction == 6 then if math.random(1,2) == 1 then if isWalkable(getPosByDir(getThingPos(cid), 0), cid, 0, 0) then newdir = 0 else newdir = 3 end else if isWalkable(getPosByDir(getThingPos(cid), 3), cid, 0, 0) then newdir = 3 else newdir = 0 end end elseif direction == 7 then if math.random(1,2) == 1 then if isWalkable(getPosByDir(getThingPos(cid), 1), cid, 0, 0) then newdir = 1 else newdir = 0 end else if isWalkable(getPosByDir(getThingPos(cid), 0), cid, 0, 0) then newdir = 0 else newdir = 1 end end end doPushCreature(cid, newdir, 1, 0) return true end if direction <= 3 and not isWalkable(getPosByDir(getThingPos(cid), direction), cid, 0, 0) then if direction == 0 then if getDirectionTo(getThingPos(cid), finalpos) == 6 then if isWalkable(getPosByDir(getThingPos(cid), 3), cid, 0, 0) then newdir = 3 else newdir = 6 end elseif getDirectionTo(getThingPos(cid), finalpos) == 7 then if isWalkable(getPosByDir(getThingPos(cid), 1), cid, 0, 0) then newdir = 1 else newdir = 7 end end elseif direction == 1 then if getDirectionTo(getThingPos(cid), finalpos) == 7 then if isWalkable(getPosByDir(getThingPos(cid), 0), cid, 0, 0) then newdir = 0 else newdir = 7 end elseif getDirectionTo(getThingPos(cid), finalpos) == 5 then if isWalkable(getPosByDir(getThingPos(cid), 2), cid, 0, 0) then newdir = 2 else newdir = 5 end end elseif direction == 2 then if getDirectionTo(getThingPos(cid), finalpos) == 4 then if isWalkable(getPosByDir(getThingPos(cid), 3), cid, 0, 0) then newdir = 3 else newdir = 4 end elseif getDirectionTo(getThingPos(cid), finalpos) == 5 then if isWalkable(getPosByDir(getThingPos(cid), 1), cid, 0, 0) then newdir = 1 else newdir = 5 end end elseif direction == 3 then if getDirectionTo(getThingPos(cid), finalpos) == 4 then if isWalkable(getPosByDir(getThingPos(cid), 2), cid, 0, 0) then newdir = 2 else newdir = 4 end elseif getDirectionTo(getThingPos(cid), finalpos) == 6 then if isWalkable(getPosByDir(getThingPos(cid), 0), cid, 0, 0) then newdir = 0 else newdir = 6 end end end doPushCreature(cid, newdir, 1, 0) return true end doPushCreature(cid, direction, 1, 0) end function markPos(sid, pos) if not isCreature(sid) then return end setPlayerStorageValue(sid, 145, pos.x) setPlayerStorageValue(sid, 146, pos.y) setPlayerStorageValue(sid, 147, pos.z) end function getMarkedPos(sid) if not isCreature(sid) then return end local xx = getPlayerStorageValue(sid, 145) local yy = getPlayerStorageValue(sid, 146) local zz = getPlayerStorageValue(sid, 147) return {x = xx, y = yy, z = zz} end function getOwnerPos(sid) if not isCreature(sid) then return end local xx = getPlayerStorageValue(sid, 148) local yy = getPlayerStorageValue(sid, 149) local zz = getPlayerStorageValue(sid, 150) return {x = xx, y = yy, z = zz} end function markOwnerPos(sid, pos) if not isCreature(sid) then return end setPlayerStorageValue(sid, 148, pos.x) setPlayerStorageValue(sid, 149, pos.y) setPlayerStorageValue(sid, 150, pos.z) end function recheck(sid) if not isCreature(sid) then return end if getOwnerPos(sid).x ~= getThingPos(getCreatureMaster(sid)).x or getOwnerPos(sid).y ~= getThingPos(getCreatureMaster(sid)).y then doChangeSpeed(sid, -getCreatureSpeed(sid)) doChangeSpeed(sid, getCreatureBaseSpeed(sid)) return true end addEvent(recheck, 120, sid) end function goThere(sid, thepos) if not isCreature(sid) then return true end if thepos.x ~= getMarkedPos(sid).x or thepos.y ~= getMarkedPos(sid).y then return true end if isCreature(getCreatureTarget(getCreatureMaster(sid ))) then doChangeSpeed(sid, -getCreatureSpeed(sid)) doChangeSpeed(sid, getCreatureBaseSpeed(sid)) return true end if getThingPos(sid).x == getMarkedPos(sid).x and getThingPos(sid).y == getMarkedPos(sid).y then addEvent(recheck, 350, sid) return true end if getOwnerPos(sid).x ~= getThingPos(getCreatureMaster(sid)).x or getOwnerPos(sid).y ~= getThingPos(getCreatureMaster(sid)).y then doChangeSpeed(sid, -getCreatureSpeed(sid)) doChangeSpeed(sid, getCreatureBaseSpeed(sid)) return true end doChangeSpeed(sid, - getCreatureSpeed(sid)) doChangeSpeed(sid, getCreatureBaseSpeed(sid)) walkTo(sid, getDirectionTo(getThingPos(sid), getMarkedPos(sid)), getMarkedPos(sid)) doChangeSpeed(sid, - getCreatureSpeed(sid)) addEvent(goThere, 1000 - (2.2 * (getCreatureBaseSpeed(sid))), sid, getMarkedPos(sid)) end Agora, você precisa de um item que seja Useable, ou seja, ao apertar o botão direito, você tem a opção use with... A tag você deve colocar no actions.xml (data/actions): <action itemid="[b][color=red]xxxx[/color][/b]" event="script" value="move.lua" allowfaruse="1"/> sendo xxxx o id do item que você quer ter como o "order". Agora você cria uma arquivo chamado move.lua em data/actions/scripts, e coloque isso dentro: function onUse(cid, item, frompos, item2, topos) if getPlayerItemCount(cid, item2.itemid) >= 1 then return false end if #getCreatureSummons(cid) == 0 then return true end doPlayerSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", go there!", 1) doChangeSpeed(getCreatureSummons(cid)[1], -getCreatureSpeed(getCreatureSummons(cid)[1])) markPos(getCreatureSummons(cid)[1], topos) markOwnerPos(getCreatureSummons(cid)[1], getThingPos(cid)) addEvent(goThere, 500, getCreatureSummons(cid)[1], topos) return true end Para quem usa o sistema de order do pokemon dash, substitua o arquivo order.lua por este: local nao = {'4820', '4821', '4822', '4823', '4824', '4825', '1395', '1389', '1391', '1393', '460'} local direction = {'4', '5', '6', '7'}[/color] [color=royalblue] -- ridefly local ridefly = {'Crystal Onix', 'Venusaur', 'Ninetales', 'Arcanine', 'Ponyta', 'Rapidash', 'Doduo', 'Dodrio', 'Onix', 'Rhyhorn', 'Tauros', 'Porygon', 'Aerodactyl', 'Dragonite', 'Charizard', 'Pidgeot', 'Fearow', 'Moltres', 'Zapdos', 'Articuno', 'Mew', 'Mewtwo'} local ride = {'Crystal Onix', 'Venusaur', 'Ninetales', 'Arcanine', 'Ponyta', 'Rapidash', 'Doduo', 'Dodrio', 'Onix', 'Rhyhorn', 'Tauros'} local fly = {'Porygon', 'Aerodactyl', 'Dragonite', 'Charizard', 'Pidgeot', 'Fearow', 'Zapdos', 'Moltres', 'Articuno', 'Mew', 'Mewtwo'} local flys = { [265] = {229, 2300, 350}, -- moltres [283] = {230, 2100, 350}, -- artic [199] = {224, 2600, 350}, -- zapdos [9] = {232, 2200, 525}, -- 1000 [34] = {233, 2200, 525},-- two [210] = {221, 1300, 410},-- nite [80] = {222, 900, 375}, -- geot [17] = {226, 800, 400}, -- fearow [10] = {227, 1100, 410}, -- aero [67] = {216, 1000, 410}, -- chari [97] = {316, 600, 440}, -- porygon } local rides = {[/color] [color=royalblue] [93] = {128, 780, 400}, -- tauros [114] = {129, 800, 375}, -- kyuubi [220] = {130, 800, 395}, -- rapid [16] = {131, 410, 500}, -- ponyta [77] = {132, 400, 510}, -- rhyhorn [88] = {12, 900, 390}, -- arcan [493] = {492, 1000, 360}, -- shiny arca [496] = {494, 420, 420}, -- shiny vneu [292] = {293, 480, 430}, -- cristal onix [248] = {126, 450, 450}, -- onix [22] = {134, 390, 450}, -- venu [120] = {133, 750, 380}, -- dodrio [26] = {135, 420, 500}, -- doduo } local bolas = {'2222', '2223', '2224'} local ultra = {'2220', '2221', '2227'} local etudao = 9506 local mind = 9507[/color] [color=royalblue] -- ROCK SMASH[/color] [color=royalblue] local rocksmash = {'Sandshrew', 'Sandslash', 'Diglett', 'Dugtrio', 'Primeape', 'Machop', 'Machoke', 'Machamp', 'Geodude', 'Graveler', 'Golem' , 'Onix', 'Cubone', 'Marowak', 'Rhyhorn', 'Rhydon', 'Kangaskhan', 'Tauros', 'Snorlax', 'Poliwrath'} local erockmash = 9502 local cdrocksmash = 5 -- ROCK SMASH -- DIG[/color] [color=royalblue] local digholes = {'468', '481', '483'} local dig = {'Raticate', 'Sandshrew', 'Sandslash', 'Diglett', 'Dugtrio', 'Primeape', 'Machop', 'Machoke', 'Machamp', 'Geodude', 'Graveler', 'Golem' , 'Onix', 'Cubone', 'Marowak', 'Rhyhorn', 'Rhydon', 'Kangaskhan', 'Tauros', 'Snorlax'} local edig = 9504 local cddig = 5 -- DIG -- CUT[/color] [color=royalblue] local cut = {'Raticate', 'Bulbasaur', 'Ivysaur', 'Venusaur', 'Charmeleon', 'Sandshrew', 'Sandslash', 'Gloom', 'Vileplume', 'Paras', 'Parasect', 'Meowth', 'Persian', 'Bellsprout', 'Weepinbell', 'Victreebel', 'Farfetchd', 'Krabby', 'Kingler', 'Exeggutor', 'Cubone', 'Marowak', 'Tangela', 'Scyther', 'Pinsir'} local ecut = 9503 local cdcut = 5 -- CUT -- BLINK[/color] [color=royalblue] local blink = {'Abra', 'Kadabra', 'Alakazam', 'Porygon'} local exhaustblink = 9501 local cdblink = 50 -- BLINK -- LIGHT[/color] [color=royalblue] local light = {'Abra', 'Kadabra', 'Alakazam', 'Magnemite', 'Magneton', 'Drowzee', 'Hypno', 'Voltorb', 'Electrode', 'Mrmime', 'Electabuzz', 'Jolteon', 'Porygon', 'Pikachu', 'Raichu'} local exhautStorage = 9500 local time = 600 local cd = 17 -- LIGHT -- CONTROL[/color] [color=royalblue] function onUse(cid, item, frompos, item2, topos) if getPlayerItemCount(cid, item2.itemid) >= 1 then return false end if exhaustion.get(cid, etudao) then doPlayerSendCancel(cid, "Please wait a few seconds before using order again!") return true end if isMonster(item2.uid) and item2.uid ~= getCreatureSummons(cid)[1] and item2.uid ~= cid then if #getCreatureSummons(cid) == 0 then doPlayerSendCancel(cid, "You need a pokemon to use order.") return true end if exhaustion.get(cid, mind) then doPlayerSendCancel(cid, "Your pokemon is too exhausted from the last control, this ability has 2 minutes cooldown.") return true end if isPlayer(getCreatureMaster(item2.uid)) then doPlayerSendCancel(cid, "You cant control the mind of someone's else pokemon.") return true end if not isInArray({"Alakazam", "Tentacruel", "Gengar"}, getCreatureName(getCreatureSummons(cid)[1])) then doPlayerSendCancel(cid, "This pokemon cant control minds.") return true end exhaustion.set(cid, mind, 240) doCreatureSay(getCreatureSummons(cid)[1], "CONTROL MIND!", TALKTYPE_MONSTER) doSendDistanceShoot(getThingPos(getCreatureSummons(cid)[1]), getThingPos(item2.uid), 39) registerCreatureEvent(item2.uid, "Controled") doSendMagicEffect(getThingPos(item2.uid), 136) doSendMagicEffect(getThingPos(item2.uid), 134) doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 133) setPlayerStorageValue(cid, 61209, getCreatureMaxHealth(getCreatureSummons(cid)[1])) setPlayerStorageValue(cid, 61210, getCreatureHealth(getCreatureSummons(cid)[1])) doConvinceCreature(cid, item2.uid) if getCreatureSpeed(item2.uid) == 0 then doChangeSpeed(item2.uid, 180) end doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", control "..string.lower(getCreatureName(item2.uid)).."'s mind!", 1) local cmed = item2.uid local cmname = getCreatureName(getCreatureSummons(cid)[1]) local cmpos = getThingPos(getCreatureSummons(cid)[1]) doRemoveCreature(getCreatureSummons(cid)[1]) local cmzao = doSummonCreature(""..cmname.." cm", cmpos) doConvinceCreature(cid, cmzao) setPlayerStorageValue(cid, 888, 1) local function check(params) if isCreature(params.cid) then if getPlayerStorageValue(params.cid, 888) <= 0 then return true end -- CONTROL if not isCreature(cmed) then[/color] [color=royalblue] local pkcmpos = getThingPos(getCreatureSummons(cid)[1]) doRemoveCreature(getCreatureSummons(cid)[1]) local item = getPlayerSlotItem(cid, 8) local pk = doSummonCreature(getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball."), pkcmpos) doConvinceCreature(cid, pk) doCreatureSetLookDir(getCreatureSummons(cid)[1], 2) registerCreatureEvent(pk, "DiePoke") registerCreatureEvent(pk, "Exp") registerCreatureEvent(cid, "PlayerPokeDeath") setCreatureMaxHealth(pk, (getPlayerStorageValue(cid, 61209))) doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61209))) doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61210))-(getPlayerStorageValue(cid, 61209))) setPlayerStorageValue(cid, 888, 0) end if params.rod == 20 then local lifecmed = getCreatureMaxHealth(cmed) - getCreatureHealth(cmed) local poscmed = getThingPos(cmed) local cmeddir = getCreatureLookDir(cmed) local namecmed = getCreatureName(cmed) doRemoveCreature(getCreatureSummons(cid)[1]) local back = doSummonCreature(""..namecmed.." s", poscmed) if getCreatureSpeed(back) == 0 then doChangeSpeed(back, 180) end doCreatureSetLookDir(back, cmeddir) doCreatureAddHealth(back, -lifecmed) local item = getPlayerSlotItem(cid, 8) local mynewpos = getThingPos(getCreatureSummons(cid)[1]) doRemoveCreature(getCreatureSummons(cid)[1]) pk = doSummonCreature(getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball."), mynewpos) doConvinceCreature(cid, pk) doCreatureSetLookDir(getCreatureSummons(cid)[1], 2) registerCreatureEvent(pk, "DiePoke") registerCreatureEvent(pk, "Exp") registerCreatureEvent(cid, "PlayerPokeDeath") setCreatureMaxHealth(pk, (getPlayerStorageValue(cid, 61209))) doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61209))) doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61210))-(getPlayerStorageValue(cid, 61209))) setPlayerStorageValue(cid, 888, 0) else doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 220) end end end for rod = 1, 20 do addEvent(check, rod*500, {cid = cid, rod = rod}) end return true end if item2.uid == cid then[/color] [color=royalblue] if getPlayerStorageValue(cid, 888) >= 1 then doPlayerSendCancel(cid, "You cant fly neither ride pokemons being controled.") return true end if #getCreatureSummons(cid) == 0 and getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 then doPlayerSendCancel(cid, "You need a pokemon to use order.") return true end if getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 and not isInArray(ridefly, getCreatureName(getCreatureSummons(cid)[1])) then[/color] [color=royalblue] doPlayerSendCancel(cid, "You can't ride this pokemon nor fly with it.") return true end if getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 and getCreatureSpeed(getCreatureSummons(cid)[1]) == 0 then[/color] [color=royalblue] return true end if getPlayerStorageValue(cid, 17001) <= 0 and getPlayerStorageValue(cid, 17000) <= 0 and isInArray(ride, getCreatureName(getCreatureSummons(cid)[1])) then[/color] [color=royalblue] local pokemon = rides[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType] if getCreatureSpeed(getCreatureSummons(cid)[1]) >= 1 then doChangeSpeed(getCreatureSummons(cid)[1], -getCreatureSpeed(getCreatureSummons(cid)[1])) end local function ride(params) if isCreature(params.cid) then if isCreature(getCreatureSummons(params.cid)[1]) then if getDistanceBetween(getThingPos(getCreatureSummons(cid)[1]), getThingPos(cid)) <= params.d then doChangeSpeed(cid, -250) doChangeSpeed(cid, pokemon[2]) exhaustion.set(cid, etudao, 4) setPlayerStorageValue(cid, 17001, 1) doSetCreatureOutfit(cid, {lookType = pokemon[1], lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) setPlayerStorageValue(cid, 61209, getCreatureMaxHealth(getCreatureSummons(cid)[1])) setPlayerStorageValue(cid, 61210, getCreatureHealth(getCreatureSummons(cid)[1])) doRemoveCreature(getCreatureSummons(cid)[1]) else dirh = getDirectionTo(getThingPos(getCreatureSummons(params.cid)[1]), getThingPos(params.cid)) if dirh == NORTHWEST then if math.random(1,100) >= 51 then dirh = NORTH else dirh = WEST end elseif dirh == SOUTHWEST then if math.random(1,100) >= 51 then dirh = SOUTH else dirh = WEST end elseif dirh == SOUTHEAST then if math.random(1,100) >= 51 then dirh = SOUTH else dirh = EAST end elseif dirh == NORTHEAST then if math.random(1,100) >= 51 then dirh = NORTH else dirh = EAST end end local dirh = dirh if getCreatureSpeed(getCreatureSummons(params.cid)[1]) == 0 then doChangeSpeed(getCreatureSummons(params.cid)[1], getCreatureBaseSpeed(getCreatureSummons(cid)[1])) doPushCreature(getCreatureSummons(params.cid)[1], dirh, 1, 0) doChangeSpeed(getCreatureSummons(params.cid)[1], -getCreatureSpeed(getCreatureSummons(cid)[1])) else doPushCreature(getCreatureSummons(params.cid)[1], dirh, 1, 0) doChangeSpeed(getCreatureSummons(params.cid)[1], -getCreatureSpeed(getCreatureSummons(cid)[1])) end end end end end local function speed(params)[/color] [color=royalblue] if isCreature(params.cid) then if isCreature(getCreatureSummons(params.cid)[1]) then if getCreatureSpeed(getCreatureSummons(params.cid)[1]) == 0 then doChangeSpeed(getCreatureSummons(params.cid)[1], getCreatureBaseSpeed(getCreatureSummons(cid)[1])) end end end end doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", let me ride you!", 1) exhaustion.set(cid, etudao, 4) if getPlayerGroupId(cid) >= 2 and getPlayerGroupId(cid) <= 6 then distanc = 1 else distanc = 0 end local distance = distanc for i=1,12 do addEvent(ride, pokemon[3]*i, {cid = cid, d = distance}) addEvent(speed, ((pokemon[3]*12)+100), {cid = cid}) end return true end if getPlayerStorageValue(cid, 17001) >= 1 then[/color] [color=royalblue] setPlayerStorageValue(cid, 17001, 0) if getPlayerGroupId(cid) ~= 6 then setPlayerGroupId(cid, 8) end doCreatureSetLookDir(cid, 2) doChangeSpeed(cid, -(getCreatureSpeed(cid))) if getPlayerGroupId(cid) >= 2 and getPlayerGroupId(cid) <= 7 then doChangeSpeed(cid, 400*getPlayerGroupId(cid)) else doChangeSpeed(cid, 250) end doRemoveCondition(cid, CONDITION_OUTFIT) local item = getPlayerSlotItem(cid, 8) doCreatureSay(cid, "" .. getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball.")..", let me get down!", 1) doSummonMonster(cid, getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball.")) local pk = getCreatureSummons(cid)[1] registerCreatureEvent(cid, "PlayerPokeDeath") if isInArray(bolas, item.itemid) then registerCreatureEvent(pk, "DiePoke") elseif isInArray(ultra, item.itemid) then registerCreatureEvent(pk, "DiePoke2") end setCreatureMaxHealth(pk, (getPlayerStorageValue(cid, 61209))) doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61209))) doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61210))-(getPlayerStorageValue(cid, 61209))) return true end if getPlayerStorageValue(cid, 17000) >= 1 then[/color] [color=royalblue] if getTileInfo(getThingPos(cid)).itemid == 460 or getTileInfo(getThingPos(cid)).itemid == 1023 or getTileInfo(getThingPos(cid)).itemid == 1022 then doPlayerSendCancel(cid, "You can\'t stop flying at this height!") return true end if getTileInfo(getThingPos(cid)).itemid >= 4820 and getTileInfo(getThingPos(cid)).itemid <= 4825 then doPlayerSendCancel(cid, "You can\'t stop flying above the water!") return true end if getPlayerGroupId(cid) ~= 6 then setPlayerGroupId(cid, 8) end doCreatureSetLookDir(cid, 2) setPlayerStorageValue(cid, 17000, 0) doChangeSpeed(cid, -(getCreatureSpeed(cid))) if getPlayerGroupId(cid) >= 2 and getPlayerGroupId(cid) <= 7 then doChangeSpeed(cid, 200*getPlayerGroupId(cid)) else doChangeSpeed(cid, 250) end doRemoveCondition(cid, CONDITION_OUTFIT) local item = getPlayerSlotItem(cid, 8) doCreatureSay(cid, "" .. getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball.")..", let me get down!", 1) doSummonMonster(cid, getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball.")) local pk = getCreatureSummons(cid)[1] registerCreatureEvent(cid, "PlayerPokeDeath") if isInArray(bolas, item.itemid) then registerCreatureEvent(pk, "DiePoke") elseif isInArray(ultra, item.itemid) then registerCreatureEvent(pk, "DiePoke2") end setCreatureMaxHealth(pk, (getPlayerStorageValue(cid, 61209))) doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61209))) doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61210))-(getPlayerStorageValue(cid, 61209))) return true end if not isPremium(cid) then[/color] [color=royalblue] doPlayerSendCancel(cid, "Only premium members are allowed to fly.") return true end if getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 and isInArray(fly, getCreatureName(getCreatureSummons(cid)[1])) then[/color] [color=royalblue] if getPlayerStorageValue(cid, 17000) <= 0 then local pokemon = flys[getCreatureOutfit(getCreatureSummons(cid)[1]).lookType] local function fly(params) if isCreature(params.cid) then if isCreature(getCreatureSummons(params.cid)[1]) then if getDistanceBetween(getThingPos(getCreatureSummons(cid)[1]), getThingPos(cid)) <= params.dd then doPlayerSendTextMessage(cid,27, "Type \"up\" or \"h1\" to fly higher and \"down\" or \"h2\" to fly lower." ) setPlayerStorageValue(cid, 61209, getCreatureMaxHealth(getCreatureSummons(cid)[1])) setPlayerStorageValue(cid, 61210, getCreatureHealth(getCreatureSummons(cid)[1])) setPlayerStorageValue(cid, 17000, 1) registerCreatureEvent(cid, "Flying") doChangeSpeed(cid, -250) doChangeSpeed(cid, pokemon[2]) exhaustion.set(cid, etudao, 4) doSetCreatureOutfit(cid, {lookType = pokemon[1], lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1) doRemoveCreature(getCreatureSummons(cid)[1]) else dir = getDirectionTo(getThingPos(getCreatureSummons(params.cid)[1]), getThingPos(params.cid)) if dir == NORTHWEST then if math.random(1,100) >= 51 then dir = NORTH else dir = WEST end elseif dir == SOUTHWEST then if math.random(1,100) >= 51 then dir = SOUTH else dir = WEST end elseif dir == SOUTHEAST then if math.random(1,100) >= 51 then dir = SOUTH else dir = EAST end elseif dir == NORTHEAST then if math.random(1,100) >= 51 then dir = NORTH else dir = EAST end end local dir = dir if getCreatureSpeed(getCreatureSummons(params.cid)[1]) == 0 then doChangeSpeed(getCreatureSummons(params.cid)[1], getCreatureBaseSpeed(getCreatureSummons(cid)[1])) doPushCreature(getCreatureSummons(params.cid)[1], dir, 1, 0) doChangeSpeed(getCreatureSummons(params.cid)[1], -getCreatureSpeed(getCreatureSummons(cid)[1])) else doPushCreature(getCreatureSummons(params.cid)[1], dir, 1, 0) doChangeSpeed(getCreatureSummons(params.cid)[1], -getCreatureSpeed(getCreatureSummons(cid)[1])) end end end end end local function speed(params)[/color] [color=royalblue] if isCreature(params.cid) then if isCreature(getCreatureSummons(params.cid)[1]) then if getCreatureSpeed(getCreatureSummons(params.cid)[1]) == 0 then doChangeSpeed(getCreatureSummons(params.cid)[1], getCreatureBaseSpeed(getCreatureSummons(cid)[1])) end end end end doCreatureSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", lets fly!", 1)[/color] [color=royalblue] exhaustion.set(cid, etudao, 4) if getPlayerGroupId(cid) >= 2 and getPlayerGroupId(cid) <= 6 then distancc = 1 else distancc = 0 end local distancee = distancc for i=1,12 do addEvent(fly, pokemon[3]*i, {cid = cid, dd = distancee}) addEvent(speed, ((pokemon[3]*12)+100), {cid = cid}) end return true end return true end end -- ROCK SMASH if item2.itemid == 1285 and getPlayerStorageValue(cid, 63215) <= 0 then if #getCreatureSummons(cid) == 0 then doPlayerSendCancel(cid, "You need a pokemon to use rock smash.") return true end if not isInArray(rocksmash, getCreatureName(getCreatureSummons(cid)[1])) then doPlayerSendCancel(cid, "This pokemon can't use rock smash.") return true end if isInArray(rocksmash, getCreatureName(getCreatureSummons(cid)[1])) then if exhaustion.get(cid, erocksmash) then doPlayerSendCancel(cid, "Please wait a few seconds before using rock smash again!") return true end if getCreatureSpeed(getCreatureSummons(cid)[1]) == 0 then[/color] [color=royalblue] return true end doChangeSpeed(getCreatureSummons(cid)[1], -getCreatureSpeed(getCreatureSummons(cid)[1])) local function tocut(params) if isCreature(params.cid) then if isCreature(getCreatureSummons(params.cid)[1]) then if getCreatureSpeed(getCreatureSummons(params.cid)[1]) >= 1 then return true end if getPlayerStorageValue(getCreatureSummons(params.cid)[1], 100) >= 1 then return true end if getDistanceBetween(getThingPos(getCreatureSummons(params.cid)[1]), topos) == 1 then doSendMagicEffect(topos, 118) doTransformItem(getTileItemById(topos, 1285).uid, 2257) exhaustion.set(cid, erocksmash, cdrocksmash) setPlayerStorageValue(getCreatureSummons(params.cid)[1], 100, 1) local function detrans(params) doTransformItem(getTileItemById(topos, 2257).uid, 1285) if isCreature(getCreatureSummons(params.ciddd)[1]) then setPlayerStorageValue(getCreatureSummons(params.ciddd)[1], 100, 0) end end addEvent(detrans, 5500, {ciddd = cid}) doCreatureSay(getCreatureSummons(cid)[1], "ROCK SMASH!", TALKTYPE_MONSTER) local function nmr(params) if isCreature(params.cid) then if isCreature(getCreatureSummons(params.cid)[1]) then if getCreatureSpeed(getCreatureSummons(params.cid)[1]) == 0 then doChangeSpeed(getCreatureSummons(params.cid)[1], getCreatureBaseSpeed(getCreatureSummons(params.cid)[1])) end end end end addEvent(nmr, 400, {cid = cid}) else local badire = getDirectionTo(getThingPos(getCreatureSummons(cid)[1]), topos) if badire == NORTHWEST then if math.random(1,100) >= 51 then badire = NORTH if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), badire), params.ccid, 0, 0) then badire = NORTH else badire = WEST end else badire = WEST if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), badire), params.ccid, 0, 0) then badire = WEST else badire = NORTH end end elseif badire == SOUTHWEST then if math.random(1,100) >= 51 then badire = SOUTH if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), badire), params.ccid, 0, 0) then badire = SOUTH else badire = WEST end else badire = WEST if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), badire), params.ccid, 0, 0) then badire = WEST else badire = SOUTH end end elseif badire == SOUTHEAST then if math.random(1,100) >= 51 then badire = SOUTH if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), badire), params.ccid, 0, 0) then badire = SOUTH else badire = EAST end else badire = EAST if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), badire), params.ccid, 0, 0) then badire = EAST else badire = SOUTH end end elseif badire == NORTHEAST then if math.random(1,100) >= 51 then badire = NORTH if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), badire), params.ccid, 0, 0) then badire = NORTH else badire = EAST end else badire = EAST if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), badire), params.ccid, 0, 0) then badire = EAST else badire = NORTH end end end local badire = badire if getCreatureSpeed(getCreatureSummons(params.cid)[1]) == 0 then doChangeSpeed(getCreatureSummons(params.cid)[1], getCreatureBaseSpeed(getCreatureSummons(params.cid)[1])) doPushCreature(getCreatureSummons(params.cid)[1], badire, 1, 0) doChangeSpeed(getCreatureSummons(params.cid)[1], -getCreatureSpeed(getCreatureSummons(params.cid)[1])) else doPushCreature(getCreatureSummons(params.cid)[1], badire, 1, 0) doChangeSpeed(getCreatureSummons(params.cid)[1], -getCreatureSpeed(getCreatureSummons(params.cid)[1])) end end end end end doPlayerSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", smash this rock!", 1)[/color] [color=royalblue] local speed = getCreatureBaseSpeed(getCreatureSummons(cid)[1]) local temk = 1000 -(2.3 * speed) addEvent(tocut, 0, {cid = cid, ccid = getCreatureSummons(cid)[1], topos = topos}) for i = 1, getDistanceBetween(getThingPos(getCreatureSummons(cid)[1]), topos) * 2 do addEvent(tocut, temk*i, {cid = cid, ccid = getCreatureSummons(cid)[1], topos = topos}) end return true end end -- ROCK SMASH END -- CUT[/color] [color=royalblue] if item2.itemid == 2767 and getPlayerStorageValue(cid, 63215) <= 0 then if #getCreatureSummons(cid) == 0 then doPlayerSendCancel(cid, "You need a pokemon to use cut.") return true end if not isInArray(cut, getCreatureName(getCreatureSummons(cid)[1])) then doPlayerSendCancel(cid, "This pokemon can't use cut.") return true end if isInArray(cut, getCreatureName(getCreatureSummons(cid)[1])) then if exhaustion.get(cid, ecut) then doPlayerSendCancel(cid, "Please wait a few seconds before using cut again!") return true end if getCreatureSpeed(getCreatureSummons(cid)[1]) == 0 then return true end doChangeSpeed(getCreatureSummons(cid)[1], -getCreatureSpeed(getCreatureSummons(cid)[1])) local function tocut(params) if isCreature(params.cid) then if isCreature(getCreatureSummons(params.cid)[1]) then if getCreatureSpeed(getCreatureSummons(params.cid)[1]) >= 1 then return true end if getPlayerStorageValue(getCreatureSummons(params.cid)[1], 101) >= 1 then return true end if getDistanceBetween(getThingPos(getCreatureSummons(params.cid)[1]), topos) == 1 then doSendMagicEffect(topos, 141) doTransformItem(getTileItemById(topos, 2767).uid, 6216) exhaustion.set(cid, ecut, cdcut) setPlayerStorageValue(getCreatureSummons(params.cid)[1], 101, 1) local function detrans(params) doTransformItem(getTileItemById(topos, 6216).uid, 2767) if isCreature(getCreatureSummons(params.ciddd)[1]) then setPlayerStorageValue(getCreatureSummons(params.ciddd)[1], 101, 0) end end addEvent(detrans, 5500, {ciddd = cid}) doCreatureSay(getCreatureSummons(cid)[1], "CUT!", TALKTYPE_MONSTER) local function nmr(params) if isCreature(params.cid) then if isCreature(getCreatureSummons(params.cid)[1]) then if getCreatureSpeed(getCreatureSummons(params.cid)[1]) == 0 then doChangeSpeed(getCreatureSummons(params.cid)[1], getCreatureBaseSpeed(getCreatureSummons(params.cid)[1])) end end end end addEvent(nmr, 400, {cid = cid}) else adire = getDirectionTo(getThingPos(getCreatureSummons(cid)[1]), topos) if adire == NORTHWEST then if math.random(1,100) >= 51 then adire = NORTH if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), adire), params.ccid, 0, 0) then adire = NORTH else adire = WEST end else adire = WEST if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), adire), params.ccid, 0, 0) then adire = WEST else adire = NORTH end end elseif adire == SOUTHWEST then if math.random(1,100) >= 51 then adire = SOUTH if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), adire), params.ccid, 0, 0) then adire = SOUTH else adire = WEST end else adire = WEST if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), adire), params.ccid, 0, 0) then adire = WEST else adire = SOUTH end end elseif adire == SOUTHEAST then if math.random(1,100) >= 51 then adire = SOUTH if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), adire), params.ccid, 0, 0) then adire = SOUTH else adire = EAST end else adire = EAST if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), adire), params.ccid, 0, 0) then adire = EAST else adire = SOUTH end end elseif adire == NORTHEAST then if math.random(1,100) >= 51 then adire = NORTH if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), adire), params.ccid, 0, 0) then adire = NORTH else adire = EAST end else adire = EAST if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), adire), params.ccid, 0, 0) then adire = EAST else adire = NORTH end end end local adire = adire if getCreatureSpeed(getCreatureSummons(params.cid)[1]) == 0 then doChangeSpeed(getCreatureSummons(params.cid)[1], getCreatureBaseSpeed(getCreatureSummons(params.cid)[1])) doPushCreature(getCreatureSummons(params.cid)[1], adire, 1, 0) doChangeSpeed(getCreatureSummons(params.cid)[1], -getCreatureSpeed(getCreatureSummons(params.cid)[1])) else doPushCreature(getCreatureSummons(params.cid)[1], adire, 1, 0) doChangeSpeed(getCreatureSummons(params.cid)[1], -getCreatureSpeed(getCreatureSummons(params.cid)[1])) end end end end end doPlayerSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", cut this bush!", 1)[/color] [color=royalblue] local speed = getCreatureBaseSpeed(getCreatureSummons(cid)[1]) temk = 1000 -(2.3 * speed) addEvent(tocut, 0, {cid = cid, ccid = getCreatureSummons(cid)[1], topos = topos}) for i = 1, getDistanceBetween(getThingPos(getCreatureSummons(cid)[1]), topos) * 2 do addEvent(tocut, temk*i, {cid = cid, ccid = getCreatureSummons(cid)[1], topos = topos}) end return true[/color] [color=royalblue] end end -- CUT END -- DIG[/color] [color=royalblue] if isInArray(digholes, item2.itemid) and getPlayerStorageValue(cid, 63215) <= 0 then if #getCreatureSummons(cid) == 0 then doPlayerSendCancel(cid, "You need a pokemon to use dig.") return true end if not isInArray(dig, getCreatureName(getCreatureSummons(cid)[1])) then doPlayerSendCancel(cid, "This pokemon can't use dig.") return true end if isInArray(dig, getCreatureName(getCreatureSummons(cid)[1])) then if exhaustion.get(cid, edig) then doPlayerSendCancel(cid, "Please wait a few seconds before using dig again!") return true end if getCreatureSpeed(getCreatureSummons(cid)[1]) == 0 then return true end doChangeSpeed(getCreatureSummons(cid)[1], -getCreatureSpeed(getCreatureSummons(cid)[1])) local function tocut(params) if isCreature(params.cid) then if isCreature(getCreatureSummons(params.cid)[1]) then if getCreatureSpeed(getCreatureSummons(params.cid)[1]) >= 1 then return true end if getPlayerStorageValue(getCreatureSummons(params.cid)[1], 99) >= 1 then return true end if getDistanceBetween(getThingPos(getCreatureSummons(params.cid)[1]), topos) == 1 then doSendMagicEffect(topos, 3) setPlayerStorageValue(getCreatureSummons(params.cid)[1], 99, 1) doTransformItem(getTileItemById(topos, item2.itemid).uid, item2.itemid+1) exhaustion.set(cid, edig, cddig) local function detrans(params) doTransformItem(getTileItemById(topos, item2.itemid+1).uid, item2.itemid) if isCreature(getCreatureSummons(params.ciddd)[1]) then setPlayerStorageValue(getCreatureSummons(params.ciddd)[1], 99, 0) end end addEvent(detrans, 5500, {ciddd = cid}) doCreatureSay(getCreatureSummons(cid)[1], "DIG!", TALKTYPE_MONSTER) local function nmr(params) if isCreature(params.cid) then if isCreature(getCreatureSummons(params.cid)[1]) then if getCreatureSpeed(getCreatureSummons(params.cid)[1]) == 0 then doChangeSpeed(getCreatureSummons(params.cid)[1], getCreatureBaseSpeed(getCreatureSummons(params.cid)[1])) end end end end addEvent(nmr, 400, {cid = cid}) else local cdire = getDirectionTo(getThingPos(getCreatureSummons(cid)[1]), topos) if cdire == NORTHWEST then if math.random(1,100) >= 51 then cdire = NORTH if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), cdire), params.ccid, 0, 0) then cdire = NORTH else cdire = WEST end else cdire = WEST if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), cdire), params.ccid, 0, 0) then cdire = WEST else cdire = NORTH end end elseif cdire == SOUTHWEST then if math.random(1,100) >= 51 then cdire = SOUTH if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), cdire), params.ccid, 0, 0) then cdire = SOUTH else cdire = WEST end else cdire = WEST if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), cdire), params.ccid, 0, 0) then cdire = WEST else cdire = SOUTH end end elseif cdire == SOUTHEAST then if math.random(1,100) >= 51 then cdire = SOUTH if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), cdire), params.ccid, 0, 0) then cdire = SOUTH else cdire = EAST end else cdire = EAST if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), cdire), params.ccid, 0, 0) then cdire = EAST else cdire = SOUTH end end elseif cdire == NORTHEAST then if math.random(1,100) >= 51 then cdire = NORTH if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), cdire), params.ccid, 0, 0) then cdire = NORTH else cdire = EAST end else cdire = EAST if isWalkable(getPosByDir(getThingPos(getCreatureSummons(params.cid)[1]), cdire), params.ccid, 0, 0) then cdire = EAST else cdire = NORTH end end end local cdire = cdire if getCreatureSpeed(getCreatureSummons(params.cid)[1]) == 0 then doChangeSpeed(getCreatureSummons(params.cid)[1], getCreatureBaseSpeed(getCreatureSummons(params.cid)[1])) doPushCreature(getCreatureSummons(params.cid)[1], cdire, 1, 0) doChangeSpeed(getCreatureSummons(params.cid)[1], -getCreatureSpeed(getCreatureSummons(params.cid)[1])) else doPushCreature(getCreatureSummons(params.cid)[1], cdire, 1, 0) doChangeSpeed(getCreatureSummons(params.cid)[1], -getCreatureSpeed(getCreatureSummons(params.cid)[1])) end end end end end doPlayerSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", open this hole!", 1)[/color] [color=royalblue] local speed = getCreatureBaseSpeed(getCreatureSummons(cid)[1]) temk = 1000 -(2.3 * speed) addEvent(tocut, 0, {cid = cid, ccid = getCreatureSummons(cid)[1], topos = topos}) for i = 1, getDistanceBetween(getThingPos(getCreatureSummons(cid)[1]), topos) * 2 do addEvent(tocut, temk*i, {cid = cid, ccid = getCreatureSummons(cid)[1], topos = topos}) end return true end end -- DIG END -- BLINK[/color] [color=royalblue] if #getCreatureSummons(cid) == 0 and getPlayerStorageValue(cid, 63215) <= 0 and getPlayerStorageValue(cid, 17000) <= 0 then doPlayerSendCancel(cid, "You need a pokemon to use order.") return true end if not isMonster(item2.uid) and getPlayerStorageValue(cid, 63215) <= 0 and getPlayerStorageValue(cid, 17000) <= 0 then if isInArray(blink, getCreatureName(getCreatureSummons(cid)[1])) then if exhaustion.get(cid, exhaustblink) then doPlayerSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", move!", 1) doChangeSpeed(getCreatureSummons(cid)[1], -getCreatureSpeed(getCreatureSummons(cid)[1])) markPos(getCreatureSummons(cid)[1], topos) markOwnerPos(getCreatureSummons(cid)[1], getThingPos(cid)) addEvent(goThere, 500, getCreatureSummons(cid)[1], topos) else if not isWalkable(topos, cid, 0, 0) then doPlayerSendCancel(cid, "Your pokemon cannot teleport there.") return true end if getItemName(item2.uid) == "shallow water" then doPlayerSendCancel(cid, "Your pokemon cannot teleport there.") return true end doSendDistanceShoot(getThingPos(getCreatureSummons(cid)[1]), topos, 39) doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 211) doTeleportThing(getCreatureSummons(cid)[1], topos, false) doSendMagicEffect(topos, 134) doPlayerSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", teleport there!", 1) doCreatureSay(getCreatureSummons(cid)[1], "BLINK!", TALKTYPE_MONSTER) exhaustion.set(cid, exhaustblink, cdblink) return true end return true end end --- BLINK END -- LIGHT --[/color] [color=royalblue] if isCreature(item2.uid) and getCreatureMaster(item2.uid) == cid and getPlayerStorageValue(cid, 63215) <= 0 and getPlayerStorageValue(cid, 17000) <= 0 and item2.uid ~= cid then if not isInArray(light, getCreatureName(getCreatureSummons(cid)[1])) then doPlayerSendCancel(cid, "This pokemon can't use flash.") return true end if isInArray(light, getCreatureName(getCreatureSummons(cid)[1])) then if not isMonster(item2.uid) and getCreatureMaster(item2.uid) ~= cid then return doPlayerSendCancel(cid,"Please use flash on your pokemon.") end if exhaustion.get(cid, exhautStorage) then doPlayerSendCancel(cid,"Please wait a few seconds before using flash again!") return true end exhaustion.set(cid, exhautStorage, cd) doPlayerSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", use flash!", 1) doCreatureSay(getCreatureSummons(cid)[1], "FLASH!", TALKTYPE_MONSTER) doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 28) doSetCreatureLight(getCreatureSummons(cid)[1], 8, 215, time*1000) return true end end -- LIGHT END -- if #getCreatureSummons(cid) == 0 then return true end if getPlayerStorageValue(getCreatureSummons(cid)[1], 12) == 1 then doPlayerSendCancel(cid, "You can\'t order your pokemon to move now.") return true end doPlayerSay(cid, ""..getCreatureName(getCreatureSummons(cid)[1])..", move!", 1) doChangeSpeed(getCreatureSummons(cid)[1], -getCreatureSpeed(getCreatureSummons(cid)[1])) markPos(getCreatureSummons(cid)[1], topos) markOwnerPos(getCreatureSummons(cid)[1], getThingPos(cid)) addEvent(goThere, 500, getCreatureSummons(cid)[1], topos) return true end[/color] Características do novo move: • neste não há cooldown como o antigo, o jogador pode usar livremente sem dar nenhum erro no pokemon. • neste, ao usar o order e o pokemon chegar ao destino, ele permanece ali até o jogador mover-se. • neste o pokemon anda apenas em linha reta. • agora, ao selecionar um novo alvo, o pokemon volta a andar sozinho. enfim, há outros detalhes também que tratam apenas a correção de bugs, qualquer erro, avisem-me. Qualquer um tem permissão para postar em outro fórum, só peço que coloquem os créditos. A função doPushCreature não é minha. Foi feita pelo Dokmos.
  15. Upgrading System 2.0 por Clique

    ------------------------------- Nome: Upgrading System 2.0 por Clique :fist: Versão: 8.4x (também funciona em 8.5) Tipo do script: Action Servidor Testado: The Forgotten Server 0.3.4.1879/0.3.1.1,Alissow Ots 3.4,Gangrel v5.8 Autor: jordanhenry (Otland) e modificado por jajajiji ------------------------------- Creditos: 10% pra mim por ter trazido para OTNet e pelo tutorial. Upgrade System consiste em um pequeno cristal que adiciona bonus ao item ,que ao ser usado em qualquer lugar revela seus atributos. OBS:Todo equipamento e arma vai até o level 10 sendo que a partir dai é impossivel refinar mais vezes, caso você falhe quando usar o cristal ele vai pro level 1,ou seja, independente de falhar ou não usando um cristal ele ganha um level. [spoiler=SS] O Script contém novas features: **Agora pode ser usado em Bows e Crossbows **Animações como Success! or Failed! **A actionid é salva quando você move,dá trade e etc... **Também mostra se tem chance de quebrar o item Agora ao Script!!! 1- Va em \data\actions\scripts\ e crie um arquivo chamado upgrade.lua e adicione isto: local messagetype = MESSAGE_EVENT_ORANGE local fetishs = { [[color=Magenta]7800[/color]] = {chance = [color=Red]100[/color], amount = [color=Blue]1[/color], set = [color=SeaGreen]setItemAttack[/color], get = getItemAttack, name = "attack"}, [[color=Magenta]7801[/color]] = {chance = [color=Red]80[/color], amount = [color=Blue]2[/color], set = [color=SeaGreen]setItemAttack[/color], get = getItemAttack, name = "attack"}, [[color=Magenta]7802[/color]] = {chance = [color=Red]60[/color], amount = [color=Blue]3[/color], set = [color=SeaGreen]setItemAttack[/color], get = getItemAttack, name = "attack"}, [[color=Magenta]7803[/color]] = {chance = [color=Red]40[/color], amount = [color=Blue]4[/color], set = [color=SeaGreen]setItemAttack[/color], get = getItemAttack, name = "attack", [color=DarkOrchid]destroy = TRUE[/color]}, [[color=Magenta]7804[/color]] = {chance = [color=Red]20[/color], amount = [color=Blue]5[/color], set = [color=SeaGreen]setItemAttack[/color], get = getItemAttack, name = "attack", destroy = TRUE}, [[color=Magenta]7805[/color]] = {chance = [color=Red]100[/color], amount = [color=Blue]1[/color], set = [color=SeaGreen]setItemDefense[/color], get = getItemDefense, name = "defense"}, [[color=Magenta]7806[/color]] = {chance = [color=Red]80[/color], amount = [color=Blue]2[/color], set = [color=SeaGreen]setItemDefense[/color], get = getItemDefense, name = "defense"}, [[color=Magenta]7807[/color]] = {chance = [color=Red]60[/color], amount = [color=Blue]3[/color], set = [color=SeaGreen]setItemDefense[/color], get = getItemDefense, name = "defense"}, [[color=Magenta]7808[/color]] = {chance = [color=Red]40[/color], amount = [color=Blue]4[/color], set = [color=SeaGreen]setItemDefense[/color], get = getItemDefense, name = "defense", destroy = TRUE}, [[color=Magenta]7809[/color]] = {chance = [color=Red]20[/color], amount = [color=Blue]5[/color], set = [color=SeaGreen]setItemDefense[/color], get = getItemDefense, name = "defense", destroy = TRUE}, [[color=Magenta]7810[/color]] = {chance = [color=Red]100[/color], amount = [color=Blue]1[/color], set = [color=SeaGreen]setItemArmor[/color], get = getItemArmor, name = "armor"}, [[color=Magenta]7811[/color]] = {chance = [color=Red]80[/color], amount = [color=Blue]2[/color], set = [color=SeaGreen]setItemArmor[/color], get = getItemArmor, name = "armor"}, [[color=Magenta]7812[/color]] = {chance = [color=Red]60[/color], amount = [color=Blue]3[/color], set = [color=SeaGreen]setItemArmor[/color], get = getItemArmor, name = "armor"}, [[color=Magenta]7813[/color]] = {chance = [color=Red]40[/color], amount = [color=Blue]4[/color], set = [color=SeaGreen]setItemArmor[/color], get = getItemArmor, name = "armor", destroy = TRUE}, [[color=Magenta]7814[/color]] = {chance = [color=Red]20[/color], amount = [color=Blue]5[/color], set = [color=SeaGreen]setItemArmor[/color], get = getItemArmor, name = "armor", destroy = TRUE}, [[color=Magenta]7815[/color]] = {chance = [color=Red]100[/color], amount = [color=Blue]1[/color], set = [color=SeaGreen]setItemShootRange[/color], get = getItemShootRange, name = "range"}, [[color=Magenta]7816[/color]] = {chance = [color=Red]80[/color], amount = [color=Blue]2[/color], set = [color=SeaGreen]setItemShootRange[/color], get = getItemShootRange, name = "range"}, [[color=Magenta]7817[/color]] = {chance = [color=Red]60[/color], amount = [color=Blue]3[/color], set = [color=SeaGreen]setItemShootRange[/color], get = getItemShootRange, name = "range"}, [[color=Magenta]7818[/color]] = {chance = [color=Red]40[/color], amount = [color=Blue]4[/color], set = [color=SeaGreen]setItemShootRange[/color], get = getItemShootRange, name = "range", destroy = TRUE}, [[color=Magenta]7819[/color]] = {chance = [color=Red]20[/color], amount = [color=Blue]5[/color], set = [color=SeaGreen]setItemShootRange[/color], get = getItemShootRange, name = "range", destroy = TRUE}, [[color=Magenta]7850[/color]] = {chance = [color=Red]100[/color], amount = [color=Blue]5[/color], set = [color=SeaGreen]setItemAttack[/color], get = getItemAttack, name = "attack"}, -- only given when access >= 5 [[color=Magenta]7851[/color]] = {chance = [color=Red]100[/color], amount = [color=Blue]5[/color], set = [color=SeaGreen]setItemDefense[/color], get = getItemDefense, name = "defense"}, -- only given when access >= 5 [[color=Magenta]7852[/color]] = {chance = [color=Red]100[/color], amount = [color=Blue]5[/color], set = [color=SeaGreen]setItemArmor[/color], get = getItemArmor, name = "armor"}, -- only given when access >= 5 [[color=Magenta]7853[/color]] = {chance = [color=Red]100[/color], amount = [color=Blue]5[/color], set = [color=SeaGreen]setItemShootRange[/color], get = getItemShootRange, name = "range"} -- only given when access >= 5 } local minmax = { min1 = 7800, -- minimum of the random fetishs for access < 5 max1 = 7819, -- maximum of the random fetishs for access < 5 min2 = 7850, -- minimum of the random fetishs for access >= 5 max2 = 7853, -- maximum of the random fetishs for access >= 5 } -- WARNING: look further down and your eyes will burn. -- function onUse(cid, item, fromPosition, itemEx, toPosition) if item.actionid == 0 then local new = getPlayerAccess(cid) >= 5 and math.random(minmax.min2, minmax.max2) or math.random(minmax.min1, minmax.max1) local text = "You remove the dust and revealed that it is a "..fetishs[new].chance.."% fetish for "..fetishs[new].name.." +"..fetishs[new].amount.."."..(fetishs[new].destroy ~= nil and " It has a slight chance of breaking your item." or "") doPlayerSendTextMessage(cid, messagetype, text) doSetItemActionId(item.uid, new) doSetItemSpecialDescription(item.uid, text) setItemName(item.uid, fetishs[new].chance.."% fetish for "..fetishs[new].name.." +"..fetishs[new].amount) elseif fetishs[item.actionid] ~= nil then if fetishs[item.actionid].get(itemEx.uid) > 0 then if itemEx.actionid < 110 then local amount = math.max(0, itemEx.actionid - 100) local chance = math.random(0, 100) local text = fetishs[item.actionid].name.." upgrade on "..getItemNameById(itemEx.itemid).." failed." if chance <= fetishs[item.actionid].chance then fetishs[item.actionid].set(itemEx.uid, (fetishs[item.actionid].get(itemEx.uid)+fetishs[item.actionid].amount)) text = getItemNameById(itemEx.itemid).." "..fetishs[item.actionid].name.." +"..fetishs[item.actionid].amount.."." elseif fetishs[item.actionid].destroy ~= nil or fetishs[item.actionid].destroy == TRUE then if math.random(0, 1) == 1 then doRemoveItem(itemEx.uid) text = getItemNameById(itemEx.itemid).." has been destroyed." end end doPlayerSendTextMessage(cid, messagetype, text) doSetItemActionId(itemEx.uid, 100+(amount+1)) setItemName(itemEx.uid, getItemNameById(itemEx.itemid).." (Level "..(amount+1)..")") doSendMagicEffect(toPosition, (chance <= fetishs[item.actionid].chance and 13 or 2)) doSendAnimatedText(toPosition, (chance <= fetishs[item.actionid].chance and "Success!" or "Failed!"),(chance <= fetishs[item.actionid].chance and TEXTCOLOR_WHITE or TEXTCOLOR_RED)) doRemoveItem(item.uid) else doPlayerSendCancel(cid, "This weapon has already been upgraded 10 times.") end else doPlayerSendCancel(cid, "This item may not be upgraded.") end else doPlayerSendCancel(cid, "Sorry, not possible.") end return TRUE end Explicando: *[7800] : Não precisa mecher, deixe como estar.Caso você seja GOD você receberá somente esse seguinets cristais [7850] ao [7853] que ja vem configurado para aumentar 5 (attack,range,defense etc...) e com 100% de chance. *chance = 100 : Chance de sucesso para refinar o equipamento ou arma. *amount = 1 : O quanto aumentará se obtiver sucesso. *set = setItemAttack : O tipo que ele aumenta.(defense,attack,Armor,Range e etc...) *destroy = TRUE : Caso você queira que o item não quebre apenas coloque FALSE.(aconselho a deixar o TRUE porque fica bem mais legal quando quebra ) 2- Vá em \data\actions\actions.xml e adicione essa tag: <action fromid="9743" toid="9744" event="script" value="upgrade.lua"/> 3 -Agora vá em \data\items\items.xml e adicione essa tag no final: <item fromid="9743" toid="9744" name="upgrade crystal"> <attribute key="weight" value="10"/> </item> Pronto galera!!!Agora só é diversão (Y) GOSTOU? Me doe V$:yes:
  16. Sistema AFK

    Olá, estou criando esse tutorial mostrando como fazer o Sistema de AFK em seu OTServ, Então vamos lá ^^ Vá Na Pasta De Seu OTServ / Data / Talkactions / Scripts - Copie qualquer arquivo .lua que está lá, tire tudo que a dentro dele e renomeie como 'afk' Coloque isso : [spoiler=Coloque isso] local time = 5 -- 1 = 1 sec, 2 = 2 sec, ... local say_events = {} local function SayText(cid) if isPlayer(cid) == TRUE then if say_events[getPlayerGUID(cid)] ~= nil then if isPlayer(cid) == TRUE then doSendAnimatedText(getPlayerPosition(cid),"Ausente !", math.random(01,255)) end say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 100 / 2, cid) end end return TRUE end function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end if param == "on" then if isPlayer(cid) == TRUE then doSendAnimatedText(getPlayerPosition(cid),"Ausente !", math.random(01,255)) end say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid) doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING ,"You Now Stated you are (afk).") elseif param == "off" then stopEvent(say_events[getPlayerGUID(cid)]) say_events[getPlayerGUID(cid)] = nil doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING ,"You Now stated your are not (afk).") end return TRUE end Depois vá em Pasta De Seu OTServ / Data / Talkactions / Talkactions.XML Procure A Parte dos Players Bote Isso : [spoiler=Coloque Isso] <talkaction words="!afk on" event="script" value="afk.lua"/> Obs : falando !afk off acaba com !afk on começa! Gente então é isso salve feche e use Abraços, Victor Morin
  17. Meu Fly System sem Voids

    E ai Galera Blz? To aki para postar meu primeiro trabalho eh um fly system totalmente sem voids o video nao ta muito legal pois nao sou bom nisso afinal como eu disse eh minha primeira vez...xD Ele foi feito basicamente na source do TFS tendo que ser feitas algumas mudanças em partes dela..xD bem eh isso aew qualquer coisa soh falarem comigo xD Abraço a todos
  18. Dragon's Empire Fly System v.1.0

    Bom galera, só queria mostrar um script do meu projeto Dragon's Empire, que está em desenvolvimento e é parecido com a V2 do fly system do Mock! (: Video: http://www.youtube.com/watch?v=nsz3ELTabxA E se for assistir e depois querer postar algo, leia a descrição do video primeiro por favor! Comentem ~ Cya!
  19. You Catch a Pokemon

    Informações: Rasão da remoção e Trancamento do tópico. Bom eu arrumei o script ai vi que ele estava muito bom e resolvi vender ele arrumado para um user. E eu vou adicionar no SkyOT por isso resolvi remove-lô Se alguem quiser comprar manda MP só vendo por 10 R$ e não garanto exclusividade porem garanto 100% funcionamento !! Até mais ~~
  20. Nord War V2.5 (Times, Frags+Level...)

    Nome Nord War V2.5 Após muita inatividade, preguiça, calotagem e tudo mais vim dar um presentinho de Natal para todos. O que é um war system? Lembrando que o meu war system não é o mesmo que o do X-Dream War, eu refiz ele pra ficar mais leve e menor. ----Instalando---- Em data\lib crie um arquivo war.lua com o seguinte código: --//Nord's War System V2.5 LEVEL = {START = 150, GAIN = 2} TEAMS = { [1] = { COUNT = function() return getGlobalStorageValue(101021) end, COLOR = {0, 88, 95, 0}, EFFECT = 47}, [2] = { COUNT = function() return getGlobalStorageValue(101022) end, COLOR = {0, 94, 132, 114}, EFFECT = 48} } TOWNS = { {"Thais", {1, 2}}, {"Edron", {3, 4}}, {"Venore", {5, 6}}, {"Carlin", {7, 8}}, {"Darashia", {9, 10}} } maleOutfits = {128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151, 152, 153, 154, 251, 268, 273, 278, 289, 325, 253, 254, 255} femaleOutfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156, 157, 158, 252, 269, 270, 279, 288, 324, 264} setGlobalStorageValue(101010, 1) function doPlayerSetLevel(cid, level) doPlayerAddExperience(cid, getExperienceForLevel(level) - getPlayerExperience(cid)) end function doPlayerAddLevel(cid, amount) local level = getPlayerLevel(cid) if level < 250 then doPlayerAddExperience(cid, getExperienceForLevel(level + amount) - getPlayerExperience(cid)) end end team = { get = function(id) if id == 0 then return (TEAMS[1].COUNT() < TEAMS[2].COUNT()+math.random(0, 1) and 1 or 2) else return (TEAMS[1].COLOR[4] == getCreatureOutfit(id).lookFeet and 1 or 2) end end, add = function(id, n) if n == 0 then setGlobalStorageValue(101021, 0) setGlobalStorageValue(101022, 0) else setGlobalStorageValue(101020+id, TEAMS[id].COUNT() + n) end return TRUE end } team.add(0, 0) event = { login = function(cid) if getPlayerGroupId(cid) <= 1 then local teamid = team.get(0) if teamid > 0 then team.add(teamid, 1) local NOW = getGlobalStorageValue(101010) local color = TEAMS[teamid].COLOR doCreatureChangeOutfit(cid, {lookType = getPlayerSex(cid) == 1 and maleOutfits[math.random(#maleOutfits)] or femaleOutfits[math.random(#femaleOutfits)], lookHead = color[1], lookBody = color[2], lookLegs = color[3], lookFeet = color[4], lookAddons = math.random(3)}) doCreatureAddHealth(cid, getCreatureMaxHealth(cid), TRUE) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doPlayerSetTown(cid, TOWNS[NOW][2][teamid]) doTeleportThing(cid, getTownTemplePosition(TOWNS[NOW][2][teamid]), FALSE) doPlayerAddSoul(cid, -getPlayerSoul(cid)) doSendMagicEffect(getCreaturePosition(cid), TEAMS[teamid].EFFECT) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Map: ".. TOWNS[NOW][1] .."\nTeam: ".. tostring(teamid) .." (".. TEAMS[1].COUNT() ..",".. TEAMS[2].COUNT() ..")\n \nChecking...\nIP: ".. doConvertIntegerToIp(getPlayerIp(cid)) .."\nMC Safe: ON\nMC Status: Clean") doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "[X-Dream]+[Nord War]: Para mais informações /info") if getPlayerStorageValue(cid, 20000) == -1 then setPlayerStorageValue(cid, 20000, os.time(t)) end end end return TRUE end, logout = function(cid) if getPlayerGroupId(cid) <= 1 then team.add(team.get(cid), -1) end return TRUE end, look = function(cid, thing) if not isPlayer(thing.uid) or getPlayerGroupId(thing.uid) > 1 then return TRUE end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, ""..getPlayerName(thing.uid).." ("..getPlayerVocationName(thing.uid)..")\n[Lv: "..getPlayerLevel(thing.uid).."][Frags: "..getPlayerSoul(thing.uid).."]") end, combat = function(cid, target) if cid == target or getCreatureOutfit(cid).lookFeet == getCreatureOutfit(target).lookFeet then return FALSE end return TRUE end, kill = function(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) then if isPlayer(lastHitKiller) then doPlayerAddSoul(lastHitKiller, 1) doPlayerAddLevel(lastHitKiller, LEVEL.GAIN) doPlayerSendTextMessage(lastHitKiller, MESSAGE_INFO_DESCR, 'Kill [+'..LEVEL.GAIN..' levels]') if isPlayer(mostDamageKiller) and mostDamageKiller ~= lastHitKiller then doPlayerAddSoul(lastHitKiller, 1) doPlayerSendTextMessage(mostDamageKiller, MESSAGE_INFO_DESCR, 'Kill [+'..LEVEL.GAIN..' levels]') doPlayerAddLevel(mostDamageKiller, LEVEL.GAIN) end end if LEVEL.START ~= nil then doPlayerSetLevel(cid, LEVEL.START) end local oldPosition = getCreaturePosition(cid) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), FALSE) doCreatureAddHealth(cid, getCreatureMaxHealth(cid), TRUE) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doSendMagicEffect(getCreaturePosition(cid), TEAMS[team.get(cid)].EFFECT) doSendMagicEffect(oldPosition, 65) doRemoveConditions(cid, FALSE) doPlayerAddSoul(cid, -getPlayerSoul(cid)) return FALSE end return TRUE end, map = function(clean, save) NOW = getGlobalStorageValue(101010) >= #TOWNS and 1 or getGlobalStorageValue(101010) + 1 setGlobalStorageValue(101010, NOW) doBroadcastMessage("Map changed\n[".. TOWNS[NOW][1] .."]\nNext map in 30 minutes.", MESSAGE_INFO_DESCR) team.add(0, 0) for _, cid in ipairs(getPlayersOnline()) do if getPlayerGroupId(cid) <= 1 then local teamid = team.get(cid) team.add(teamid, 1) doPlayerSetTown(cid, TOWNS[NOW][2][teamid]) doTeleportThing(cid, getTownTemplePosition(TOWNS[NOW][2][teamid]), FALSE) doCreatureAddHealth(cid, getCreatureMaxHealth(cid), TRUE) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doRemoveConditions(cid, FALSE) doPlayerAddSoul(cid, -getPlayerSoul(cid)) end end if clean == TRUE then doCleanMap() end if save == TRUE then doSaveServer() end end } Procure em data\lib o arquivo data.lua e no final do arquivo pule uma linha e adicione isto: dofile(getDataDir() .. "lib/war.lua") Agora em data\creaturescripts\scripts crie de novo um arquivo war.lua, mas desta vez com este código: function onLogin(cid) registerCreatureEvent(cid, "WarLook") registerCreatureEvent(cid, "WarKill") registerCreatureEvent(cid, "WarLogout") registerCreatureEvent(cid, "WarCombat") return event.login(cid) end function onLogout(cid) return event.logout(cid) end function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) return event.kill(cid, lastHitKiller, mostDamageKiller) end function onLook(cid, thing, position, lookDistance) return event.look(cid, thing) end function onCombat(cid, target) return event.combat(cid, target) end Em data\creaturescripts abra o arquivo creaturescripts.xml e adicione isto: <event type="preparedeath" name="WarKill" event="script" value="war.lua"/> <event type="login" name="WarLogin" event="script" value="war.lua"/> <event type="logout" name="WarLogout" event="script" value="war.lua"/> <event type="look" name="WarLook" event="script" value="war.lua"/> <event type="combat" name="WarCombat" event="script" value="war.lua"/> Em data\globalevents\scripts crie um arquivo map.lua com este código: function onThink1() broadcastMessage("Map change in 1 second.", MESSAGE_STATUS_CONSOLE_BLUE) addEvent(event.map, 1000, TRUE, TRUE) return TRUE end function onThink2() broadcastMessage("Map change in 2 seconds.", MESSAGE_STATUS_CONSOLE_BLUE) addEvent(onThink1, 1000) return TRUE end function onThink3() broadcastMessage("Map change in 3 seconds.", MESSAGE_STATUS_CONSOLE_BLUE) addEvent(onThink2, 1000) return TRUE end function onThink4() broadcastMessage("Map change in 4 seconds.", MESSAGE_STATUS_CONSOLE_BLUE) addEvent(onThink3, 1000) return TRUE end function onThink5() broadcastMessage("Map change in 5 seconds.", MESSAGE_STATUS_CONSOLE_BLUE) addEvent(onThink4, 1000) return TRUE end function onThink6() broadcastMessage("Map change in 6 seconds.", MESSAGE_STATUS_CONSOLE_BLUE) addEvent(onThink5, 1000) return TRUE end function onThink7() broadcastMessage("Map change in 7 seconds.", MESSAGE_STATUS_CONSOLE_BLUE) addEvent(onThink6, 1000) return TRUE end function onThink8() broadcastMessage("Map change in 8 seconds.", MESSAGE_STATUS_CONSOLE_BLUE) addEvent(onThink7, 1000) return TRUE end function onThink9() broadcastMessage("Map change in 9 seconds.", MESSAGE_STATUS_CONSOLE_BLUE) addEvent(onThink8, 1000) return TRUE end function onThink10() broadcastMessage("Map change in 10 seconds.", MESSAGE_STATUS_CONSOLE_BLUE) addEvent(onThink9, 1000) return TRUE end function onThink11() broadcastMessage("Map will change in 1 minute.", MESSAGE_STATUS_CONSOLE_BLUE) addEvent(onThink10, 50000) return TRUE end function onThink(interval, lastExecution) broadcastMessage("Map will change in 5 minutes.", MESSAGE_STATUS_CONSOLE_BLUE) addEvent(onThink11, 240000) end Em data\globalevents abra o arquivo globalevents.xml e coloque isto: <globalevent name="map" interval="1500" event="script" value="map.lua"/> Tudo pronto, só configurar ----Configurando---- No arquivo data\lib\war.lua que há as configurações, vejamos então: START é o level em que qualquer jogador irá começar, neste caso 150. GAIN é quantos levels o player ganha por matar um adversário. Apenas o que está em vermelho é importante COLOR defini as cores de cada time conforme este esquema: {CorDaCabeça, CorDoCorpo, CorDaPerna, CorDoPé}, no caso o corpo do time 1 vai ser azul porque 88 corresponde ao azul. EFFECT defini o Nº do efeito quando o player loga (aquela bolinha azul estilo teleport), se eu quiser que o time 2 faça um efeito de chamas em vés de 48 eu colocaria 36. Esta é a configuração da troca dos mapas. Entre "aspas" é o nome da cidade. Dentro das chaves os números 1 e 2 corresponde ao TownId dos times, explicando melhor... Quando você configura o mapa existe a ferramenta Edit Towns, nela você configura a posição dos templos, se por exemplo o templo/town de Nº 7 é em Port Hope e eu quero que lá comece o time 1 e no templo/town de Nº 9 é próximo de Port Hope e eu quero que lá comece o time 2 na configuração ficaria assim: {"Port Hope", {7, 9}} No config.lua certifique-se de que essas duas opções estejam como as abaixo: allowChangeColors = "no" noDamageToSameLookfeet = "yes" Ow, TIO! Eu quero usar só uma cidade, tem algum problema? Mas TIO! Eu não quero nem que volte pro templo, como faço? TIUUÔ! Eu to dando look e fica aquela coisa estranha: Nord (Sorcerer) [Lv:150][Frags:0], da pra deixa como tava antes? As outfits (lookType), são escolhidas automaticamente, incluindo as outfits de barbarian (male/female). Qualquer dúvida postem no tópico (talvez eu responda, tenho muita ausência), mas por PM nem pensar. Bom divertimento e FELIZ NATAL, O NATAL É DE JESUUUS! :yes: OBS: Natal já passou /\, FELIZ ANO NOVO!
  21. [8.0+]Mining System com skill

    Criei alguns sitemas com skill a algum tempo, não estava muito organizado então eu arrumei e descide postar aki um deles pra quem quiser. Modo de uso: Com uma pick em sua mão direita,de use nela e click no piso com id especificado no script.Desse modo,upando skill de mining,ira ficar cada ve mais facil encoontrar algo. Para mais informações dêem uma olhada no script. miningbykemix.lua Adicione isso no actions.xml Beijus i aproveitem! :style:
×