Training (script)

From Elanthipedia
Revision as of 09:48, 9 November 2009 by DAMIAN (talk | contribs)
Jump to navigation Jump to search

#Mind States are as follows
#clear  0/34  
#dabbling  1/34  
#perusing  2/34  
#learning  3/34  
#thoughtful  4/34  
#thinking  5/34  
#considering  6/34  
#pondering  7/34  
#ruminating  8/34  
#concentrating  9/34  
#attentive  10/34  
#deliberative  11/34  
#interested  12/34  
#examining  13/34  
#understanding  14/34  
#absorbing  15/34  
#intrigued  16/34  
#scrutinizing  17/34  
#analyzing  18/34  
#studious  19/34  
#focused  20/34  
#very focused  21/34  
#engaged  22/34  
#very engaged  23/34  
#cogitating  24/34  
#fascinated  25/34  
#captivated  26/34  
#engrossed  27/34  
#riveted  28/34  
#very riveted  29/34  
#rapt  30/34  
#very rapt  31/34  
#enthralled  32/34  
#nearly locked  33/34  
#mind lock  34/34  


######################################################################################
#############################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 BOLERO QUIET
setvariable CAMBRINTHDEVICE NESTLED ARMBAND
setvariable GLOBALSPELLTARGET
setvariable TIMETOFULLPREP 20
setvariable GLOBALMOON 
setvariable FORAGEFORITEM REDWOOD LIMB

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

if_1 save NEXTFUNCTION
if_1 goto %1%

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

   START:

      echo 

===============================================================================================================================
      put SORT AUTO HEAD
      waitfor >
      echo 

===============================================================================================================================
      put RESYNC
      waitfor >
      put INVFIX
      waitfor >
      put AWAKE
      waitfor >

      echo 

===============================================================================================================================
      put INV CHECK
      waitfor >
      echo 

===============================================================================================================================
      put EXP ALL
      waitfor >
      echo 

===============================================================================================================================
      put HEAL
      waitfor >
      echo 

===============================================================================================================================
      put STAT FULL
      waitfor >
      echo 

===============================================================================================================================
      put INFO
      waitfor >
      echo 

===============================================================================================================================
      put RPA PIRP
      waitfor >
      echo 

===============================================================================================================================

      put LOOK
      waitfor >

      echo 

===============================================================================================================================
      put TIME
      waitfor >
      put OBS WEATHER
      waitfor >
      echo 

===============================================================================================================================

      put EXP FIXWALL
      put HIDE

      goto NEXTFUNCTION

#end START function
==================================================================================
==================================================================================
#begin GLOBAL PIERCING GAZE v2 function (THIS FUNCTION HAS BEEN FIXED2)

GPIERCINGGAZE:

   GPG:

      setvariable RETURNPOINTER GPGPREPSPELL

   GPGPREPSPELL:

      counter set 1

      put prep PIERCING GAZE 25

      Match GPGPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GPGFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GPGFULLPREP:

      waitfor You feel fully prepared

      setvariable RETURNPOINTER %s%

   GPGHARNESS1:
   GPGHARNESS2:

      put harness 15

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

   GPGUPDATECOUNTER:

      counter add 1

      goto GPGHARNESS%c%

   GPGHARNESS3:
   GPGHARNESS4:
   GPGHARNESS5:
   GPGHARNESS6:
   GPGHARNESS7:
   GPGHARNESS8:
   GPGHARNESS9:
   GPGHARNESS10:

   GPGSPELLCAST:

      counter set 0

      put cast %GLOBALSPELLTARGET%

      Match GPGSPELLCAST ...wait
      Match %s% You gesture
      Matchwait

   GPIERCINGGAZEAT:
   GPGAT:

      if_2 setvariable GLOBALSPELLTARGET %2%
      goto GPIERCINGGAZE

#end GLOBAL PIERCING GAZE v2 function (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
#begin GLOBAL CLEAR VISION v2 function (THIS FUNCTION HAS BEEN FIXED2)

GCLEARVISION:

   GCV:

      setvariable RETURNPOINTER GCVPREPSPELL

   GCVPREPSPELL:

      counter set 1

      put prep CLEAR VISION 30

      Match GCVPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GCVFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GCVFULLPREP:

      waitfor You feel fully prepared

      setvariable RETURNPOINTER %s%

   GCVHARNESS1:
   GCVHARNESS2:

      put harness 20

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

   GCVUPDATECOUNTER:

      counter add 1

      goto GCVHARNESS%c%

   GCVHARNESS3:
   GCVHARNESS4:
   GCVHARNESS5:
   GCVHARNESS6:
   GCVHARNESS7:
   GCVHARNESS8:
   GCVHARNESS9:
   GCVHARNESS10:

   GCVSPELLCAST:

      counter set 0

      put cast %GLOBALSPELLTARGET%

      Match GCVSPELLCAST ...wait
      Match %s% You gesture
      Matchwait

   GCLEARVISIONAT:
   GCVAT:

      if_2 setvariable GLOBALSPELLTARGET %2%
      goto GCLEARVISION

#end GLOBAL CLEAR VISION v2 function (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
#begin GLOBAL AURA SIGHT v2 function (THIS FUNCTION HAS BEEN FIXED2)

GAURASIGHT:

   GAUS:

      setvariable RETURNPOINTER GAUSPREPSPELL

   GAUSPREPSPELL:

      counter set 1

      put prep AURA SIGHT 30

      Match GAUSPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GAUSFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GAUSFULLPREP:

      waitfor You feel fully prepared

      setvariable RETURNPOINTER %s%

   GAUSHARNESS1:
   GAUSHARNESS2:

      put harness 15

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

   GAUSUPDATECOUNTER:

      counter add 1

      goto GAUSHARNESS%c%

   GAUSHARNESS3:
   GAUSHARNESS4:
   GAUSHARNESS5:
   GAUSHARNESS6:
   GAUSHARNESS7:
   GAUSHARNESS8:
   GAUSHARNESS9:
   GAUSHARNESS10:

   GAUSSPELLCAST:

      counter set 0

      put cast

      Match GAUSSPELLCAST ...wait
      Match %s% You gesture
      Matchwait

#end GLOBAL AURA SIGHT v2 function (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
#begin GLOBAL SHADOWS v2 function (THIS FUNCTION HAS BEEN FIXED2)

GSHADOWSSPELL:

   GSHADOWS:

      setvariable RETURNPOINTER GSHADOWSPREPSPELL

   GSHADOWSPREPSPELL:

      counter set 1

      put prep SHADOWS 30

      Match GSHADOWSPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GSHADOWSFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GSHADOWSFULLPREP:

      waitfor You feel fully prepared

      setvariable RETURNPOINTER %s%

   GSHADOWSHARNESS1:
   GSHADOWSHARNESS2:

      put harness 15

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

   GSHADOWSUPDATECOUNTER:

      counter add 1

      goto GSHADOWSHARNESS%c%

   GSHADOWSHARNESS3:
   GSHADOWSHARNESS4:
   GSHADOWSHARNESS5:
   GSHADOWSHARNESS6:
   GSHADOWSHARNESS7:
   GSHADOWSHARNESS8:
   GSHADOWSHARNESS9:
   GSHADOWSHARNESS10:

   GSHADOWSSPELLCAST:

      counter set 0

      put cast %GLOBALSPELLTARGET%

      Match GSHADOWSSPELLCAST ...wait
      Match %s% You gesture
      Matchwait

   GSHADOWSSPELLAT:
   GSHADOWSAT:

      if_2 setvariable GLOBALSPELLTARGET %2%
      goto GSHADOWSSPELL

#end GLOBAL SHADOWS v2 function (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
#begin GLOBAL SEER'S SENSE v2 function (THIS FUNCTION HAS BEEN FIXED2)

GSEERSSENSE:
GSEERS:

   GSEER:

      setvariable RETURNPOINTER GSEERPREPSPELL

   GSEERPREPSPELL:

      counter set 1

      put prep SEER SENSE 26

      Match GSEERPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GSEERFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GSEERFULLPREP:

      waitfor You feel fully prepared

      setvariable RETURNPOINTER %s%

   GSEERHARNESS1:
   GSEERHARNESS2:

      put harness 15

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

   GSEERUPDATECOUNTER:

      counter add 1

      goto GSEERHARNESS%c%

   GSEERHARNESS3:
   GSEERHARNESS4:
   GSEERHARNESS5:
   GSEERHARNESS6:
   GSEERHARNESS7:
   GSEERHARNESS8:
   GSEERHARNESS9:
   GSEERHARNESS10:

   GSEERSPELLCAST:

      counter set 0

      put cast %GLOBALSPELLTARGET%

      Match GSEERSPELLCAST ...wait
      Match %s% You gesture
      Matchwait

   GSEERSSENSEAT:
   GSEERSAT:
   GSEERAT:

      if_2 setvariable GLOBALSPELLTARGET %2%
      goto GSEERSSENSE

#end GLOBAL SEER'S SENSE v2 function (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
#begin GLOBAL SHADOWLING v2 function (THIS FUNCTION HAS BEEN FIXED2)

GSHADOWLINGSPELL:

   GSHADOWLING:

      setvariable RETURNPOINTER GSHADOWLINGPREPSPELL

   GSHADOWLINGPREPSPELL:

      counter set 1

      put prep SHADOWLING 30

      Match GSHADOWLINGPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GSHADOWLINGFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GSHADOWLINGFULLPREP:

      waitfor You feel fully prepared

      setvariable RETURNPOINTER %s%

   GSHADOWLINGHARNESS1:
   GSHADOWLINGHARNESS2:

      put harness 15

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

   GSHADOWLINGUPDATECOUNTER:

      counter add 1

      goto GSHADOWLINGHARNESS%c%

   GSHADOWLINGHARNESS3:
   GSHADOWLINGHARNESS4:
   GSHADOWLINGHARNESS5:
   GSHADOWLINGHARNESS6:
   GSHADOWLINGHARNESS7:
   GSHADOWLINGHARNESS8:
   GSHADOWLINGHARNESS9:
   GSHADOWLINGHARNESS10:

   GSHADOWLINGSPELLCAST:

      counter set 0

      put cast

      Match GSHADOWLINGSPELLCAST ...wait
      Match %s% You gesture
      Matchwait

#end GLOBAL SHADOWLING v2 function (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
#begin GLOBAL SHADOW SERVANT v2 function (THIS FUNCTION HAS BEEN FIXED2)

