Updated the final boss battle

Updated the final boss battle to be closer to pen and paper.  Created souless minions for final battle.  Updated Wand of Orcus to be closer to pen and paper.  Fixed onAcquire bugs with teleporter stones.  Added several missing magical items that are part of the soulless minions gear.  Fixed respawning web placeable.  Put Oracle & Trabitz on proper factions.  Fixed XP system so powerful foes still grant XP.  Fixed size of Orcus model.  Full compile.
This commit is contained in:
Jaysyn904
2025-03-07 09:12:04 -05:00
parent 905a60ebad
commit 82c1015f4a
197 changed files with 114032 additions and 15791 deletions

View File

@@ -1,3 +1,34 @@
//:://////////////////////////////////////////////////////////////////
/*
Book of Vile Darkness: This is a work of ineffable evil<69>meat
and drink to divine spellcasters of that alignment (LE, NE, CE).
To fully consume the contents requires one week of study. Once
this has been accomplished, an evil spellcaster gains a +1
inherent bonus to Wisdom and one experience level<65>receiving enough
XP to put the character<65>s XP total midway between the minimum
needed for his new (higher) level and the minimum needed for
the level beyond that.
All lawful neutral, neutral, or chaotic neutral characters who
touch the book take 5d4 points of damage, and reading its pages
causes them to become evil (Will DC 13 negates). Such converts
immediately seek out an evil cleric to confirm their new alignment
(with an atonement spell).
Divine spellcasters neither good nor evil (LN, N, CN) who read
the book either lose 2d6<64>1,000 XP (01<30>50 on d%) or become evil
without benefit from the book (51<35>100). Good divine spellcasters
(LG, NG, CG) perusing the pages of the book of vile darkness have
to make a DC 16 Fortitude save or die. If they do not die, they
must succeed on a DC 15 Will save or suffer from a continuous
confusion effect (per the insanity spell). In the latter event,
even if the save is successful, the character loses 20,000 XP,
minus 1,000 for each point of Wisdom he has. (This calculation
cannot result in an XP gain.)
Other characters of good alignment take 5d6 points of damage from
just handling the tome. If such a character looks inside, there is
an 80% chance that an evil outsider attacks the character that
night.
*/
void main()
{
object oPC = GetItemActivator();

View File

@@ -1,42 +1,132 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.1
For download info, please visit:
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
#include "x2_inc_switches"
void main()
{
object oPC;
int nEvent = GetUserDefinedItemEventNumber(); // Which event triggered this
object oPC; // The player character using the item
object oItem; // The item being used
object oSpellOrigin; // The origin of the spell
object oSpellTarget; // The target of the spell
int iSpell; // The Spell ID number
oPC = GetItemActivator();
// Set the return value for the item event script
// * X2_EXECUTE_SCRIPT_CONTINUE - continue calling script after executed script is done
// * X2_EXECUTE_SCRIPT_END - end calling script after executed script is done
int nResult = X2_EXECUTE_SCRIPT_END;
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("grezport");
switch (nEvent)
{
case X2_ITEM_EVENT_ONHITCAST:
// * This code runs when the item has the 'OnHitCastSpell: Unique power' property
// * and it hits a target (if it's a weapon) or is being hit (if it's a piece of armor)
// * Note that this event fires for non PC creatures as well.
lTarget = GetLocation(oTarget);
oItem = GetSpellCastItem(); // The item triggering this spellscript
oPC = OBJECT_SELF; // The player triggering it
oSpellOrigin = OBJECT_SELF ; // Where the spell came from
oSpellTarget = GetSpellTargetObject(); // What the spell is aimed at
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
// Your code goes here
break;
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
case X2_ITEM_EVENT_ACTIVATE:
{
// * This code runs when the Unique Power property of the item is used or the item
// * is activated. Note that this event fires for PCs only
AssignCommand(oPC, ClearAllActions());
oPC = GetItemActivator(); // The player who activated the item
oItem = GetItemActivated(); // The item that was activated
DelayCommand(3.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("grezport");
oTarget = oPC;
lTarget = GetLocation(oTarget);
//Visual effects can't be applied to waypoints, so if it is a WP
//apply to the WP's location instead
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
int nInt;
nInt = GetObjectType(oTarget);
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget));
AssignCommand(oPC, ClearAllActions());
}
DelayCommand(3.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
oTarget = oPC;
//Visual effects can't be applied to waypoints, so if it is a WP
//apply to the WP's location instead
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget));
break;
}
case X2_ITEM_EVENT_EQUIP:
{ // * This code runs when the item is equipped
// * Note that this event fires for PCs only
oPC = GetPCItemLastEquippedBy(); // The player who equipped the item
oItem = GetPCItemLastEquipped(); // The item that was equipped
// Your code goes here
break;
}
case X2_ITEM_EVENT_UNEQUIP:
{ // * This code runs when the item is unequipped
// * Note that this event fires for PCs only
oPC = GetPCItemLastUnequippedBy(); // The player who unequipped the item
oItem = GetPCItemLastUnequipped(); // The item that was unequipped
// Your code goes here
break;
}
case X2_ITEM_EVENT_ACQUIRE:
{ // * This code runs when the item is acquired
// * Note that this event fires for PCs only
oPC = GetModuleItemAcquiredBy(); // The player who acquired the item
oItem = GetModuleItemAcquired(); // The item that was acquired
// Your code goes here
break;
}
case X2_ITEM_EVENT_UNACQUIRE:
{ // * This code runs when the item is unacquired
// * Note that this event fires for PCs only
oPC = GetModuleItemLostBy(); // The player who dropped the item
oItem = GetModuleItemLost(); // The item that was dropped
// Your code goes here
break;
}
case X2_ITEM_EVENT_SPELLCAST_AT:
{ //* This code runs when a PC or DM casts a spell from one of the
//* standard spellbooks on the item
oPC = OBJECT_SELF; // The player who cast the spell
oItem = GetSpellTargetObject(); // The item targeted by the spell
iSpell = GetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants
// Your code goes here
// Change the following line from X2_EXECUTE_SCRIPT_CONTINUE to
// X2_EXECUTE_SCRIPT_END if you want to prevent the spell that was
// cast on the item from taking effect
nResult = X2_EXECUTE_SCRIPT_CONTINUE;
break;
}
}
// Pass the return value back to the calling script
SetExecutedScriptReturnValue(nResult);
}

