PoA_PRC8/_module/nss/secretcrack2.nss

38 lines
761 B
Plaintext
Raw Normal View History

location lTarget;
object oTarget;
2022-10-07 14:20:31 -04:00
//Put this script OnEnter
void main()
{
2022-10-07 14:20:31 -04:00
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
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
if ((GetLevelByClass(CLASS_TYPE_ROGUE, oPC)>10))
{
if (GetIsSkillSuccessful(oPC, SKILL_SEARCH, 88))
{
oTarget = GetWaypointByTag("crackway2");
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 a magical entrance to a small cave!", oPC));
2022-10-07 14:20:31 -04:00
}
}
}