GSHADOWSERVANTSPELL:

   GSHADOWSERVANT:

      setvariable RETURNPOINTER GSHADOWSERVANTPREPSPELL

   GSHADOWSERVANTPREPSPELL:

      counter set 1

      put prep SHADOW SERVANT 44

      Match GSHADOWSERVANTPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GSHADOWSERVANTFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GSHADOWSERVANTFULLPREP:

      waitfor You feel fully prepared

      setvariable RETURNPOINTER %s%

   GSHADOWSERVANTHARNESS1:

      put harness 10

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

   GSHADOWSERVANTUPDATECOUNTER:

      counter add 1

      goto GSHADOWSERVANTHARNESS%c%

   GSHADOWSERVANTHARNESS2:
   GSHADOWSERVANTHARNESS3:
   GSHADOWSERVANTHARNESS4:
   GSHADOWSERVANTHARNESS5:
   GSHADOWSERVANTHARNESS6:
   GSHADOWSERVANTHARNESS7:
   GSHADOWSERVANTHARNESS8:
   GSHADOWSERVANTHARNESS9:
   GSHADOWSERVANTHARNESS10:

   GSHADOWSERVANTSPELLCAST:

      counter set 0

      put cast

      Match GSHADOWSERVANTSPELLCAST ...wait
      Match %s% You gesture
      Matchwait

   GSHADOWSERVANTPYRAMIDS:

      save GSHADOWSERVANTGETPYRAMIDS

      goto GSHADOWSERVANT

   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

#end GLOBAL SHADOW SERVANT v2 function (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
#begin GLOBAL STARLIGHT SPHERE v2 function (THIS FUNCTION HAS BEEN FIXED2)

GSTARLIGHTSPHERE:

   GSLS:

      setvariable RETURNPOINTER GSLSPREPSPELL

   GSLSTESTTIME:

      put time

      Match GSLSPREPSPELL night
      Match GSLSPREPSPELL sunset
      Match GSLSPREPSPELL evening
      Match GSLSSPELLFAIL sunrise
      Match GSLSSPELLFAIL dawn
      Match GSLSSPELLFAIL midday
      Match GSLSSPELLFAIL morning
      Matchwait

   GSLSPREPSPELL:

      counter set 1

      put prep STARLIGHT SPHERE 20

      Match GSLSPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GSLSFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GSLSFULLPREP:

      waitfor You feel fully prepared

      setvariable RETURNPOINTER %s%

   GSLSHARNESS1:

      put harness 10

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

   GSLSUPDATECOUNTER:

      counter add 1

      goto GSLSHARNESS%c%

   GSLSHARNESS2:
   GSLSHARNESS3:
   GSLSHARNESS4:
   GSLSHARNESS5:
   GSLSHARNESS6:
   GSLSHARNESS7:
   GSLSHARNESS8:
   GSLSHARNESS9:
   GSLSHARNESS10:

   GSLSSPELLCAST:

      counter set 0

      put cast RAVEN

      Match GSLSSPELLCAST ...wait
      Match %s% You gesture
      Matchwait

   GSLSSPELLFAIL:

      echo ============================================
      echo =                                          =
      echo = The spell Starlight Sphere cannot be     =
      echo = cast during the day. Try again at night. =
      echo =                                          =
      echo ============================================

      goto %s%

#end GLOBAL STARLIGHT SPHERE v2 function (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
#begin GLOBAL PSYCHIC SHIELD v2 function (THIS FUNCTION HAS BEEN FIXED2)

GPSYCHICSHIELD:

   GPSY:

      setvariable RETURNPOINTER GPSYPREPSPELL

   GPSYPREPSPELL:

      counter set 1

      put prep PSYCHIC SHIELD 26

      Match GPSYPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GPSYFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GPSYFULLPREP:

      waitfor You feel fully prepared

      setvariable RETURNPOINTER %s%

   GPSYHARNESS1:
   GPSYHARNESS2:

      put harness 20

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

   GPSYUPDATECOUNTER:

      counter add 1

      goto GPSYHARNESS%c%

   GPSYHARNESS3:
   GPSYHARNESS4:
   GPSYHARNESS5:
   GPSYHARNESS6:
   GPSYHARNESS7:
   GPSYHARNESS8:
   GPSYHARNESS9:
   GPSYHARNESS10:

   GPSYSPELLCAST:

      counter set 0

      put cast %GLOBALSPELLTARGET%

      Match GPSYSPELLCAST ...wait
      Match %s% You gesture
      Matchwait

   GPSYCHICSHIELDAT:
   GPSYAT:

      if_2 setvariable GLOBALSPELLTARGET %2%
      goto GPSYCHICSHIELD

#end GLOBAL PSYCHIC SHIELD v2 function (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
#begin GLOBAL FOCUS MOONBEAM v2 function (THIS FUNCTION HAS BEEN FIXED2)

GFOCUSMOONBEAM:

   GFM:

      setvariable RETURNPOINTER GFMPREPSPELL

   GFMPREPSPELL:

      counter set 1

      put prep FOCUS MOONBEAM 20

      Match GFMPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GFMFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GFMFULLPREP:

      pause 10

      setvariable RETURNPOINTER %s%

   GFMHARNESS1:
   GFMHARNESS2:
   GFMHARNESS3:
   GFMHARNESS4:
   GFMHARNESS5:

      put harness 20

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

   GFMUPDATECOUNTER:

      counter add 1

      goto GFMHARNESS%c%

   GFMHARNESS6:
   GFMHARNESS7:
   GFMHARNESS8:
   GFMHARNESS9:
   GFMHARNESS10:

   GFMSPELLCAST:

      counter set 0

      put cast %GLOBALMOON%

      Match GFMSPELLCAST ...wait
      Match %s% You gesture
      Matchwait

   GFOCUSMOONBEAMAT:
   GFMAT:

      if_2 setvariable GLOBALMOON %2%
      goto GFOCUSMOONBEAM

#end GLOBAL FOCUS MOONBEAM v2 function (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
#begin GLOBAL SEAL OF DEFLECTION v2 function (THIS FUNCTION HAS BEEN FIXED2)

GSEALOFDEFLECTION:

   GSOD:

      setvariable RETURNPOINTER GSODPREPSPELL

   GSODPREPSPELL:

      counter set 1

      put prep SEAL OF DEFLECTION 20

      Match GSODPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GSODFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GSODFULLPREP:

      waitfor You feel fully prepared

      setvariable RETURNPOINTER %s%

   GSODHARNESS1:
   GSODHARNESS2:

      put harness 15

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

   GSODUPDATECOUNTER:

      counter add 1

      goto GSODHARNESS%c%

   GSODHARNESS3:
   GSODHARNESS4:
   GSODHARNESS5:
   GSODHARNESS6:
   GSODHARNESS7:
   GSODHARNESS8:
   GSODHARNESS9:
   GSODHARNESS10:

   GSODSPELLCAST:

      counter set 0

      put cast %GLOBALSPELLTARGET%

      Match GSODSPELLCAST ...wait
      Match %s% You gesture
      Matchwait

   GSEALOFDEFLECTIONAT:
   GSODAT:

      if_2 setvariable GLOBALSPELLTARGET %2%
      goto GSEALOFDEFLECTION

#end GLOBAL SEAL OF DEFLECTION v2 function  (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
#begin GLOBAL SEVER THREAD v2 function (THIS FUNCTION HAS BEEN FIXED2)

GSEVERTHREAD:

   GSET:

      setvariable RETURNPOINTER GSETPREPSPELL

   GSETPREPSPELL:

      counter set 1

      put prep SEVER THREAD 22

      Match GSETPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GSETFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GSETFULLPREP:

      waitfor You feel fully prepared

      setvariable RETURNPOINTER %s%

   GSETHARNESS1:
   GSETHARNESS2:

      put harness 20

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

   GSETUPDATECOUNTER:

      counter add 1

      goto GSETHARNESS%c%

   GSETHARNESS3:
   GSETHARNESS4:
   GSETHARNESS5:
   GSETHARNESS6:
   GSETHARNESS7:
   GSETHARNESS8:
   GSETHARNESS9:
   GSETHARNESS10:

   GSETSPELLCAST:

      counter set 0

      put cast %GLOBALSPELLTARGET%

      Match GSETSPELLCAST ...wait
      Match GSETPREDICTSEVERTARGET You gesture
      Matchwait

   GSETPREDICTSEVERTARGET:

      put predict sever %GLOBALSPELLTARGET%

      Match GSETPREDICTSEVERTARGET ...wait
      Match %s% Roundtime
      Matchwait

   GSEVERTHREADAT:
   GSETAT:

      if_2 setvariable GLOBALSPELLTARGET %2%
      goto GSEVERTHREAD

#end GLOBAL SEVER THREAD v2 function  (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
#begin GLOBAL LOCATE v2 function (THIS FUNCTION HAS BEEN FIXED2)

GLOCATESPELL:

   GLOCATE:

      setvariable RETURNPOINTER GLOCATEPREPSPELL

   GLOCATEPREPSPELL:

      counter set 1

      put prep LOCATE 20

      Match GLOCATEPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GLOCATEFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GLOCATEFULLPREP:

      waitfor You feel fully prepared

      setvariable RETURNPOINTER %s%

   GLOCATEHARNESS1:
   GLOCATEHARNESS2:

      put harness 15

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

   GLOCATEUPDATECOUNTER:

      counter add 1

      goto GLOCATEHARNESS%c%

   GLOCATEHARNESS3:
   GLOCATEHARNESS4:
   GLOCATEHARNESS5:
   GLOCATEHARNESS6:
   GLOCATEHARNESS7:
   GLOCATEHARNESS8:
   GLOCATEHARNESS9:
   GLOCATEHARNESS10:

   GLOCATESPELLCAST:

      counter set 0

      put cast %GLOBALSPELLTARGET%

      Match GLOCATESPELLCAST ...wait
      Match %s% You gesture
      Matchwait

   GLOCATESPELLAT:
   GLOCATEAT:

      if_2 setvariable GLOBALSPELLTARGET %2%
      goto GLOCATESPELL

#end GLOBAL LOCATE v2 function  (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
#begin GLOBAL MENTAL BLAST v2 function (THIS FUNCTION HAS BEEN FIXED2)

GMENTALBLAST:

   GMB:

      setvariable RETURNPOINTER GMBPREPSPELL

   GMBPREPSPELL:

      counter set 1

      put prep MENTAL BLAST 25

      Match GMBPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GMBFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GMBFULLPREP:

      pause 16

      setvariable RETURNPOINTER %s%

   GMBHARNESS1:
   GMBHARNESS2:

      put harness 20

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

   GMBUPDATECOUNTER:

      counter add 1

      goto GMBHARNESS%c%

   GMBHARNESS3:
   GMBHARNESS4:
   GMBHARNESS5:
   GMBHARNESS6:
   GMBHARNESS7:
   GMBHARNESS8:
   GMBHARNESS9:
   GMBHARNESS10:

   GMBSPELLCAST:

      counter set 0

      put cast %GLOBALSPELLTARGET%

      Match GMBSPELLCAST ...wait
      Match %s% You gesture
      Matchwait

   GMENTALBLASTAT:
   GMBAT:

      if_2 setvariable GLOBALSPELLTARGET %2%
      goto GMENTALBLAST

#end GLOBAL MENTAL BLAST v2 function  (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
#begin GLOBAL TEZIRAH'S VEIL v2 function (THIS FUNCTION HAS BEEN FIXED2)

