PoA_PRC8/_module/nss/mageonly.nss
Jaysyn904 2bf42182fd Further PRC integration
Further PRC integration.  Fixed Rod of Ruin.  Full compile.
2022-10-10 08:16:23 -04:00

30 lines
778 B
Plaintext

#include "prc_class_const"
void main()
{
object oDoor = OBJECT_SELF;
object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC);
int nClass;
//:: Restrict based on the player's class
nClass = GetLevelByClass(CLASS_TYPE_WIZARD, oPC)
+GetLevelByClass(CLASS_TYPE_SORCERER, oPC)
+GetLevelByClass(CLASS_TYPE_DREAD_NECROMANCER, oPC)
+GetLevelByClass(CLASS_TYPE_WARMAGE, oPC)
+GetLevelByClass(CLASS_TYPE_SHADOWCASTER, oPC)
+GetLevelByClass(CLASS_TYPE_SUBLIME_CHORD, oPC)
+GetLevelByClass(CLASS_TYPE_ARCHMAGE, oPC)
+GetLevelByClass(CLASS_TYPE_WARLOCK, oPC);
if (nClass >= 20)
{
AssignCommand(oDoor, ActionOpenDoor(oDoor));
SendMessageToPC(oPC, "You may pass.");
}
else
{
SendMessageToPC(oPC, "You will not pass.");
}
}