UW2_PRC8/_module/nss/stargateportspc.nss
Jaysyn904 5197ad9a4d Initial upload
Initial upload
2023-09-25 20:24:01 -04:00

75 lines
2.4 KiB
Plaintext

location lTarget;
object oTarget;
//Created by Guile 4/6/07
//Put this script OnUsed
#include "prc_class_const"
void main()
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
if ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC)
+GetLevelByClass(CLASS_TYPE_PALADIN, oPC)
+GetLevelByClass(CLASS_TYPE_DIVINECHAMPION, oPC)
+GetLevelByClass(CLASS_TYPE_ARCHIVIST, oPC)
+GetLevelByClass(CLASS_TYPE_FAVOURED_SOUL, oPC)
+GetLevelByClass(CLASS_TYPE_HEALER, oPC)
+GetLevelByClass(CLASS_TYPE_SOHEI, oPC)
+GetLevelByClass(CLASS_TYPE_CONTEMPLATIVE, oPC)
+GetLevelByClass(CLASS_TYPE_HEARTWARDER, oPC)
+GetLevelByClass(CLASS_TYPE_SOLDIER_OF_LIGHT, oPC)
+GetLevelByClass(CLASS_TYPE_TEMPUS, oPC)
+GetLevelByClass(CLASS_TYPE_SACREDPURIFIER, oPC)
+GetLevelByClass(CLASS_TYPE_WARPRIEST, oPC)
+GetLevelByClass(CLASS_TYPE_KNIGHT_CHALICE, oPC)
+GetLevelByClass(CLASS_TYPE_HATHRAN, oPC)
+GetLevelByClass(CLASS_TYPE_FISTRAZIEL, oPC)
+GetLevelByClass(CLASS_TYPE_VASSAL, oPC)
+GetLevelByClass(CLASS_TYPE_SACREDFIST, oPC)
+GetLevelByClass(CLASS_TYPE_MIGHTY_CONTENDER_KORD, oPC)
+GetLevelByClass(CLASS_TYPE_RUNECASTER, oPC)
+GetLevelByClass(CLASS_TYPE_BLIGHTLORD, oPC)
+GetLevelByClass(CLASS_TYPE_BFZ, oPC)
+GetLevelByClass(CLASS_TYPE_KNIGHT_MIDDLECIRCLE, oPC)
+GetLevelByClass(CLASS_TYPE_COMBAT_MEDIC, oPC)
+GetLevelByClass(CLASS_TYPE_OLLAM, oPC)
+GetLevelByClass(CLASS_TYPE_HOSPITALER, oPC)
+GetLevelByClass(CLASS_TYPE_PRC_EYE_OF_GRUUMSH, oPC)
+GetLevelByClass(CLASS_TYPE_RUBY_VINDICATOR, oPC)
+GetLevelByClass(CLASS_TYPE_MORNINGLORD, oPC)
+GetLevelByClass(CLASS_TYPE_SLAYER_OF_DOMIEL, oPC)
+GetLevelByClass(CLASS_TYPE_SKULLCLAN_HUNTER, oPC)
+GetLevelByClass(CLASS_TYPE_BRIMSTONE_SPEAKER, oPC)
+GetLevelByClass(CLASS_TYPE_SWIFT_WING, oPC)) >= 1)
{
FloatingTextStringOnCreature("The portal opens up and you are teleported somewhere!", oPC);
oTarget = GetWaypointByTag("stargateway1");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}
else
{
FloatingTextStringOnCreature("You can't seem to figure out how thet portal works.", oPC);
}
}