View File

@@ -0,0 +1,65 @@
//::///////////////////////////////////////////////
//:: Lycanthrope Spawn In
//:: NW_C2_LYCAN_9
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
*/
//:://////////////////////////////////////////////
//:: Created By:
//:: Created On:
//:://////////////////////////////////////////////
#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_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.
}

View File

@@ -0,0 +1,30 @@
//::///////////////////////////////////////////////
//:: Lycanthrope Change
//:: NW_C2_LYWOLF_D
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Changes someone into a werewolf when they are
attacked.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Jan 27, 2002
//:://////////////////////////////////////////////
void main()
{
// Make sure the were creature has a custom on spawn in with the line Custom User On Attacked being
// commented in. This becomes the Userdefined script.
int nUser = GetUserDefinedEventNumber();
int nChange = GetLocalInt(OBJECT_SELF,"NW_LYCANTHROPE");
effect eShape = EffectPolymorph(POLYMORPH_TYPE_WEREWOLF); //Use one of the polymorph constants here (WERE_RAT, WERE_WOLF or WERE_CAT)
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
if(nUser == 1005 && nChange == 0)
{
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eShape, OBJECT_SELF));
DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(OBJECT_SELF)));
SetLocalInt(OBJECT_SELF, "NW_LYCANTHROPE", 1);
}
}

View File

