Teleporter Functions
Posted: Tue Jun 21, 2011 3:05 am
Updated: 7/2/2011 12:01 AM PST
Version 1.4
Description: A set of functions to help with zoning, teleporting, and entering and leaving houses and guildcastles.
Function Descriptions:
Examples:
Changelog:
Version 1.4
Description: A set of functions to help with zoning, teleporting, and entering and leaving houses and guildcastles.
Function Descriptions:
Code: Select all
-----------------------------------------------------------
------------ MiesterMan's Teleporter Functions ------------
------------------- Version 1.4 ---------------------------
-----------------------------------------------------------
-- Returns the ZoneID
function getZoneID()
-- Returns the Server Name
function getServer()
-- This function will swap gear sets before leaving party to
-- exit an instance. Then it wait until you're close to the
-- coords listed in _X, _Z before continuing the script.
function partyQuitExit(_X,_Z)
-- Accepts: Coords, Zone ID, "next", "file: <path filename>" and if
-- needed a teleporter's name and the ChoiceOption on their menu.
-- Then waits till you are close to the coords to continue.
-- Note: Zone ID can be Zone ID number, "house", "guild" or "any" (anywhere but house or guild)
function isTeleport(_X,_Z,_teleporter,_option)
-- This function will return true if in the indicated zone, false otherwise.
-- Accepts: Zone ID (number), "guild", "house", or "any" (anywhere but guild or house)
function checkZone(_zoneID)
-- This function will enter a different house than the one
-- owned by the character.
function visitHouseEnter(housemaid,housename,housepass)
-- Will leave the visit house.
function visitHouseLeave(_zoneID)
-- Will leave the character's house.
function houseLeave(_zoneID)
-- Will enter the character's house.
function houseEnter(housemaid)
-- Will enter the character's guild castle.
function guildCastleEnter()
-- Will leave a guild castle.
function guildCastleLeave(_zoneID)
Code: Select all
-- Teleport from Varnas gate to Central Varnas and load GotoAuction.XML
isTeleport("file: GotoAuction.XML","Lieve",2);
-- Teleport from Southern Janost to Channel 1 Thunderhoof
isTeleport(15,"Snoop the Stubborn",3);
-- Enter a dungeon using zone checking
repeat
keyboardPress(key.VK_W);
until checkZone(DungeonZoneID);
player:rest(2);
loadPaths("file: DungeonScript.XML");
-- Enter house in Howling Mountains
houseEnter("Meydo");
-- Enter another player's house in Howling Mountains
visitHouseEnter("Meydo","OtherDudesHouseName","HousePassword");
-- Leave house to Thunderhoof Channel 1
houseLeave(15);
-- Leave another player's house to Thunderhoof Channel 1
visitHouseLeave(15);
-- Leave Party to TP out of Dungeon and load DungeonReset.XML
partyQuitExit("file: DungeonReset.XML");
- V 1.0
- Freshly posted
- V 1.1
- Added functionality to isTeleport()
- Now automatically accepts static popups (teleport fees and confirms)
- Now accepts "next" for teleport check coords.
- Now accepts "file: <path filename>" to load a waypointfile and use the first waypoint as the teleport check coords.
- Zone ID can now be the Zone ID number, "house", "guild", or, "any" (for anywhere but house or guild)
- Added functionality to isTeleport()
- V 1.2
- Changed the name of the housename variable for visitHouseEnter() (probably only an issue with my settings but to be safe I'm updating the userfunction).
- V 1.3
- Added auto-accept popup to coord version of isTeleport function (I was using SL and didn't realize it wasn't working right).
- Improved the auto-accept functionality by adding a split second wait before sending the command.
- V 1.4
- RENAMED from Zone to Teleporter to reflect primary usage.
- There were issues with isTeleport chaining teleporters with the same name together. This has been resolved.
- There was an issue with the waypoint calculation that changed (WP index is updated before code is executed now). isTeleport now chooses the correct waypoint.
- Locals in the isTeleport function are now redeclared if not properly declared by the argument list.
- Added new memory scan function that's survived the last two patches getServer which returns the current Server Name.