/*-------------------------------------------------------- Script Name: voyageskip ---------------------------------------------------------- Created By: Genisys(Guile) Created On: 3/05/09 ---------------------------------------------------------- This is my premier jump script, took me a while to perfect it, but it's working just fine, all you have to do, is create a waypoint named "voyageway" and "voyage", the voyageway is the location new players go to, and voyage is the place your old players go to... ----------------------------------------------------------*/ #include "nw_i0_tool" //Prototype Declared void DoJump(object oPlayer); //Main Script void main() { object oPC = GetEnteringObject(); object oItem; /* Underworld Check... object oToken = GetItemPossessedBy(oPC, "underworld"); string sUMsg = "You cannot use Underworld Characters here!"; if(oToken!=OBJECT_INVALID) { DelayCommand(5.0, FloatingTextStringOnCreature(sUMsg, oPC, TRUE)); DelayCommand(6.0, FloatingTextStringOnCreature(sUMsg, oPC, TRUE)); DelayCommand(7.0, FloatingTextStringOnCreature(sUMsg, oPC, TRUE)); DelayCommand(8.0, FloatingTextStringOnCreature(sUMsg, oPC, TRUE)); DelayCommand(9.0, FloatingTextStringOnCreature(sUMsg, oPC, TRUE)); DelayCommand(10.0, BootPC(oPC)); return; } // */ ///////////////PERSISTENT LOCATION JUMP//////////// //Note this function only works if the saved location option //is activated in all of the proper Module Event Scripts! //onplayerdeath, onplayerrest, onpclevelup, onmoduleload, etc.. //See the "savepcinfo" script for auto location save options. /* //If they are in the guild... if(GetItemPossessedBy(oPC, "guildpass")!=OBJECT_INVALID) { oItem = GetFirstItemInInventory(oPC); while (GetIsObjectValid(oItem)) { //DestroyAllGuildstones for now... if (GetTag(oItem)=="guildstone") { if(GetStringLeft(GetName(oItem), 2)!="ID") DestroyObject(oItem, 0.0f); } oItem = GetNextItemInInventory(oPC); } } // */ //We should delay this to allow them to logg on first! DelayCommand(0.2, DoJump(oPC)); //End Main Script } //PROTOTYPE DEFINED void DoJump(object oPlayer) { //Declare Major Variables.. object oPC = oPlayer; location lStart = GetLocation( GetWaypointByTag("start_voy")); location voy = GetLocation(GetWaypointByTag("voyage")); location guild = GetLocation(GetWaypointByTag("guildway")); location lDM = GetLocation(GetWaypointByTag("dm_way")); //For Guild Members only... object oGuild = GetItemPossessedBy(oPC, "guildstone"); location lSaved; //Store the PC's location, so they can come back here after relogging if(oGuild != OBJECT_INVALID) { lSaved = GetCampaignLocation("LOCATIONS", GetName(oGuild), oPC); } else { lSaved = GetLocation(GetWaypointByTag("guildway")); } //If it's a DM ////////////////////////////////////////////////////////////////////// if(GetIsDM(oPC)) { if(GetArea(GetAreaFromLocation(lDM))!=OBJECT_INVALID) { DelayCommand(0.1, AssignCommand(oPC, ClearAllActions())); DelayCommand(0.2, AssignCommand(oPC, ActionJumpToLocation(lDM))); } else { DelayCommand(0.1, AssignCommand(oPC, ClearAllActions())); DelayCommand(0.2, AssignCommand(oPC, ActionJumpToLocation(voy))); } } /////////////////////////////////////////////////////////////////////// //If they are in the guild... else if(GetItemPossessedBy(oPC, "guildpass")!=OBJECT_INVALID) { //Only guild can return to where their location was saved.. //This reduces lagg and keeps the database smaller... if(GetArea(GetAreaFromLocation(lSaved))!=OBJECT_INVALID) { DelayCommand(0.1, AssignCommand(oPC, ClearAllActions())); DelayCommand(0.2, AssignCommand(oPC, ActionJumpToLocation(lSaved))); } //Otherwise jump the pc to town - Just In Case! else { DelayCommand(0.1, AssignCommand(oPC, ClearAllActions())); DelayCommand(0.2, AssignCommand(oPC, ActionJumpToLocation(guild))); } } //////////////////////////////////////////////////////////////////////////// else { //If it's a newbie... if(GetXP(oPC)<=999) { DelayCommand(0.1, AssignCommand(oPC, ClearAllActions())); DelayCommand(0.2, AssignCommand(oPC, ActionJumpToLocation(lStart))); } //If it's not a new player put them in town... else { DelayCommand(0.1, AssignCommand(oPC, ClearAllActions())); DelayCommand(0.2, AssignCommand(oPC, ActionJumpToLocation(voy))); } } //Script End }