@@ -184,6 +184,10 @@ const float PWFXP_KILLINGBLOW_MODIFIER = 1.1; // 0%
const float PWFXP_APL_REDUCTION = 3.0; // levels
const float PWFXP_APL_NOXP = 6.0;
// maximum CR cap
// this stops creatures with sky-high CRs from giving godly XP
const float PWFXP_CR_MAX = 80.0;
// NEW:
// these 4 constants works like the APL constants above but it compares
// PC level vs challenge rating of the dead creature
@@ -200,7 +204,7 @@ const float PWFXP_APL_NOXP = 6.0;
// set _REDUCTION to CR_MAX and _NOXP to CR_MAX+1 if you don't want any cr reduction
//
// reduction constants for PCs fighting mobs with a CR below their level
const float PWFXP_CR_LESSTHAN_PCLEVEL_REDUCTION = 3.0;
const float PWFXP_CR_LESSTHAN_PCLEVEL_REDUCTION = 5.0;
const float PWFXP_CR_LESSTHAN_PCLEVEL_NOXP = 10.0;
// note: default setting only penalize PCs if they try to kill something
@@ -220,16 +224,12 @@ const float PWFXP_CR_LESSTHAN_PCLEVEL_NOXP = 10.0;
// set _REDUCTION to CR_MAX and _NOXP to CR_MAX+1 if you don't want any cr reduction
//
// reduction constants for PCs fighting mobs with a CR above their level
const float PWFXP_CR_GREATERTHAN_PCLEVEL_REDUCTION = 20.0;
const float PWFXP_CR_GREATERTHAN_PCLEVEL_NOXP = 30.0;
const float PWFXP_CR_GREATERTHAN_PCLEVEL_REDUCTION = PWFXP_CR_MAX;
const float PWFXP_CR_GREATERTHAN_PCLEVEL_NOXP = PWFXP_CR_MAX+1;
// described above
const float PWFXP_SCALAR = 1.0;
// maximum CR cap
// this stops creatures with sky-high CRs from giving godly XP
const float PWFXP_CR_MAX = 60.0;
// groups get a small xp bonus
// formular is groupsize-1 * modifier
// with a default value of 0.1 (10%) a party of 4 receives 30% XP bonus
@@ -247,7 +247,7 @@ const int PWFXP_MINIMUM_XP = 1;
// safety mechanism
// maximum XP for a kill
const int PWFXP_MAXIMUM_XP = 1000;
const int PWFXP_MAXIMUM_XP = 1200;
// UPDATED:
// these constants determine how XP division works

View File

@@ -0,0 +1,62 @@
///////////////////////////////////////
// Door Script - Allows only rogues to enter
//
////////////////////////////////////////
void main()
{
DelayCommand(10.0, ActionCloseDoor(OBJECT_SELF));
object oClicker = GetClickingObject();
object oTarget = GetTransitionTarget(OBJECT_SELF);
location lLoc = GetLocation(oTarget);
location lLoc2 = GetLocation(GetObjectByTag("WP_Throw_out"));
// Check if the PC has any levels in Rogue (works across all 8 class slots)
if (GetLevelByClass(CLASS_TYPE_ROGUE, oClicker) > 0)
AssignCommand(oClicker, JumpToLocation(lLoc));
else
AssignCommand(oClicker, JumpToLocation(lLoc2));
}
/* void main()
{
DelayCommand(10.0, ActionCloseDoor(OBJECT_SELF));
object oClicker = GetClickingObject();
object oTarget = GetTransitionTarget(OBJECT_SELF);
location lLoc = GetLocation(oTarget);
location lLoc2 = GetLocation(GetObjectByTag("WP_Throw_out"));
int oClass_1 = GetClassByPosition(1, oClicker);
int oClass_2 = GetClassByPosition(2, oClicker);
int oClass_3 = GetClassByPosition(3, oClicker);
int iPassed = 0;
if ((oClass_1==CLASS_TYPE_ROGUE)||(oClass_1==CLASS_TYPE_ROGUE))
iPassed = 1 ;
if((iPassed == 0) && (oClass_1==CLASS_TYPE_ROGUE))
iPassed = 1 ;
if ((oClass_2==CLASS_TYPE_ROGUE)||(oClass_2==CLASS_TYPE_ROGUE))
iPassed = 1 ;
if((iPassed == 0) && (oClass_2==CLASS_TYPE_ROGUE))
iPassed = 1 ;
if ((oClass_3==CLASS_TYPE_ROGUE)||(oClass_3==CLASS_TYPE_ROGUE))
iPassed = 1 ;
if((iPassed == 0) && (oClass_3==CLASS_TYPE_ROGUE))
iPassed = 1 ;
switch (iPassed)
{
case 0:
AssignCommand(oClicker,JumpToLocation(lLoc2));
break;
case 1:
AssignCommand(oClicker,JumpToLocation(lLoc));
break;
}
} */

