PnP Enhancements continue

PnP Enhancements continue.  Fixed some quest logic, made some of the quests reward the entire party instead of the player that turns it in.  Updated Warrior's Guild.  Colored Wilderness map for the hell of it. Full compile.
This commit is contained in:
Jaysyn904
2022-11-19 00:37:42 -05:00
parent a3058d3ed1
commit 310b26f555
136 changed files with 3908 additions and 18074 deletions

View File

@@ -0,0 +1,7 @@
void main()
{
AssignCommand(OBJECT_SELF, ClearAllActions());
AssignCommand(OBJECT_SELF, ActionAttack(GetNearestObjectByTag("CombatDummy")));
}

View File

@@ -20,7 +20,7 @@ int StartingConditional()
//:: Inspect quest state
nInt = RetrieveQuestState("outcasts", oPC);
if (!nInt == 1)
if (!(nInt == 1))
return FALSE;
//nInt=GetLocalInt(oPC, "NW_JOURNAL_ENTRYoutcasts");

View File

@@ -20,7 +20,7 @@ int StartingConditional()
//:: Inspect quest state
nInt = RetrieveQuestState("outcasts", oPC);
if (!nInt == 2)
if (!(nInt == 2))
return FALSE;
//nInt=GetLocalInt(oPC, "NW_JOURNAL_ENTRYoutcasts");

View File

@@ -20,7 +20,7 @@ int StartingConditional()
//:: Inspect quest state
nInt = RetrieveQuestState("outcasts", oPC);
if (!nInt == 3)
if (!(nInt == 3))
return FALSE;
//nInt=GetLocalInt(oPC, "NW_JOURNAL_ENTRYoutcasts");

View File

@@ -13,19 +13,26 @@
#include "nw_i0_tool"
#include "pqj_inc"
#include "x0_i0_partywide"
void main()
{
//:: Declare major variables
object oPC = GetPCSpeaker();
//:: Set quest stage & update DB.
AddPersistentJournalQuestEntry("marthek", 5, oPC);
//:: Reward the party
int nGold = 1500;
//:: Give the PC some gold
GiveGoldToCreature(oPC, 1500);
//:: Get gold for each PC
//:: Take one off GetNumberPartyMembers(), see known bugs
int nMembers = GetNumberPartyMembers(oPC) - 1;
//:: Give the correct gold to all of them
GiveGoldToAll(oPC, nGold/nMembers);
//:: Give the PC's party some XP
RewardPartyXP(700, oPC);
}
//:: Set quest stage & update DB.
AddPersistentJournalQuestEntry("marthek", 5, oPC);
}

View File

@@ -13,14 +13,22 @@
#include "pqj_inc"
#include "nw_i0_tool"
#include "x0_i0_partywide"
void main()
{
//:: Declare major variables
object oPC = GetPCSpeaker();
//:: Give the speaker some gold
RewardPartyGP(50000, oPC);
//:: Reward the party
int nGold = 50000;
//:: Get gold for each PC
//:: Take one off GetNumberPartyMembers(), see known bugs
int nMembers = GetNumberPartyMembers(oPC) - 1;
//:: Give the correct gold to all of them
GiveGoldToAll(oPC, nGold/nMembers);
//:: Set quest stage & update DB.
AddPersistentJournalQuestEntry("mushroom", 2, oPC);

View File

@@ -3,7 +3,7 @@
//:: Copyright (c) 2022 Project RATDOG
//:://////////////////////////////////////////////
/*
Ends & rewards "The Oucasts" quest
Ends & rewards "The Outcasts" quest
for the vagrants in the woods
*/
//:://////////////////////////////////////////////
@@ -12,6 +12,7 @@
//:://////////////////////////////////////////////
#include "pqj_inc"
#include "x0_i0_partywide"
void main()
{
@@ -20,9 +21,9 @@ void main()
object oPC = GetPCSpeaker();
//:: XP reward
GiveXPToCreature(oPC, 200);
GiveXPToAll(oPC, 200);
//:: Set quest stage & update DB.
AddPersistentJournalQuestEntry("outcasts", 3, oPC);
}
}

View File

@@ -12,6 +12,7 @@
//:://////////////////////////////////////////////
#include "pqj_inc"
#include "x0_i0_partywide"
void main()
{
@@ -23,9 +24,9 @@ void main()
GiveGoldToCreature(oPC, 1000);
//:: XP reward
GiveXPToCreature(oPC, 500);
GiveXPToAll(oPC, 500);
//:: Set quest stage & update DB.
AddPersistentJournalQuestEntry("papers", 3, oPC);
}
}

View File

@@ -14,11 +14,11 @@
#include "pqj_inc"
void main()
{
{
//:: Declare major variables
object oPC = GetPCSpeaker();
object oPC = GetPCSpeaker();
//:: Set quest stage & update DB.
AddPersistentJournalQuestEntry("priests", 3, oPC);
AddPersistentJournalQuestEntry("priests", 3, oPC);
}
}

