//:://///////////////////////////////////////////// //:: Default: On Spawn In //:: NW_C2_DEFAULT9 //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* Determines the course of action to be taken after having just been spawned in */ //::////////////////////////////////////////////// //:: Created By: Preston Watamaniuk //:: Created On: Oct 25, 2001 //::////////////////////////////////////////////// #include "NW_O2_CONINCLUDE" #include "NW_I0_GENERIC" void main() { // 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); //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 int pholder = Random(35); string sTemplate; if (pholder == 28 ){ //insert Troll Skin sTemplate = "TrollSkin"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 27 ){ //insert Relief Bludgeoning Armor sTemplate = "ReliefBludgeoningArmor"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 26 ){ //insert Relief Piercing Armor sTemplate = "ReliefPiercingArmor"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 25 ){ //insert Relief Slashing Armor sTemplate = "ReliefSlashingArmor"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 24 ){ //insert Acid Immunity Robe sTemplate = "AcidImmunityRobe"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 23 ){ //insert Cold Immunity Robe sTemplate = "ColdImmunityRobe"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 22 ){ //insert Electrical Immunity Robe sTemplate = "ElectricalImmunityRobe"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 21 ){ //insert Fire Immunity Robe sTemplate = "FireImmunityRobe"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 20 ){ //insert Sonic Immunity Robe sTemplate = "SonicImmunityRobe"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 19 ){ //insert Lionhearts Club sTemplate = "LionheartsClub"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 18 ){ //insert Lionhearts Handaxe sTemplate = "LionheartsHandaxe"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 17 ){ //insert Lionhearts Mace sTemplate = "LionheartsMace"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 16 ){ //insert Lionhearts Short Sword sTemplate = "LionheartsShortSword"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 15 ){ // insert Lionhearts Sling sTemplate = "LionheartsSling"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 14 ){ //insert Lionhearts Spear sTemplate = "LionheartsSpear"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 13 ){ //insert Lionhearts Magic Staff sTemplate = "LionheartsMagicStaff"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 12 ){ //insert Strong Dagger sTemplate = "StrongDagger"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 11 ){ //insert Strong Halberd sTemplate = "StrongHalberd"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 10 ){ //insert Strong Light Hammer sTemplate = "StrongLightHammer"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 9 ){ //insert Strong Rapier sTemplate = "StrongRapier"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 8 ){ // insert Strong Gauntlet sTemplate = "StrongGauntlet"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 7 ){ //insert Strong Magic Staff sTemplate = "StrongMagicStaff"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 6 ){ //insert Strong Shortbow sTemplate = "StrongShortbow"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 5 ){ //insert Thrust Greataxe sTemplate = "ThrustGreataxe"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 4 ){ //insert Thrust Kama sTemplate = "ThrustKama"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 3 ){ //insert Thrust Light Flail sTemplate = "ThrustLightFlail"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 2 ){ //insert Thrust Short Sword sTemplate = "ThrustShortSword"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 1 ){ // insert Thrust Kukri sTemplate = "ThrustKukri"; CreateItemOnObject(sTemplate,OBJECT_SELF); } if (pholder == 0 ){ //insert Thrust Quarterstaff sTemplate = "ThrustQuarterstaff"; CreateItemOnObject(sTemplate,OBJECT_SELF); } // DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) ***************************************************************************************** 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. GenerateNPCTreasure(); //* Use this to create a small amount of treasure on the creature }