54 lines
1.3 KiB
Plaintext
54 lines
1.3 KiB
Plaintext
effect eEffect;
|
|
location lTarget;
|
|
object oTarget;
|
|
//Put this script OnEnter
|
|
|
|
#include "prc_inc_spells"
|
|
|
|
void main()
|
|
{
|
|
|
|
object oPC = GetEnteringObject();
|
|
|
|
if (!GetIsPC(oPC)) return;
|
|
|
|
if (!PRCGetCasterLevel(oPC))
|
|
|
|
/* if ((GetLevelByClass(CLASS_TYPE_BARD, oPC)==0)&&
|
|
(GetLevelByClass(CLASS_TYPE_CLERIC, oPC)==0)&&
|
|
(GetLevelByClass(CLASS_TYPE_DRUID, oPC)==0)&&
|
|
(GetLevelByClass(CLASS_TYPE_SORCERER, oPC)==0)&&
|
|
(GetLevelByClass(CLASS_TYPE_WIZARD, oPC)==0)&&
|
|
(GetLevelByClass(CLASS_TYPE_PALEMASTER, oPC)==0)&&
|
|
(GetLevelByClass(CLASS_TYPE_DRAGONDISCIPLE, oPC)==0)) */
|
|
{
|
|
SendMessageToPC(oPC, "You are not a practitioner of the magical arts, you cannot pass.");
|
|
|
|
oTarget = GetWaypointByTag("FL_Mage_NotAllow");
|
|
|
|
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));
|
|
|
|
eEffect = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
|
|
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC);
|
|
|
|
}
|
|
else
|
|
{
|
|
}
|
|
|
|
}
|
|
|