GTEZIRAHSVEIL:

   GTV:

      setvariable RETURNPOINTER GTVPREPSPELL

   GTVPREPSPELL:

      counter set 1

      put prep TEZIRA VEIL 28

      Match GTVPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GTVFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GTVFULLPREP:

      pause 16

      setvariable RETURNPOINTER %s%

   GTVHARNESS1:
   GTVHARNESS2:

      put harness 15

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

   GTVUPDATECOUNTER:

      counter add 1

      goto GTVHARNESS%c%

   GTVHARNESS3:
   GTVHARNESS4:
   GTVHARNESS5:
   GTVHARNESS6:
   GTVHARNESS7:
   GTVHARNESS8:
   GTVHARNESS9:
   GTVHARNESS10:

   GTVSPELLCAST:

      counter set 0

      put cast %GLOBALSPELLTARGET%

      Match GTVSPELLCAST ...wait
      Match %s% You gesture
      Matchwait

   GTEZIRAHSVEILAT:
   GTVAT:

      if_2 setvariable GLOBALSPELLTARGET %2%
      goto GTEZIRAHSVEIL

#end GLOBAL TEZIRAH'S VEIL v2 function (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
#begin GLOBAL RIPPLE v2 function (THIS FUNCTION HAS BEEN FIXED2)

GRIPPLESPELL:

   GRIPPLE:

      setvariable RETURNPOINTER GRIPPLEPREPSPELL

   GRIPPLEPREPSPELL:

      counter set 1

      put prep RIPPLE 20

      Match GRIPPLEPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GRIPPLEFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GRIPPLEFULLPREP:

      waitfor You feel fully prepared

      setvariable RETURNPOINTER %s%

   GRIPPLEHARNESS1:

      put harness 20

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

   GRIPPLEUPDATECOUNTER:

      counter add 1

      goto GRIPPLEHARNESS%c%

   GRIPPLEHARNESS2:
   GRIPPLEHARNESS3:
   GRIPPLEHARNESS4:
   GRIPPLEHARNESS5:
   GRIPPLEHARNESS6:
   GRIPPLEHARNESS7:
   GRIPPLEHARNESS8:
   GRIPPLEHARNESS9:
   GRIPPLEHARNESS10:

   GRIPPLESPELLCAST:

      counter set 0

      put cast

      Match GRIPPLESPELLCAST ...wait
      Match %s% You gesture
      Matchwait

#end GLOBAL RIPPLE v2 function (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
#begin GLOBAL CONTINGENCY v2 function (THIS FUNCTION HAS BEEN FIXED2)

GCONTINGENCYSPELL:

   GCONTINGENCY:

      setvariable RETURNPOINTER GCONTINGENCYPREPSPELL

   GCONTINGENCYPREPSPELL:

      counter set 1

      put prep CONTINGENCY 25

      Match GCONTINGENCYPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GCONTINGENCYFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GCONTINGENCYFULLPREP:

      waitfor You feel fully prepared

      setvariable RETURNPOINTER %s%

   GCONTINGENCYHARNESS1:

      put harness 20

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

   GCONTINGENCYUPDATECOUNTER:

      counter add 1

      goto GCONTINGENCYHARNESS%c%

   GCONTINGENCYHARNESS2:
   GCONTINGENCYHARNESS3:
   GCONTINGENCYHARNESS4:
   GCONTINGENCYHARNESS5:
   GCONTINGENCYHARNESS6:
   GCONTINGENCYHARNESS7:
   GCONTINGENCYHARNESS8:
   GCONTINGENCYHARNESS9:
   GCONTINGENCYHARNESS10:

   GCONTINGENCYSPELLCAST:

      counter set 0

      put cast %GLOBALMOON%

      Match GCONTINGENCYSPELLCAST ...wait
      Match %s% You gesture
      Matchwait

   GCONTINGENCYSPELLAT:
   GCONTINGENCYAT:

      if_2 setvariable GLOBALMOON %2%
      goto GCONTINGENCY

#end GLOBAL CONTINGENCY v2 function (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
#begin GLOBAL CAGE OF LIGHT v2 function (THIS FUNCTION HAS BEEN FIXED2)

GCAGEOFLIGHT:

   GCOL:

      setvariable RETURNPOINTER GCOLPREPSPELL

   GCOLPREPSPELL:

      counter set 1

      put prep CAGE OF LIGHT 23

      Match GCOLPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GCOLFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GCOLFULLPREP:

      waitfor You feel fully prepared

      setvariable RETURNPOINTER %s%

   GCOLHARNESS1:

      put harness 20

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

   GCOLUPDATECOUNTER:

      counter add 1

      goto GCOLHARNESS%c%

   GCOLHARNESS2:
   GCOLHARNESS3:
   GCOLHARNESS4:
   GCOLHARNESS5:
   GCOLHARNESS6:
   GCOLHARNESS7:
   GCOLHARNESS8:
   GCOLHARNESS9:
   GCOLHARNESS10:

   GCOLSPELLCAST:

      counter set 0

      put cast %GLOBALMOON%

      Match GCOLSPELLCAST ...wait
      Match %s% You gesture
      Matchwait

   GCAGEOFLIGHTAT:
   GCOLAT:

      if_2 setvariable GLOBALMOON %2%
      goto GCAGEOFLIGHT

#end GLOBAL CAGE OF LIGHT v2 function (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
#begin GLOBAL DAZZLE function (THIS FUNCTION HAS BEEN FIXED)

GDAZZLESPELL:

   GDAZZLE:

      setvariable RETURNPOINTER GDAZZLEPREPSPELL

   GDAZZLEPREPSPELL:

      counter set 1

      put prep DAZZLE 20

      Match GDAZZLEPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GDAZZLEFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GDAZZLEFULLPREP:

      waitfor You feel fully prepared

      setvariable RETURNPOINTER %s%

   GDAZZLEHARNESS1:
   GDAZZLEHARNESS2:

      put harness 15

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

   GDAZZLEUPDATECOUNTER:

      counter add 1

      goto GDAZZLEHARNESS%c%

   GDAZZLEHARNESS3:
   GDAZZLEHARNESS4:
   GDAZZLEHARNESS5:
   GDAZZLEHARNESS6:
   GDAZZLEHARNESS7:
   GDAZZLEHARNESS8:
   GDAZZLEHARNESS9:
   GDAZZLEHARNESS10:

   GDAZZLESPELLCAST:

      counter set 0

      put cast %GLOBALSPELLTARGET%

      Match GDAZZLESPELLCAST ...wait
      Match %s% You gesture
      Matchwait

   GDAZZLESPELLAT:
   GDAZZLEAT:

      if_2 setvariable GLOBALSPELLTARGET %2%
      goto GDAZZLESPELL

#end GLOBAL DAZZLE function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin GLOBAL EASE BURDEN function (THIS FUNCTION HAS BEEN FIXED)

GEASEBURDEN:

   GEASE:

      setvariable RETURNPOINTER GEASEPREPSPELL

   GEASEPREPSPELL:

      counter set 1

      put prep EASE 30

      Match GEASEPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GEASEFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GEASEFULLPREP:

      waitfor You feel fully prepared

      setvariable RETURNPOINTER %s%

   GEASEHARNESS1:
   GEASEHARNESS2:

      put harness 20

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

   GEASEUPDATECOUNTER:

      counter add 1

      goto GEASEHARNESS%c%

   GEASEHARNESS3:
   GEASEHARNESS4:
   GEASEHARNESS5:
   GEASEHARNESS6:
   GEASEHARNESS7:
   GEASEHARNESS8:
   GEASEHARNESS9:
   GEASEHARNESS10:

   GEASESPELLCAST:

      counter set 0

      put cast %GLOBALSPELLTARGET%
      put encumb

      Match GEASESPELLCAST ...wait
      Match %s% You gesture
      Matchwait

   GEASEBURDENAT:
   GEASEAT:

      if_2 setvariable GLOBALSPELLTARGET %2%
      goto GEASEBURDEN

#end GLOBAL EASE BURDEN function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin GLOBAL DISTANT GAZE function (THIS FUNCTION HAS BEEN FIXED2)

GDISTANTGAZE:

####################################################################################################
#
#   Prepares distant gaze at 20 and harnesses twice 20 for a total of 60. It will cast it on the
#   GLOBALMOON variable which must be determined prior so both functions must be called for it to
#   function properly
#
####################################################################################################

   GDG:

      setvariable RETURNPOINTER GDGPREPSPELL

   GDGPREPSPELL:

      counter set 1

      put prep DISTANT GAZE 20

      Match GDGPREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match GDGFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   GDGFULLPREP:

      waitfor You feel fully prepared

      setvariable RETURNPOINTER %s%

   GDGHARNESS1:
   GDGHARNESS2:

      put harness 20

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

   GDGUPDATECOUNTER:

      counter add 1

      goto GDGHARNESS%c%

   GDGHARNESS3:
   GDGHARNESS4:
   GDGHARNESS5:
   GDGHARNESS6:
   GDGHARNESS7:
   GDGHARNESS8:
   GDGHARNESS9:
   GDGHARNESS10:

   GDGSPELLCAST:

      counter set 0

      put cast %GLOBALMOON%

      Match GDGSPELLCAST ...wait
      Match %s% You gesture
      Matchwait

   GDISTANTGAZEAT:
   GDGAT:

      if_2 setvariable GLOBALMOON %2%
      goto GDISTANTGAZE

#end GLOBAL DISTANT GAZE function (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
#begin GLOBAL SPHERE OF PROTECTION function (THIS FUNCTION HAS BEEN FIXED)

GSPHEREOFPROTECTION:

####################################################################################################
#
# This is a global function which will prep the spell SPHERE OF PROTECTION at minimum mana and then
# cast it repeatedly until at maximum strength. If it cannot be cast due to a "strain to 
# harness" message, the script will release the spell and return to the function listed in its %s%
# memory bank. NOTE! Make sure when calling this function you SAVE the function next on the list
# after the GLOBAL function finishes. (ie, ASTROLOGY calls GCLEARVISION, save ASTROLOGYOBSWEATHER 
# as the function for which the GLOBAL function to return to after finishing.)
#
####################################################################################################

   GSOP:
   GLOBALSOP:

      put prep SPHERE OF PROTECTION

      Match GLOBALSOP ...wait
      Match GLOBALSOPREL You have to strain
      Match GLOBALSOPCAST Sphere of Protection spell
      Matchwait

   GLOBALSOPCAST:

      pause 2

      put cast

      Match GLOBALSOPCAST ...wait
      Match GLOBALSOPREL doesn't do much good.
      Match GLOBALSOPREL You are unable to harness
      goto GLOBALSOP
      Matchwait

   GLOBALSOPREL:

      put rel
      goto %s%

