Training (script)

From Elanthipedia
Jump to navigation Jump to search
Training (script)
Category training
Front-end StormFront
Author Damian



################################################################################
#############################GLOBAL VARIABLES###################################

setvariable LARGESTORAGECONTAINER HAVERSACK
setvariable SECONDSTORAGECONTAINER BALDRIC
setvariable AMMUNITIONCONTAINER thigh quiver
setvariable SPELLPREPMESSAGE dirt in your palm to prepare
setvariable LOCKPICKSTORAGECONTAINER ADAN SKULL
setvariable HUMTHISTUNE HUM CONCERT ROMANT
setvariable CAMBRINTHDEVICE NESTLED ARMBAND
setvariable GLOBALSPELLTARGET
setvariable TIMETOFULLPREP 20
setvariable GLOBALMOON 
setvariable FORAGEFORITEM REDWOOD LIMB
setvariable SPELLRETURNPOINTER NEXTFUNCTION
setvariable SPELLADDITIONALCOMMAND 
save NEXTFUNCTION

#############################GLOBAL VARIABLES###################################
################################################################################


goto %1


################################################################################
################################################################################
#begin START function

   START:

      echo #####################################################################
      put SORT AUTO HEAD
      waitfor inventory is now
      echo #####################################################################
      put INVFIX
      put AWAKE

      echo #####################################################################
      put INV CHECK
      echo #####################################################################
      put EXP ALL
      waitfor Circle:
      echo #####################################################################
      put HEAL
      waitfor Your body
      echo #####################################################################
      put STAT FULL
      waitfor Brave Adventurers
      echo #####################################################################
      put INFO
      waitfor Name:
      echo #####################################################################
      put RPA PIRP
      waitfor You currently have
      echo #####################################################################
      put LOOK
      echo #####################################################################
      put TIME
      waitfor It has been
      put OBS WEATHER
      echo #####################################################################
      put HIDE

      shift
      goto %1

#end START function
################################################################################
################################################################################

############################SKILL TRAINING SCRIPTS##############################

################################################################################
################################################################################
#begin FIRSTAID function

FIRSTAID:

   FIRSTAIDGETTHIRDCOMPENDIUM:

      put %HUMTHISTUNE

      put sort compendium in %LARGESTORAGECONTAINER

      Match FIRSTAID2COMPENDIUMS a leather compendium, a leather compendium,
      Match FIRSTAID2COMPENDIUMS a leather compendium, a leather compendium,
      Match FIRSTAID1COMPENDIUM a leather compendium,

      put look in %LARGESTORAGECONTAINER

      Matchwait

   FIRSTAID2COMPENDIUMS:

      setvariable TOTALCOMPENDIUMS second
      counter set 2
      goto FIRSTAIDCOUNTERCOPY

   FIRSTAID1COMPENDIUM:

      setvariable TOTALCOMPENDIUMS first
      counter set 1
      goto FIRSTAIDCOUNTERCOPY

   FIRSTAIDCOUNTERCOPY:

      setvariable TEMPCOUNTER %c
      goto FIRSTAIDGETCOMPENDIUM%c

   FIRSTAIDGETCOMPENDIUM1:
   FIRSTAIDGETCOMPENDIUM2:
   FIRSTAIDGETCOMPENDIUM3:
   FIRSTAIDGETCOMPENDIUM4:
   FIRSTAIDGETCOMPENDIUM5:

      Match FIRSTAIDGETCOMPENDIUM5 ...wait
      Match FIRSTAIDOPENCOMPENDIUM You get a
      Match FIRSTAIDNOCOMPENDIUMS What are you referring to?

      put get %TOTALCOMPENDIUMS compendium from %LARGESTORAGECONTAINER

      Matchwait

   FIRSTAIDGETCOMPENDIUM0:

      goto NEXTFUNCTION

   FIRSTAIDOPENCOMPENDIUM:

      counter set 9

      Match FIRSTAIDOPENCOMPENDIUM ...wait
      Match FIRSTAIDSTUDYCOMPENDIUM That is already open!
      Match FIRSTAIDSTUDYCOMPENDIUM You open your

      put open my compendium

      Matchwait

   FIRSTAIDSTUDYCOMPENDIUM:

      put %HUMTHISTUNE

      Match FIRSTAIDSTUDYCOMPENDIUM ...wait
      Match FIRSTAIDTURNCOMPENDIUM%c Why do you need to study this chart again?
      Match FIRSTAIDTURNCOMPENDIUM%c a sudden moment of clarity, the information on the chart
      Match FIRSTAIDSTUDYCOMPENDIUM You begin studying
      Match FIRSTAIDSTUDYCOMPENDIUM gradually absorbing more of the knowledge
      Match FIRSTAIDERROR You study the sky but fail to find anything

      put study my compendium

      Matchwait

   FIRSTAIDTURNCOMPENDIUM9:
   FIRSTAIDTURNCOMPENDIUM8:
   FIRSTAIDTURNCOMPENDIUM7:
   FIRSTAIDTURNCOMPENDIUM6:
   FIRSTAIDTURNCOMPENDIUM5:
   FIRSTAIDTURNCOMPENDIUM4:
   FIRSTAIDTURNCOMPENDIUM3:
   FIRSTAIDTURNCOMPENDIUM2:
   FIRSTAIDTURNCOMPENDIUM1:

      counter subtract 1

      Match FIRSTAIDTURNCOMPENDIUM10 ...wait
      Match FIRSTAIDSTUDYCOMPENDIUM You turn to the section

      put turn my compendium

      Matchwait

   FIRSTAIDTURNCOMPENDIUM0:

      counter set %TEMPCOUNTER
      counter subtract 1
      goto FIRSTAIDSTORECOMPENDIUM

   FIRSTAIDSTORECOMPENDIUM:

      Match FIRSTAIDSTORECOMPENDIUM ...wait
      Match FIRSTAIDERROR What were you referring to?
      Match FIRSTAIDCOUNTERCOPY You put your compendium in your

      put put my compendium in my %LARGESTORAGECONTAINER

      Matchwait

   FIRSTAIDNOCOMPENDIUMS:

      echo ===========================================
      echo =You have no compendiums for this training=
      echo ===========================================

      exit

   FIRSTAIDERROR:

      echo =====================================================
      echo =For some reason you are not holding your compendium=
      echo =====================================================

      exit

#end FIRSTAID function
################################################################################
################################################################################
#begin PERCEPTION function

PERCEPTION:

   setvariable PERCEPTIONMATERIAL SILVER ZOMBIES

   PERCEPTIONSUPSPELLS:

      save PERCEPTIONGETTOOLS
      goto GCLEARVISION

   PERCEPTIONGETTOOLS:

      pause

      put get %PERCEPTIONMATERIAL

      Match PERCEPTIONGETTOOLS ...wait
      Match PERCEPTIONWORK You get
      Match PERCEPTIONWORK already holding that
      Match NEXTFUNCTION could not find what
      Matchwait

   PERCEPTIONWORK:

      pause

      put %HUMTHISTUNE
      put juggle my %PERCEPTIONMATERIAL

      Match PERCEPTIONWORK ...wait
      Match EXPPERCEPTION Roundtime
      Match PERCEPTIONSTOWTOOLS Your injuries make juggling impossible
      Matchwait

   EXPPERCEPTION:

      put exp skill perception

      Match PERCEPTIONSTOWTOOLS dazed
      Match PERCEPTIONSTOWTOOLS mind lock
      Match PERCEPTIONWORK EXP HELP for more information
      Matchwait

   PERCEPTIONSTOWTOOLS:

      put put %PERCEPTIONMATERIAL in my %LARGESTORAGECONTAINER

      put %HUMTHISTUNE
      waitfor finish humming

      goto NEXTFUNCTION

#end PERCEPTION function
################################################################################
################################################################################
#begin FORAGING function (this function tests against exp for perception not foraging
#since you learn both doing collect, it is also set up for 2 items, if you wish to add
#more items, simply add more setvariable statements with matching FORAGINGHUM# so it
#doesn't end after the 2nd one as FORAGINGHUM3 will go to the end of the function

FORAGING:

   FORAGINGDECLAREVARIABLES:

   setvariable ITEM1 stem
   setvariable ITEM2 rock
   counter set 0

   FORAGINGCOUNTERINCREASE:

      counter add 1
      goto FORAGINGHUM%c

   FORAGINGHUM:
   FORAGINGHUM1:
   FORAGINGHUM2:

      put %HUMTHISTUNE
      goto FORAGINGKICKPILE

   FORAGINGKICKPILE:

      Match FORAGINGKICKPILE ...wait
      Match FORAGINGSTART you fail to find any signs of its presence
      Match FORAGINGSTART I could not find what you were referring to

      put kick pile

      Matchwait

   FORAGINGSTART:

      Match FORAGINGSTART ...wait
      Match FORAGINGCLUTTER The room is too cluttered
      Match EXPFORAGING You manage to collect a pile
      Match FORAGINGCOUNTERINCREASE wondering what you might find
      Match FORAGINGCOUNTERINCREASE trying to find a dragon's egg
      Match FORAGINGCOUNTERINCREASE you were looking for
      Match FORAGINGCOUNTERINCREASE if you had a bit more luck.
      Match FORAGINGCOUNTERINCREASE unable to find anything.

      put collect %ITEM%c

      Matchwait

   FORAGINGCLUTTER:

      pause 2
      goto FORAGINGKICKPILE

   EXPFORAGING:

      Match FORAGINGEND mind lock
      Match FORAGINGHUM EXP HELP for more information

      put exp skill perception

      Matchwait

   FORAGINGHUM3:
   FORAGINGEND:

      goto NEXTFUNCTION
      exit

