Area & spawner pass.
Updated Aragnak's Isle & Lair, Bard College, Cazrak's Lair. Remade several items.
This commit is contained in:
14
_module/nss/close_vanish.nss
Normal file
14
_module/nss/close_vanish.nss
Normal file
@@ -0,0 +1,14 @@
|
||||
/*******************************
|
||||
Script: Container Disappear When Empty
|
||||
Created By: Jaden Wagener
|
||||
Created On: 08/30/02
|
||||
*******************************/
|
||||
//Causes a container to be destroyed once the loot inside is taken.
|
||||
//Should be placed in a placeable container's OnClose slot.
|
||||
void main()
|
||||
{
|
||||
if ( GetFirstItemInInventory(OBJECT_SELF) == OBJECT_INVALID )
|
||||
{
|
||||
DestroyObject(OBJECT_SELF, 0.0);
|
||||
}
|
||||
}
|
50
_module/nss/j_sp_archer.nss
Normal file
50
_module/nss/j_sp_archer.nss
Normal file
@@ -0,0 +1,50 @@
|
||||
/************************ [On Spawn: Archer] ***********************************
|
||||
Filename: j_sp_archer
|
||||
************************* [On Spawn: Archer] ***********************************
|
||||
Any-level archer. This man is pretty basic, and has really only the special
|
||||
archery stuff on.
|
||||
************************* [On Spawn: Archer] **********************************/
|
||||
|
||||
// This is required for all spawn in options!
|
||||
#include "j_inc_spawnin"
|
||||
|
||||
void main()
|
||||
{
|
||||
// Random intelligence, 4-6.
|
||||
SetAIInteger(AI_INTELLIGENCE, 3 + d3());
|
||||
// Random morale
|
||||
SetAIInteger(AI_MORALE, 7 + d6());
|
||||
|
||||
AI_SetAITargetingValues(TARGETING_RANGE, TARGET_HIGHER, 2, 9);
|
||||
// Range - very imporant! Basis for all ranged/spell attacks.
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_PICK_UP_DISARMED_WEAPONS, AI_COMBAT_MASTER);
|
||||
// This sets to pick up weapons which are disarmed.
|
||||
SetAIInteger(AI_RANGED_WEAPON_RANGE, 2);
|
||||
// This is the range at which they go into melee (from using a ranged weapon). Default is 3 or 5.
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_ARCHER_ATTACKING, AI_COMBAT_MASTER);
|
||||
// For archers. If they have ally support, they'd rather move back & shoot then go into HTH.
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_ARCHER_ALWAYS_MOVE_BACK, AI_COMBAT_MASTER);
|
||||
// This forces the move back from attackers, and shoot bows. Very small chance to go melee.
|
||||
//SetSpawnInCondition(AI_FLAG_COMBAT_ARCHER_ALWAYS_USE_BOW, AI_COMBAT_MASTER);
|
||||
// This will make the creature ALWAYs use any bows it has. ALWAYS.
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_NO_POLYMORPHING, AI_OTHER_MASTER);
|
||||
// This will stop all polymorphing spells feats from being used.
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_DONT_RESPOND_TO_EMOTES, AI_OTHER_MASTER);
|
||||
// This will ignore ALL chat by PC's (Enemies) who speak actions in Stars - *Bow*
|
||||
|
||||
// no spells or items.
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_LAG_NO_ITEMS, AI_OTHER_MASTER);
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_LAG_NO_SPELLS, AI_OTHER_MASTER);
|
||||
|
||||
// Ambient animations
|
||||
if(GetIsEncounterCreature())
|
||||
{
|
||||
SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS, NW_GENERIC_MASTER);
|
||||
}
|
||||
|
||||
AI_SetUpEndOfSpawn();
|
||||
DelayCommand(2.0f, SpawnWalkWayPoints());
|
||||
}
|
38
_module/nss/j_sp_dragon.nss
Normal file
38
_module/nss/j_sp_dragon.nss
Normal file
@@ -0,0 +1,38 @@
|
||||
/************************ [On Spawn: Dragon] ***********************************
|
||||
Filename: j_sp_dragon
|
||||
************************* [On Spawn: Dragon] ***********************************
|
||||
Dragons are highly intelligent, and can...fly!
|
||||
|
||||
They do have a few improved spellcasting bits, and like to target lower AC
|
||||
more then anything.
|
||||
|
||||
Flying is also on, so they can jump to enemies far away.
|
||||
************************* [On Spawn: Dragon] **********************************/
|
||||
|
||||
// This is required for all spawn in options!
|
||||
#include "j_inc_spawnin"
|
||||
|
||||
void main()
|
||||
{
|
||||
// Maximum "intelligence"
|
||||
SetAIInteger(AI_INTELLIGENCE, 10);
|
||||
SetAIInteger(AI_MORALE, 10);
|
||||
|
||||
AI_SetAITargetingValues(TARGETING_RANGE, TARGET_HIGHER, 2, 9);
|
||||
AI_SetAITargetingValues(TARGETING_AC, TARGET_LOWER, 1, 6);
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_FLAG_FAST_BUFF_ENEMY, AI_COMBAT_MASTER);
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_IMPROVED_INSTANT_DEATH_SPELLS, AI_COMBAT_MASTER);
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_IMPROVED_IMMUNITY_CHECKING, AI_COMBAT_MASTER);
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_IMPROVED_SPECIFIC_SPELL_IMMUNITY, AI_COMBAT_MASTER);
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_LONGER_RANGED_SPELLS_FIRST, AI_COMBAT_MASTER);
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_DONT_RESPOND_TO_EMOTES, AI_OTHER_MASTER);
|
||||
// This will ignore ALL chat by PC's (Enemies) who speak actions in Stars - *Bow*
|
||||
|
||||
// Dragon stuff
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_FLYING, AI_COMBAT_MASTER);
|
||||
|
||||
AI_SetUpEndOfSpawn();
|
||||
DelayCommand(2.0f, SpawnWalkWayPoints());
|
||||
}
|
51
_module/nss/j_sp_highmage.nss
Normal file
51
_module/nss/j_sp_highmage.nss
Normal file
@@ -0,0 +1,51 @@
|
||||
/************************ [On Spawn: High-Level Mage] **************************
|
||||
Filename: j_sp_highmage
|
||||
************************* [On Spawn: High-Level Mage] **************************
|
||||
A mage who is higher level - ok, so it has many stuff from the default spawn
|
||||
file, but this one has some of the mage behaviours set, such as long range
|
||||
attacking and fast buffing, but no spell triggers.
|
||||
************************* [On Spawn: High-Level Mage] *************************/
|
||||
|
||||
// This is required for all spawn in options!
|
||||
#include "j_inc_spawnin"
|
||||
|
||||
void main()
|
||||
{
|
||||
// Random intelligence, 7-9.
|
||||
SetAIInteger(AI_INTELLIGENCE, 6 + d3());
|
||||
SetAIInteger(AI_MORALE, 10);
|
||||
|
||||
// Less mantals, and less saves is all we target
|
||||
AI_SetAITargetingValues(TARGETING_MANTALS, TARGET_LOWER, 1, 4);
|
||||
AI_SetAITargetingValues(TARGETING_SAVES, TARGET_LOWER, 1, 2);
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_PICK_UP_DISARMED_WEAPONS, AI_COMBAT_MASTER);
|
||||
// This sets to pick up weapons which are disarmed.
|
||||
SetAIInteger(AI_RANGED_WEAPON_RANGE, 2);
|
||||
// This is the range at which they go into melee (from using a ranged weapon). Default is 3 or 5.
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_DISPEL_IN_ORDER, AI_COMBAT_MASTER);
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_IMPROVED_INSTANT_DEATH_SPELLS, AI_COMBAT_MASTER);
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_FLAG_FAST_BUFF_ENEMY, AI_COMBAT_MASTER);
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_IMPROVED_SUMMON_TARGETING, AI_COMBAT_MASTER);
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_IMPROVED_IMMUNITY_CHECKING, AI_COMBAT_MASTER);
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_IMPROVED_SPECIFIC_SPELL_IMMUNITY, AI_COMBAT_MASTER);
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_LONGER_RANGED_SPELLS_FIRST, AI_COMBAT_MASTER);
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_DONT_RESPOND_TO_EMOTES, AI_OTHER_MASTER);
|
||||
// This will ignore ALL chat by PC's (Enemies) who speak actions in Stars - *Bow*
|
||||
|
||||
// no spells or items.
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_LAG_NO_ITEMS, AI_OTHER_MASTER);
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_LAG_NO_SPELLS, AI_OTHER_MASTER);
|
||||
|
||||
// Ambient animations
|
||||
if(GetIsEncounterCreature())
|
||||
{
|
||||
SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS, NW_GENERIC_MASTER);
|
||||
}
|
||||
|
||||
AI_SetUpEndOfSpawn();
|
||||
DelayCommand(2.0f, SpawnWalkWayPoints());
|
||||
}
|
87
_module/nss/j_sp_humleader.nss
Normal file
87
_module/nss/j_sp_humleader.nss
Normal file
@@ -0,0 +1,87 @@
|
||||
/************************ [On Spawn: Human Leader] *****************************
|
||||
Filename: j_sp_humleader
|
||||
************************* [On Spawn: Human Leader] *****************************
|
||||
A human leader sample spawn script.
|
||||
|
||||
Maximum intelligence, some sample shouts/taunts and the leader settings are
|
||||
on. He does, however, never run, and always likes melee.
|
||||
|
||||
Shouldn't be a spellcaster, should only be a fighter primarily geared for HTH
|
||||
fighting.
|
||||
************************* [On Spawn: Human Leader] ****************************/
|
||||
|
||||
// This is required for all spawn in options!
|
||||
#include "j_inc_spawnin"
|
||||
|
||||
void main()
|
||||
{
|
||||
// Maximum "intelligence"
|
||||
SetAIInteger(AI_INTELLIGENCE, 10);
|
||||
// We are fearless
|
||||
SetAIInteger(AI_MORALE, 10);
|
||||
|
||||
AI_SetAITargetingValues(TARGETING_RANGE, TARGET_HIGHER, 2, 9);
|
||||
// Range - very imporant! Basis for all ranged/spell attacks.
|
||||
AI_SetAITargetingValues(TARGETING_AC, TARGET_LOWER, 2, 6);
|
||||
// AC is used for all phisical attacks. Lower targets lower (By default).
|
||||
// Fighter/Clerics (It is over a mages BAB + 1 (IE 0.5 BAB/Level) target lower
|
||||
AI_SetAITargetingValues(TARGETING_PHISICALS, TARGET_LOWER, 2, 6);
|
||||
// Base attack bonus. Used for spells and phisical attacks. Checked with GetBaseAttackBonus.
|
||||
AI_SetAITargetingValues(TARGETING_BAB, TARGET_LOWER, 1, 4);
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_FLEEING_FEARLESS, AI_TARGETING_FLEE_MASTER);
|
||||
// Forces them to not flee. This may be set with AI_SetMaybeFearless at the end.
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_PICK_UP_DISARMED_WEAPONS, AI_COMBAT_MASTER);
|
||||
// This sets to pick up weapons which are disarmed.
|
||||
|
||||
SetAIInteger(AI_RANGED_WEAPON_RANGE, 6);
|
||||
// This is the range at which they go into melee (from using a ranged weapon). Default is 3 or 5.
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_BETTER_AT_HAND_TO_HAND, AI_COMBAT_MASTER);
|
||||
// Set if you want them to move forwards into HTH sooner. Will always
|
||||
// if the enemy is a mage/archer, else % based on range.
|
||||
|
||||
// Set all leader variables
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_COMBAT_GROUP_LEADER, AI_OTHER_COMBAT_MASTER);
|
||||
// Special leader. Can issuse some orders. See readme for details.
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_COMBAT_BOSS_MONSTER_SHOUT, AI_OTHER_COMBAT_MASTER);
|
||||
// Boss shout. 1 time use - calls all creatures in X meters (below) for battle!
|
||||
//SetAIInteger(AI_BOSS_MONSTER_SHOUT_RANGE, 60);
|
||||
// Defaults to a 60 M range. This can change it. Note: 1 toolset square = 10M.
|
||||
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_NO_POLYMORPHING, AI_OTHER_MASTER);
|
||||
// This will stop all polymorphing spells feats from being used.
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_DONT_RESPOND_TO_EMOTES, AI_OTHER_MASTER);
|
||||
// This will ignore ALL chat by PC's (Enemies) who speak actions in Stars - *Bow*
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_REST_AFTER_COMBAT, AI_OTHER_MASTER);
|
||||
// When combat is over, creature rests. Useful for replenising health.
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_NO_PLAYING_VOICE_CHAT, AI_OTHER_MASTER);
|
||||
|
||||
// Can uncomment these if the leader has no spells or items.
|
||||
//SetSpawnInCondition(AI_FLAG_OTHER_LAG_NO_ITEMS, AI_OTHER_MASTER);
|
||||
// The creature doesn't check for, or use any items that cast spells.
|
||||
//SetSpawnInCondition(AI_FLAG_OTHER_LAG_NO_SPELLS, AI_OTHER_MASTER);
|
||||
//The creature doesn't ever cast spells (and never checks them)
|
||||
|
||||
// Combat
|
||||
AI_SetSpawnInSpeakArray(AI_TALK_ON_COMBAT_ROUND_EQUAL, 10, 4, "You don't stand a chance!", "Men, Attack!", "For Glory!!", "Eat steel!");
|
||||
AI_SetSpawnInSpeakArray(AI_TALK_ON_COMBAT_ROUND_THEM_OVER_US, 10, 4, "Your might is no match for my brains!", "Tough man, are we?", "You won't kill me!", "Pah! I am no coward! I fight on!");
|
||||
AI_SetSpawnInSpeakArray(AI_TALK_ON_COMBAT_ROUND_US_OVER_THEM, 10, 4, "No mercy!", "Hope for a quick death!", "Men! Kill the lot!", "There is no chance!");
|
||||
|
||||
// Our leader shouts!
|
||||
// - As this is a human, very orderly
|
||||
AI_SetSpawnInSpeakValue(AI_TALK_ON_LEADER_SEND_RUNNER, "Soldier! Go find help!");
|
||||
AI_SetSpawnInSpeakValue(AI_TALK_ON_LEADER_ATTACK_TARGET, "Direct your attacks here, men!");
|
||||
|
||||
// Ambient animations
|
||||
if(GetIsEncounterCreature())
|
||||
{
|
||||
SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS, NW_GENERIC_MASTER);
|
||||
}
|
||||
|
||||
AI_SetUpEndOfSpawn();
|
||||
DelayCommand(2.0f, SpawnWalkWayPoints());
|
||||
}
|
76
_module/nss/j_sp_lichboss.nss
Normal file
76
_module/nss/j_sp_lichboss.nss
Normal file
@@ -0,0 +1,76 @@
|
||||
/************************ [On Spawn: Lich] *************************************
|
||||
Filename: j_sp_lichboss
|
||||
************************* [On Spawn: Lich] *************************************
|
||||
A high-powered lich, who takes advantage of spell triggers!
|
||||
|
||||
He should be geared towards higher level spells, and once he runs out, he
|
||||
does cheat-cast several 1-3 level spells.
|
||||
|
||||
The spell triggers stop quite a bit of damage, with Premonition, greater
|
||||
spell mantal and Energy Buffer. He also has some taunts he uses most combat
|
||||
rounds, as well as using longer ranged spells first.
|
||||
|
||||
As he is a boss, he is a leader status, and also gets a free harm at 30% HP.
|
||||
************************* [On Spawn: Lich] ************************************/
|
||||
|
||||
// This is required for all spawn in options!
|
||||
#include "j_inc_spawnin"
|
||||
|
||||
void main()
|
||||
{
|
||||
// Maximum intelligence
|
||||
SetAIInteger(AI_INTELLIGENCE, 10);
|
||||
SetAIInteger(AI_MORALE, 10);
|
||||
SetSpawnInCondition(AI_FLAG_FLEEING_FEARLESS, AI_TARGETING_FLEE_MASTER);
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_DONT_RESPOND_TO_EMOTES, AI_OTHER_MASTER);
|
||||
|
||||
AI_SetAITargetingValues(TARGETING_MANTALS, TARGET_LOWER, 1, 12);
|
||||
AI_SetAITargetingValues(TARGETING_RANGE, TARGET_HIGHER, 2, 9);
|
||||
AI_SetAITargetingValues(TARGETING_AC, TARGET_LOWER, 3, 6);
|
||||
AI_SetAITargetingValues(TARGETING_SAVES, TARGET_LOWER, 3, 4);
|
||||
// Mages target higher. (the lowest BAB, under half our hit dice in BAB)
|
||||
AI_SetAITargetingValues(TARGETING_PHISICALS, TARGET_HIGHER, 1, 5);
|
||||
|
||||
AI_SetAITargetingValues(TARGETING_BAB, TARGET_LOWER, 1, 4);
|
||||
AI_SetAITargetingValues(TARGETING_HITDICE, TARGET_LOWER, 1, 3);
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_DISPEL_IN_ORDER, AI_COMBAT_MASTER);
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_IMPROVED_INSTANT_DEATH_SPELLS, AI_COMBAT_MASTER);
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_IMPROVED_SUMMON_TARGETING, AI_COMBAT_MASTER);
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_IMPROVED_IMMUNITY_CHECKING, AI_COMBAT_MASTER);
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_IMPROVED_SPECIFIC_SPELL_IMMUNITY, AI_COMBAT_MASTER);
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_COMBAT_WILL_RAISE_ALLIES_IN_BATTLE, AI_OTHER_COMBAT_MASTER);
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_COMBAT_GROUP_LEADER, AI_OTHER_COMBAT_MASTER);
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_COMBAT_LONGER_RANGED_SPELLS_FIRST, AI_COMBAT_MASTER);
|
||||
|
||||
AI_SetSpawnInSpeakArray(AI_TALK_ON_COMBAT_ROUND_EQUAL, 900, 4, "Curse your life!", "Nothing can kill the undead!", "MUhahaHaHahahha!!", "Prepare to DIE!");
|
||||
AI_SetSpawnInSpeakArray(AI_TALK_ON_COMBAT_ROUND_THEM_OVER_US, 900, 4, "Curse your life!", "Nothing can kill the undead!", "MUhahaHaHahahha!!", "Prepare to DIE!");
|
||||
AI_SetSpawnInSpeakArray(AI_TALK_ON_COMBAT_ROUND_US_OVER_THEM, 900, 4, "Curse your life!", "Nothing can kill the undead!", "MUhahaHaHahahha!!", "Prepare to DIE!");
|
||||
|
||||
// Spell triggers
|
||||
SetSpellTrigger(SPELLTRIGGER_START_OF_COMBAT, FALSE, 1, SPELL_DEATH_ARMOR, SPELL_FOXS_CUNNING, SPELL_SHADOW_SHIELD);
|
||||
|
||||
// Damamged
|
||||
SetSpellTrigger(SPELLTRIGGER_DAMAGED_AT_PERCENT, 30, 1, SPELL_HARM);
|
||||
|
||||
// Immobile
|
||||
SetSpellTrigger(SPELLTRIGGER_IMMOBILE, FALSE, 1, SPELL_FREEDOM_OF_MOVEMENT);
|
||||
|
||||
// Normal defensive
|
||||
SetSpellTrigger(SPELLTRIGGER_NOT_GOT_FIRST_SPELL, FALSE, 1, SPELL_PREMONITION);
|
||||
SetSpellTrigger(SPELLTRIGGER_NOT_GOT_FIRST_SPELL, FALSE, 2, SPELL_PREMONITION);
|
||||
SetSpellTrigger(SPELLTRIGGER_NOT_GOT_FIRST_SPELL, FALSE, 3, SPELL_GREATER_SPELL_MANTLE);
|
||||
SetSpellTrigger(SPELLTRIGGER_NOT_GOT_FIRST_SPELL, FALSE, 4, SPELL_GREATER_SPELL_MANTLE);
|
||||
SetSpellTrigger(SPELLTRIGGER_NOT_GOT_FIRST_SPELL, FALSE, 5, SPELL_ENERGY_BUFFER);
|
||||
SetSpellTrigger(SPELLTRIGGER_NOT_GOT_FIRST_SPELL, FALSE, 6, SPELL_ENERGY_BUFFER);
|
||||
|
||||
// Cheat spells
|
||||
SetAICheatCastSpells(SPELL_MAGIC_MISSILE, SPELL_MAGIC_MISSILE, SPELL_MAGIC_MISSILE, SPELL_FIREBALL, SPELL_MELFS_ACID_ARROW, SPELL_MELFS_ACID_ARROW);
|
||||
|
||||
AI_SetUpEndOfSpawn();
|
||||
DelayCommand(2.0, SpawnWalkWayPoints());
|
||||
}
|
29
_module/nss/j_sp_lowintel.nss
Normal file
29
_module/nss/j_sp_lowintel.nss
Normal file
@@ -0,0 +1,29 @@
|
||||
/************************ [On Spawn: Low Intelligence] *************************
|
||||
Filename: j_sp_lowintel
|
||||
************************* [On Spawn: Low Intelligence] *************************
|
||||
Low intelligence creatures, such as Goblins, might not have an advanced a
|
||||
way of picking who to best attack, nor as much AI intelligence.
|
||||
************************* [On Spawn: Low Intelligence] ************************/
|
||||
|
||||
// This is required for all spawn in options!
|
||||
#include "j_inc_spawnin"
|
||||
|
||||
void main()
|
||||
{
|
||||
// 1 or 2 intelligence.
|
||||
SetAIInteger(AI_INTELLIGENCE, d2());
|
||||
SetAIInteger(AI_MORALE, 10);
|
||||
|
||||
// Probably worse for the AI to have these set - acts less intelligently.
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_LAG_EQUIP_MOST_DAMAGING, AI_OTHER_MASTER);
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_LAG_TARGET_NEAREST_ENEMY, AI_OTHER_MASTER);
|
||||
|
||||
// Lots of other stuff is affected by having 1 or 2 intelligence anyway.
|
||||
// Removed a few of the immunity-checking bits, to lower effectivness.
|
||||
|
||||
SetSpawnInCondition(AI_FLAG_OTHER_DONT_RESPOND_TO_EMOTES, AI_OTHER_MASTER);
|
||||
// This will ignore ALL chat by PC's (Enemies) who speak actions in Stars - *Bow*
|
||||
|
||||
AI_SetUpEndOfSpawn();
|
||||
DelayCommand(2.0f, SpawnWalkWayPoints());
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
//Closes door if it is open
|
||||
void main()
|
||||
{
|
||||
DelayCommand(10.0f,ActionCloseDoor(OBJECT_SELF));
|
||||
DelayCommand(13.0f,ActionCloseDoor(OBJECT_SELF));
|
||||
}
|
||||
|
||||
|
517
_module/nss/ra_drag_onspawn2.nss
Normal file
517
_module/nss/ra_drag_onspawn2.nss
Normal file
@@ -0,0 +1,517 @@
|
||||
/*/////////////////////// [On Spawn] ///////////////////////////////////////////
|
||||
Filename: ra_drag_onspawn2
|
||||
|
||||
Modified x2_def_spawn for dragons. Spawns in asleep.
|
||||
|
||||
Edited: 2021-10-19
|
||||
Editor: Jaysyn
|
||||
///////////////////////// [On Spawn] ///////////////////////////////////////////
|
||||
/*
|
||||
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
|
||||
|
||||
2007-12-31: Deva Winblood
|
||||
Modified to look for X3_HORSE_OWNER_TAG and if
|
||||
it is defined look for an NPC with that tag
|
||||
nearby or in the module (checks near first).
|
||||
It will make that NPC this horse's master.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: 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 "NW_I0_GENERIC"
|
||||
#include "ms_name_inc"
|
||||
#include "x2_inc_switches"
|
||||
#include "rnd_commoner_inc"
|
||||
#include "x2_inc_cutscenep" //:: PRC version of the cutscene include
|
||||
|
||||
|
||||
|
||||
void ShrinkEm(object oPC)
|
||||
{
|
||||
SetObjectVisualTransform(oPC, OBJECT_VISUAL_TRANSFORM_SCALE, 0.5f);
|
||||
}
|
||||
|
||||
void GrowEm(object oPC)
|
||||
{
|
||||
SetObjectVisualTransform(oPC, OBJECT_VISUAL_TRANSFORM_SCALE, 1.5f);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Set our INTs so that we know he's sleep
|
||||
SetLocalInt(OBJECT_SELF, "sleep", 1);
|
||||
SetLocalInt(OBJECT_SELF, "awake", 0);
|
||||
|
||||
// Sleeping effects
|
||||
//effect eSleep = EffectDeath(FALSE, FALSE);
|
||||
/* effect eSleep1 = EffectKnockdown();
|
||||
effect eVis1 = EffectVisualEffect(VFX_IMP_SLEEP);
|
||||
effect eDur1 = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink1 = EffectLinkEffects(eSleep1, eVis1);
|
||||
eLink1 = EffectLinkEffects(eSleep1, eDur1);
|
||||
eLink1 = ExtraordinaryEffect(eLink1);
|
||||
eLink1 = TagEffect(eLink1, "SLEEPING_DRAGON"); */
|
||||
|
||||
effect eSleep2 = EffectCutsceneParalyze();
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_SLEEP);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_BUBBLES);
|
||||
effect eLink2 = EffectLinkEffects(eSleep2, eVis2);
|
||||
eLink2 = EffectLinkEffects(eSleep2, eDur2);
|
||||
eLink2 = ExtraordinaryEffect(eLink2);
|
||||
eLink2 = TagEffect(eLink2, "STILL_DRAGON");
|
||||
|
||||
ActionPlayAnimation(ANIMATION_LOOPING_DEAD_FRONT, 1.0, 6.0);
|
||||
|
||||
//ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink1, OBJECT_SELF, 6000.0);
|
||||
|
||||
DelayCommand(2.0f, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink2, OBJECT_SELF, 6000.0));
|
||||
|
||||
string sTag;
|
||||
object oNPC;
|
||||
// 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 ));
|
||||
}
|
||||
|
||||
sTag=GetLocalString(OBJECT_SELF,"X3_HORSE_OWNER_TAG");
|
||||
if (GetStringLength(sTag)>0)
|
||||
{ // look for master
|
||||
oNPC=GetNearestObjectByTag(sTag);
|
||||
if (GetIsObjectValid(oNPC)&&GetObjectType(oNPC)==OBJECT_TYPE_CREATURE)
|
||||
{ // master found
|
||||
AddHenchman(oNPC);
|
||||
} // master found
|
||||
else
|
||||
{ // look in module
|
||||
oNPC=GetObjectByTag(sTag);
|
||||
if (GetIsObjectValid(oNPC)&&GetObjectType(oNPC)==OBJECT_TYPE_CREATURE)
|
||||
{ // master found
|
||||
AddHenchman(oNPC);
|
||||
} // master found
|
||||
else
|
||||
{ // master does not exist - remove X3_HORSE_OWNER_TAG
|
||||
DeleteLocalString(OBJECT_SELF,"X3_HORSE_OWNER_TAG");
|
||||
} // master does not exist - remove X3_HORSE_OWNER_TAG
|
||||
} // look in module
|
||||
} // look for master
|
||||
|
||||
|
||||
//:: Sets a random integer on the creature to use with other spell functions
|
||||
|
||||
string sImmune = GetName(OBJECT_SELF)+"_AURA_IMMUNE";
|
||||
int nRandomSeed = Random(999);
|
||||
SetLocalInt(OBJECT_SELF, sImmune, nRandomSeed);
|
||||
|
||||
//:: Creature will quickly & automatically buff itself up with any defensive
|
||||
//:: spells it has memorized.
|
||||
|
||||
int nAutobuff = GetLocalInt(OBJECT_SELF,"AUTOBUFF");
|
||||
if (nAutobuff > 0 )
|
||||
{
|
||||
SetSpawnInCondition(NW_FLAG_FAST_BUFF_ENEMY);
|
||||
}
|
||||
|
||||
//:: Creature will flee those that close within 7m if they are not friends,
|
||||
//:: Rangers or Druids.
|
||||
|
||||
int nHerbivore = GetLocalInt(OBJECT_SELF,"CREATURE_VAR_HERBIVORE");
|
||||
if (nHerbivore > 0 )
|
||||
{
|
||||
SetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL);
|
||||
SetBehaviorState(NW_FLAG_BEHAVIOR_HERBIVORE);
|
||||
}
|
||||
|
||||
//:: Creature will only attack those that close within 5m and are not friends,
|
||||
//:: Rangers or Druids.
|
||||
|
||||
int nOmnivore = GetLocalInt(OBJECT_SELF,"CREATURE_VAR_OMNIVORE");
|
||||
if (nOmnivore > 0 )
|
||||
{
|
||||
SetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL);
|
||||
SetBehaviorState(NW_FLAG_BEHAVIOR_OMNIVORE);
|
||||
}
|
||||
|
||||
int nOLM = GetLocalInt(OBJECT_SELF,"OLM");
|
||||
if (nOLM > 0)
|
||||
{
|
||||
DelayCommand(0.0f, ShrinkEm(OBJECT_SELF));
|
||||
|
||||
effect eSlow = EffectMovementSpeedDecrease(50);
|
||||
eSlow = SupernaturalEffect(eSlow);
|
||||
eSlow = ExtraordinaryEffect(eSlow);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eSlow,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nHuge = GetLocalInt(OBJECT_SELF,"HUGE");
|
||||
if (nHuge > 0)
|
||||
{
|
||||
DelayCommand(0.0f, GrowEm(OBJECT_SELF));
|
||||
|
||||
}
|
||||
|
||||
int nNoStun = GetLocalInt(OBJECT_SELF,"NOSTUN");
|
||||
if (nNoStun > 0)
|
||||
{
|
||||
effect eNoStun = EffectImmunity(IMMUNITY_TYPE_STUN);
|
||||
eNoStun = SupernaturalEffect(eNoStun);
|
||||
eNoStun = ExtraordinaryEffect(eNoStun);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eNoStun,OBJECT_SELF));
|
||||
}
|
||||
int nNatInvis = GetLocalInt(OBJECT_SELF,"NATURAL_INVIS");
|
||||
if (nNatInvis > 0)
|
||||
{
|
||||
effect eNatInvis = EffectInvisibility(4);
|
||||
eNatInvis = SupernaturalEffect(eNatInvis);
|
||||
eNatInvis = ExtraordinaryEffect(eNatInvis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eNatInvis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nNoSleep = GetLocalInt(OBJECT_SELF,"NOSLEEP");
|
||||
if (nNoSleep > 0)
|
||||
{
|
||||
effect eNoSleep = EffectImmunity(IMMUNITY_TYPE_SLEEP);
|
||||
eNoSleep = SupernaturalEffect(eNoSleep);
|
||||
eNoSleep = ExtraordinaryEffect(eNoSleep);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eNoSleep,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nNoDaze = GetLocalInt(OBJECT_SELF,"NODAZE");
|
||||
if (nNoDaze > 0)
|
||||
{
|
||||
effect eNoDaze = EffectImmunity(IMMUNITY_TYPE_DAZED);
|
||||
eNoDaze = SupernaturalEffect(eNoDaze);
|
||||
eNoDaze = ExtraordinaryEffect(eNoDaze);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eNoDaze,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nNoBlind = GetLocalInt(OBJECT_SELF,"NOBLIND");
|
||||
if (nNoBlind > 0)
|
||||
{
|
||||
effect eNoBlind = EffectImmunity(IMMUNITY_TYPE_BLINDNESS);
|
||||
eNoBlind = SupernaturalEffect(eNoBlind);
|
||||
eNoBlind = ExtraordinaryEffect(eNoBlind);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eNoBlind,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nNoDeaf = GetLocalInt(OBJECT_SELF,"NODEAF");
|
||||
if (nNoDeaf > 0)
|
||||
{
|
||||
effect eNoDeaf = EffectImmunity(IMMUNITY_TYPE_DEAFNESS);
|
||||
eNoDeaf = SupernaturalEffect(eNoDeaf);
|
||||
eNoDeaf = ExtraordinaryEffect(eNoDeaf);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eNoDeaf,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nDeaf = GetLocalInt(OBJECT_SELF,"IS_DEAF");
|
||||
if (nDeaf > 0)
|
||||
{
|
||||
effect eDeaf = EffectDeaf();
|
||||
eDeaf = SupernaturalEffect(eDeaf);
|
||||
eDeaf = ExtraordinaryEffect(eDeaf);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eDeaf,OBJECT_SELF));
|
||||
}
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
int nVFX = GetLocalInt(OBJECT_SELF,"SpawnVFX");
|
||||
if(nVFX)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,SupernaturalEffect(EffectVisualEffect(nVFX)),OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nRegen = GetLocalInt(OBJECT_SELF,"FAST_HEALING");
|
||||
if(nRegen)
|
||||
{
|
||||
effect eRegen = EffectRegenerate(nRegen, 6.0f);
|
||||
eRegen = SupernaturalEffect(eRegen);
|
||||
eRegen = ExtraordinaryEffect(eRegen);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eRegen, OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nShadowy = GetLocalInt(OBJECT_SELF,"SHADOWY");
|
||||
if (nShadowy)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROT_SHADOW_ARMOR);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nStony = GetLocalInt(OBJECT_SELF,"STONY");
|
||||
if (nStony)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROT_STONESKIN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
int nFirey = GetLocalInt(OBJECT_SELF,"FIREY");
|
||||
if (nFirey)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_INFERNO_NO_SOUND);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
int nWoody = GetLocalInt(OBJECT_SELF,"WOODY");
|
||||
if (nWoody)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_PROT_BARKSKIN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nConcealed20 = GetLocalInt(OBJECT_SELF,"CONCEALED20");
|
||||
if (nConcealed20)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_BLUR );
|
||||
effect eConceal = EffectConcealment(20, 0);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nConcealed50 = GetLocalInt(OBJECT_SELF,"CONCEALED50");
|
||||
if (nConcealed50)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_BLUR );
|
||||
effect eConceal = EffectConcealment(50, 0);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nIcy = GetLocalInt(OBJECT_SELF,"ICY");
|
||||
if (nIcy)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_ICESKIN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
int nSR = GetLocalInt(OBJECT_SELF,"SPELL_RESISTANCE");
|
||||
if ( nSR )
|
||||
{
|
||||
effect eSR = EffectSpellResistanceIncrease(nSR);
|
||||
eSR = SupernaturalEffect(eSR);
|
||||
eSR = ExtraordinaryEffect(eSR);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eSR,OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nAttackBonus = GetLocalInt(OBJECT_SELF,"ATTACK_BONUS");
|
||||
if ( nAttackBonus )
|
||||
{
|
||||
effect eAttack = EffectAttackIncrease(nAttackBonus);
|
||||
eAttack = SupernaturalEffect(eAttack);
|
||||
eAttack = ExtraordinaryEffect(eAttack);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eAttack,OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nAcidShield = GetLocalInt(OBJECT_SELF,"ACID_SHIELD");
|
||||
if ( nAcidShield )
|
||||
{
|
||||
effect eShield = EffectDamageShield(0,DAMAGE_BONUS_1d8,DAMAGE_TYPE_ACID);
|
||||
eShield = SupernaturalEffect(eShield);
|
||||
eShield = ExtraordinaryEffect(eShield);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eShield,OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nSerratedEdge = GetLocalInt(OBJECT_SELF,"SERRATED_EDGE");
|
||||
if ( nSerratedEdge )
|
||||
{
|
||||
effect eShield = EffectDamageShield(0,DAMAGE_BONUS_1d6,DAMAGE_TYPE_SLASHING);
|
||||
eShield = SupernaturalEffect(eShield);
|
||||
eShield = ExtraordinaryEffect(eShield);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eShield,OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nSpikedArmor = GetLocalInt(OBJECT_SELF,"SPIKED_ARMOR");
|
||||
if ( nSpikedArmor )
|
||||
{
|
||||
effect eShield = EffectDamageShield(0,DAMAGE_BONUS_1d4,DAMAGE_TYPE_PIERCING);
|
||||
eShield = SupernaturalEffect(eShield);
|
||||
eShield = ExtraordinaryEffect(eShield);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eShield,OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nGlow = GetLocalInt (OBJECT_SELF,"GLOW_COLOR");
|
||||
if (nGlow == 1)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_BLUE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 2)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_BROWN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 3)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_GREEN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 4)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_GREY);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 5)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_BLUE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 6)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_BROWN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 7)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_GREEN);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 8)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_ORANGE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 9)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_PURPLE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 10)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_RED);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 11)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_LIGHT_YELLOW);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 12)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_ORANGE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 13)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_PURPLE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 14)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_RED);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 15)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_WHITE);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
else if (nGlow == 16)
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_YELLOW);
|
||||
eVis = SupernaturalEffect(eVis);
|
||||
eVis = ExtraordinaryEffect(eVis);
|
||||
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
|
||||
}
|
||||
|
||||
// Check for randomizations.
|
||||
|
||||
ms_Nomenclature(OBJECT_SELF);
|
||||
|
||||
int nKeepskin = GetLocalInt(OBJECT_SELF,"RA_KEEPSKIN");
|
||||
if (nKeepskin != 1)
|
||||
{
|
||||
rnd_skin(OBJECT_SELF);
|
||||
}
|
||||
|
||||
rnd_skin(OBJECT_SELF);
|
||||
|
||||
int nKeephead = GetLocalInt(OBJECT_SELF,"RA_KEEPHEAD");
|
||||
if (nKeephead != 1)
|
||||
{
|
||||
rnd_head(OBJECT_SELF);
|
||||
}
|
||||
|
||||
int nKeeptats = GetLocalInt(OBJECT_SELF,"RA_KEEPTATS");
|
||||
if (nKeeptats != 1)
|
||||
{
|
||||
rnd_tattoo(OBJECT_SELF);
|
||||
}
|
||||
|
||||
|
||||
// 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));
|
||||
}
|
||||
|
||||
}
|
45
_module/nss/ra_wake_aragnak.nss
Normal file
45
_module/nss/ra_wake_aragnak.nss
Normal file
@@ -0,0 +1,45 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetEnteringObject();
|
||||
object oArea = GetArea(oPC);
|
||||
object oMob1 = GetNearestObjectByTag("RA_DRAG_ARAGNAK1", oPC); // Awake Aragnak
|
||||
object oMob2 = GetNearestObjectByTag("RA_DRAG_ARAGNAK2", oPC); // Sleeping Aragnak
|
||||
|
||||
//:: PCs only
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
//:: Only trigger once
|
||||
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
|
||||
if (DoOnce==TRUE) return;
|
||||
|
||||
//:: Don't want this trigger to fire if either version of Arganak is awake.
|
||||
if (GetLocalInt(oMob1, "awake") == 1) { return; }
|
||||
if (GetLocalInt(oMob2, "awake") == 1) { return; }
|
||||
|
||||
MusicBattlePlay(oArea);
|
||||
|
||||
//:: Remove "Sleep" from our dragon
|
||||
effect eEffect = GetFirstEffect(oMob2);
|
||||
|
||||
|
||||
while(GetIsEffectValid(eEffect))
|
||||
{
|
||||
if(GetEffectTag(eEffect) == "STILL_DRAGON")
|
||||
RemoveEffect(oMob2, eEffect);
|
||||
|
||||
eEffect = GetNextEffect(oMob2);
|
||||
}
|
||||
|
||||
//:: Talk a little trash.
|
||||
AssignCommand(GetObjectByTag("RA_DRAG_ARAGNAK2"), ActionSpeakString("INSECTS!!! YOU DARE DISTURB MY SLUMBER!!!!"));
|
||||
|
||||
FloatingTextStringOnCreature("You've drawn too close. The dragon is stirring from his slumber.", oPC);
|
||||
|
||||
//:: Set an INT so that we know he's awake
|
||||
SetLocalInt(oMob2, "awake", 1);
|
||||
SetLocalInt(oMob2, "sleep", 0);
|
||||
|
||||
//:: Set "do once" Tag
|
||||
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
|
||||
}
|
||||
|
45
_module/nss/slp_drg_onpercp.nss
Normal file
45
_module/nss/slp_drg_onpercp.nss
Normal file
@@ -0,0 +1,45 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name slp_drg_onpercp
|
||||
//:: Copyright (c) 2021 Project RATDOG
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sleeping Dragon external On Perception script
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 2021/12/29
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
if (GetLastPerceptionHeard() == TRUE)
|
||||
{
|
||||
if (GetIsPC(GetLastPerceived()) == TRUE)
|
||||
{
|
||||
object oMob = GetNearestObjectByTag("RA_DRAG_ARAGNAK2", GetLastPerceived(), 1);
|
||||
|
||||
//:: Remove "Sleep" from our dragon
|
||||
effect eEffect = GetFirstEffect(oMob);
|
||||
|
||||
while(GetIsEffectValid(eEffect))
|
||||
{
|
||||
if(GetEffectTag(eEffect) == "STILL_DRAGON")
|
||||
RemoveEffect(oMob, eEffect);
|
||||
|
||||
eEffect = GetNextEffect(oMob);
|
||||
}
|
||||
|
||||
SendMessageToPC(GetLastPerceived(), "The dragon woke up. Run!");
|
||||
|
||||
//:: Talk a little trash.
|
||||
AssignCommand(GetObjectByTag("RA_DRAG_ARAGNAK2"), ActionSpeakString("INSECTS!!! YOU DARE DISTURB MY SLUMBER!!!!"));
|
||||
|
||||
//:: Set an INT so that we know he's awake
|
||||
SetLocalInt(oMob, "awake", 1);
|
||||
SetLocalInt(oMob, "sleep", 0);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
ExecuteScript("nw_c2_default2", OBJECT_SELF);
|
||||
}
|
17
_module/nss/slp_drg_onspawn.nss
Normal file
17
_module/nss/slp_drg_onspawn.nss
Normal file
@@ -0,0 +1,17 @@
|
||||
//:://////////////////////////////////////////////
|
||||
//::
|
||||
//:: Name slp_drg_onspawn
|
||||
//:: Copyright (c) 2021 Project RATDOG
|
||||
//::
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Sleeping Dragon external listener OnSpawn
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jaysyn
|
||||
//:: Created On: 2021/12/29
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY, FALSE), OBJECT_SELF, 0.0f);
|
||||
}
|
@@ -176,6 +176,23 @@ string SpawnGroup(object oSpawn, string sTemplate)
|
||||
// Only Make Modifications Between These Lines
|
||||
// -------------------------------------------
|
||||
|
||||
// Aragnak in Lair
|
||||
if (sTemplate == "grp_aragnak")
|
||||
{
|
||||
int iRnd = Random(9)+1;
|
||||
|
||||
if (iRnd >= 7) // 30% chance to be awake
|
||||
{
|
||||
sRetTemplate = "RA_DRAG_ARAGNAK1";
|
||||
}
|
||||
|
||||
else // 70% chance to be sleeping
|
||||
{
|
||||
sRetTemplate = "RA_DRAG_ARAGNAK2";
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
if (GetStringLeft(sTemplate, 7) == "scaled_")
|
||||
{
|
||||
float fEncounterLevel;
|
||||
|
Reference in New Issue
Block a user