View File

@@ -1,11 +1,35 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.1
For download info, please visit:
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
//Put this on action taken in the conversation editor
void main()
{
object oSpawn;
location lTarget;
object oPC = GetPCSpeaker();
object oOrcusWP = GetWaypointByTag("orcus1");
object oEaterWP = GetWaypointByTag("eater_orcus001");
object oEmbraceWP = GetWaypointByTag("embrace_orcus001");
object oHandWP = GetWaypointByTag("hand_orcus001");
object oCalogeraWP = GetWaypointByTag("npc_calogera");
lTarget = GetLocation(oOrcusWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "themaster002", lTarget);
lTarget = GetLocation(oEaterWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "eater_orcus001", lTarget);
lTarget = GetLocation(oEmbraceWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "embrace_orcus001", lTarget);
lTarget = GetLocation(oHandWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "hand_orcus001", lTarget);
lTarget = GetLocation(oCalogeraWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "npc_calogera", lTarget);
}
/* void main()
{
object oPC = GetPCSpeaker();
@@ -17,6 +41,8 @@ oTarget = GetWaypointByTag("orcus1");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "orcus001", lTarget);
//oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "orcus001", lTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "themaster002", lTarget);
}
} */

View File

@@ -1,11 +1,35 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.1
For download info, please visit:
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
//Put this on action taken in the conversation editor
void main()
{
object oSpawn;
location lTarget;
object oPC = GetPCSpeaker();
object oOrcusWP = GetWaypointByTag("orcus1");
object oEaterWP = GetWaypointByTag("eater_orcus001");
object oEmbraceWP = GetWaypointByTag("embrace_orcus001");
object oHandWP = GetWaypointByTag("hand_orcus001");
object oCalogeraWP = GetWaypointByTag("npc_calogera");
lTarget = GetLocation(oOrcusWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "themaster003", lTarget);
lTarget = GetLocation(oEaterWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "eater_orcus001", lTarget);
lTarget = GetLocation(oEmbraceWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "embrace_orcus001", lTarget);
lTarget = GetLocation(oHandWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "hand_orcus001", lTarget);
lTarget = GetLocation(oCalogeraWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "npc_calogera", lTarget);
}
/* void main()
{
object oPC = GetPCSpeaker();
@@ -19,4 +43,4 @@ lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "orcus002", lTarget);
}
} */

View File

@@ -1,11 +1,35 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.1
For download info, please visit:
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
//Put this on action taken in the conversation editor
void main()
{
object oSpawn;
location lTarget;
object oPC = GetPCSpeaker();
object oOrcusWP = GetWaypointByTag("orcus1");
object oEaterWP = GetWaypointByTag("eater_orcus001");
object oEmbraceWP = GetWaypointByTag("embrace_orcus001");
object oHandWP = GetWaypointByTag("hand_orcus001");
object oCalogeraWP = GetWaypointByTag("npc_calogera");
lTarget = GetLocation(oOrcusWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "themaster004", lTarget);
lTarget = GetLocation(oEaterWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "eater_orcus001", lTarget);
lTarget = GetLocation(oEmbraceWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "embrace_orcus001", lTarget);
lTarget = GetLocation(oHandWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "hand_orcus001", lTarget);
lTarget = GetLocation(oCalogeraWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "npc_calogera", lTarget);
}
/* void main()
{
object oPC = GetPCSpeaker();
@@ -17,6 +41,6 @@ oTarget = GetWaypointByTag("orcus1");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "orcus003", lTarget);
}
//oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "orcus003", lTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "themaster004", lTarget);
} */

View File

