Fixed missing Factions on Animated Statues
Fixed missing Factions on Animated Statues. Added XP to next level for lvl 40+ characters. Added Dragon AI for CODI Core AI. Tweaked Beholders & some Dragons to use CODI Core AI. Fixed CODI Core NPC onSPawn script to run PRC scripts properly. Full compile. Updated release archive.
This commit is contained in:
@@ -582,27 +582,25 @@ void main()
|
||||
{
|
||||
//:: Execute drop in from above spawn.
|
||||
ExecuteScript("nw_c2_dropin9", OBJECT_SELF);
|
||||
//:: Execute CODI AI OnSpawn script.
|
||||
ExecuteScript(sSpawnType, OBJECT_SELF);
|
||||
}
|
||||
else
|
||||
{
|
||||
//:: Execute CODI AI OnSpawn script.
|
||||
ExecuteScript(sSpawnType, OBJECT_SELF);
|
||||
|
||||
//:: Execute default OnSpawn script.
|
||||
//ExecuteScript("nw_c2_default9", OBJECT_SELF);
|
||||
//:: Execute PRC OnSpawn module hook script.
|
||||
ExecuteScript("prc_pwonspawn", OBJECT_SELF);
|
||||
//:: Execute PRC OnSpawn script.
|
||||
ExecuteScript("prc_npc_spawn", OBJECT_SELF);
|
||||
}
|
||||
|
||||
//:: Set or Randomize name
|
||||
ms_Nomenclature(OBJECT_SELF);
|
||||
|
||||
//:: Execute PRC OnSpawn script.
|
||||
ExecuteScript("prc_npc_spawn", OBJECT_SELF);
|
||||
|
||||
|
||||
//:: Post Spawn event requested
|
||||
if (nSpecEvent == 2 || nSpecEvent == 3)
|
||||
{
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN));
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN));
|
||||
}
|
||||
|
||||
}
|
174
_module/nss/no_spn_dragon.nss
Normal file
174
_module/nss/no_spn_dragon.nss
Normal file
@@ -0,0 +1,174 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: On Spawn In
|
||||
//::
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Determines the course of action to be taken
|
||||
after having just been spawned in
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
#include "sd_lootsys_tools"
|
||||
#include "no_lib_data"
|
||||
#include "no_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
SetThreatLevel(OBJECT_SELF);
|
||||
|
||||
|
||||
//Dragon config
|
||||
|
||||
AddBehaviour( "+ENHANCESELF", 100 ); //enhancing spells [self]
|
||||
|
||||
AddBehaviour( "+DISPELAOE", 90 ); //Dispel AOEs
|
||||
AddBehaviour( "+DISPEL", 40 ); //Dispel [enemies]
|
||||
AddBehaviour( "+DISMISSAL", 80 ); //Dismiss [summoned enemies]
|
||||
|
||||
AddBehaviour( "+BREATH", 25 ); //breath weapons
|
||||
|
||||
AddBehaviour( "+FEATENHANCE", 60 ); //feat enhance [self]
|
||||
AddBehaviour( "+ATKMELEE", 100 ); //melee attack
|
||||
|
||||
|
||||
/*
|
||||
// Movement
|
||||
|
||||
AddBehaviour( "+AVOIDENEMY", 100 ); //Keep away from enemies
|
||||
AddBehaviour( "+AVOIDMELEE", 100 ); //Flee
|
||||
//Melee
|
||||
AddBehaviour( "+MELEEASSIST", 100 ); //Melee Assist [allies]
|
||||
AddBehaviour( "+ATKRANGED", 100 ); //ranged attack
|
||||
AddBehaviour( "+ATKMELEE", 100 ); //melee attack
|
||||
// Buffs self
|
||||
AddBehaviour( "+DEFSELF", 100 ); //defensive [self]
|
||||
AddBehaviour( "+ENHANCESELF", 100 ); //enhancing spells [self]
|
||||
AddBehaviour( "+FEATENHANCE", 100 ); //feat enhance [self]
|
||||
// Buffs party
|
||||
AddBehaviour( "+DEFSING", 100 ); //defensive [single allies]
|
||||
AddBehaviour( "+ENHANCESING", 100 ); //enhancing spells [single allies]
|
||||
AddBehaviour( "+VIS", 100 ); //visual aid spells [self/allies]
|
||||
AddBehaviour( "+GROUPENHANCE", 100 ); //enhancing spells [AOE]
|
||||
// Curing
|
||||
AddBehaviour( "+HELP", 100 ); //Restore debuffs [self/allies]
|
||||
AddBehaviour( "+RAISE", 100 ); //Ressurect [allies]
|
||||
// Healing
|
||||
AddBehaviour( "+HEAL", 100 ); //heal [self/allies]
|
||||
AddBehaviour( "+HEALSELF", 100 ); //Use pots/spec abil [heal self]
|
||||
AddBehaviour( "+GROUPHEAL", 100 ); //AOE heal [Allies]
|
||||
// Off casting
|
||||
AddBehaviour( "+DIRECT", 100 ); // attack spells [single enemy]
|
||||
AddBehaviour( "+TOUCH", 100 ); //touch attack spells [single enemy]
|
||||
AddBehaviour( "+AREA", 100 ); //AOEs
|
||||
AddBehaviour( "+SUMMON", 100 ); //Summon allies
|
||||
//Def casting
|
||||
AddBehaviour( "+COUNTERSPELL", 100 ); //Counterspell [enemy]
|
||||
AddBehaviour( "+DISPELAOE", 100 ); //Dispel AOEs
|
||||
AddBehaviour( "+DISPEL", 100 ); //Dispel [enemies]
|
||||
AddBehaviour( "+DISMISSAL", 100 ); //Dismiss [summoned enemies]
|
||||
AddBehaviour( "+BREACH", 100 ); //Spell Breach [enemy]
|
||||
// Special
|
||||
AddBehaviour( "+TIMESTOP", 100 ); //Cast Time Stop
|
||||
AddBehaviour( "+BREATH", 100 ); //breath weapons
|
||||
AddBehaviour( "+TURN", 100 ); //Turn Undead
|
||||
|
||||
AddBehaviour( "+EYERAYS", 100 ); //Specific behaviour for: Beholders
|
||||
AddBehaviour( "+CENTRALEYE", 100 ); //Specific behaviour for: Beholders
|
||||
|
||||
*/
|
||||
|
||||
//Other config
|
||||
//Corpse decay set up and exclusions
|
||||
SetCorpseDelay();
|
||||
|
||||
//Set whether the creature can use EffectDisappearAppear when moving
|
||||
SetIsFlier();
|
||||
|
||||
if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) )
|
||||
{
|
||||
//I am probably a summoned creature, possibly a henchman
|
||||
SetAssociateListenPatterns();
|
||||
}
|
||||
|
||||
//set voice chat config
|
||||
SetVoiceChat( NO_VC_DEFAULT, 10 );
|
||||
|
||||
//configure perception ranges
|
||||
SetPerceptionRanges();
|
||||
|
||||
//set response range for fighting broadcast
|
||||
SetResponseRange( BC_FIGHTING, 50.0 );
|
||||
|
||||
//tell creature it is ready to act
|
||||
//SetReadyStatus();
|
||||
|
||||
//set fastbuffer status, should always be left on
|
||||
SetIsFastBuffer( TRUE );
|
||||
//SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 );
|
||||
//SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 );
|
||||
|
||||
//log starting location
|
||||
ExecuteScript( "no_scr_logspnloc", OBJECT_SELF );
|
||||
|
||||
//log loaded melee weapons
|
||||
ExecuteScript( "no_scr_logeq", OBJECT_SELF );
|
||||
|
||||
// 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);
|
||||
// SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED);
|
||||
SetAnimationCondition(NW_ANIM_FLAG_CONSTANT);
|
||||
// SetAnimationCondition(NW_ANIM_FLAG_CHATTER);
|
||||
// SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE);
|
||||
//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
|
||||
|
||||
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.
|
||||
|
||||
int iDice = d100();
|
||||
if (iDice<20)ExecuteScript ("cd_helper_func", OBJECT_SELF);
|
||||
}
|
@@ -82,6 +82,7 @@ void main()
|
||||
// combat.
|
||||
|
||||
GenerateNPCTreasure(); //* Use this to create a small amount of treasure on the creature
|
||||
|
||||
ExecuteScript("prc_pwonspawn", OBJECT_SELF);
|
||||
|
||||
ExecuteScript("prc_pwonspawn", OBJECT_SELF);
|
||||
ExecuteScript("prc_npc_spawn", OBJECT_SELF);
|
||||
}
|
||||
|
@@ -18,6 +18,10 @@ If the player is playing a legal character or not...read below..
|
||||
And if the Player themself have been banned from the module or not..
|
||||
*/
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
#include "nwnx_player"
|
||||
//Required Include For Color Messages(Read include to learn more)
|
||||
#include "gen_inc_color"
|
||||
#include "inc_utility"
|
||||
|
||||
//Redundant Variables Declared
|
||||
effect eEffect;
|
||||
@@ -26,35 +30,30 @@ object oItem;
|
||||
object aTarget;
|
||||
location bTarget;
|
||||
|
||||
//Required Include For Color Messages(Read include to learn more)
|
||||
#include "gen_inc_color"
|
||||
#include "inc_utility"
|
||||
#include "nwnx_player"
|
||||
|
||||
//Required Include for SimTools
|
||||
//#include "fky_chat_inc"
|
||||
|
||||
void SetTlkOverrideForMaximumLevel(object oPC);
|
||||
|
||||
void SetTlkOverrideForMaximumLevel(object oPC)
|
||||
{
|
||||
int nLevel = GetHitDice(oPC);
|
||||
if (nLevel < 40)
|
||||
{
|
||||
NWNX_Player_SetTlkOverride(oPC, 315, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
NWNX_Player_SetTlkOverride(oPC, 315, "Next Level: " + IntToString((nLevel + 1) * nLevel * 500) + "\n");
|
||||
}
|
||||
int nLevel = GetHitDice(oPC);
|
||||
|
||||
if (nLevel < 40)
|
||||
{
|
||||
NWNX_Player_SetTlkOverride(oPC, 315, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
NWNX_Player_SetTlkOverride(oPC, 315, "Next Level: " + IntToString((nLevel + 1) * nLevel * 500) + "\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
ExecuteScript("prc_onenter", OBJECT_SELF);
|
||||
|
||||
//Declare Major Variables
|
||||
ExecuteScript("prc_onenter", OBJECT_SELF);
|
||||
//Declare Major Variables..
|
||||
object oPC;
|
||||
oPC = GetEnteringObject();
|
||||
object oTarget;
|
||||
@@ -62,30 +61,32 @@ void main()
|
||||
object oPlayer = oPC;
|
||||
object oPP = oPC;
|
||||
string sCDKey = GetPCPublicCDKey(oPC, FALSE);
|
||||
|
||||
SetTlkOverrideForMaximumLevel(GetEnteringObject());
|
||||
|
||||
SetTlkOverrideForMaximumLevel(oPC);
|
||||
|
||||
//IMPORTANT, please set the Nap Time Below!
|
||||
//If changed here you must open the script "kopcwand" and adjust it there!
|
||||
object oNap = GetItemPossessedBy(oPC, "napper");
|
||||
if(oNap !=OBJECT_INVALID)
|
||||
{
|
||||
//Only on PCs!
|
||||
if(GetIsPC(oPC) && !GetIsDM(oPC) && !GetIsDMPossessed(oPC))
|
||||
{
|
||||
//Start the nap all over again! (the 15 = minutes of nap!)
|
||||
SetLocalInt(oTarget, "NAP_TIME", 15); //set 15 to your taste
|
||||
//Allow them to actually enter the module...
|
||||
DelayCommand(12.0, ExecuteScript("naptime", oPC));
|
||||
return;
|
||||
}
|
||||
}
|
||||
object oNap = GetItemPossessedBy(oPC, "napper");
|
||||
|
||||
if(oNap !=OBJECT_INVALID)
|
||||
{
|
||||
//Only on PCs!
|
||||
if(GetIsPC(oPC) && !GetIsDM(oPC) && !GetIsDMPossessed(oPC))
|
||||
{
|
||||
//Start the nap all over again! (the 15 = minutes of nap!)
|
||||
SetLocalInt(oTarget, "NAP_TIME", 15); //set 15 to your taste
|
||||
//Allow them to actually enter the module...
|
||||
DelayCommand(12.0, ExecuteScript("naptime", oPC));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//Only for PCs!
|
||||
if(GetIsDM(oPC))
|
||||
{
|
||||
AddJournalQuestEntry("dmrules", 1, oPC, FALSE, FALSE);
|
||||
return; }
|
||||
//Only for DMs!
|
||||
if(GetIsDM(oPC))
|
||||
{
|
||||
AddJournalQuestEntry("dmrules", 1, oPC, FALSE, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -122,89 +123,89 @@ return; }
|
||||
//Please leave the credits to the module within the message.
|
||||
|
||||
//Colorful Server Message sent to all PCs when they enter the module..
|
||||
string sMessage;
|
||||
sMessage = GetRGB(1,7,7); //The color (See above)
|
||||
sMessage += "Welcome to "; //The text to be colorized by the above color.
|
||||
sMessage += GetRGB(15,15,1);//The next color.
|
||||
sMessage += "Server Genisys "; //The next text to be colorized by the above color.
|
||||
sMessage += GetRGB(15,1,1);//etc..
|
||||
sMessage += "a Revised ";
|
||||
sMessage += GetRGB(7,7,15);
|
||||
sMessage += "1.69 ";
|
||||
sMessage += GetRGB(1,15,1);
|
||||
sMessage += "Paths of Ascension ";
|
||||
sMessage += GetRGB(13,9,13);
|
||||
sMessage += "Classic Module ";
|
||||
sMessage += GetRGB(12,10,7);
|
||||
sMessage += "Revised & ";
|
||||
sMessage += GetRGB();
|
||||
sMessage += "Rescripted By ";
|
||||
sMessage += GetRGB(15,5,1);
|
||||
sMessage += "Genisys (Guile) ";
|
||||
sMessage += GetRGB(12,10,7);
|
||||
sMessage += "from 8/20/08 to 3/21/09.";
|
||||
string sNewb = GetRGB(1,15,1) + "This is PRC Presents Path of Ascension.";
|
||||
string sNewb2 = GetRGB(1,15,1) + "Contact Altpersona on Discord if you need assistance.";
|
||||
string sMessage;
|
||||
sMessage = GetRGB(1,7,7); //The color (See above)
|
||||
sMessage += "Welcome to "; //The text to be colorized by the above color.
|
||||
sMessage += GetRGB(15,15,1);//The next color.
|
||||
sMessage += "Server Genisys "; //The next text to be colorized by the above color.
|
||||
sMessage += GetRGB(15,1,1);//etc..
|
||||
sMessage += "a Revised ";
|
||||
sMessage += GetRGB(7,7,15);
|
||||
sMessage += "1.69 ";
|
||||
sMessage += GetRGB(1,15,1);
|
||||
sMessage += "Paths of Ascension ";
|
||||
sMessage += GetRGB(13,9,13);
|
||||
sMessage += "Classic Module ";
|
||||
sMessage += GetRGB(12,10,7);
|
||||
sMessage += "Revised & ";
|
||||
sMessage += GetRGB();
|
||||
sMessage += "Rescripted By ";
|
||||
sMessage += GetRGB(15,5,1);
|
||||
sMessage += "Genisys (Guile) ";
|
||||
sMessage += GetRGB(12,10,7);
|
||||
sMessage += "from 8/20/08 to 3/21/09.";
|
||||
string sNewb = GetRGB(1,15,1) + "This is PRC Presents Path of Ascension.";
|
||||
string sNewb2 = GetRGB(1,15,1) + "Contact Altpersona on Discord if you need assistance.";
|
||||
//string sNewb = GetRGB(1,15,1) + "Be sure to read your journal frequently (press J).";
|
||||
//string sNewb2 = GetRGB(1,15,1) + "Be sure to examine the Rest Menu carefully.";
|
||||
|
||||
string sEnter = GetName(oPC) + " / " + GetPCPlayerName(oPC) + " / " + GetPCPublicCDKey(oPC) + " / " + GetPCIPAddress(oPC) + " Entered." ;
|
||||
SendMessageToAllDMs(sEnter);
|
||||
string sEnter = GetName(oPC) + " / " + GetPCPlayerName(oPC) + " / " + GetPCPublicCDKey(oPC) + " / " + GetPCIPAddress(oPC) + " Entered." ;
|
||||
SendMessageToAllDMs(sEnter);
|
||||
|
||||
//Get all the stats on the player when they enter the module...
|
||||
WriteTimestampedLogEntry(sEnter);
|
||||
WriteTimestampedLogEntry(sEnter);
|
||||
|
||||
//Float welcome message by..
|
||||
DelayCommand(15.3, FloatingTextStringOnCreature(sMessage, oPC, FALSE));
|
||||
DelayCommand(15.3, FloatingTextStringOnCreature(sMessage, oPC, FALSE));
|
||||
|
||||
if(GetHitDice(oPC)<=6)
|
||||
{
|
||||
DelayCommand(19.3, FloatingTextStringOnCreature(sNewb, oPC, FALSE));
|
||||
DelayCommand(27.3, FloatingTextStringOnCreature(sNewb2, oPC, FALSE));
|
||||
}
|
||||
if(GetHitDice(oPC)<=6)
|
||||
{
|
||||
DelayCommand(19.3, FloatingTextStringOnCreature(sNewb, oPC, FALSE));
|
||||
DelayCommand(27.3, FloatingTextStringOnCreature(sNewb2, oPC, FALSE));
|
||||
}
|
||||
//This means the entering Character has been banned.
|
||||
int nBann = GetCampaignInt(GetName(GetModule()), "CBANN", oPP);
|
||||
int nBann = GetCampaignInt(GetName(GetModule()), "CBANN", oPP);
|
||||
|
||||
object oTag;
|
||||
location lTag;
|
||||
object oTag;
|
||||
location lTag;
|
||||
|
||||
//This part is about verifying the Player's name..
|
||||
//A player must have at least a 2 character name or they are going to
|
||||
//return with an error! If they have spaces in their name it will return
|
||||
//with an error as well, including alt code!
|
||||
string sPCNM = GetName(oPP);
|
||||
string sPCNMR = GetStringRight(sPCNM, 2);
|
||||
string sNC1; string sNC2; string sRNC1; string sRNC2;
|
||||
int nBad;
|
||||
string sPCNM = GetName(oPP);
|
||||
string sPCNMR = GetStringRight(sPCNM, 2);
|
||||
string sNC1; string sNC2; string sRNC1; string sRNC2;
|
||||
int nBad;
|
||||
|
||||
//Find the second character of the players name..
|
||||
sNC1 = GetSubString(sPCNM, 0, 1);
|
||||
sNC1 = GetSubString(sPCNM, 0, 1);
|
||||
//Find the second character of the players name..
|
||||
sNC2 = GetSubString(sPCNM, 0, 2);
|
||||
sNC2 = GetSubString(sPCNM, 0, 2);
|
||||
//Find the last letter in the player's name.
|
||||
sRNC1 = GetSubString(sPCNMR, 0, 1);
|
||||
sRNC1 = GetSubString(sPCNMR, 0, 1);
|
||||
//Find the next to the last letter in the player's name.
|
||||
sRNC2 = GetSubString(sPCNMR, 0, 2);
|
||||
sRNC2 = GetSubString(sPCNMR, 0, 2);
|
||||
|
||||
/////////////////////////IMPORTANT//////////////////////////////////
|
||||
//You must make all the "" below into " " to check for legal names
|
||||
//I turned it off because a lot of my characters have bad names!
|
||||
//Simply put the cursor between "" and hit the space bar for "" to " "
|
||||
if(sNC1 =="")
|
||||
{ nBad =1; }
|
||||
else if(sNC2 =="")
|
||||
{ nBad =1; }
|
||||
else if(sRNC1 =="")
|
||||
{ nBad =1; }
|
||||
else if(sRNC2 =="")
|
||||
{ nBad =1; }
|
||||
else { nBad = 0; }
|
||||
if(sNC1 =="")
|
||||
{ nBad =1; }
|
||||
else if(sNC2 =="")
|
||||
{ nBad =1; }
|
||||
else if(sRNC1 =="")
|
||||
{ nBad =1; }
|
||||
else if(sRNC2 =="")
|
||||
{ nBad =1; }
|
||||
else { nBad = 0; }
|
||||
|
||||
//See below to activate this system..
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//This is for the rest of the script, if it's not a PC stop here!
|
||||
if(!GetIsPC(oPC))return;
|
||||
if(!GetIsPC(oPC))return;
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -217,15 +218,15 @@ if(!GetIsPC(oPC))return;
|
||||
//AddJournalQuestEntry("x2spells", 1, oPC, FALSE, FALSE);
|
||||
//AddJournalQuestEntry("feats", 1, oPC, FALSE, FALSE);
|
||||
//AddJournalQuestEntry("shifter", 1, oPC, FALSE, FALSE);
|
||||
AddJournalQuestEntry("xprules", 1, oPC, FALSE, FALSE);
|
||||
AddJournalQuestEntry("serverrules", 1, oPC, FALSE, FALSE);
|
||||
AddJournalQuestEntry("xprules", 1, oPC, FALSE, FALSE);
|
||||
AddJournalQuestEntry("serverrules", 1, oPC, FALSE, FALSE);
|
||||
//AddJournalQuestEntry("legartjournal", 1, oPC, FALSE, FALSE);
|
||||
|
||||
|
||||
if(GetHitDice(oPC) <=5)
|
||||
{
|
||||
AddJournalQuestEntry("legartjournal", 1, oPC, FALSE, FALSE);
|
||||
}
|
||||
if(GetHitDice(oPC) <=5)
|
||||
{
|
||||
AddJournalQuestEntry("legartjournal", 1, oPC, FALSE, FALSE);
|
||||
}
|
||||
|
||||
//////////////////IMPORTANT////////////////IMPORTANT////////////////////////
|
||||
|
||||
@@ -241,9 +242,9 @@ AddJournalQuestEntry("legartjournal", 1, oPC, FALSE, FALSE);
|
||||
if(GetHitDice(oPC) == 40 || GetItemPossessedBy(oPC, "guildpass")!=OBJECT_INVALID)
|
||||
{
|
||||
//Lets make the concealed 50%
|
||||
eEffect = EffectConcealment(50);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC);
|
||||
eEffect = EffectConcealment(50);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC);
|
||||
|
||||
//Lets make the look like a ghost.. :)
|
||||
//To activate, simply delete the // below this line
|
||||
@@ -256,11 +257,11 @@ AddJournalQuestEntry("legartjournal", 1, oPC, FALSE, FALSE);
|
||||
|
||||
//This is the immortal option, you must utilize the "makeimmortal" script
|
||||
//to make players immortal (please read that script.)
|
||||
if(GetItemPossessedBy(oPC, "immotoken") != OBJECT_INVALID)
|
||||
{
|
||||
//Run this script on the player (See script to configure settings)
|
||||
ExecuteScript("powerimmortal", oPC);
|
||||
}
|
||||
if(GetItemPossessedBy(oPC, "immotoken") != OBJECT_INVALID)
|
||||
{
|
||||
//Run this script on the player (See script to configure settings)
|
||||
ExecuteScript("powerimmortal", oPC);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//If a player has been found with an illegal character they will have this item.
|
||||
@@ -284,45 +285,45 @@ if (GetItemPossessedBy(oPC, "banned")!= OBJECT_INVALID)
|
||||
}
|
||||
// */
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
object oDeath = GetItemPossessedBy(oPC, "death");
|
||||
object oDeath = GetItemPossessedBy(oPC, "death");
|
||||
|
||||
//Since the player was dead when they logged, kill them!
|
||||
if (oDeath!=OBJECT_INVALID)
|
||||
{
|
||||
if (oDeath!=OBJECT_INVALID)
|
||||
{
|
||||
//FIRST REMOVE THE DEATH TOKEN!!
|
||||
DestroyObject(oDeath, 0.0f);
|
||||
DestroyObject(oDeath, 0.0f);
|
||||
|
||||
effect eEffect;
|
||||
eEffect = EffectDamage(3000, DAMAGE_TYPE_POSITIVE, DAMAGE_POWER_ENERGY);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
DelayCommand(5.8, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC));
|
||||
DelayCommand(6.2, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC));
|
||||
DelayCommand(7.0, FloatingTextStringOnCreature
|
||||
("<c<><63>6>Logging out to cheat death is not permitted on this server, YOU HAVE BEEN WARNED!</c>", oPC, TRUE));
|
||||
effect eEffect;
|
||||
eEffect = EffectDamage(3000, DAMAGE_TYPE_POSITIVE, DAMAGE_POWER_ENERGY);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
DelayCommand(5.8, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC));
|
||||
DelayCommand(6.2, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC));
|
||||
DelayCommand(7.0, FloatingTextStringOnCreature
|
||||
("<c<><63>6>Logging out to cheat death is not permitted on this server, YOU HAVE BEEN WARNED!</c>", oPC, TRUE));
|
||||
|
||||
SendMessageToAllDMs(GetName(oPC) + " HAS LOGGED OUT TO CHEAT DEATH!");
|
||||
SendMessageToAllDMs(GetName(oPC) + " HAS LOGGED OUT TO CHEAT DEATH!");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//Handling BANN on this server...
|
||||
|
||||
//Let's see if the entering PC has been banned Altogether!
|
||||
if(GetCampaignInt(GetName(GetModule()), "ADMIN_BANN", oPP)==2)
|
||||
{
|
||||
//Boot the PC fast!
|
||||
DelayCommand(3.3, BootPC(oPP));
|
||||
return;
|
||||
}
|
||||
if(GetCampaignInt(GetName(GetModule()), "ADMIN_BANN", oPP)==2)
|
||||
{
|
||||
//Boot the PC fast!
|
||||
DelayCommand(3.3, BootPC(oPP));
|
||||
return;
|
||||
}
|
||||
|
||||
//Let's see if the player's character has been banned..
|
||||
if(GetItemPossessedBy(oPP, "char_bann")!=OBJECT_INVALID)
|
||||
{
|
||||
if(GetItemPossessedBy(oPP, "char_bann")!=OBJECT_INVALID)
|
||||
{
|
||||
|
||||
//If so boot them fast!
|
||||
DelayCommand(2.5, BootPC(oPP));
|
||||
//If so boot them fast!
|
||||
DelayCommand(2.5, BootPC(oPP));
|
||||
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -362,4 +363,4 @@ else
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
//End Script
|
||||
}
|
||||
}
|
@@ -14,73 +14,79 @@ Intergrated SimTools to the OnPlayerLevelUp Event
|
||||
//Required Include for SimTools
|
||||
//#include "fky_chat_inc"
|
||||
|
||||
void SetTlkOverrideForMaximumLevel(object oPC);
|
||||
|
||||
void SendMessageToAllPC(string sMessage);
|
||||
|
||||
void SetTlkOverrideForMaximumLevel(object oPC)
|
||||
{
|
||||
int nLevel = GetHitDice(oPC);
|
||||
if (nLevel < 40)
|
||||
{
|
||||
NWNX_Player_SetTlkOverride(oPC, 315, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
NWNX_Player_SetTlkOverride(oPC, 315, "Next Level: " + IntToString((nLevel + 1) * nLevel * 500) + "\n");
|
||||
}
|
||||
int nLevel = GetHitDice(oPC);
|
||||
|
||||
if (nLevel < 40)
|
||||
{
|
||||
NWNX_Player_SetTlkOverride(oPC, 315, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
NWNX_Player_SetTlkOverride(oPC, 315, "Next Level: " + IntToString((nLevel + 1) * nLevel * 500) + "\n");
|
||||
}
|
||||
}
|
||||
|
||||
void SendMessageToAllPC(string sMessage)
|
||||
{
|
||||
object oPC = GetFirstPC();
|
||||
while(GetIsObjectValid(oPC))
|
||||
{
|
||||
SendMessageToPC(oPC, sMessage);
|
||||
oPC = GetNextPC();
|
||||
}
|
||||
object oPC = GetFirstPC();
|
||||
|
||||
while(GetIsObjectValid(oPC))
|
||||
{
|
||||
SendMessageToPC(oPC, sMessage);
|
||||
oPC = GetNextPC();
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
ExecuteScript("prc_levelup", OBJECT_SELF);
|
||||
|
||||
object oPC = GetPCLevellingUp();
|
||||
int nHD = GetHitDice(oPC);
|
||||
location lSaved = GetLocation(oPC);
|
||||
int MULTI_PLAYER = GetLocalInt(GetModule(), "multi");
|
||||
|
||||
SetTlkOverrideForMaximumLevel(GetPCLevellingUp());
|
||||
|
||||
///////LOCATION SAVING OPTION////////
|
||||
|
||||
//Delete the /* above to activate
|
||||
|
||||
SetTlkOverrideForMaximumLevel(oPC);
|
||||
|
||||
//If in the guild only!
|
||||
//If they are in the guild...
|
||||
if(GetItemPossessedBy(oPC, "guildpass")!=OBJECT_INVALID)
|
||||
{
|
||||
if(GetArea(GetAreaFromLocation(lSaved))!=OBJECT_INVALID)
|
||||
{
|
||||
object oGuild = GetItemPossessedBy(oPC, "guildstone");
|
||||
if(GetItemPossessedBy(oPC, "guildpass")!=OBJECT_INVALID)
|
||||
{
|
||||
if(GetArea(GetAreaFromLocation(lSaved))!=OBJECT_INVALID)
|
||||
{
|
||||
object oGuild = GetItemPossessedBy(oPC, "guildstone");
|
||||
|
||||
//Store the PC's location, so they can come back here after relogging
|
||||
SetCampaignLocation("LOCATIONS", GetName(oGuild), lSaved, oPC);
|
||||
//Store the PC's location, so they can come back here after relogging
|
||||
SetCampaignLocation("LOCATIONS", GetName(oGuild), lSaved, oPC);
|
||||
|
||||
//Tell the PC thier location was saved..
|
||||
SendMessageToPC(oPC, "Location Saved.");
|
||||
}
|
||||
}
|
||||
//Tell the PC thier location was saved..
|
||||
SendMessageToPC(oPC, "Location Saved.");
|
||||
}
|
||||
}
|
||||
|
||||
// (DO NOT TOUCH THIS LINE!) */
|
||||
|
||||
/////////////////////////////////////////
|
||||
|
||||
///Character Auto Save (Single Character / safe save)
|
||||
//:: Character Auto Save (Single Character / safe save)
|
||||
|
||||
if(MULTI_PLAYER)
|
||||
{
|
||||
//DelayCommand(3.0, ExportSingleCharacter(oPC));
|
||||
}
|
||||
else
|
||||
{
|
||||
//DelayCommand(2.0, DoSinglePlayerAutoSave());
|
||||
}
|
||||
if(MULTI_PLAYER)
|
||||
{
|
||||
//DelayCommand(3.0, ExportSingleCharacter(oPC));
|
||||
}
|
||||
else
|
||||
{
|
||||
//DelayCommand(2.0, DoSinglePlayerAutoSave());
|
||||
}
|
||||
|
||||
if(nHD == 5 || nHD == 10 || nHD == 15 || nHD == 20 ||
|
||||
nHD == 25 || nHD == 30 || nHD == 35 || nHD == 40)
|
||||
@@ -90,27 +96,17 @@ else
|
||||
if(nHD == 40)
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,
|
||||
SupernaturalEffect(EffectVisualEffect(VFX_DUR_GLOW_WHITE)), oPC);
|
||||
|
||||
}
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
int nInt;
|
||||
nInt = GetObjectType(oPC);
|
||||
|
||||
{
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_KNOCK), oPC);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_KNOCK), GetLocation(oPC));
|
||||
|
||||
object oPC = GetPCLevellingUp();
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
object oTarget;
|
||||
oTarget = oPC;
|
||||
|
||||
|
||||
int nInt;
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_KNOCK), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_KNOCK), GetLocation(oTarget));
|
||||
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////CHARACTER SCANNING OPTIONS////////////////////////
|
||||
|
||||
|
@@ -13,6 +13,16 @@
|
||||
|
||||
void ReallyEquipItemInSlot(object oNPC, object oItem, int nSlot);
|
||||
|
||||
void ReallyEquipItemInSlot(object oNPC, object oItem, int nSlot)
|
||||
{
|
||||
if (GetItemInSlot(nSlot) != oItem)
|
||||
{
|
||||
//ClearAllActions();
|
||||
AssignCommand(oNPC, ActionEquipItem(oItem, nSlot));
|
||||
DelayCommand(0.5, ReallyEquipItemInSlot(oNPC, oItem, nSlot));
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Initialize Major Variables
|
||||
@@ -30,8 +40,6 @@ void main()
|
||||
object oSkelly;
|
||||
object oPC = GetFirstObjectInArea(oArea);
|
||||
|
||||
//ExecuteScript("prc_npc_spawn", OBJECT_SELF); -NOT NEEDED
|
||||
|
||||
//:: Get average PC level for area
|
||||
//:: Cycle through PCs in Area
|
||||
|
||||
@@ -67,15 +75,19 @@ void main()
|
||||
(sMonthDay == "10/31") ||
|
||||
(sMonthDay == "11/01"))
|
||||
{
|
||||
//: Don't spawn skeletons from skeletons or commoners
|
||||
if (GetResRef(OBJECT_SELF) == "pa_skeleton" || GetResRef(OBJECT_SELF) == "nw_skeleton" || nCommoner > 0)
|
||||
return;
|
||||
|
||||
//:: 33% chance to spawn
|
||||
if ( Random(100) < 33 )
|
||||
{
|
||||
//:: Spawn Skeleton.
|
||||
eVFX = EffectVisualEffect(VFX_IMP_EVIL_HELP);
|
||||
oSkelly = CreateObject(OBJECT_TYPE_CREATURE, "nw_skeleton", GetLocation(OBJECT_SELF));
|
||||
DelayCommand(0.1f, ActionDoLevelUp(oSkelly, nAveragePCLevel));
|
||||
DelayCommand(0.0, ActionDoLevelUp(oSkelly, nAveragePCLevel));
|
||||
|
||||
//:: Assign Weapon
|
||||
//:: Assign Weapon
|
||||
int nResult = d6(1);
|
||||
int nStackSize = 1; // Create 1 items;
|
||||
string sItem;
|
||||
@@ -109,19 +121,8 @@ void main()
|
||||
|
||||
//:: Apply VFX & Attack
|
||||
AssignCommand(oSkelly, DetermineCombatRound(OBJECT_SELF));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSkelly);
|
||||
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSkelly));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ReallyEquipItemInSlot(object oNPC, object oItem, int nSlot)
|
||||
{
|
||||
if (GetItemInSlot(nSlot) != oItem)
|
||||
{
|
||||
//ClearAllActions();
|
||||
AssignCommand(oNPC, ActionEquipItem(oItem, nSlot));
|
||||
DelayCommand(0.3, ReallyEquipItemInSlot(oNPC, oItem, nSlot));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,10 +1,6 @@
|
||||
#include "prc_inc_util"
|
||||
|
||||
|
||||
void ActionDoLevelUp(object oCreature, int iLevels);
|
||||
int LevelMob(object oCreature, int iLevels);
|
||||
int GetPackage(int iClass);
|
||||
void ActionDoLevelUp(object oCreature, int iLevels);
|
||||
|
||||
|
||||
void ActionDoLevelUp(object oCreature, int iLevels)
|
||||
{
|
||||
@@ -13,35 +9,38 @@ void ActionDoLevelUp(object oCreature, int iLevels)
|
||||
|
||||
int LevelMob(object oCreature, int iLevels)
|
||||
{
|
||||
int iNewLevel;
|
||||
int iIndex;
|
||||
int iClass;
|
||||
int iPackage;
|
||||
int iNewLevel;
|
||||
int iIndex;
|
||||
int iClass;
|
||||
int iPackage;
|
||||
|
||||
if (GetClassByPosition(2,oCreature) == CLASS_TYPE_INVALID)
|
||||
{
|
||||
iClass = GetClassByPosition(1,oCreature);
|
||||
iPackage =PACKAGE_INVALID;
|
||||
} else {
|
||||
iClass = CLASS_TYPE_INVALID;
|
||||
iPackage =PACKAGE_INVALID;
|
||||
}
|
||||
if (GetClassByPosition(2,oCreature) == CLASS_TYPE_INVALID)
|
||||
{
|
||||
iClass = GetClassByPosition(1,oCreature);
|
||||
iPackage =PACKAGE_INVALID;
|
||||
}
|
||||
else
|
||||
{
|
||||
iClass = CLASS_TYPE_INVALID;
|
||||
iPackage =PACKAGE_INVALID;
|
||||
}
|
||||
|
||||
iIndex = 1;
|
||||
while (iIndex <= iLevels)
|
||||
{
|
||||
iNewLevel=LevelUpHenchman(oCreature,iClass,TRUE,iPackage);
|
||||
iIndex++;
|
||||
}
|
||||
iIndex = 1;
|
||||
|
||||
while (iIndex <= iLevels)
|
||||
{
|
||||
iNewLevel=LevelUpHenchman(oCreature,iClass,TRUE,iPackage);
|
||||
iIndex++;
|
||||
}
|
||||
|
||||
//Force Rest to mem spells
|
||||
PRCForceRest(oCreature);
|
||||
//Force Rest to mem spells
|
||||
ForceRest(oCreature);
|
||||
|
||||
//Give more treasure to be lvl appropriate
|
||||
//rem this out cuz too much code is running and getting error
|
||||
//CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, oCreature);
|
||||
//Give more treasure to be lvl appropriate
|
||||
//rem this out cuz too much code is running and getting error
|
||||
//CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, oCreature);
|
||||
|
||||
return iNewLevel;
|
||||
return iNewLevel;
|
||||
}
|
||||
|
||||
//Setup Random Packages, note that Wizards won't get random packages
|
||||
@@ -168,7 +167,5 @@ switch (iClass)
|
||||
break;
|
||||
}
|
||||
|
||||
return iPackage;
|
||||
}
|
||||
|
||||
//:: void main (){}
|
||||
return iPackage;
|
||||
}
|
1964
_module/nss/sd_lootsys_tools.nss
Normal file
1964
_module/nss/sd_lootsys_tools.nss
Normal file
File diff suppressed because it is too large
Load Diff
@@ -109,15 +109,14 @@ void Take1Level(object oTarget)
|
||||
case 59: nXP = 1653000; break;
|
||||
case 60: nXP = 1711000; break;
|
||||
}
|
||||
|
||||
SetXP(oTarget, nXP);
|
||||
|
||||
|
||||
SetXP(oTarget, nXP);
|
||||
}
|
||||
|
||||
//The Function Below Give1Level(oTarget); gives the Target one level.
|
||||
//IMPORTANT: This function cannot be used with Take1Level(oTarget);
|
||||
//or it will delevel the target!!!!
|
||||
//I created this exlusively for the purpose of my DM wand
|
||||
//I created this exlusively for the purose of my DM wand
|
||||
//and other scripts which only give the PC one level as a reward.
|
||||
void Give1Level(object oTarget)
|
||||
{
|
||||
@@ -187,9 +186,8 @@ void Give1Level(object oTarget)
|
||||
case 59: nXP = 1770000; break;
|
||||
case 60: nXP = 1830000; break;
|
||||
}
|
||||
|
||||
|
||||
SetXP(oTarget, nXP);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -212,6 +210,7 @@ void Relevel(object oTarget)
|
||||
TakeGoldFromCreature(nGold, oTarget, TRUE);
|
||||
SetXP(oTarget, 0);
|
||||
DelayCommand(1.0, GiveXPToCreature(oTarget, gXP));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -231,36 +230,34 @@ void Relevel1(object oTarget)
|
||||
DelayCommand(1.0, SetXP(oTarget, gXP));
|
||||
}
|
||||
|
||||
//The Function Relevel5(oTarget) will take 5 levels from the Target and give
|
||||
//back their orginal XP. This script does not cause xp loss whatsoever.
|
||||
//The Function Relevel3(oTarget) will take 3 levels from the Target and give
|
||||
//back thier orginal XP. This script does not cause xp loss whatsoever.
|
||||
void Relevel5(object oTarget)
|
||||
{
|
||||
int nCCXP;
|
||||
nCCXP = GetXP(oTarget);
|
||||
SetLocalInt(oTarget, "pc_exact_xp", nCCXP);
|
||||
int gXP = GetLocalInt(oTarget, "pc_exact_xp");
|
||||
|
||||
Take1Level(oTarget);
|
||||
Take1Level(oTarget);
|
||||
Take1Level(oTarget);
|
||||
Take1Level(oTarget);
|
||||
Take1Level(oTarget);
|
||||
|
||||
DelayCommand(1.0, SetXP(oTarget, gXP));
|
||||
}
|
||||
|
||||
//The Function Relevel10(oTarget) will take 10 levels from the Target and give
|
||||
//back their orginal XP. This script does not cause xp loss whatsoever.
|
||||
//The Function Relevel5(oTarget) will take 5 levels from the Target and give
|
||||
//back thier orginal XP. This script does not cause xp loss whatsoever.
|
||||
void Relevel10(object oTarget)
|
||||
{
|
||||
int nGold = GetHitDice(oTarget) * 50;
|
||||
|
||||
if(GetGold(oTarget) >= nGold)
|
||||
{
|
||||
int nCCXP;
|
||||
nCCXP = GetXP(oTarget);
|
||||
SetLocalInt(oTarget, "pc_exact_xp", nCCXP);
|
||||
int gXP = GetLocalInt(oTarget, "pc_exact_xp");
|
||||
|
||||
Take1Level(oTarget);
|
||||
Take1Level(oTarget);
|
||||
Take1Level(oTarget);
|
||||
@@ -271,7 +268,6 @@ void Relevel10(object oTarget)
|
||||
Take1Level(oTarget);
|
||||
Take1Level(oTarget);
|
||||
Take1Level(oTarget);
|
||||
|
||||
DelayCommand(1.0, SetXP(oTarget, gXP));
|
||||
}
|
||||
}
|
||||
@@ -286,6 +282,7 @@ void ApplyRespawnPenalty(object oPlayer)
|
||||
{
|
||||
int cLvl = GetHitDice(oPlayer);
|
||||
int nXP;
|
||||
|
||||
//We need this switch to determine what xp they must keep..
|
||||
switch (cLvl)
|
||||
{
|
||||
@@ -373,7 +370,4 @@ void ApplyRespawnPenalty(object oPlayer)
|
||||
SetXP(oPlayer, nXP); //Set them to the minimum required for level.
|
||||
TakeGoldFromCreature(pGold, oPlayer, TRUE); //Take 10% of their gold.
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//:: void main (){}
|
||||
}
|
@@ -15,20 +15,6 @@ character.
|
||||
|
||||
*/
|
||||
////////////////////////////////////
|
||||
#include "nwnx_player"
|
||||
|
||||
void SetTlkOverrideForMaximumLevel(object oPC)
|
||||
{
|
||||
int nLevel = GetHitDice(oPC);
|
||||
if (nLevel < 40)
|
||||
{
|
||||
NWNX_Player_SetTlkOverride(oPC, 315, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
NWNX_Player_SetTlkOverride(oPC, 315, "Next Level: " + IntToString((nLevel + 1) * nLevel * 500) + "\n");
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
@@ -65,8 +51,6 @@ int tXP = cXP + rXP; //rXP + pXP;
|
||||
|
||||
//Take all the player's XP
|
||||
SetXP(oPC, 0);
|
||||
|
||||
SetTlkOverrideForMaximumLevel(oPC);
|
||||
|
||||
//Let's make sure the character is saved!!!!
|
||||
DelayCommand(1.0, ExportSingleCharacter(oPC));
|
||||
|
@@ -74,7 +74,7 @@ const int PC_DIVIDE_XP = FALSE;
|
||||
// Minimum XP possible for all PC's
|
||||
// Default is 5 XP
|
||||
// Do NOT set this to 0
|
||||
const int MIN_XP = 5;
|
||||
const int MIN_XP = 1;
|
||||
|
||||
// Check XP to consider level or not?
|
||||
// Set to TRUE to check the PC's XP to consider level
|
||||
|
@@ -1,180 +0,0 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name x2_def_heartbeat
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Default Heartbeat script
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Warner
|
||||
//:: Created On: June 11/03
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
|
||||
/*
|
||||
Swarm, Berzerker Wasp: 10 HD ar_berzwasp001
|
||||
Swarm, Berzerker Wasp: 14 HD ar_berzwasp002
|
||||
Swarm, Locust: 08 HD ds_locustswarm01
|
||||
Swarm, Mini Kank: 04 HD ds_minkankswrm01
|
||||
Swarm, Reptilian Bat: 04 HD ds_repbatswrm001
|
||||
*/
|
||||
|
||||
void FollowTarget(string sTargetTag, float fDistance);
|
||||
|
||||
void FollowTarget(string sTargetTag, float fDistance)
|
||||
{
|
||||
object oTarget = GetObjectByTag(sTargetTag);
|
||||
|
||||
if (GetIsObjectValid(oTarget))
|
||||
{
|
||||
vector vTargetPosition = GetPosition(oTarget);
|
||||
vector vCurrentPosition = GetPosition(OBJECT_SELF);
|
||||
|
||||
float fDistanceToTarget = VectorMagnitude(vTargetPosition - vCurrentPosition);
|
||||
|
||||
// Move to the target if the distance is greater than the desired follow distance
|
||||
if (fDistanceToTarget > fDistance)
|
||||
{
|
||||
AssignCommand(OBJECT_SELF, ActionMoveToObject(oTarget, TRUE, fDistance));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
//:: Declare major variables
|
||||
|
||||
object oNPC = OBJECT_SELF;
|
||||
object oArea = GetArea(oNPC);
|
||||
|
||||
string sResRef = GetResRef(oNPC);
|
||||
string sAreaResRef = GetResRef(oArea);
|
||||
|
||||
int nTrampleScore = (GetLocalInt(oNPC, "TRAMPLER") + GetHasFeat(FEAT_CENTAUR_TRAMPLE, oNPC));
|
||||
|
||||
int nChargeScore = (GetLocalInt(oNPC, "CHARGER") +
|
||||
GetHasFeat(FEAT_MINOTAUR_CHARGE, oNPC) +
|
||||
GetHasFeat(FEAT_ACROBATIC_CHARGE, oNPC) +
|
||||
GetHasFeat(FEAT_SHIELD_CHARGE ,oNPC) +
|
||||
GetHasFeat(FEAT_POWERFUL_CHARGE, oNPC) +
|
||||
GetHasFeat(FEAT_GREATER_POWERFUL_CHARGE, oNPC) +
|
||||
GetHasFeat(FEAT_RHINO_TRIBE_CHARGE, oNPC) +
|
||||
GetHasFeat(FEAT_FURIOUS_CHARGE, oNPC) +
|
||||
GetHasFeat(FEAT_RECKLESS_CHARGE, oNPC) +
|
||||
GetHasFeat(FEAT_COBALT_CHARGE, oNPC));
|
||||
|
||||
int nBullRushScore = (GetLocalInt(oNPC, "BULLRUSHER") +
|
||||
GetHasFeat(FEAT_IMPROVED_BULLRUSH, oNPC) +
|
||||
GetHasFeat(FEAT_RAMPAGING_BULL_RUSH, oNPC) +
|
||||
GetHasFeat(5241, oNPC) + //:: Expert Bull Rush
|
||||
GetHasFeat(5247, oNPC)); //:: Superior Bull Rush
|
||||
|
||||
int iAwesomeBlow = GetHasFeat(FEAT_AWESOME_BLOW, oNPC);
|
||||
|
||||
int iOverrun = GetHasFeat(FEAT_IMPROVED_OVERRUN, oNPC);
|
||||
|
||||
|
||||
//:: Run Various Combat Maneuver Heartbeats
|
||||
if(iOverrun)
|
||||
{
|
||||
if (GetLocalInt(oNPC, "OverrrunCooldown") != 1)
|
||||
{
|
||||
if(DEBUG) DoDebug( "x2_def_heartbeat: Creature w/ Overrun Detected");
|
||||
DelayCommand(0.0f, ExecuteScript("overrunner_hb", oNPC));
|
||||
}
|
||||
else
|
||||
if(DEBUG) DoDebug("x2_def_heartbeat: Overrun is on cooldown.");
|
||||
}
|
||||
if(iAwesomeBlow)
|
||||
{
|
||||
if (GetLocalInt(oNPC, "AwesomeBlowCooldown") != 1)
|
||||
{
|
||||
if(DEBUG) DoDebug("x2_def_heartbeat: Creature w/ Awesome Blow Detected");
|
||||
DelayCommand(0.0f, ExecuteScript("awesomeblow_hb", oNPC));
|
||||
}
|
||||
else
|
||||
if(DEBUG) DoDebug("x2_def_heartbeat: Awesome Blow is on cooldown.");
|
||||
}
|
||||
if(nTrampleScore)
|
||||
{
|
||||
if (GetLocalInt(oNPC, "TrampleCooldown") != 1)
|
||||
{
|
||||
if(DEBUG) DoDebug("x2_def_heartbeat: Trampler Detected");
|
||||
DelayCommand(0.0f, ExecuteScript("trampler_hb", oNPC));
|
||||
}
|
||||
else
|
||||
if(DEBUG) DoDebug("x2_def_heartbeat: Trample is on cooldown.");
|
||||
}
|
||||
if(nChargeScore)
|
||||
{
|
||||
if (GetLocalInt(oNPC, "ChargeCooldown") != 1)
|
||||
{
|
||||
if(DEBUG) DoDebug("x2_def_heartbeat: Charger Detected");
|
||||
DelayCommand(0.0f, ExecuteScript("charger_hb", oNPC));
|
||||
}
|
||||
else
|
||||
if(DEBUG) DoDebug("x2_def_heartbeat: Charge is on cooldown.");
|
||||
}
|
||||
if(nBullRushScore)
|
||||
{
|
||||
if (GetLocalInt(oNPC, "BullRushCooldown") != 1)
|
||||
{
|
||||
if(DEBUG) DoDebug("x2_def_heartbeat: Bull Rusher Detected");
|
||||
DelayCommand(0.0f, ExecuteScript("bullrusher_hb", oNPC));
|
||||
}
|
||||
else
|
||||
if(DEBUG) DoDebug("x2_def_heartbeat: Bull Rush is on cooldown.");
|
||||
}
|
||||
|
||||
//:: Runs Malevolent Spirit HB
|
||||
if (sResRef == "malev_spirit001" )
|
||||
{
|
||||
ExecuteScript("i420_ghost_hb", oNPC);
|
||||
}
|
||||
|
||||
//:: Runs Mini-kank swarm HB
|
||||
if (sResRef == "ds_minkankswrm01" )
|
||||
{
|
||||
ExecuteScript("cr_minikank_hb", oNPC);
|
||||
}
|
||||
|
||||
//:: Runs Berzerker Wasp swarm HB
|
||||
if (sResRef == "ar_berzwasp001" || sResRef == "ar_berzwasp002" )
|
||||
{
|
||||
ExecuteScript("cr_berzwasp_hb", oNPC);
|
||||
}
|
||||
|
||||
//:: Runs special swarm HB
|
||||
if (sResRef == "ds_repbatswrm001" || sResRef == "ds_locustswarm01")
|
||||
{
|
||||
ExecuteScript("cr_locust_hb", oNPC);
|
||||
}
|
||||
|
||||
//: Handles NPCs that spawn in captivity. (Sand Raiders Quest)
|
||||
if (sResRef == "npc_milos" || sResRef == "npc_flaron" || sResRef == "npc_alia")
|
||||
{
|
||||
if ((sAreaResRef == "alt_altaruk") || (sAreaResRef == "alt_wavircoster"))
|
||||
{
|
||||
SetLocalInt(oNPC, "FREED_NPC", 1);
|
||||
}
|
||||
|
||||
if(GetLocalInt(oNPC, "FREED_NPC") == 0)
|
||||
{
|
||||
ActionPlayAnimation(ANIMATION_LOOPING_MEDITATE, 1.0, 7.0);
|
||||
}
|
||||
}
|
||||
|
||||
//:: Make NPC followers follow the NPC (Sand Raiders Quest)
|
||||
if ((sAreaResRef != "alt_altaruk") && (sAreaResRef != "alt_wavircoster"))
|
||||
{
|
||||
if (sResRef == "npc_flaron" || sResRef == "npc_alia")
|
||||
{
|
||||
if(GetLocalInt(oNPC, "FREED_NPC") == 1)
|
||||
{
|
||||
FollowTarget("NPC_MILOS", 1.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ExecuteScript("nw_c2_default1", oNPC);
|
||||
}
|
@@ -34,8 +34,6 @@ const int EVENT_USER_DEFINED_POSTSPAWN = 1511;
|
||||
|
||||
#include "ms_name_inc"
|
||||
#include "x2_inc_switches"
|
||||
#include "nwnx_webhook"
|
||||
#include "nwnx_util"
|
||||
|
||||
void Embiggen(object oNPC, float fIncrease);
|
||||
|
||||
@@ -47,7 +45,6 @@ void Embiggen(object oNPC, float fIncrease)
|
||||
void main()
|
||||
{
|
||||
string sTag;
|
||||
string NWNX_DISCORD_URL = "webhook URL here";
|
||||
object oNPC;
|
||||
|
||||
//:: User defined OnSpawn event requested?
|
||||
@@ -56,7 +53,7 @@ void main()
|
||||
//:: Pre Spawn Event requested
|
||||
if (nSpecEvent == 1 || nSpecEvent == 3 )
|
||||
{
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_PRESPAWN ));
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_PRESPAWN ));
|
||||
}
|
||||
|
||||
sTag=GetLocalString(OBJECT_SELF,"X3_HORSE_OWNER_TAG");
|
||||
@@ -574,18 +571,9 @@ void main()
|
||||
//:: Set or Randomize name
|
||||
ms_Nomenclature(OBJECT_SELF);
|
||||
|
||||
//:: Execute PRC OnSpawn script.
|
||||
//ExecuteScript("prc_npc_spawn", OBJECT_SELF); -Not needed
|
||||
|
||||
|
||||
//Post Spawn event requeste
|
||||
//:: Post Spawn event requested
|
||||
if (nSpecEvent == 2 || nSpecEvent == 3)
|
||||
{
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN));
|
||||
SignalEvent(OBJECT_SELF,EventUserDefined(EVENT_USER_DEFINED_POSTSPAWN));
|
||||
}
|
||||
|
||||
// I don't think this should be here
|
||||
//NWNX_WebHook_SendWebHookHTTPS("discordapp.com", NWNX_DISCORD_URL, "Good Morning Ascension.", "The Madman");
|
||||
//
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user