KE

Queria Colocar Transformation Na Minha Spell

Por KennyConrad, 26 de ago. de 2011 em Globalevents e Spells

1
623
KennyConradK
26 de agosto de 2011 às 12:38

bom tenho uma spell aki e queria colocar transformation nela pra tipo quando o player usar a magia ser transformado no bixo energy overlord o loktype do bixo é 290 a spell esta ai logo abaixo dai n quero q modifiquem nada no hit dela nen na area de atack so quero que coloquem transformation nela ^^ para o loktype 290

 

 

 

 

 

local combat = createCombatObject()

arr = {

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},

{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},

{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},

{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},

{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},

{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},

{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},

{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},

{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},

{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},

}

 

local area = createCombatArea(arr)

setCombatArea(combat, area)

 

function spellCallback(param)

if param.count > 0 or math.random(0, 1) == 1 then

doSendMagicEffect(param.pos, CONST_ME_MORTAREA)

doAreaCombatHealth(param.cid, COMBAT_DEATHDAMAGE, param.pos, 0, -1500, -7500, CONST_ME_EXPLOSIONHIT)

end

 

if(param.count < 2) then

param.count = param.count + 1

addEvent(spellCallback, math.random(1000, 4000), param)

end

end

 

function onTargetTile(cid, pos)

local param = {}

param.cid = cid

param.pos = pos

param.count = 0

spellCallback(param)

end

 

setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

return doCombat(cid, combat, var)

end