#end FORAGING function
################################################################################
################################################################################
LE:

   setvariable COMBATMOVE1 DODGE
   setvariable COMBATMOVE2 FEINT %2
   setvariable COMBATMOVE3 DRAW %2
   setvariable COMBATMOVE4 SLICE %2
   setvariable COMBATMOVE5 CHOP %2
   setvariable COMBATMOVE6 ENC

   counter set 1

   goto WIELDWEAPON

################################################################################
################################################################################
ME:
HE:
2HE:

   setvariable COMBATMOVE1 DODGE
   setvariable COMBATMOVE2 FEINT
   setvariable COMBATMOVE3 DRAW
   setvariable COMBATMOVE4 SWEEP
   setvariable COMBATMOVE5 SLICE
   setvariable COMBATMOVE6 CHOP
   setvariable COMBATMOVE7 SLICE
   setvariable COMBATMOVE8 CHOP
   setvariable COMBATMOVE9 ENC

   counter set 1

   goto WIELDWEAPON

################################################################################
################################################################################
LB:
MB:
HB:
2HB:

   setvariable COMBATMOVE1 DODGE
   setvariable COMBATMOVE2 FEINT
   setvariable COMBATMOVE3 SWEEP
   setvariable COMBATMOVE4 DRAW
   setvariable COMBATMOVE5 SLICE
   setvariable COMBATMOVE6 ENC

   counter set 1

   goto WIELDWEAPON

################################################################################
################################################################################
BRAWLING:

   setvariable COMBATMOVE1 DODGE
   setvariable COMBATMOVE2 FEINT
   setvariable COMBATMOVE3 SWEEP
   setvariable COMBATMOVE4 KICK
   setvariable COMBATMOVE5 SLICE
   setvariable COMBATMOVE6 GOUGE
   setvariable COMBATMOVE7 ELBOW
   setvariable COMBATMOVE8 ENC

   counter set 1

   goto WIELDWEAPON

################################################################################
################################################################################
PIKE:

   setvariable COMBATMOVE1 DODGE
   setvariable COMBATMOVE2 JAB
   setvariable COMBATMOVE3 SWEEP
   setvariable COMBATMOVE4 THRUST
   setvariable COMBATMOVE5 FEINT
   setvariable COMBATMOVE6 LUNGE
   setvariable COMBATMOVE7 DRAW
   setvariable COMBATMOVE8 ENC

   counter set 1

   goto WIELDWEAPON

################################################################################
################################################################################
QS:
SS:

   setvariable COMBATMOVE1 DODGE
   setvariable COMBATMOVE2 FEINT
   setvariable COMBATMOVE3 DRAW
   setvariable COMBATMOVE4 SLICE
   setvariable COMBATMOVE5 SWEEP
   setvariable COMBATMOVE6 CHOP
   setvariable COMBATMOVE7 ENC

   counter set 1

   goto WIELDWEAPON

################################################################################
################################################################################
HALBERD:

   setvariable COMBATMOVE1 DODGE
   setvariable COMBATMOVE2 DRAW
   setvariable COMBATMOVE3 SLICE
   setvariable COMBATMOVE4 SWEEP
   setvariable COMBATMOVE5 CHOP
   setvariable COMBATMOVE6 ENC

   counter set 1

   goto WIELDWEAPON

################################################################################
################################################################################
HT:
LT:

   setvariable COMBATMOVE1 THROW
   setvariable COMBATMOVE2 GET %2 %3
   setvariable COMBATMOVE3 ENC

   counter set 1

   goto WIELDWEAPON

################################################################################
################################################################################
#begin WIELDWEAPON function

WIELDWEAPONRESETCOUNTER:

   counter set 1

   goto WIELDWEAPON

WIELDWEAPONADDCOUNTER:

   counter add 1

   goto WIELDWEAPON

WIELDWEAPON:

   Match WIELDWEAPON ...wait
   Match WIELDWEAPONADDCOUNTER You feint
   Match WIELDWEAPONADDCOUNTER You jab
   Match WIELDWEAPONADDCOUNTER You step backward and
   Match WIELDWEAPONADDCOUNTER You sweep
   Match WIELDWEAPONADDCOUNTER You slice
   Match WIELDWEAPONADDCOUNTER You swing
   Match WIELDWEAPONADDCOUNTER You chop
   Match WIELDWEAPONADDCOUNTER You thrust
   Match WIELDWEAPONADDCOUNTER You lunge
   Match WIELDWEAPONADDCOUNTER You kick
   Match WIELDWEAPONADDCOUNTER You gouge
   Match WIELDWEAPONADDCOUNTER You elbow
   Match WIELDWEAPONADDCOUNTER You throw
   Match WIELDWEAPONADDCOUNTER You pick up
   Match WIELDWEAPONADDCOUNTER position to dodge
   Match WIELDWEAPONADDCOUNTER you are already dodging
   Match WIELDWEAPONADDCOUNTER position to parry
   Match WIELDWEAPONRESETCOUNTER Encumbrance :
   Match WIELDWEAPONWAITTARGET nothing else to face!
   Match WIELDWEAPONADVANCE close enough to attack

   put %COMBATMOVE%c

   Matchwait

WIELDWEAPONWAITTARGET:

   Match WIELDWEAPONRESETCOUNTER melee range
   Match WIELDWEAPONADVANCE at you
   Match WIELDWEAPONADVANCE missle range
   Match WIELDWEAPONADVANCE pole weapon range
   Match WIELDWEAPONWAITLONGER You assess your combat situation...

   put ASSES

   Matchwait

WIELDWEAPONADVANCE:

   Match WIELDWEAPONADVANCE ...wait
   Match WIELDWEAPONRESETCOUNTER You close to melee range
   Match WIELDWEAPONRESETCOUNTER You are already at melee
   Match WIELDWEAPONRESETCOUNTER You turn to face
   Match WIELDWEAPONWAITLONGER You begin to advance
   Match WIELDWEAPONWAITLONGER You are already advancing

   put ADVANCE

   Matchwait

WIELDWEAPONWAITLONGER:

   Match WIELDWEAPONADVANCE begins to advance on you!
   Match WIELDWEAPONADVANCE is still a distance away from you and is closing steadily.
   Match WIELDWEAPONADVANCE closes to pole weapon range on you!
   Match WIELDWEAPONRESETCOUNTER to melee range

   Matchwait

################################################################################
################################################################################
#begin LOCKPICKING function

LOCKPICKING:

#   LOCKPICKINGGETTOOLS:

#      Match LOCKPICKINGGETTOOLS ...wait
#      Match LOCKPICKINGPICK You get a
#      Match LOCKPICKINGPICK You are already holding
#      Match LOCKPICKINGNOTOOLS What were you referring

#      put get lockpick

#      Matchwait

   LOCKPICKINGPICK:

      put %HUMTHISTUNE

      Match LOCKPICKINGPICK ...wait
#      Match LOCKPICKINGGETTOOLS useless lockpick
#      Match LOCKPICKINGGETTOOLS appropriate tool and try again
      Match LOCKPICKINGBOXISOPEN not even locked, why bother?
      Match LOCKPICKINGEXPCHECK Roundtime:

      put pick my %2 blind

      Matchwait

   LOCKPICKINGEXPCHECK:

      Match LOCKPICKINGSTOWTOOLS mind lock
      Match LOCKPICKINGPICK EXP HELP

      put exp skill lock

      Matchwait

   LOCKPICKINGNOTOOLS:

      echo #################################################
      echo #                                               #
      echo # You have no lockpicks to use in this training #
      echo #                                               #
      echo #################################################

      goto LOCKPICKINGSTOWBOX

   LOCKPICKINGBOXISOPEN:

      setvariable BOXISOPEN 1
      
      goto LOCKPICKINGSTOWTOOLS%BOXISOPEN

   LOCKPICKINGSTOWTOOLS:

       goto LOCKPICKINGSTOWBOX
#      Match LOCKPICKINGSTOWTOOLS ...wait
#      Match LOCKPICKINGSTOWBOX What were you referring
#      Match LOCKPICKINGSTOWBOX You put your

#      put put lock in %LOCKPICKSTORAGECONTAINER

#      Matchwait

   LOCKPICKINGSTOWTOOLS1:

       goto LOCKPICKINGOPENBOX
#      Match LOCKPICKINGSTOWTOOLS1 ...wait
#      Match LOCKPICKINGOPENBOX What were you referring
#      Match LOCKPICKINGOPENBOX You put your

#      put put lock in %LOCKPICKSTORAGECONTAINER

#      Matchwait

   LOCKPICKINGOPENBOX:

      Match LOCKPICKINGOPENBOX ...wait
      Match LOCKPICKINGDISMANTLEBOX You open
      Match LOCKPICKINGSHIFTDOWN What were you referring to

      put open my %2

      Matchwait

   LOCKPICKINGDISMANTLEBOX:

      Match LOCKPICKINGDISMANTLEBOX ...wait
      Match LOCKPICKINGDISMANTLEBOX you'd like to dump the contents
      Match LOCKPICKINGSHIFTDOWN move your hands in a practiced maneuver
      Match LOCKPICKINGSHIFTDOWN casually study the
      Match LOCKPICKINGSHIFTDOWN Rolling your shoulders to loosen them

      put dismantle my %2 press

      Matchwait

   LOCKPICKINGSTOWBOX:

      Match LOCKPICKINGSTOWBOX ...wait
      Match LOCKPICKINGSHIFTDOWN What were you referring
      Match LOCKPICKINGSHIFTDOWN You put your

      put put my %2 in %LARGESTORAGECONTAINER

      Matchwait

   LOCKPICKINGSHIFTDOWN:

      shift

      goto NEXTFUNCTION

