Ir para conteúdo

Magia De 5 Hits


coyotestark

Posts Recomendados

Alguem conseguiria Fazer esta magia dar 5 hits, tipo. 5 disparos de Gelo com area no inimigo, eu to tentando aki mas nao sei como fazer e nao importa como eu faça da errado, com nao sou esperiente.

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0.6, 0, -0.7, 0)

local distanceCombat = createCombatObject()
setCombatParam(distanceCombat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(distanceCombat, COMBAT_PARAM_EFFECT, 65)
setCombatParam(distanceCombat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE)
setCombatFormula(distanceCombat, COMBAT_FORMULA_LEVELMAGIC, -0.6, 0, -0.7, 0)

function onCastSpell(cid, var)
if(variantToNumber(var) ~= 0) then
	return doCombat(cid, distanceCombat, var)
end
return doCombat(cid, combat, var)
end

 

Este script eh de outro Ot de Wodbo, mas nao Serv pois A magia nao tem Exaust e nem come mana, a magia simplesmente nao para.

 

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 233)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 48)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -3.9, 0, -4.7, 0)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 233)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 48)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -3.9, 0, -4.7, 0)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 233)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 48)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -3.9, 0, -4.7, 0)



local function onCastSpell1(parameters)
   doCombat(parameters.cid, parameters.combat1, parameters.var)
end

local function onCastSpell2(parameters)
   doCombat(parameters.cid, parameters.combat2, parameters.var)
end

local function onCastSpell3(parameters)
   doCombat(parameters.cid, parameters.combat3, parameters.var)
end



function onCastSpell(cid, var)

local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, }
       doPlayerSay(cid, 'Bara!', TALKTYPE_ORANGE_1)   
addEvent(onCastSpell1, 0, parameters)      
addEvent(onCastSpell2, 300, parameters)       
addEvent(onCastSpell3, 600, parameters)       
       doPlayerSay(cid, 'bomb!', TALKTYPE_ORANGE_1)     



end

 

 

consegui colocar exaust e gastar mana entre primeiro e segundo instant, momento em que aperto a hotkey, no entanto as magias ainda saem 3 magias rapidas em menos de um segundo

, continuarei a tentar aki, la vai o script de como ta a magia agora.

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 14)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 5)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -4.5, 0, -4.5, 0)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 14)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 5)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -4.5, 0, -5.5, 0)







local function onCastSpell1(parameters)
   doCombat(parameters.cid, parameters.combat1, parameters.var)
end

local function onCastSpell2(parameters)
   doCombat(parameters.cid, parameters.combat2, parameters.var)
end





function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, }
if(variantToNumber(var) ~= 0) then
addEvent(onCastSpell1, 0, parameters)    
addEvent(onCastSpell2, 1000, parameters)       
    return true 
end



end

Espero que alguem possa ajudar, obrigado.

Editado por CoyoteStark
Link para o comentário
Compartilhar em outros sites

Coyote, eu não entendi sua pergunta, você quer uma magia que solte 5 hits? Igual super hell granade por exemplo, que vai 10, você quer que solte 5? Se for isso ai está o script:

 

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 10)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 46)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.2, 0, -1.3, 0)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 10)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 46)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1.2, 0, -1.3, 0)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 10)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 46)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -1.2, 0, -1.3, 0)

local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 10)
setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 46)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -1.2, 0, -1.3, 0)

local combat5 = createCombatObject()
setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat5, COMBAT_PARAM_EFFECT, 10)
setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, 46)
setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -1.2, 0, -1.3, 0)



local function onCastSpell1(parameters)
   doCombat(parameters.cid, parameters.combat1, parameters.var)
end

local function onCastSpell2(parameters)
   doCombat(parameters.cid, parameters.combat2, parameters.var)
end

local function onCastSpell3(parameters)
   doCombat(parameters.cid, parameters.combat3, parameters.var)
end

local function onCastSpell4(parameters)
     doCombat(parameters.cid, parameters.combat4, parameters.var)
end

local function onCastSpell5(parameters)
   doCombat(parameters.cid, parameters.combat5, parameters.var)
end




