File Reorganization

File Reorganization.  Initialized ratdog_creature hak & added Project Q overrides & other models.  Continued dynamic swapover & upgrade.
This commit is contained in:
Jaysyn904
2021-10-02 03:15:34 -04:00
parent 8dbdd0bd23
commit e870de8a20
582 changed files with 564594 additions and 140683 deletions

View File

@@ -0,0 +1,94 @@
//::///////////////////////////////////////////////
//:: Custom User Defined Event
//:: ed3_troll_custom
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
*/
//:://////////////////////////////////////////////
//:: Created By: Gordon Bergstrom
//:: Created On: Dec 4, 2002
//:://////////////////////////////////////////////
void main()
{
int nUser = GetUserDefinedEventNumber();
int nFireDamage = 0;
int nAcidDamage = 0;
effect eSleep = EffectSleep();
effect eSlow = EffectSlow();
if(nUser == 1001) //HEARTBEAT
{
if(GetLocalInt(OBJECT_SELF, "nSubDual") > 0)
{
SetLocalInt(OBJECT_SELF, "nSubDual", GetLocalInt(OBJECT_SELF, "nSubDual") - 5);
if(GetLocalInt(OBJECT_SELF, "nSubDual") < GetCurrentHitPoints(OBJECT_SELF))
RemoveEffect(OBJECT_SELF, eSleep);
//SpeakString("My Subdual is now " + IntToString(GetLocalInt(OBJECT_SELF, "nSubDual")));
}
}
else if(nUser == 1002) // PERCEIVE
{
}
else if(nUser == 1003) // END OF COMBAT
{
}
else if(nUser == 1004) // ON DIALOGUE
{
}
else if(nUser == 1005) // ATTACKED
{
}
else if(nUser == 1006) // DAMAGED
{
int nTotalDamage = GetTotalDamageDealt();
if(GetDamageDealtByType(DAMAGE_TYPE_FIRE) > 0)
nFireDamage = GetDamageDealtByType(DAMAGE_TYPE_FIRE);
if(GetDamageDealtByType(DAMAGE_TYPE_ACID) > 0)
nAcidDamage = GetDamageDealtByType(DAMAGE_TYPE_ACID);
int nSubDmg = nTotalDamage - (nFireDamage + nAcidDamage);
int nActDmg = nFireDamage + nAcidDamage;
effect eHeal = EffectHeal(nSubDmg);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, OBJECT_SELF, 0.0f);
if(GetLocalInt(OBJECT_SELF, "nSubDual") <= GetCurrentHitPoints(OBJECT_SELF))
SetLocalInt(OBJECT_SELF, "nSubDual", nSubDmg + GetLocalInt(OBJECT_SELF, "nSubDual"));
int nSD = GetLocalInt(OBJECT_SELF, "nSubDual");
int nCH = GetCurrentHitPoints(OBJECT_SELF);
/*SpeakString("SD: " + IntToString(nSD));
SpeakString("CH: " + IntToString(nCH));*/
if(nSD > nCH)
{
//SpeakString("I am unconscious!");
SetIsDestroyable(FALSE, TRUE, TRUE);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSleep, OBJECT_SELF, 6.0f);
}
else if(nSD == nCH)
{
//SpeakString("I am staggered!");
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSlow, OBJECT_SELF, 6.0f);
}
}
else if(nUser == 1007) // DEATH
{
SetIsDestroyable(TRUE, FALSE, FALSE);
}
else if(nUser == 1008) // DISTURBED
{
}
}

View File

@@ -0,0 +1,85 @@
//::///////////////////////////////////////////////
//:: 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
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Modified By: Gordon Bergstrom
//:: Date: Dec 4, 2002
//:://////////////////////////////////////////////
#include "NW_O2_CONINCLUDE"
#include "NW_I0_GENERIC"
#include "ms_name_inc"
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
// 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 creatur
ms_Nomenclature(OBJECT_SELF);
// Setting local variable for tracking Subdual damage
SetLocalInt(OBJECT_SELF, "nSubDual", 0);
}

View File

@@ -0,0 +1,31 @@
//Put this script OnEnter
void main()
{
object oPC = GetEnteringObject();
object oTarget = GetObjectByTag("RA_PLC_BOULDER01");
object oSpawn;
location lTarget;
if (!GetIsPC(oPC)) return;
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
if (DoOnce==TRUE) return;
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
if (GetIsSkillSuccessful(oPC, SKILL_SEARCH, 30))
{
if (!GetIsObjectValid(oTarget)) return;
DelayCommand(0.1f, DestroyObject(oTarget, 0.0));
oTarget = GetWaypointByTag("RA_PLC_BOULDER01");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "ra_hiddencave001", lTarget);
SendMessageToPC(oPC, "You have discovered an illusion shrouded door.");
DestroyObject(oSpawn, 180.0f);
}
}

View File

@@ -0,0 +1,19 @@
//::///////////////////////////////////////////////////
//:: X0_TRAPLTH_SOD
//:: OnTriggered script for a projectile trap
//:: Spell fired: SYMBOL_OF_DEATH
//:: Spell caster level: 21
//::
//:: Copyright (c) 2021 Project RATDOG
//:: Created By: Jaysyn
//:: Created On: 10/02/2021
//::///////////////////////////////////////////////////
#include "x0_i0_projtrap"
void main()
{
TriggerProjectileTrap(2481, GetEnteringObject(), 21);
}

View File

@@ -18,12 +18,15 @@
#include "sparky_inc"
#include "sparky_enc"
#include "X0_I0_PARTYWIDE"
#include "spawn_functions"
void main()
{
object oPC = GetEnteringObject();
object oArea = OBJECT_SELF;
ExecuteScript("spawn_smpl_onen2");
if (GetIsPC(oPC) == TRUE) // Nothing happens if it wasn't a PC entering the area.
{
//////////////////////////////////////////////// Sparky Spawner Section
@@ -66,5 +69,8 @@ if (iAlreadySpawned || iDisabled)
}
SpawnEncounters(oArea);
//////////////////////////////////////////////// End Sparky Section
}
}

View File

@@ -15,4 +15,6 @@ SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
ActionStartConversation(oPC, "");
ExecuteScript("nw_c2_default2", OBJECT_SELF);
}

View File

@@ -0,0 +1,11 @@
// Port PC
///////////////////////////////////////////////////
void main()
{
object oPC = GetLastUsedBy(); // Get the user of the object
object oDest = GetObjectByTag("WP_From_SCR"); // way point tag.
if(GetIsPC(oPC))
{
AssignCommand(oPC,JumpToObject(oDest));
}
}

View File

@@ -9,4 +9,3 @@ void main()
AssignCommand(oPC,JumpToObject(oDest));
}
}