void main() { object oTarget = GetItemActivatedTarget(); location lTarget = GetLocation(oTarget); object oPC = GetItemActivator(); { if (!GetIsPC(oPC)) return; //Check to make sure the target is dead first if (GetIsObjectValid(oTarget)) { SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_RESURRECTION, FALSE)); if (GetIsDead(oTarget)) { //Effect to be used effect Vfx1 = EffectVisualEffect(VFX_FNF_MYSTICAL_EXPLOSION); //Apply Visual effect Raise ApplyEffectAtLocation(DURATION_TYPE_INSTANT, Vfx1, GetLocation(oTarget)); //Effect to be used effect Vfx2 = EffectVisualEffect(VFX_COM_CHUNK_RED_LARGE); //Apply Visual effect Raise ApplyEffectAtLocation(DURATION_TYPE_INSTANT, Vfx2, GetLocation(oTarget)); //Destroy Dead Creature DestroyObject(oTarget, 0.0); { //Create Correct Skeleton Depending on level of character if (GetHitDice(oPC) <= 4) //Make Skeleton A Henchman { object oMage = CreateObject(OBJECT_TYPE_CREATURE, "lvl5mage", lTarget); AddHenchman(oPC, oMage); } else if (GetHitDice(oPC) <= 5) { object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lvl10mage", lTarget); AddHenchman(oPC, oSpawn); } else if (GetHitDice(oPC) <= 10) { object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lvl15mage", lTarget); AddHenchman(oPC, oSpawn); } else if (GetHitDice(oPC) <= 15) { object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lvl20mage", lTarget); AddHenchman(oPC, oSpawn); } else if (GetHitDice(oPC) <= 20) { object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lvl25mage", lTarget); AddHenchman(oPC, oSpawn); } else if (GetHitDice(oPC) <= 25) { object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lvl30mage", lTarget); AddHenchman(oPC, oSpawn); } else if (GetHitDice(oPC) <= 30) { object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lvl35mage", lTarget); AddHenchman(oPC, oSpawn); } else if (GetHitDice(oPC) <= 35) { object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lvl40mage", lTarget); AddHenchman(oPC, oSpawn); } else if (GetHitDice(oPC) <= 40) { object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lvl45mage", lTarget); AddHenchman(oPC, oSpawn); } } } } } }