#end LOCKPICKING function
################################################################################
################################################################################
#begin POWERPERCEIVE function (This function used to be part of the main POWERPERCEIVE function and would be called 

provided the main one ran out of mana. It has been separated so it can be accessed by itself using the POWERPERCEIVE 

LABEL.)

POWERPERCEIVE:

   POWERPERCEIVECONCENTRATE:

      pause 2

      put conc all

      put %HUMTHISTUNE

      waitfor Roundtime

   POWERPERCEIVEKATAMBA:

      pause

      put perc katamba

      waitfor Roundtime

   POWERPERCEIVEXIBAR:

      pause

      put perc xibar

      waitfor Roundtime

   POWERPERCEIVEYAVASH:

      pause

      put perc yavash

      waitfor Roundtime

   POWERPERCEIVEMOON:

      pause

      put perc moon

      waitfor Roundtime

   POWERPERCEIVEMOONMANIP:

      pause 2

      put perc moonlight manip

      put %HUMTHISTUNE

      waitfor Roundtime

   POWERPERCEIVETRANSDUCTION:

      pause

      put perc transduction

      waitfor Roundtime

   POWERPERCEIVEPERCEPTIONBOOK:

      pause

      put perc perception

      waitfor Roundtime

   POWERPERCEIVEPSYCHPROJ:

      pause

      put perc psych project

      waitfor Roundtime

   POWERPERCEIVESTELLAR:

      pause

      put perc stellar

      waitfor Roundtime

   POWERPERCEIVEPLANET:

      pause

      put perc planet

      waitfor Roundtime

   POWERPERCEIVEWATCHERS:

      pause

      put perc watchers

      waitfor Roundtime

   POWERPERCEIVESELF:

      pause

      put perc self

      waitfor Roundtime

   POWERPERCEIVEAREA:

      pause

      put perc area

      waitfor Roundtime

      goto POWERPERCEIVECHECKEXP

   POWERPERCEIVECHECKEXP:

      Match POWERPERCEIVEENDFUNCTION mind lock
      Match POWERPERCEIVE EXP HELP

      put exp skill power perc

      Matchwait

   POWERPERCEIVEENDFUNCTION:

      goto NEXTFUNCTION
      exit

#end POWERPERCEIVE function
################################################################################
################################################################################
#begin MAGIC function

MAGIC:

   save MAGICSOD

   counter set 0

   MAGICSODGETTOOLS:

   MAGICEXPCHECK0:
   MAGICEXPCHECK1:
   MAGICEXPCHECK2:
   MAGICEXPCHECK3:
   MAGICEXPCHECK4:

   MAGICMANACHECK:

      Match MAGICSODSTOWTOOLS S>>>>>>>>|_
      Match MAGICSODSTOWTOOLS S>>>>>>>|_
      Match MAGICSODSTOWTOOLS S>>>>>>|_
      Match MAGICSODSTOWTOOLS S>>>>>|_
      Match MAGICSODSTOWTOOLS S>>>>|_
      Match MAGICSODSTOWTOOLS S>>>|_
      Match MAGICSODSTOWTOOLS S>>|_
      Match MAGICSODSTOWTOOLS S>|_
      Match MAGICSODSTOWTOOLS S|_
      Match MAGICSOD MANA HELP

      put mana

      Matchwait

   MAGICSOD:

      setvariable RETURNPOINTER MAGICSOD

      Match KILLHUMMING should stop playing before
      Match KILLSPELLPREP You are already preparing
      Match MAGICSOD ...wait
      Match MAGICSODSTOWTOOLS You have to strain
      Match MAGICSODCHARGEORB Seal of Deflection spell

      put prep SEAL OF DEFLECTION 5

      Matchwait

   MAGICSODCHARGEORB:

      Match MAGICSODCHARGEORB ...wait
      Match MAGICSODSTOWTOOLS cannot harness that much power
      Match MAGICSODFOCUSORB Roundtime

      put charge my %CAMBRINTHDEVICE 20

      Matchwait

   MAGICSODFOCUSORB:

      put focus my %CAMBRINTHDEVICE

      Match MAGICSODFOCUSORB ...wait
      Match MAGICSOINCREASECOUNTER forge a magical link to it
      Match MAGICSOINCREASECOUNTER is intact
      Matchwait

   MAGICSOINCREASECOUNTER:

      counter add 1
      goto MAGICSODCAST

   MAGICSODCAST:

      Match MAGICSODCAST ...wait
      Match MAGICEXPCHECK%c shifting plexus
      Match MAGICSODSTOWTOOLS backfires
      Match MAGICSODSTOWTOOLS You are unable to harness

      put cast

      Matchwait

   MAGICSODNOTOOLS:

      save MAGICSODNOTOOLS

      Match MAGICSODNOTOOLS ...wait
      Match MAGICENDFUNCTION You have to strain
      Match MAGICSODFULLPREP Seal of Deflection spell

      put prep SEAL OF DEFLECTION 20

      Matchwait

   MAGICSODFULLPREP:

      waitfor You feel fully prepared
      goto MAGICSODCAST

   MAGICEXPCHECK5:
   MAGICEXPMAGIC:

      counter set 0

      Match MAGICEXPHARNESS mind lock
      Match MAGICMANACHECK EXP HELP for more information

      put exp skill primary magic

      Matchwait

   MAGICEXPHARNESS:

      Match MAGICEXPMAGDEVICES mind lock
      Match MAGICMANACHECK EXP HELP for more information

      put exp skill harness

      Matchwait

   MAGICEXPMAGDEVICES:

      Match MAGICSODSTOWTOOLS mind lock
      Match MAGICMANACHECK EXP HELP for more information

      put exp skill magical devices

      Matchwait

   MAGICSODSTOWTOOLS:

      goto NEXTFUNCTION
      exit

#end MAGIC function
################################################################################
################################################################################
#begin ASTROLOGY function (this function will hum/study/observe/get a prism/align/predict/appraise)

ASTROLOGY:

   ASTROLOGYDECLAREVARIABLES:

      setvariable TEMPBODYCOUNTER 0
      setvariable TEMPSKILLCOUNTER 0
      setvariable TEMPOBSCOUNTER 0

      ASTROLOGYCOUNTERSTART:

         counter set 0

      ASTROLOGYCOUNTERINCREASE:

         counter set %TEMPBODYCOUNTER
         counter add 1
         goto ASTROLOGYBODY%c

      ASTROLOGYBODY1:

         setvariable ASTROLOGYBODY sun
         setvariable ASTROLOGYSKILL1 survival
         setvariable ASTROLOGYSKILL2 offense
         setvariable TEMPBODYCOUNTER %c
         counter set 1
         goto ASTROLOGYPG

      ASTROLOGYBODY2:

         setvariable ASTROLOGYBODY Magpie
         setvariable ASTROLOGYSKILL1 survival
         setvariable ASTROLOGYSKILL2 defense
         setvariable TEMPBODYCOUNTER %c
         counter set 1
         goto ASTROLOGYPG

      ASTROLOGYBODY3:

         setvariable ASTROLOGYBODY Spider
         setvariable ASTROLOGYSKILL1 offense
         setvariable ASTROLOGYSKILL2 magic
         setvariable TEMPBODYCOUNTER %c
         counter set 1
         goto ASTROLOGYPG

      ASTROLOGYBODY4:

         setvariable ASTROLOGYBODY Toad
         setvariable ASTROLOGYSKILL1 survival
         setvariable ASTROLOGYSKILL2 defense
         setvariable TEMPBODYCOUNTER %c
         counter set 1
         goto ASTROLOGYPG

   ASTROLOGYPG:

      Match ASTROLOGYPG ...wait
      Match ASTROLOGYPGCAST Roundtime
      Match ASTROLOGYEND2 You can't see the sky clearly enough

      put stop hum
      put prep pg 30
      put predict weather

      Matchwait

   ASTROLOGYPGCAST:

      Match ASTROLOGYPGCAST ...wait
      Match ASTROLOGYSTUDY The world around you

      put cast

      Matchwait

   ASTROLOGYSTUDY:

      Match ASTROLOGYSTUDY ...wait
      Match ASTROLOGYOBSERVE%c You manage to memorize the pattern of the sigil
      Match ASTROLOGYSTUDYFAIL but fail to find
      Match ASTROLOGYOBSERVE%c You are unable to comprehend the nature of the sigil
      Match ASTROLOGYOBSERVE%c Your head is still swimming from your last attempts at comprehending
      Match ASTROLOGYOBSERVE%c You've already memorized
      Match ASTROLOGYEND2 You should try that where you can see the sky
      Match ASTROLOGYEND2 That's a bit hard to do while inside

      put %HUMTHISTUNE
      put STUDY %ASTROLOGYBODY

      Matchwait

   ASTROLOGYSTUDYFAIL:

      goto ASTROLOGYCOUNTERINCREASE

   ASTROLOGYOBSERVE1:

      pause

      counter add 1
      setvariable TEMPOBSCOUNTER %c
      counter set 1
      setvariable ASTROLOGYPTR1 ASTROLOGYALIGN

      Match ASTROLOGYOBSERVE1 ...wait
      Match ASTROLOGYOBSERVE1 You see nothing regarding the future
      Match ASTROLOGYGETPRISM You learned something useful from your observation.
      Match ASTROLOGYGETPRISM quite what you were hoping for

      put OBSERVE %ASTROLOGYBODY

      Matchwait

   ASTROLOGYALIGN:
   ASTROLOGYALIGN1:
   ASTROLOGYALIGN2:
 
      pause

      Match ASTROLOGYALIGN ...wait
      Match ASTROLOGYTURNPRISM You focus internally and align yourself 

      put ALIGN %ASTROLOGYSKILL%c
      counter add 1

      Matchwait

   ASTROLOGYTURNPRISM:

      Match ASTROLOGYTURNPRISM ...wait
      Match ASTROLOGYRAISEPRISM You wind the chain around the prism.

      put TURN PRISM

      Matchwait

   ASTROLOGYRAISEPRISM:

      setvariable ASTROLOGYPTR1 ASTROLOGYALIGN

      Match ASTROLOGYRAISEPRISM ...wait
      Match ASTROLOGYALIGN%c You focus your sight on the prism as it spins
      Match ASTROLOGYALIGN%c It seems to lack focus and slows to a stop
      Match ASTROLOGYGETPRISM you lose your grip and drop it to the
      Match ASTROLOGYTURNPRISM That's not quite wound up enough yet

      put RAISE PRISM

      Matchwait

   ASTROLOGYALIGN3:
   ASTROLOGYANALYZE:

      pause

      counter set 1
      setvariable ASTROLOGYPTR1 ASTROLOGYAPPRAISE

      Match ASTROLOGYANALYZE ...wait
      Match ASTROLOGYSTOWPRISM Roundtime

      put PREDICT ANALYZE

      Matchwait

   ASTROLOGYAPPRAISE:

      Match ASTROLOGYAPPRAISE ...wait
      Match ASTROLOGYSTOWPOUCH Roundtime

      put get pouch from case in cloak
      put appraise my pouch quick

      Matchwait

   ASTROLOGYSTOWPOUCH:

      Match ASTROLOGYSTOWPOUCH ...wait
      Match ASTROLOGYWAIT You put your

      put put pouch in case in my cloak

      Matchwait

   ASTROLOGYOBSERVE2:

      counter subtract 2

   ASTROLOGYWAIT:

      Match ASTROLOGYWAIT ...wait
      Match EXPASTROLOGY %ASTROLOGYBODY fades.

      counter add 1

      put predict event
      put study sky

      Matchwait

   EXPASTROLOGY:

      Match ASTROLOGYEND mind lock
      Match ASTROLOGYPG EXP HELP for more information

      put exp skill astrology

      Matchwait

   ASTROLOGYGETPRISM:

      Match ASTROLOGYGETPRISM ...wait
      Match %ASTROLOGYPTR1 You get a
      Match %ASTROLOGYPTR1 You pick up a
      Match %ASTROLOGYPTR1 You are already holding that
      Match ASTROLOGYEND1 What were you referring to?

      put get prism

      Matchwait

   ASTROLOGYSTOWPRISM:

      Match ASTROLOGYSTOWPRISM ...wait
      Match %ASTROLOGYPTR1 You put your

      put put prism in my cloak

      Matchwait

   ASTROLOGYRESETCOUNTER:

      counter set 1
      goto %ASTROLOGYPTR2

   ASTROLOGYEND1:

      echo ######################
      echo # FIND A PRISM FIRST #
      echo # Function ending    #
      echo ######################

      goto ASTROLOGYEND

   ASTROLOGYEND2:

      echo #################################
      echo # GO OUTSIDE UNDER THE OPEN SKY #
      echo # Function ending               #
      echo #################################

      goto ASTROLOGYEND

   ASTROLOGYBODY5:
   ASTROLOGYEND:
      goto NEXTFUNCTION
      exit

