//::///////////////////////////////////////////////
//::// Jyro X's Prestige Inlude
//::// JX_PRESTIGE_INC.nss
//::// Copyright © 2001 Bioware Corp.
//::// Copyright © 2003 Cory Lindsey
//::// Version 1.62 (HotU UPDATED)
//:://////////////////////////////////////////////
/*
Below is the description and instructions.
Just give credit where credit is due please.
!!!PLEASE READ INSTRUCTIONS BELOW!!!
*/
//:://////////////////////////////////////////////
/*
//////////////////////////////
///!!!NOTE TO ALL USERS:!!!///
//////////////////////////////
////////////////////////////////////////////////////////////////////////////////
Yes. I know many have used these functions and found many bugs.
Luckily, I have implemented new, inline, speed-enhancing
scripting methods to make the code work perfectly. There are now
NO errors, no unhandled exceptions or anything if the functions
are used correctly. Note: This include does not require any
haks or overrides. It is built to use the BioWare-implemented
2da's. So therefore, you need not to put anything into an
override folder on the server for your module. All you need
is this file and a decent scripter. If you have any questions
or complaints, you may reach me at the following email address:
cory@skyhop.com
Thank you,
Jyro X
////////////////////////////////////////////////////////////////////////////////
This is an include file used for various operations
concerning Prestige Classes available with SoU(Shadows
of Undrentide, Copyright © BioWare Corp.) and HotU(Hordes
of the Underdark, Copyright © BioWare Corp.). List of
available functions:
JXDestroyPrestige
JXRebuildPrestige
RestrictAllPrestigeClasses
RestrictPrestigeClass
GetAbleToLevelPrestigeClass
In order to use these functions in any script you create,
at the top of your script before you type anything else,
type:
#include "jx_prestige_inc"
and click the little computer symbol in the upper-left
hand corner. The custom functions will show up in bold
black in the "Functions" list in your editor.
In order for the persistency to work!!!:
Put the following line of code into your OnClientEnter:
JXRebuildPrestige(oPC);
You must first however, define oPC with something like:
object oPC = GetEnteringObject();
Those steps will make the persistency work.
*/
//:://////////////////////////////////////////////
//:: Created By: Cory Lindsey (a.k.a. Jyro X)
//:: Created On: 9/11/03
//:://////////////////////////////////////////////
//!!!Custom constants!!! !!!DO NOT EDIT!!!:
const string JX_PRES_DB = "JX_PRESTIGE_DATABASE";
const string ARCANE_ARCHER = "X1_AllowArcher";
const string ASSASSIN = "X1_AllowAsasin";
const string BLACKGUARD = "X1_AllowBlkGrd";
const string CHAMP_TORM = "X2_AllowDivcha";
const string DRAG_DISC = "X1_AllowDrDis";
const string DWARF_DEF = "X1_AllowDwDef";
const string HARPER_SCOUT = "X1_AllowHarper";
const string PALE_MASTER = "X2_AllowPalema";
const string SHADOW_DANCER = "X1_AllowShadow";
const string SHIFT = "X2_AllowShiftr";
const string WPN_MASTER = "X2_AllowWM";
//End constants...
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!////
////!!!!!!!!!!!!!!!!!!!!!!BEGIN PRESTIGE FUNCTIONS!!!!!!!!!!!!!!!!!!!!!!!!!!////
////!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//Use this in your OnClientEnter.
//It rebuilds the prestige resctrictions on oPC.
void JXRebuildPrestige(object oPC);
//Cleans the JX Database, therefore starting everyone on a clean slate.
void JXDestroyPrestige();
//Ordinary: Use this in the OnEnter event handler of your module.
//- oPC: The PC in question.
//- bAllow: Allow or disallow.
//
// TRUE = Restricts the classes.
// FALSE = Un-restricts the classes.
//
//- bPermanent: Saves to database, therefore restricting permanently until removed.
//
// TRUE = Restricts even through server restart.
// FALSE = Restricts only until PC leaves and re-enters.
//
//- bSendMessage: Sends a message to the PC letting them know all prestige classes have been restricted or un-restricted.
//
// TRUE = Sends the message.
// FALSE = Does NOT send the message
//
//- bOverride: Whether or not it will be restricted if the PC already has a level in said class.
//
// TRUE = Overrides even if they have the class.
// FALSE = Does not override if the PC has a level in the class.
//
//Function: Restricts prestige classes until the PC earns it.
void RestrictAllPrestigeClasses(object oPC, int bAllow=FALSE, int bPermanent=FALSE, int bSendMessage=TRUE, int bOverride = FALSE);
//Ordinary: Use this in the OnEnter event handler of your module.
//- oPC: The PC in question.
//- nClassType: The class you want to restrict(Must be prestige).
//- bAllow: Allow or disallow.
//
// TRUE = Restricts the class.
// FALSE = Un-restricts the class.
//
//- bPermanent: Saves to database, therefore restricting permanently until removed.
//
// TRUE = Restricts even through server restart.
// FALSE = Restricts only until PC leaves and re-enters.
//
//- bSendMessage: Sends a message to the PC letting them know the class has been restricted or un-restricted.
//
// TRUE = Sends the message.
// FALSE = Does NOT send the message
//
//- bOverride: Whether or not it will be restricted if the PC already has a level in said class.
//
// TRUE = Overrides even if they have the class.
// FALSE = Does not override if the PC has a level in the class.
//
//Function: Restricts prestige class until the PC earns it.
void RestrictPrestigeClass(object oPC, int nClassType, int bAllow=FALSE, int bPermanent=FALSE, int bSendMessage=TRUE, int bOverride = FALSE);
//Use this to check if the PC is able to take a level in the supplied
//prestigeous class.
//-oPC: PC to check.
//-nClassType: Class to check for.
//Function: Checks to see if the PC can level up as an nClassType(Must be prestige).
//Usually used in text appears when situations.
//Example Syntax: if(GetAbleToLevelPrestigeClass(oPC, CLASS_TYPE_*) == TRUE){return TRUE;}
int GetAbleToLevelPrestigeClass(object oPC, int nClassType);
////////////////////////////////////////////////////////////////////////////////
///////////////////METHODs USED WITHIN THE CODE - DISREGARD!////////////////////
////////////////////////////////////////////////////////////////////////////////
string ClassToStringInt(int nClass)
{
string sResult="";
switch(nClass)
{
case CLASS_TYPE_ARCANE_ARCHER:
sResult=ARCANE_ARCHER;
break;
case CLASS_TYPE_ASSASSIN:
sResult=ASSASSIN;
break;
case CLASS_TYPE_BLACKGUARD:
sResult=BLACKGUARD;
break;
case CLASS_TYPE_DIVINECHAMPION:
sResult=CHAMP_TORM;
break;
case CLASS_TYPE_DRAGONDISCIPLE:
sResult=DRAG_DISC;
break;
case CLASS_TYPE_DWARVENDEFENDER:
sResult=DWARF_DEF;
break;
case CLASS_TYPE_HARPER:
sResult=HARPER_SCOUT;
break;
case CLASS_TYPE_PALEMASTER:
sResult=PALE_MASTER;
break;
case CLASS_TYPE_SHIFTER:
sResult=SHIFT;
break;
case CLASS_TYPE_SHADOWDANCER:
sResult=SHADOW_DANCER;
break;
case CLASS_TYPE_WEAPON_MASTER:
sResult=WPN_MASTER;
break;
}
return sResult;
}
string ConvertClassType(int nClassType)
{
string class="";
switch(nClassType)
{
case CLASS_TYPE_ARCANE_ARCHER:
class="Arcane Archer";
break;
case CLASS_TYPE_ASSASSIN:
class="Assassin";
break;
case CLASS_TYPE_BLACKGUARD:
class="Blackgaurd";
break;
case CLASS_TYPE_DIVINECHAMPION:
class="Champion of Torm";
break;
case CLASS_TYPE_DRAGONDISCIPLE:
class="Dragon Disciple";
break;
case CLASS_TYPE_DWARVENDEFENDER:
class="Dwarven Defender";
break;
case CLASS_TYPE_HARPER:
class="Harper Scout";
break;
case CLASS_TYPE_PALEMASTER:
class="Pale Master";
break;
case CLASS_TYPE_SHADOWDANCER:
class="Shadow Dancer";
break;
case CLASS_TYPE_SHIFTER:
class="Shifter";
break;
case CLASS_TYPE_WEAPON_MASTER:
class="Weapon Master";
break;
default:
break;
}
return class;
}
int GetHasSpellCasting(int nLevel, object oPC)
{
int nTotal;
nTotal = GetLevelByClass(CLASS_TYPE_BARD,oPC)+
GetLevelByClass(CLASS_TYPE_WIZARD)+
GetLevelByClass(CLASS_TYPE_SORCERER,oPC);
if(nTotal>=nLevel)
return TRUE;
else
return FALSE;
}
int GetHasAlternateForm(object oPC)
{
if(GetHasFeat(FEAT_ELEMENTAL_SHAPE, oPC) ||
GetHasFeat(FEAT_EPIC_WILD_SHAPE_DRAGON, oPC) ||
GetHasFeat(FEAT_EPIC_WILD_SHAPE_UNDEAD, oPC) ||
GetHasFeat(FEAT_GREATER_WILDSHAPE_1, oPC) ||
GetHasFeat(FEAT_GREATER_WILDSHAPE_2, oPC) ||
GetHasFeat(FEAT_GREATER_WILDSHAPE_3, oPC) ||
GetHasFeat(FEAT_GREATER_WILDSHAPE_4, oPC) ||
GetHasFeat(FEAT_WILD_SHAPE, oPC))
return TRUE;
else
return FALSE;
}
int GetHasMeleeWeaponFocus(object oPC)
{
if(GetHasFeat(FEAT_WEAPON_FOCUS_BASTARD_SWORD, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_BATTLE_AXE, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_CLUB, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_DAGGER, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_DIRE_MACE, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_DOUBLE_AXE, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_DWAXE, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_GREAT_AXE, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_GREAT_SWORD, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_HALBERD, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_HAND_AXE, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_HEAVY_FLAIL, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_KAMA, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_KATANA, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_KUKRI, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_LIGHT_FLAIL, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_LIGHT_HAMMER, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_LIGHT_MACE, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_LONG_SWORD, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_MORNING_STAR, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_RAPIER, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_SCIMITAR, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_SCYTHE, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_SHORT_SWORD, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_SICKLE, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_SPEAR, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_TWO_BLADED_SWORD, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_WAR_HAMMER, oPC))
return TRUE;
else
return FALSE;
}
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//------------------------------------------------------------------------------
void JXDestroyPrestige()
{
DestroyCampaignDatabase(JX_PRES_DB);
}
//------------------------------------------------------------------------------
void JXRebuildPrestige(object oPC)
{
if(!GetIsObjectValid(oPC))
return;
int nArcane = GetCampaignInt(JX_PRES_DB, ARCANE_ARCHER, oPC);
int nAssassin = GetCampaignInt(JX_PRES_DB, ASSASSIN, oPC);
int nBlackgaurd = GetCampaignInt(JX_PRES_DB, BLACKGUARD, oPC);
int nChampion = GetCampaignInt(JX_PRES_DB, CHAMP_TORM, oPC);
int nDrag = GetCampaignInt(JX_PRES_DB, DRAG_DISC, oPC);
int nDwarf = GetCampaignInt(JX_PRES_DB, DWARF_DEF, oPC);
int nHarper = GetCampaignInt(JX_PRES_DB, HARPER_SCOUT, oPC);
int nPale = GetCampaignInt(JX_PRES_DB, PALE_MASTER, oPC);
int nShadow = GetCampaignInt(JX_PRES_DB, SHADOW_DANCER, oPC);
int nShift = GetCampaignInt(JX_PRES_DB, SHIFT, oPC);
int nWpnMstr = GetCampaignInt(JX_PRES_DB, WPN_MASTER, oPC);
if(nArcane > 0)
SetLocalInt(oPC, ARCANE_ARCHER, 1);
if(nAssassin > 0)
SetLocalInt(oPC, ASSASSIN, 1);
if(nBlackgaurd > 0)
SetLocalInt(oPC, BLACKGUARD, 1);
if(nChampion > 0)
SetLocalInt(oPC, CHAMP_TORM, 1);
if(nDrag > 0)
SetLocalInt(oPC, DRAG_DISC, 1);
if(nDwarf > 0)
SetLocalInt(oPC, DWARF_DEF, 1);
if(nHarper > 0)
SetLocalInt(oPC, HARPER_SCOUT, 1);
if(nPale > 0)
SetLocalInt(oPC, PALE_MASTER, 1);
if(nShadow > 0)
SetLocalInt(oPC, SHADOW_DANCER, 1);
if(nShift > 0)
SetLocalInt(oPC, SHIFT, 1);
if(nWpnMstr > 0)
SetLocalInt(oPC, WPN_MASTER, 1);
}
////////////////////////////////////////////////////////////////////////////////
////////////////////////////RESTRICTALLPRESTIGECLASSES//////////////////////////
////////////////////////////////////////////////////////////////////////////////
void RestrictAllPrestigeClasses(object oPC, int bAllow=FALSE, int bPermanent=FALSE, int bSendMessage=TRUE, int bOverride=FALSE)
{
if(GetIsPC(oPC) && !GetIsDM(oPC)) //allow DM's whatever.
{
RestrictPrestigeClass(oPC, CLASS_TYPE_ARCANE_ARCHER, bAllow, bPermanent, bSendMessage, bOverride);
RestrictPrestigeClass(oPC, CLASS_TYPE_ASSASSIN, bAllow, bPermanent, bSendMessage, bOverride);
RestrictPrestigeClass(oPC, CLASS_TYPE_BLACKGUARD, bAllow, bPermanent, bSendMessage, bOverride);
RestrictPrestigeClass(oPC, CLASS_TYPE_DIVINECHAMPION, bAllow, bPermanent, bSendMessage, bOverride);
RestrictPrestigeClass(oPC, CLASS_TYPE_DRAGONDISCIPLE, bAllow, bPermanent, bSendMessage, bOverride);
RestrictPrestigeClass(oPC, CLASS_TYPE_DWARVENDEFENDER, bAllow, bPermanent, bSendMessage, bOverride);
RestrictPrestigeClass(oPC, CLASS_TYPE_HARPER, bAllow, bPermanent, bSendMessage, bOverride);
RestrictPrestigeClass(oPC, CLASS_TYPE_PALEMASTER, bAllow, bPermanent, bSendMessage, bOverride);
RestrictPrestigeClass(oPC, CLASS_TYPE_SHADOWDANCER, bAllow, bPermanent, bSendMessage, bOverride);
RestrictPrestigeClass(oPC, CLASS_TYPE_SHIFTER, bAllow, bPermanent, bSendMessage, bOverride);
RestrictPrestigeClass(oPC, CLASS_TYPE_WEAPON_MASTER, bAllow, bPermanent, bSendMessage, bOverride);
}
else
return;
}
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////RESTRICTPRESTIGECLASS/////////////////////////////
////////////////////////////////////////////////////////////////////////////////
void RestrictPrestigeClass(object oPC, int nClassType, int bAllow=FALSE, int bPermanent=FALSE, int bSendMessage=TRUE, int bOverride = FALSE)
{
if(bAllow == FALSE)
{
SetLocalInt(oPC, ClassToStringInt(nClassType), 1);
if(bPermanent == TRUE)
SetCampaignInt(JX_PRES_DB, ClassToStringInt(nClassType), 1);
if(bSendMessage == TRUE)
SendMessageToPC(oPC, "Prestige class "+ConvertClassType(nClassType)+" restricted.");
//Override
if(bOverride == FALSE)
{
if(GetLevelByClass(nClassType, oPC) > 0)
{
DeleteLocalInt(oPC, ClassToStringInt(nClassType));
if(GetCampaignInt(JX_PRES_DB, ClassToStringInt(nClassType), oPC) > 0 && bPermanent == TRUE)
DeleteCampaignVariable(JX_PRES_DB, ClassToStringInt(nClassType), oPC);
if(bSendMessage == TRUE)
SendMessageToPC(oPC, "Prestige class "+ConvertClassType(nClassType)+" unrestricted because you already have at least one level in this class.");
}
}
//End override
}
else if(bAllow == TRUE)
{
if(GetLocalInt(oPC, ClassToStringInt(nClassType)) > 0)
DeleteLocalInt(oPC, ClassToStringInt(nClassType));
if(GetCampaignInt(JX_PRES_DB, ClassToStringInt(nClassType), oPC) > 0 && bPermanent == TRUE)
DeleteCampaignVariable(JX_PRES_DB, ClassToStringInt(nClassType), oPC);
if(bSendMessage == TRUE)
SendMessageToPC(oPC, "Prestige class "+ConvertClassType(nClassType)+" unrestricted.");
}
else
return;
}
////////////////////////////////////////////////////////////////////////////////
////////////////////////GETABLETOLEVELPRESITGECLASS/////////////////////////////
////////////////////////////////////////////////////////////////////////////////
int GetAbleToLevelPrestigeClass(object oPC, int nClassType)
{
switch(nClassType)
{
////////////////////////////////////////////////////////////////////////////////
//------------------------------ARCANE ARCHER---------------------------------//
////////////////////////////////////////////////////////////////////////////////
case CLASS_TYPE_ARCANE_ARCHER:
//Check to see if the PC has what it takes to be an arcane archer...
if(GetRacialType(oPC) == RACIAL_TYPE_ELF || GetRacialType(oPC) == RACIAL_TYPE_HALFELF)
{
if(GetBaseAttackBonus(oPC) >= 6)
{
if(GetHasFeat(FEAT_WEAPON_FOCUS_LONGBOW, oPC) ||
GetHasFeat(FEAT_WEAPON_FOCUS_SHORTBOW, oPC))
{
if(GetHasFeat(FEAT_POINT_BLANK_SHOT, oPC))
{
if(GetHasSpellCasting(1, oPC))
return TRUE;
else
return FALSE;
}
else
return FALSE;
}
else
return FALSE;
}
else
return FALSE;
}
else
return FALSE;
break;
////////////////////////////////////////////////////////////////////////////////
//---------------------------------ASSASSIN-----------------------------------//
////////////////////////////////////////////////////////////////////////////////
case CLASS_TYPE_ASSASSIN:
//Check to see if the PC has what it takes to be an assassin...
if(GetAlignmentGoodEvil(oPC) == ALIGNMENT_EVIL)
{
int DexMod = GetAbilityModifier(ABILITY_DEXTERITY, oPC);
if((GetSkillRank(SKILL_HIDE, oPC)-DexMod) >= 8 && (GetSkillRank(SKILL_MOVE_SILENTLY, oPC)-DexMod) >= 8)
return TRUE;
else
return FALSE;
}
else
return FALSE;
break;
////////////////////////////////////////////////////////////////////////////////
//--------------------------------BLACKGUARD----------------------------------//
////////////////////////////////////////////////////////////////////////////////
case CLASS_TYPE_BLACKGUARD:
//Check to see if the PC has what it takes to be a blackgaurd...
if(GetAlignmentGoodEvil(oPC) == ALIGNMENT_EVIL)
{
if(GetBaseAttackBonus(oPC) >= 6)
{
int DexMod = GetAbilityModifier(ABILITY_DEXTERITY, oPC);
if((GetSkillRank(SKILL_HIDE, oPC)-DexMod) >= 5)
{
if(GetHasFeat(FEAT_CLEAVE, oPC))
return TRUE;
else
return FALSE;
}
else
return FALSE;
}
else
return FALSE;
}
else
return FALSE;
break;
////////////////////////////////////////////////////////////////////////////////
//-------------------------------CHAMPION OF TORM-----------------------------//
////////////////////////////////////////////////////////////////////////////////
case CLASS_TYPE_DIVINECHAMPION:
if(GetAlignmentGoodEvil(oPC)!=ALIGNMENT_EVIL)
{
if(GetHasMeleeWeaponFocus(oPC))
{
if(GetBaseAttackBonus(oPC)>=7)
return TRUE;
else
return FALSE;
}
else
return FALSE;
}
else
return FALSE;
break;
////////////////////////////////////////////////////////////////////////////////
//-------------------------------DRAGON DISCIPLE------------------------------//
////////////////////////////////////////////////////////////////////////////////
case CLASS_TYPE_DRAGONDISCIPLE:
if(GetLevelByClass(CLASS_TYPE_BARD, oPC)>=1 || GetLevelByClass(CLASS_TYPE_SORCERER, oPC)>=1)
{
int IntMod = GetAbilityModifier(ABILITY_INTELLIGENCE, oPC);
if((GetSkillRank(SKILL_LORE, oPC)-IntMod)>=8)
return TRUE;
else
return FALSE;
}
else
return FALSE;
break;
////////////////////////////////////////////////////////////////////////////////
//-------------------------------DWARVEN DEFENDER-----------------------------//
////////////////////////////////////////////////////////////////////////////////
case CLASS_TYPE_DWARVENDEFENDER:
if(GetRacialType(oPC)==RACIAL_TYPE_DWARF)
{
if(GetBaseAttackBonus(oPC)>=7)
{
if(GetHasFeat(FEAT_DODGE,oPC) && GetHasFeat(FEAT_TOUGHNESS,oPC))
{
if(GetAlignmentLawChaos(oPC)==ALIGNMENT_LAWFUL)
return TRUE;
else
return FALSE;
}
else
return FALSE;
}
else
return FALSE;
}
else
return FALSE;
break;
////////////////////////////////////////////////////////////////////////////////
//-------------------------------HARPER SCOUT---------------------------------//
////////////////////////////////////////////////////////////////////////////////
case CLASS_TYPE_HARPER:
//Check to see if the PC has what it takes to be a Harper Scout...
if(GetAlignmentGoodEvil(oPC) == ALIGNMENT_GOOD ||
GetAlignmentGoodEvil(oPC) == ALIGNMENT_NEUTRAL)
{
if(GetHasFeat(FEAT_ALERTNESS, oPC) && GetHasFeat(FEAT_IRON_WILL, oPC))
{
int StrMod = GetAbilityModifier(ABILITY_STRENGTH, oPC);
int IntMod = GetAbilityModifier(ABILITY_INTELLIGENCE, oPC);
int ChaMod = GetAbilityModifier(ABILITY_CHARISMA, oPC);
if((GetSkillRank(SKILL_SEARCH, oPC)-IntMod) >= 4 && (GetSkillRank(SKILL_PERSUADE, oPC)-ChaMod) >= 8 && (GetSkillRank(SKILL_LORE, oPC)-IntMod) >= 6 && (GetSkillRank(SKILL_DISCIPLINE, oPC)-StrMod) >= 4)
return TRUE;
else
return FALSE;
}
else
return FALSE;
}
else
return FALSE;
break;
////////////////////////////////////////////////////////////////////////////////
//--------------------------------PALE MASTER---------------------------------//
////////////////////////////////////////////////////////////////////////////////
case CLASS_TYPE_PALEMASTER:
if(GetAlignmentGoodEvil(oPC)!=ALIGNMENT_GOOD)
{
if(GetHasSpellCasting(3, oPC))
return TRUE;
else
return FALSE;
}
else
return FALSE;
break;
////////////////////////////////////////////////////////////////////////////////
//-------------------------------SHADOW DANCER--------------------------------//
////////////////////////////////////////////////////////////////////////////////
case CLASS_TYPE_SHADOWDANCER:
//Check to see if the PC has what it takes to be a shadow dancer...
if(GetHasFeat(FEAT_DODGE, oPC) && GetHasFeat(FEAT_MOBILITY, oPC))
{
int DexMod = GetAbilityModifier(ABILITY_DEXTERITY, oPC);
if((GetSkillRank(SKILL_HIDE, oPC)-DexMod) >= 10 && (GetSkillRank(SKILL_MOVE_SILENTLY, oPC)-DexMod) >= 8 && (GetSkillRank(SKILL_TUMBLE, oPC)-DexMod) >= 5)
return TRUE;
else
return FALSE;
}
else
return FALSE;
break;
////////////////////////////////////////////////////////////////////////////////
//---------------------------------SHIFTER------------------------------------//
////////////////////////////////////////////////////////////////////////////////
case CLASS_TYPE_SHIFTER:
if(GetHasFeat(FEAT_ALERTNESS, oPC))
{
if(GetAbilityScore(oPC, ABILITY_WISDOM)>=13)
{
if(GetHasAlternateForm(oPC))
return TRUE;
else
return FALSE;
}
else
return FALSE;
}
else
return FALSE;
break;
////////////////////////////////////////////////////////////////////////////////
//------------------------------WEAPON MASTER---------------------------------//
////////////////////////////////////////////////////////////////////////////////
case CLASS_TYPE_WEAPON_MASTER:
if(GetBaseAttackBonus(oPC)>=5)
{
int ChaMod = GetAbilityModifier(ABILITY_CHARISMA, oPC);
if((GetSkillRank(SKILL_INTIMIDATE, oPC)-ChaMod)>=4)
{
if(GetHasMeleeWeaponFocus(oPC))
{
if(GetHasFeat(FEAT_DODGE, oPC) &&
GetHasFeat(FEAT_MOBILITY, oPC) &&
GetHasFeat(FEAT_EXPERTISE, oPC) &&
GetHasFeat(FEAT_SPRING_ATTACK, oPC) &&
GetHasFeat(FEAT_WHIRLWIND_ATTACK, oPC))
return TRUE;
else
return FALSE;
}
else
return FALSE;
}
else
return FALSE;
}
else
return FALSE;
break;
////////////////////////////////////////////////////////////////////////////////
//----------------------------------------------------------------------------//
////////////////////////////////////////////////////////////////////////////////
default:
return FALSE;
break;
}
return FALSE;
}
//End GetAbleToLevelPrestigeClass
//------------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!////
////!!!!!!!!!!!!!!!!!!!!!!!END PRESTIGE FUNCTIONS!!!!!!!!!!!!!!!!!!!!!!!!!!!////
////!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////