Include File - Pure Class Functions
-
I've made an include file for CoA to hold some Pure Class Functions. I'm putting the code here for anyone to use if you want to add some code specific to Pure Class characters in your module.
//:://///////////////////////////////////////////// //:: Pure class includes functions //:: inc_pureclass //:: Copyright (c) 2010 CoA //::////////////////////////////////////////////// /* Contains various helper functions related to pure class functionnalities. Mainly storing functions you can call to determine if a PC is -PURE- into a certain class */ //::////////////////////////////////////////////// //:: Created By: Yardsale //:: Created On: 2010-05-24 //::////////////////////////////////////////////// //variables int iHitDice; int iClassLevel; //Function prototypes int IsPureFighter(object oPC); int IsPureRanger(object oPC); int IsPureBarbarian(object oPC); int IsPureMonk(object oPC); int IsPureWizard(object oPC); int IsPureSorcerer(object oPC); int IsPureRogue(object oPC); int IsPureCleric(object oPC); int IsPureBard(object oPC); int IsPureDruid(object oPC); int IsPurePaladin(object oPC); /****************************************************************************** Implementation *******************************************************************************/ int IsPureFighter(object oPC){ int iHitDice = GetHitDice(oPC); int iClassLevel = GetLevelByClass(CLASS_TYPE_FIGHTER,oPC); if(iHitDice == iClassLevel){ return TRUE; }else{ return FALSE; } } int IsPureRanger(object oPC){ int iHitDice = GetHitDice(oPC); int iClassLevel = GetLevelByClass(CLASS_TYPE_RANGER,oPC); if(iHitDice == iClassLevel){ return TRUE; }else{ return FALSE; } } int IsPureMonk(object oPC){ int iHitDice = GetHitDice(oPC); int iClassLevel = GetLevelByClass(CLASS_TYPE_MONK,oPC); if(iHitDice == iClassLevel){ return TRUE; }else{ return FALSE; } } int IsPureBarbarian(object oPC){ int iHitDice = GetHitDice(oPC); int iClassLevel = GetLevelByClass(CLASS_TYPE_BARBARIAN,oPC); if(iHitDice == iClassLevel){ return TRUE; }else{ return FALSE; } } int IsPurePaladin(object oPC){ int iHitDice = GetHitDice(oPC); int iClassLevel = GetLevelByClass(CLASS_TYPE_PALADIN,oPC); if(iHitDice == iClassLevel){ return TRUE; }else{ return FALSE; } } int IsPureDruid(object oPC){ int iHitDice = GetHitDice(oPC); int iClassLevel = GetLevelByClass(CLASS_TYPE_DRUID,oPC); if(iHitDice == iClassLevel){ return TRUE; }else{ return FALSE; } } int IsPureWizard(object oPC){ int iHitDice = GetHitDice(oPC); int iClassLevel = GetLevelByClass(CLASS_TYPE_WIZARD,oPC); if(iHitDice == iClassLevel){ return TRUE; }else{ return FALSE; } } int IsPureSorcerer(object oPC){ int iHitDice = GetHitDice(oPC); int iClassLevel = GetLevelByClass(CLASS_TYPE_SORCERER,oPC); if(iHitDice == iClassLevel){ return TRUE; }else{ return FALSE; } } int IsPureRogue(object oPC){ int iHitDice = GetHitDice(oPC); int iClassLevel = GetLevelByClass(CLASS_TYPE_ROGUE,oPC); if(iHitDice == iClassLevel){ return TRUE; }else{ return FALSE; } } int IsPureBard(object oPC){ int iHitDice = GetHitDice(oPC); int iClassLevel = GetLevelByClass(CLASS_TYPE_BARD,oPC); if(iHitDice == iClassLevel){ return TRUE; }else{ return FALSE; } } int IsPureCleric(object oPC){ int iHitDice = GetHitDice(oPC); int iClassLevel = GetLevelByClass(CLASS_TYPE_CLERIC,oPC); if(iHitDice == iClassLevel){ return TRUE; }else{ return FALSE; } } //Uncomment for the compiler to spot your errors //void main(){}