Hey, i made this script for an special monster. It's just extra damage onstatschange.
I get this Error:
Another Question:
Do I have to register every single monster like the following one or is there an easier way?
Thanks.
Code:
function onStatsChange(cid, attacker, type, combat, value)
if isPlayer(attacker) then
if type == STATSCHANGE_HEALTHLOSS then
if combat == COMBAT_PHYSICALDAMAGE then
local value = value + 100
doTargetCombatHealth(attacker, cid, combat, -value, -value, CONST_ME_DRAWBLOOD)
return false
end
end
end
return true
end
Code:
[Error - CreatureEvent::executeStatsChange] Call stack overflow.
Another Question:
Do I have to register every single monster like the following one or is there an easier way?
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="trainer" nameDescription="a trainer" race="blood" experience="0" speed="0" manacost="600">
<look typeex="5787" head="20" body="30" legs="40" feet="50" corpse="6080"/>
<health now="9900000" max="9900000"/>
<targetchange interval="60000" chance="0"/>
<strategy attack="100" defense="0"/>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="1"/>
<flag staticattack="50"/>
<flag lightlevel="0"/>
<flag lightcolor="0"/>
<flag targetdistance="1"/>
<flag runonhealth="0"/>
</flags>
<script>
<event name="extradamage"/>
</script>
<attacks>
<attack name="melee" interval="5000" min="0" max="-1"/>
</attacks>
<defenses armor="0" defense="0">
<defense name="healing" interval="1" chance="100" min="2400000" max="2400000"/>
</defenses>
</monster>
Thanks.