PoA_PRC8/_module/nss/secretcrack.nss

47 lines
1.0 KiB
Plaintext
Raw Normal View History

//Put this script OnEnter
2022-10-07 14:20:31 -04:00
#include "prc_class_const"
void main()
{
object oPC = GetEnteringObject();
object oTarget;
location lTarget;
if (!GetIsPC(oPC)) return;
2022-10-07 14:20:31 -04:00
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
2022-10-07 14:20:31 -04:00
if (DoOnce==TRUE) return;
2022-10-07 14:20:31 -04:00
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
2022-10-07 14:20:31 -04:00
int nClass;
nClass = GetLevelByClass(CLASS_TYPE_ROGUE, oPC)
+GetLevelByClass(CLASS_TYPE_NINJA, oPC)
+GetLevelByClass(CLASS_TYPE_SCOUT, oPC)
+GetLevelByClass(CLASS_TYPE_BEGUILER, oPC)
+GetLevelByClass(CLASS_TYPE_FACTOTUM, oPC)
+GetLevelByClass(CLASS_TYPE_PSYCHIC_ROGUE, oPC);
if (nClass >= 1)
{
if (GetIsSkillSuccessful(oPC, SKILL_SEARCH, 88))
{
2022-10-07 14:20:31 -04:00
oTarget = GetWaypointByTag("crackway1");
2022-10-07 14:20:31 -04:00
lTarget = GetLocation(oTarget);
2022-10-07 14:20:31 -04:00
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
2022-10-07 14:20:31 -04:00
AssignCommand(oPC, ClearAllActions());
2022-10-07 14:20:31 -04:00
AssignCommand(oPC, ActionJumpToLocation(lTarget));
2022-10-07 14:20:31 -04:00
DelayCommand(1.0, FloatingTextStringOnCreature("You found the magical entrance to a small cave!", oPC));
}
}
}