#include "prc_inc_spells" int fnCanClimb(object oPC) { // Define the required skill ranks and the skill constant for Climb. int REQUIRED_RANKS = 5; // Check the PC's ranks in the Climb skill. int nClimbRanks = GetSkillRank(SKILL_CLIMB, oPC); // Return TRUE if the PC has at least the required ranks in Climb. return nClimbRanks >= REQUIRED_RANKS; } /* int fnCanClimb(object oPC) { // can climb int nClass=GetClassByPosition(1,oPC); int bRet=FALSE; if (nClass==CLASS_TYPE_ROGUE||nClass==CLASS_TYPE_BARD||nClass==CLASS_TYPE_BARBARIAN) bRet=TRUE; nClass=GetClassByPosition(2,oPC); if (nClass==CLASS_TYPE_ROGUE||nClass==CLASS_TYPE_BARD||nClass==CLASS_TYPE_BARBARIAN) bRet=TRUE; nClass=GetClassByPosition(3,oPC); if (nClass==CLASS_TYPE_ROGUE||nClass==CLASS_TYPE_BARD||nClass==CLASS_TYPE_BARBARIAN) bRet=TRUE; return bRet; } // fnCanClimb() */ void main() { object oPC=GetEnteringObject(); int bCanClimb=FALSE; int nR=d20()+GetSkillRank(SKILL_SPOT,oPC); if (GetIsPC(oPC)==TRUE) { // PC if (nR>15) { // spotted the open window bCanClimb=fnCanClimb(oPC); if (bCanClimb==TRUE) { AssignCommand(oPC,ClearAllActions()); AssignCommand(oPC,ActionStartConversation(oPC,"climb_mage",TRUE,FALSE)); } else { SendMessageToPC(oPC,"There is an open window up above. A rogue, bard, or barbarian could probably climb up there."); } } // spotted the open window } // PC }