@@ -1,22 +1,32 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.1
For download info, please visit:
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
//Put this on action taken in the conversation editor
void main()
{
object oSpawn;
location lTarget;
object oPC = GetPCSpeaker();
object oPC = GetPCSpeaker();
object oTarget;
object oSpawn;
location lTarget;
oTarget = GetWaypointByTag("orcus1");
object oOrcusWP = GetWaypointByTag("orcus1");
object oEaterWP = GetWaypointByTag("eater_orcus001");
object oEmbraceWP = GetWaypointByTag("embrace_orcus001");
object oHandWP = GetWaypointByTag("hand_orcus001");
object oCalogeraWP = GetWaypointByTag("npc_calogera");
lTarget = GetLocation(oTarget);
lTarget = GetLocation(oOrcusWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "themaster001", lTarget);
lTarget = GetLocation(oEaterWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "eater_orcus001", lTarget);
lTarget = GetLocation(oEmbraceWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "embrace_orcus001", lTarget);
lTarget = GetLocation(oHandWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "hand_orcus001", lTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "orcus", lTarget);
lTarget = GetLocation(oCalogeraWP);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "npc_calogera", lTarget);
//oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "orcus", lTarget);
}

View File

@@ -0,0 +1,131 @@
#include "x2_inc_switches"
void main()
{
int nEvent = GetUserDefinedItemEventNumber(); // Which event triggered this
object oPC; // The player character using the item
object oItem; // The item being used
object oSpellOrigin; // The origin of the spell
object oSpellTarget; // The target of the spell
int iSpell; // The Spell ID number
// Set the return value for the item event script
// * X2_EXECUTE_SCRIPT_CONTINUE - continue calling script after executed script is done
// * X2_EXECUTE_SCRIPT_END - end calling script after executed script is done
int nResult = X2_EXECUTE_SCRIPT_END;
switch (nEvent)
{
case X2_ITEM_EVENT_ONHITCAST:
{ // * This code runs when the item has the 'OnHitCastSpell: Unique power' property
// * and it hits a target (if it's a weapon) or is being hit (if it's a piece of armor)
// * Note that this event fires for non PC creatures as well.
oItem = GetSpellCastItem(); // The item triggering this spellscript
oPC = OBJECT_SELF; // The player triggering it
oSpellOrigin = OBJECT_SELF ; // Where the spell came from
oSpellTarget = GetSpellTargetObject(); // What the spell is aimed at
// Your code goes here
break;
}
case X2_ITEM_EVENT_ACTIVATE:
{ // * This code runs when the Unique Power property of the item is used or the item
// * is activated. Note that this event fires for PCs only
oPC = GetItemActivator(); // The player who activated the item
oItem = GetItemActivated(); // The item that was activated
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("WP_TOWNPORT");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ClearAllActions());
DelayCommand(3.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
oTarget = oPC;
//Visual effects can't be applied to waypoints, so if it is a WP
//apply to the WP's location instead
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget));
break;
}
case X2_ITEM_EVENT_EQUIP:
{ // * This code runs when the item is equipped
// * Note that this event fires for PCs only
oPC = GetPCItemLastEquippedBy(); // The player who equipped the item
oItem = GetPCItemLastEquipped(); // The item that was equipped
// Your code goes here
break;
}
case X2_ITEM_EVENT_UNEQUIP:
{ // * This code runs when the item is unequipped
// * Note that this event fires for PCs only
oPC = GetPCItemLastUnequippedBy(); // The player who unequipped the item
oItem = GetPCItemLastUnequipped(); // The item that was unequipped
// Your code goes here
break;
}
case X2_ITEM_EVENT_ACQUIRE:
{ // * This code runs when the item is acquired
// * Note that this event fires for PCs only
oPC = GetModuleItemAcquiredBy(); // The player who acquired the item
oItem = GetModuleItemAcquired(); // The item that was acquired
// Your code goes here
break;
}
case X2_ITEM_EVENT_UNACQUIRE:
{ // * This code runs when the item is unacquired
// * Note that this event fires for PCs only
oPC = GetModuleItemLostBy(); // The player who dropped the item
oItem = GetModuleItemLost(); // The item that was dropped
// Your code goes here
break;
}
case X2_ITEM_EVENT_SPELLCAST_AT:
{ //* This code runs when a PC or DM casts a spell from one of the
//* standard spellbooks on the item
oPC = OBJECT_SELF; // The player who cast the spell
oItem = GetSpellTargetObject(); // The item targeted by the spell
iSpell = GetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants
// Your code goes here
// Change the following line from X2_EXECUTE_SCRIPT_CONTINUE to
// X2_EXECUTE_SCRIPT_END if you want to prevent the spell that was
// cast on the item from taking effect
nResult = X2_EXECUTE_SCRIPT_CONTINUE;
break;
}
}
// Pass the return value back to the calling script
SetExecutedScriptReturnValue(nResult);
}

