WoR_PRC8/_module/nss/glac_sorc.nss
Jaysyn904 b5e28e52f4 Initial commit
Initial commit [1.18]
2025-04-03 11:49:34 -04:00

28 lines
1.2 KiB
Plaintext

void CreateObject2(int nObjectType, string sTemplate, location lLocation, int bUseAppearAnimation=TRUE);
void main()
{
if (GetNearestObjectByTag("GLAC_DEMON", OBJECT_SELF) == OBJECT_INVALID){
object oLoser = GetLastKiller();
object oAreaP = GetArea (GetWaypointByTag("GLAC_PORT"));
vector vPositionP = GetPosition (GetWaypointByTag("GLAC_PORT"));
float fOrientationP = GetFacing (GetWaypointByTag("GLAC_PORT"));
location lSpawnP = Location (oAreaP, vPositionP, fOrientationP);
AssignCommand(oLoser, ClearAllActions(TRUE));
string sText;
sText = "Aaargh! The spell was not completed properly!";
ActionSpeakString (sText, TALKVOLUME_TALK);
AssignCommand(oLoser, ClearAllActions(TRUE));
AssignCommand(oLoser, DelayCommand(4.0, ApplyEffectAtLocation(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_IMP_LIGHTNING_M), lSpawnP)));
AssignCommand(oLoser, DelayCommand(5.0, CreateObject2(OBJECT_TYPE_CREATURE, "glacdemon", lSpawnP, FALSE)));}
else {
//Do Nothing
}
}
void CreateObject2(int nObjectType, string sTemplate, location lLocation, int bUseAppearAnimation=TRUE)
{
CreateObject(nObjectType, sTemplate, lLocation, bUseAppearAnimation);
return;
}