ScriptUO

Official ScriptUO EasyUO Scripts => Submit your Script => Inactive Submissions => Topic started by: Superslayer on October 10, 2009, 09:43:49 PM

Title: Crystal Portal Sub
Post by: Superslayer on October 10, 2009, 09:43:49 PM
Code: [Select]
; 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 !
Title: Re: Crystal Portal Sub
Post by: Endless Night on October 11, 2009, 08:18:01 AM
Looks nice .. so you can goto an Ish Bank ?
Title: Re: Crystal Portal Sub
Post by: Superslayer on October 11, 2009, 12:42:47 PM
Thanks, just whipped it up. Did a check and ya, you can go to Ilshenar mint, took me to the garg town. Ilshenar moongate wont work..obviously.
Title: Re: Crystal Portal Sub
Post by: 12TimesOver on May 31, 2011, 08:58:22 AM
Anyone had the chance to test this sub out? SS, would love to get it moved out of Submisions.

X
Title: Re: Crystal Portal Sub
Post by: Endless Night on October 18, 2011, 02:01:13 PM
looks like a nice peice of work .. sadly wasnt working for me ... not sure is ss is still around.
Title: Re: Crystal Portal Sub
Post by: NObama on October 18, 2011, 05:12:48 PM
But ZOMG...ilshenar garg bank FTW?!