Files
HeroesStone_PRC8/_module/nss/necroraise.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

80 lines
2.4 KiB
Plaintext

void main()
{
{
object oTarget = GetItemActivatedTarget();
location lTarget = GetLocation(oTarget);
object oPC = GetItemActivator();
//SETS MAX NUMBER OF SKELETONS YOU CAN CONTROL
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_COM_CHUNK_RED_LARGE);
//Apply Visual effect Raise
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, Vfx1, GetLocation(oTarget));
//Effect to be used
effect Vfx2 = EffectVisualEffect(VFX_COM_CHUNK_BONE_MEDIUM);
//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 oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lvl5skel", lTarget);
AddHenchman(oPC, oSpawn);
}
else if (GetHitDice(oPC) <= 5)
{
object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lvl10skel", lTarget);
AddHenchman(oPC, oSpawn);
}
else if (GetHitDice(oPC) <= 10)
{
object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lvl15skel", lTarget);
AddHenchman(oPC, oSpawn);
}
else if (GetHitDice(oPC) <= 15)
{
object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lvl20skel", lTarget);
AddHenchman(oPC, oSpawn);
}
else if (GetHitDice(oPC) <= 20)
{
object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lvl25skel", lTarget);
AddHenchman(oPC, oSpawn);
}
else if (GetHitDice(oPC) <= 25)
{
object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lvl30skel", lTarget);
AddHenchman(oPC, oSpawn);
}
else if (GetHitDice(oPC) <= 30)
{
object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lvl35skel", lTarget);
AddHenchman(oPC, oSpawn);
}
else if (GetHitDice(oPC) <= 35)
{
object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lvl40skel", lTarget);
AddHenchman(oPC, oSpawn);
}
else if (GetHitDice(oPC) <= 40)
{
object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "lvl45skel", lTarget);
AddHenchman(oPC, oSpawn);
}
}
}
}
}
}