252 lines
9.2 KiB
Plaintext
252 lines
9.2 KiB
Plaintext
|
//::////////////////////////////////////////////////////////////////////////////
|
||
|
//::
|
||
|
//:: Script Name: tele_handler_c
|
||
|
//::
|
||
|
//:: 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. This script is based
|
||
|
//:: on conversational teleportation, there is another script "teleport_handler"
|
||
|
//:: based on teleportation from an OnUsed event from a placeable, etc.
|
||
|
//::
|
||
|
//:: 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 the variable is not defined on
|
||
|
//:: the placeable nothing will happen. This will only work for a player, not a
|
||
|
//:: whole party.
|
||
|
//::
|
||
|
//::////////////////////////////////////////////////////////////////////////////
|
||
|
|
||
|
location lTarget;
|
||
|
object oTarget;
|
||
|
//Put this script on conversation
|
||
|
void main()
|
||
|
{
|
||
|
object oPC = GetPCSpeaker();
|
||
|
|
||
|
//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, "VALLEYARENA")== 1)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("Valleyarena");
|
||
|
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 1st set of conditions
|
||
|
|
||
|
//Start 2nd set of conditions same template as 1st
|
||
|
}
|
||
|
else if (GetLocalInt(OBJECT_SELF, "ARENAISLAND")== 1)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("arena_island");
|
||
|
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, "ABYSSALEXIT")== 1)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("ABYSSEXIT");
|
||
|
lTarget = GetLocation(oTarget);
|
||
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||
|
AssignCommand(oPC, ClearAllActions());
|
||
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
||
|
//End 3rd set of conditions
|
||
|
|
||
|
//Start 4th set of conditions same template as 1st
|
||
|
}
|
||
|
else if (GetLocalInt(OBJECT_SELF, "ABYSSALENTER")== 1)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("ABYSSENTER");
|
||
|
lTarget = GetLocation(oTarget);
|
||
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||
|
AssignCommand(oPC, ClearAllActions());
|
||
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
||
|
//End 4th set of conditions
|
||
|
|
||
|
//Start 5th set of conditions same template as 1st
|
||
|
}
|
||
|
else if (GetLocalInt(OBJECT_SELF, "ABYSSALCADALE")== 1)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("ABYSS_CADALE");
|
||
|
lTarget = GetLocation(oTarget);
|
||
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||
|
AssignCommand(oPC, ClearAllActions());
|
||
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
||
|
//End 5th set of conditions
|
||
|
|
||
|
//Start 6th set of conditions same template as 1st
|
||
|
}
|
||
|
else if (GetLocalInt(OBJECT_SELF, "UNDERSEAOUT")== 1)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("WP_Undersea01_Out");
|
||
|
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, "UNDERSEAIN")== 1)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("WP_Undersea01_In");
|
||
|
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, "TAER_SHPORTS_TELE")== 1)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("TAER_SHPORTS");
|
||
|
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, "DRYAD_IN_TELE")== 1)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("DRYAD_IN");
|
||
|
lTarget = GetLocation(oTarget);
|
||
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||
|
AssignCommand(oPC, ClearAllActions());
|
||
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
||
|
//End 9th set of conditions
|
||
|
|
||
|
//Start 10th set of conditions same template as 1st
|
||
|
}
|
||
|
else if (GetLocalInt(OBJECT_SELF, "DRYAD_OUT_TELE")== 1)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("DRYAD_OUT");
|
||
|
lTarget = GetLocation(oTarget);
|
||
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||
|
AssignCommand(oPC, ClearAllActions());
|
||
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
||
|
//End 10th set of conditions
|
||
|
|
||
|
//Start 11th set of conditions same template as 1st
|
||
|
}
|
||
|
else if (GetLocalInt(OBJECT_SELF, "LICH_UNDER_TELE")== 1)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("LICH_UNDER");
|
||
|
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, "TRELICHPTL1_TELE")== 1)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("TRELICHPTL1");
|
||
|
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, "TELOBI_TELE")== 1)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("HJAL_PORTAL");
|
||
|
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, "HJALMER_TELE")== 1)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("TELOB_PORTAL");
|
||
|
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, "DEVALIA_TELE")== 1)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("WP_DEVALIA_HOUSE");
|
||
|
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, "SWMPSPINE")== 1)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("SWMPSPINE");
|
||
|
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, "SPINESWAMPZ")== 1)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("SPINESWAMPZ");
|
||
|
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, "GLAC_FORST")== 1)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("GLAC_FORST");
|
||
|
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, "SWAMPSPINE")== 1)
|
||
|
{
|
||
|
oTarget = GetWaypointByTag("SWAMPSPINE");
|
||
|
lTarget = GetLocation(oTarget);
|
||
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||
|
AssignCommand(oPC, ClearAllActions());
|
||
|
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
||
|
//End 19th set of conditions
|
||
|
}
|
||
|
else{}
|
||
|
}
|
||
|
|
||
|
|