• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Min and max monsters attacks on custom spell

gldarkk

New Member
Joined
Jul 14, 2014
Messages
6
Reaction score
0
Hi, i want to know how to get "min" and "max" from the monster xml
I dont want to make onCombat, only TargetCombatHealth.

Something like this:
<attack name="test" interval="1000" min="-1" max="-10"/>
Then
function onCastSpell(cid, var)
doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, HERE I GET THE -1, HERE I GET THE -10, 14)
return true
end

I dont want to put the number inside the spell, because im going to use this script more times. Different numbers(make different spells only changing the number is not an option).

var = uid of people inside the spell area(and target)? or maybe the min and max are the variants too?
 
Which server do you use? What are you trying to do exactly? You want a spell to do the same damage as the monster you target at that moment?
 
0.3.6~0.3.7.. Nope, i want to make a monster spell using targetcombathealth but with variants "min" and "max" inside the xml.
Like
<attack name="Fire blow" interval="1000" min="-1" max="-10"/>

function onCastSpell(cid, var)
doTargetCombatHealth(cid, target, COMBAT_FIREDAMAGE, MIN FROM XML, MAX FROM XML, 6)
return true
end

(its not the spell, just a example)
 
Min and max serve no purpose when using a custom spell. You have to make static values in the spell file, alternatively you can (in the spell file) check what monster type the spell caster is, if it's a demon => damage is x,y, etc.

Ignazio
 
Back
Top