local function createExplosive(MapID, InstanceID, TargetID) local x, y, z = unit.GetPosition(MapID, InstanceID, TargetID) local cid = map.MapCreateColCreature(MapID, InstanceID, 1086548, x, y, z, 1, "") unit.AddBuff(MapID, InstanceID, cid, 3508701, cid) cre.SetCreatureScriptData(MapID, InstanceID, TargetID, 1, 1, 1) end function c1086542_OnDie(MapID, InstanceID, TargetID, TypeID, KillerID) createExplosive(MapID, InstanceID, TargetID) end aux.RegisterCreatureEvent(1086542, 4, "c1086542_OnDie") function c1086542_OnDisappear(MapID, InstanceID, TargetID, TypeID) local processed = cre.GetCreatureScriptData(MapID, InstanceID, TargetID, 1, 1) if processed ~= 1 then createExplosive(MapID, InstanceID, TargetID) end end aux.RegisterCreatureEvent(1086542, 13, "c1086542_OnDisappear")