function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4, combat5 = combat5 }
addEvent(onCastSpell1, 0, parameters)    
addEvent(onCastSpell2, 300, parameters)       
addEvent(onCastSpell3, 600, parameters)       
addEvent(onCastSpell4, 900, parameters)       
addEvent(onCastSpell5, 1200, parameters)    


end


 

Obs: No COMBAT_PARAM_EFFECT e no COMBAT_PARAM_DISTANCEEFFECT você pode colocar o efeito desejado. Se for outro tipo que você queria, pode falar que eu tento te ajudar.

Flws

Link para o comentário
Compartilhar em outros sites

Dragon esa magia eh a mesma que mostrei praticamente mas se vc nao sabe essas magias nao tem Exaust e nem tira mana no tibia.

Mas ja consegui Fazer to taoooooo Feliz fiquei 3 horas Fuçando olhando analisando ate que consegui Algo que nuuunca vi em nenhum ot de Tibia so em Wodbo.

pode Fechar o Topico

Link para o comentário
Compartilhar em outros sites

na parte do

 function onCastSpell

adiciona isto

 	return doCombat(cid, combat5, var)     

vai ficar assim

 

local combat1 = createCombatObject() 
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) 
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 10) 
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 46) 
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.2, 0, -1.3, 0) 

local combat2 = createCombatObject() 
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) 
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 10) 
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 46) 
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1.2, 0, -1.3, 0) 

local combat3 = createCombatObject() 
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) 
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 10) 
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 46) 
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -1.2, 0, -1.3, 0) 

local combat4 = createCombatObject() 
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) 
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 10) 
setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 46) 
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -1.2, 0, -1.3, 0) 

local combat5 = createCombatObject() 
setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) 
setCombatParam(combat5, COMBAT_PARAM_EFFECT, 10) 
setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, 46) 
setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -1.2, 0, -1.3, 0) 



local function onCastSpell1(parameters) 
   doCombat(parameters.cid, parameters.combat1, parameters.var) 
end 

local function onCastSpell2(parameters) 
   doCombat(parameters.cid, parameters.combat2, parameters.var) 
end 

local function onCastSpell3(parameters) 
   doCombat(parameters.cid, parameters.combat3, parameters.var) 
end 

local function onCastSpell4(parameters) 
     doCombat(parameters.cid, parameters.combat4, parameters.var) 
end 

local function onCastSpell5(parameters) 
   doCombat(parameters.cid, parameters.combat5, parameters.var) 
end 




function onCastSpell(cid, var) 
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, combat4 = combat4, combat5 = combat5 }
addEvent(onCastSpell1, 0, parameters)     
addEvent(onCastSpell2, 300, parameters)        
addEvent(onCastSpell3, 600, parameters)        
addEvent(onCastSpell4, 900, parameters)        
addEvent(onCastSpell5, 1200, parameters)
return doCombat(cid, combat5, var)     


end

 

 

eu coloquei isto aqui no meu ot e fico tudo certo

Editado por marcuserp
Link para o comentário
Compartilhar em outros sites

eh eu nao tinha pensado nisso, o meu ta funfando mas vou testar isso.

bom o meu ta assim.

eh so mudar o efeito. aki ta funfando de boa.

 

eu adicionei esta tag que vi no spell original.

 

        if(variantToNumber(var) ~= 3) then

 

ai esta o script completo.

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 6)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 4)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.0, 0, -1.5, 0)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 6)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 4)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1.0, 0, -1.5, 0)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 6)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 4)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -1.0, 0, -1.5, 0)



local function onCastSpell1(parameters)
   doCombat(parameters.cid, parameters.combat1, parameters.var)
end

local function onCastSpell2(parameters)
   doCombat(parameters.cid, parameters.combat2, parameters.var)
end

local function onCastSpell3(parameters)
   doCombat(parameters.cid, parameters.combat3, parameters.var)
end



function onCastSpell(cid, var)

local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3, }
if(variantToNumber(var) ~= 3) then
addEvent(onCastSpell1, 0, parameters)      
addEvent(onCastSpell2, 300, parameters)       
addEvent(onCastSpell3, 600, parameters)       

     return true 
end




end

Editado por CoyoteStark
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...