Ir para conteúdo

[Spell] Dúvida Sobre Minha Spell


beckerz

Posts Recomendados

Minha dúvida é por que minha spell não funciona...é uma spell para pokemon otserver,para o pokemon hitmonlee usar um outro outfit (301) no qual ele meche as pernas e ataca todos ao redor,porém ela não funciona!Me ajudem a arumar!

 

Spell:

 

local Hitmonlee = {lookType = 301}

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0.3, -2, 0.4, -4)

 

arr = {

{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, 0, 0, 0},

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

{0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0},

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

}

local area = createCombatArea(arr)

setCombatArea(combat, area)

 

function onCastSpell(cid, var)

local parameters = { cid = cid, var = var}

if getCreatureOutfit(cid).lookType == 20 then

doSetCreatureOutfit(cid, hitmonlee, -1)

end

doCombat(cid, combat, var)

addEvent(doCombat, 1500, cid, combat, var)

addEvent(doCombat, 3000, cid, combat, var)

addEvent(doCombat, 4500, cid, combat, var)

addEvent(doCombat, 6000, cid, combat, var)

addEvent(doCombat, 7500, cid, combat, var)

addEvent(doCombat, 9000, cid, combat, var)

addEvent(doCombat, 10500, cid, combat, var)

addEvent(doCombat, 12000, cid, combat, var)

addEvent(doRemoveCondition, 12700, cid, CONDITION_OUTFIT)

return true

end

 

XML:

 

</instant>

<instant name="hitmonlee" words="attack hitmonlee" lvl="3000" mana="100" prem="1" exhaustion="2000" needlearn="0" event="script" value="attack/hitmonlee.lua">

 

Monster Spell:

 

	</attack>
   <attack name="attack hitmonlee" interval="1000" chance="100" min="-80" max="-90">
</attack>

Link para o comentário
Compartilhar em outros sites

local Hitmonlee = {lookType = 301}

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0.3, -2, 0.4, -4)

 

arr = {

{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, 0, 0, 0},

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

{0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0},

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

}

local area = createCombatArea(arr)

setCombatArea(combat, area)

 

function onCastSpell(cid, var)

local parameters = { cid = cid, var = var}

if getCreatureOutfit(cid).lookType == 20 then

doSetCreatureOutfit(cid, hitmonlee, -1)

addEvent(doCombat, 1500, cid, combat, var)

addEvent(doCombat, 3000, cid, combat, var)

addEvent(doCombat, 4500, cid, combat, var)

addEvent(doCombat, 6000, cid, combat, var)

addEvent(doCombat, 7500, cid, combat, var)

addEvent(doCombat, 9000, cid, combat, var)

addEvent(doCombat, 10500, cid, combat, var)

addEvent(doCombat, 12000, cid, combat, var)

addEvent(doRemoveCondition, 12700, cid, CONDITION_OUTFIT)

return doCombat(cid, combat, var)

end

 

tenta assim....eu nao testei,se nao der usa sua magia normal so que tire 1 end ( o primeiro )

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

×
×
  • Criar Novo...