//:://///////////////////////////////////////////// //:: On Spawn In //:: //::////////////////////////////////////////////// /* Determines the course of action to be taken after having just been spawned in */ //::////////////////////////////////////////////// #include "no_lib_data" #include "no_inc" void main() { // SetThreatLevel(OBJECT_SELF); //Wizard config AddBehaviour( "+RAISE", 100 ); //Ressurect [allies] AddBehaviour( "+EVACAOE", 100); //evac AOEs AddBehaviour( "+HEAL", 80 ); //heal [self/allies] AddBehaviour( "+HEALSELF", 85 ); //heal self AddBehaviour( "+GROUPHEAL", 90 ); //AOE heal [Allies] AddBehaviour( "+GROUPENHANCE", 100 ); //enhancing spells [AOE] AddBehaviour( "+ENHANCESING", 80 ); //enhancing spells [single allies] AddBehaviour( "+DEFSELF", 90 ); //defensive [self] AddBehaviour( "+DIRECT", 80 ); // attack spells [single enemy] AddBehaviour( "+AREA", 90 ); //AOEs AddBehaviour( "+ATKMELEE", 100 ); //melee attack /* // Movement AddBehaviour( "+AVOIDENEMY", 100 ); //Keep away from enemies AddBehaviour( "+AVOIDMELEE", 100 ); //Flee //Melee AddBehaviour( "+MELEEASSIST", 100 ); //Melee Assist [allies] AddBehaviour( "+ATKRANGED", 100 ); //ranged attack AddBehaviour( "+ATKMELEE", 100 ); //melee attack // Buffs self AddBehaviour( "+DEFSELF", 100 ); //defensive [self] AddBehaviour( "+ENHANCESELF", 100 ); //enhancing spells [self] AddBehaviour( "+FEATENHANCE", 100 ); //feat enhance [self] // Buffs party AddBehaviour( "+DEFSING", 100 ); //defensive [single allies] AddBehaviour( "+ENHANCESING", 100 ); //enhancing spells [single allies] AddBehaviour( "+VIS", 100 ); //visual aid spells [self/allies] AddBehaviour( "+GROUPENHANCE", 100 ); //enhancing spells [AOE] // Curing AddBehaviour( "+HELP", 100 ); //Restore debuffs [self/allies] AddBehaviour( "+RAISE", 100 ); //Ressurect [allies] // Healing AddBehaviour( "+HEAL", 100 ); //heal [self/allies] AddBehaviour( "+HEALSELF", 100 ); //Use pots/spec abil [heal self] AddBehaviour( "+GROUPHEAL", 100 ); //AOE heal [Allies] // Off casting AddBehaviour( "+DIRECT", 100 ); // attack spells [single enemy] AddBehaviour( "+TOUCH", 100 ); //touch attack spells [single enemy] AddBehaviour( "+AREA", 100 ); //AOEs AddBehaviour( "+SUMMON", 100 ); //Summon allies //Def casting AddBehaviour( "+COUNTERSPELL", 100 ); //Counterspell [enemy] AddBehaviour( "+DISPELAOE", 100 ); //Dispel AOEs AddBehaviour( "+DISPEL", 100 ); //Dispel [enemies] AddBehaviour( "+DISMISSAL", 100 ); //Dismiss [summoned enemies] AddBehaviour( "+BREACH", 100 ); //Spell Breach [enemy] // Special AddBehaviour( "+TIMESTOP", 100 ); //Cast Time Stop AddBehaviour( "+BREATH", 100 ); //breath weapons AddBehaviour( "+TURN", 100 ); //Turn Undead AddBehaviour( "+EYERAYS", 100 ); //Specific behaviour for: Beholders AddBehaviour( "+CENTRALEYE", 100 ); //Specific behaviour for: Beholders */ //Other config //Corpse decay set up and exclusions SetCorpseDelay(); //Set whether the creature can use EffectDisappearAppear when moving SetIsFlier(); if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) { //I am probably a summoned creature, possibly a henchman SetAssociateListenPatterns(); } //set voice chat config SetVoiceChat( NO_VC_DEFAULT, 10 ); //configure perception ranges SetPerceptionRanges(); //set response range for fighting broadcast SetResponseRange( BC_FIGHTING, 50.0 ); //tell creature it is ready to act //SetReadyStatus(); //set fastbuffer status, should always be left on SetIsFastBuffer( TRUE ); //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); //log starting location ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); //log loaded melee weapons ExecuteScript( "no_scr_logeq", OBJECT_SELF ); // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); // This causes the creature to say a special greeting in their conversation file // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired // greeting in order to designate it. As the creature is actually saying this to // himself, don't attach any player responses to the greeting. //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); // This will set the listening pattern on the NPC to attack when allies call //SetSpawnInCondition(NW_FLAG_STEALTH); // If the NPC has stealth and they are a rogue go into stealth mode //SetSpawnInCondition(NW_FLAG_SEARCH); // If the NPC has Search go into Search Mode //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); // This will set the NPC to give a warning to non-enemies before attacking //SetSpawnInCondition(NW_FLAG_SLEEP); //Creatures that spawn in during the night will be asleep. //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); //This will play Ambient Animations until the NPC sees an enemy or is cleared. //NOTE that these animations will play automatically for Encounter Creatures. // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) // CUSTOM USER DEFINED EVENTS /* The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined events user 1000 - 1010 */ //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after // combat. int iDice = d100(); if (iDice<80)ExecuteScript ("cd_helper_func", OBJECT_SELF); //InvClr(OBJECT_SELF); }