View File

@@ -1,42 +1,132 @@
/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.1
For download info, please visit:
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
#include "x2_inc_switches"
void main()
{
object oPC;
int nEvent = GetUserDefinedItemEventNumber(); // Which event triggered this
object oPC; // The player character using the item
object oItem; // The item being used
object oSpellOrigin; // The origin of the spell
object oSpellTarget; // The target of the spell
int iSpell; // The Spell ID number
oPC = GetItemActivator();
// Set the return value for the item event script
// * X2_EXECUTE_SCRIPT_CONTINUE - continue calling script after executed script is done
// * X2_EXECUTE_SCRIPT_END - end calling script after executed script is done
int nResult = X2_EXECUTE_SCRIPT_END;
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("WP_TOWNPORT");
switch (nEvent)
{
case X2_ITEM_EVENT_ONHITCAST:
{ // * This code runs when the item has the 'OnHitCastSpell: Unique power' property
// * and it hits a target (if it's a weapon) or is being hit (if it's a piece of armor)
// * Note that this event fires for non PC creatures as well.
lTarget = GetLocation(oTarget);
oItem = GetSpellCastItem(); // The item triggering this spellscript
oPC = OBJECT_SELF; // The player triggering it
oSpellOrigin = OBJECT_SELF ; // Where the spell came from
oSpellTarget = GetSpellTargetObject(); // What the spell is aimed at
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
// Your code goes here
break;
}
case X2_ITEM_EVENT_ACTIVATE:
{ // * This code runs when the Unique Power property of the item is used or the item
// * is activated. Note that this event fires for PCs only
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
oPC = GetItemActivator(); // The player who activated the item
oItem = GetItemActivated(); // The item that was activated
AssignCommand(oPC, ClearAllActions());
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("WP_TOWNPORT");
DelayCommand(3.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
lTarget = GetLocation(oTarget);
oTarget = oPC;
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
//Visual effects can't be applied to waypoints, so if it is a WP
//apply to the WP's location instead
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
int nInt;
nInt = GetObjectType(oTarget);
AssignCommand(oPC, ClearAllActions());
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget));
DelayCommand(3.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
}
oTarget = oPC;
//Visual effects can't be applied to waypoints, so if it is a WP
//apply to the WP's location instead
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget));
break;
}
case X2_ITEM_EVENT_EQUIP:
{ // * This code runs when the item is equipped
// * Note that this event fires for PCs only
oPC = GetPCItemLastEquippedBy(); // The player who equipped the item
oItem = GetPCItemLastEquipped(); // The item that was equipped
// Your code goes here
break;
}
case X2_ITEM_EVENT_UNEQUIP:
{ // * This code runs when the item is unequipped
// * Note that this event fires for PCs only
oPC = GetPCItemLastUnequippedBy(); // The player who unequipped the item
oItem = GetPCItemLastUnequipped(); // The item that was unequipped
// Your code goes here
break;
}
case X2_ITEM_EVENT_ACQUIRE:
{ // * This code runs when the item is acquired
// * Note that this event fires for PCs only
oPC = GetModuleItemAcquiredBy(); // The player who acquired the item
oItem = GetModuleItemAcquired(); // The item that was acquired
// Your code goes here
break;
}
case X2_ITEM_EVENT_UNACQUIRE:
{ // * This code runs when the item is unacquired
// * Note that this event fires for PCs only
oPC = GetModuleItemLostBy(); // The player who dropped the item
oItem = GetModuleItemLost(); // The item that was dropped
// Your code goes here
break;
}
case X2_ITEM_EVENT_SPELLCAST_AT:
{ //* This code runs when a PC or DM casts a spell from one of the
//* standard spellbooks on the item
oPC = OBJECT_SELF; // The player who cast the spell
oItem = GetSpellTargetObject(); // The item targeted by the spell
iSpell = GetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants
// Your code goes here
// Change the following line from X2_EXECUTE_SCRIPT_CONTINUE to
// X2_EXECUTE_SCRIPT_END if you want to prevent the spell that was
// cast on the item from taking effect
nResult = X2_EXECUTE_SCRIPT_CONTINUE;
break;
}
}
// Pass the return value back to the calling script
SetExecutedScriptReturnValue(nResult);
}

