Ir para conteúdo
  • Cadastre-se

Posts Recomendados

queria poder unir uma spell a um comando mas não consigo fazer a spell funcionar

spell

Citar

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_RED)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 87)

 

local arr1 = {
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{1, 2, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
}

local area1 = createCombatArea(arr1)

setCombatArea(combat1, area1)

local combat10 = createCombatObject()
setCombatParam(combat10, COMBAT_PARAM_HITCOLOR, COLOR_RED)
setCombatParam(combat10, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat10, COMBAT_PARAM_EFFECT, 88)

 

local arr10 = {
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 1, 1, 1, 0, 2},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
}

local area10 = createCombatArea(arr10)

setCombatArea(combat10, area10)

local combat100 = createCombatObject()
setCombatParam(combat100, COMBAT_PARAM_HITCOLOR, COLOR_RED)
setCombatParam(combat100, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat100, COMBAT_PARAM_EFFECT, 89)

 

local arr100 = {
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{1, 0, 0, 0, 0, 2},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
}

local area100 = createCombatArea(arr100)

setCombatArea(combat100, area100)


local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_HITCOLOR, COLOR_RED)
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 89)

 

local arr2 = {
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{2, 1, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
}

local area2 = createCombatArea(arr2)

setCombatArea(combat2, area2)

local combat20 = createCombatObject()
setCombatParam(combat20, COMBAT_PARAM_HITCOLOR, COLOR_RED)
setCombatParam(combat20, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat20, COMBAT_PARAM_EFFECT, 88)

 

local arr20 = {
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 2, 0, 1, 1, 1},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
}

local area20 = createCombatArea(arr20)

setCombatArea(combat20, area20)

local combat200 = createCombatObject()
setCombatParam(combat200, COMBAT_PARAM_HITCOLOR, COLOR_RED)
setCombatParam(combat200, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat200, COMBAT_PARAM_EFFECT, 87)

 

local arr200 = {
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{2, 0, 0, 0, 0, 1},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
}

local area200 = createCombatArea(arr200)

setCombatArea(combat200, area200)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_HITCOLOR, COLOR_RED)
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 92)

 


local arr3 = {
{0, 0, 0, 0, 0},
{0, 0, 0, 2, 0},
{0, 0, 0, 1, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
}

local area3 = createCombatArea(arr3)

setCombatArea(combat3, area3)

local combat30 = createCombatObject()
setCombatParam(combat30, COMBAT_PARAM_HITCOLOR, COLOR_RED)
setCombatParam(combat30, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat30, COMBAT_PARAM_EFFECT, 91)

 

local arr30 = {
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 2, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
}

local area30 = createCombatArea(arr30)

setCombatArea(combat30, area30)


local combat300 = createCombatObject()
setCombatParam(combat300, COMBAT_PARAM_HITCOLOR, COLOR_RED)
setCombatParam(combat300, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat300, COMBAT_PARAM_EFFECT, 90)

 

local arr300 = {
{0, 0, 2, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
}

local area300 = createCombatArea(arr300)

setCombatArea(combat300, area300)

local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_HITCOLOR, COLOR_RED)
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 90)

 

local arr4 = {
{0, 0, 0, 0, 0},
{0, 0, 0, 1, 0},
{0, 0, 0, 2, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
}

local area4 = createCombatArea(arr4)

setCombatArea(combat4, area4)

local combat40 = createCombatObject()
setCombatParam(combat40, COMBAT_PARAM_HITCOLOR, COLOR_RED)
setCombatParam(combat40, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat40, COMBAT_PARAM_EFFECT, 91)

 

local arr40 = {
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 1, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 2, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
{0, 0, 0, 0, 0},
}

local area40 = createCombatArea(arr40)

setCombatArea(combat40, area40)

local combat400 = createCombatObject()
setCombatParam(combat400, COMBAT_PARAM_HITCOLOR, COLOR_RED)
setCombatParam(combat400, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat400, COMBAT_PARAM_EFFECT, 92)

 

local arr400 = {
{0, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 2, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
}

local area400 = createCombatArea(arr400)

setCombatArea(combat400, area400)

function haq(cid)
if getCreatureLookDirection(cid) == 1 then
doCombat(cid, combat1, numberToVariant(cid))
doCombat(cid, combat10, numberToVariant(cid))
doCombat(cid, combat100, numberToVariant(cid))
doPlayerSay(cid, 'Haaaa!', TALKTYPE_ORANGE_1) 
elseif getCreatureLookDirection(cid) == 2 then
         doCombat(cid, combat4, numberToVariant(cid))
doCombat(cid, combat40, numberToVariant(cid))
doCombat(cid, combat400, numberToVariant(cid))
doPlayerSay(cid, 'Haaaa!', TALKTYPE_ORANGE_1) 
elseif getCreatureLookDirection(cid) == 3 then
         doCombat(cid, combat2, numberToVariant(cid))
doCombat(cid, combat20, numberToVariant(cid))
doCombat(cid, combat200, numberToVariant(cid))
doPlayerSay(cid, 'Haaaa!', TALKTYPE_ORANGE_1) 
elseif getCreatureLookDirection(cid) == 0 then
         doCombat(cid, combat3, numberToVariant(cid))
doCombat(cid, combat30, numberToVariant(cid))
doCombat(cid, combat300, numberToVariant(cid))
  doPlayerSay(cid, 'Haaaa!', TALKTYPE_ORANGE_1) 
      end
end
function ma2q(cid)       
        doPlayerSay(cid, 'Me...!', TALKTYPE_ORANGE_1)                 
            addEvent(haq,0,cid)
      end
function ha2q(cid)       
        doPlayerSay(cid, 'Ha!...', TALKTYPE_ORANGE_1)                 
            addEvent(ma2q,0,cid)
      end
function maq(cid)       
        doPlayerSay(cid, 'Me!...', TALKTYPE_ORANGE_1)                 
            addEvent(ha2q,0,cid)
      end
function kaq(cid)       
        doPlayerSay(cid, 'Ka!...', TALKTYPE_ORANGE_1)                 
            addEvent(maq,0,cid)
      end
function onCastSpell(cid, var)
      addEvent(kaq,0,cid)
      return true
end

function

Citar

function getCombatFormulas(cid, lv, maglv)
   local formula_min = ((lv*20 + maglv*3) * -1.2)
   local formula_max = ((lv*20 + maglv*3) * -1.4)

   if(formula_max < formula_min) then
       local tmp = formula_max
       formula_max = formula_min
       formula_min = tmp
   end
   return formula_min, formula_max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")

 

 

Queria adcionar essa função pois ela me facilita no calculo do dano, alguém pode me ajudar?

alguém??

 

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por LasseXeterno
      Então, estou tentando adicionar uma nova "race" no meu Ot de base Cyan, tentei seguir 3 tutoriais aqui do tibiaking, um sobre race, porém nos códigos do meu servidor não tem o constant.h e nem o monster.cpp. E o outro tutorial, eu fiz tudo que ele pediu e quando entrei no game para testar, funcionava os golpes e as imunidades, porém não aparecia o número do dano e nem a cor.  Usei esse tutorial como base: 
      Pois ele é derivado. E o outro tutorial que usei foi: 
      Porém nesse, não consegui achar a const.h, e quando fui nos arquivos do creaturescript e adicionei uma cor nova a "COLOR_FAIRY", quando abro o jogo, os pokemons que seriam teoricamente "fada", o que eu usei de teste foi a Clefable. A Clefable tomava IK e dava IK no seu atk do tipo fada. 
      Além de que, o meu erro principal é esse: Warning - Monsters::loadMonster] Unknown race type fairy. (data/monster/pokes/geracao 1/Clefable.xml)
       Pois como eu já disse, não consigo achar onde adicionar uma nova race.

    • Por yuriowns
      Salve rapazes, tranquilo? Preciso de ajuda pra colocar para os npc's que vendem pots verificarem quantos itens possuem no tile em que o player está e se tiver com +80 itens no sqm, o npc avisa e não vende nada até o player ir em um sqm com menos de 80 itens no chão.
       
    • Por A.Mokk
      .Qual servidor ou website você utiliza como base? 
      TFS 0.4
      Qual o motivo deste tópico? 
      Bom pessoal, a algumas semanas atras eu joguei um servidor que havia sistema de imbuimento sendo 8.60, no servidor se utilizava a spellwand para encantar as armas, os comandos eram dado no canal Imbuiment... Gostaria de saber se alguém teria como disponibilizar algum sistema de imbuimento, já procurei pra caramba aqui no fórum mas tudo que encontro é pra versões acima da que eu uso.
       
    • Por Mateus Robeerto
      Não sei se aqui é a área ou algum local para solicitar a alteração do email antigo... Não lembro mais a senha dele, nem a resposta secreta para acessar. Peço a algum administrador ou moderador para, por favor, alterar o email para o novo.
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo