Lankhmar_PRC8/_module/nss/bgrck_att_dr2.nss
Jaysyn904 ebc0c6a9b2 Initial commit
Initial commit [v9.7]
2025-04-03 12:54:47 -04:00

99 lines
2.8 KiB
Plaintext

void main()
{
object oPC = GetPCSpeaker();
SetCutsceneMode(oPC, TRUE);
SetCameraMode(oPC, CAMERA_MODE_CHASE_CAMERA);
object oTarget;
oTarget = GetObjectByTag("Bgarick");
AssignCommand(oTarget, ActionAttack(GetObjectByTag("ccrwldr")));
effect eEffect;
eEffect = EffectDamage(40, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_NORMAL);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, GetObjectByTag("ccrwdr"));
AssignCommand(GetObjectByTag("Bgarick"), ActionSpeakString("Deal with them boys! The Great Gods will settle this!"));
object oSpawn;
location lTarget;
oTarget = GetWaypointByTag("WP_SPn_bgcultists");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "bgcultist1", lTarget);
oTarget = oSpawn;
//Visual effects can't be applied to waypoints, so if it is a WP
//the VFX will be applied to the WP's location instead
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1), oTarget));
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1), GetLocation(oTarget)));
oTarget = GetWaypointByTag("WP_SPn_bgcultists");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "bgcultist2", lTarget);
oTarget = oSpawn;
//Visual effects can't be applied to waypoints, so if it is a WP
//the VFX will be applied to the WP's location instead
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1), oTarget));
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1), GetLocation(oTarget)));
oTarget = GetWaypointByTag("WP_SPn_bgcultists");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "bgcultist3", lTarget);
oTarget = oSpawn;
//Visual effects can't be applied to waypoints, so if it is a WP
//the VFX will be applied to the WP's location instead
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1), oTarget));
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1), GetLocation(oTarget)));
oTarget = GetObjectByTag("Bgarick");
AssignCommand(oTarget, ActionMoveToObject(GetObjectByTag("WP_Ccrwdor")));
DestroyObject(oTarget, 4.0);
oTarget = GetObjectByTag("ccrwldr");
SetLocked(oTarget, FALSE);
AssignCommand(oTarget, ActionOpenDoor(oTarget));
oTarget = GetObjectByTag("rivertoccrow");
SetLocked(oTarget, FALSE);
AssignCommand(oTarget, ActionOpenDoor(oTarget));
SetCutsceneMode(oPC, FALSE);
}