Changed folder name.
Changed folder name.
This commit is contained in:
74
_module/nss/stoneport2guild.nss
Normal file
74
_module/nss/stoneport2guild.nss
Normal file
@@ -0,0 +1,74 @@
|
||||
/////////////////////////////////////////////////
|
||||
// Ultimate Teleport Script 1.0
|
||||
/////////////////////////////////////////////////
|
||||
// by Amurayi (mschdesign@hotmail.com)
|
||||
//
|
||||
// based on SirLestat's Secret Trapdoorscripts
|
||||
/////////////////////////////////////////////////
|
||||
/* The problem with most of the teleport scripts out there is that your companions
|
||||
won't be teleported with you if you ar ebeing teleported within the same area.
|
||||
This easy to configure script here is the solution for this old problem. Simply
|
||||
alter the way how the teleport shall work by turning the options on and off be
|
||||
setting the variables to 0 or 1 in the first ppart of this script.
|
||||
|
||||
What this script can do:
|
||||
- teleports player out of conversation, trigger or item
|
||||
- teleports player with or without companions
|
||||
- teleports player alone or the whole party (players)
|
||||
*/
|
||||
|
||||
void main()
|
||||
{
|
||||
// uncomment one of the next 3 lines depending where you use the script:
|
||||
object oPC = GetPCSpeaker(); // for conversations
|
||||
|
||||
object oToken = GetItemPossessedBy(oPC, "idtoken");
|
||||
string sName = GetName(oToken);
|
||||
object oArea = GetArea(oPC);
|
||||
location lSaved = GetLocation(oPC);
|
||||
int nMulti = GetLocalInt(GetModule(), "multi");
|
||||
|
||||
//Don't store information if the location is invalid!
|
||||
if(oArea!=OBJECT_INVALID)
|
||||
{
|
||||
SetLocalLocation(oToken, "RECALL_LOC", lSaved);
|
||||
FloatingTextStringOnCreature("Location Saved!", oPC, FALSE);
|
||||
if(nMulti) //If Multiplayer, Save Their Toon!
|
||||
{
|
||||
ExportSingleCharacter(oPC);
|
||||
}
|
||||
}
|
||||
|
||||
if(GetItemPossessedBy(oPC, "guildstone")== OBJECT_INVALID)
|
||||
{
|
||||
CreateItemOnObject("guildstone", oPC, 1);
|
||||
}
|
||||
|
||||
// set to 1 if you want to teleport the whole party of the player, whereever every member is:
|
||||
int iTeleportWholeParty = 0;
|
||||
// set to 1 if you want the Associates of the player to be teleported as well, otherwise to 0:
|
||||
int iTeleportAssociateToo = 1;
|
||||
// Enter the destination Waypoint in here:
|
||||
object oDWP = GetWaypointByTag("guildway");
|
||||
|
||||
//--DEBUGGING-----------------------
|
||||
//If the way point is not there..
|
||||
if (oDWP==OBJECT_INVALID)
|
||||
{ FloatingTextStringOnCreature("No Destination Found.", oPC); }
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
effect eVis = EffectVisualEffect(472);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oPC, 0.0f);
|
||||
|
||||
eVis = EffectDisappear(1);
|
||||
DelayCommand(1.1, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oPC, 0.0f));
|
||||
|
||||
DelayCommand(2.5, AssignCommand(oPC, ClearAllActions()));
|
||||
|
||||
//Allow for the visual effect to finish.
|
||||
DelayCommand(2.6, AssignCommand(oPC, ActionJumpToObject(oDWP)));
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user