#end GLOBAL SPHERE OF PROTECTION function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin PERCEPTION function (THIS FUNCTION HAS BEEN FIXED)

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
      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 (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin POWERPERCEIVE function (THIS FUNCTION HAS BEEN FIXED)

POWERPERCEIVE:

   POWERPERCEIVESUPSPELLS:

      save POWERPERCEIVEPREPSHADOWLING
      goto GAURASIGHT

   POWERPERCEIVEPREPSHADOWLING:

      pause

      put prep SHADOWLING

      Match POWERPERCEIVEPREPSHADOWLING ...wait
      Match EXPPOWERPERCEIVE you aren't sure you can get enough
      Match POWERPERCEIVEPERCSHADOWLING %SPELLPREPMESSAGE%
      Matchwait

   POWERPERCEIVEPERCSHADOWLING:

      put perc SHADOWLING

      Match POWERPERCEIVEPERCSHADOWLING ...wait
      Match POWERPERCEIVEFPREPSHADOWLING could not find
      Match POWERPERCEIVEFPREPSHADOWLING shadowling
      Matchwait

   POWERPERCEIVEFPREPSHADOWLING:

      waitfor You feel fully prepared to cast

   POWERPERCEIVERELSHADOWLING:

      put release SHADOWLING

      Match POWERPERCEIVERELSHADOWLING ...wait
      Match POWERPERCEIVECASTSHADOWLING shadowling
      Matchwait

   POWERPERCEIVECASTSHADOWLING:

      put cast

      Match POWERPERCEIVECASTSHADOWLING ...wait
      Match EXPPOWERPERCEIVE unable to harness
      Match POWERPERCEIVEPREPSHADOWLING diminutive phantasmal form
      Matchwait

   EXPPOWERPERCEIVE:

      pause

      put perc SERVANT

      put exp skill pp

      Match NEXTFUNCTION mind lock
      Match POWERPERCEIVECHECKMANA EXP HELP for more information
      Matchwait

   POWERPERCEIVECHECKMANA:

      put mana

      Match POWERPERCEIVEPREPSHADOWLING >100%]
      Match POWERPERCEIVEPREPSHADOWLING |_100%]
      Match POWERPERCEIVEPREPSHADOWLING +
      Match POWERPERCEIVEPREPSHADOWLING complete attunement
      Match NEXTFUNCTION for more.
      Matchwait

#end POWERPERCEIVE function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin POWERPERCEIVE4 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 POWERPERCEIVE4 LABEL.)

POWERPERCEIVE4:

   POWERPERCEIVECONCENTRATE:

      pause

      put conc all

      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

      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 POWERPERCEIVE4CHECKEXP

   POWERPERCEIVE4CHECKEXP:

      Match POWERPERCEIVE4ENDFUNCTION mind lock
      Match POWERPERCEIVE4 EXP HELP

      put exp skill power perc

      Matchwait

#end POWERPERCEIVE4 function
==================================================================================
==================================================================================
#begin POWERPERCEIVE3 function (THIS FUNCTION HAS BEEN FIXED)

POWERPERCEIVE3:

   put release

   POWERPERCEIVE3INITIALSHADOWLING:

      setvariable RETURNPOINTER POWERPERCEIVE3INITIALSHADOWLING

      put prep SHADOWLING

      Match POWERPERCEIVE3INITIALSHADOWLING ...wait
      Match NEXTFUNCTION you aren't sure you can get enough
      Match KILLHUMMING should stop playing before
      Match POWERPERCEIVE3INITIALSHADOWLINGCONT %SPELLPREPMESSAGE%
      Matchwait

   POWERPERCEIVE3INITIALSHADOWLINGCONT:

      pause 10

      put cast

   POWERPERCEIVE3PREPSHADOWLING:

      put prep SHADOWLING

      Match POWERPERCEIVE3PREPSHADOWLING ...wait
      Match NEXTFUNCTION you aren't sure you can get enough
      Match POWERPERCEIVE3HIDE %SPELLPREPMESSAGE%
      Matchwait

   POWERPERCEIVE3HIDE:

      pause

      put hide

      Match POWERPERCEIVE3HIDE ...wait
      Match POWERPERCEIVE3STALK Roundtime:
      Matchwait

   POWERPERCEIVE3STALK:

      put stalk SHADOWLING

      Match POWERPERCEIVE3STALK ...wait
      Match POWERPERCEIVE3HIDE ruining your hiding place
      Match POWERPERCEIVE3PERCEIVE move into position to stalk
      Matchwait

   POWERPERCEIVE3PERCEIVE:

      put perceive SHADOWLING

      Match POWERPERCEIVE3PERCEIVE ...wait
      Match EXPPOWERPERCEIVE3 Roundtime:
      Matchwait

   EXPPOWERPERCEIVE3:

      put exp skill pp

      Match NEXTFUNCTION mind lock
      Match POWERPERCEIVE3CHECKMANA EXP HELP for more information
      Matchwait

   POWERPERCEIVE3CHECKMANA:

      pause 2

      put mana

      Match POWERPERCEIVE3CASTSHADOWLING >100%]
      Match POWERPERCEIVE3CASTSHADOWLING >|100%]
      Match POWERPERCEIVE3CASTSHADOWLING >|_100%]
      Match POWERPERCEIVE3CASTSHADOWLING >|__100%]
      Match POWERPERCEIVE3CASTSHADOWLING >|___100%]
      Match POWERPERCEIVE3CASTSHADOWLING >|____100%]
      Match POWERPERCEIVE3CASTSHADOWLING >|_____100%]
      Match POWERPERCEIVE3CHECKMANA MANA HELP for more.
      Matchwait

   POWERPERCEIVE3CASTSHADOWLING:

      put cast

      Match POWERPERCEIVE3PREPSHADOWLING form of a shadowling
      Match NEXTFUNCTION unable to harness sufficient
      Matchwait

#end POWERPERCEIVE3 function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin AMBUSHING function (THIS FUNCTION HAS BEEN FIXED)

AMBUSHING:

   AMBUSHRETREAT:

      put retreat

      Match AMBUSHRETREAT ...wait
      Match AMBUSHHIDE You retreat
      Match AMBUSHHIDE far away as you can get!
      Matchwait

   AMBUSHHIDE:

      put hide

      Match AMBUSHHIDE ...wait
      Match AMBUSHRETREAT ruining your hiding attempt!
      Match AMBUSHRETREAT escape its notice!
      Match AMBUSHADVANCE unobserved
      Match AMBUSHADVANCE you're already hidden!
      Matchwait

   AMBUSHADVANCE:

      put advance

      Match AMBUSHADVANCEPAUSE ...wait
      Match AMBUSHSTALK stealthily advance
      Match AMBUSHRETREAT begin to advance
      Match AMBUSHRETREAT already at melee
      Match AMBUSHFACENEXT advance towards?
      Matchwait

   AMBUSHADVANCEPAUSE:

      pause

      goto AMBUSHADVANCE

   AMBUSHFACENEXT:

      put face next

      Match AMBUSHFACENEXT ...wait
      Match NEXTFUNCTION nothing else to face
      Match AMBUSHADVANCE You turn to face
      Matchwait

   AMBUSHSTALK:

      put stalk

      Match AMBUSHSTALK ...wait
      Match AMBUSHHIDE hidden first!
      Match AMBUSHAMBUSH move into position to stalk
      Match AMBUSHAMBUSH already stalking
      Match NEXTFUNCTION nothing else to face!
      Matchwait

   AMBUSHAMBUSH:

      waitfor melee

      put ambush

      Match AMBUSHAMBUSH ...wait
      Match AMBUSHGETWEAPON more effective when you use a weapon
      Match AMBUSHADVANCE if you were closer
      Match AMBUSHPARRY Roundtime
      Match AMBUSHRETREAT ambush from plain sight
      Match NEXTFUNCTION Ambush what?
      Matchwait

   AMBUSHPARRY:

      put parry

      Match AMBUSHPARRYPAUSE ...wait
      Match AMBUSHEXPHIDING move into a position
      Match AMBUSHRETREAT already in a position
      Matchwait

   AMBUSHPARRYPAUSE:

      pause

      goto AMBUSHPARRY

   EXPHIDING:

      put exp skill hiding

      Match NEXTFUNCTION mind lock
      Match EXPSTALKING EXP HELP for more information
      Matchwait

   EXPSTALKING:

      pause

      put exp skill stalking

      Match NEXTFUNCTION mind lock
      Match AMBUSHRETREAT EXP HELP for more information
      Matchwait

#end AMBUSHING function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin FORAGING function (THIS FUNCTION HAS BEEN FIXED)

FORAGING:

   FORAGINGSUPSPELLS:

      save FORAGINGSTART
      goto GCLEARVISION

   FORAGINGSTART:

      counter add 1

      Match FORAGINGSTART ...wait
      Match FORAGINGSTORE %FORAGEFORITEM%
      Match FORAGINGSTART Roundtime

      put forage %FORAGEFORITEM%

      Matchwait

   FORAGINGSTORE:

      if_2 Match FORAGINGSTORE ...wait
      if_2 Match EXPFORAGING%c% You put your
      if_2 Match EXPFORAGING%c% You drop

      if_2 put put %FORAGEFORITEM% in %2%

      if_2 Matchwait

      Match FORAGINGSTORE ...wait
      Match EXPFORAGING%c% You put your
      Match EXPFORAGING%c% You drop

      put put %FORAGEFORITEM% in my %LARGESTORAGECONTAINER%

      Matchwait

   EXPFORAGING1:
   EXPFORAGING2:
   EXPFORAGING3:
   EXPFORAGING4:

      goto FORAGINGSTART

   EXPFORAGING5:

      counter set 0

      put %HUMTHISTUNE%

      Match FORAGINGEND mind lock
      Match FORAGINGSTART EXP HELP for more information

      put exp skill foraging

      Matchwait

   FORAGINGEND:

      if_2 shift

      goto NEXTFUNCTION

