2022-10-09 23:07:18 -04:00
|
|
|
location lTarget;
|
|
|
|
object oTarget;
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-09 23:07:18 -04:00
|
|
|
//Put this script OnEnter
|
2022-10-09 22:53:12 -04:00
|
|
|
void main()
|
|
|
|
{
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-09 23:07:18 -04:00
|
|
|
object oPC = GetEnteringObject();
|
|
|
|
|
|
|
|
if (!GetIsPC(oPC)) return;
|
|
|
|
|
|
|
|
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-09 23:07:18 -04:00
|
|
|
if (DoOnce==TRUE) return;
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-09 23:07:18 -04:00
|
|
|
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-09 23:07:18 -04:00
|
|
|
if ((GetLevelByClass(CLASS_TYPE_ROGUE, oPC)>10))
|
|
|
|
{
|
|
|
|
if (GetIsSkillSuccessful(oPC, SKILL_SEARCH, 88))
|
|
|
|
{
|
|
|
|
oTarget = GetWaypointByTag("crackway2");
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-09 23:07:18 -04:00
|
|
|
lTarget = GetLocation(oTarget);
|
2022-10-07 14:20:31 -04:00
|
|
|
|
|
|
|
|
2022-10-09 23:07:18 -04:00
|
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-09 23:07:18 -04:00
|
|
|
AssignCommand(oPC, ClearAllActions());
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-09 23:07:18 -04:00
|
|
|
AssignCommand(oPC, ActionJumpToLocation(lTarget));
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-09 23:07:18 -04:00
|
|
|
DelayCommand(1.0, FloatingTextStringOnCreature("You found a magical entrance to a small cave!", oPC));
|
2022-10-07 14:20:31 -04:00
|
|
|
|
2022-10-09 23:07:18 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|