IncendiusDamaged.lua
I used to have more elaborate with spawns depending on the creatures health and storage value to not make it spawn more than 1.. but I've stripped it down quite a bit to stop it from crashing. (It doesn't matter what monster im trying to spawn it always crashes) But I'll paste it anyway:
essence of incendius.xml
It works to summon fine with /m essence of incendius
There must be something improper with doing doCreateMonster() from a statschange script or something..
Thankful for help
Lua:
local spawn = {x = 648, y = 514, z = 7}
local curStorage = getStorage(35013)
local monster = "Essence of Incendius"
function onStatsChange(cid, attacker, type, combat, value)
local hp = math.floor((getCreatureHealth(cid)/100000)*100)
if hp <90 then doCreateMonster(monster,spawn) end
return true
end
I used to have more elaborate with spawns depending on the creatures health and storage value to not make it spawn more than 1.. but I've stripped it down quite a bit to stop it from crashing. (It doesn't matter what monster im trying to spawn it always crashes) But I'll paste it anyway:
essence of incendius.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Essence of Incendius" nameDescription="an essence of incendius" race="fire" experience="0" speed="200" manacost="0">
<health now="1" max="1"/>
<look type="49"/>
<targetchange interval="5000" chance="8"/>
<strategy attack="100" defense="0"/>
<flags>
<flag summonable="0"/>
<flag attackable="0"/>
<flag hostile="1"/>
<flag illusionable="1"/>
<flag convinceable="1"/>
<flag pushable="0"/>
<flag canpushitems="1"/>
<flag canpushcreatures="0"/>
<flag targetdistance="1"/>
<flag staticattack="60"/>
<flag runonhealth="0"/>
</flags>
<attacks>
</attacks>
<defenses armor="18" defense="20"/>
</monster>
It works to summon fine with /m essence of incendius
There must be something improper with doing doCreateMonster() from a statschange script or something..
Thankful for help