PoA_PRC8/_module/nss/royalroguesecret.nss

50 lines
1.1 KiB
Plaintext
Raw Normal View History

//Put this script OnEnter
#include "prc_class_const"
void main()
{
location lTarget;
object oTarget;
object oPC = GetEnteringObject();
int nClass;
nClass = GetLevelByClass(CLASS_TYPE_ROGUE, oPC)
+GetLevelByClass(CLASS_TYPE_NINJA, oPC)
+GetLevelByClass(CLASS_TYPE_SCOUT, oPC)
+GetLevelByClass(CLASS_TYPE_FACTOTUM, oPC)
+GetLevelByClass(CLASS_TYPE_PSYCHIC_ROGUE, oPC);
int nSearch = GetSkillRank(SKILL_SEARCH, oPC, TRUE);
//:: They must be a level 21 rogue nothing happens
if (nClass <= 20)
{
//:: Only if they can spot it!
if(nSearch >= 30)
{
FloatingTextStringOnCreature("You notice a strange looking crack in the wall.", oPC, FALSE);
}
}
else if (nClass >= 21)
{
if(nSearch >= 34)
{
SendMessageToPC(oPC, "You found a secret lever!");
oTarget = GetWaypointByTag("royalrogueway");
lTarget = GetLocation(oTarget);
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
DelayCommand(2.0, AssignCommand(oPC, ClearAllActions()));
DelayCommand(2.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
}
}
}