View File

@@ -0,0 +1,48 @@
//::///////////////////////////////////////////////
//::
//:: tribitz_att_pc.nss
//::
//:: Copyright (c) 2025 Project RATDOG
//::
//:://////////////////////////////////////////////
/*
Makes speaking NPC attack the PC speaker
*/
//:://////////////////////////////////////////////
//::
//:: Created By: Jaysyn
//:: Created On: 20220618
//::
//:://////////////////////////////////////////////
#include "nw_i0_generic"
void main()
{
object oPC = GetPCSpeaker();
object oTribitz = OBJECT_SELF;
// Have Tribitz target the PC.
SetIsTemporaryEnemy(oPC, oTribitz);
ActionAttack(oPC);
DetermineCombatRound(oPC);
// Loop through all objects in the area.
object oObject = GetFirstObjectInArea(oTribitz);
while (GetIsObjectValid(oObject))
{
// Check if the object is a creature and isn't the PC or Tribitz.
if (GetObjectType(oObject) == OBJECT_TYPE_CREATURE && oObject != oPC && oObject != oTribitz)
{
// Check if the creature's tag is "GoblinPriestl8a"
if (GetTag(oObject) == "GoblinPriestl8a")
{
// Set PC as temporary enemy for the minion and order it to attack.
SetIsTemporaryEnemy(oPC, oObject);
ActionAttack(oPC);
DetermineCombatRound(oPC);
}
}
oObject = GetNextObjectInArea(oTribitz);
}
}

View File

