Ir para conteúdo
  • 0

Magia não está hitando


juliok80

Pergunta

Galera, adicionei algumas magias em um monstro que editei, porém a magia não está hitando nada... o monstro usa a magia, porém não tira nem 1 de hp do target.

 

OBS: Se um player usa a magia, ela hita normal... só para montros que não está funcionando!

 

Magia em data\spells\scripts\attack:

 


local combatx = createCombatObject()
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 255)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 37)
setCombatFormula(combat1, COMBAT_FORMULA_SKILL, -1.0, -1, -1, -1)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 48)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1.3, -30, -1.6, 0)
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 49)
local arr1 = {
{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, 1, 0, 1, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 0, 3, 0, 1, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
{0, 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}
}
local arr2 = {
{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, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 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, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
local arr3 = {
{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, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 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, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local areax = createCombatArea(arr1)
setCombatArea(combatx, area1)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
function onTargetTile(cid, pos)
							doCombat(cid,combat1,positionToVariant(pos))
end
setCombatCallback(combatx, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
local function onCastSpell1(parameters)
							doCombat(parameters.cid, combatx, parameters.var)
end
local function onCastSpell2(parameters)
							doCombat(parameters.cid, combat2, parameters.var)
end
local function onCastSpell3(parameters)
							doCombat(parameters.cid, combat3, parameters.var)
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 300, parameters)
addEvent(onCastSpell2, 100, parameters)
addEvent(onCastSpell3, 80, parameters)
end

 

 

Magia em data\spells\spells.xml:

 


<instant name="groundshock" words="groundshock" lvl="16" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="0" event="script" value="attack/groundshock.lua">
<vocation id="0"/>
</instant>

 

 

Monster:

 


<?xml version="1.0" encoding="UTF-8"?>
<monster name="Guarda Costas Do GOD" nameDescription="Guarda Costas Do GOD" race="blood" experience="4000200" speed="400" manacost="0">
 <health now="6000200" max="6000200"/>  
 <!--<look type="367" body="78" feet="48" head="39"  legs="114"  addons="3" corpse="6080"/>-->
 <look type="12" head="20" body="30" legs="114" feet="50" corpse="5527"/>
 <targetchange interval="5000" chance="8"/>
 <strategy attack="100" defense="0"/>
 <flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="1"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="1"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="0"/>	
 </flags>
<attacks>
<attack type="instant" name="Groundshock" interval="500" chance="5" range="6" target="1" radius="4" min="-3270" max="-4150"/>
 </attacks>
<defenses armor="20" defense="20">
<defense name="healing" interval="1000" chance="25" min="102" max="300">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
<defense name="outfit" interval="1" chance="50" monster="ghazbaran" duration="6000">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
<defense name="outfit" interval="1" chance="50" monster="Undead Morgaroth" duration="6000">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
<defense name="outfit" interval="1" chance="50" monster="Swamp Morgaroth" duration="6000">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
<defense name="outfit" interval="1" chance="50" monster="Morgaroth Girl" duration="6000">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
</defenses>
 <immunities>
<immunity physical="0"/>
<immunity energy="0"/>
<immunity fire="0"/>
<immunity poison="0"/>
<immunity lifedrain="0"/>
<immunity paralyze="1"/>
<immunity outfit="1"/>
<immunity drunk="1"/>
<immunity invisible="1"/>
 </immunities>
 <voices interval="9000" chance="10">
<voice sentence="Já chegou o disco voador!"/>
 </voices>
 <loot capacity="1000">
<item id="2503" chance="1000"/>
<item id="2502" chance="1500"/>
<item id="2504" chance="2000"/>
<item id="8855" chance="2000"/>
<item id="7423" chance="2000"/>
<item id="7958" chance="1000"/>
<item id="3983" chance="1500"/>
<item id="3972" chance="1000"/>
<item id="7890" chance="2000"/>
<item id="1988" chance="2000">
<inside>
<item id="2160" countmax="3" chance="1000"/>
<item id="7414" chance="2000"/>
<item id="7735" chance="2000"/>
<item id="6571" chance="6571"/>
</inside>
</item>
</loot>
</monster>

 

Alguém me ajuda aqui PLS! cry.gif

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

13 respostass a esta questão

Posts Recomendados

  • 0

Ele manda os efeitos e tudo ? da algum erro?

 

 

local combatx = createCombatObject()
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 255)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 37)
setCombatFormula(combat1, COMBAT_FORMULA_SKILL, -1, -1, -1, -1)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 48)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1.3, -30, -1.6, -1)
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 49)
local arr1 = {
{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, 1, 0, 1,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local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local areax = createCombatArea(arr1)
setCombatArea(combatx, area1)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
function onTargetTile(cid, pos)
															doCombat(cid,combat1,positionToVariant(pos))
end
setCombatCallback(combatx, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
local function onCastSpell1(parameters)
															doCombat(parameters.cid, combatx, parameters.var)
end
local function onCastSpell2(parameters)
															doCombat(parameters.cid, combat2, parameters.var)
end
local function onCastSpell3(parameters)
															doCombat(parameters.cid, combat3, parameters.var)
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 300, parameters)
addEvent(onCastSpell2, 100, parameters)
addEvent(onCastSpell3, 80, parameters)
end

 

 

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

  • 0

Sim, o monstro usa a magia normal, só que quando acerta o alvo não hita nada, não dá nenhum erro na distro... olha, fiz até uma gif, mas não sei se vai dar pra ver.



 

Tirei o ataque melee e todas as outras magias do monstro, só para a demonstração.

guardacostasdogod.gif

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

  • 0

Tenta isso

 

 

local combatx = createCombatObject()
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 255)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 37)
setCombatFormula(combat1, COMBAT_FORMULA_SKILL, -1, -1, -1, -1)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 48)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1.3, -30, -1.6, -1)
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 49)
local arr1 = {
{0, 0, 0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, 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 area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local areax = createCombatArea(arr1)
setCombatArea(combatx, area1)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
function onTargetTile(cid, pos)
                                                                                                                               doCombat(cid,combat1,positionToVariant(pos))
end
setCombatCallback(combatx, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
local function onCastSpell1(parameters)
                                                                                                                               doCombat(parameters.cid, combatx, parameters.var)
end
local function onCastSpell2(parameters)
                                                                                                                               doCombat(parameters.cid, combat2, parameters.var)
end
local function onCastSpell3(parameters)
                                                                                                                               doCombat(parameters.cid, combat3, parameters.var)
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 300, parameters)
addEvent(onCastSpell2, 100, parameters)
addEvent(onCastSpell3, 80, parameters)
end

 

Link para o comentário
Compartilhar em outros sites

  • 0

Bom era isso que eu ia dizer, mas o min=" " max=" " do monstro não serve então ?

 

@topic

 

tenta mudar o atk do seu monstro assim

<attacks>

 

<attack name="Groundshock" interval="500" chance="5" target="0" radius="8" min="-3270" max="-4150"/>

</attacks>

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

  • 0

MANO EU MODIFIQUEI A FORMULA DA SPELLS TENTE ASSIM PRA VER SE VAI DAR

 

 

local combatx = createCombatObject()

local combat1 = createCombatObject()

setCombatParam(combat1, COMBAT_PARAM_EFFECT, 255)

setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 37)

setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.0, -1, -1, -1)

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat2, COMBAT_PARAM_EFFECT, 48)

setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1.3, -30, -1.6, 0)

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)

setCombatParam(combat3, COMBAT_PARAM_EFFECT, 49)

local arr1 = {

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

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

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

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

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

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

}

local arr2 = {

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

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

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

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

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

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

}

local arr3 = {

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

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

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

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

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

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

}

local area1 = createCombatArea(arr1)

local area2 = createCombatArea(arr2)

local area3 = createCombatArea(arr3)

local areax = createCombatArea(arr1)

setCombatArea(combatx, area1)

setCombatArea(combat1, area1)

setCombatArea(combat2, area2)

setCombatArea(combat3, area3)

function onTargetTile(cid, pos)

doCombat(cid,combat1,positionToVariant(pos))

end

setCombatCallback(combatx, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

local function onCastSpell1(parameters)

doCombat(parameters.cid, combatx, parameters.var)

end

local function onCastSpell2(parameters)

doCombat(parameters.cid, combat2, parameters.var)

end

local function onCastSpell3(parameters)

doCombat(parameters.cid, combat3, parameters.var)

end

function onCastSpell(cid, var)

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

addEvent(onCastSpell1, 300, parameters)

addEvent(onCastSpell2, 100, parameters)

addEvent(onCastSpell3, 80, parameters)

end

 

Link para o comentário
Compartilhar em outros sites

  • 0

Prontinho...

local combatx = createCombatObject()
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 255)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 37)
setCombatFormula(combat1, CCOMBAT_FORMULA_DAMAGE, -1000, -1000, -1000, -1000)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 48)
setCombatFormula(combat2, COMBAT_FORMULA_DAMAGE, -1000, -1000, -1000, 1000)
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 49)
local arr1 = {
{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, 1, 0, 1, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 0, 3, 0, 1, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
{0, 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}
}
local arr2 = {
{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, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 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, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
local arr3 = {
{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, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 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, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local areax = createCombatArea(arr1)
setCombatArea(combatx, area1)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
function onTargetTile(cid, pos)
															doCombat(cid,combat1,positionToVariant(pos))
end
setCombatCallback(combatx, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
local function onCastSpell1(parameters)
															doCombat(parameters.cid, combatx, parameters.var)
end
local function onCastSpell2(parameters)
															doCombat(parameters.cid, combat2, parameters.var)
end
local function onCastSpell3(parameters)
															doCombat(parameters.cid, combat3, parameters.var)
end
function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 300, parameters)
addEvent(onCastSpell2, 100, parameters)
addEvent(onCastSpell3, 80, parameters)
end

 

 

Dai os aumentar o dano eu acredito que vc saiba fazer, se não souber só xama ae ;]

 

Deu um trabalhinho testando

 

Rep plx

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

×
×
  • Criar Novo...