2022-10-09 23:07:18 -04:00
|
|
|
//Put this script OnEnter
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-10 08:16:23 -04:00
|
|
|
#include "prc_class_const"
|
2022-10-09 23:07:18 -04:00
|
|
|
|
2022-10-10 08:16:23 -04:00
|
|
|
void main()
|
|
|
|
{
|
|
|
|
object oPC = GetEnteringObject();
|
|
|
|
object oTarget;
|
|
|
|
|
|
|
|
location lTarget;
|
2022-10-09 23:07:18 -04:00
|
|
|
|
2022-10-10 08:16:23 -04:00
|
|
|
if (!GetIsPC(oPC)) return;
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-10 08:16:23 -04:00
|
|
|
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-10 08:16:23 -04:00
|
|
|
if (DoOnce==TRUE) return;
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-10 08:16:23 -04:00
|
|
|
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-10 08:16:23 -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
|
|
|
|
2022-10-10 08:16:23 -04:00
|
|
|
oTarget = GetWaypointByTag("crackway1");
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-10 08:16:23 -04:00
|
|
|
lTarget = GetLocation(oTarget);
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-10 08:16:23 -04:00
|
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-10 08:16:23 -04:00
|
|
|
AssignCommand(oPC, ClearAllActions());
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-10 08:16:23 -04:00
|
|
|
AssignCommand(oPC, ActionJumpToLocation(lTarget));
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-10 08:16:23 -04:00
|
|
|
DelayCommand(1.0, FloatingTextStringOnCreature("You found the magical entrance to a small cave!", oPC));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|