; SuperSlayer's Crystal Portal Sub
; Author: SuperSlayer
; Version 1.0
; Release date: 10-11-09
; Purpose: Utilize the Crystal Portal in scripts requiring travel with/out runebook/traveling capabilities
; Shard: OSI
; Client Tested with: 7.0.1.1 (Patch 95)
; EUO version tested with: 1.5 v155
...
...
...
; Example usage: "Fel Minoc Mint", "Minoc Moongate"
; Example Sub usage: GoSub SS_CryPor Fel Minoc Mint
; GoSub SS_CryPor Null Britain Mint
; GoSub SS_CryPor Null Luna Moongate
; Dependencies: Character must be able to use the Crystal Portal via it's security setting. This script will NOT
; check for that setting. The Crystal Portal MUST be locked down in the home and character at least
; on the same floor as the object.
; Returns #False for unsuccessful travel of character
; If Return is #false, check these values to see where the problem is:
; !Args_Invalid = missing arg. #False
; !CryPor = A Crystal Portal has not been found. #False
; !Rep = Character is red and attempted to go to Trammel. #False
; !CPLocked = Crystal Portal is not locked down and will not work. #False
; !Arg_Valid = Location desired does not exist, Ex: "Fel Luna Moongate." #False
; !CPSpell (Loc_City/Loc_Obj) = Argument is either misspelled or not an acceptable argument.
; Ex: "Fel Britain Minnt","Fel Valor Mint."
; Returns #True for successful travel of character
This script sub is designed to help the script writer with an alternative to recalling/SJ'ing/and gating by using the new first year vet reward, the Crystal Portal. The Crystal, as designed, will instantly teleport your character to the desired location simply by typing it out in the client. With this sub, you'll eliminate the constant hassle of editing scripts over again with different location information. Simply insert a few lines of my code at the start of your script, and when you need to use the Crystal Portal, use this GoSub and the 3 args to get there with loads of error checks. These include: Lock down status of the Crystal, crystal distance from character, character rep relation to destination, spell checking of the arguments passed, and smart location referral.
Lock down status check is simply that. If the Crystal Portal is not locked down, it won't work. This script will detect it's lock down status.
Crystal distance from character will need to be within 3 tiles, this script will walk/pathfind to the crystal if within 15 tiles.
Character reputation relation to destination checks for red characters accidentally opting to go to tram. Likely forgetting to put the 'Fel' 1st argument in the GoSub.
Spell checking of the arguments passed is minimal but will compare at the least to the allowed set of location commands.
Smart location referral checks if the location exists, such as "Fel Valor Moongate" - no such moongate exists.
Featuring: Error Report upon failure in any sense! If for some reason, the travel fails, an error report is ready upon the exitting of the sub located in the #Result. However, should there be no errors and the character travels successfully, the #result returned will be #True.
I look forward to your feedback, thank you and enjoy !