#end ASTROLOGY function
################################################################################
################################################################################
#begin GLOBALWEAPONRESET function

GLOBALWEAPONRESET:

   Match %s at you
   Match %s melee
   Matchwait

#end GLOBALWEAPONRESET function
################################################################################
################################################################################
#begin KILLHUMMING function

   KILLHUMMING:

      put stop hum

      goto %RETURNPOINTER

#end KILLHUMMING function
################################################################################
################################################################################
#begin KILLSPELLPREP function

   KILLSPELLPREP:

      put release

      Match KILLSPELLPREP ...wait
      Match %RETURNPOINTER RELEASE HELP
      Matchwait

#end KILLSPELLPREP function
################################################################################
################################################################################

######################### SPELL PREPARATION FUNCTIONS ##########################

################################################################################
################################################################################
ANTIMAGIC:
BARRIERSPELLS:
BARRIER:

   BARRIERSPELL1:

   setvariable SPELLRETURNPOINTER BARRIERSPELL2
   goto GPSY

   BARRIERSPELL2:

   setvariable SPELLRETURNPOINTER BARRIERSPELL3
   goto GSOD

   BARRIERSPELL3:

   setvariable SPELLRETURNPOINTER NEXTFUNCTION
   goto GSHEAR

################################################################################
################################################################################
#cap is 69 mana TENEBROUS SENSE SPELL

GTENEBROUSSENSE:
GTS:

setvariable SPELLTOPREP TENEB SENSE
setvariable SPELLBASEMANA 29
setvariable SPELLMANAHARNESS 20
setvariable SPELLMANAINCREMENTS 2
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

GTENEBROUSSENSEAT:
GTSAT:

shift
setvariable SPELLTOPREP TENEB SENSE
setvariable SPELLBASEMANA 29
setvariable SPELLMANAHARNESS 20
setvariable SPELLMANAINCREMENTS 2
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 55 mana WHOLE DISPLACEMENT SPELL

GWHOLEDISPLACEMENT:
GWD:

setvariable SPELLTOPREP WHOLE DISPLACEMENT
setvariable SPELLBASEMANA 35
setvariable SPELLMANAHARNESS 20
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

GWHOLEDISPLACEMENTAT:
GWDAT:

shift
setvariable SPELLTOPREP WHOLE DISPLACEMENT
setvariable SPELLBASEMANA 35
setvariable SPELLMANAHARNESS 20
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 54 mana TELEKINETIC THROW SPELL

GTKTAT:

shift
setvariable SPELLTOPREP TKT
setvariable SPELLBASEMANA 34
setvariable SPELLMANAHARNESS 20
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 45 mana TELEKINETIC STORM SPELL

GTKS:
GTSK:

setvariable SPELLTOPREP TKS
setvariable SPELLBASEMANA 25
setvariable SPELLMANAHARNESS 20
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 60 mana SHEAR SPELL

GSHEAR:

setvariable SPELLTOPREP SHEAR
setvariable SPELLBASEMANA 30
setvariable SPELLMANAHARNESS 30
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 50 mana DARKNESS SPELL

GDARKNESS:
GDARK:

setvariable SPELLTOPREP DARKNESS
setvariable SPELLBASEMANA 25
setvariable SPELLMANAHARNESS 25
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 52 mana SHADOW WEB SPELL

GSHADOWWEB:
GWEB:

setvariable SPELLTOPREP SHADOW WEB
setvariable SPELLBASEMANA 22
setvariable SPELLMANAHARNESS 30
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP


################################################################################
################################################################################
#cap is 33 mana PARTIAL DISPLACEMENT SPELL

GPDAT:

shift
setvariable SPELLTOPREP PARTIAL DISPLAC
setvariable SPELLBASEMANA 15
setvariable SPELLMANAHARNESS 18
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 75 mana IMBUE SPELL

GIMBUEAT:

shift
setvariable SPELLTOPREP IMBUE
setvariable SPELLBASEMANA 25
setvariable SPELLMANAHARNESS 25
setvariable SPELLMANAINCREMENTS 2
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 48 mana DINAZEN OLKAR SPELL

GDOAT:

shift
setvariable SPELLTOPREP DINAZ OLKAR
setvariable SPELLBASEMANA 18
setvariable SPELLMANAHARNESS 30
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 36 mana CRYSTAL SPIKE SPELL

GCRSAT:

shift
setvariable SPELLTOPREP CRYSTAL SPIKE
setvariable SPELLBASEMANA 20
setvariable SPELLMANAHARNESS 16
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 50 mana CLARIFY GEM SPELL

GCGAT:

shift
setvariable SPELLTOPREP CLARIFY GEM
setvariable SPELLBASEMANA 20
setvariable SPELLMANAHARNESS 30
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 42 mana BURN SPELL

GBURNAT:

shift
setvariable SPELLTOPREP BURN
setvariable SPELLBASEMANA 12
setvariable SPELLMANAHARNESS 30
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 55 mana UNLEASH SPELL

GUNLEASHAT:

shift
setvariable SPELLTOPREP UNLEASH
setvariable SPELLBASEMANA 25
setvariable SPELLMANAHARNESS 30
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 55 mana PIERCING GAZE SPELL

GPIERCINGGAZE:
GPG:

setvariable SPELLTOPREP PIERCING GAZE
setvariable SPELLBASEMANA 15
setvariable SPELLMANAHARNESS 20
setvariable SPELLMANAINCREMENTS 2
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

GPIERCINGGAZEAT:
GPGAT:

shift
setvariable SPELLTOPREP PIERCING GAZE
setvariable SPELLBASEMANA 15
setvariable SPELLMANAHARNESS 20
setvariable SPELLMANAINCREMENTS 2
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 70 mana CLEAR VISION SPELL

GCLEARVISION:
GCV:

setvariable SPELLTOPREP CLEAR VISION
setvariable SPELLBASEMANA 20
setvariable SPELLMANAHARNESS 25
setvariable SPELLMANAINCREMENTS 2
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

GCLEARVISIONAT:
GCVAT:

shift
setvariable SPELLTOPREP CLEAR VISION
setvariable SPELLBASEMANA 20
setvariable SPELLMANAHARNESS 25
setvariable SPELLMANAINCREMENTS 2
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 60 mana AURA SIGHT SPELL

GAUS:

setvariable SPELLTOPREP AURA SIGHT
setvariable SPELLBASEMANA 20
setvariable SPELLMANAHARNESS 20
setvariable SPELLMANAINCREMENTS 2
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

GAUSAT:

