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:
@@ -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
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user