View File

@@ -26,7 +26,7 @@ int StartingConditional()
nInt = RetrieveQuestState("spiders", oPC);
// nInt=GetLocalInt(oPC, "NW_JOURNAL_ENTRYspiders");
if (!nInt == 3) return FALSE;
if (!(nInt == 3)) return FALSE;
return TRUE;
}

View File

@@ -27,7 +27,7 @@ int StartingConditional()
// nInt=GetLocalInt(oPC, "NW_JOURNAL_ENTRYspiders");
if (!nInt == 1) return FALSE;
if (!(nInt == 1)) return FALSE;
return TRUE;
}

View File

@@ -1,6 +1,6 @@
//
// Randomized Armor Include
// RA_RND_ARMOR_INC
// ra_rnd_armor_inc
//
// By: Jaysyn
//

View File

@@ -0,0 +1,21 @@
//::///////////////////////////////////////////////
//:: Name ra_rnd_train_cmb
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Default Combat Round End script
*/
//:://////////////////////////////////////////////
//:: Created By: Keith Warner
//:: Created On: June 11/03
//:://////////////////////////////////////////////
void main()
{
//:: Execute the default NPC OnCombatRoundEnd script
//ExecuteScript("nw_c2_default3", OBJECT_SELF);
//:: Execute the PRC NPC OnCombatRoundEnd script
//ExecuteScript("prc_npc_combat", OBJECT_SELF);
}

View File

@@ -0,0 +1,25 @@
//::///////////////////////////////////////////////
//:: Name ra_rnd_train_hb
//:: Copyright (c) 2022 Project RATDOG
//:://////////////////////////////////////////////
/*
Warrior Guild Trainee Heartbeat script
*/
//:://////////////////////////////////////////////
void main()
{
if ((!GetIsInCombat(OBJECT_SELF) && (GetItemInSlot(INVENTORY_SLOT_CHEST) == OBJECT_INVALID)))
DelayCommand(0.5f, ActionEquipMostEffectiveArmor());
//:: Attack the Combat Dummy
AssignCommand(OBJECT_SELF, ClearAllActions());
AssignCommand(OBJECT_SELF, ActionAttack(GetNearestObjectByTag("CombatDummy")));
//:: Execute the default NPC OnHeartbeat script
ExecuteScript("nw_c2_default1", OBJECT_SELF);
//:: Execute the PRC NPC OnHeartbeat script
ExecuteScript("prc_npc_hb", OBJECT_SELF);
}

View File