shift
setvariable SPELLTOPREP AURA SIGHT
setvariable SPELLBASEMANA 20
setvariable SPELLMANAHARNESS 20
setvariable SPELLMANAINCREMENTS 2
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 73 mana SHADOWLING SPELL

GSHADOWLING:

setvariable SPELLTOPREP SHADOWLING
setvariable SPELLBASEMANA 23
setvariable SPELLMANAHARNESS 25
setvariable SPELLMANAINCREMENTS 2
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 54 mana SHADOW SERVANT SPELL

GSHADOWSERVANTPYRAMIDS:

setvariable SPELLRETURNPOINTER GSHADOWSERVANTGETPYRAMIDS

GSHADOWSERVANT:

setvariable SPELLTOPREP SHADOW SERVANT
setvariable SPELLBASEMANA 44
setvariable SPELLMANAHARNESS 10
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

   GSHADOWSERVANTGETPYRAMIDS:

      save NEXTFUNCTION

      Match GSHADOWSERVANTGETPYRAMIDS ...wait
      Match %s stares at you in confusion
      Match %s To whom are you speaking
      Match GSHADOWSERVANTDROPPYRAMIDS pyramid and hands it to you

      put ask servant for pyramid

      Matchwait

   GSHADOWSERVANTDROPPYRAMIDS:

      match GSHADOWSERVANTDROPPYRAMIDS ...wait
      match GSHADOWSERVANTGETPYRAMIDS You drop

      put drop pyramid

      Matchwait

   goto NEXTFUNCTION

################################################################################
################################################################################
#cap is 40 mana STARLIGHT SPHERE SPELL

GSLSAT:

shift
setvariable SPELLTOPREP STARLIGHT SPHERE
setvariable SPELLBASEMANA 20
setvariable SPELLMANAHARNESS 20
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 45 mana STRANGE ARROW SPELL

GSAAT:

shift
setvariable SPELLTOPREP STRANGE ARROW
setvariable SPELLBASEMANA 20
setvariable SPELLMANAHARNESS 25
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 66 mana PSYCHIC SHIELD SPELL

GPSY:

setvariable SPELLTOPREP PSYCH SHIELD 
setvariable SPELLBASEMANA 26
setvariable SPELLMANAHARNESS 20
setvariable SPELLMANAINCREMENTS 2
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

GPSYAT:

shift
setvariable SPELLTOPREP PSYCH SHIELD 
setvariable SPELLBASEMANA 26
setvariable SPELLMANAHARNESS 20
setvariable SPELLMANAINCREMENTS 2
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 50 mana SEAL OF DEFLECTION SPELL

GSOD:

setvariable SPELLTOPREP SEAL OF DEFLECT
setvariable SPELLBASEMANA 10
setvariable SPELLMANAHARNESS 20
setvariable SPELLMANAINCREMENTS 2
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 62 mana SEVER THREAD SPELL

GSEVERTHREADAT:
GSEVERAT:

setvariable SPELLTOPREP SEVER THREAD
setvariable SPELLBASEMANA 32
setvariable SPELLMANAHARNESS 30
setvariable SPELLMANAINCREMENTS 1
shift
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND PREDICT SEVER %GLOBALSPELLTARGET
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 50 mana LOCATE SPELL

GLOCATE:
GLOC:

setvariable SPELLTOPREP LOCATE
setvariable SPELLBASEMANA 20
setvariable SPELLMANAHARNESS 30
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

GLOCATEAT:
GLOCAT:

shift
setvariable SPELLTOPREP LOCATE
setvariable SPELLBASEMANA 20
setvariable SPELLMANAHARNESS 30
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 65 mana MENTAL BLAST SPELL

GMENTALBLASTAT:
GMBAT:

shift
setvariable SPELLTOPREP MENTAL BLAST
setvariable SPELLBASEMANA 35
setvariable SPELLMANAHARNESS 30
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 58 mana TEZIRAH'S VEIL SPELL

GTEZIRAHSVEILAT:
GTVAT:

shift
setvariable SPELLTOPREP TEZIRA VEIL
setvariable SPELLBASEMANA 28
setvariable SPELLMANAHARNESS 30
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 75 mana RIPPLE SPELL (cannot cap this spell at 770PM yet) current total
#mana with no leak is 55

GRIPPLE:
GRIP:

setvariable SPELLTOPREP RIPPLE
setvariable SPELLBASEMANA 25
setvariable SPELLMANAHARNESS 30
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 60 mana DAZZLE SPELL

GDAZZLE:
GDAZ:

setvariable SPELLTOPREP DAZZLE
setvariable SPELLBASEMANA 30
setvariable SPELLMANAHARNESS 30
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

GDAZZLEAT:
GDAZAT:

shift
setvariable SPELLTOPREP DAZZLE
setvariable SPELLBASEMANA 30
setvariable SPELLMANAHARNESS 30
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 60 mana SHADOWS SPELL

GSHADOWS:
GSHAD:

setvariable SPELLTOPREP SHADOWS
setvariable SPELLBASEMANA 30
setvariable SPELLMANAHARNESS 30
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

GSHADOWSAT:
GSHADAT:

shift
setvariable SPELLTOPREP SHADOWS
setvariable SPELLBASEMANA 30
setvariable SPELLMANAHARNESS 30
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 56 mana SEER'S SENSE SPELL

GSEERSSENSE:
GSEERS:
GSEER:

setvariable SPELLTOPREP SEER
setvariable SPELLBASEMANA 26
setvariable SPELLMANAHARNESS 30
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

GSEERSSENSEAT:
GSEERSAT:
GSEERAT:

shift
setvariable SPELLTOPREP SEER
setvariable SPELLBASEMANA 26
setvariable SPELLMANAHARNESS 30
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 120 mana FOCUS MOONBEAM SPELL

GFOCUSMOONBEAMAT:
GFMAT:

shift
setvariable SPELLTOPREP FOC MOON
setvariable SPELLBASEMANA 20
setvariable SPELLMANAHARNESS 20
setvariable SPELLMANAINCREMENTS 5
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 45 mana CONTINGENCY SPELL

GCONTINGENCYAT:

shift
setvariable SPELLTOPREP CONTINGENCY
setvariable SPELLBASEMANA 25
setvariable SPELLMANAHARNESS 20
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 43 mana CAGE OF LIGHT SPELL

GCAGEOFLIGHT:
GCOLAT:

shift
setvariable SPELLTOPREP CAGE OF LIGHT
setvariable SPELLBASEMANA 23
setvariable SPELLMANAHARNESS 20
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 60 mana DISTANT GAZE SPELL

GDISTANTGAZEAT:
GDGAT:

shift
setvariable SPELLTOPREP DISTANT GAZE
setvariable SPELLBASEMANA 10
setvariable SPELLMANAHARNESS 10
setvariable SPELLMANAINCREMENTS 1
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 71 mana EASE BURDEN SPELL

GEASE:

setvariable SPELLTOPREP EASE
setvariable SPELLBASEMANA 21
setvariable SPELLMANAHARNESS 25
setvariable SPELLMANAINCREMENTS 2
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND ENCUMB
goto GLOBALSPELLPREP

GEASEAT:

shift
setvariable SPELLTOPREP EASE
setvariable SPELLBASEMANA 21
setvariable SPELLMANAHARNESS 25
setvariable SPELLMANAINCREMENTS 2
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND 
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 65 mana SPHERE OF PROTECTION SPELL

GSOP:

setvariable SPELLTOPREP SPHERE OF PROTECT
setvariable SPELLBASEMANA 10
setvariable SPELLMANAHARNESS 25
setvariable SPELLMANAINCREMENTS 2
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND 
goto GLOBALSPELLPREP

GSOPAT:

shift
setvariable SPELLTOPREP SPHERE OF PROTECT
setvariable SPELLBASEMANA 10
setvariable SPELLMANAHARNESS 25
setvariable SPELLMANAINCREMENTS 2
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND 
goto GLOBALSPELLPREP

################################################################################
################################################################################
#cap is 66 mana ETHEREAL SHIELD SPELL

GES:

setvariable SPELLTOPREP ETHEREAL SHIELD
setvariable SPELLBASEMANA 26
setvariable SPELLMANAHARNESS 20
setvariable SPELLMANAINCREMENTS 2
setvariable GLOBALSPELLTARGET
setvariable SPELLADDITIONALCOMMAND 
goto GLOBALSPELLPREP

GESAT:

shift
setvariable SPELLTOPREP ETHEREAL SHIELD
setvariable SPELLBASEMANA 26
setvariable SPELLMANAHARNESS 20
setvariable SPELLMANAINCREMENTS 2
setvariable GLOBALSPELLTARGET %1
setvariable SPELLADDITIONALCOMMAND 
goto GLOBALSPELLPREP

################################################################################
################################################################################
#begin GLOBAL SPELLCASTING FUNCTION

GLOBALSPELLPREP:

   setvariable RETURNPOINTER GSPELLPREP
   counter set %SPELLMANAINCREMENTS

   GSPELLPREP:

      Match GSPELLPREP ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GSPELLPREPFULLPREP %SPELLPREPMESSAGE

      put prep %SPELLTOPREP %SPELLBASEMANA

      Matchwait

   GSPELLPREPFULLPREP:

      waitfor You feel fully prepared
      goto GSPELLPREPMANACHECK

   GSPELLPREPMANACHECK:

      Match %SPELLRETURNPOINTER S>>>>>>>|_
      Match %SPELLRETURNPOINTER S>>>>>>|_
      Match %SPELLRETURNPOINTER S>>>>>|_
      Match %SPELLRETURNPOINTER S>>>>|_
      Match %SPELLRETURNPOINTER S>>>|_
      Match %SPELLRETURNPOINTER S>>|_
      Match %SPELLRETURNPOINTER S>|_
      Match %SPELLRETURNPOINTER S|_
      Match GSPELLPREPHARNESS%c MANA HELP

      put mana

      Matchwait

   GSPELLPREPHARNESS10:
   GSPELLPREPHARNESS9:
   GSPELLPREPHARNESS8:
   GSPELLPREPHARNESS7:
   GSPELLPREPHARNESS6:
   GSPELLPREPHARNESS5:
   GSPELLPREPHARNESS4:
   GSPELLPREPHARNESS3:
   GSPELLPREPHARNESS2:
   GSPELLPREPHARNESS1:

      put harness %SPELLMANAHARNESS

      Match GSPELLPREPHARNESS%c ...wait
      Match GSPELLPREPUPDATECOUNTER You tap into the mana from
      Match KILLSPELLPREP You strain, but cannot harness
      Matchwait

   GSPELLPREPUPDATECOUNTER:

      counter subtract 1

      goto GSPELLPREPMANACHECK

   GSPELLPREPHARNESS0:

   GSPELLPREPSPELLCAST:

      Match GSPELLPREPSPELLCAST ...wait
      Match GSPELLPREPFINISH You gesture

      put cast %GLOBALSPELLTARGET

      Matchwait

   GSPELLPREPFINISH:

      put %SPELLADDITIONALCOMMAND
      goto %SPELLRETURNPOINTER

#end GLOBAL SPELLPREP FUNCTION
################################################################################
################################################################################

#############################INFORMATIONAL SCRIPTS##############################

################################################################################
################################################################################

TIMERS:

echo ###########################################################################
echo
echo This is a list of confirmed timers:
echo HUNT - 75s
echo STUDY SKY - 20s
echo STUDY CELESTIAL BODY - 120s
echo OBSERVE CELESTIAL BODY - 120s-240s
echo PREDICT ANALYZE - 90s
echo HIDE (in front of the same critters) - 45s
echo FLEE 2-5 mins
echo
echo ########################################################################### 
exit

################################################################################
################################################################################

#################################TRAVEL SCRIPTS#################################

################################################################################
################################################################################

