Ir para conteúdo
  • Cadastre-se
  1. Dieguiin XP

    Dieguiin XP

  2. Diego Augusto

    Diego Augusto

  3. Natanael Beckman

    Natanael Beckman

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por HSinhori
      Gostaria de pedir uma ajuda pra adicionar um botão no final de cada skill que ao ser clicado chama uma talkaction, um botão tipo esse: 
      Ficaria tipo:
      Magic Level            10  
      Fist Fighting           10  
      e por ai vai....
       
      Alguém saberia me ajudar, esses são os arquivos do otclient
      skills.lua
       
      skill.otui
       
    • Por xWhiteWolf
      Fala galera do TK, hoje vim trazer pra vocês um script de um server bem famoso, trata-se de nada mais e nada menos doque a Aegis of Immortal do Fox World. Quase nenhum OTserver consegue me deixar com vontade de jogar, mas se tem um que chegou bem próximo foi o Fox e o motivo é a criatividade dos caras. É muito fácil aprender lua e ser um ótimo scripter mas ter criatividade pra criar esse tipo de script é bem mais raro. Sem mais delongas vou apresentar a idéia do script e logo em seguida ensinar a instalar no seu servidor. 
        Aegis of the Immortal
      Descrição: É obtida 1 carga ao vencer o boss Aegis (aparece em invasões). Com esta técnica, o jogador ganha a aura do boss, e se morrer é teleportado para a Aegis Dimension, e após 3 segundos volta para o lugar que estava, com life e mana full como se não tivesse sido tocado. (limite de 1 carga) Tipo: (B.Skill) Vocações: All Vocations Elemento: n/a fonte: site do fox


      Well, o script é bem simpleszinho mas eu apanhei pra caramba pra fazer ele funcionar certinho (acredito que nem o script dos caras do Fox funcione da maneira correta, mas esse daqui vai funcionar)

      Antes de tudo você tem que criar uma área no seu map editor e colocar ela inteira como no-pvp e no-logout. Essa vai ser a área que você vai ser teleportado, será a sua "Aegis Dimension".




      Feito isso você vai precisar adicionar essa linha em creaturescripts.xml:
         <event type="statschange" name="reborn" script="reborn.lua"/> obs: eu levei muito tempo tentando fazer por onPrepareDeath mas aparentemente essa função não funciona tão bem quanto statschange e acabava chamando a si mesma repetidas vezes.

      agora crie um arquivo chamado reborn.lua na pasta creaturescripts\scripts e coloque isso dentro dele:




      Agora você só tem que adicionar essa linha no creaturescripts\scripts\login.lua (de preferencia antes do ultimo return true)
      --- BOSS SKILLS ---- registerCreatureEvent(cid, "reborn") if getPlayerStorageValue(cid, 19332) == -1 then         setPlayerStorageValue(cid, 19332, 0)      end Agora seu server possui a Aegis of Immortal e você pode configurar essa skill passiva de diferentes maneiras:
      1) Pode ser uma quest que dá como prêmio X quantidades dessa skill
      2) Um npc que vende X quantidades da skill
      3) Um item que ao ser equipado ativa a skill
      4) Um boss que vc mata e ganha quantidades dela
      5) Um bonus em algum evento
      6) Um item de shop
      etc.

      Tudo que vc precisa fazer é criar um script que dê o storage 19332, o valor do storage é o numero de vezes que vc vai utilizar a skill.

      aqui tem um exemplo de uma quest que ganha 5 charges da Aegis of Immortal:
      function onUse(cid, item) local storage = 19332 if getPlayerStorageValue(cid, storage) ~= 5 then doPlayerSetStorageValue(cid, storage, 5) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have habilited your [BOSS SKILL]") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your [BOSS SKILL] is already with "..getPlayerStorageValue(cid, storage).." charges.") end return true end e aqui tem algumas fotos de como fica no seu server:












       
      Espero que vcs tenham gostado.. 
      Vou dar 20% de Crédito pro Kilua porque sem o tutorial dele de addEvent isso daqui não seria possível e 30% pro pessoal do Fox por terem me dado a idéia do script.   

      EDIT: Fiz um monstro q dá essa skill ao morrer, só que eu inovei um pouquinho e fiz ele tendo a skill, ou seja, vc tem que matar ele um numero X de vezes pra valer de verdade kkk A graça é que esse numero de X é inerente ao player (fiz por storage), então se um grupo de 10 pessoas for fazer e cada hora uma matar, serão (X+1) vezes no mínimo auhauhauh Só que como ele não dá loot e o unico premio dele é a skill pra quem matar X vezes, então o pessoal dá KS mesmo. Enfim, aproveitem:

      creaturescripts\scripts\aegis.lua
      local config = { storagekill = 19500, --- storage q conta a quantidade de kills storageaegis = 19332, --- storage da skill tempo = 5, -- tempo até ele renascer times = 2, --- quantidade de vezes que tenho que matar charges = 1, --- cargas da skill q ganha ao matar definitivamente effect1 = 66, -- efeito ao morrer effect2 = 10 --- efeito ao renascer } function onKill(cid, target, lastHit) local killed = getPlayerStorageValue(cid,config.storagekill) local skill = getPlayerStorageValue(cid, config.storageaegis) if isMonster(target) and getCreatureName(target):lower() == 'aegis' then if killed < config.times then doCreatureSay(target, "I'll be back mortal...", 20) doSendMagicEffect(getThingPos(target), config.effect1) setPlayerStorageValue(cid, config.storagekill, killed+1) addEvent(doSendMagicEffect, 1000*config.tempo, getThingPos(target), config.effect2) addEvent(doCreateMonster, 1000*config.tempo, "Aegis", getCreaturePosition(target), true) end if killed >= config.times then setPlayerStorageValue(cid, config.storagekill, 0) if skill < config.charges then doPlayerSendTextMessage(cid,22,"Congratulations, you just killed "..getCreatureName(target).." and earned Aegis of Immortal skill!") setPlayerStorageValue(cid, config.storageaegis, config.charges) end end end return true end
      creaturescripts\scripts\login.lua registerCreatureEvent(cid, "aegis") if getPlayerStorageValue(cid, 19500) == -1 then         setPlayerStorageValue(cid, 19500, 0)      end creaturescripts.xml
      <event type="kill" name="aegis" script="aegis.lua"/> monster\aegis.xml
      <?xml version="1.0" encoding="UTF-8"?> <monster name="Aegis" nameDescription="Aegis, the immortal" race="blood" experience="0" speed="605" manacost="0"> <health now="100000" max="100000"/> <look type="287" head="0" body="0" legs="0" feet="0" corpse="0"/> <targetchange interval="2000" chance="15"/> <strategy attack="60" defense="5"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" skill="210" attack="260"/> <attack name="lifedrain" interval="1000" chance="20" range="3" min="-550" max="-1050"/> <attack name="firecondition" interval="1000" chance="7" range="2" min="-800" max="-1200"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="yellowspark"/> </attack> <attack name="physical" interval="1000" chance="7" radius="6" target="0" min="-250" max="-750"> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="death" interval="1000" chance="50" radius="5" target="0" min="-200" max="-500"> <attribute key="areaEffect" value="mortarea"/> <attribute key="shootEffect" value="suddendeath"/> </attack> <attack name="firefield" interval="1000" chance="4" radius="5" target="0"> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="fire" interval="1000" chance="34" range="7" radius="7" target="1" min="-350" max="-850"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="firearea"/> </attack> <attack name="fire" interval="1000" chance="13" length="8" spread="0" min="-500" max="-1000"> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="fire" interval="1000" chance="10" length="8" spread="3" min="-300" max="-1500"> <attribute key="areaEffect" value="firearea"/> </attack> </attacks> <defenses armor="165" defense="150"> <defense name="healing" interval="1000" chance="25" min="2000" max="3000"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="speed" interval="1000" chance="10" speedchange="1800" duration="4000"> <attribute key="areaEffect" value="redshimmer"/> </defense> </defenses> <immunities> <immunity physical="0"/> <immunity energy="1"/> <immunity fire="1"/> <immunity poison="0"/> <immunity lifedrain="1"/> <immunity paralyze="1"/> <immunity outfit="1"/> <immunity drunk="1"/> <immunity invisible="1"/> </immunities> <voices interval="5000" chance="50"> <voice sentence="Poor innocent, I CAN'T DIE HAHAHAHAAHA"/> <voice sentence="Your soul will be mine!"/> <voice sentence="MUAHAHAHAAHAHA, I TOLD YOU" yell="1"/> </voices> </monster> OBS: edite ele porque eu coloquei ele muito forte, com muita vida e com muita recuperação de vida.


      monster\monsters.xml
      <monster name="Aegis" file="aegis.xml"/>
    • Por MatteusDeli
      Olá Tibianos do Tibia King. (Vou direto para o script) 
       
      Vamos lá: Vá até a pasta data/npc copie e cole algum arquivo XML renomeie para stoned.xml e substitua por isto: (OBS esse é o NPC 1, vocações Paladin, Druid e Sorcerer)
       
       
      Em Roxo você pode alterar o looktype dele e o nome (Entre aspas). -- Não é obrigatório alterar isso--
       
      Agora volte para a pasta data/npc e copie e cole outro arquivo XML e renomeie para stonedkina.xml e substitua por isto:
       
       
      (--Mesma coisa do anterior --)
      Em Roxo você pode alterar o looktype dele e o nome (Entre aspas). -- Não é obrigatório alterar isso--
       
      ----SCRIPT DO NPC DE PALADIN, SORCERER E DRUID----
       
      Vá na pasta data/npc/scripts copie e cole algum arquivo, renomeie para stoned.lua e cole isso dentro:
       
       
      Em Verde é o ID dos itens que o player vai precisar para ganhar a quantidade de skill.
      Em Azul são os efeitos que vai aparecer embaixo do Player. Se quiser deixe com esses efeitos mesmo :D ---(Os efeitos vão de 1 a 68, caso queira vê-los apenas digite /z 1.. 68 com o GOD)
      Em Laranja é a quantidade de EXP de skill o Player vai ganhar ao entregar o ITEM. (Eu aconselho não colocar numero exorbitante como 9999999, pode acontecer de o script travar pela quantidade de skill adicionada).
      Em Vermelho é a quantidade do ITEM que ele vai precisar ter. (Caso for itens como Armors, Legs, Swords, Axes etc... Deixe 1 se for itens agrupáveis como TALONS, SCARAB COINS etc... Você pode colocar de 1 até 100).
       
      -----SCRIPT DO NPC DE KNIGHT------
       
      Vá na pasta data/npc/scripts copie e cole algum arquivo, renomeie para stonedkina.lua e cole isso dentro:
       
       
      <-> As Configurações são as mesmas <->
       
      Em Verde é o ID dos itens que o player vai precisar para ganhar a quantidade de skill.
      Em Azul é o efeito que vai aparecer embaixo do Player. Se quiser deixe com esses efeitos mesmo :D ---(Os efeitos vão de 1 a 68, caso queira vê-los apenas digite /z 1.. 68 com o GOD)
      Em Laranja é a quantidade de EXP de skill o Player vai ganhar ao entregar o ITEM. (Eu aconselho não colocar numero exorbitante como 9999999, pode acontecer de o script travar pela quantidade de skill adicionada).
      Em Vermelho é a quantidade do ITEM que ele vai precisar ter. (Caso for itens como Armors, Legs, Swords, Axes etc... Deixe 1 se for itens agrupáveis como TALONS, SCARAB COINS etc... Você pode colocar de 1 até 100).
       
      Por fim é só Importar os NPC'S pelo mapa Editor e adicionar! :D
       
      Obrigado e Bom uso do script!!!
       
       
    • Por Drafenous
      Fala galera, eu aqui novamente precisando de um help (infelizmente, ou felizmente para os que gostam de ajudar aqui no forum, assim como eu )...
      O problema de agora é o seguinte...
       
      Eu editei alguns itens em meu OT, porém, não consigo fazer eles adicionarem os atributos aos players... Ele aparece na mensagem dizendo que tem o atributo, porém, não adiciona na skill informations dos players.
       
      Segue os itens no items.xml do ot:
      <item id="8925" article="a" name="solar axe"> <attribute key="weight" value="11000" /> <attribute key="defense" value="30" /> <attribute key="attack" value="55" /> <attribute key="SkillAxe" value="3" /> <attribute key="weaponType" value="axe" /> <attribute key="extradef" value="3" /> <attribute key="showattributes" value="1" /> </item> <item id="8927" article="a" name="dark trinity mace"> <attribute key="weight" value="9900" /> <attribute key="defense" value="30" /> <attribute key="attack" value="55" /> <attribute key="weaponType" value="club" /> <attribute key="SkillClub" value="3" /> <attribute key="showattributes" value="1" /> <attribute key="extradef" value="3" /> </item> <item id="8930" article="an" name="emerald sword"> <attribute key="weight" value="4100" /> <attribute key="defense" value="30" /> <attribute key="attack" value="55" /> <attribute key="weaponType" value="sword" /> <attribute key="skillSword" value="3" /> <attribute key="extradef" value="3" /> <attribute key="showattributes" value="1" /> </item> <item id="7958" article="a" name="jester staff"> <attribute key="weight" value="725" /> <attribute key="weaponType" value="club" /> <attribute key="magiclevelpoints" value="3" /> <attribute key="weaponType" value="wand" /> <attribute key="shootType" value="energy" /> <attribute key="range" value="5" /> <attribute key="showattributes" value="1" /> </item> Em weapons.xml está assim:
      <melee id="8930" level="80" unproperly="1" event="function" value="default"/> <vocation name="knight"/> <vocation id="8" showInDescription="0"/> </melee> <melee id="8925" level="80" unproperly="1" event="function" value="default"/> <vocation name="knight"/> <vocation id="8" showInDescription="0"/> </melee> <melee id="8927" level="80" unproperly="1" event="function" value="default"/> <vocation name="knight"/> <vocation id="8" showInDescription="0"/> </melee> <wand id="7958" range="10" lvl="80" mana="10" enabled="1" exhaustion="0" script="1.lua"> <vocation id="1"/> <vocation id="5"/> </wand> Como eu vi na Jester Staff, ele puxa o arquivo 1.lua, então, segue o código do arquivo:
      local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 31) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 30) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.0, -90, 1.6, -150) function onUseWeapon(cid, var) return doCombat(cid, combat, var) end Como dito, quando eu dou look nos itens, eles aparecem que tem o atributo, porém, não adiciona ao player, alguém pode me ajudar? eu dou um rep+ legalzinho a quem conseguir ajudar :3
       
    • Por jeddhemi
      script que estou utilizando trearak.lua: 
       

       
      local tpId = 1387 local tps = {          ["Trearak"] = {pos = {x=32646, y=31307, z=15}, toPos = {x=32689, y=31470, z=13}, time = 60}, }     function removeTp(tp)         local t = getTileItemById(tp.pos, tpId)         if t then                 doRemoveItem(t.uid, 1)                 doSendMagicEffect(tp.pos, CONST_ME_POFF)         end end     function onDeath(cid)         local tp = tps[getCreatureName(cid)]         if tp then                 doCreateTeleport(tpId, tp.toPos, tp.pos)                 doCreatureSay(cid, "O teleport irá sumir em "..tp.time.." segundos.", TALKTYPE_ORANGE_1)                 addEvent(removeTp, tp.time*1000, tp)         end         return TRUE end   <event type="death" name="tp" event="script" value="Trearak.lua"/>   <ali onde esta escrito "tp" eu possuo outro monstro que funciona o script e no events tambem esta com "tp" isso pode interferir em outros script repetir o mesmo evento?  no caso: <event type="death" name="tp" event="script" value="AncientLightDwarvenKingdom.lua"/>    
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo