Ir para conteúdo
  • 0

AJUDA A FAZER PASSIVA


guilherme Silva

Pergunta

  • Respostas 32
  • Created
  • Última resposta

Top Posters For This Question

Top Posters For This Question

Posted Images

Posts Recomendados

  • 0

Opa No Caso Voce Quer Criar Uma Passiva Nova Nao e Bom Eu Criei Uma Que Funcionou

 

Primeiro Adicione A Speel Da Passivas Tudo Certinho Como Se Fosse Um Attack !!

 

Va Na Pasta creaturescripts/scripts E Abra o Arquivo exp2.0

 

Puxe Ate O Final Do Script Provavelmente o Script Final Vi Estar Assim :

---------------------------------- Mirror Coat ---------------------------------------
if passivesChances["Mirror Coat"][getCreatureName(cid)] and math.random(1, 80) <= passivesChances["Mirror Coat"][getCreatureName(cid)] then   
   docastspell(cid, "Mirror Coat", 0, 0)
end

 

No End No Final Do Mirror Coat Voce Da Um Espaço Copia A Script Da Mirror e Coloca Assim :

---------------------------------- Confusion ---------------------------------------
if passivesChances["Confusion"][getCreatureName(cid)] and math.random(1, 80) <= passivesChances["Confusion"][getCreatureName(cid)] then   
   docastspell(cid, "Consfusion", 0, 0)
end

 

Em Todo O Script Ficara Assim :

---------------------------------- Mirror Coat ---------------------------------------
if passivesChances["Mirror Coat"][getCreatureName(cid)] and math.random(1, 80) <= passivesChances["Mirror Coat"][getCreatureName(cid)] then   
   docastspell(cid, "Mirror Coat", 0, 0)
end

---------------------------------- Confusion ---------------------------------------
if passivesChances["Confusion"][getCreatureName(cid)] and math.random(1, 80) <= passivesChances["Confusion"][getCreatureName(cid)] then   
   docastspell(cid, "Consfusion", 0, 0)
end

 

Agora Para A Passiva Funcionar Voce Vai Na Pasta lib/configuration.lua e Procure Pelos Attacks Do Pokemon Que Você Quer Que Tenha A Passiva Vou Fazer Um Exemplo :

 

["Shiny Bronzong"] = {move1 = {name = "Bite", level = 60, cd = 15, dist = 1, target = 1, f = 90, t = "dark"},
          move2 = {name = "Psy Ball", level = 100, cd = 15, dist = 10, target = 1, f = 215, t = "psychic"},
          move3 = {name = "Psywave", level = 60, cd = 15, dist = 1, target = 0, f = 115, t = "psychic"},
          move4 = {name = "Psy Pulse", level = 60, cd = 20, dist = 10, target = 1, f = 95, t = "psychic"},
          move5 = {name = "Confusion", level = 60, cd = 35, dist = 1, target = 0, f = 90, t = "psychic"},
          move6 = {name = "Psy Impact", level = 115, cd = 90, dist = 1, target = 0, f = 250, t = "psychic"},
          move7 = {name = "Hypnosis", level = 80, cd = 50, dist = 10, target = 1, f = 0, t = "psychic"},
          move8 = {name = "Psyusion", level = 95, cd = 30, dist = 1, target = 0, f = 120, t = "psychic"},  
          move9 = {name = "Psychic", level = 64, cd = 35, dist = 1, target = 0, f = 130, t = "psychic"},
          move10 = {name = "Psyshock", level = 68, cd = 45, dist = 1, target = 0, f = 115, t = "psychic"}, 
          move11 = {name = "Restore", level = 85, cd = 90, dist = 1, target = 0, f = 0, t = "normal"},
          passive1 = {name = "Stunning Confusion", level = 1, cd = 0, dist = 10, target = 0, f = 80, t = "psychic"},
         },

 

Este E O Shiny Bronzong Do Meu Servidor Depois Do Ultimo Attack Do Pokemon Voce Coloca Esse Script :

 

          passive1 = {name = "Confusion", level = 1, cd = 0, dist = 10, target = 0, f = 80, t = "psychic"},

 

Em f=80 é A Força Da Passiva Do Pokemon Escolhido

 

Agora Continuando No Configuration.lua Desça O Script Ate Essa Parte :

 

passivesChances = {

 

Embaixo Dessa Parte Vai Ter Outras Passivas Mas no Caso Como Iremos Adicionar Uma Nova Entao Aqui No Meu Script Esta Assim :

 

passivesChances = {
["Bone"] = {
                       ["Marowak"] = 15,
                       ["Shiny Marowak"] = 22,
                       ["Cubone"] = 10,
                       ["Shiny Cubone"] = 15,
                   },

 

Eu Irei Copiar Essa Parte :

 

["Bone"] = {
                       ["Marowak"] = 15,
                       ["Shiny Marowak"] = 22,
                       ["Cubone"] = 10,
                       ["Shiny Cubone"] = 15,
                   },

 

E Depois Do }, Voce Da Um Espaço E Cola E Voçê Fará Assim :

 

["Confusion"] = {
                       ["Nome Do Pokemon Que Ganhará A Passiva "] = 15,
                   },

 

Sendo Assim O Script No Final Ficará Assim :

 

passivesChances = {
["Bone"] = {
                       ["Marowak"] = 15,
                       ["Shiny Marowak"] = 22,
                       ["Cubone"] = 10,
                       ["Shiny Cubone"] = 15,
                   },

 

["Confusion"] = {
                       ["Nome Do Pokemon Que Ganhará A Passiva "] = 15,
                   },

 

E Pronto Sua Passiva Será Adicionada Se Funcionar Me Responda Aqui Mesmo Espero Ter Ajudado ^^

 

 

Link para o comentário
Compartilhar em outros sites

  • 0
Agora, Thalles Vitor disse:

Sua resposta é ótima, só achei desnecessário o uso de caps lock em algumas letras e podia organizar um pouquinho melhor kk

Sim essa e a primeira vez que eu ajudo alguem aqui no xtibia kkk

Link para o comentário
Compartilhar em outros sites

  • 0
Em 30/12/2018 em 21:15, Thalles Vitor disse:

elseif spell == "Confusion" or spell == "Night Shade" then

    local rounds = math.random(4, 7)       --rever area...
    rounds = rounds + math.floor(getMasterLevel(cid) / 35)
    
    if spell == "Confusion" then
       dano = psyDmg             --alterado v1.4
    else
       dano = ghostDmg
    end

	local ret = {}
    ret.id = 0
    ret.check = 0
    ret.cd = rounds
    

    doMoveInArea2(cid, 136, selfArea1, dano, min, max, spell, ret)

 

eu fiz tudo certinho que voces colocaram mais quando eu coloco esse scritp da error

 

Link para o comentário
Compartilhar em outros sites

  • 0

[01/01/2019 23:50:45] [Error - LuaScriptInterface::loadFile] data/lib/pokemon moves.lua:5124: unexpected symbol near '?'
[01/01/2019 23:50:45] [Warning - LuaScriptInterface::initState] Cannot load data/lib/
[01/01/2019 23:50:46] [Error - LuaScriptInterface::loadFile] data/lib/pokemon moves.lua:5124: unexpected symbol near '?'
[01/01/2019 23:50:46] [Warning - LuaScriptInterface::initState] Cannot load data/lib/

 

o error e nesse script ai em cima!

Link para o comentário
Compartilhar em outros sites

  • 0

faz assim da ctrl + g e digita 5124 e ve se tem algum ? no script se tiver remova-o

ou troque o script por este

 

elseif spell == "Confusion" then

      if getPlayerStorageValue(cid, 32623) == 1 then  --proteçao pra n usar a spell 2x seguidas...
      return true
      end
      
      local function damage(cid)
      if isCreature(cid) then
         doAreaCombatHealth(cid, PSYCHICDAMAGE, getThingPosWithDebug(cid), bombWee3, -min, -max, 136)
      end
      end
          
      setPlayerStorageValue(cid, 32623, 1)        --proteçao
      for i = 1, 7 do
          addEvent(damage, i*500, cid)
      end
      addEvent(setPlayerStorageValue, 3500, cid, 32623, 0)        --proteçao
         setPlayerStorageValue(cid, 98654, 1)

Link para o comentário
Compartilhar em outros sites


×
×
  • Criar Novo...