otxserver
otxserver copied to clipboard
Monster attack duplicated
Hello how are you?
I'm currently doing the spells for my monsters and I ended up finding something in the monsters.
When using some spell with for k = 1, 10
.
on monsters, each hit of these will double the damage value, if the monster uses some other spell, even melee.
I made a video demonstrating a little: https://youtu.be/1jICEP7y1g4
The melee value was high just to test and demonstrate the values of the other spell being doubled!
<attack name="melee" interval="500" min="-40030" max="-80030"/>
<attack name="oozaruxx23" interval="2000" chance="80" range="3" min="-100" max="-200"/>
(this is the spell that is using a for k = 1.10 do
to symbolize 10 hits)
in the video you can see that the hits are increasing thankfully.
the higher the melee attack or any other spell, the spell that uses for
would be doubling the values
The script is wrong.
You created a spell, made the monster cast every 2sec, with 80% chance. You need to do a check in script, to see if the spell is already running, or will be looping every 2seg
How should I do this check? could you help me?
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_ORANGE)
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 20)
function onCastSpell(cid, var)
for i = 1, 5 do
addEvent(function()
if isCreature(cid) then
doCombat(cid, combat1, var)
end
end, i * 300)
end
return true
end