//:://///////////////////////////////////////////// //:: Name x2_def_spawn //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* Default On Spawn script 2003-07-28: Georg Zoeller: If you set a ninteger on the creature named "X2_USERDEFINED_ONSPAWN_EVENTS" The creature will fire a pre and a post-spawn event on itself, depending on the value of that variable 1 - Fire Userdefined Event 1510 (pre spawn) 2 - Fire Userdefined Event 1511 (post spawn) 3 - Fire both events */ //::////////////////////////////////////////////// //:: Created By: Keith Warner, Georg Zoeller //:: Created On: June 11/03 //::////////////////////////////////////////////// const int EVENT_USER_DEFINED_PRESPAWN = 1510; const int EVENT_USER_DEFINED_POSTSPAWN = 1511; #include "x2_inc_switches" void main() { // User defined OnSpawn event requested? int nSpecEvent = GetLocalInt(OBJECT_SELF,"X2_USERDEFINED_ONSPAWN_EVENTS"); // Pre Spawn Event requested if (nSpecEvent == 1 || nSpecEvent == 3 ) { SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_PRESPAWN )); } /* Fix for the new golems to reduce their number of attacks */ int nNumber = GetLocalInt(OBJECT_SELF,CREATURE_VAR_NUMBER_OF_ATTACKS); if (nNumber >0 ) { SetBaseAttackBonus(nNumber); } // Execute default OnSpawn script. ExecuteScript("nw_c2_default9", OBJECT_SELF); //Post Spawn event requeste if (nSpecEvent == 2 || nSpecEvent == 3) { SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN)); } SetLocalInt(GetModule(), "birdroom", (GetLocalInt(GetModule(), "birdroom") +1)); if (GetLocalInt(GetModule(), "birdroom") == 6) { effect eEffect1 = EffectVisualEffect(VFX_FNF_NATURES_BALANCE); effect eEffect2 = EffectVisualEffect(VFX_FNF_SOUND_BURST_SILENT); effect eEffect3 = EffectVisualEffect(VFX_FNF_STRIKE_HOLY); effect eEffect4 = EffectVisualEffect(VFX_FNF_SCREEN_BUMP); object oWaypoint = GetWaypointByTag("birdroom8"); location lTarget = GetLocation(oWaypoint); DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect1, lTarget)); DelayCommand(1.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect2, lTarget)); DelayCommand(2.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect3, lTarget)); DelayCommand(2.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect4, lTarget)); DelayCommand(2.5, ExecuteScript("birdroomkey", OBJECT_SELF)); DelayCommand(20.0, ExecuteScript("removeobject", OBJECT_SELF)); } }