TRAVEL:

   setvariable STARTINGLOCATION none
   counter set 0

   Match CROSSINGLOCATION [Strand Communal Center, Common Room]
   Match CROSSINGLOCATIONADJUST [Communal Center, Veranda]
   Match AESRYLOCATION [Tona Kertigen, Bank Vault]
   Match AESRYLOCATIONADJUST [Aesry Surlaenis'a, Staho Pivo'hrr'schu'Mus]
   Match SHARDLOCATION [Lady Atladene's Salon, Entryway]
   Match SHARDLOCATIONADJUST [First Bank of Ilithi, Exchange Vault]
   Match MERKRESHLOCATION [Alydendael, Front Gardens]
   Match MERKRESHLOCATIONADJUST [Wharf End, Mer'Kresh]
   Match RIVERHAVENLOCATION [Armiger's Mansion, Foyer]
   Match RIVERHAVENLOCATIONADJUST [Riverhaven, Tree-shaded Lane]
   Match RATHALOCATION [Sshoi-sson Palace, Provincial Bank Foyer]
   Match RATHALOCATIONADJUST [Sshoi-sson Palace, Portico]
   Match ELBAINSLOCATION [Beech Glade, Trail]
   Match ELBAINSLOCATIONADJUST [Outside the Circle, The Ironwoods]
   Match MUSPARILOCATION [Velakan Trade Road]
   Match MUSPARILOCATIONADJUST [Old Lata'arna Keep, Exchange Vault]
   Match HIBLOCATION [The Stony Hub, Entryway]
   Match HIBLOCATIONADJUST [Inner Hibarnhvidar, Tower Base]

   put look

   Matchwait

   CROSSINGLOCATION:

      setvariable STARTINGLOCATION CROSSING
      counter set 1
      goto SELECTLOCATION

   CROSSINGLOCATIONADJUST:

      move go door
      goto TRAVEL

   AESRYLOCATION:

      setvariable STARTINGLOCATION AESRY
      counter set 2
      goto SELECTLOCATION

   AESRYLOCATIONADJUST:

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      goto TRAVEL

   SHARDLOCATION:

      setvariable STARTINGLOCATION SHARD
      counter set 3
      goto SELECTLOCATION

   SHARDLOCATIONADJUST:

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      goto TRAVEL

   MERKRESHLOCATION:

      setvariable STARTINGLOCATION MER'KRESH
      counter set 4
      goto SELECTLOCATION

   MERKRESHLOCATIONADJUST:

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      goto TRAVEL

   RIVERHAVENLOCATION:

      setvariable STARTINGLOCATION RIVERHAVEN
      counter set 5
      goto SELECTLOCATION

   RIVERHAVENLOCATIONADJUST:

      move go gate
      move se
      move climb stair
      move go door
      goto TRAVEL

   RATHALOCATION:

      setvariable STARTINGLOCATION RATHA
      counter set 6
      goto SELECTLOCATION

   RATHALOCATIONADJUST:

      move go door
      move e
      goto TRAVEL

   ELBAINSLOCATION:

      setvariable STARTINGLOCATION ELBAIN'S
      counter set 7
      goto SELECTLOCATION

   ELBAINSLOCATIONADJUST:

      move go tree
      move s
      move s
      goto TRAVEL

   MUSPARILOCATION:

      setvariable STARTINGLOCATION MUSPAR'I
      counter set 8
      goto SELECTLOCATION

   MUSPARILOCATIONADJUST:

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      goto TRAVEL

   HIBLOCATION:

      setvariable STARTINGLOCATION HIBARNHVIDAR
      counter set 9
      goto SELECTLOCATION

   HIBLOCATIONADJUST:

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      goto TRAVEL

   SELECTLOCATION:

      pause
      ECHO ######################################################################
      ECHO ################You are currently in %STARTINGLOCATION###############
      ECHO ######################################################################

      ECHO ############################################################
      ECHO Please select your destination from the following:
      ECHO 1.CROSSING
      ECHO 2.AESRY
      ECHO 3.SHARD
      ECHO 4.MERKRESH
      ECHO 5.RIVERHAVEN
      ECHO 6.RATHA
      ECHO 7.ELBAINS
      ECHO 8.MUSPARI
      ECHO 9.HIBARN
      ECHO Type out the location without the number in CAPS! (ie HIBARN)
      ECHO #############################################################

      Match %cCROSSING CROSSING
      Match %cAESRY AESRY
      Match %cSHARD SHARD
      Match %cMERKRESH MERKRESH
      Match %cRIVERHAVEN RIVERHAVEN
      Match %cRATHA RATHA
      Match %cELBAINS ELBAINS
      Match %cMUSPARI MUSPARI
      Match %cHIBARN HIBARN

      Matchwait     

   1CROSSING:

      ECHO #####################
      ECHO #Already in CROSSING#
      ECHO #####################
      exit

   1AESRY:

      move go portal
      exit

   1SHARD:

      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal
      exit

   1MERKRESH:

      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port
      exit

   1RIVERHAVEN:

      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal
      exit

   1RATHA:

      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal
      exit

   1ELBAINS:

      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal
      exit

   1MUSPARI:

      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal
      exit

   1HIBARN:

      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal
      exit

   2CROSSING:

      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal
      exit

   2AESRY:

      ECHO #####################
      ECHO ###Already in AESRY##
      ECHO #####################
      exit

   2SHARD:

      move go portal
      exit

   2MERKRESH:

      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port
      exit

   2RIVERHAVEN:

      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal
      exit

   2RATHA:

      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal
      exit

   2ELBAINS:

      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal
      exit

   2MUSPARI:

      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal
      exit

   2HIBARN:

      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal
      exit

   3CROSSING:

      move go portal

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal
      exit

   3AESRY:

      move go portal

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal
      exit

   3SHARD:

      ECHO #####################
      ECHO ###Already in SHARD##
      ECHO #####################
      exit

   3MERKRESH:

      move go portal
      exit

   3RIVERHAVEN:

      move go portal

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal
      exit

   3RATHA:

      move go portal

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal
      exit

   3ELBAINS:

      move go portal

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal
      exit

   3MUSPARI:

      move go portal

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal
      exit

   3HIBARN:

      move go portal

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal
      exit

   4CROSSING:

      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal
      exit

   4AESRY:

      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal
      exit

   4SHARD:

      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal
      exit

   4MERKRESH:

      ECHO #######################
      ECHO ##Already in MERKRESH##
      ECHO #######################
      exit

   4RIVERHAVEN:

      move go portal
      exit

   4RATHA:

      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal
      exit

   4ELBAINS:

      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal
      exit

   4MUSPARI:

      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal
      exit

   4HIBARN:

      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal
      exit

   5CROSSING:

      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal
      exit

   5AESRY:

      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal
      exit

   5SHARD:

      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal
      exit

   5MERKRESH:

      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port
      exit

   5RIVERHAVEN:

      ECHO ###########################
      ECHO ###Already in RIVERHAVEN###
      ECHO ###########################
      exit

   5RATHA:

      move go portal
      exit

   5ELBAINS:

      move go portal

      move go door
      move e
      move go portal
      exit

   5MUSPARI:

      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal
      exit

   5HIBARN:

      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal
      exit

   6CROSSING:

      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal
      exit

   6AESRY:

      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal
      exit

   6SHARD:

      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal
      exit

   6MERKRESH:

      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port
      exit

   6RIVERHAVEN:

      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal
      exit

   6RATHA:

      ECHO #####################
      ECHO ###Already in RATHA##
      ECHO #####################
      exit

   6ELBAINS:

      move go portal
      exit

   6MUSPARI:

      move go portal

      move go tree
      move s
      move s
      move go portal
      exit

   6HIBARN:

      move go portal

      move go tree
      move s
      move s
      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal
      exit

   7CROSSING:

      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal
      exit

   7AESRY:

      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal
      exit

   7SHARD:

      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal
      exit

   7MERKRESH:

      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal
      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port
      exit

   7RIVERHAVEN:

      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal
      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal
      exit

   7RATHA:

      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal
      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal
      exit

   7ELBAINS:

      ECHO ########################
      ECHO ###Already in ELBAINS###
      ECHO ########################
      exit

   7MUSPARI:

      move go portal
      exit

   7HIBARN:

      move go portal

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal
      exit

   8CROSSING:

      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal
      exit

   8AESRY:

      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal
      exit

   8SHARD:

      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal
      exit

   8MERKRESH:

      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port
      exit

   8RIVERHAVEN:

      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal
      exit

   8RATHA:

      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal
      exit

   8ELBAINS:

      move go portal

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal
      exit

   8MUSPARI:

      ECHO ########################
      ECHO ###Already in MUSPARI###
      ECHO ########################
      exit

   8HIBARN:

      move go portal
      exit

   9CROSSING:

      move go portal
      exit

   9AESRY:

      move go portal

      move go door
      move go portal
      exit

   9SHARD:

      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal
      exit

   9MERKRESH:

      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port
      exit

   9RIVERHAVEN:

      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal
      exit

   9RATHA:

      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal
      exit

   9ELBAINS:

      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal
      exit

   9MUSPARI:

      move go portal

      move go door
      move go portal

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

      move go gate
      move se
      move climb stair
      move go door
      move go portal

      move go door
      move e
      move go portal

      move go tree
      move s
      move s
      move go portal
      exit

   9HIBARN:

      ECHO ####################
      ECHO ###Already in HIB###
      ECHO ####################
      exit

##################################################################################

      ECHO #########################################################
      ECHO Please select your destination from the following:
      ECHO CROSSING
      ECHO AESRY
      ECHO SHARD
      ECHO MERKRESH
      ECHO RIVERHAVEN
      ECHO RATHA
      ECHO ELBAINS
      ECHO MUSPARI
      ECHO HIBARN
      ECHO Simply say outloud where you wish to go (ie say SHARD) and 
      ECHO capitalize the location!
      ECHO ##########################################################

      ECHO #####################
      ECHO ###Already in ###
      ECHO #####################
      exit

#(crossing arrival)

      move go door
      move go portal

#(crossing departure)
#(aesry arrival)

      move n
      move e
      move go gate
      move go door
      move n
      move w
      move go vault
      move go portal

#(aesry departure)
#(shard arrival)

      move out
      move w
      move out
      move e
      move go brid
      move e
      move e
      move e
      move n
      move ne
      move e
      move n
      move go home
      move go port

#(shard departure)
#(merkeresh arrival)

      move nw
      move nw
      move ne
      move ne
      move n
      move n
      move n
      move n
      move go gate
      move go portal

#(merkeresh departure)
#(riverhaven arrival)

      move go gate
      move se
      move climb stair
      move go door
      move go portal

#(riverhaven departure)
#(ratha arrival)

      move go door
      move e
      move go portal

#(ratha departure)
#(elbains arrival)

      move go tree
      move s
      move s
      move go portal

#(ebains departure)
#(muspari arrival)

      move w
      move n
      move climb stair
      move s
      move climb stair
      move se
      move sw
      move climb stair
      move go gate
      move se
      move se
      move se
      move se
      move go gate
      move w
      move go portal

#(muspari departure)
#(hibarn arrival)

      move climb stair
      move nw
      move ne
      move ne
      move se
      move climb stair
      move se
      move s
      move go recess
      move sw
      move nw
      move nw
      move n
      move ne
      move ne
      move go door
      move climb stair
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move s
      move e
      move go entryway
      move go portal

#(hibarn departure)
#(crossing arrival)

      exit
################################################################################
################################################################################

################################UTILITY SCRIPTS#################################

################################################################################
################################################################################
#begin RPA function

RPA:

shift

if_1 put rpa bestow %1 1
if_2 put rpa bestow %2 1
if_3 put rpa bestow %3 1
if_4 put rpa bestow %4 1
if_5 pause 1
if_5 put rpa bestow %5 1
if_6 put rpa bestow %6 1
if_7 put rpa bestow %7 1
if_8 pause 1
if_8 put rpa bestow %8 1
if_9 put rpa bestow %9 1

exit

#end RPA function
################################################################################
################################################################################
#begin CLARIFYGEMS function

CLARIFYGEMS:

   SETVARIABLE GEMLOCATION red pouch in haversack
   SETVARIABLE GEMSTORAGE
   SETVARIABLE GEMTYPE

   CLARIFYGEMSCASTAUS:

      setvariable SPELLRETURNPOINTER CLARIFYGEMSCASTPG

      goto GAUS

   CLARIFYGEMSCASTPG:

      setvariable SPELLRETURNPOINTER CLARIFYGEMSIDGEM

      goto GPG

CLARIFYGEMSNOSPELLS:
   CLARIFYGEMSIDGEM:

      Match SAVERUBY ruby
      Match SAVEBLOODSTONE bloodstone
      Match SAVEQUARTZ quartz
      Match SAVEJADE jade
      Match SAVEGARNET garnet
      Match SAVEMORGANITE morganite
      Match SAVETANZANITE tanzanite
      Match SAVECARNELIAN carnelian
      Match SAVECORAL coral
      Match SAVEAQUAMARINE aquamarine
      Match SAVEMOONSTONE moonstone
      Match SAVESUNSTONE sunstone
      Match SAVEONYX onyx
      Match SAVEKUNZITE kunzite
      Match SAVEAGATE agate
      Match SAVETSAVORITE tsavorite
      Match SAVEHEMATITE hematite
      Match SAVECITRINE citrine
      Match SAVESAPPHIRE sapphire
      Match SAVEZIRCON zircon
      Match SAVETOPAZ topaz
      Match SAVESPINEL spinel
      Match SAVECRYSTAL crystal
      Match SAVELAZULI lazuli
      Match SAVEPEARL pearl
      Match SAVEANDALUSITE andalusite
      Match SAVEPERIDOT peridot
      Match SAVECHALCEDONY chalcedony
      Match SAVETOURMALINE tourmaline
      Match SAVEDIOPSIDE diopside
      Match SAVECHRYSOPRASE chrysoprase
      Match SAVECHRYSOBERYL chrysoberyl
      Match SAVEBERYL beryl
      Match SAVEAMBER amber
      Match SAVEIOLITE iolite
      Match SAVETURQUOISE turquoise
      Match SAVEAMETHYST amethyst
      Match SAVEALEXANDRITE alexandrite
      Match SAVEEMERALD emerald
      Match SAVESTARSTONE star-stone
      Match NEXTFUNCTION There is nothing in there.

      put look in %GEMLOCATION

      Matchwait

   SAVESTARSTONE:

      setvariable GEMTYPE star
      goto CLARIFYGEMSGETGEM

   SAVEEMERALD:

      setvariable GEMTYPE emerald
      goto CLARIFYGEMSGETGEM

   SAVEALEXANDRITE:

      setvariable GEMTYPE alexandrite
      goto CLARIFYGEMSGETGEM

   SAVEAMETHYST:

      setvariable GEMTYPE amethyst
      goto CLARIFYGEMSGETGEM

   SAVECHRYSOBERYL:

      setvariable GEMTYPE chrysoberyl
      goto CLARIFYGEMSGETGEM


   SAVETURQUOISE:

      setvariable GEMTYPE turquoise
      goto CLARIFYGEMSGETGEM

   SAVEIOLITE:

      setvariable GEMTYPE iolite
      goto CLARIFYGEMSGETGEM

   SAVEAMBER:

      setvariable GEMTYPE amber
      goto CLARIFYGEMSGETGEM

   SAVEBERYL:

      setvariable GEMTYPE beryl
      goto CLARIFYGEMSGETGEM

   SAVECHRYSOPRASE:

      setvariable GEMTYPE chrysoprase
      goto CLARIFYGEMSGETGEM

   SAVEDIOPSIDE:

      setvariable GEMTYPE diopside
      goto CLARIFYGEMSGETGEM

   SAVETOURMALINE:

      setvariable GEMTYPE tourmaline
      goto CLARIFYGEMSGETGEM

   SAVECHALCEDONY:

      setvariable GEMTYPE chalcedony
      goto CLARIFYGEMSGETGEM

   SAVEPERIDOT:

      setvariable GEMTYPE peridot
      goto CLARIFYGEMSGETGEM

   SAVEANDALUSITE:

      setvariable GEMTYPE andalusite
      goto CLARIFYGEMSGETGEM

   SAVEPEARL:

      setvariable GEMTYPE pearl
      goto CLARIFYGEMSGETGEM

   SAVELAZULI:

      setvariable GEMTYPE lazuli
      goto CLARIFYGEMSGETGEM

   SAVECRYSTAL:

      setvariable GEMTYPE crystal
      goto CLARIFYGEMSGETGEM

   SAVESPINEL:

      setvariable GEMTYPE spinel
      goto CLARIFYGEMSGETGEM

   SAVETOPAZ:

      setvariable GEMTYPE topaz
      goto CLARIFYGEMSGETGEM

   SAVEZIRCON:

      setvariable GEMTYPE zircon
      goto CLARIFYGEMSGETGEM

   SAVESAPPHIRE:

      setvariable GEMTYPE sapphire
      goto CLARIFYGEMSGETGEM

   SAVECITRINE:

      setvariable GEMTYPE citrine
      goto CLARIFYGEMSGETGEM

   SAVEHEMATITE:

      setvariable GEMTYPE hematite
      goto CLARIFYGEMSGETGEM

   SAVETSAVORITE:

      setvariable GEMTYPE tsavorite
      goto CLARIFYGEMSGETGEM

   SAVEAGATE:

      setvariable GEMTYPE agate
      goto CLARIFYGEMSGETGEM

   SAVEKUNZITE:

      setvariable GEMTYPE kunzite
      goto CLARIFYGEMSGETGEM

   SAVEONYX:

      setvariable GEMTYPE onyx
      goto CLARIFYGEMSGETGEM

   SAVESUNSTONE:

      setvariable GEMTYPE sunstone
      goto CLARIFYGEMSGETGEM

   SAVEMOONSTONE:

      setvariable GEMTYPE moonstone
      goto CLARIFYGEMSGETGEM

   SAVEAQUAMARINE:

      setvariable GEMTYPE aquamarine
      goto CLARIFYGEMSGETGEM

   SAVECORAL:

      setvariable GEMTYPE coral
      goto CLARIFYGEMSGETGEM

   SAVECARNELIAN:

      setvariable GEMTYPE carnelian
      goto CLARIFYGEMSGETGEM

   SAVETANZANITE:

      setvariable GEMTYPE tanzanite
      goto CLARIFYGEMSGETGEM

   SAVEMORGANITE:

      setvariable GEMTYPE morganite
      goto CLARIFYGEMSGETGEM

   SAVEGARNET:

      setvariable GEMTYPE garnet
      goto CLARIFYGEMSGETGEM

   SAVEJADE:

      setvariable GEMTYPE jade
      goto CLARIFYGEMSGETGEM

   SAVEQUARTZ:

      setvariable GEMTYPE quartz
      goto CLARIFYGEMSGETGEM

   SAVEBLOODSTONE:

      setvariable GEMTYPE bloodstone
      goto CLARIFYGEMSGETGEM

   SAVERUBY:

      setvariable GEMTYPE ruby
      goto CLARIFYGEMSGETGEM

   CLARIFYGEMSGETGEM:

      Match CLARIFYGEMSGETGEM ...wait
      Match CLARIFYGEMSSORTSIZEHUGE large
      Match CLARIFYGEMSSORTSIZEHUGE huge
      Match CLARIFYGEMSSORTSIZENORMAL medium
      Match CLARIFYGEMSSORTSIZENORMAL small
      Match CLARIFYGEMSSORTSIZENORMAL tiny
      Match CLARIFYGEMSIDGEM What were you referring to?
      Match CLARIFYGEMSNOHANDS You need a free hand to pick that up.

      put get %GEMTYPE from %GEMLOCATION

      Matchwait

   CLARIFYGEMSSORTSIZEHUGE:

      setvariable GEMSTORAGE purple pouch in haversack
      goto CLARIFYGEMSPREPCG

   CLARIFYGEMSSORTSIZENORMAL:

      setvariable GEMSTORAGE black pouch in haversack
      goto CLARIFYGEMSPREPCG

   CLARIFYGEMSPREPCG:

      setvariable RETURNPOINTER CLARIFYGEMSHARNESSMANA1

      Match CLARIFYGEMSPREPCG ...wait
      Match CLARIFYGEMSWAITTOCAST %SPELLPREPMESSAGE

      put prep clarify gem 10

      Matchwait

   CLARIFYGEMSWAITTOCAST:

      pause 15

   CLARIFYGEMSCHECKMANA:

      Match CLARIFYGEMSOUTOFMANA S>>>>>>>>|_
      Match CLARIFYGEMSOUTOFMANA S>>>>>>>|_
      Match CLARIFYGEMSOUTOFMANA S>>>>>>|_
      Match CLARIFYGEMSOUTOFMANA S>>>>>|_
      Match CLARIFYGEMSOUTOFMANA S>>>>|_
      Match CLARIFYGEMSOUTOFMANA S>>>|_
      Match CLARIFYGEMSOUTOFMANA S>>|_
      Match CLARIFYGEMSOUTOFMANA S>|_
      Match CLARIFYGEMSOUTOFMANA S|_
      Match %RETURNPOINTER MANA HELP

      put mana

      Matchwait

   CLARIFYGEMSHARNESSMANA1:

      setvariable RETURNPOINTER CLARIFYGEMSHARNESSMANA2

      Match CLARIFYGEMSHARNESSMANA1 ...wait
      Match CLARIFYGEMSCHECKMANA You tap into the mana from twenty
      Match CLARIFYGEMSOUTOFMANA You are unable to harnesss

      put harn 20

      Matchwait

   CLARIFYGEMSHARNESSMANA2:

      setvariable RETURNPOINTER NEXTFUNCTION

      Match CLARIFYGEMSHARNESSMANA2 ...wait
      Match CLARIFYGEMSCASTCG You tap into the mana from twenty
      Match CLARIFYGEMSOUTOFMANA You are unable to harnesss

      put harn 20

      Matchwait

   CLARIFYGEMSCASTCG:

      Match CLARIFYGEMSCASTCG ...wait
      Match CLARIFYGEMSIDGEM I could not find what you were referring to.
      Match CLARIFYGEMSSTOREGEM 4 seconds.
      Match CLARIFYGEMSSTOREGEM gleams with new luster.
      Match CLARIFYGEMSNOMOONS You need a visible moon for this.
      Match CLARIFYGEMSCASTPG 6 seconds.
      Match CLARIFYGEMSCASTPG Without insight of the
      Match CLARIFYGEMSGETGEM shatters!

      put cast my %GEMTYPE

      Matchwait

   CLARIFYGEMSSTOREGEM:

      Match CLARIFYGEMSSTOREGEM ...wait
      Match CLARIFYGEMSUNKNOWNERROR What were you referring to?
      Match CLARIFYGEMSGETGEM You put your
      Match CLARIFYGEMSGETGEM You open your

      put put my %GEMTYPE in %GEMSTORAGE

      Matchwait

   CLARIFYGEMSNOHANDS:

      echo ===================================
      echo ==Both hands full! Abrupt ending.==
      echo ===================================

      exit

   CLARIFYGEMSOUTOFMANA:

      echo ===================================
      echo ==You are out of MANA.           ==
      echo ===================================

      exit

   CLARIFYGEMSNOMOONS:

      Match CLARIFYGEMSNOMOONS ...wait
      Match CLARIFYGEMSNOMOONSMSG You put your

      put put my %GEMTYPE in %GEMLOCATION

      Matchwait

      CLARIFYGEMSNOMOONSMSG:

         echo =======================================================
         echo ==No moons available, try again later. Abrupt ending ==
         echo =======================================================

         exit

   CLARIFYGEMSUNKNOWNERROR:

      echo =======================================================
      echo ==Either the gem shattered and the script did not see==
      echo ==it, or your storage location is not valid.         ==
      echo ==Abrupt ending.                                     ==
      echo =======================================================

      exit

#end CLARIFYGEMS function
################################################################################
################################################################################
#begin MAKEROPE function

MAKEROPE:

   counter set %2

   MAKEROPE1:
   MAKEROPE2:
   MAKEROPE3:
   MAKEROPE4:
   MAKEROPE5:

      MAKEROPEFORAGEGRASS:

         put forage grass

         Match MAKEROPEFORAGEGRASS ...wait
         Match MAKEROPEBRAIDGRASS find some grass
         Match MAKEROPEFORAGEGRASS Roundtime
         Matchwait

      MAKEROPEBRAIDGRASS:

         put braid my grass

         Match MAKEROPEBRAIDGRASS ...wait
         Match MAKEROPEPULLGRASS bundling rope
         Match MAKEROPEBRAIDGRASS Roundtime
         Matchwait

      MAKEROPEPULLGRASS:

         put pull my grass

         Match MAKEROPEPULLGRASS ...wait
         Match MAKEROPEPULLGRASS Roundtime
         Match MAKEROPESTOREROPE new bundling rope
         Matchwait

      MAKEROPESTOREROPE:

         put put my rope in my %LARGESTORAGECONTAINER

         counter subtract 1

         goto MAKEROPE%c

   MAKEROPE0:

      goto NEXTFUNCTION

#end MAKEROPE function
################################################################################
################################################################################
#begin HERB listing function

HERB:
HERBS:

   echo BODY PART===|=============EXTERNAL===========================INTERNAL
   echo
   echo Head========|=nemoih (root/pulp/powder/potion)===|===eghmok (moss/potion)
   echo Neck========|=georin (grass/pulp/salve)==========|===riolur (leaf/pulp/powder/tea)
   echo Limbs=======|=jadice (flower/pulp/powder/potion)=|===yelith (root/pulp/powder/potion)
   echo Chest=======|=plovik (leaf/pulp/tea)=============|===ithor potion
   echo Abdomen=====|=nilos (grass/salve)================|===muljin (sap/paste)
   echo Back========|=hulnik (grass/pulp/powder/potion)==|===blocil (berries/pulp/powder/potion)
   echo =================================================|===junliar (stem/solution)
   echo Eyes========|=sufil (sap/paste/mash)=============|===aevaes solution
   echo Skin/Nerves=|=aloe (leaf/crushed aloe/balm)======|===lujeakave elixir
   echo
   echo BODY PART===|=============EXTERNAL SCARS=====================INTERNAL SCARS
   echo 
   echo Head/Eye====|=qun (pollen/?)=====================|===hulij elixir
   echo Body========|=genich (stem/?)====================|===potion
   echo Limbs=======|=jadice (pollen/paste/potion)=======|===nuloe (stem/?)
   echo All=========|=cebi (root/pulp/powder/?)==========|===hisan salve

   HERBEND:

      goto NEXTFUNCTION

################################################################################
################################################################################
#begin NEXTFUNCTION

NEXTFUNCTION:

   shift
   goto %1