374 lines
14 KiB
Plaintext
374 lines
14 KiB
Plaintext
//::////////////////////////////////////////////////////////////////////////////
|
|
//::
|
|
//:: Script Name: teleport_handler
|
|
//::
|
|
//:: Use: This script is used as a teleportation system handler whereas the
|
|
//:: player will be teleported to multiple places defined by the variable on
|
|
//:: the placeable used to teleport the player. This eliminates the need for
|
|
//:: a custom teleportation script for each teleportation.
|
|
//::
|
|
//:: Created By: Birdman076
|
|
//::
|
|
//:: Created On: July 27, 2009
|
|
//::
|
|
//:: Note: This script will check for a variable defined on the placeable used
|
|
//:: to teleport the player to a waypoint. If there variable is not defined on
|
|
//:: the placeable nothing will happen. This will only work for a player, not a
|
|
//:: whole party.
|
|
//::
|
|
//::////////////////////////////////////////////////////////////////////////////
|
|
#include "prc_sp_func"
|
|
location lTarget;
|
|
object oTarget;
|
|
//Put this script OnUsed
|
|
void main()
|
|
{
|
|
object oPC = GetLastUsedBy();
|
|
|
|
//check to make sure we are a player
|
|
if (!GetIsPC(oPC)) return;
|
|
|
|
//Start of 1st set of conditions.
|
|
//This first set of conditions will do the following: check for an integer stored
|
|
//On the placeable in question. It will then get the waypoint by tag which we have
|
|
//created and placed in the area we wish to send the player. It will verify it is valid
|
|
//if it is valid we will then clear all actions of the player and jump them to the
|
|
//location with some visual effects, in this case the "unsummon" effect.
|
|
if (GetLocalInt(OBJECT_SELF, "MAGEFORGE_IN")== 1)
|
|
{
|
|
/* if ((GetLevelByClass(CLASS_TYPE_BARD, oPC)>19)||
|
|
(GetLevelByClass(CLASS_TYPE_CLERIC, oPC)>19)||
|
|
(GetLevelByClass(CLASS_TYPE_DRUID, oPC)>19)||
|
|
(GetLevelByClass(CLASS_TYPE_SORCERER, oPC)>19)||
|
|
(GetLevelByClass(CLASS_TYPE_WIZARD, oPC)>19)) */
|
|
if (PRCGetCasterLevel(oPC) > 19)
|
|
{
|
|
|
|
oTarget = GetWaypointByTag("WP_MAGEFORGE_IN");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oPC);
|
|
}
|
|
else
|
|
{
|
|
SendMessageToPC(oPC, "Only those of arcane powers are allowed to pass.");
|
|
}
|
|
//End 1st set of conditions
|
|
|
|
//Start 2nd set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "MAGEFORGE_OUT")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_MAGEFORGE_OUT");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oPC);
|
|
//End 2nd set of conditions
|
|
|
|
//Start 3rd set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "GOBLINTELEIN")== 1)
|
|
{
|
|
string Subrace = GetStringLowerCase(GetSubRace(oPC));
|
|
//if(Subrace == "goblin" || Subrace == "hobgoblin" || Subrace == "bugbear")
|
|
if(MyPRCGetRacialType(oPC) == RACIAL_TYPE_HUMANOID_GOBLINOID)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_GOBLINTELE_IN");
|
|
lTarget = GetLocation(oTarget);
|
|
}
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_LOS_EVIL_30), oPC);
|
|
//End 3rd set of conditions
|
|
|
|
//Start 4th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "GOBLINTELEOUT")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_GOBLINTELE_OUT");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_LOS_EVIL_30), oPC);
|
|
//End 4th set of conditions
|
|
|
|
//Start 5th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "DRYADTELEOUT")== 1)
|
|
{
|
|
//string Subrace = GetStringLowerCase(GetSubRace(oPC));
|
|
|
|
if(GetRacialType(oPC) != RACIAL_TYPE_PIXIE &&
|
|
GetRacialType(oPC) != RACIAL_TYPE_BROWNIE &&
|
|
GetRacialType(oPC) != RACIAL_TYPE_HYBSIL &&
|
|
GetRacialType(oPC) != RACIAL_TYPE_SPIRIT_FOLK &&
|
|
GetRacialType(oPC) != RACIAL_TYPE_KILLOREN &&
|
|
GetRacialType(oPC) != RACIAL_TYPE_VOLODNI )
|
|
|
|
|
|
//if(Subrace == "pixie" || Subrace == "dryad" || Subrace == "nymph")
|
|
{
|
|
oTarget = GetWaypointByTag("WP_DRYADTREE_OUT");
|
|
lTarget = GetLocation(oTarget);
|
|
}
|
|
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_POLYMORPH), oPC);
|
|
//End 5th set of conditions
|
|
|
|
//Start 6th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "LOWERABYSS")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("LOWERABYSS");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
//End 6th set of conditions
|
|
|
|
//Start 7th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "UPPERABYSS")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("UPPERABYSS");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
//End 7th set of conditions
|
|
|
|
//Start 8th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "ISLANDARENAOUT")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("Arena_return");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
//End 8th set of conditions
|
|
|
|
//Start 9th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "OOCAREAOUT")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_OOC_RETURN");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_MYSTICAL_EXPLOSION), oPC);
|
|
//End 9th set of conditions
|
|
|
|
//Start 10th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "OOCAREAIN")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_OOC_ENTER");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_MYSTICAL_EXPLOSION), oPC);
|
|
//End 10th set of conditions
|
|
|
|
//Start 11th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "CRACKINCLIFFIN")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_CRACK_CLIFF_IN");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
//End 11th set of conditions
|
|
|
|
//Start 12th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "CRACKINCLIFFOUT")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WP_CRACK_CLIFF_OUT");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
//End 12th set of conditions
|
|
|
|
//Start 13th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "CADALEEVILTELE")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("CADALEEVIL");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
//End 13th set of conditions
|
|
|
|
//Start 14th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "ZOLADENTERTELE")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("ZOLADENTER");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
//End 14th set of conditions
|
|
|
|
//Start 15th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "ZOLADEXITTELE")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("ZOLADEXIT");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
//End 15th set of conditions
|
|
|
|
//Start 16th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "TDJAILSW1TELE")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("TDJAILSW1");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
//End 16th set of conditions
|
|
|
|
//Start 17th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "ETUMTUNNELTELE")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("etum_tunnel_sewer");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
//End 17th set of conditions
|
|
|
|
//Start 18th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "SEWERRATWH1TELE")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("SEWERRATWH1");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
//End 18th set of conditions
|
|
|
|
//Start 19th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "ZU_LOWERTELE")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("ZU_LOWER");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
//End 19th set of conditions
|
|
|
|
//Start 20th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "etum_xanalanTELE")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("etummus_xanalan");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
//End 20th set of conditions
|
|
|
|
//Start 21th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "tunnel_xanTELE")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("tunnel_xanalan");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
//End 21th set of conditions
|
|
|
|
//Start 22th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "WRHOUSE1TELE")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WRHOUSE1");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
object oFollow1 = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
|
|
object oFollow2 = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
|
|
object oFollow3 = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
|
|
object oFollow4 = GetAssociate(ASSOCIATE_TYPE_HENCHMAN, oPC);
|
|
object oFollow5 = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
|
|
DelayCommand(1.1, AssignCommand(oFollow1, ActionJumpToLocation(lTarget)));
|
|
DelayCommand(1.2, AssignCommand(oFollow2, ActionJumpToLocation(lTarget)));
|
|
DelayCommand(1.3, AssignCommand(oFollow3, ActionJumpToLocation(lTarget)));
|
|
DelayCommand(1.4, AssignCommand(oFollow4, ActionJumpToLocation(lTarget)));
|
|
DelayCommand(1.5, AssignCommand(oFollow5, ActionJumpToLocation(lTarget)));
|
|
DelayCommand(1.6, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
//End 22th set of conditions
|
|
|
|
//Start 22th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "WRHOUSE2TELE")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("WRHOUSE2");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
object oFollow1 = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
|
|
object oFollow2 = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
|
|
object oFollow3 = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
|
|
object oFollow4 = GetAssociate(ASSOCIATE_TYPE_HENCHMAN, oPC);
|
|
object oFollow5 = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
|
|
DelayCommand(1.1, AssignCommand(oFollow1, ActionJumpToLocation(lTarget)));
|
|
DelayCommand(1.2, AssignCommand(oFollow2, ActionJumpToLocation(lTarget)));
|
|
DelayCommand(1.3, AssignCommand(oFollow3, ActionJumpToLocation(lTarget)));
|
|
DelayCommand(1.4, AssignCommand(oFollow4, ActionJumpToLocation(lTarget)));
|
|
DelayCommand(1.5, AssignCommand(oFollow5, ActionJumpToLocation(lTarget)));
|
|
DelayCommand(1.6, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
//End 22th set of conditions
|
|
|
|
//Start 23th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "SEWERRATWH2TELE")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("SEWERRATWH2");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
//End 23th set of conditions
|
|
|
|
//Start 24th set of conditions same template as 1st
|
|
}
|
|
else if (GetLocalInt(OBJECT_SELF, "TAERPRISLADRTELE")== 1)
|
|
{
|
|
oTarget = GetWaypointByTag("TAER_PRIS_TRPLD");
|
|
lTarget = GetLocation(oTarget);
|
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
|
AssignCommand(oPC, ClearAllActions());
|
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
|
//End 24th set of conditions
|
|
}
|
|
else {}
|
|
}
|
|
|
|
|
|
|