Rune_PRC8/_module/nss/manarinachamdoor.nss
Jaysyn904 d1c309ae63 Initial commit
Initial commit
2024-09-13 09:10:39 -04:00

67 lines
2.2 KiB
Plaintext

#include "prc_class_const"
//Put this OnEnter
void main()
{
object oPC = GetEnteringObject();
int iAllArcane = GetLevelByClass(CLASS_TYPE_WIZARD, oPC)
+ GetLevelByClass(CLASS_TYPE_SORCERER, oPC)
+ GetLevelByClass(CLASS_TYPE_BARD, oPC)
+ GetLevelByClass(CLASS_TYPE_DRAGONFIRE_ADEPT, oPC)
+ GetLevelByClass(CLASS_TYPE_DRAGON_SHAMAN, oPC)
+ GetLevelByClass(CLASS_TYPE_DREAD_NECROMANCER, oPC)
+ GetLevelByClass(CLASS_TYPE_BEGUILER, oPC)
+ GetLevelByClass(CLASS_TYPE_SHADOWCASTER, oPC)
+ GetLevelByClass(CLASS_TYPE_WARMAGE, oPC)
+ GetLevelByClass(CLASS_TYPE_ASSASSIN, oPC)
+ GetLevelByClass(CLASS_TYPE_CELEBRANT_SHARESS, oPC)
+ GetLevelByClass(CLASS_TYPE_CULTIST_SHATTERED_PEAK, oPC)
+ GetLevelByClass(CLASS_TYPE_DUSKBLADE, oPC)
+ GetLevelByClass(CLASS_TYPE_HARPER, oPC)
+ GetLevelByClass(CLASS_TYPE_HEXBLADE, oPC)
+ GetLevelByClass(CLASS_TYPE_KNIGHT_WEAVE, oPC)
+ GetLevelByClass(CLASS_TYPE_SHADOWLORD, oPC)
+ GetLevelByClass(CLASS_TYPE_SUBLIME_CHORD, oPC)
+ GetLevelByClass(CLASS_TYPE_SUEL_ARCHANAMACH, oPC)
+ GetLevelByClass(CLASS_TYPE_WARLOCK, oPC);
if (!GetIsPC(oPC))
return;
if (iAllArcane == 0)
return;
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("ManarinaPortalChamberIn");
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());
DelayCommand(3.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
oTarget = oPC;
//Visual effects can't be applied to waypoints, so if it is a WP
//apply to the WP's location instead
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget));
}