@@ -0,0 +1,494 @@
//::///////////////////////////////////////////////
//:: Name ra_rnd_train_spw
//:: Copyright (c) 2001 Bioware Corp.
//:: Copyright (c) 2022 Project RATDOG
//:://////////////////////////////////////////////
/*
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 "ra_rnd_armor_inc"
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()
{
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 ));
}
//:: Initialize Mount System
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);
}
//:: Randomize Armor
RndLightArmor(OBJECT_SELF);
ActionEquipMostEffectiveArmor();
// Execute default OnSpawn script.
ExecuteScript("nw_c2_default9", OBJECT_SELF);
// Execute PRC OnSpawn script.
ExecuteScript("prc_npc_spawn", OBJECT_SELF);
//Post Spawn event requeste
if (nSpecEvent == 2 || nSpecEvent == 3)
{
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN));
}
AssignCommand(OBJECT_SELF, ActionAttack(GetNearestObjectByTag("CombatDummy")));
}

View File

@@ -25,7 +25,8 @@ void main()
object oPC = GetEnteringObject();
object oArea = OBJECT_SELF;
ExecuteScript("spawn_smpl_onen2");
//:: Fires any NESS spawners
ExecuteScript("spawn_smpl_onen2");
if (GetIsPC(oPC) == TRUE) // Nothing happens if it wasn't a PC entering the area.
{

View File

@@ -243,6 +243,7 @@ road; +2 if the encounter occurs at night. */
case 8: case 9:
//:: Cavalry Patrol (6 knights, 1 sheriff)
{
int nRandom = Random(2);
int nCavalryPatrol = 7;
// Set Number of Placeables
SetLocalInt(oCamp, "CampNumP", 0);
@@ -271,37 +272,80 @@ road; +2 if the encounter occurs at night. */
// Set Creature 0 and Spawn Flags
SetLocalString(oCamp, "CampC0", "ra_m_sheriff001");
SetLocalString(oCamp, "CampC0_Flags", "SP_RG015M005_PR01T3");
if (nRandom)
{
SetLocalString(oCamp, "CampC0_Flags", "SP_RG035M015_PR01T3_SL01");
}
else
{
SetLocalString(oCamp, "CampC0_Flags", "SP_RG035M015_PR02T3_SL02");
}
// Set Creature 1 and Spawn Flags
SetLocalString(oCamp, "CampC1", "ra_m_knight001");
// SetLocalString(oCamp, "CampC1_Flags", "SP_SF_RW_CD60_RH");
SetLocalString(oCamp, "CampC1_Flags", "SP_RG015M005_PR01T3");
if (nRandom)
{
SetLocalString(oCamp, "CampC1_Flags", "SP_RG035M015_PR01T3_SL01");
}
else
{
SetLocalString(oCamp, "CampC1_Flags", "SP_RG035M015_PR02T3_SL02");
}
// Set Creature 2 and Spawn Flags
SetLocalString(oCamp, "CampC2", "ra_m_knight001");
// SetLocalString(oCamp, "CampC2_Flags", "SP_SF_RW_CD60_RH");
SetLocalString(oCamp, "CampC2_Flags", "SP_RG015M005_PR01T3");
if (nRandom)
{
SetLocalString(oCamp, "CampC2_Flags", "SP_RG015M005_SF_PR01T3_SL01");
}
else
{
SetLocalString(oCamp, "CampC2_Flags", "SP_RG015M005_SF_PR02T3_SL02");
}
// Set Creature 3 and Spawn Flags
SetLocalString(oCamp, "CampC3", "ra_m_knight001");
// SetLocalString(oCamp, "CampC3_Flags", "SP_SF_RW_CD60_RH");
SetLocalString(oCamp, "CampC3_Flags", "SP_RG015M005_PR01T3");
if (nRandom)
{
SetLocalString(oCamp, "CampC3_Flags", "SP_RG015M005_SF_PR01T3_SL01");
}
else
{
SetLocalString(oCamp, "CampC3_Flags", "SP_RG015M005_SF_PR02T3_SL02");
}
// Set Creature 4 and Spawn Flags
SetLocalString(oCamp, "CampC4", "ra_m_knight001");
// SetLocalString(oCamp, "CampC4_Flags", "SP_SF_RW_CD60_RH");
SetLocalString(oCamp, "CampC4_Flags", "SP_RG015M005_PR01T3");
if (nRandom)
{
SetLocalString(oCamp, "CampC4_Flags", "SP_RG015M005_SF_PR01T3_SL01");
}
else
{
SetLocalString(oCamp, "CampC4_Flags", "SP_RG015M005_SF_PR02T3_SL02");
}
// Set Creature 5 and Spawn Flags
SetLocalString(oCamp, "CampC5", "ra_m_knight001");
// SetLocalString(oCamp, "CampC5_Flags", "SP_SF_RW_CD60_RH");
SetLocalString(oCamp, "CampC5_Flags", "SP_RG015M005_PR01T3");
if (nRandom)
{
SetLocalString(oCamp, "CampC5_Flags", "SP_RG015M005_SF_PR01T3_SL01");
}
else
{
SetLocalString(oCamp, "CampC5_Flags", "SP_RG015M005_SF_PR02T3_SL02");
}
// Set Creature 6 and Spawn Flags
SetLocalString(oCamp, "CampC6", "ra_m_knight001");
// SetLocalString(oCamp, "CampC6_Flags", "SP_SF_RW_CD60_RH");
SetLocalString(oCamp, "CampC6_Flags", "SP_RG015M005_PR01T3");
if (nRandom)
{
SetLocalString(oCamp, "CampC6_Flags", "SP_RG015M005_SF_PR01T3_SL01");
}
else
{
SetLocalString(oCamp, "CampC6_Flags", "SP_RG015M005_SF_PR02T3_SL02");
}
break;
}

View File

@@ -1,6 +1,13 @@
//
// Spawn Check - Custom
//
#include "pqj_inc"
//void main (){}
int ParseFlagValue(string sName, string sFlag, int nDigits, int nDefault);
int ParseSubFlagValue(string sName, string sFlag, int nDigits, string sSubFlag, int nSubDigits, int nDefault);
object GetChildByTag(object oSpawn, string sChildTag);
@@ -93,6 +100,28 @@ int SpawnCheckCustom(object oSpawn)
}
//
//:: Checks for stage 1 or lower for the "Spider's Captive quest"
if (nSpawnCheckCustom == 50)
{
//:: Initialize major variables
object oArea = GetArea(OBJECT_SELF);
object oPC = GetFirstObjectInArea(oArea);
//:: Cycle through PCs in Area
while (oPC != OBJECT_INVALID)
{
//:: Check quest stage
if ( RetrieveQuestState("spiders", oPC) <= 1 )
{
nProcessSpawn = TRUE;
//SendMessageToPC(oPC, "Spawn Processed");
SetLocalInt(oSpawn, "SpawnProcessed", TRUE);
}
oPC = GetNextObjectInArea(oArea);
}
}
//:: Checks for stage 1 or lower for the "Spider's Captive quest"
// -------------------------------------------
// Only Make Modifications Between These Lines