#end FORAGING function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin FIRSTAID function (THIS FUNCTION HAS BEEN FIXED)

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 (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin FIRSTAID2 function (THIS FUNCTION HAS BEEN FIXED)

FIRSTAID2:

   FIRSTAID2LOCATIONCHECK:

      put look

      Match FIRSTAID2RELOCATE In The Water
      Match FIRSTAID2LOCCHEKCFAILED Obvious
      Matchwait

   FIRSTAID2RELOCATE:

      counter set 1

      goto FIRSTAID2MOVE%c%

   FIRSTAID2MOVE1:

      move N
      counter add 1
      goto FIRSTAID2WORMCHECK

    FIRSTAID2MOVE2:

      move NE
      counter add 1
      goto FIRSTAID2WORMCHECK

    FIRSTAID2MOVE3:

      move E
      counter add 1
      goto FIRSTAID2WORMCHECK

    FIRSTAID2MOVE4:

      move SE
      counter add 1
      goto FIRSTAID2WORMCHECK

    FIRSTAID2MOVE5:

      move S
      counter add 1
      goto FIRSTAID2WORMCHECK

   FIRSTAID2MOVE6:

      move SW
      counter add 1
      goto FIRSTAID2WORMCHECK

   FIRSTAID2MOVE7:

      move W
      counter set 1
      goto FIRSTAID2WORMCHECK

   FIRSTAID2WORMCHECK:

      put look DAMIAN

      Match FIRSTAID2MOVE%c% You are in good shape
      Match FIRSTAID2REMOVEWORMRL on your right leg
      Match FIRSTAID2REMOVEWORMLL on your left leg
      Match FIRSTAID2WORMFIND You are wearing
      Matchwait

   FIRSTAID2WORMFIND:

      pause 5
      put look DAMIAN
 
      Match FIRSTAID2REMOVEWORMRL on your right leg
      Match FIRSTAID2REMOVEWORMLL on your left leg
      Match FIRSTAID2WORMFIND You are wearing
      Matchwait

   FIRSTAID2REMOVEWORMRL:

      put tend my right leg
      waitfor seconds.
      goto FIRSTAID2EXPCHECK

   FIRSTAID2REMOVEWORMLL:

      put tend my left leg
      waitfor seconds.
      goto FIRSTAID2EXPCHECK

   FIRSTAID2EXPCHECK:

      put exp skill fa

      Match FIRSTAID2DONE mind lock
      Match FIRSTAID2WORMCHECK EXP HELP
      Matchwait      

   FIRSTAID2LOCCHECKFAILED:

      echo
      echo ************************************************************************
      echo You must be located in the Crocodile Marsh for this script to start. It
      echo is located just south and east of the north bank of the ferry to River-
      echo haven. Go to the marsh, past the reeds, and start this script again.
      echo You must be in [The Marsh, In The Water].
      echo ************************************************************************
      echo

   FIRSTAID2DONE:

      goto NEXTFUNCTION

#end FIRSTAID2 function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin MAKEROPE function (THIS FUNCTION HAS BEEN FIXED)

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 (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin ASTROLOGY function (THIS FUNCTION HAS BEEN FIXED)

ASTROLOGY:

   counter set 1
   save ASTROLOGYSUPSPELLS2

   ASTROLOGYINDOORCHECK:

      pause

      put obs weather

      Match ASTROLOGYKILLRT ...wait
      Match ASTROLOGYFUNCTIONEND you can see the sky
      Match ASTROLOGYSUPSPELLS You glance outside.
      Match ASTROLOGYSUPSPELLS You glance up at the sky
      Matchwait

   ASTROLOGYSUPSPELLS:

      goto GPIERCINGGAZE

   ASTROLOGYSUPSPELLS2:

      save ASTROLOGYSTUDYKATAMBA
      goto GAURASIGHT

   ASTROLOGYRESETCTR:

      counter set 1

   ASTROLOGYSTUDYSKY:

      pause

      put %HUMTHISTUNE%
      put study SKY

      Match ASTROLOGYSTUDYSKY ...wait
      Match ASTROLOGYBRIEFPAUSE You feel it is too soon
      Match ASTROLOGY%c% You feel a lingering sense
      Match ASTROLOGYPREDICTEVENT unable to sense additional information
      Match ASTROLOGYPREDICTEVENT Seconds.
      Matchwait

      ASTROLOGYBRIEFPAUSE:

         pause 5
         goto ASTROLOGYSTUDYSKY

      ASTROLOGY1:
      ASTROLOGY2:
      ASTROLOGY3:
      ASTROLOGY4:
      ASTROLOGY5:
      ASTROLOGYADJUSTCTR:

         counter add 1
         pause 11
         goto ASTROLOGYSTUDYSKY

      ASTROLOGY6:
      ASTROLOGY7:
      ASTROLOGY8:
         goto %s%

      ASTROLOGYPREDICTEVENT:

         pause

         put predict EVENT

         Match ASTROLOGYPREDICTEVENT ...wait
         Match ASTROLOGYADJUSTCTR You focus inwardly searching for insight
         Matchwait

   ASTROLOGYSTUDYKATAMBA:

      save ASTROLOGYSTUDYKATAMBA

      pause

      put study KATAMBA

      Match ASTROLOGYKILLRT ...wait
      Match ASTROLOGYEXPLORE You manage to memorize
      Match ASTROLOGYEXPLORE focus on grasping it better.
      Match ASTROLOGYEXPLORE still swimming
      Match ASTROLOGYCASTPIERCINGGAZE clouds hinder
      Match ASTROLOGYSTUDYXIBAR You are unable to comprehend
      Match ASTROLOGYSTUDYXIBAR fail to find
      Matchwait

   ASTROLOGYSTUDYXIBAR:

      save ASTROLOGYSTUDYXIBAR

      pause

      put study XIBAR

      Match ASTROLOGYKILLRT ...wait
      Match ASTROLOGYEXPLORE You manage to memorize
      Match ASTROLOGYEXPLORE focus on grasping it better.
      Match ASTROLOGYEXPLORE still swimming
      Match ASTROLOGYCASTPIERCINGGAZE clouds hinder
      Match ASTROLOGYSTUDYYAVASH You are unable to comprehend
      Match ASTROLOGYSTUDYYAVASH fail to find
      Matchwait

   ASTROLOGYSTUDYYAVASH:

      save ASTROLOGYSTUDYYAVASH

      pause

      put study YAVASH

      Match ASTROLOGYKILLRT ...wait
      Match ASTROLOGYEXPLORE You manage to memorize
      Match ASTROLOGYEXPLORE focus on grasping it better.
      Match ASTROLOGYEXPLORE still swimming
      Match ASTROLOGYCASTPIERCINGGAZE clouds hinder
      Match ASTROLOGYSTUDYSUN You are unable to comprehend
      Match ASTROLOGYSTUDYSUN fail to find
      Matchwait

   ASTROLOGYSTUDYSUN:

      save ASTROLOGYSTUDYSUN

      pause

      put study SUN

      Match ASTROLOGYKILLRT ...wait
      Match ASTROLOGYEXPLORE You manage to memorize
      Match ASTROLOGYEXPLORE focus on grasping it better.
      Match ASTROLOGYEXPLORE still swimming
      Match ASTROLOGYCASTPIERCINGGAZE clouds hinder
      Match ASTROLOGYSTUDYWOLF You are unable to comprehend
      Match ASTROLOGYSTUDYWOLF fail to find
      Matchwait

   ASTROLOGYSTUDYWOLF:

      save ASTROLOGYSTUDYWOLF

      pause

      put study WOLF

      Match ASTROLOGYKILLRT ...wait
      Match ASTROLOGYEXPLORE You manage to memorize
      Match ASTROLOGYEXPLORE focus on grasping it better.
      Match ASTROLOGYEXPLORE still swimming
      Match ASTROLOGYCASTPIERCINGGAZE clouds hinder
      Match ASTROLOGYSTUDYRAVEN You are unable to comprehend
      Match ASTROLOGYSTUDYRAVEN fail to find
      Matchwait

   ASTROLOGYSTUDYRAVEN:

      save ASTROLOGYSTUDYRAVEN

      pause

      put study RAVEN

      Match ASTROLOGYKILLRT ...wait
      Match ASTROLOGYEXPLORE You manage to memorize
      Match ASTROLOGYEXPLORE focus on grasping it better.
      Match ASTROLOGYEXPLORE still swimming
      Match ASTROLOGYCASTPIERCINGGAZE clouds hinder
      Match ASTROLOGYSTUDYCAT You are unable to comprehend
      Match ASTROLOGYSTUDYCAT fail to find
      Matchwait

   ASTROLOGYSTUDYCAT:

      save ASTROLOGYSTUDYCAT

      pause

      put study CAT

      Match ASTROLOGYKILLRT ...wait
      Match ASTROLOGYEXPLORE You manage to memorize
      Match ASTROLOGYEXPLORE focus on grasping it better.
      Match ASTROLOGYEXPLORE still swimming
      Match ASTROLOGYCASTPIERCINGGAZE clouds hinder
      Match ASTROLOGYSTUDYRAM You are unable to comprehend
      Match ASTROLOGYSTUDYRAM fail to find
      Matchwait

   ASTROLOGYSTUDYRAM:

      save ASTROLOGYSTUDYRAM

      pause

      put study RAM

      Match ASTROLOGYKILLRT ...wait
      Match ASTROLOGYEXPLORE You manage to memorize
      Match ASTROLOGYEXPLORE focus on grasping it better.
      Match ASTROLOGYEXPLORE still swimming
      Match ASTROLOGYCASTPIERCINGGAZE clouds hinder
      Match ASTROLOGYSTUDYMAGPIE You are unable to comprehend
      Match ASTROLOGYSTUDYMAGPIE fail to find
      Matchwait

   ASTROLOGYSTUDYMAGPIE:

      save ASTROLOGYSTUDYMAGPIE

      pause

      put study MAGPIE

      Match ASTROLOGYKILLRT ...wait
      Match ASTROLOGYEXPLORE You manage to memorize
      Match ASTROLOGYEXPLORE focus on grasping it better.
      Match ASTROLOGYEXPLORE still swimming
      Match ASTROLOGYCASTPIERCINGGAZE clouds hinder
      Match ASTROLOGYSTUDYHEART You are unable to comprehend
      Match ASTROLOGYSTUDYHEART fail to find
      Matchwait

   ASTROLOGYSTUDYHEART:

      save ASTROLOGYSTUDYHEART

      pause

      put study HEART

      Match ASTROLOGYKILLRT ...wait
      Match ASTROLOGYEXPLORE You manage to memorize
      Match ASTROLOGYEXPLORE focus on grasping it better.
      Match ASTROLOGYEXPLORE still swimming
      Match ASTROLOGYCASTPIERCINGGAZE clouds hinder
      Match ASTROLOGYSTUDYGIANT You are unable to comprehend
      Match ASTROLOGYSTUDYGIANT fail to find
      Matchwait

   ASTROLOGYSTUDYGIANT:

      save ASTROLOGYSTUDYGIANT

      pause

      put study GIANT

      Match ASTROLOGYKILLRT ...wait
      Match ASTROLOGYEXPLORE You manage to memorize
      Match ASTROLOGYEXPLORE focus on grasping it better.
      Match ASTROLOGYEXPLORE still swimming
      Match ASTROLOGYCASTPIERCINGGAZE clouds hinder
      Match ASTROLOGYSTUDYSPIDER You are unable to comprehend
      Match ASTROLOGYSTUDYSPIDER fail to find
      Matchwait

   ASTROLOGYSTUDYSPIDER:

      save ASTROLOGYSTUDYSPIDER

      pause

      put study SPIDER

      Match ASTROLOGYKILLRT ...wait
      Match ASTROLOGYEXPLORE You manage to memorize
      Match ASTROLOGYEXPLORE focus on grasping it better.
      Match ASTROLOGYEXPLORE still swimming
      Match ASTROLOGYCASTPIERCINGGAZE clouds hinder
      Match ASTROLOGYSTUDYKATAMBA You are unable to comprehend
      Match ASTROLOGYSTUDYKATAMBA fail to find
      Matchwait

   ASTROLOGYCASTPIERCINGGAZE:

      goto GPIERCINGGAZE

   ASTROLOGYEXPLORE:

      put exp lore all

      Match ASTROLOGYFUNCTIONEND murky
      Match ASTROLOGYFUNCTIONEND dense
      Match ASTROLOGYFUNCTIONEND thick
      Match ASTROLOGYRESETCTR EXP HELP for more information
      Matchwait

   ASTROLOGYKILLRT:

      pause
      goto %s%

   ASTROLOGYFUNCTIONEND:

      put %HUMTHISTUNE%
      waitfor finish humming

      goto NEXTFUNCTION

#end ASTROLOGY function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin MAGIC2 function (THIS FUNCTION HAS BEEN FIXED)

MAGIC2:

   save MAGIC2SOD

   counter set 0

   MAGIC2SODGETTOOLS:

      Match MAGIC2SODGETTOOLS ...wait
      Match MAGIC2MANACHECK already holding that
      Match MAGIC2MANACHECK You get
      Match MAGIC2MANACHECK But that is already in your
      Match MAGIC2SODNOTOOLS What were you referring to

      put get %CAMBRINTHDEVICE%

      Matchwait

   MAGIC2EXPCHECK0:
   MAGIC2EXPCHECK1:
   MAGIC2EXPCHECK2:
   MAGIC2EXPCHECK3:
   MAGIC2EXPCHECK4:

   MAGIC2MANACHECK:

      Match MAGIC2SODSTOWTOOLS S>>>>>_
      Match MAGIC2SODSTOWTOOLS S>>>>_
      Match MAGIC2SODSTOWTOOLS S>>>_
      Match MAGIC2SODSTOWTOOLS S>>_
      Match MAGIC2SODSTOWTOOLS S>_
      Match MAGIC2SODSTOWTOOLS S_
      Match MAGIC2SOD MANA HELP

      put mana

      Matchwait

   MAGIC2SOD:

      setvariable RETURNPOINTER MAGIC2SOD

      Match KILLHUMMING should stop playing before
      Match MAGIC2SOD ...wait
      Match MAGIC2SODSTOWTOOLS You have to strain
      Match MAGIC2SODCHARGEORB Seal of Deflection spell

      put prep SEAL OF DEFLECTION 5

      Matchwait

   MAGIC2SODCHARGEORB:

      Match MAGIC2SODCHARGEORB ...wait
      Match MAGIC2SODSTOWTOOLS cannot harness that much power
      Match MAGIC2SODFOCUSORB Roundtime

      put charge my %CAMBRINTHDEVICE% 20

      Matchwait

   MAGIC2SODFOCUSORB:

      put focus my %CAMBRINTHDEVICE%

      Match MAGIC2SODFOCUSORB ...wait
      Match MAGIC2SOINCREASECOUNTER forge a magical link to it
      Match MAGIC2SOINCREASECOUNTER is intact
      Matchwait

   MAGIC2SOINCREASECOUNTER:

      counter add 1
      goto MAGIC2SODCAST

   MAGIC2SODCAST:

      Match MAGIC2SODCAST ...wait
      Match MAGIC2EXPCHECK%c% shifting plexus
      Match MAGIC2SODSTOWTOOLS backfires
      Match MAGIC2SODSTOWTOOLS You are unable to harness

      put cast

      Matchwait

   MAGIC2SODNOTOOLS:

      save MAGIC2SODNOTOOLS

      Match MAGIC2SODNOTOOLS ...wait
      Match MAGIC2ENDFUNCTION You have to strain
      Match MAGIC2SODFULLPREP Seal of Deflection spell

      put prep SEAL OF DEFLECTION 20

      Matchwait

   MAGIC2SODFULLPREP:

      waitfor You feel fully prepared
      goto MAGIC2SODCAST

   MAGIC2EXPCHECK5:
   MAGIC2EXPMAGIC:

      counter set 0

      Match MAGIC2EXPHARNESS mind lock
      Match MAGIC2MANACHECK EXP HELP for more information

      put exp skill primary magic

      Matchwait

   MAGIC2EXPHARNESS:

      Match MAGIC2EXPMAGDEVICES mind lock
      Match MAGIC2MANACHECK EXP HELP for more information

      put exp skill harness

      Matchwait

   MAGIC2EXPMAGDEVICES:

      Match MAGIC2SODSTOWTOOLS mind lock
      Match MAGIC2MANACHECK EXP HELP for more information

      put exp skill magical devices

      Matchwait

   MAGIC2SODSTOWTOOLS:

      pause
      put stow ORB in %LARGESTORAGECONTAINER%

      goto NEXTFUNCTION

#end MAGIC2 function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin SWIMMING function (THIS FUNCTION HAS BEEN FIXED)

SWIMMING:

   SWIMMINGLOCATIONCHECK:

      put look

      Match SWIMSOUTH [Mill Pond]
      Match SWIMMINGLOCATIONCHECKFAIL Obvious
      Matchwait

   SWIMSOUTH:

      pause

      put south

      Match SWIMSOUTH ...wait
      Match SWIMNORTH Maple leaves swirl atop the muddy brown water
      Match SWIMSOUTH Obvious
      Match SWIMSOUTH fail
      Match SWIMSOUTH swim south
      Matchwait

   SWIMNORTH:

      save SWIMSOUTH

      pause

      put north

      Match SWIMNORTH ...wait
      Match EXPSWIMMING [Mill Pond]
      Match SWIMNORTH Obvious
      Match SWIMNORTH fail
      Matchwait

   EXPSWIMMING:

      put exp skill swimming

      Match NEXTFUNCTION mind lock
      Match %s% EXP HELP for more information
      Matchwait

   SWIMMINGLOCATIONCHECKFAIL:

      echo
      echo ************************************************************************
      echo You must be located at the [Mill Pond] in order for this script to start
      echo it is located, n, n, n, ne, ne, go trail, go tav, go door, go pond from
      echo the NE Crossing Gate.
      echo ************************************************************************
      echo

      goto NEXTFUNCTION

#end SWIMMING function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin CLIMBING function (THIS FUNCTION HAS BEEN FIXED)

CLIMBING:

   CLIMBINGLOCATIONCHECK:

      put look

      Match CLIMBINGSTART The Guild Stables
      Match CLIMBINGLOCATIONCHECKFAIL Obvious
      Matchwait

   CLIMBINGSTART:

      CLIMBTRAILDOWN:

         put climb trail
         move up
         move west

      CLIMBCREEPERDOWN:

         save CLIMBCREEPERDOWN
         pause

         put climb creeper

         Match CLIMBCREEPERDOWN ...wait
         Match CLIMBINGSTAND SPLAT
         Match CLIMBLADDERDOWN Roundtime
         Matchwait

      CLIMBLADDERDOWN:

         pause

         put climb ladder

         Match CLIMBLADDERDOWN ...wait
         Match CLIMBROPEDOWN Round time
         Matchwait

      CLIMBROPEDOWN:

         pause

         put climb rope

         Match CLIMBROPEDOWN ...wait
         Match CLIMBROPEUP rope
         Matchwait

      CLIMBROPEUP:

         pause

         put climb rope

         Match CLIMBROPEUP ...wait
         Match CLIMBLADDERUP rope
         Matchwait

      CLIMBLADDERUP:

         pause

         put climb ladder

         Match CLIMBLADDERUP ...wait
         Match CLIMBCREEPERUP Round time
         Matchwait

      CLIMBCREEPERUP:

         save CLIMBCREEPERUP
         pause

         put climb creeper

         Match CLIMBCREEPERUP ...wait
         Match CLIMBINGSTAND SPLAT
         Match CLIMBTRAILUP Roundtime
         Matchwait

      CLIMBTRAILUP:         

         pause
         move east
         move down
         put climb trail
         pause

   EXPCLIMBING:

      put exp skill climbing

      Match NEXTFUNCTION mind lock
      Match CLIMBINGSTART EXP HELP for more information
      Matchwait

   CLIMBINGSTAND:

      pause
      put dance

      Match CLIMBINGSTAND ...wait
      Match %s% You leap to your feet
      Matchwait

   CLIMBINGLOCATIONCHECKFAIL:

      echo
      echo ************************************************************************
      echo You must be located at the [Northern Trade Road, Foothills] in order for
      echo this script to start, it is located northeast of rock trolls and south
      echo of leucros
      echo ************************************************************************
      echo

      goto NEXTFUNCTION

#end CLIMBING function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin CLIMBING2 function (THIS FUNCTION HAS BEEN FIXED)

CLIMBING2:

   CLIMBING2LOCATIONCHECK:

      put look

      Match CLIMBING2START transitional block of busy Commerce Avenue
      Match CLIMBING2LOCATIONCHECKFAIL Obvious
      Matchwait

   CLIMBING2START:

      move n
      move n
      move n
      move n
      move n
      move n
      move w
      move w
      move w
      move go gate
      move go path
      move w
      move w
      move s
      move s
      move climb peartree
      move climb peartree
      move n
      move n
      move nw
      move w
      move w
      move nw
      move w
      move w
      move sw
      move w
      move w
      move nw
      move nw
      move w
      move go gate
      move s
      move se
      move s
      move go cott
      move go ramp
      move climb ladder
      move climb ladder
      move go ramp
      move out
      move sw
      move go green
      move e
      move go church
      move climb ladder
      move climb ladder
      move out
      move w
      move n
      move ne
      move n
      move nw
      move n
      move go gate
      move w
      move nw
      move w
      move w
      move go brook
      put w
      pause 2
      put w
      pause 2
      move w
      move sw
      move w
      move w
      move w
      move w
      move climb trail
      move climb cliff
      move climb cliff
      move climb trail
      move e
      move n
      move e
      move go bramble
      move ne
      move ne
      move n
      move ne
      move climb tree
      move nw
      move nw
      move nw
      move down
      move e
      move ne
      move climb root
      move n
      move ne
      move ne
      move n
      move go bush
      move nw
      move n
      move nw
      move go outcrop
      move go outcrop
      move se
      move s
      move se
      move go bush
      move s
      move sw
      move sw
      move s
      move climb root
      move sw
      move w
      move up
      move se
      move se
      move se
      move climb tree
      move sw
      move s
      move sw
      move go patch
      move s
      move se
      move e
      move ne
      move e
      move go brook
      put e
      pause 2
      put e
      pause 2
      move e
      move e
      move se
      move e
      move e
      move se
      move se
      move e
      move e
      move ne
      move e
      move e
      move se
      move e
      move e
      move se
      move e
      move e
      move go path
      move go trail
      move ne
      move e
      move climb deadfall
      move down
      move w
      move sw
      move s
      move go gate
      move e
      move e
      move e
      move e
      move e
      move e
      move e
      move n
      move e
      move e
      move n
      move n
      move w
      move go arch
      move n
      move ne
      move ne
      move e
      move ne
      move go copse
      move climb tree
      move climb tree 
      move se
      move e
      move e
      move ne
      move ne
      move e
      move se
      move go trail
      move go tav
      move go door
      put go orchard
      move nw
      move ne
      move climb ladder
      move climb ladder
      move sw
      move se
      move go farmyard
      move climb stile
      move s
      move w
      move w
      move s
      move se
      move sw
      move s
      move s
      move climb stile
      move sw
      move sw
      move s
      move climb hill
      move e
      move e
      move e
      move climb hill
      move w
      move sw
      move w
      move w
      move climb hill
      move climb hill
      move e
      move e
      move ne
      move e
      move climb hill
      move w
      move w
      move w
      move climb hill
      move go trail
      move ne
      move ne
      move n
      move nw
      move nw
      move n
      move n
      move ne
      move nw
      move n
      move n
      move e
      move down
      move down
      move go gate
      move n
      move n
      move w
      move s
      move climb tree
      move climb tree
      move n
      move e
      move s
      move s
      move go gate
      move up
      move up
      move w
      move s
      move s
      move se
      move sw
      move s
      move s
      move se
      move w
      move sw
      move sw
      move w
      move w
      move go copse
      move climb tree
      move climb tree
      move sw
      move sw
      move w
      move sw
      move sw
      move s
      move go arch
      move e
      move s
      move s
      move w
      move w
      move s
      move w
      move w
      move go bridge
      move w
      move s
      move s
      move s
      move s
      move s
      move s

   EXPCLIMBING2:

      put exp skill climbing

      echo
      echo NOD to go again, ESC to cancel script.
      echo
      Match CLIMBING2START You nod
      Matchwait

   CLIMBING2LOCATIONCHECKFAIL:

      echo
      echo ************************************************************************
      echo You must be located at the [The Crossing, Commerce Avenue] in order for
      echo this script to start, this location is near the Trader's guild in front
      echo of some massive iron doors.
      echo ************************************************************************
      echo

      goto NEXTFUNCTION

#end CLIMBING2 function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin COMBATSPELLS function (THIS FUNCTION HAS BEEN FIXED)

COMBATSPELLS:

   setvariable RETURNPOINTER COMBATSETMYGLOBALMOON
   goto KILLHUMMING

   COMBATSETMYGLOBALMOON:

      if_2 setvariable GLOBALMOON %2%
      if_2 goto COMBATSUPSPELL1

      setvariable RETURNPOINTER COMBATSUPSPELL1
      goto FINDMOON

   COMBATSUPSPELL1:

      save COMBATSUPSPELL2
      goto GFM

   COMBATSUPSPELL2:

      save COMBATSUPSPELL3
      goto GDG

   COMBATSUPSPELL3:

      save COMBATSUPSPELL4
      goto GCONTINGENCY

   COMBATSUPSPELL4:

      save COMBATSUPSPELL5
      goto GPSY

   COMBATSUPSPELL5:

      save COMBATSUPSPELL6
      goto GSHADOWS

   COMBATSUPSPELL6:

      save COMBATSUPSPELL7
      goto GSEERSSENSE

   COMBATSUPSPELL7:

      save COMBATSUPSPELL8
      goto GCOL

   COMBATSUPSPELL8:

      save COMBATSUPSPELL9
      goto GEASE

   COMBATSUPSPELL9:

      save COMBATSUPSPELL10
      goto GSOD

   COMBATSUPSPELL10:

      goto NEXTFUNCTION

#end COMBATSPELLS function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin ENCHANTING function (THIS FUNCTION HAS BEEN FIXED)

ENCHANTING:

   ENCHANTINGSUPSPELL:

      save ENCHANTINGSUPSPELL2
      goto GCLEARVISION

   ENCHANTINGSUPSPELL2:

      save ENCHANTINGSUPSPELL3
      goto GPIERCINGGAZE

   ENCHANTINGSUPSPELL3:

      save ENCHANTINGSUPSPELL4
      goto GAURASIGHT

   ENCHANTINGSUPSPELL4:

      save NEXTFUNCTION
      goto GSEERSSENSE

#end ENCHANTING function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin GLOBALWEAPONRESET function (THIS FUNCTION HAS BEEN FIXED)

GLOBALWEAPONRESET:

   Match %s% at you
   Match %s% melee
   Matchwait

#end GLOBALWEAPONRESET function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin ME/HE/2HE function (THIS FUNCTION HAS BEEN FIXED)

ME:
HE:
2HE:

   MEHE2HEPARRY:

      save MEHE2HEFEINT


      put PARRY

      Match MEHE2HEPARRY ...wait
      Match MEHE2HEFEINT position to parry
      Matchwait

   MEHE2HEFEINT:

      put FEINT

      Match MEHE2HEFEINT ...wait
      Match MEHE2HEDRAW You feint
      Match GLOBALWEAPONRESET There is nothing else
      Match GLOBALWEAPONRESET close enough
      Matchwait

   MEHE2HEDRAW:

      put DRAW

      Match MEHE2HEDRAW ...wait
      Match MEHE2HESWEEP You step backward and
      Match MEHE2HEPARRY There is nothing else
      Match MEHE2HEPARRY close enough
      Matchwait

   MEHE2HESWEEP:

      put SWEEP

      Match MEHE2HESWEEP ...wait
      Match MEHE2HESLICE You sweep
      Match MEHE2HEPARRY There is nothing else
      Match MEHE2HEPARRY close enough
      Matchwait

   MEHE2HESLICE:

      put SLICE

      Match MEHE2HESLICE ...wait
      Match MEHE2HECHOP You slice
      Match MEHE2HEPARRY There is nothing else
      Match MEHE2HEPARRY close enough
      Matchwait

   MEHE2HECHOP:

      put CHOP

      Match MEHE2HECHOP ...wait
      Match MEHE2HEDRAW You chop
      Match MEHE2HEPARRY There is nothing else
      Match MEHE2HEPARRY close enough
      Matchwait
      

#end ME/HE/2HE function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin LE function (THIS FUNCTION HAS BEEN FIXED)

LE:

   LEPARRY:

      save LEFEINT %2%


      put PARRY

      Match LEPARRY ...wait
      Match LEFEINT position to parry
      Matchwait

   LEFEINT:

      put FEINT %2%

      Match LEFEINT ...wait
      Match LEDRAW You feint
      Match GLOBALWEAPONRESET There is nothing else
      Match GLOBALWEAPONRESET close enough
      Matchwait

   LEDRAW:

      put DRAW %2%

      Match LEDRAW ...wait
      Match LESLICE You step backward and
      Match LEPARRY There is nothing else
      Match LEPARRY close enough
      Matchwait

   LESLICE:

      put SLICE %2%

      Match LESLICE ...wait
      Match LECHOP You slice
      Match LEPARRY There is nothing else
      Match LEPARRY close enough
      Matchwait

   LECHOP:

      put CHOP %2%

      Match LECHOP ...wait
      Match LEDRAW You chop
      Match LEPARRY There is nothing else
      Match LEPARRY close enough
      Matchwait
      

#end LE function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin LB/MB/HB/2HB function (THIS FUNCTION HAS BEEN FIXED)

LB:
MB:
HB:
2HB:

   MBLB2HBPARRY:

      save MBLB2HBFEINT

      put PARRY

      Match MBLB2HBPARRY ...wait
      Match MBLB2HBFEINT position to parry
      Matchwait

   MBLB2HBFEINT:

      put FEINT

      Match MBLB2HBFEINT ...wait
      Match MBLB2HBSWEEP You feint
      Match GLOBALWEAPONRESET There is nothing else
      Match GLOBALWEAPONRESET close enough
      Matchwait

   MBLB2HBSWEEP:

      put SWEEP

      Match MBLB2HBSWEEP ...wait
      Match MBLB2HBDRAW You sweep
      Match MBLB2HBPARRY There is nothing else
      Match MBLB2HBPARRY close enough
      Matchwait

   MBLB2HBDRAW:

      put DRAW

      Match MBLB2HBDRAW ...wait
      Match MBLB2HBSLICE You step backward and
      Match MBLB2HBPARRY There is nothing else
      Match MBLB2HBPARRY close enough
      Matchwait

   MBLB2HBSLICE:

      put SLICE

      Match MBLB2HBSLICE ...wait
      Match MBLB2HBSWEEP You swing
      Match MBLB2HBPARRY There is nothing else
      Match MBLB2HBPARRY close enough
      Matchwait  

#end LB/MB/HB/2HB function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin BRAWLING function (THIS FUNCTION HAS BEEN FIXED)

BRAWLING:

   BRAWLINGPARRY:

      save BRAWLINGFEINT

      put PARRY

      Match BRAWLINGPARRY ...wait
      Match BRAWLINGFEINT position to parry
      Matchwait

   BRAWLINGFEINT:

      put FEINT

      Match BRAWLINGFEINT ...wait
      Match BRAWLINGSWEEP You feint
      Match GLOBALWEAPONRESET There is nothing else
      Match GLOBALWEAPONRESET close enough
      Matchwait

   BRAWLINGSWEEP:

      put SWEEP

      Match BRAWLINGSWEEP ...wait
      Match BRAWLINGKICK You sweep
      Match BRAWLINGPARRY There is nothing else
      Match BRAWLINGPARRY close enough
      Matchwait

   BRAWLINGKICK:

      put KICK

      Match BRAWLINGKICK ...wait
      Match BRAWLINGSLICE You kick
      Match BRAWLINGPARRY There is nothing else
      Match BRAWLINGPARRY close enough
      Matchwait

   BRAWLINGSLICE:

      put SLICE

      Match BRAWLINGSLICE ...wait
      Match BRAWLINGGOUGE You slice
      Match BRAWLINGPARRY There is nothing else
      Match BRAWLINGPARRY close enough
      Matchwait

   BRAWLINGGOUGE:

      put GOUGE

      Match BRAWLINGGOUGE ...wait
      Match BRAWLINGELBOW You gouge
      Match BRAWLINGPARRY There is nothing else
      Match BRAWLINGPARRY close enough
      Matchwait  

   BRAWLINGELBOW:

      put ELBOW

      Match BRAWLINGELBOW ...wait
      Match BRAWLINGSWEEP You elbow
      Match BRAWLINGPARRY There is nothing else
      Match BRAWLINGPARRY close enough
      Matchwait  

#end BRAWLING function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin PIKE function (THIS FUNCTION HAS BEEN FIXED)

PIKE:

   PIKEPARRY:

      save PIKEJAB

      put PARRY

      Match PIKEPARRY ...wait
      Match PIKEJAB position to parry
      Matchwait

   PIKEJAB:

      put JAB

      Match PIKEJAB ...wait
      Match PIKESWEEP You jab
      Match GLOBALWEAPONRESET There is nothing else
      Match GLOBALWEAPONRESET close enough
      Matchwait

   PIKESWEEP:

      put SWEEP

      Match PIKESWEEP ...wait
      Match PIKETHRUST You sweep
      Match PIKEPARRY There is nothing else
      Match PIKEPARRY close enough
      Matchwait

   PIKETHRUST:

      put THRUST

      Match PIKETHRUST ...wait
      Match PIKEFEINT You thrust
      Match PIKEPARRY There is nothing else
      Match PIKEPARRY close enough
      Matchwait

   PIKEFEINT:

      put FEINT

      Match PIKEFEINT ...wait
      Match PIKELUNGE You feint
      Match PIKEPARRY There is nothing else
      Match PIKEPARRY close enough
      Matchwait

   PIKELUNGE:

      put LUNGE

      Match PIKELUNGE ...wait
      Match PIKEDRAW You lunge
      Match PIKEPARRY There is nothing else
      Match PIKEPARRY close enough
      Matchwait  

   PIKEDRAW:

      put DRAW

      Match PIKEDRAW ...wait
      Match PIKEPARRY You step backward
      Match PIKEPARRY There is nothing else
      Match PIKEPARRY close enough
      Matchwait  

#end PIKE function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin QS/SS function (THIS FUNCTION HAS BEEN FIXED)

QS:
SS:

   QSPARRY:

      save QSFEINT

      put PARRY

      Match QSPARRY ...wait
      Match QSFEINT position to parry
      Matchwait

   QSFEINT:

      put FEINT

      Match QSFEINT ...wait
      Match QSDRAW You feint
      Match GLOBALWEAPONRESET There is nothing else
      Match GLOBALWEAPONRESET close enough
      Matchwait

   QSDRAW:

      put DRAW

      Match QSDRAW ...wait
      Match QSSLICE You step backward
      Match QSPARRY There is nothing else
      Match QSPARRY close enough
      Matchwait

   QSSLICE:

      put SLICE

      Match QSSLICE ...wait
      Match QSSWEEP You slice
      Match QSPARRY There is nothing else
      Match QSPARRY close enough
      Matchwait

   QSSWEEP:

      put SWEEP

      Match QSSWEEP ...wait
      Match QSCHOP You sweep
      Match QSPARRY There is nothing else
      Match QSPARRY close enough
      Matchwait

   QSCHOP:

      put CHOP

      Match QSCHOP ...wait
      Match QSFEINT You chop
      Match QSPARRY There is nothing else
      Match QSPARRY close enough
      Matchwait

#end QS/SS function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin HALBERD function (THIS FUNCTION HAS BEEN FIXED)
#combo for khuj draw/slice/sweep/chop

HALBERD:

   HALBERDTHRUST:

      save HALBERDTHRUST

      put THRUST

      Match HALBERDTHRUST ...wait
      Match HALBERDSWEEP You thrust
      Match GLOBALWEAPONRESET There is nothing else
      Match GLOBALWEAPONRESET close enough
      Matchwait

   HALBERDSWEEP:

      save HALBERDSWEEP

      put SWEEP

      Match HALBERDSWEEP ...wait
      Match HALBERDCHOP You sweep
      Match GLOBALWEAPONRESET There is nothing else
      Match GLOBALWEAPONRESET close enough
      Matchwait

   HALBERDCHOP:

      save HALBERDCHOP

      put CHOP

      Match HALBERDCHOP ...wait
      Match HALBERDTHRUST You chop
      Match GLOBALWEAPONRESET There is nothing else
      Match GLOBALWEAPONRESET close enough
      Matchwait

#end HALBERD function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin LOCKPICKING function (THIS FUNCTION HAS BEEN FIXED)

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:

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

      put put lock in %LOCKPICKSTORAGECONTAINER%

      Matchwait

   LOCKPICKINGSTOWTOOLS1:

      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 (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin FINDMOON function

   FINDMOON:

      setvariable MOONFOUNDEAST NONE
      setvariable MOONFOUNDWEST NONE

      put prep fm 10

      FINDMOONYAVASH:

         setvariable FINDMOONNEXTACTION FINDMOONXIBAR

         setvariable LOOKINGFORMOON YAVASH

         put perceive YAVASH

         Match FINDMOONYAVASH ...wait
         Match FINDMOONEAST degrees above the eastern
         Match FINDMOONWEST degrees above the western
         Match FINDMOONNO not visible
         Matchwait

      FINDMOONXIBAR:

         setvariable FINDMOONNEXTACTION FINDMOONKATAMBA

         setvariable LOOKINGFORMOON XIBAR

         put perceive XIBAR

         Match FINDMOONXIBAR ...wait
         Match FINDMOONEAST degrees above the eastern
         Match FINDMOONWEST degrees above the western
         Match FINDMOONNO not visible
         Matchwait

      FINDMOONKATAMBA:

         setvariable FINDMOONNEXTACTION CASTEASTMOON

         setvariable LOOKINGFORMOON KATAMBA

         put perceive KATAMBA

         Match FINDMOONKATAMBA ...wait
         Match FINDMOONEAST degrees above the eastern
         Match FINDMOONWEST degrees above the western
         Match FINDMOONNO not visible
         Matchwait

      FINDMOONEAST:

         setvariable MOONFOUNDEAST %LOOKINGFORMOON%
         goto %FINDMOONNEXTACTION%

      FINDMOONWEST:

         setvariable MOONFOUNDWEST %LOOKINGFORMOON%
         goto %FINDMOONNEXTACTION%

      FINDMOONNO:

         goto %FINDMOONNEXTACTION%

      CASTEASTMOON:

         setvariable GLOBALMOON %MOONFOUNDEAST%

         Match CASTEASTMOON ...wait
         Match %RETURNPOINTER% into the area.
         Match CASTWESTMOON three moons

         put cast %MOONFOUNDEAST%

         Matchwait

      CASTWESTMOON:

         setvariable GLOBALMOON %MOONFOUNDWEST%

         Match CASTWESTMOON ...wait
         Match %RETURNPOINTER% into the area.
         Match NOMOONFOUND three moons

         put cast %MOONFOUNDWEST%

         Matchwait

      NOMOONFOUND:

         echo =============================================================
         echo NO MOON LOCATED IN THE SKY PLEASE REVIEW YOUR SPELL SELECTION
         echo =============================================================
         exit

#end FINDMOON function
==================================================================================
==================================================================================
#begin GATHERAMMO function

   GATHERAMMO:

      Match GATHERAMMO ...wait
      Match GATHERAMMOFINISHED %AMMUNITIONCONTAINER%
      Match GATHERAMMOSTOW You pull
      Match GATHERAMMOSTOW You pick up
      Match GATHERAMMOSTOW You are already holding
      Match GATHERAMMOUNLOAD You must unload
      
      put get %2%

      Matchwait

   GATHERAMMOSTOW:

      Match GATHERAMMOSTOW ...wait
      Match GATHERAMMO You put your

      put put %2% in my %AMMUNITIONCONTAINER%

      Matchwait

   GATHERAMMOUNLOAD:

      Match GATHERAMMOUNLOAD ...wait
      Match GATHERAMMOFINISHED You unload

      put unload

      Matchwait

   GATHERAMMOFINISHED:

      Match GATHERAMMOFINISHED ...wait
      Match NEXTFUNCTION You put your

      put put %2% in my %AMMUNITIONCONTAINER%
      put sheath

      Matchwait

#end GATHERAMMO function
==================================================================================
==================================================================================
#begin KILLHUMMING function (THIS FUNCTION HAS BEEN FIXED)

   KILLHUMMING:

      put stop hum

      goto %RETURNPOINTER%

#end KILLHUMMING function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin KILLSPELLPREP function (THIS FUNCTION HAS BEEN FIXED)

   KILLSPELLPREP:

      put release

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

#end KILLSPELLPREP function (THIS FUNCTION HAS BEEN FIXED)
==================================================================================
==================================================================================
#begin RPA function

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

   CLARIFYGEMSCASTPG:

      save CLARIFYGEMSIDGEM

      goto GPG

   CLARIFYGEMSIDGEM:

      Match SAVERUBY ruby,
      Match SAVEBLOODSTONE bloodstone,
      Match NEXTFUNCTION There is nothing in there.

      put look in %GEMLOCATION%

      Matchwait

   SAVERUBY:

      setvariable GEMTYPE ruby
      goto CLARIFYGEMSGETGEM

   SAVEBLOODSTONE:

      setvariable GEMTYPE bloodstone
      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 NEXTFUNCTION

      Match CLARIFYGEMSPREPCG ...wait
      Match CLARIFYGEMSWAITTOCAST %SPELLPREPMESSAGE%
      Match KILLSPELLPREP You have to strain to harness the energy

      put prep clarify gem 10

      Matchwait

   CLARIFYGEMSWAITTOCAST:

      put perc katamb
      pause

      put perc xibar
      pause

      put perc yavash
      pause

      put perc planet
      pause

   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

   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 GLOBAL SPELL TEMPLATE function (THIS FUNCTION HAS BEEN FIXED2)

MAINSPELLNAME:

####################################################################################################
#
#   General description of what this function does including spell prep amount, harnessed amount
#   and total mana cast. The template will prep a spell at minimum mana and harness 2 x 20 mana.
#   If the spell has a target, the targeted section should be updated, if not erase it.
#
####################################################################################################

   SUBSPELLNAME:

      setvariable RETURNPOINTER PREPSPELL

   PREPSPELL:

      counter set 1

      put prep SPELLNAME

      Match PREPSPELL ...wait
      Match KILLHUMMING You should stop playing
      Match KILLSPELLPREP You are already preparing
      Match KILLSPELLPREP You have to strain
      Match SPELLFULLPREP %SPELLPREPMESSAGE%
      Matchwait

   SPELLFULLPREP:

      waitfor You feel fully prepared

      setvariable RETURNPOINTER %s%

   SPELLHARNESS1:
   SPELLHARNESS2:

      put harness 20

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

   SPELLUPDATECOUNTER:

      counter add 1

      goto SPELLHARNESS%c%

   SPELLHARNESS3:
   SPELLHARNESS4:
   SPELLHARNESS5:
   SPELLHARNESS6:
   SPELLHARNESS7:
   SPELLHARNESS8:
   SPELLHARNESS9:
   SPELLHARNESS10:

   SPELLCAST:

      counter set 0

      put cast %GLOBALSPELLTARGET%

      Match SPELLCAST ...wait
      Match %s% You gesture
      Matchwait

   MAINSPELLNAMEAT:
   SUBSPELLNAMEAT:

      if_2 setvariable GLOBALSPELLTARGET %2%
      goto MAINSPELLNAME

#end GLOBAL SPELL TEMPLATE function (THIS FUNCTION HAS BEEN FIXED2)
==================================================================================
==================================================================================
NEXTFUNCTION:

   shift

   goto %1%

   exit

labelError:

   if_2 goto NEXTFUNCTION

   exit