@@ -0,0 +1,164 @@
//::///////////////////////////////////////////////
//:: Example Item Event Script
//:: x2_it_example
//:: Copyright (c) 2003 Bioware Corp.
//:://////////////////////////////////////////////
/*
This is an example of how to use the
new default module events for NWN to
have all code concerning one item in
a single file.
Note that this system only works if
the following scripts are set in your
module events
OnEquip - x2_mod_def_equ
OnUnEquip - x2_mod_def_unequ
OnAcquire - x2_mod_def_aqu
OnUnAcqucire - x2_mod_def_unaqu
OnActivate - x2_mod_def_act
*/
//:://////////////////////////////////////////////
//:: Created By: Georg Zoeller
//:: Created On: 2003-09-10
//:: Modified By: Grimlar
//:: Modified On: March 2004
//:://////////////////////////////////////////////
#include "prc_inc_racial"
#include "x2_inc_switches"
#include "prc_inc_spells"
void main()
{
int nEvent = GetUserDefinedItemEventNumber(); // Which event triggered this
object oPC; // The player character using the item
object oItem; // The item being used
object oSpellOrigin; // The origin of the spell
object oSpellTarget; // The target of the spell
int iSpell; // The Spell ID number
// Set the return value for the item event script
// * X2_EXECUTE_SCRIPT_CONTINUE - continue calling script after executed script is done
// * X2_EXECUTE_SCRIPT_END - end calling script after executed script is done
int nResult = X2_EXECUTE_SCRIPT_END;
switch (nEvent)
{
case X2_ITEM_EVENT_ONHITCAST:
{ // * This code runs when the item has the 'OnHitCastSpell: Unique power' property
// * and it hits a target (if it's a weapon) or is being hit (if it's a piece of armor)
// * Note that this event fires for non-PC creatures as well.
oItem = PRCGetSpellCastItem(); // The item triggering this spellscript
oPC = OBJECT_SELF; // The player triggering it
oSpellOrigin = OBJECT_SELF; // Where the spell came from
oSpellTarget = PRCGetSpellTargetObject(); // What the spell is aimed at
// Necromantic death effect:
// If the wand touches any non-outsider, or an outsider with less than 15 HD,
// the target must succeed on a DC 25 Fortitude save or be instantly slain.
if (GetObjectType(oSpellTarget) == OBJECT_TYPE_CREATURE)
{
// Check if target is non-outsider OR an outsider with fewer than 15 HD.
if ((MyPRCGetRacialType(oSpellTarget) != RACIAL_TYPE_OUTSIDER) ||
((MyPRCGetRacialType(oSpellTarget) == RACIAL_TYPE_OUTSIDER) && (GetHitDice(oSpellTarget) < 15)))
{
// Call the FortitudeSave function.
// If the save fails, apply the death effect.
if (!FortitudeSave(oSpellTarget, 25, SAVING_THROW_TYPE_DEATH, oSpellOrigin))
{
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oSpellTarget);
}
}
}
break;
}
case X2_ITEM_EVENT_ACTIVATE:
// * This code runs when the Unique Power property of the item is used or the item
// * is activated. Note that this event fires for PCs only
oPC = GetItemActivator(); // The player who activated the item
oItem = GetItemActivated(); // The item that was activated
// Your code goes here
break;
case X2_ITEM_EVENT_EQUIP:
{ // This code runs when the item is equipped.
// Note that this event fires for PCs only.
oPC = GetPCItemLastEquippedBy(); // The player who equipped the item
oItem = GetPCItemLastEquipped(); // The item that was equipped
// Apply a negative level effect to any good creature wielding this weapon.
// The effect bestows one negative level (without actual level loss)
// that persists as long as the item is wielded and cannot be removed by any restoration.
int nAlignment = GetAlignmentGoodEvil(oPC);
if (nAlignment == ALIGNMENT_GOOD)
{
effect eNegLevel = EffectNegativeLevel(1);
eNegLevel = UnyieldingEffect(eNegLevel);
eNegLevel = TagEffect(eNegLevel, "NegLevelOnWield");
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eNegLevel, oPC);
}
break;
}
case X2_ITEM_EVENT_UNEQUIP:
{ // This code runs when the item is unequipped.
// Note that this event fires for PCs only.
oPC = GetPCItemLastUnequippedBy(); // The player who unequipped the item
oItem = GetPCItemLastUnequipped(); // The item that was unequipped
// Remove any negative level effect with the tag "NegLevelOnWield".
effect eEffect = GetFirstEffect(oPC);
while (GetIsEffectValid(eEffect))
{
if (GetEffectTag(eEffect) == "NegLevelOnWield")
RemoveEffect(oPC, eEffect);
eEffect = GetNextEffect(oPC);
}
break;
}
case X2_ITEM_EVENT_ACQUIRE:
// * This code runs when the item is acquired
// * Note that this event fires for PCs only
oPC = GetModuleItemAcquiredBy(); // The player who acquired the item
oItem = GetModuleItemAcquired(); // The item that was acquired
// Your code goes here
break;
case X2_ITEM_EVENT_UNACQUIRE:
// * This code runs when the item is unacquired
// * Note that this event fires for PCs only
oPC = GetModuleItemLostBy(); // The player who dropped the item
oItem = GetModuleItemLost(); // The item that was dropped
// Your code goes here
break;
case X2_ITEM_EVENT_SPELLCAST_AT:
//* This code runs when a PC or DM casts a spell from one of the
//* standard spellbooks on the item
oPC = OBJECT_SELF; // The player who cast the spell
oItem = PRCGetSpellTargetObject(); // The item targeted by the spell
iSpell = PRCGetSpellId(); // The id of the spell that was cast
// See the list of SPELL_* constants
// Your code goes here
// Change the following line from X2_EXECUTE_SCRIPT_CONTINUE to
// X2_EXECUTE_SCRIPT_END if you want to prevent the spell that was
// cast on the item from taking effect
nResult = X2_EXECUTE_SCRIPT_CONTINUE;
break;
}
// Pass the return value back to the calling script
SetExecutedScriptReturnValue(nResult);
}