Advertisement
Vamperica

DR Hunt

Sep 3rd, 2017
905
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ########################################################
  2. #Version 58 (7/7/2016)
  3. #Edited by the player of Isharon to work with Combat 3.1
  4. #Other major contributors to Geniehunter 3.1 include Azarael and Londrin.
  5. #Download: http://www.genieclient.com/bulletin/files/file/175-geniehunter-31-and-geniebuff-31/
  6. #Support Thread: http://www.genieclient.com/bulletin/topic/4644-download-combat-geniehunter-31-and-geniebuff-31/
  7. #*added construct mode (Empath-safe weapon and TM training by Londrin)
  8. #*added Nissa mode (Empath debilitation training)
  9. #*added point mode for hidden creatures (Azarael)
  10. #*added enhanced multi setup support (Azarael)
  11. #*replaced skill checks with 3.1 skill names
  12. #*removed humming and all references thereto
  13. #*replaced damaging combat maneuvers with attack (kludge)
  14. #*reduced minimum attunement for Geniebuff to 80% (if toupper("$GH_BUFF") = "ON" and $mana > 80 then gosub GH_BUFF_ON)
  15. #*added tactics training mode for melee weapons (Londrin and Azarael)
  16. #*fixed TM (Azarael)
  17. #*removed nuggets and bars from gem loot
  18. #*fixed issues with worn bundles (Londrin) and ARRANGE ALL (Azarael)
  19. #*added Barbarian magic training (Londrin)
  20. #*added manipulation mode (empathy training) (Isharon)
  21. #*added Paralysis mode (Empath TM training) (Isharon with bug fixes by Londrin)
  22. #*added Analysis/combo mode (Azarael)
  23. #*added Thief mark (trains appraisal and perception) (Londrin)
  24. #*added support for arranging for bones or parts (Londrin)
  25. #*added optional Thief/mark syntax (Londrin)
  26. #*added support for Thief khri (Londrin)
  27. #*added support for throwing bonded weapons (Azarael)
  28. ########################################################
  29.  
  30. put #class arrive off
  31. put #class racial off
  32. put #class rp off
  33. put #class combat on
  34. put #class joust off
  35. put #class shop off
  36. put skills
  37. waitforre ^EXP HELP for more information
  38.  
  39. #CHECK HERE
  40. put #var save
  41. #debuglevel 10
  42. ##########################################################################
  43. ##                                                                      ##
  44. ##                   General combat script                              ##
  45. ##             By: Warneck (with help from SFHunter)                    ##
  46. ##                                                                      ##
  47. ##      General Options:                                                ##
  48. ## APPR: appraises monsters, will not appraise if appraisal is locked   ##
  49. ## ARRANGE #: arranges skinnable creatures before skinning them         ##
  50. ##      The # designates the number of times you want to arrange (1-5)  ##
  51. ##      If no # entered, will default to 1 time                         ##
  52. ## BARB: Analyzes monsters with Barbarian options for Expertise         ##
  53. ##      syntax is BARB (type)                                           ##
  54. ##      Valid types are: FLAME, ACCURACY, DAMAGE, INTIMIDATION,         ##
  55. ##      FATIGUE, BALANCE, VITALITY, RAGE or CALM.                       ##
  56. ## Only one type at a time can be active.                               ##
  57. ## BLOCK: sets stance to shield stance                                  ##
  58. ## BONE: arranges for bones                                             ##
  59. ## BUFF: uses buffing subroutine                                        ##
  60. ## BUNDLE: bundles skins if you have ropes.  Bundles are untied, and    ##
  61. ##      dropped.  See TIE and WEAR for other options                    ##
  62. ## COLLECTIBLE: loots collectibles (diras and cards)                    ##
  63. ## COUNT/DANCE: dances with X number of creatues.                       ##
  64. ## CUSTOM: sets stance to custom stance                                 ##
  65. ## DANGER: part of the BUFF command, it sets BUFF and retreats during   ##
  66. ##      casting                                                         ##
  67. ## DEFAULT: use the default setting, use DSET fist to set up defaults   ##
  68. ##      can also use .hunt with no arguments to do this                 ##
  69. ## DMSET: setup for multi-weapon with default settings                  ##
  70. ##      use is .hunt dmset weapon1 weapon2 ...                          ##
  71. ## DMULTI: Multi-weapon with default settings                           ##
  72. ## DODGE/EVADE: sets stance to evasion stance                           ##
  73. ## DSET: used to set up the default settings                            ##
  74. ##      run .hunt DSET <<all other options>> once to set the            ##
  75. ##      defaults, this will go through init like normal, and then       ##
  76. ##      save all the settings globally for use as default               ##
  77. ## ENCHANTE: casts designated Bard cyclic every 7 minutes               ##
  78. ## EXP: checks weapon experience.  Will end script when skill is        ##
  79. ##      bewildered or above                                             ##
  80. ## HUNT: will use the HUNT verb to train perception and stealth, but    ##
  81. ##      will not move around the hunting ground                         ##
  82. ## JUGGLE/YOYO: juggles when no more monsters in the room               ##
  83. ## JUNK: loots scrolls/runestones/cards, exclusive from LOOT            ##
  84. ## KHRI: Uses Thief khri. Please use the khri's name in lowercase       ##
  85. ## to set the correct variables on for the khri you use                 ##
  86. ## LOOTALL: loots everything it can                                     ##
  87. ## LOOTBOXES: loots  boxes, redundant if used with LOOTALL              ##
  88. ## LOOTCOINS: loots coins, redundant if used with LOOTALL               ##
  89. ## LOOTGEMS: loots gems, redundant if used with LOOTALL                 ##
  90. ## MANIP: adds manipulation (empathy training);                         ##
  91. ## requires $manipulate variable                                        ##
  92. ## MARK (Thief only): Utilizes MARK ALL instead of APPRAISE             ##
  93. ## MSET: setup for multi-weapon, break up multi setups with quotation   ##
  94. ##      marks: .hunt "setup 1" "setup 2"..."setup 10"                   ##
  95. ##      supports up to 10 setups currently                              ##
  96. ##      setups are saved as GH_MULTI_# for edittabillity                ##
  97. ## MULTI: multi-weapon training, will use a weapon until locked         ##
  98. ##      then switch to the next setup when locked                       ##
  99. ## NECROHEAL: Necromancer healing.  Only use if you have the consume    ##
  100. ##      spell.  Will not activate if below 80% mana or if               ##
  101. ##      $roomplayers shows anyone present.  Minor scuffs                ##
  102. ##      are not healed.                                                 ##
  103. ## NECRORITUAL: Will perform a necromancer ritual, if of right guild    ##
  104. ##      and $roomplayers shows no one present.  Options are             ##
  105. ##      dissect, preserve, harvest, arise.  If no ritual is specified,  ##
  106. ##      will use dissect. Usage is                                      ##
  107. ##      .hunt necroritual dissect/preserve/harvest/arise                ##
  108. ## NOEVASION: Will skip the evasion stance when switching stances       ##
  109. ## NOPARRY: Will skip the parry stance when switching stances           ##
  110. ## NOSHIELD: Will skip the shield stance when switching stances         ##
  111. ## PARALYSIS: shock-free TM training for Empaths                        ##
  112. ##      requires $paralysis variable                                    ##
  113. ## PART: arranges for parts                                             ##
  114. ## PARRY: sets stance to parry stance                                   ##
  115. ## PILGRIM: prays on a pilgrim's badge every 30 minutes                 ##
  116. ## POINT: toggles hidden critter pointing (Default is OFF)              ##
  117. ## POUCH: changes gem pouches when current one is full.  See help       ##
  118. ## POWERP: will power perceive once every 6 minutes.                    ##
  119. ## RETREAT: turns on retreating for ranged weapons / spells. This       ##
  120. ##      does not work with poaching yet                                 ##
  121. ## RITUAL: maintains a ritual spell during                              ##
  122. ##      combat (some assembly required)                                 ##
  123. ## ROAM: will roam around the hunting area if no more monsters in       ##
  124. ##      room to kill                                                    ##
  125. ##      !!!CAUTION!!!                                                   ##
  126. ##      There is no safeguard for leaving a hunting area or             ##
  127. ##      wandering into a more dangerous area.                           ##
  128. ## SCRAPE: scrape skins/pelts/hides after skinning, retreating works    ##
  129. ##      while doing this activity.  Use SKINRET for this                ##
  130. ## SEARCH: Sets loot option.  Treasure/Boxes/Equipment/Goods/All        ##
  131. ##      without setting an option, uses game default see in game        ##
  132. ##      LOOT HELP for more information on differences                   ##
  133. ## SKIN: skins monsters                                                 ##
  134. ## SKINRETREAT: will turn on retreating while skinning                  ##
  135. ## SLOW: for weaklings or noobs, will wait for stamina to refill        ##
  136. ##      before next attack if it drops below 90%                        ##
  137. ## STANCE: will cycle through stances once that skill is locked         ##
  138. ##      current cycle is evas -> shield -> parry and back               ##
  139. ## TACTICS: Will add tactics-training to your hunting routine           ##
  140. ## TARGET: specifies a target to aim/target for attacks                 ##
  141. ## THIEF: This option uses Thief-only ambushes                          ##
  142. ## TIE: Ties bundles when first created, saves inventory space          ##
  143. ## TIMER: will set a timer to abort the script after x seconds          ##
  144. ## TRAIN: will check experience after every combat cycle, ranged        ##
  145. ##      weapon firing/throwing, or spell cast                           ##
  146. ## WEAR: Wears bundles.  Uses STOW verb to put skin into bundle if it   ##
  147. ##      this is used w/ the TIE option.                                 ##
  148. ##                                                                      ##
  149. ##      Weapon Options:                                                 ##
  150. ## AMBUSH: hides/stalks and attacks from hiding, checks stealth exp     ##
  151. ##      has a feature that will attempt to return to your original      ##
  152. ##      room if you stalk a creature into another by accident.          ##
  153. ##      If you have the ROAM option activated, this part of the         ##
  154. ##      feature is deactivated.                                         ##
  155. ## ANALYZE: Analyzes monsters to get debuff combos;                     ##
  156. ## syntax is ANALYZE # (1-10)                                           ##
  157. ## BACKSTAB: backstabs with weapon                                      ##
  158. ## BRAWL: brawls, will brawl with a weapon out if so desired            ##
  159. ## CONSTRUCT: adds construct check (to avoid Empathic shock) to weapon  ##
  160. ##      and TM training                                                 ##
  161. ## DUAL: dual-load (for Rangers and Barbarians                          ##
  162. ## EMPATH: non-lethal brawling (trains tactics)                         ##
  163. ## FEINT: use a feinting routine to keep balance up                     ##
  164. ## MAGIC: uses magic in the same syntax as TM/PM, but will only cast    ##
  165. ##      once per critter, then use the primary weapon to kill           ##
  166. ## OFFHAND: uses weapon in offhand, works with melee or thrown          ##
  167. ## POACH: poaches with a ranged weapon, checks stealth exp              ##
  168. ## SNAP: snap-fires ranged weapon and snapcasting for magic             ##
  169. ##      Following this command with a # will pause for that many        ##
  170. ##      seconds before casting/firing                                   ##
  171. ## SNIPE: snipes with a ranged weapon                                   ##
  172. ## STACK: throws stacks of weapons (throwing blades). If you use        ##
  173. ##      this, don't use THROW too                                       ##
  174. ## SWAP/BASTARD: swappable weapon support, equips the weapon and        ##
  175. ## swaps it to the desired weapon "mode"                                ##
  176. ##  Available mode options:                                             ##
  177. ##      SE - Small Edged (Light Edged, Medium Edged)                    ##
  178. ##      LE - Large Edged                                                ##
  179. ##      2HE - Two-handed Edged                                          ##
  180. ##      SB - Small Blunt (Light Blunt, Medium Blunt)                    ##
  181. ##      LB - Large Blunt                                                ##
  182. ##      2HB - Two-handed Blunt                                          ##
  183. ##      POLE - Polearms (Halberd, Pike)                                 ##
  184. ##      S - Staves (Quarter Staff, Short Staff)                         ##
  185. ## TSWAP: does the same as SWAP, but for throwing weapons               ##
  186. ## FSWAP: does the same as SWAP, but for Fans with open/close           ##
  187. ## THROW: throws a thrown weapon                                        ##
  188. ## HURL: hurls a thrown weapon, causing puncturing weapons to stick     ##
  189. ## LOB: lobs a thrown weapon, preventing weapon from sticking           ##
  190. ## TM/PM: uses magic as the primary weapon, with brawling as the        ##
  191. ##      backup if no other weapon is specified (and you run out of      ##
  192. ##      mana). The extra harness is optional. TM for targeted exp       ##
  193. ##      check, PM for primary magic exp checks. SNAP will snapcast.     ##
  194. ##      Use as follows:                                                 ##
  195. ##      (SNAP) <TM|PM> <spell> <mana> (extra mana) <weapon> <shield>    ##
  196. ##                                                                      ##
  197. ## Use:                                                                 ##
  198. ##  .hunt (General options) (Weapon Options) weapon shield              ##
  199. ##                                                                      ##
  200. ## Note: You must have the EXPTracker Plugin for this script to work    ##
  201. ##########################################################################
  202.  
  203. pause
  204.  
  205. timer clear
  206. timer start
  207. ## GAG_ECHO can be YES or NO
  208. ## YES - Will not show any of the informative echoes
  209. ## NO - Default, will show all informative echoes
  210. var GAG_ECHO YES
  211. var TACTICS weave|circle|bob
  212. var tact_move 0
  213.  
  214. action (hunt) put #queue clear; send 1 $lastcommand when ^\.\.\.wait|^Sorry, you may only type
  215. action (hunt) put #queue clear; send 1 $lastcommand when ^You are still stunned
  216. action goto ADVANCE when ^You must be closer to
  217. action put #play Speech;put #flash when ^\w+ asks, \"|exclaims, \"|hisses, \"|lectures, \"|says, \"|^You hear .+ say|^You hear the voice of
  218. action (stalk) put #send #script pause hunt;put #send 1 #walk %starter.room;put #send 2 #script resume;put #echo >Log Returned to starting room when eval $roomid != %starter.room
  219. action (stalk) off
  220. action var _COMBO $1;eval _COMBO replacere("%_COMBO", "(,?\s?((an|a)|and (an|a))\s)", "|");eval _COMBO replacere("%_COMBO","^\|","");eval _combocount count("%_COMBO", "|") when by landing (.*)\.$
  221.  
  222. ##Bodypart Array
  223. var BODY_PART head|neck|back|chest|abdomen|right arm|left arm|right leg|left leg
  224.  
  225. ##LOOT Variables
  226. var gweths (jadeite|lantholite|lasmodi|sjatmal|waermodi) stones
  227. var boxtype brass|copper|deobar|driftwood|iron|ironwood|mahogany|oaken|pine|steel|wooden
  228. var boxes \bbox\b|caddy|casket|chest|coffer|crate|skippet|strongbox|trunk
  229. var junkloot fragment|hhr'lav'geluhh bark|lockpick|ostracon|package|papyrus roll|runestone|scroll|sheiska leaf|smudged parchment|tablet|vellum
  230. var collectibles albredine ring|\bbolts?\b|crystal ring|\bdira\b|flarmencrank|\bgear\b|glarmencoupler|kirmhiro draught|\bmap\b|nugget|\bnuts?\b|package|rackensprocket|soulstone|spangleflange
  231.  
  232. ##Monster Variables
  233. var monsters1 ashu hhinvi|atik'et|bloodvine|bucca|clay archer|clay mage|clay soldier|\bcrag\b|creeper|cutthroat
  234. var monsters2 dragon fanatic|dragon priest|dryad|dummy|dusk ogre|dyrachis|eviscerator|faenrae assassin|fendryad|fire maiden|folsi immola
  235. var monsters3 footpad|frostweaver|gam chaga|\bgeni\b|gidii|goblin shaman|graverobber|guardian|gypsy marauder|\bimp\b|juggernaut
  236. var monsters4 kelpie|kra'hei|kra'hei hatchling|lipopod|lun'shele hunter|madman|malchata|mountain giant|nipoh oshu|\bnyad\b|orc bandit
  237. var monsters5 orc clan chief|orc raider|orc reiver|orc scout|pile of rubble|pirate|river sprite|ruffian|scavenger troll|scout ogre|screamer
  238. var monsters6 sentinel|shadow master|shadoweaver|sky giant|sleazy lout|sprite|swain|swamp troll|telga moradu|\bthug\b|trekhalo
  239. var monsters7 tress|umbramagii|velver|\bvine\b|vykathi builder|vykathi excavator|wood troll|young ogre|zealot
  240.  
  241. var undead1 boggle|emaciated umbramagus|fiend|gargantuan bone golem|olensari mihmanan|plague wraith
  242. var undead2 revivified mutt|shylvic|sinister maelshyvean heirophant|skeletal peon|skeletal sailor|skeleton
  243. var undead3 skeletal kobold headhunter|skeletal kobold savage|snaer hafwa|soul|spectral pirate|spectral sailor
  244. var undead4 spirit|ur hhrki'izh|wind hound|wir dinego|zombie(?!\s)|zombie (head-splitter|mauler|nomad|stomper)
  245.  
  246. var skinnablemonsters1 angiswaerd hatchling|antelope|arbelog|armadillo|armored warklin|arzumo|asaren celpeze|badger|barghest|basilisk|\bbear\b|beisswurm|bison|black ape
  247. var skinnablemonsters2 blight ogre|blood warrior|\bboa\b|\bboar\b|bobcat|boobrie|brocket deer|burrower|caiman|caracal|carcal|cave troll
  248. var skinnablemonsters3 cinder beast|cougar|\bcrab\b|crayfish|crocodile|\bdeer\b|dobek moruryn|faenrae stalker|firecat|\bfrog\b|gargoyle|giant blight bat
  249. var skinnablemonsters4 goblin|grass eel|\bgrub\b|gryphon|Isundjen conjurer|jackal|kartais|kobold|la'heke|larva|la'tami|leucro
  250. var skinnablemonsters5 marbled angiswaerd|merrows|\bmoda\b|\bmoth\b|mottled westanuryn|musk hog|\bpard\b|peccary|pivuh|poloh'izh|pothanit|\bram\b
  251. var skinnablemonsters6 \brat\b|retan dolomar|rock troll|scaly seordmaor|serpent|shadow beast|shadow mage|shalswar|silverfish|sinuous elsralael|skunk|S'lai scout
  252. var skinnablemonsters7 sleek hele'la|sluagh|snowbeast|\bsow\b|spider|spirit dancer|steed|suw bizar|trollkin|\bunyn\b|viper|vulture
  253. var skinnablemonsters8 vykathi harvester|vykathi soldier|warcat|\bwasp\b|\bwolf\b|\bworm\b
  254.  
  255. var skinnableundead1 enraged tusky|fell hog|ghoul|ghoul crow|gremlin|grendel|lach|mastiff|mey|misshapen germish'din
  256. var skinnableundead2 mutant togball|reaver|shadow hound|squirrel|zombie kobold headhunter|zombie kobold savage
  257.  
  258. var construct ashu hhinvi|boggle|bone amalgam|clay archer|clay mage|clay soldier|clockwork assistant|gam chaga|glass construct|granite gargoyle|lachmate|lava drake|marble gargoyle|origami \S+|quartz gargoyle|(alabaster|andesite|breccia|dolomite|marble|obsidian|quartzite|rock) guardian|rough-hewn doll
  259. var skinnableconstruct granite gargoyle|lava drake|marble gargoyle|quartz gargoyle
  260.  
  261. var invasioncritters bone amalgam|bone warrior|Elpalzi (bowyer|deadeye|dissident|fomenter|hunter|incendiary|instigator|malcontent|malcontent|partisan|rebel|sharpshooter|toxophilite)|flea-ridden beast|putrefying shambler|revivified mutt|shambling horror|skeletal peon|transmogrified oaf
  262.  
  263. var skinnablecritters %skinnablemonsters1|%skinnablemonsters2|%skinnablemonsters3|%skinnablemonsters4|%skinnablemonsters5|%skinnablemonsters6|%skinnablemonsters7|%skinnablemonsters8|%skinnableundead1|%skinnableundead2|%skinnableconstruct
  264. var nonskinnablecritters %monsters1|%monsters2|%monsters3|%monsters4|%monsters5|%monsters6|%monsters7|%undead1|%undead2|%undead3|%undead4|construct
  265.  
  266. var ritualcritters %monsters1|%monsters2|%monsters3|%monsters4|%monsters5|%monsters6|%monsters7|%skinnablemonsters1|%skinnablemonsters2|%skinnablemonsters3|%skinnablemonsters4|%skinnablemonsters5|%skinnablemonsters6|%skinnablemonsters7|%skinnablemonsters8
  267.  
  268. var critters %skinnablecritters|%nonskinnablecritters
  269.  
  270. ##Tactics Variables
  271. var TACTICS weave|circle|bob
  272. var tact_move 0
  273. var barb.tact
  274.  
  275. ##Empath Variables
  276. var Empath_Monster
  277.  
  278. var OPTIONVARS AMB.*?|ANAL.*?|APPR.*?|ARM.*?|ARRA.*?|BACKS.*?|BARB.*?|BAST.*?|BLO.*?|BON.*?|BRA.*?|BS|BUF.*?|BUN.*?|COLL.*?|CONS.*?|COUNT|CUST.*?|DANCE|DANG.*?|DEF.*?|DLOAD|DMSET|DMULTI|DODGE|DSET|DUAL.*?|DYING|EMP.*?|\bENCH.*?|EVA.*?|EXP|FEINT|FSWAP|HELP|HUNT|HURL|JUGG.*?|JUNK|KHRI|LOB|LOOTA.*?|LOOTB.*?|LOOTC.*?|LOOTG.*?|MAGIC|MANIP|MARK|MSET|MULTI|NECROH.*?|NECROR.*?|NISS.*?|NOEV.*?|NOPA.*?|NOSH.*?|OFF.*?|PARA(?!NG).*?|PARRY|PART\b|PILGRIM|PM|POACH|POINT|POUCH|POW.*?|PP|RET.*?|RITUAL|ROAM|SCRAPE.*?|SEARCH|SKIN.*?|SKINRET.*?|SLOW|SNAP|SNIP.*?|STACK|STANCE|SWAP|TAC.*?|TARG.*?|THIEF|THROW\b|TIE|TIME.*?|TM|TRAIN|TSWAP|WEAR|YOYO
  279. var OPTION NONE
  280.  
  281. var lastmaneuver none
  282.  
  283. var LAST TOP
  284.  
  285. action (point) off
  286. action (point) send point $1 when (%critters) attempting to stealthily advance upon you
  287. TOP:
  288. ## Initialize multi-weapon variable
  289. ## This part will be skipped when multi-weapons are implemented
  290.  
  291. #############################################################################
  292. ###                                                                       ###
  293. ###                                                                       ###
  294. ###       VARIABLE INIT: ONLY CHANGE VARIABES IN THIS SECTION             ###
  295. ###                                                                       ###
  296. ###                                                                       ###
  297. #############################################################################
  298.  
  299. VARIABLE_INIT:
  300. var BOW_AMMO $GH_CONTAINER_BOW_AMMO
  301. var XB_AMMO $GH_CONTAINER_XB_AMMO
  302. var SLING_AMMO $GH_CONTAINER_SLING_AMMO
  303. var QUIVER $GH_CONTAINER_QUIVER
  304. var LT_SHEATH $GH_CONTAINER_LT_SHEATH
  305. var HT_SHEATH $GH_CONTAINER_HT_SHEATH
  306. var BOX_CONTAINER $GH_CONTAINER_BOX_CONTAINER
  307. var GEM_CONTAINER $GH_CONTAINER_GEM_CONTAINER
  308. var JUNK_CONTAINER $GH_CONTAINER_JUNK_CONTAINER
  309. var DEFAULT_CONTAINER $GH_CONTAINER_DEFAULT_CONTAINER
  310. var POUCH_CONTAINER $GH_CONTAINER_POUCH_CONTAINER
  311. var PREP_MESSAGE $PREP_MESSAGE
  312. var RITUAL_FOCUS $focusr
  313. var RITUAL_FOCUS_CONTAINER $focusc
  314. var RITUAL_STANCE $rstance
  315.  
  316. #var ARMOR1 $$charactername_ARMOR1
  317. #var ARMOR2 $$charactername_ARMOR2
  318.  
  319.  
  320.  
  321.  
  322. ########################
  323. ##                    ##
  324. ##   Buff Variables   ##
  325. ##                    ##
  326. ########################
  327. goto gh_buff.end
  328. gh_buff.start:
  329.     var buff.secondcambrinth NO
  330.     var buff.trace 1
  331.     var buff.spell $buff.spells
  332.     var buff.prep $buff.prep
  333.     var buff.charge.total $buff.charge.total
  334.     if def("buff.charge.total2") then
  335.         {
  336.         var buff.charge.total2 $buff.charge.total2
  337.         }
  338.     else
  339.         {
  340.         var buff.charge.total2 0
  341.         }
  342.     var buff.charge.increment $buff.charge.increment
  343.     var buff.harness.total $buff.harness.total
  344.     var buff.harness.increment $buff.harness.increment
  345.     var buff.cambrinth $cambrinth
  346.     if def("secondcambrinth") then
  347.         {
  348.         var buff.secondcambrinth $secondcambrinth
  349.         }
  350.     var buff.worn YES
  351.     var buff.remove NO
  352.     var buff.harness YES
  353.     var buff.prep.message $PREP_MESSAGE
  354.     var buff.continue $buff.continue
  355.     var buff.held NO
  356.     var buff.manalevel 10
  357.  
  358.     if $guild = Paladin then
  359.         {
  360.         var buff.ba.thrown yes
  361.         }
  362.  
  363.     #Cleric
  364.     #var buff.spell GAF|MAF|MPP|PFE|BENE|MAPP|EASE|LW
  365.     #var buff.prep 5|5|1|5|10|5|1|6
  366.     #var buff.charge.total 100|101|100|100|100|100|98|110
  367.  
  368.     #Paladin
  369.     #var buff.spell GAF|MAF|AA|CLARITY|COURAGE|DIG|HES|MO|RW|SR|BOT|BA|DA|RUE|EASE|LW|SP|CRC|AS|HOJ
  370.     #var buff.prep 5|5|1|15|5|5|1|15|5|5|15|10|15|15|1|6|15|30|15|5
  371.     #var buff.charge.total 100|101|100|100|100|100|100|100|100|100|100|100|100|100|98|110|100|100|100|100
  372.  
  373.     #Empath
  374.     #var buff.spell GAF|MAF|IC|TRANQUILITY|AGS|GOL|MEF|REFRESH|VIGOR|BS|CD|FP|HL|EASE|LW|AWAKEN|RP|INNOCENCE
  375.     #var buff.prep 5|5|5|15|5|5|5|1|15|5|15|15|15|1|6|15|15|5
  376.     #var buff.charge.total 100|101|100|100|100|100|100|100|100|100|100|100|100|98|110|100|100|95
  377.  
  378.     #Ranger
  379.     #var buff.spell GAF|MAF|EY|COTC|HOL|STW|SOTT|WOTP|EM|MON|INST|EASE|LW
  380.     #var buff.prep 5|5|5|15|5|1|10|10|20|30|1|1|6
  381.     #var buff.charge.total 100|101|100|100|100|100|100|100|100|100|99|98|110
  382.  
  383.     #Warrior Mage
  384.     #var buff.spell GAF|MAF|ES|VOI|SUBSTRATUM|SUF|SW|TW|YS|EASE|LW
  385.     #var buff.prep 5|5|1|15|5|5|5|5|15|1|6
  386.     #var buff.charge.total 100|101|100|100|100|100|100|100|100|98|110
  387.  
  388.     put #var buff.spells SUF|ES
  389.     put #var buff.prep 5|1
  390.     put #var buff.charge.total 48|48
  391.     put #var buff.charge.increment 16|16
  392.     put #var buff.harness.total 0|0
  393.     put #var buff.harness.increment 0|0
  394.     put #var PREP_MESSAGE You trace a curving sigil in the air, shaping the pattern of the
  395.     put #var buff.continue yes
  396.     put #var save
  397.  
  398.     #Bard
  399.     #var buff.spell REPR|ECRY|GAF|MAF|NAME|DRUM|HARMONY|RAGE|EASE|LW|MIS
  400.     #var buff.prep 5|1|5|5|30|15|30|15|1|6|15
  401.     #var buff.charge.total 100|100|100|101|100|100|100|100|98|110|100
  402.  
  403.     #Moon Mage
  404.     #var buff.spell GAF|PG|MAF|SHADOWS|SEER|AUS|TS|EASE|CV|LW
  405.     #var buff.prep 5|5|5|1|14|5|5|1|1|6
  406.     #var buff.charge.total 100|102|101|100|100|99|98|98|97|110
  407.  
  408.     #Necromancer
  409.     #var buff.spell IVM|OBFUSCATION|PHP|KS|GAF|MAF|EASE|LW
  410.     #var buff.prep 8|2|5|15|5|5|1|6
  411.     #var buff.charge.total 103|101|98|96|100|101|98|110
  412.  
  413.     ## Don't edit below here
  414.     var gh.counter %c
  415.     gosub buff.start
  416.     counter set %gh.counter
  417.     return
  418.  
  419. gh_buff.end:
  420.  
  421.  
  422. #############################################################################
  423. ###                                                                       ###
  424. ###                                                                       ###
  425. ###      END VARIABLE INIT: DO NOT CHANGE ANY MORE VARIABLES              ###
  426. ###                                                                       ###
  427. ###                                                                       ###
  428. #############################################################################
  429.  
  430. action remove ^You are still stunned
  431.  
  432. var JUGGLIE $juggle
  433.  
  434. ## Has full aim been attained yet
  435. var FULL_AIM NO
  436.  
  437. ## Has full targetting been attained yet
  438. var FULL_TARGET NO
  439.  
  440. ## Has spell been fully prepped
  441. var FULL_PREP NO
  442.  
  443. ## Already searched the dead creature
  444. var SEARCHED NO
  445.  
  446. var APPRAISED NO
  447.  
  448. ## Arm-worn shield during ranged attempts
  449. var REM_SHIELD NONE
  450.  
  451. ## Stance variables
  452. var PARRY_LEVEL 0
  453. var EVAS_LEVEL 0
  454. var SHIELD_LEVEL 0
  455.  
  456. ## Initialize variable for roaming
  457. var lastdirection none
  458.  
  459. ## Variable for rest mode
  460. var REST OFF
  461.  
  462. ## Local variable for counting kills, loots, skins, etc
  463. var LOCAL 0
  464. var LOOTED NO
  465. var CURR_WEAPON
  466.  
  467. ## Special request
  468. var DYING OFF
  469.  
  470. ## Global variables for kills, loots, skins, etc
  471. if matchre($GH_KILLS, \D+) then put #var GH_KILLS 0
  472. if matchre($GH_LOOTS, \D+) then put #var GH_LOOTS 0
  473. if matchre($GH_SKINS, \D+) then put #var GH_SKINS 0
  474.  
  475. ## Analyze Variables
  476. var _COMBO null
  477. var ANALYZELEVEL 1
  478. var ANALYZEAMOUNT 0
  479. var this.attack 0
  480.  
  481. #######################
  482. ## SCRIPT VARIALBLES ##
  483. #######################
  484.  
  485. ## variable LAST is used with the WEBBED and PAUSE subroutines
  486. ## LAST is set to the current subroutine you in within the script
  487. if ("%1" != "MULTIWEAPON") then
  488. {
  489.     ## MULTI can be OFF or ON
  490.     ## ON - Will switch weapons to the next multi setup when locked
  491.     ## OFF - Default, attacks with just this weapon
  492.     put #var GH_MULTI OFF
  493. } else
  494. {
  495.     shift
  496. }
  497.  
  498. ## Counter is used to send you back to combat from searching
  499.  
  500. ######################################################
  501. ##                 GLOBAL VARIABLES                 ##
  502. ## These variables can be changed while Hunt ##
  503. ## is running to modify how the script works.       ##
  504. ## eg If you get tired of skinning, but have GH set ##
  505. ## to skin, just change GH_SKIN to OFF              ##
  506. ## All global variables are GH_<<name>> so they are ##
  507. ## all in the same spot in the variables window     ##
  508. ######################################################
  509.  
  510. ## AMBUSH can be OFF or ON
  511. ## ON - Using ambushing attacks, hides and stalks before every attack
  512. ## OFF - Default, attacks normally
  513. put #var GH_AMBUSH OFF
  514. action (stalk) off
  515.  
  516. ## ANALYZE can be OFF or ON
  517. ## ON - Analyze monsters to get debuff combos
  518. ## OFF - Default, attacks normally
  519. put #var GH_ANALYZE OFF
  520.  
  521. ## APPR can be NO or YES
  522. ## YES - Kills first creature, then appraises one creature once before entering the combat loop
  523. ##      Will appraise once after each kill, will not appraise once skill is dazed or mind locked
  524. ## NO - Default, no appraising of creatures
  525. put #var GH_APPR NO
  526.  
  527. ## ARMOR can be OFF or ON
  528. ## ON - Will include the armor swapping routine and use it
  529. ## OFF - Default, no include
  530. put #var GH_ARMOR OFF
  531.  
  532. ## ARRANGE can be OFF or ON
  533. ## ON - Will attempt to arrange a skinnable creature before skinning it.
  534. ## OFF - Default, will just skin creatures
  535. put #var GH_ARRANGE OFF
  536.  
  537. ## ARRANGE_ALL can be OFF or ON
  538. ## ON - Will arrange kills with the 'ALL' option. Requires outfitter technique.
  539. ## OFF - Default, till arrange to MAX_ARRANGE value
  540. put #var GH_ARRANGE_ALL OFF
  541.  
  542. ## BONE can be SKIN, PART, or BONE
  543. ## BONE - Will arrange an attempt to skin for Bones
  544. ## PART - Will arrange an attempt to skin for a body part
  545. ## SKIN - DEFAULT: Will arrange an attempt to skin for a (PELT, SKIN, Etc.)
  546. put #var GH_BONE OFF
  547.  
  548. ## BUFF can be OFF or ON
  549. ## ON - Will include the buffing routine and use it
  550. ## OFF - Default, no include
  551. put #var GH_BUFF OFF
  552. if "$BW" != "$righthand" then put #var BW OFF
  553.  
  554. ## BUN can be OFF or ON
  555. ## Note: Skinning must be enabled for bundling to work
  556. ## ON - Will bundle skinnings with rope
  557. ##      If no more bundling ropes are available, will be set to OFF
  558. ## OFF - Default, will just drop skins
  559. put #var GH_BUN OFF
  560.  
  561. ## COUNTING can be OFF or ON
  562. ## ON - Will dance with specified number of creatures.
  563. ##      Checks number of creatures after each pass through loop.
  564. ## OFF - Default, will kill everything as fast as possible
  565. put #var GH_DANCING OFF
  566.  
  567. ## CONSTRUCT can be OFF or ON
  568. ## ON - Will only allow damaging moves on constructs (prevents Empathic shock)
  569. ## OFF - Default, will allow damaging moves on everything
  570. put #var GH_CONSTRUCT OFF
  571.  
  572. ## DANGER can be OFF or ON
  573. ## ON - Will retreat while buffing, it will also set BUFF to on if it's not set already
  574. ## OFF - Default
  575. put #var GH_BUFF_DANGER OFF
  576.  
  577. ## DUALLOAD Can be OFF or ON
  578. ## ON - Will dual load your ranged weapon
  579. ## OFF - Standard loading - Default
  580. put #var GH_DUAL_LOAD OFF
  581.  
  582. ## ENCHANTE can be OFF or ON
  583. ## ON - Casts designated Bard cyclic every 7 minutes
  584. ## OFF - Default
  585. put #var GH_ENCHANTE OFF
  586.  
  587. ## EXP can be ON or OFF
  588. ## ON - Checks weapons experience after every kill
  589. ##      Also checks mindstate and any alternate experience
  590. ## OFF - No experience checks
  591. if ("$GH_MULTI" = "OFF") then put #var GH_EXP OFF
  592.  
  593. ## FEINT can be OFF or ON
  594. ## ON - Uses a feinting routine (feint slice, etc) to maintain balance
  595. ## OFF - Default, will use normal combat routine
  596. ## Note: Only usable with melee weapon fighting
  597. put #var GH_FEINT OFF
  598.  
  599. ## HARN is the amount of extra mana to harness before casting the spell.
  600. put #var GH_HARN 0
  601.  
  602. ## HUNT can be OFF or ON
  603. ## ON - Uses the HUNT verb every 90 seconds to train perception and stealth
  604. ## OFF - Default, will only use HUNT if roaming
  605. put #var GH_HUNT OFF
  606.  
  607. ## JUGGLE can be OFF or ON
  608. ## ON - Juggles when no monsters in the room
  609. ## OFF - Default, uses standard operations when no monsters in the room
  610. put #var GH_JUGGLE OFF
  611.  
  612. ## LOOT can be OFF or ON
  613. ## ON - Loots everything: boxes, gems coins; stores loot in LOOT_CONTAINER
  614. ##      If LOOT_CONTAINER fills up, stops looting boxes and gems
  615. ## OFF - Default, leaves loot on the ground
  616. ## Note: Turning on LOOT turns on LOOT_BOX, LOOT_GEM, LOOT_COIN
  617. put #var GH_LOOT OFF
  618.  
  619. ## LOOT_BOX can be OFF or ON
  620. ## ON - Loots boxes until LOOT_CONTAINER is full
  621. ## OFF - Default, leaves boxes on the ground
  622. put #var GH_LOOT_BOX OFF
  623.  
  624. ## LOOT_COIN can be OFF or ON
  625. ## ON - Loots coins
  626. ## OFF - Default, leaves coins on the ground
  627. put #var GH_LOOT_COIN OFF
  628.  
  629. ## LOOT_COLL can be OFF or ON
  630. ## ON - Will loot collectibles: Imperial diras and cards
  631. ## OFF - Default, will collectibles on the ground
  632. put #var GH_LOOT_COLL OFF
  633.  
  634. ## LOOT_GEM can be OFF or ON
  635. ## ON - Loots gems until LOOT_CONTAINER is full
  636. ## OFF - Default, leaves gems on the ground
  637. put #var GH_LOOT_GEM OFF
  638.  
  639. ## LOOT_JUNK can be OFF or ON
  640. ## ON - Loots junk items until LOOT_CONTAINER is full
  641. ## OFF - Default, leaves junk items on the ground
  642. put #var GH_LOOT_JUNK OFF
  643.  
  644. ## MANA is the amount of initial mana to prep the spell at.
  645. put #var GH_MANA 0
  646.  
  647. ## MANIP can be OFF or ON
  648. ## ON - Manipulates creatures while empathically brawling; requires $manipulate variable
  649. ## OFF - Default, does not manipulate
  650. put #var GH_MANIP OFF
  651.  
  652. ## MARK changes appraise to use ALL for thieves instead of appraise
  653. put #var GH_MARK OFF
  654.  
  655. ## NECROHEAL can be OFF or ON
  656. ## ON - Performs the consume spell and ritual if injured.
  657. ## OFF - Default, does not perform spell / ritual.
  658. put #var GH_NECROHEAL OFF
  659.  
  660. ## NECRORITUAL can be OFF, DISSECT, PRESERVE, HARVEST, or ARISE
  661. ## OFF - Default, does not perform ritual
  662. ## DISSECT / PRESERVE / HARVEST / ARISE - Performs said ritual
  663. put #var GH_NECRORITUAL OFF
  664.  
  665. ## NISSA can be OFF or ON
  666. ## ON - Trains Debilitation by casting Nissa's Binding on all creatures in the room.
  667. ## OFF - Default, does not cast Nissa's Binding
  668. put #var GH_NISSA OFF
  669.  
  670. ## PARALYSIS can be OFF or ON
  671. ## ON - shock-free TM training for Empaths; requires $paralysis variable
  672. ## OFF - Default, does not manipulate
  673. put #var GH_PARALYSIS OFF
  674.  
  675. ## PART can be SKIN, PART, or BONE
  676. ## BONE - Will arrange an attempt to skin for Bones
  677. ## PART - Will arrange an attempt to skin for a body part
  678. ## SKIN - DEFAULT: Will arrange an attempt to skin for a (PELT, SKIN, Etc.)
  679. put #var GH_PART OFF
  680.  
  681. ## PILGRIM can be OFF or ON
  682. ## ON - boosts Cleric devotion or Paladin soul state by praying on a pilgrim's badge every 30 minutes
  683. ## OFF - Default, does not pray on a pilgrim's badge
  684. put #var GH_PILGRIM OFF
  685.  
  686. ## POUCH can be OFF or ON
  687. ## ON - Will remove current pouch, put it into special container, and get a new one from default container
  688. ## OFF - Default, does not remove full pouch
  689. put #var GH_POUCH OFF
  690.  
  691. ## PP can be OFF or ON
  692. ## ON - Perceives once every 6 minutes to train power perception
  693. ## OFF - Default, does nothing with perceive
  694. put #var GH_PP OFF
  695.  
  696. ## RITUAL can be OFF or ON
  697. ## ON - maintains the ritual spell of your choice
  698. ## OFF - Default, does not use ritual spells
  699. put #var GH_RITUAL OFF
  700.  
  701. ## RETREAT can be OFF or ON
  702. ## ON - Uses the retreats for ranged combat, melee!
  703. ## OFF - Default, bypasses retreats for ranged combat
  704. put #var GH_RETREAT OFF
  705.  
  706. ## ROAM can be OFF or ON
  707. ## ON - Will roam around the hunting area  on main directions (n,nw,w,sw,s,se,e,ne,u,d)
  708. ##      if you kill all the creatures in your area
  709. ## OFF - Default, will stay in your own room no matter what
  710. put #var GH_ROAM OFF
  711.  
  712. ## SCRAPE can be OFF or ON
  713. ## ON - Scrapes skins/pelts/hides after skinning
  714. ## OFF - Default, just searches all creatures
  715. ## Note: This works with SKIN_RETREAT and BUNDLING
  716. put #var GH_SCRAPE OFF
  717.  
  718. ## SEARCH can be set to Treasure, Boxes, Equipment, Goods, or All
  719. ## Defaults to loot goods, which is game default
  720. ## See in game LOOT HELP for more information
  721. put #var GH_SEARCH GOODS
  722.  
  723. ## SKIN can be OFF or ON
  724. ## ON - Skin creatures that can be skinned
  725. ##      Drops skins unless BUN is set to ON
  726. ## OFF - Default, just searches all creatures
  727. put #var GH_SKIN OFF
  728.  
  729. ## SKIN_RET can be OFF or ON
  730. ## ON - Turns on the retreat triggers while skinning
  731. ## OFF - Default, doesn't retreat for skinning
  732. put #var GH_SKIN_RET OFF
  733.  
  734. ## SLOW can be OFF or ON
  735. ## ON - Turns on pauses between weapon strikes
  736. ## OFF - Default, no pauses
  737. put #var GH_SLOW OFF
  738.  
  739. ## SNAP can be OFF or ON
  740. ## ON - Snap fires a ranged weapon
  741. ## OFF - Default, waits for a full aim to fire a ranged
  742. put #var GH_SNAP OFF
  743.  
  744. ## SPELL can be the shortname of any castable spell. It's what will be prepped.
  745. put #var GH_SPELL eb
  746.  
  747. ## STANCE can be OFF or ON
  748. ## ON - Check stance exp after each kill, switch on dazed or mind lock
  749. ## OFF - Default, no stance exp checking
  750. put #var GH_STANCE OFF
  751.  
  752. ## TACTICS can be OFF or ON
  753. ## ON - Use tactical moves as part of combat
  754. ## OFF - Default, no additional tactics training (other than what may be autoselected from "attack")
  755. put #var GH_TACTICS OFF
  756.  
  757. ## TARGET (global) can be ""(null) or any valid body part spells should target
  758. put #var GH_TARGET ""
  759.  
  760. ## Thief - Uses special ambushes
  761. ## ON - Will use special ambushes
  762. ## OFF - Default, will only use non-ambush
  763. put #var GH_THIEF OFF
  764.  
  765. ## TIE can be OFF or ON
  766. ## ON - Will tie bundle when created
  767. ## OFF - Default, leaves bundle untied
  768. put #var GH_TIE OFF
  769.  
  770. ## TIMER can be OFF or ON
  771. ## ON - If the timer is greater than MAX_TRAIN_TIME, end the script
  772. ## OFF - Default, run script endlessly
  773. put #var GH_TIMER OFF
  774.  
  775. ## TRAIN can be ON or OFF
  776. ## ON - Weapon or Alternate experience will be checked more often than just when critters die.
  777. ## OFF - Default, normal EXP check cycle.
  778. if ("$GH_MULTI" = "OFF") then put #var GH_TRAIN OFF
  779.  
  780. ## WEAR can be OFF or ON
  781. ## ON - Will wear a bundle
  782. ## OFF - Default, Will drop bundles
  783. put #var GH_WEAR OFF
  784.  
  785. ############################
  786. ##  End GLOBAL Variables  ##
  787. ############################
  788.  
  789. ############################
  790. ## Local Script Variables ##
  791. ############################
  792. ## ALTEXP can be OFF or ON
  793. ## ON - Will check an alternate skill as well as weapon skill
  794. ## OFF - Just check weapon experience
  795. var ALTEXP OFF
  796.  
  797. ## BACKSTAB can be OFF or ON
  798. ## ON - Will backstab with a weapon
  799. ##      If weapon is not suitable for backstabbing, will enter normal combat with weapon
  800. ## OFF - Default, will attack normally with weapon
  801. var BACKSTAB OFF
  802.  
  803. ## BONDED can be OFF or ON
  804. ## ON - Uses invoke to retrieve bonded throwing weapon.
  805. ## OFF - Default.
  806. var BONDED OFF
  807.  
  808. ## BRAWLING can be OFF or ON
  809. ## ON - Brawling mode, uses bare hands to kill creatures (or non-lethal for Empaths)
  810. ## OFF - Default
  811. var EMPTY_HANDED OFF
  812.  
  813. ## CURR_STANCE can be Evasion, Parry_Ability or Shield_Usage
  814. ## Note: Used in stance switching
  815. ## Evasion - evasion stance is current one set, Default
  816. ## Parry_Ability - parry stance is current one set
  817. ## Shield_Usage - shield stance is current one set
  818. var CURR_STANCE Evasion
  819.  
  820. ## EXP2 can be Backstab, Hiding, NONE, Offhand_Weapon, Primay_Magic, Stalking, or Target_Magic
  821. ## Backstab - Used when backstabbing
  822. ## Hiding - Used when sniping
  823. ## Offhand_Weapon - Used when offhand attacks are done
  824. ## Debilitation - Used when performing magic and want to check debilitation
  825. ## Stalking - Used when ambushing and poaching
  826. ## Target_Magic - Used when performing magic and want to check TM
  827. ## NONE - Default
  828. var EXP2 NONE
  829.  
  830. ## FIRE_TYPE can be FIRE, POACH or SNIPE
  831. ## FIRE - Default, generic firing of ranged weapon
  832. ## POACH - Poaches creatures, hides and stalks before poaching
  833. ##         If creatures cannot be poached, fires normally
  834. ## SNIPE - Snipe creatures, hides and stalks before sniping
  835. var FIRE_TYPE FIRE
  836.  
  837. ## HAND can be <blank> or left
  838. ## <blank> - Default, attacks with the right hand
  839. ## left - Attacks with the left hand, used for one-handed weapons and throwing
  840. var HAND
  841.  
  842. ## HAND2 can be left or right
  843. ## Note: Used in stackables throwing to ensure you don't fill your hands
  844. ## left - Default
  845. ## right - Set when HAND = "left"
  846. var HAND2 left
  847.  
  848. ## KHRI can be OFF or ON
  849. ## Will use the KHRI in the KHRI label
  850. ## ON - Uses the KHRI that you have chosen to use in the KHRI label
  851. ## OFF - Default, will not use KHRI
  852. put #var GH_KHRI OFF
  853. var AVOIDANCE OFF
  854. var DAMPEN OFF
  855. var DARKEN OFF
  856. var ELUSION OFF
  857. var FLIGHT OFF
  858. var FOCUS OFF
  859. var HASTEN OFF
  860. var PROWESS OFF
  861. var STEADY OFF
  862. var STRIKE OFF
  863.  
  864. ## MAGIC can be OFF or ON
  865. ## ON - Will cause a single cast of the specified spell before attacking with mundane weapons
  866. ## OFF - Default, won't trigger magic section
  867. var MAGIC OFF
  868.  
  869. ## MAGIC_TYPE can be TM or PM or OFF
  870. ## TM - Will cause the appropriate TM usage, with targeting, and checks against TM skill
  871. ## PM - Avoid targeting, and uses the PM skill for checks
  872. ## OFF - Default
  873. var MAGIC_TYPE OFF
  874.  
  875. ## MAGIC_COUNT can be 0 or anything greater. It tracks the original numeric combo for resetting the counter.
  876. var MAGIC_COUNT 0
  877.  
  878. ## MAX_TRAIN_TIME is how long, in seconds, you want the script to run before stopping
  879. ## Note: MAX_TRAIN_TIME defaults to 10 minutes
  880. var MAX_TRAIN_TIME 600
  881.  
  882. ## NOEVADE, NOPARRY, NOSHIELD are used with stance switching to indicate when you wish to skip a stance
  883. ## ON - Will skip the designated stance in the SWITCH_STANCE routine
  884. ## OFF - Default, will not skip this stance when switching
  885. ## Note: can only use one of these at a time.
  886. var NOEVADE OFF
  887. var NOPARRY OFF
  888. var NOSHIELD OFF
  889.  
  890. ## RANGED can be OFF or ON
  891. ## ON - For use with ranged weapons; bows, xbows and thrown
  892. ## OFF - Default, used with melee weapons
  893. var RANGED OFF
  894.  
  895. ## RETREATING can be OFF or ON. This variable is set internally.
  896. ## ON - Retreat triggers are ON
  897. ## OFF - Default, retreat triggers are OFF
  898. var RETREATING OFF
  899.  
  900. ## RUCK can be OFF or ON
  901. ## ON - Weapon was tied to a rucksack, used for sheathing while looting/skinning
  902. ## OFF - Default
  903. ## Note: Not yet implemented
  904. var RUCK OFF
  905.  
  906. ## SHIELD can be NONE or <shield type>
  907. ## NONE - Default, no shield used
  908. ## <shield type> - This is set either during the weapon check or ranged combat
  909. ##                 If set during the weapon check for a melee weapon, the shield is used during combat
  910. ##                 If set during ranged, the shield is removed and stowed, and reworn upon leaving the script
  911. var SHIELD NONE
  912.  
  913. ## STACK can be OFF or ON
  914. ## ON - Throwing weapon is a stackable
  915. ## OFF - Default
  916. var STACK OFF
  917.  
  918. ## THROWN can be OFF or ON
  919. ## ON - Throw a weapon
  920. ## OFF - Default
  921. var THROWN OFF
  922.  
  923. ## HURL can be OFF or ON
  924. ## Will cause thrown weapons to be hurled
  925. ## ON - Hurls weapons, causing them to lodge if possible
  926. ## OFF - Default, will not use HURL
  927. var HURL OFF
  928.  
  929. ## LOB can be OFF or ON
  930. ## Will cause thrown weapons to be lobbed
  931. ## ON - Lobs weapons, preventing them from lodging
  932. ## OFF - Default, will not use LOB
  933. var LOB OFF
  934.  
  935. ## YOYO can be OFF or ON
  936. ## YOYO is a subset of JUGGLING, it uses a yoyo instead of a standard jugglie
  937. ## ON - "juggle" with a yoyo
  938. ## OFF - Default, normal jugglie
  939. var YOYO OFF
  940. ################################
  941. ## End Local Script Variables ##
  942. ################################
  943.  
  944. counter set 0
  945. gosub RETREAT_UNTRIGGERS
  946. action var guild $1;put #var guild $1 when Guild:\s+(Barbarian|Bard|Cleric|Commoner|Empath|Moon Mage|Necromancer|Paladin|Ranger|Thief|Trader|Warrior Mage)$
  947. action var circle $1;put #var circle $1 when Circle:\s+(\d+)$
  948. action var estance $1 when ^You are currently using (\d+)% of your evasion skill\.$
  949. action var sstance $1 when ^You are currently using (\d+)% of your shield block skill\.$
  950. action var pstance $1 when ^You are currently using (\d+)% of your weapon parry skill\.$
  951. action var ostance $1 when ^You are attacking with (\d+)% of your offensive skill\.$
  952. action var ANALYZELEVEL 10 when massive opening
  953. action var BONDED ON when sense a deep connection
  954. put info
  955. waitforre ^Debt:$
  956. put awaken
  957.  
  958. if ("$GH_MULTI" = "DMULTI") then goto LOAD_DEFAULT_SETTINGS
  959. if_1 goto VARIABLE_CHECK
  960. if ("$GH_DEF_SET" = "YES") then goto LOAD_DEFAULT_SETTINGS
  961.  
  962. DEFAULT_NOT_SET:
  963.     if ("%GAG_ECHO" != "YES") then
  964.     {
  965.         echo
  966.         echo *** ERROR ***
  967.         echo Your default setting are not set yet.
  968.         echo Run .hunta DSET <<default settings>> to set them
  969.         echo
  970.         echo Now exiting script
  971.     }
  972.     goto DONE
  973.  
  974. ##############################
  975. ##                          ##
  976. ##  Start of actual script  ##
  977. ##                          ##
  978. ##############################
  979. VARIABLE_CHECK:
  980.     var LAST VARIABLE_CHECK
  981.     gosub clear
  982.     if matchre (toupper("%1"),"(\b%OPTIONVARS)") then
  983.     {
  984.         var OPTION %1
  985.         #pause 0.1
  986.         shift
  987.         gosub %OPTION
  988.         goto VARIABLE_CHECK
  989.     }
  990.  
  991.     gosub GENERAL_TRIGGERS
  992.  
  993. BEGIN:
  994.     var LAST BEGIN
  995.     if ("%GAG_ECHO" != "YES") then
  996.     {
  997.         echo
  998.         echo *** BEGIN: ***
  999.         echo
  1000.     }
  1001.         matchre WEAPON_CHECK ^With a flick of your wrist|^You draw|already holding|free to
  1002.         match BEGIN_HANDS free hand|need to have your right hand
  1003.         matchre BEGINA out of reach|remove|What were you|can't seem|Wield what\?
  1004.         match VARIABLE_CHECK You can only wield a weapon or a shield!
  1005.     put wield right my %1
  1006.     matchwait 15
  1007.  
  1008. BEGINA:
  1009.     var LAST BEGINA
  1010.         matchre WEAPON_CHECK You sling|already holding|inventory|You remove
  1011.         matchre BEGIN_HANDS free hand|hands are full
  1012.         matchre BEGINB Remove what?|You aren't wearing
  1013.     put remove my %1
  1014.     matchwait 15
  1015.  
  1016. BEGINB:
  1017.     var LAST BEGINB
  1018.         matchre WEAPON_CHECK You get|you get|You are already holding
  1019.         match NO_VALUE Please rephrase that command
  1020.         match VARIABLE_ERROR What were you
  1021.         match UNTIE it is untied.
  1022.     put get my %1
  1023.     matchwait 30
  1024.     goto VARIABLE_ERROR
  1025.  
  1026. UNTIE:
  1027.     var RUCK ON
  1028.         match WEAPON_CHECK you get
  1029.         match NO_VALUE Please rephrase that command
  1030.         match VARIABLE_ERROR What were you
  1031.     put untie my %1 from ruck
  1032.     matchwait 30
  1033.     goto VARIABLE_ERROR
  1034.  
  1035. ####################################
  1036. ##                                ##
  1037. ##  First input was not a weapon  ##
  1038. ##  Checking for variables now    ##
  1039. ##                                ##
  1040. ####################################
  1041.  
  1042. ### Ambushing creatures, using the stalking skill for experience checks
  1043. AMB:
  1044. AMBU:
  1045. AMBUS:
  1046. AMBUSH:
  1047.     if ("%GAG_ECHO" != "YES") then
  1048.     {
  1049.         echo
  1050.         echo *** AMBUSHING: ***
  1051.         echo
  1052.     }
  1053.     put #var GH_AMBUSH ON
  1054.     var starter.room $roomid
  1055.     var ALTEXP ON
  1056.     var EXP2 Stealth
  1057.     if "$GH_ROAM" = "OFF" then action (stalk) on
  1058.     return
  1059.  
  1060. ##Analyzing creatures for weakness
  1061. ANA:
  1062. ANAL:
  1063. ANALY:
  1064. ANALYZ:
  1065. ANALYZE:
  1066.     put #var GH_ANALYZE ON
  1067.     var ANALYZEAMOUNT %1
  1068.     if %ANALYZEAMOUNT > 1 then evalmath ANALYZEAMOUNT %ANALYZEAMOUNT - 1
  1069.     shift
  1070.     return
  1071.  
  1072. ## Appraising creatures until appraisal is locked
  1073. APPR:
  1074. APPRAISE:
  1075. APPRAISAL:
  1076.     if ("%GAG_ECHO" != "YES") then
  1077.     {
  1078.         echo
  1079.         echo *** APPRAISAL: ***
  1080.         echo
  1081.     }
  1082.     put #var GH_APPR YES
  1083.     return
  1084.  
  1085. ## Will include buffing routine
  1086. ARM:
  1087. ARMO:
  1088. ARMOR:
  1089.     if ("%GAG_ECHO" != "YES") then
  1090.     {
  1091.         echo
  1092.         echo *** ARMORSWAPPING: ***
  1093.         echo
  1094.     }
  1095.     put #var GH_ARMOR ON
  1096.     put #var GH_ARMOR.INCLUDE 0
  1097.     put #var GH_ARMOR_COUNT 0
  1098.     put #var GH_ARMOR_TOTAL 0
  1099.     if $swap.LearningRate >= 34 then put #var swap.learningrate 30
  1100.     return
  1101.  
  1102. ## Arranging skinnable creatures before skinning
  1103. ## Turns skinning on if it is not already
  1104. ARRA:
  1105. ARRAN:
  1106. ARRANG:
  1107. ARRANGE:
  1108.     if ("%GAG_ECHO" != "YES") then
  1109.     {
  1110.         echo
  1111.         echo *** ARRANGE: ***
  1112.         echo
  1113.     }
  1114.     put #var GH_ARRANGE ON
  1115.     if ("$GH_SKIN" != "ON") then gosub SKIN
  1116.     if matchre("%1","^\d+$") then
  1117.     {
  1118.         put #var MAX_ARRANGE %1
  1119.         if ("%GAG_ECHO" != "YES") then echo *** Arranging %1 times ***
  1120.         shift
  1121.         return
  1122.     }
  1123.     if tolower(%1) = all then
  1124.         {
  1125.         match ARRANGE_ALL Leather Tanning Expertise
  1126.         match ARRANGE_ALL Basic Bone Collecting
  1127.         put craft tailor
  1128.         put craft carving
  1129.         matchwait 2
  1130.         echo *** You do not know how to Arrange all. Arranging 5 times ***
  1131.         put #var MAX_ARRANGE 5
  1132.         shift
  1133.         }
  1134.     else put #var MAX_ARRANGE 1
  1135.     return
  1136. ARRANGE_ALL:
  1137.     put #var GH_ARRANGE_ALL ON
  1138.     shift
  1139.     return
  1140.  
  1141. ## Backstabbing with a weapon
  1142. BS:
  1143. BACK:
  1144. BACKS:
  1145. BACKST:
  1146. BACKSTA:
  1147. BACKSTAB:
  1148.     if ("%GAG_ECHO" != "YES") then
  1149.     {
  1150.         echo
  1151.         echo *** BACKSTAB: ***
  1152.         echo
  1153.     }
  1154.     if ("%guild" != "Thief") then
  1155.     {
  1156.         echo
  1157.         echo ***  Can only backstab if you are a thief!!  ***
  1158.         echo
  1159.         return
  1160.     }
  1161.     gosub clear
  1162.     gosub GENERAL_TRIGGERS
  1163.     if ("$GH_FEINT" = "ON") then put #var GH_FEINT OFF
  1164.     put #var GH_AMBUSH ON
  1165.     var BACKSTAB ON
  1166.     var ALTEXP ON
  1167.     var EXP2 Backstab
  1168.     var LAST_ATTACK none
  1169.     counter set 1300
  1170.     var CURR_WEAPON %1
  1171.     var LAST GET_BS_WEAPON
  1172. GET_BS_WEAPON:
  1173.         matchre APPRAISE_BS You draw|already holding|free to
  1174.         match GET_BS_WEAPON2 out of reach
  1175.         match BEGIN_HAND need to have your right hand
  1176.     put wield my %CURR_WEAPON
  1177.     matchwait 15
  1178.     goto VARIABLE_ERROR
  1179. GET_BS_WEAPON2:
  1180.         matchre APPRAISE_BS You draw|already holding|free to
  1181.         match BEGIN_HAND need to have your right hand
  1182.     put get my %CURR_WEAPON
  1183.     matchwait 15
  1184.     goto VARIABLE_ERROR
  1185.     APPRAISE_BS:
  1186.         var LAST APPRAISE_BS
  1187.             matchre LE_BS (a|and) light edged
  1188.             matchre ME_BS (a|and) medium edged
  1189.             matchre WEAPON_APPR_ERROR Roundtime|It's hard to appraise
  1190.         put appraise my %CURR_WEAPON quick
  1191.         matchwait 15
  1192.         goto WEAPON_APPR_ERROR
  1193.     LE_BS:
  1194.         var WEAPON_EXP Small_Edged
  1195.         var RANGED OFF
  1196.         var _COMBO1 parry
  1197.         var _COMBO2 feint
  1198.         var _COMBO3 attack
  1199.         var _COMBO4 attack
  1200.         var _COMBO5 attack
  1201.         var _COMBO6 unused
  1202.         var _COMBO7 unused
  1203.         var _COMBO8 unused
  1204.         goto 1_HANDED_WEAPON
  1205.     ME_BS:
  1206.         var WEAPON_EXP Small_Edged
  1207.         var RANGED OFF
  1208.         var _COMBO1 parry
  1209.         var _COMBO2 feint
  1210.         var _COMBO3 attack
  1211.         var _COMBO4 attack
  1212.         var _COMBO5 attack
  1213.         var _COMBO6 unused
  1214.         var _COMBO7 unused
  1215.         var _COMBO8 unused
  1216.         goto 1_HANDED_WEAPON
  1217.  
  1218. ## Barbarian Expertise tactics
  1219. BAR:
  1220. BARB:
  1221.     put #var GH_ANALYZE ON
  1222.     var ANALYZEAMOUNT 1
  1223.     var BARB ON
  1224.     var barb.tact %1
  1225.     shift
  1226.     return
  1227.  
  1228. ## Setting the stance to shield/blocking
  1229. BLO:
  1230. BLOC:
  1231. BLOCK:
  1232.     if ("%GAG_ECHO" != "YES") then
  1233.     {
  1234.         echo
  1235.         echo *** BLOCK: ***
  1236.         echo
  1237.     }
  1238.     var CURR_STANCE Shield_Usage
  1239.     SET_SHIELD_STANCE:
  1240.         var LAST SET_SHIELD_STANCE
  1241.             match RETURN You are now set to
  1242.         put stance shield
  1243.         matchwait 15
  1244.     return
  1245.  
  1246. ## Will change arrange for SKIN to BONE
  1247. BON:
  1248. BONE:
  1249. if ("%GAG_ECHO" != "YES") then
  1250. {
  1251.     echo
  1252.     echo *** ARRANGE FOR BONE ***
  1253.     echo
  1254. }
  1255. put #var GH_BONE ON
  1256. return
  1257.  
  1258. ## Will include buffing routine
  1259. BUF:
  1260. BUFF:
  1261.     if ("%GAG_ECHO" != "YES") then
  1262.     {
  1263.         echo
  1264.         echo *** BUFF: ***
  1265.         echo
  1266.     }
  1267.     put #var GH_BUFF ON
  1268.     put #var GH_BUFF_INCLUDE 0
  1269.     return
  1270.  
  1271. ## Will bundle anything skinned.  If skinning not enabled this does nothing.
  1272. BUN:
  1273. BUND:
  1274. BUNDL:
  1275. BUNDLE:
  1276.     if ("%GAG_ECHO" != "YES") then
  1277.     {
  1278.         echo
  1279.         echo *** BUNDLE: ***
  1280.         echo
  1281.     }
  1282.     put #var GH_BUN ON
  1283.     if ("$GH_SKIN" != "ON") then gosub SKIN
  1284.     return
  1285.  
  1286. ## Implements brawling attacks
  1287. BRA:
  1288. BRAW:
  1289. BRAWL:
  1290. BRAWLI:
  1291. BRAWLIN:
  1292. BRAWLING:
  1293.     if ("%GAG_ECHO" != "YES") then
  1294.     {
  1295.         echo
  1296.         echo *** BRAWLING: ***
  1297.         echo
  1298.     }
  1299.     gosub clear
  1300.     gosub GENERAL_TRIGGERS
  1301.     var WEAPON_EXP Brawling
  1302.     if_1 then goto BRAWL_CHECK
  1303.     BRAWL_EMPTY:
  1304.         var EMPTY_HANDED ON
  1305.         var _COMBO1 dodge
  1306.         var _COMBO2 attack
  1307.         var _COMBO3 attack
  1308.         var _COMBO4 attack
  1309.         var _COMBO5 attack
  1310.         var _COMBO6 attack
  1311.         var _COMBO7 unused
  1312.         var _COMBO8 unused
  1313.         counter add 600
  1314.         goto BRAWL_SETUP
  1315.     BRAWL_CHECK:
  1316.         if matchre ("%1","shield|\baegis\b|\bblock\b|buckler|carapace|heater|\bkwarf\b|\blid\b|pavise|platter|rondache|scutum|\bshell\b|\bsipar\b|\btarge\b|\btray\b|variog|\bwheel\b") then goto BRAWL_EMPTY
  1317.         var EMPTY_HANDED OFF
  1318.         var _COMBO1 dodge
  1319.         var _COMBO2 circle
  1320.         var _COMBO3 attack
  1321.         var _COMBO4 attack
  1322.         var _COMBO5 attack
  1323.         var _COMBO6 attack
  1324.         var _COMBO7 unused
  1325.         var _COMBO8 unused
  1326.         counter add 500
  1327.         var CURR_WEAPON %1
  1328.         shift
  1329.     BRAWL_WEAPON:
  1330.         var LAST BRAWL_WEAPON
  1331.         gosub WIELD_WEAPON %CURR_WEAPON
  1332.         goto BRAWL_SETUP
  1333.  
  1334. COLL:
  1335. COLLE:
  1336. COLLEC:
  1337. COLLECT:
  1338. COLLECTIBLE:
  1339.     if ("%GAG_ECHO" != "YES") then
  1340.     {
  1341.         echo
  1342.         echo *** LOOT_COLLECTIBLES: ***
  1343.         echo
  1344.     }
  1345.     if ("$GH_LOOT" != "ON") then put #var GH_LOOT ON
  1346.     put #var GH_LOOT_COLL ON
  1347.     return
  1348.  
  1349. CONS:
  1350. CONST:
  1351. CONSTR:
  1352. CONSTRU:
  1353. CONSTRUC:
  1354. CONSTRUCT:
  1355.     if "%GH_RITUALSPELL" = "ABSOLUTION" then return
  1356.     if ("%GAG_ECHO" != "YES") then
  1357.     {
  1358.         echo
  1359.         echo *** CONSTRUCT: ***
  1360.         echo
  1361.     }
  1362.     put #var GH_CONSTRUCT ON
  1363.     action (hunt) goto DEAD_MONSTER when ^A granite gargoyle grumbles and falls over with a \*THUD\*\.$
  1364.     return
  1365.  
  1366. CUST:
  1367. CUSTO:
  1368. CUSTOM:
  1369.     if ("%GAG_ECHO" != "YES") then
  1370.     {
  1371.         echo
  1372.         echo *** CUSTOM STANCE: ***
  1373.         echo
  1374.     }
  1375.     action var PARRY_LEVEL $1 when ^You are currently using (\d+)% of your weapon parry skill
  1376.     action var EVAS_LEVEL $1 when ^You are currently using (\d+)% of your evasion skill
  1377.     action var SHIELD_LEVEL $1 when ^You are currently using (\d+)% of your shield block skill
  1378.     put stance custom
  1379.     waitfor You are now set to
  1380.     if (%PARRY_LEVEL > %EVAS_LEVEL) then
  1381.     {
  1382.         if (%PARRY_LEVEL > %SHIELD_LEVEL) then
  1383.         {
  1384.  
  1385.             var CURR_STANCE Parry_Ability
  1386.         }
  1387.         else
  1388.         {
  1389.  
  1390.             var CURR_STANCE Shield_Usage
  1391.         }
  1392.     }
  1393.     else
  1394.     {
  1395.  
  1396.         if (%EVAS_LEVEL >= %SHIELD_LEVEL) then
  1397.         {
  1398.  
  1399.             var CURR_STANCE Evasion
  1400.         } else
  1401.         {
  1402.  
  1403.             var CURR_STANCE Shield_Usage
  1404.         }
  1405.     }
  1406.     action remove ^You are currently using (\d+)% of your weapon parry skill
  1407.     action remove ^You are currently using (\d+)% of your evasion skill
  1408.     action remove ^You are currently using (\d+)% of your shield block skill
  1409.     return
  1410.  
  1411. ## Dances with a number of creatures
  1412. ## The number of creatures to dance with
  1413. COUNT:
  1414. DANCE:
  1415.     if ("%GAG_ECHO" != "YES") then
  1416.     {
  1417.  
  1418.         echo
  1419.         echo *** COUNT: ***
  1420.         echo
  1421.     }
  1422.     put #var GH_DANCING ON
  1423.     if (%1 > 6) then goto COUNT_6
  1424.     goto COUNT_%1
  1425.     COUNT_0:
  1426.     COUNT_1:
  1427.         var xCOUNT COUNT_ONE
  1428.         shift
  1429.         return
  1430.     COUNT_2:
  1431.         var xCOUNT COUNT_TWO
  1432.         shift
  1433.         return
  1434.     COUNT_3:
  1435.         var xCOUNT COUNT_THREE
  1436.         shift
  1437.         return
  1438.     COUNT_4:
  1439.         var xCOUNT COUNT_FOUR
  1440.         shift
  1441.         return
  1442.     COUNT_5:
  1443.         var xCOUNT COUNT_FIVE
  1444.         shift
  1445.         return
  1446.     COUNT_6:
  1447.         var xCOUNT COUNT_SIX
  1448.         shift
  1449.         return
  1450.  
  1451. ## Danger, adds retreating to buffing
  1452. DANGER:
  1453.  
  1454.     if ("%GAG_ECHO" != "YES") then
  1455.     {
  1456.  
  1457.         echo
  1458.         echo *** DANGER: ***
  1459.         echo
  1460.     }
  1461.     put #var GH_BUFF_DANGER ON
  1462.     if toupper("$GH_BUFF") != "YES") then gosub BUFF
  1463.     return
  1464.  
  1465. DEF:
  1466. DEFA:
  1467. DEFAU:
  1468. DEFAUL:
  1469. DEFAULT:
  1470.     if ("%GAG_ECHO" != "YES") then
  1471.     {
  1472.  
  1473.         echo
  1474.         echo *** DEFAULT: ***
  1475.         echo Using Default Settings
  1476.         echo
  1477.     }
  1478.     gosub clear
  1479.     gosub GENERAL_TRIGGERS
  1480.     if ("$GH_MULTI" != "OFF") then goto DEFAULT_ERROR
  1481.     goto LOAD_DEFAULT_SETTINGS
  1482.  
  1483. DSET:
  1484.     if ("%GAG_ECHO" != "YES") then
  1485.     {
  1486.         echo
  1487.         echo *** DEFAULT-SET: ***
  1488.         echo Preparing to set Default settings
  1489.         echo
  1490.     }
  1491.     var DSET ON
  1492.     return
  1493.  
  1494. DMSET:
  1495.     if ("%GAG_ECHO" != "YES") then
  1496.     {
  1497.         echo
  1498.         echo *** DEFAULT-MULTI-SET: ***
  1499.         echo Preparing to setup up weapons to use in multi.
  1500.         echo Using other default settings
  1501.         echo
  1502.     }
  1503.     var SET_NUM 1
  1504.     SET_DM_STRING:
  1505.         if (SET_NUM > 10) then goto DONE_SET_DM
  1506.         put #var GH_MULTI_WEAPON_%SET_NUM %1
  1507.         math SET_NUM add 1
  1508.         shift
  1509.         if_1 goto SET_DM_STRING
  1510.     DONE_SET_DM:
  1511.     math SET_NUM subtract 1
  1512.     put #var GH_MULTI_NUM %SET_NUM
  1513.     goto DONE
  1514.  
  1515. DMULTI:
  1516.     if ("%GAG_ECHO" != "YES") then
  1517.     {
  1518.         echo
  1519.         echo *** DMULTI: ***
  1520.         echo
  1521.     }
  1522.     gosub clear
  1523.     put #var GH_EXP ON
  1524.     put #var GH_TRAIN ON
  1525.     put #var GH_MULTI DMULTI
  1526.     if matchre ("%1","^\d+$") then
  1527.     {
  1528.         put #var GH_MULTI_CURR_NUM %1
  1529.         if ($GH_MULTI_CURR_NUM > $GH_MULTI_NUM) then goto MULTI_ERROR
  1530.         put .hunt MULTIWEAPON $GH_MULTI_WEAPON_$GH_MULTI_CURR_NUM
  1531.     }
  1532.     put #var GH_MULTI_CURR_NUM 1
  1533.     put .hunt MULTIWEAPON $GH_MULTI_WEAPON_1
  1534. DMULTI_ERROR:
  1535.     echo
  1536.     echo *** DMULTI_ERROR: ***
  1537.     echo Something bad happened trying to multi-weapon with defaults
  1538.     goto DONE
  1539.  
  1540. DLOAD:
  1541. DUAL:
  1542. DUALL:
  1543. DUALLO:
  1544. DUALLOA:
  1545. DUALLOAD:
  1546.     if ("%GAG_ECHO" != "YES") then
  1547.     {
  1548.         echo
  1549.         echo *** DUAL LOAD: ***
  1550.         echo
  1551.     }
  1552. put #var GH_DUAL_LOAD ON
  1553. return
  1554.  
  1555. ## Non-lethal brawling, useful for Empaths or dancing
  1556. EMP:
  1557. EMPU:
  1558. EMPA:
  1559. EMPUF:
  1560. EMPAT:
  1561. EMPUFF:
  1562. EMPATH:
  1563.     if ("%GAG_ECHO" != "YES") then
  1564.     {
  1565.         echo
  1566.         echo *** EMPATH_BRAWLING: ***
  1567.         echo
  1568.     }
  1569.     gosub clear
  1570.     gosub GENERAL_TRIGGERS
  1571.     var WEAPON_EXP Tactics
  1572.     var _COMBO1 parry
  1573.     var _COMBO2 shove
  1574.     var _COMBO3 circle
  1575.     var _COMBO4 weave
  1576.     var _COMBO5 bob
  1577.     var _COMBO6 unused
  1578.     var _COMBO7 unused
  1579.     var _COMBO8 unused
  1580.     var EMPTY_HANDED ON
  1581.     counter add 500
  1582.     EMPATH_WEAPON_CHECK:
  1583.         var LAST EMPATH_WEAPON_CHECK
  1584.         if_1 then
  1585.         {
  1586.             if matchre ("%1","shield|buckler|pavise|heater|kwarf|sipar|lid|targe\b") then goto BRAWL_SETUP
  1587.             else
  1588.             {
  1589.                 var CURR_WEAPON %1
  1590.                 shift
  1591.                 gosub WIELD_WEAPON %CURR_WEAPON
  1592.                 var EMPTY_HANDED OFF
  1593.             }
  1594.         }
  1595.         goto BRAWL_SETUP
  1596.  
  1597. ##Casts a single cyclic bard spell in combat
  1598. ENCH:
  1599. ENCHA:
  1600. ENCHAN:
  1601. ENCHANT:
  1602. ENCHANTE:
  1603.     if ("%GAG_ECHO" != "YES") then
  1604.     {
  1605.     echo
  1606.     echo *** ENCHANTE: Casting %1 at %2 mana. ***
  1607.     echo
  1608.     }
  1609.     put #var GH_ENCHANTE ON
  1610.     var enchante_list hodi|fae|botf|aewo|dalu|alb|eye|sanctuary|care|gj|pyre|aban
  1611.     var enchante_name %1
  1612.     shift
  1613.     var enchante_mana %1
  1614.     shift
  1615.     if matchre("%enchante_name","%enchante_list") then
  1616.     {
  1617.     if matchre("%enchante_name", "hodi|fae|botf") then
  1618.     {
  1619.     var enchante_school Augmentation
  1620.     echo Augmentation spell
  1621.     }
  1622.     else if matchre("%enchante_name", "aewo|dalu|alb") then
  1623.     {
  1624.     var enchante_school Debilitation
  1625.     echo Debilitation spell
  1626.     }
  1627.     else if matchre("%enchante_name", "eye|sanctuary|care") then
  1628.     {
  1629.     var enchante_school Utility
  1630.     echo Utility spell
  1631.     }
  1632.     else if matchre("%enchante_name", "gj") then
  1633.     {
  1634.     var enchante_school Warding
  1635.     echo Warding spell
  1636.     }
  1637.     else if matchre("%enchante_name", "aban|pyre") then
  1638.     {
  1639.     var enchante_school Targeted_Magic
  1640.     echo Targeted magic spell
  1641.     }
  1642.     }
  1643.     else
  1644.     {
  1645.     echo ERROR: Valid spells are hodi, fae, botf, aewo, dalu, alb, eye, sanctuary, care, gj, aban, and pyre
  1646.     exit
  1647.     }
  1648.     put prep %enchante_name %enchante_mana
  1649.     pause 1
  1650.     put release cyc
  1651.     pause 1
  1652.     waitfor You feel fully prepared
  1653.     put cast
  1654.     var enchante_timer 420
  1655.     return
  1656.  
  1657. ## Sets the stance to evasion
  1658. DODGE:
  1659. EVAS:
  1660. EVAD:
  1661. EVASI:
  1662. EVADE:
  1663. EVASIO:
  1664. EVASION:
  1665.     if ("%GAG_ECHO" != "YES") then
  1666.     {
  1667.         echo
  1668.         echo *** EVASION: ***
  1669.         echo
  1670.     }
  1671.     var CURR_STANCE Evasion
  1672.     SET_EVAS_STANCE:
  1673.         var LAST SET_EVAS_STANCE
  1674.             match RETURN You are now set to
  1675.         put stance evasion
  1676.         matchwait 15
  1677.     return
  1678.  
  1679. ## Will check exp, ends scripts when checked skill is locked
  1680. EXP:
  1681.     if ("%GAG_ECHO" != "YES") then
  1682.     {
  1683.         echo
  1684.         echo *** EXP: ***
  1685.         echo
  1686.     }
  1687.     put #var GH_EXP ON
  1688.     return
  1689.  
  1690. ## This will use feint during combat to keep balance up
  1691. FEINT:
  1692.     if ("%GAG_ECHO" != "YES") then
  1693.     {
  1694.         echo
  1695.         echo *** FEINT: ***
  1696.         echo
  1697.     }
  1698.     if ("%BACKSTAB" != "ON") then put #var GH_FEINT ON
  1699.     return
  1700.  
  1701. ## Uses HUNT to train perception and stalk, but not move
  1702. HUNT:
  1703.     if ("%GAG_ECHO" != "YES") then
  1704.     {
  1705.         echo
  1706.         echo *** HUNT: ***
  1707.         echo
  1708.     }
  1709.     put #var GH_HUNT ON
  1710.     var HUNT_TIME 0
  1711.     return
  1712.  
  1713. ## Juggles when no monsters
  1714. JUGG:
  1715. JUGGL:
  1716. JUGGLE:
  1717.     if ("%GAG_ECHO" != "YES") then
  1718.     {
  1719.         echo
  1720.         echo *** JUGGLE: ***
  1721.         echo
  1722.     }
  1723.     put #var GH_JUGGLE ON
  1724.     return
  1725.  
  1726. ## Loots gems
  1727. JUNK:
  1728.     if ("%GAG_ECHO" != "YES") then
  1729.     {
  1730.         echo
  1731.         echo *** LOOT_JUNK: ***
  1732.         echo
  1733.     }
  1734.     if ("$GH_LOOT" != "ON") then put #var GH_LOOT ON
  1735.     put #var GH_LOOT_JUNK ON
  1736.     return
  1737.  
  1738. ## Uses KHRI
  1739. KHRI:
  1740.     if ("%GAG_ECHO" != "YES") then
  1741.     {
  1742.     echo
  1743.     echo *** THIEF KHRI: ***
  1744.     echo
  1745.     }
  1746.     put #var GH_KHRI ON
  1747.     var KHRI_TIME 0
  1748.     KHRI.SET:
  1749.     if matchre("%1", "focus|strike|prowess|avoidance|hasten|elusion|steady|flight|darken|dampen") then
  1750.     {
  1751.         if %1 = avoidance then var AVOIDANCE ON
  1752.         if %1 = dampen then var DAMPEN ON
  1753.         if %1 = darken then var DARKEN ON
  1754.         if %1 = elusion then var ELUSION ON
  1755.         if %1 = flight then var FLIGHT ON
  1756.         if %1 = focus then var FOCUS ON
  1757.         if %1 = hasten then var HASTEN ON
  1758.         if %1 = prowess then var PROWESS ON
  1759.         if %1 = steady then var STEADY ON
  1760.         if %1 = strike then var STRIKE ON
  1761.         shift
  1762.         goto KHRI.SET
  1763.     }
  1764.     return
  1765.  
  1766. ## Loots everything
  1767. LOOTA:
  1768. LOOTAL:
  1769. LOOTALL:
  1770.     if ("%GAG_ECHO" != "YES") then
  1771.     {
  1772.         echo
  1773.         echo *** LOOT_ALL: ***
  1774.         echo
  1775.     }
  1776.     put #var GH_LOOT ON
  1777.     put #var GH_LOOT_GEM ON
  1778.     put #var GH_LOOT_BOX ON
  1779.     put #var GH_LOOT_COIN ON
  1780.     put #var GH_LOOT_COLL ON
  1781.     return
  1782.  
  1783. ## Loots boxes
  1784. LOOTB:
  1785. LOOTBO:
  1786. LOOTBOX:
  1787. LOOTBOXE:
  1788. LOOTBOXES:
  1789.     if ("%GAG_ECHO" != "YES") then
  1790.     {
  1791.         echo
  1792.         echo *** LOOT_BOXES: ***
  1793.         echo
  1794.     }
  1795.     if ("$GH_LOOT" != "ON") then put #var GH_LOOT ON
  1796.     put #var GH_LOOT_BOX ON
  1797.     return
  1798.  
  1799. ## Loots coins
  1800. LOOTC:
  1801. LOOTCO:
  1802. LOOTCOI:
  1803. LOOTCOIN:
  1804. LOOTCOINS:
  1805.     if ("%GAG_ECHO" != "YES") then
  1806.     {
  1807.         echo
  1808.         echo *** LOOT_COINS: ***
  1809.         echo
  1810.     }
  1811.     if ("$GH_LOOT" != "ON") then put #var GH_LOOT ON
  1812.     put #var GH_LOOT_COIN ON
  1813.     return
  1814.  
  1815. ## Loots gems
  1816. LOOTG:
  1817. LOOTGE:
  1818. LOOTGEM:
  1819. LOOTGEMS:
  1820.     if ("%GAG_ECHO" != "YES") then
  1821.     {
  1822.         echo
  1823.         echo *** LOOT_GEMS: ***
  1824.         echo
  1825.     }
  1826.     if ("$GH_LOOT" != "ON") then put #var GH_LOOT ON
  1827.     put #var GH_LOOT_GEM ON
  1828.     return
  1829.  
  1830. POUCH:
  1831. if ("%GAG_ECHO" != "YES") then
  1832.     {
  1833.         echo
  1834.         echo *** SWAP_POUCH: ***
  1835.         echo
  1836.     }
  1837.     if ("$GH_LOOT" != "ON") then put #var GH_LOOT ON
  1838.     if ("$GH_LOOT_GEM" != "ON") then put #var GH_LOOT_GEM ON
  1839.     put #var GH_POUCH ON
  1840.     return
  1841.  
  1842. ## Single cast of spell before non-magical combat
  1843. MAGIC:
  1844.     if contains("Barbarian|Thief|Trader", "%guild") then return
  1845.     if ("%GAG_ECHO" != "YES") then
  1846.     {
  1847.         echo
  1848.         echo *** MAGIC: ***
  1849.         echo
  1850.     }
  1851.     counter add 2000
  1852.     var MAGIC ON
  1853.     var ALTEXP OFF
  1854.     var EXP2 Debilitation
  1855.     var MAGIC_TYPE %1
  1856.     eval MAGIC_TYPE toupper("%MAGIC_TYPE")
  1857.     shift
  1858.     put #var GH_SPELL %1
  1859.     shift
  1860.     put #var GH_MANA %1
  1861.     shift
  1862.     if matchre ("%1","^\d+$") then
  1863.         {
  1864.             put #var GH_HARN %1
  1865.             if ("%GAG_ECHO" != "YES") then
  1866.             {
  1867.                 echo *** Harnessing an extra %1 ***
  1868.             }
  1869.             shift
  1870.         } else put #var GH_HARN 0
  1871.     echo Casting $GH_SPELL with a prep of $GH_MANA and harnessing $GH_HARN
  1872.     if_1 return
  1873.     else goto BRAWL
  1874.  
  1875. ## Starts training Multiple weapons
  1876. MULTI:
  1877.     if ("%GAG_ECHO" != "YES") then
  1878.     {
  1879.         echo
  1880.         echo *** MULTI: ***
  1881.         echo
  1882.     }
  1883.     gosub clear
  1884.     put #var GH_EXP ON
  1885.     put #var GH_TRAIN ON
  1886.     put #var GH_MULTI MULTI
  1887.     if matchre ("%1","^\d+$") then
  1888.     {
  1889.         put #var GH_MULTI_CURR_NUM %1
  1890.         if ($GH_MULTI_CURR_NUM > $GH_MULTI_NUM) then goto MULTI_ERROR
  1891.         put .hunt MULTIWEAPON $GH_MULTI_$GH_MULTI_CURR_NUM
  1892.     }
  1893.     put #var GH_MULTI_CURR_NUM 1
  1894.     put .hunt MULTIWEAPON $GH_MULTI_1
  1895. MULTI_ERROR:
  1896.     echo
  1897.     echo *** MULTI_ERROR: ***
  1898.     echo Something bad happened trying to multi-weapon
  1899.     goto DONE
  1900.  
  1901. MSET:
  1902.     if ("%GAG_ECHO" != "YES") then
  1903.     {
  1904.         echo
  1905.         echo *** MULTI-SET: ***
  1906.         echo Preparing to setup up multi-weapon training
  1907.         echo
  1908.     }
  1909.     gosub clear
  1910.     var SET_NUM 1
  1911.     SET_M_STRING:
  1912.         if (SET_NUM > 11) then goto DONE_M_SET
  1913.         put #var GH_MULTI_%SET_NUM %1
  1914.         math SET_NUM add 1
  1915.         shift
  1916.         if_1 goto SET_M_STRING
  1917.     DONE_M_SET:
  1918.     math SET_NUM subtract 1
  1919.     put #var GH_MULTI_NUM %SET_NUM
  1920.     goto DONE
  1921.  
  1922. #Necromancer healing
  1923. NECROH:
  1924. NECROHE:
  1925. NECROHEA:
  1926. NECROHEAL:
  1927.     if ("%GAG_ECHO" != "YES") then
  1928.     {
  1929.         echo
  1930.         echo *** NECROHEAL: ***
  1931.         echo
  1932.     }
  1933.     if "$guild" = "Necromancer" then put #var GH_NECROHEAL ON
  1934.     return
  1935.  
  1936. #Necromancer ritual
  1937. NECROR:
  1938. NECRORI:
  1939. NECRORIT:
  1940. NECRORITU:
  1941. NECRORITUA:
  1942. NECRORITUAL:
  1943.     if ("%GAG_ECHO" != "YES") then
  1944.     {
  1945.         echo
  1946.         echo *** NECRORITUAL: ***
  1947.         echo
  1948.     }
  1949.     if "$guild" = "Necromancer" then
  1950.     {
  1951.         if toupper("%1") = "HARVEST" || toupper("%1") = "DISSECT" || toupper("%1") = "PRESERVE" || toupper("%1") = "ARISE" then
  1952.         {
  1953.         put #var GH_NECRORITUAL %1
  1954.         shift
  1955.         }
  1956.         else
  1957.         put #var GH_NECRORITUAL dissect
  1958.     }
  1959.     return
  1960.  
  1961. # Not using evasion stance in stance switching
  1962. NOEVADE:
  1963. NOEVAS:
  1964. NOEVASION:
  1965.     if ("%GAG_ECHO" != "YES") then
  1966.     {
  1967.         echo
  1968.         echo *** NOEVADE: ***
  1969.         echo
  1970.     }
  1971.     var NOEVADE ON
  1972.     return
  1973.  
  1974. # Not using parry stance in stance switching
  1975. NOPA:
  1976. NOPARRY:
  1977.     if ("%GAG_ECHO" != "YES") then
  1978.     {
  1979.         echo
  1980.         echo *** NOPARRY: ***
  1981.         echo
  1982.     }
  1983.     var NOPARRY ON
  1984.     return
  1985.  
  1986. # Not using shield stance in stance switching
  1987. NOSH:
  1988. NOSHIELD:
  1989.     if ("%GAG_ECHO" != "YES") then
  1990.     {
  1991.         echo
  1992.         echo *** NOSHIELD: ***
  1993.         echo
  1994.     }
  1995.     var NOSHIELD ON
  1996.     return
  1997.  
  1998. ## Uses the weapon in the offhand
  1999. ## Currently just for throwing weapons from the left hand
  2000. OFF:
  2001. OFFH:
  2002. OFFHA:
  2003. OFFHAN:
  2004. OFFHAND:
  2005.     if ("%GAG_ECHO" != "YES") then
  2006.     {
  2007.         echo
  2008.         echo *** OFFHAND: ***
  2009.         echo
  2010.     }
  2011.     var HAND left
  2012.     var HAND2 right
  2013.     var ALTEXP ON
  2014.     var EXP2 Offhand_Weapon
  2015.     return
  2016.  
  2017. ## Sets the stance to parry
  2018. PARRY:
  2019.     if ("%GAG_ECHO" != "YES") then
  2020.     {
  2021.         echo
  2022.         echo *** PARRY: ***
  2023.         echo
  2024.     }
  2025.     var CURR_STANCE Parry_Ability
  2026.     SET_PARRY_STANCE:
  2027.         var LAST SET_PARRY_STANCE
  2028.             match RETURN You are now set to
  2029.         put stance parry
  2030.         matchwait 15
  2031.     return
  2032.  
  2033. PART:
  2034. if ("%GAG_ECHO" != "YES") then
  2035. {
  2036.     echo
  2037.     echo *** ARRANGE FOR PART ***
  2038.     echo
  2039. }
  2040. put #var GH_PART ON
  2041. return
  2042.  
  2043. PILGRIM:
  2044.     if contains("Barbarian|Bard|Commoner|Empath|Moon Mage|Necromancer|Ranger|Thief|Trader|Warrior Mage", "%guild") then return
  2045.     if ("%GAG_ECHO" != "YES") then
  2046.     {
  2047.         echo
  2048.         echo *** PILGRIM'S BADGE: ***
  2049.         echo
  2050.     }
  2051.     var PILGRIM_TIME 0
  2052.     put #var GH_PILGRIM ON
  2053.     return
  2054.  
  2055. PP:
  2056. POW:
  2057. POWER:
  2058. POWERP:
  2059.     if contains("Barbarian|Commoner|Thief|Trader", "%guild") then return
  2060.     if ("%GAG_ECHO" != "YES") then
  2061.     {
  2062.         echo
  2063.         echo *** POWER PERCEIVE: ***
  2064.         echo
  2065.     }
  2066.     put #var GH_PP ON
  2067.     var PP_TIME 0
  2068.     return
  2069.  
  2070. MANIP:
  2071.     if contains("Barbarian|Bard|Cleric|Commoner|Moon Mage|Necromancer|Paladin|Ranger|Thief|Trader|Warrior Mage", "%guild") then return
  2072.     if ("%GAG_ECHO" != "YES") then
  2073.     {
  2074.         echo
  2075.         echo *** FRIENDSHIP MANIPULATION: ***
  2076.         echo
  2077.     }
  2078.     var MANIP_TIME 0
  2079.     put #var GH_MANIP ON
  2080.     return
  2081.  
  2082. MARK:
  2083.     if ("%GAG_ECHO" != "YES") then
  2084.     {
  2085.         echo
  2086.         echo *** THIEF MARK ***
  2087.         echo
  2088.     }
  2089.     put #var GH_MARK ON
  2090.     put #var GH_APPR YES
  2091.     return
  2092.  
  2093. NIS:
  2094. NISS:
  2095. NISSA:
  2096.     if contains("Barbarian|Bard|Cleric|Commoner|Moon Mage|Necromancer|Paladin|Ranger|Thief|Trader|Warrior Mage", "%guild") then return
  2097.     if ("%GAG_ECHO" != "YES") then
  2098.     {
  2099.         echo
  2100.         echo *** EMPATH DEBILITATION (NISSA'S BINDING): ***
  2101.         echo
  2102.     }
  2103.     var nissa_time 0
  2104.     if matchre("%1","^\d+$") then
  2105.     {
  2106.     var nissamana %1
  2107.     evalmath nissaharness round(%nissamana / 2)
  2108.     if ("%GAG_ECHO" != "YES") then echo *** Casting Nissa's Binding with %1 mana ***
  2109.     shift
  2110.     }
  2111.     put #var GH_NISSA ON
  2112.     return
  2113.  
  2114. PARA:
  2115. PARAL:
  2116. PARALY:
  2117. PARALYS:
  2118. PARALYSI:
  2119. PARALYSIS:
  2120.     if contains("Barbarian|Bard|Cleric|Commoner|Moon Mage|Necromancer|Paladin|Ranger|Thief|Trader|Warrior Mage", "%guild") then return
  2121.     if ("%GAG_ECHO" != "YES") then
  2122.     {
  2123.         echo
  2124.         echo *** EMPATH PARALYSIS (TM): ***
  2125.         echo
  2126.     }
  2127.     var PARALYSIS_TIME 0
  2128.     if matchre("%1","^\d+$") then
  2129.     {
  2130.     var PARAMANA %1
  2131.     if ("%GAG_ECHO" != "YES") then echo *** Casting Paralysis with %1 mana ***
  2132.     shift
  2133.     }
  2134.     put #var GH_PARALYSIS ON
  2135.     return
  2136.  
  2137. ## Casts a spell using non-targeted magic
  2138. PM:
  2139. TM:
  2140.     if contains("Barbarian|Commoner|Thief|Trader", "%guild") then return
  2141.     if (toupper("%OPTION") = "TM") then
  2142.     {
  2143.         var MAGIC OFF
  2144.         var MAGIC_TYPE TM
  2145.     } else
  2146.     {
  2147.         var MAGIC OFF
  2148.         var MAGIC_TYPE PM
  2149.     }
  2150.     if ("%GAG_ECHO" != "YES") then
  2151.     {
  2152.         echo
  2153.         echo ***  %MAGIC_TYPE:  ***
  2154.         echo
  2155.     }
  2156.     counter add 2000
  2157.     var ALTEXP ON
  2158.     if (toupper("%MAGIC_TYPE") = "TM") then var EXP2 Targeted_Magic
  2159.     else var EXP2 Debilitation
  2160.     put #var GH_SPELL %1
  2161.     shift
  2162.     put #var GH_MANA %1
  2163.     shift
  2164.     if matchre ("%1","^\d+$") then
  2165.         {
  2166.             put #var GH_HARN %1
  2167.             if ("%GAG_ECHO" != "YES") then echo *** Harnessing an extra %1 ***
  2168.             shift
  2169.         } else put #var GH_HARN 0
  2170.     echo Casting $GH_SPELL with a prep of $GH_MANA and harnessing $GH_HARN
  2171.     if_1 return
  2172.     else goto BRAWL
  2173.  
  2174. ## Poaching a target, if target is unpoachable, just fires
  2175. POACH:
  2176.     if ("%GAG_ECHO" != "YES") then
  2177.     {
  2178.         echo
  2179.         echo *** POACH: ***
  2180.         echo
  2181.     }
  2182.     var FIRE_TYPE POACH
  2183.     var ALTEXP ON
  2184.     var EXP2 Stealth
  2185.     return
  2186.  
  2187. ## Point out hidden creatures
  2188. POINT:
  2189.     if ("%GAG_ECHO" != "YES") then
  2190.     {
  2191.         echo
  2192.         echo *** POINT: ***
  2193.         echo
  2194.     }
  2195.     action (point) on
  2196.     return
  2197.  
  2198. ### Turns off Retreating
  2199. RET:
  2200. RETREAT:
  2201.     if ("%GAG_ECHO" != "YES") then
  2202.     {
  2203.         echo
  2204.         echo *** RETREAT: ***
  2205.         echo
  2206.     }
  2207.     put #var GH_RETREAT ON
  2208.     return
  2209.  
  2210. ## Maintains a ritual spell
  2211. RITUAL:
  2212.     if contains("Barbarian|Commoner|Thief|Trader", "%guild") then return
  2213.     if ("%GAG_ECHO" != "YES") then
  2214.     {
  2215.         echo
  2216.         echo ***  RITUAL SPELL:  ***
  2217.         echo
  2218.     }
  2219.     if (toupper("%OPTION") = "RITUAL") then
  2220.     {
  2221.     put #var GH_RITUAL ON
  2222.     var GH_RITUALSPELL %1
  2223.     var GH_RITUALMANA %2
  2224.     }
  2225.     shift
  2226.     shift
  2227.     if "%GH_RITUALSPELL" = "ABSOLUTION" then put #var GH_CONSTRUCT OFF
  2228.     return
  2229.  
  2230. # Roam hunting area if all creatures in your room are dead
  2231. ROAM:
  2232.     if ("%GAG_ECHO" != "YES") then
  2233.     {
  2234.         echo
  2235.         echo *** ROAM: ***
  2236.         echo
  2237.     }
  2238.     put #var GH_ROAM ON
  2239.     if "$GH_AMBUSH" = "ON" then action (stalk) off
  2240.     return
  2241.  
  2242. # Scrape skins/pelts/hides after skinning
  2243. SCRAPE:
  2244.     if ("%GAG_ECHO" != "YES") then
  2245.     {
  2246.         echo
  2247.         echo *** SCRAPE: ***
  2248.         echo
  2249.     }
  2250.     if ("$GH_SKIN" != "ON") then gosub SKIN
  2251.     put #var GH_SCRAPE ON
  2252.     return
  2253.  
  2254. # Sets looting option
  2255. SEARCH:
  2256.     if ("%GAG_ECHO" != "YES") then
  2257.     {
  2258.         echo
  2259.         echo *** SEARCH: ***
  2260.         echo
  2261.     }
  2262.     if toupper("%1") = "ALL" || toupper("%1") = "TREASURE" || toupper("%1") = "BOXES"  || toupper("%1") = "EQUIPMENT"  || toupper("%1") = "GOODS" then
  2263.     {
  2264.         put #var GH_SEARCH %1
  2265.         shift
  2266.     }
  2267.     return
  2268.  
  2269. ## Skins creatures that can be skinned
  2270. SKIN:
  2271.     if ("%GAG_ECHO" != "YES") then
  2272.     {
  2273.         echo
  2274.         echo *** SKIN: ***
  2275.         echo
  2276.     }
  2277.     var BELT_WORN OFF
  2278.     action var BELT_WORN ON when ^You are wearing.+(ankle|arm|belt|outdoors|ritualist'?s?|skinning|tail|thigh|wrist) (blade|knife)
  2279.     put inventory
  2280.     waitforre ^You are wearing
  2281.     action remove ^You are wearing.+(ankle|arm|belt|outdoors|ritualist'?s?|skinning|tail|thigh|wrist) (blade|knife)
  2282.     put #var GH_SKIN ON
  2283.     if "$GH_BONE" = "ON" then put #var GH_SKINPART BONE
  2284.     if "$GH_PART" = "ON" then put #var GH_SKINPART PART
  2285.     if "$GH_BONE" = "OFF" && "$GH_PART" = "OFF" then put #var GH_SKINPART SKIN
  2286.     return
  2287.  
  2288. ## Retreats while skinning
  2289. SKINR:
  2290. SKINRE:
  2291. SKINRET:
  2292. SKINRETREAT:
  2293.     if ("%GAG_ECHO" != "YES") then
  2294.     {
  2295.         echo
  2296.         echo *** SKINRET: ***
  2297.         echo
  2298.     }
  2299.     if ("$GH_SKIN" != "ON") then gosub SKIN
  2300.     put #var GH_SKIN_RET ON
  2301.     return
  2302.  
  2303. ## Pauses between combat manuevers to sustain stamina
  2304. SLOW:
  2305.     if ("%GAG_ECHO" != "YES") then
  2306.     {
  2307.         echo
  2308.         echo ***  SLOW:  ***
  2309.         echo
  2310.     }
  2311.     put #var GH_SLOW ON
  2312.     return
  2313.  
  2314. ## Snapfires a ranged weapon or snapcasts spells
  2315. SNAP:
  2316. SNAPFIRE:
  2317.     if ("%GAG_ECHO" != "YES") then
  2318.     {
  2319.         echo
  2320.         echo *** SNAP: ***
  2321.         echo
  2322.     }
  2323.     put #var GH_SNAP ON
  2324.     if matchre ("%1", "(\d+)") then
  2325.     {
  2326.         put #var GH_SNAP_PAUSE $1
  2327.         shift
  2328.     } else put #var GH_SNAP_PAUSE 0
  2329.     return
  2330.  
  2331. ## Snipes with a ranged weapon
  2332. SNIP:
  2333. SNIPE:
  2334. SNIPING:
  2335.     if contains("Barbarian|Bard|Cleric|Commoner|Empath|Moon Mage|Paladin|Trader|Warrior Mage", "%guild") then return
  2336.     if ("%GAG_ECHO" != "YES") then
  2337.     {
  2338.         echo
  2339.         echo *** SNIPE: ***
  2340.         echo
  2341.     }
  2342.     var FIRE_TYPE SNIPE
  2343.     var ALTEXP ON
  2344.     var EXP2 Stealth
  2345.     return
  2346.  
  2347. ## Will cycle through stances
  2348. STA:
  2349. STAN:
  2350. STANC:
  2351. STANCE:
  2352.     if ("%GAG_ECHO" != "YES") then
  2353.     {
  2354.         echo
  2355.         echo *** STANCE: ***
  2356.         echo
  2357.     }
  2358.     action var PARRY_LEVEL $1 when ^You are currently using (\d+)% of your weapon parry skill
  2359.     action var EVAS_LEVEL $1 when ^You are currently using (\d+)% of your evasion skill
  2360.     action var SHIELD_LEVEL $1 when ^You are currently using (\d+)% of your shield block skill
  2361.     put #var GH_STANCE ON
  2362.     put stance
  2363.     waitfor Last Combat Maneuver:
  2364.     if (%PARRY_LEVEL > %EVAS_LEVEL) then
  2365.     {
  2366.         if (%PARRY_LEVEL > %SHIELD_LEVEL) then
  2367.         {
  2368.             var CURR_STANCE Parry_Ability
  2369.         } else
  2370.         {
  2371.             var CURR_STANCE Shield_Usage
  2372.         }
  2373.     } else
  2374.     {
  2375.         if (%EVAS_LEVEL >= %SHIELD_LEVEL) then
  2376.         {
  2377.             var CURR_STANCE Evasion
  2378.         } else
  2379.         {
  2380.             var CURR_STANCE Shield_Usage
  2381.         }
  2382.     }
  2383.     action remove ^You are currently using (\d+)% of your weapon parry skill
  2384.     action remove ^You are currently using (\d+)% of your evasion skill
  2385.     action remove ^You are currently using (\d+)% of your shield block skill
  2386.     echo %CURR_STANCE
  2387.     return
  2388.  
  2389. ## Throws a stacked weapon (e.g. throwing blades)
  2390. STACK:
  2391. STACKS:
  2392.     if ("%GAG_ECHO" != "YES") then
  2393.     {
  2394.         echo
  2395.         echo *** STACK: ***
  2396.         echo
  2397.     }
  2398.     var STACK ON
  2399.     goto THROW
  2400.  
  2401. SWAP:
  2402. BAST:
  2403. BASTA:
  2404. BASTAR:
  2405. BASTARD:
  2406.     if ("%GAG_ECHO" != "YES") then
  2407.     {
  2408.         echo
  2409.         echo *** SWAP: ***
  2410.         echo
  2411.     }
  2412.     gosub clear
  2413.     gosub GENERAL_TRIGGERS
  2414.     var SWAP_TYPE %1
  2415.     var GOING_TO WEAPON_CHECK
  2416.     shift
  2417.     goto SWAP_WIELD
  2418.  
  2419. TSWAP:
  2420.     if ("%GAG_ECHO" != "YES") then
  2421.     {
  2422.         echo
  2423.         echo *** THROWN SWAP: ***
  2424.         echo
  2425.     }
  2426.     gosub clear
  2427.     gosub GENERAL_TRIGGERS
  2428.     var SWAP_TYPE %1
  2429.     var GOING_TO THROW_VARI
  2430.     counter add 1200
  2431.     shift
  2432.  
  2433. ## Swap but for fans
  2434. FSWAP:
  2435.     if ("%GAG_ECHO" != "YES") then
  2436.     {
  2437.         echo
  2438.         echo *** FAN SWAP: ***
  2439.         echo
  2440.     }
  2441.     gosub clear
  2442.     gosub GENERAL_TRIGGERS
  2443.     var FSWAP_TYPE %1
  2444.     var FAN_STATUS CLOSED
  2445.     var GOING_TO WEAPON_CHECK
  2446.     shift
  2447.     goto FSWAP_WIELD
  2448.     FSWAP_WIELD:
  2449.         var LAST FSWAP_WIELD
  2450.         matchre FSWAP_%FSWAP_TYPE You draw|already holding|free to|With a flick of your wrist
  2451.         match BEGIN_HANDS free hand|need to have your right hand
  2452.         matchre FSWAP_REMOVE out of reach|remove|What were you|can't seem|Wield what\?
  2453.         match VARIABLE_ERROR You can only wield a weapon or a shield!
  2454.         put wield right my %1
  2455.         matchwait 15
  2456.     FSWAP_REMOVE:
  2457.         var LAST FSWAP_REMOVE
  2458.         matchre FSWAP_%FSWAP_TYPE You sling|re already|inventory|you remove
  2459.         matchre FSWAP_GET Remove what|You aren't wearing
  2460.         match BEGIN_HANDS hands are full
  2461.         put remove my %1
  2462.         matchwait 15
  2463.     FSWAP_GET:
  2464.         var LAST FSWAP_GET
  2465.         match FSWAP_%FSWAP_TYPE You get
  2466.         match VARIABLE_ERROR What were you
  2467.         put get my %1
  2468.         matchwait 15
  2469.         goto VARIABLE_ERROR
  2470.     FSWAP_SE:
  2471.         var LAST FSWAP_SE
  2472.         if ("%FAN_STATUS" = "CLOSED") then
  2473.         {
  2474.             matchre PAUSE (heavy|two-handed) edged|(heavy|medium|light|two-handed) blunt|(short|quarter) staff|pike|halberd
  2475.             matchre %GOING_TO (medium|light) edged
  2476.             put open my %1
  2477.             var FAN_STATUS OPENED
  2478.             matchwait 15
  2479.             goto SWAP_ERROR
  2480.         }
  2481.         if ("%FAN_STATUS" = "OPENED") then
  2482.         {
  2483.             matchre PAUSE (heavy|two-handed) edged|(heavy|medium|light|two-handed) blunt|(short|quarter) staff|pike|halberd
  2484.             matchre %GOING_TO (medium|light) edged
  2485.             put close my %1
  2486.             var FAN_STATUS CLOSED
  2487.             matchwait 15
  2488.             goto SWAP_ERROR
  2489.         }
  2490.     FSWAP_S:
  2491.         var LAST FSWAP_S
  2492.         if ("%FAN_STATUS" = "CLOSED") then
  2493.         {
  2494.             matchre PAUSE (heavy|medium|light|two-handed) edged|(heavy|medium|light|two-handed) blunt|pike|halberd
  2495.             matchre %GOING_TO (short|quarter) staff
  2496.             put open my %1
  2497.             var FAN_STATUS OPENED
  2498.             matchwait 15
  2499.             goto SWAP_ERROR
  2500.         }
  2501.         if ("%FAN_STATUS" = "OPENED") then
  2502.         {
  2503.             matchre PAUSE (heavy|medium|light|two-handed) edged|(heavy|medium|light|two-handed) blunt|pike|halberd
  2504.             matchre %GOING_TO (short|quarter) staff
  2505.             put close my %1
  2506.             var FAN_STATUS CLOSED
  2507.             matchwait 15
  2508.             goto SWAP_ERROR
  2509.         }
  2510.  
  2511.     SWAP_WIELD:
  2512.         var LAST SWAP_WIELD
  2513.             matchre SWAP_%SWAP_TYPE You draw|already holding|free to|With a flick of your wrist
  2514.             match BEGIN_HANDS free hand|need to have your right hand
  2515.             matchre SWAP_REMOVE out of reach|remove|What were you|can't seem|Wield what\?
  2516.             match VARIABLE_ERROR You can only wield a weapon or a shield!
  2517.         put wield right my %1
  2518.         matchwait 15
  2519.     SWAP_REMOVE:
  2520.         var LAST SWAP_REMOVE
  2521.             matchre SWAP_%SWAP_TYPE You sling|re already|inventory|you remove
  2522.             matchre SWAP_GET Remove what|You aren't wearing
  2523.             match BEGIN_HANDS hands are full
  2524.         put remove my %1
  2525.         matchwait 15
  2526.     SWAP_GET:
  2527.         var LAST SWAP_GET
  2528.             match SWAP_%SWAP_TYPE You get
  2529.             match VARIABLE_ERROR What were you
  2530.         put get my %1
  2531.         matchwait 15
  2532.         goto VARIABLE_ERROR
  2533.     SWAP_SE:
  2534.         var LAST SWAP_SE
  2535.             matchre PAUSE (heavy|two-handed) edged|(heavy|medium|light|two-handed) blunt|(short|quarter) staff|pike|halberd
  2536.             matchre %GOING_TO (medium|light) edged
  2537.         put swap my %1
  2538.         matchwait 15
  2539.         goto SWAP_ERROR
  2540.     SWAP_LE:
  2541.         var LAST SWAP_LE
  2542.             matchre PAUSE (medium|light|two-handed) edged|(heavy|medium|light|two-handed) blunt|(short|quarter) staff|pike|halberd
  2543.             match %GOING_TO heavy edged
  2544.         put swap my %1
  2545.         matchwait 15
  2546.         goto SWAP_ERROR
  2547.     SWAP_SB:
  2548.         var LAST SWAP_SB
  2549.             matchre PAUSE (heavy|medium|light|two-handed) edged|(heavy|two-handed) blunt|(short|quarter) staff|pike|halberd
  2550.             matchre %GOING_TO (medium|light) blunt
  2551.         put swap my %1
  2552.         matchwait 15
  2553.         goto SWAP_ERROR
  2554.     SWAP_LB:
  2555.         var LAST SWAP_LB
  2556.             matchre PAUSE (heavy|medium|light|two-handed) edged|(medium|light|two-handed) blunt|(short|quarter) staff|pike|halberd
  2557.             match %GOING_TO heavy blunt
  2558.         put swap my %1
  2559.         matchwait 15
  2560.         goto SWAP_ERROR
  2561.     SWAP_2HE:
  2562.         var LAST SWAP_2HE
  2563.             matchre PAUSE (heavy|medium|light) edged|(heavy|medium|light|two-handed) blunt|(short|quarter) staff|pike|halberd
  2564.             match %GOING_TO two-handed edged
  2565.         put swap my %1
  2566.         matchwait 15
  2567.         goto SWAP_ERROR
  2568.     SWAP_2HB:
  2569.         var LAST SWAP_2HB
  2570.             matchre PAUSE (heavy|medium|light|two-handed) edged|(heavy|medium|light) blunt|(short|quarter) staff|pike|halberd
  2571.             match %GOING_TO two-handed blunt
  2572.         put swap my %1
  2573.         matchwait 15
  2574.         goto SWAP_ERROR
  2575.  
  2576.     SWAP_POLE:
  2577.         var LAST SWAP_POLE
  2578.             matchre PAUSE (heavy|medium|light|two-handed) edged|(heavy|medium|light|two-handed) blunt|(short|quarter) staff
  2579.             matchre %GOING_TO pike|halberd
  2580.         put swap my %1
  2581.         matchwait 60
  2582.         goto SWAP_ERROR
  2583.     SWAP_S:
  2584.         var LAST SWAP_S
  2585.             matchre PAUSE (heavy|medium|light|two-handed) edged|(heavy|medium|light|two-handed) blunt|pike|halberd
  2586.             matchre %GOING_TO (short|quarter) staff
  2587.         put swap my %1
  2588.         matchwait 60
  2589.         goto SWAP_ERROR
  2590.  
  2591. ## Trains tactics as part of routine
  2592. TAC:
  2593. TACT:
  2594. TACTIC:
  2595. TACTICS:
  2596. if ("%GAG_ECHO" != "YES") then
  2597. {
  2598.   echo
  2599.   echo *** TACTICS: ***
  2600.   echo
  2601. }
  2602. put #var GH_TACTICS ON
  2603. return
  2604.  
  2605. ## Sets a bodypart to target for ranged & spells
  2606. TARG:
  2607. TARGET:
  2608.     if ("%GAG_ECHO" != "YES") then
  2609.     {
  2610.         echo
  2611.         echo *** TARGET: ***
  2612.         echo
  2613.     }
  2614.     if matchre ("%1","^\D+$") then
  2615.     {
  2616.         put #VAR GH_TARGET %1
  2617.         echo Targetting the %1 with attacks.
  2618.         shift
  2619.     }
  2620.     return
  2621.  
  2622. THIEF:
  2623.     if ("%GAG_ECHO" != "YES") then
  2624.     {
  2625.         echo
  2626.         echo *** THIEF AMBUSHES ***
  2627.         echo
  2628.     }
  2629.     put #var GH_THIEF ON
  2630.     return
  2631.  
  2632. ## Uses HURL to throw weapons and make them stick
  2633. HURL:
  2634.     var HURL ON
  2635.     goto throw
  2636.  
  2637. ## Uses LOB to throw weapons and prevent them from sticking
  2638. LOB:
  2639.     var LOB ON
  2640.     goto throw
  2641.  
  2642. ## Throws a weapon
  2643. THROW:
  2644. THROWN:
  2645.     if ("%GAG_ECHO" != "YES") then
  2646.     {
  2647.         echo
  2648.         echo *** THROWN: ***
  2649.         echo
  2650.     }
  2651.     gosub clear
  2652.     gosub GENERAL_TRIGGERS
  2653.     var THROWN ON
  2654.     counter add 1200
  2655.     WIELD_THROWN:
  2656.         var LAST WIELD_THROWN
  2657.             matchre THROW_VARI You draw|already holding|free to|With a flick of your wrist
  2658.             match BEGIN_HANDS free hand|need to have your right hand
  2659.             matchre THROW_EQUIP out of reach|remove|What were you|can't seem|Wield what\?|^You can only wield
  2660.         put wield right my %1
  2661.         matchwait 60
  2662.  
  2663.     THROW_EQUIP:
  2664.             matchre THROW_VARI You sling|re already|inventory|You remove|right hand
  2665.             matchre THROW_EQUIP_2 ^Remove what\?|You aren't wearing that
  2666.             match BEGIN_HANDS hands are full
  2667.         put remove my %1
  2668.         matchwait 60
  2669.  
  2670.     THROW_EQUIP_2:
  2671.             matchre THROW_VARI ^You get|^You are already holding
  2672.             matchre VARIABLE_CHECK ^What were you
  2673.         put get my %1
  2674.         matchwait 15
  2675.     goto VARIABLE_ERROR
  2676.  
  2677.     THROW_VARI:
  2678.         var LAST THROW_VARI
  2679.         var CURR_WEAPON %1
  2680.         if ("$GH_FEINT" = "ON") then put #var GH_FEINT OFF
  2681.         if ("%MAGIC_TYPE" != "OFF") then var MAGIC_COUNT %c
  2682.         if (("%HAND" = "left") && ("$lefthand" = "Empty")) then gosub SWAP_LEFT $righthandnoun
  2683.         else if_2 then gosub EQUIP_SHIELD %2
  2684.     APPRAISE_THROWN:
  2685.         var LAST APPRAISE_THROWN
  2686.         if (toupper("%CURR_WEAPON") = "LOG") then goto HT
  2687.         if (toupper("%CURR_WEAPON") = "ROCK") then goto LT
  2688.             match LT light thrown
  2689.             match HT heavy thrown
  2690.             match HT heavy blunt
  2691.             matchre WEAPON_APPR_ERROR Roundtime|It's hard to appraise
  2692.         put appraise my %CURR_WEAPON quick
  2693.         matchwait 15
  2694.         goto WEAPON_APPR_ERROR
  2695.     LT:
  2696.         var T_SHEATH %LT_SHEATH
  2697.         var WEAPON_EXP Light_Thrown
  2698.         if ("%DSET" = "ON") then goto SET_DEFAULT
  2699.         else goto %c
  2700.     HT:
  2701.         var T_SHEATH %HT_SHEATH
  2702.         var WEAPON_EXP Heavy_Thrown
  2703.         if ("%DSET" = "ON") then goto SET_DEFAULT
  2704.         else goto %c
  2705.  
  2706. ## Will tie bundles.
  2707. TIE:
  2708.     if ("%GAG_ECHO" != "YES") then
  2709.     {
  2710.         echo
  2711.         echo *** TIE: ***
  2712.         echo
  2713.     }
  2714.     put #var GH_TIE ON
  2715.     if ("$GH_BUNDLE" != "ON") then gosub BUNDLE
  2716.     return
  2717.  
  2718. ## Wears bunles
  2719. WEAR:
  2720.     if ("%GAG_ECHO" != "YES") then
  2721.     {
  2722.         echo
  2723.         echo *** WEAR: ***
  2724.         echo
  2725.     }
  2726.     put #var GH_WEAR ON
  2727.     if ("$GH_BUNDLE" != "ON") then gosub BUNDLE
  2728.     return
  2729.  
  2730. TIME:
  2731. TIMER:
  2732.     if ("%GAG_ECHO" != "YES") then
  2733.     {
  2734.         echo
  2735.         echo *** TIMER: ***
  2736.         echo
  2737.     }
  2738.     put #var GH_TIMER ON
  2739.     var START_TIME %t
  2740.     if matchre ("%1", "(\d+)") then
  2741.     {
  2742.         var MAX_TRAIN_TIME $1
  2743.         shift
  2744.     }
  2745.     math MAX_TRAIN_TIME add %START_TIME
  2746.     return
  2747.  
  2748. TRAIN:
  2749.     if ("%GAG_ECHO" != "YES") then
  2750.     {
  2751.         echo
  2752.         echo *** TRAIN: ***
  2753.         echo
  2754.     }
  2755.     put #var GH_EXP ON
  2756.     put #var GH_TRAIN ON
  2757.     return
  2758.  
  2759. ## Juggles a yoyo when no monsters
  2760. YOYO:
  2761.     if ("%GAG_ECHO" != "YES") then
  2762.     {
  2763.         echo
  2764.         echo *** YOYO: ***
  2765.         echo
  2766.     }
  2767.     put #var GH_JUGGLE ON
  2768.     var YOYO ON
  2769.     return
  2770.  
  2771. ####################################
  2772. ##                                ##
  2773. ##    End variables & options     ##
  2774. ##                                ##
  2775. ####################################
  2776.  
  2777. BEGIN_HANDS:
  2778.     echo
  2779.     echo *** BEGIN_HANDS: ***
  2780.     echo
  2781.     echo *************************************
  2782.     echo **  Empty your hands and try again **
  2783.     echo **         Ending script           **
  2784.     echo *************************************
  2785.     echo
  2786.     exit
  2787.  
  2788. ###############################
  2789. ##                           ##
  2790. ##  Weapon checking section  ##
  2791. ##                           ##
  2792. ###############################
  2793.  
  2794. WEAPON_CHECK:
  2795.     put #var GH_LAST_COMMAND appraise my %CURR_WEAPON quick
  2796.     if ("%GAG_ECHO" != "YES") then
  2797.     {
  2798.         echo
  2799.         echo *** WEAPON_CHECK: ***
  2800.         echo
  2801.     }
  2802.     var LAST WEAPON_CHECK
  2803.     gosub clear
  2804.     if ("%BACKSTAB" != "ON") then var CURR_WEAPON %1
  2805.         matchre LE (a|and) light edged
  2806.         matchre ME (a|and) medium edged
  2807.         matchre HE (a|and) heavy edged
  2808.         matchre 2HE (a|and) two-handed edged
  2809.         matchre LB (a|and) light blunt
  2810.         matchre MB (a|and) medium blunt
  2811.         matchre HB (a|and) heavy blunt
  2812.         matchre 2HB (a|and) two-handed blunt
  2813.         matchre STAFF_SLING (a|and) staff sling
  2814.         matchre SHORT_BOW (a|and) short ?bow
  2815.         matchre LONG_BOW (a|and) long ?bow
  2816.         matchre COMP_BOW (a|and) composite ?bow
  2817.         matchre LX  (a|and) light crossbow
  2818.         matchre HX (a|and) heavy crossbow
  2819.         matchre SHORT_STAFF (a|and) short staff
  2820.         matchre Q_STAFF (a|and) quarter ?staff
  2821.         matchre PIKE (a|and) pike
  2822.         matchre HALBERD (a|and) halberd
  2823.         matchre SLING (a|and) sling
  2824.         matchre WEAPON_APPR_ERROR Roundtime|It's hard to appraise
  2825.     put appraise my %CURR_WEAPON quick
  2826.     matchwait 15
  2827.     goto WEAPON_APPR_ERROR
  2828.  
  2829.     2HE:
  2830.         echo
  2831.         echo *** 2HE: ***
  2832.         echo
  2833.         var WEAPON_EXP Twohanded_Edged
  2834.         var RANGED OFF
  2835.         var _COMBO1 parry
  2836.         var _COMBO2 feint
  2837.         var _COMBO3 attack
  2838.         var _COMBO4 attack
  2839.         var _COMBO5 attack
  2840.         var _COMBO6 attack
  2841.         var _COMBO7 unused
  2842.         var _COMBO8 unused
  2843.         counter add 600
  2844.         if ("%HAND" = "left") then
  2845.         {
  2846.             var HAND
  2847.             var ALTEXP NONE
  2848.         }
  2849.         goto 2_HANDED_WEAPON
  2850.  
  2851.     HE:
  2852.         echo
  2853.         echo *** HE: ***
  2854.         echo
  2855.         var WEAPON_EXP Large_Edged
  2856.         var RANGED OFF
  2857.         if matchre("$righthandnoun", "cinquedea") then goto HE_STAB
  2858.         var _COMBO1 parry
  2859.         var _COMBO2 feint
  2860.         var _COMBO3 attack
  2861.         var _COMBO4 attack
  2862.         var _COMBO5 attack
  2863.         var _COMBO6 attack
  2864.         var _COMBO7 unused
  2865.         var _COMBO8 unused
  2866.         counter add 600
  2867.         goto 1_HANDED_WEAPON
  2868.     HE_SLICE:
  2869.         echo
  2870.         echo *** HE Slicer ***
  2871.         echo
  2872.         var _COMBO1 parry
  2873.         var _COMBO2 feint
  2874.         var _COMBO3 attack
  2875.         var _COMBO4 attack
  2876.         var _COMBO5 attack
  2877.         var _COMBO6 attack
  2878.         var _COMBO7 attack
  2879.         var _COMBO8 attack
  2880.         counter add 800
  2881.         goto 1_HANDED_WEAPON
  2882.  
  2883.     HE_STAB:
  2884.         echo
  2885.         echo *** HE Stabber ***
  2886.         echo
  2887.         var _COMBO1 parry
  2888.         var _COMBO2 feint
  2889.         var _COMBO3 attack
  2890.         var _COMBO4 attack
  2891.         var _COMBO5 attack
  2892.         var _COMBO6 attack
  2893.         var _COMBO7 attack
  2894.         var _COMBO8 unused
  2895.         counter add 700
  2896.         goto 1_HANDED_WEAPON
  2897.     ME:
  2898.         echo
  2899.         echo *** ME: ***
  2900.         echo
  2901.         var WEAPON_EXP Small_Edged
  2902.         var RANGED OFF
  2903.         if matchre("$righthand","adze|axe|cleaver|curlade|cutlass|hanger|hatchet|lata'oloh|mallet|mirror blade|nimsha|parang|riste|sapara|scimitar|scythe-blade|shotel|sword|tei'oloh'ata|telo|zobens") then goto ME_SLICE
  2904.         if matchre("$righthand","baselard|blade|foil|gladius|nambeli|pasabas|rapier|saber|sabre|shashqa|yataghan") then goto ME_STAB
  2905.         if matchre("$righthand","iltesh") then goto ME_ILTESH
  2906.         goto WEAPON_APPR_ERROR
  2907.  
  2908.         ME_SLICE:
  2909.             echo
  2910.             echo *** ME_SLICE: ***
  2911.             echo
  2912.             var _COMBO1 parry
  2913.             var _COMBO2 feint
  2914.             var _COMBO3 attack
  2915.             var _COMBO4 attack
  2916.             var _COMBO5 attack
  2917.             var _COMBO6 attack
  2918.             var _COMBO7 unused
  2919.             var _COMBO8 unused
  2920.             counter add 600
  2921.         goto 1_HANDED_WEAPON
  2922.  
  2923.         ME_ILTESH:
  2924.             echo
  2925.             echo *** ME_ILTESH: ***
  2926.             echo
  2927.             var _COMBO1 feint
  2928.             var _COMBO2 attack
  2929.             var _COMBO3 attack
  2930.             var _COMBO4 attack
  2931.             var _COMBO5 attack
  2932.             var _COMBO6 attack
  2933.             var _COMBO7 attack
  2934.             var _COMBO8 attack
  2935.             counter add 800
  2936.         goto 1_HANDED_WEAPON
  2937.  
  2938.         ME_STAB:
  2939.             echo
  2940.             echo *** ME_THRUST: ***
  2941.             echo
  2942.             var _COMBO1 parry
  2943.             var _COMBO2 feint
  2944.             var _COMBO3 attack
  2945.             var _COMBO4 attack
  2946.             var _COMBO5 attack
  2947.             var _COMBO6 unused
  2948.             var _COMBO7 unused
  2949.             var _COMBO8 unused
  2950.             counter add 500
  2951.         goto 1_HANDED_WEAPON
  2952.  
  2953.     LE:
  2954.         echo
  2955.         echo *** LE: ***
  2956.         echo
  2957.         var WEAPON_EXP Small_Edged
  2958.         var RANGED OFF
  2959.         if matchre("$righthandnoun", "bin|blade|bodkin|dagger|dirk|kasai|kindjal|lata|marlinspike|misericorde|pick|poignard|pugio|shavi|shriike|stiletto|takouba|telek") then goto LE_STAB
  2960.         if matchre("$righthandnoun", "fan|dao|falcata|jambiya|kanabu|katar|knife|kounmya|kris|kythe|nehlata|oben|sword|tago|uenlata") then goto LE_SLICE
  2961.         goto WEAPON_APPR_ERROR
  2962.  
  2963.         LE_SLICE:
  2964.             echo
  2965.             echo *** LE_SLICE: ***
  2966.             echo
  2967.             var _COMBO1 parry
  2968.             var _COMBO2 feint
  2969.             var _COMBO3 attack
  2970.             var _COMBO4 attack
  2971.             var _COMBO5 attack
  2972.             var _COMBO6 attack
  2973.             var _COMBO7 unused
  2974.             var _COMBO8 unused
  2975.             counter add 600
  2976.         goto 1_HANDED_WEAPON
  2977.  
  2978.         LE_STAB:
  2979.             echo
  2980.             echo *** LE_STAB: ***
  2981.             echo
  2982.             var _COMBO1 parry
  2983.             var _COMBO2 feint
  2984.             var _COMBO3 attack
  2985.             var _COMBO4 attack
  2986.             var _COMBO5 attack
  2987.             var _COMBO6 unused
  2988.             var _COMBO7 unused
  2989.             var _COMBO8 unused
  2990.             counter add 500
  2991.         goto 1_HANDED_WEAPON
  2992.  
  2993.     2HB:
  2994.         echo
  2995.         echo *** 2HB: ***
  2996.         echo
  2997.         var RANGED OFF
  2998.         var WEAPON_EXP Twohanded_Blunt
  2999.         var _COMBO1 dodge
  3000.         var _COMBO2 feint
  3001.         var _COMBO3 attack
  3002.         var _COMBO4 attack
  3003.         var _COMBO5 attack
  3004.         var _COMBO6 attack
  3005.         var _COMBO7 unused
  3006.         var _COMBO8 unused
  3007.         counter add 600
  3008.         if ("%HAND" = "left") then
  3009.         {
  3010.             var HAND
  3011.             var ALTEXP NONE
  3012.         }
  3013.         goto 2_HANDED_WEAPON
  3014.  
  3015.     HB:
  3016.         echo
  3017.         echo *** HB: ***
  3018.         echo
  3019.         var WEAPON_EXP Large_Blunt
  3020.         var RANGED OFF
  3021.         var _COMBO1 dodge
  3022.         var _COMBO2 feint
  3023.         var _COMBO3 attack
  3024.         var _COMBO4 attack
  3025.         var _COMBO5 attack
  3026.         var _COMBO6 attack
  3027.         var _COMBO7 unused
  3028.         var _COMBO8 unused
  3029.         counter add 600
  3030.         goto 1_HANDED_WEAPON
  3031.  
  3032.     MB:
  3033.         echo
  3034.         echo *** MB: ***
  3035.         echo
  3036.         var WEAPON_EXP Small_Blunt
  3037.         var RANGED OFF
  3038.         var _COMBO1 dodge
  3039.         var _COMBO2 feint
  3040.         var _COMBO3 attack
  3041.         var _COMBO4 attack
  3042.         var _COMBO5 attack
  3043.         var _COMBO6 attack
  3044.         var _COMBO7 unused
  3045.         var _COMBO8 unused
  3046.         counter add 600
  3047.         goto 1_HANDED_WEAPON
  3048.  
  3049.     LB:
  3050.         echo
  3051.         echo *** LB: ***
  3052.         echo
  3053.         var WEAPON_EXP Small_Blunt
  3054.         var RANGED OFF
  3055.         var _COMBO1 dodge
  3056.         var _COMBO2 feint
  3057.         var _COMBO3 attack
  3058.         var _COMBO4 attack
  3059.         var _COMBO5 attack
  3060.         var _COMBO6 attack
  3061.         var _COMBO7 attack
  3062.         var _COMBO8 unused
  3063.         counter add 700
  3064.         goto 1_HANDED_WEAPON
  3065.  
  3066.     HALBERD:
  3067.         echo
  3068.         echo *** HALBERD: ***
  3069.         echo
  3070.         var WEAPON_EXP Polearms
  3071.         var RANGED OFF
  3072.         var _COMBO1 dodge
  3073.         var _COMBO2 feint
  3074.         var _COMBO3 attack
  3075.         var _COMBO4 attack
  3076.         var _COMBO5 attack
  3077.         var _COMBO6 attack
  3078.         var _COMBO7 unused
  3079.         var _COMBO8 unused
  3080.         counter add 600
  3081.         if ("%HAND" = "left") then
  3082.         {
  3083.             var HAND
  3084.             var ALTEXP NONE
  3085.         }
  3086.         goto 2_HANDED_WEAPON
  3087.  
  3088.     PIKE:
  3089.         echo
  3090.         echo *** PIKE: ***
  3091.         echo
  3092.         var WEAPON_EXP Polearms
  3093.         var RANGED OFF
  3094.         var _COMBO1 dodge
  3095.         var _COMBO2 attack
  3096.         var _COMBO3 attack
  3097.         var _COMBO4 attack
  3098.         var _COMBO5 attack
  3099.         var _COMBO6 unused
  3100.         var _COMBO7 unused
  3101.         var _COMBO8 unused
  3102.         counter add 500
  3103.         if ("%HAND" = "left") then
  3104.         {
  3105.             var HAND
  3106.             var ALTEXP NONE
  3107.         }
  3108.         goto 2_HANDED_WEAPON
  3109.  
  3110.     SHORT_STAFF:
  3111.         echo
  3112.         echo *** SHORT_STAFF: ***
  3113.         echo
  3114.         var WEAPON_EXP Staves
  3115.         var RANGED OFF
  3116.         var _COMBO1 parry
  3117.         var _COMBO2 attack
  3118.         var _COMBO3 attack
  3119.         var _COMBO4 attack
  3120.         var _COMBO5 attack
  3121.         var _COMBO6 unused
  3122.         var _COMBO7 unused
  3123.         var _COMBO8 unused
  3124.         counter add 500
  3125.         goto 1_HANDED_WEAPON
  3126.  
  3127.     Q_STAFF:
  3128.         echo
  3129.         echo *** QUARTER_STAFF: ***
  3130.         echo
  3131.         var WEAPON_EXP Staves
  3132.         var RANGED OFF
  3133.         var _COMBO1 parry
  3134.         var _COMBO2 attack
  3135.         var _COMBO3 attack
  3136.         var _COMBO4 attack
  3137.         var _COMBO5 attack
  3138.         var _COMBO6 attack
  3139.         var _COMBO7 unused
  3140.         var _COMBO8 unused
  3141.         counter add 600
  3142.         if ("%HAND" = "left") then
  3143.         {
  3144.             var HAND
  3145.             var ALTEXP NONE
  3146.         }
  3147.         goto 2_HANDED_WEAPON
  3148.  
  3149.     SHORT_BOW:
  3150.         echo
  3151.         echo *** SHORT_BOW: ***
  3152.         echo
  3153.         var WEAPON_EXP Bow
  3154.         var RANGED ON
  3155.         var AMMO %BOW_AMMO
  3156.         pause 1
  3157.         put retreat
  3158.         counter add 1000
  3159.         goto 2_HANDED_WEAPON
  3160.  
  3161.     LONG_BOW:
  3162.         echo
  3163.         echo *** LONG_BOW: ***
  3164.         echo
  3165.         var WEAPON_EXP Bow
  3166.         var RANGED ON
  3167.         var AMMO %BOW_AMMO
  3168.         pause 1
  3169.         put retreat
  3170.         counter add 1000
  3171.         goto 2_HANDED_WEAPON
  3172.  
  3173.     COMP_BOW:
  3174.         echo
  3175.         echo *** COMP_BOW: ***
  3176.         echo
  3177.         var WEAPON_EXP Bow
  3178.         var RANGED ON
  3179.         var AMMO %BOW_AMMO
  3180.         pause 1
  3181.         put retreat
  3182.         counter add 1000
  3183.         goto 2_HANDED_WEAPON
  3184.  
  3185.     HX:
  3186.         echo
  3187.         echo *** HX: ***
  3188.         echo
  3189.         var WEAPON_EXP Crossbow
  3190.         var RANGED ON
  3191.         var AMMO %XB_AMMO
  3192.         pause 1
  3193.         put retreat
  3194.         counter add 1000
  3195.         goto 2_HANDED_WEAPON
  3196.  
  3197.     LX:
  3198.         echo
  3199.         echo *** LX: ***
  3200.         echo
  3201.         var WEAPON_EXP Crossbow
  3202.         var RANGED ON
  3203.         var AMMO %XB_AMMO
  3204.         pause 1
  3205.         put retreat
  3206.         counter add 1000
  3207.         goto LX_SLING
  3208.  
  3209.     SLING:
  3210.         echo
  3211.         echo *** SLING: ***
  3212.         echo
  3213.         var WEAPON_EXP Slings
  3214.         var RANGED ON
  3215.         var AMMO %SLING_AMMO
  3216.         pause 1
  3217.         put retreat
  3218.         counter add 1000
  3219.         goto LX_SLING
  3220.  
  3221.     STAFF_SLING:
  3222.         echo
  3223.         echo *** STAFF_SLING: ***
  3224.         echo
  3225.         var WEAPON_EXP Slings
  3226.         var RANGED ON
  3227.         var AMMO %SLING_AMMO
  3228.         pause 1
  3229.         put retreat
  3230.         counter add 1000
  3231.         goto 2_HANDED_WEAPON
  3232.  
  3233.     2_HANDED_WEAPON:
  3234.         var LAST 2_HANDED_WEAPON
  3235.         save %c
  3236.         if (("%RANGED" = "ON") && ("$GH_FEINT" = "ON")) then put #var GH_FEINT OFF
  3237.         if ("%MAGIC_TYPE" != "OFF") then var MAGIC_COUNT %c
  3238.         if ("%DSET" = "ON") then goto SET_DEFAULT
  3239.         goto COUNT_$GH_DANCING
  3240.  
  3241.     1_HANDED_WEAPON:
  3242.         var LAST 1_HANDED_WEAPON
  3243.         save %c
  3244.         if ("%MAGIC_TYPE" != "OFF") then var MAGIC_COUNT %c
  3245.         if ("%DSET" = "ON") then goto SET_DEFAULT
  3246.         if (("%HAND" = "left") && ("$lefthand" = "Empty")) then gosub SWAP_LEFT $righthandnoun
  3247.         else if_2 then gosub EQUIP_SHIELD %2
  3248.         goto COUNT_$GH_DANCING
  3249.  
  3250.     LX_SLING:
  3251.         var LAST LX_SLING
  3252.         save %c
  3253.         if ("$GH_FEINT" = "ON") then put #var GH_FEINT OFF
  3254.         if ("%MAGIC_TYPE" != "OFF") then var MAGIC_COUNT %c
  3255.         if ("%DSET" = "ON") then goto SET_DEFAULT
  3256.         if_2 then gosub EQUIP_SHIELD %2
  3257.         goto COUNT_$GH_DANCING
  3258.  
  3259.     BRAWL_SETUP:
  3260.         var LAST BRAWL_SETUP
  3261.         save %c
  3262.         if ("%MAGIC_TYPE" != "OFF") then var MAGIC_COUNT %c
  3263.         if ("%DSET" = "ON") then goto SET_DEFAULT
  3264.         if_1 then gosub EQUIP_SHIELD %1
  3265.         goto COUNT_$GH_DANCING
  3266.  
  3267. #######################
  3268. ##                   ##
  3269. ##   Useful gosubs   ##
  3270. ##                   ##
  3271. #######################
  3272. SWAP_LEFT:
  3273.     var ITEM $1
  3274. SWAPPING_LEFT:
  3275.         matchre SWAPPING_LEFT %ITEM(.*)to your right hand
  3276.         matchre RETURN %ITEM(.*)to your left hand
  3277.     put swap
  3278.     matchwait 15
  3279.     goto SWAP_ERROR
  3280.  
  3281. SWAP_RIGHT:
  3282.     var ITEM $1
  3283. SWAPPING_RIGHT:
  3284.         matchre SWAPPING_RIGHT %ITEM(.*)to your left hand
  3285.         matchre RETURN %ITEM(.*)to your right hand
  3286.     put swap
  3287.     matchwait 15
  3288.     goto SWAP_ERROR
  3289.  
  3290. EQUIP_SHIELD:
  3291.     if ("%SHIELD" = "NONE") then var SHIELD $1
  3292.     pause 0.5
  3293.     if ("%GAG_ECHO" != "YES") then
  3294.     {
  3295.         echo
  3296.         echo *** EQUIP_SHIELD: ***
  3297.         echo
  3298.     }
  3299.     GETTING_SHIELD:
  3300.             match WEAPON_APPR_ERROR What were you
  3301.             matchre RETURN already|You get|You sling|You remove|You loosen
  3302.         put remove my %SHIELD
  3303.         put get my %SHIELD
  3304.         matchwait 15
  3305.     EQUIP_SHIELD_FAIL:
  3306.         echo
  3307.         echo *** Something happened while getting shield ***
  3308.         echo ***           Aborting script               ***
  3309.         echo
  3310.         gosub clear
  3311.         put #beep
  3312.         goto ERROR_DONE
  3313.  
  3314. UNEQUIP_SHIELD:
  3315.     pause 0.5
  3316.     if ("%GAG_ECHO" != "YES") then
  3317.     {
  3318.         echo
  3319.         echo *** UNEQUIP_SHIELD ***
  3320.         echo
  3321.     }
  3322.     STOWING_SHIELD:
  3323.             matchre RETURN You put your|You sling|You are already wearing that|But that is already in your inventory|You slide your left
  3324.         put wear my %SHIELD
  3325.         put stow my %SHIELD
  3326.         matchwait 15
  3327.     UNEQUIP_SHIELD_FAIL:
  3328.         echo
  3329.         echo *** Something happened while stowing shield ***
  3330.         echo ***           Aborting script               ***
  3331.         echo
  3332.         gosub clear
  3333.         put #beep
  3334.         goto ERROR_DONE
  3335.  
  3336. WIELD_WEAPON:
  3337.     var STRING $1
  3338.     pause 0.5
  3339.     if ("%GAG_ECHO" != "YES") then
  3340.     {
  3341.         echo
  3342.         echo *** WIELD_WEAPON: ***
  3343.         echo
  3344.     }
  3345.     WIELDING_WEAPON:
  3346.             matchre REMOVING_WEAPON out of reach|You'll need to remove|What were you|can't seem|is out of reach|You can only wield
  3347.             matchre RETURN You draw|already holding|You deftly remove|With a flick of your wrist|With fluid and stealthy movements|You slip a
  3348.         put wield my %STRING
  3349.         matchwait 10
  3350.     REMOVING_WEAPON:
  3351.             matchre WIELD_FAIL free hand|hands are full
  3352.             matchre GETTING_WEAPON Remove what?|You aren't wearing
  3353.             matchre RETURN You sling|already holding|inventory|You remove|You deftly remove
  3354.         put remove my %STRING
  3355.         matchwait 10
  3356.     GETTING_WEAPON:
  3357.             matchre WIELD_FAIL Please rephrase that command|What were you
  3358.             matchre RETURN You get|You are already holding
  3359.         put get my %STRING
  3360.         matchwait 10
  3361.     WIELD_FAIL:
  3362.         echo
  3363.         echo *** Something happened during wielding ***
  3364.         echo ***           Aborting script          ***
  3365.         echo
  3366.         gosub clear
  3367.         put #beep
  3368.         goto ERROR_DONE
  3369.  
  3370. SHEATHE:
  3371.     if ("%GAG_ECHO" != "YES") then
  3372.     {
  3373.         echo
  3374.         echo *** SHEATHE ***
  3375.         echo
  3376.     }
  3377.     if ("$0" = "blades") then var COMM_STRING blade
  3378.     else var COMM_STRING $0
  3379.     pause 0.5
  3380.     if "$BW" != "OFF" && "$GH_BUFF" = "ON" then
  3381.     {
  3382.     put #send release bond
  3383.     waitforre ^You sense|^You are not|^Release what|^You are ending the bond with your
  3384.     }
  3385.     if ("$righthandnoun" = "fan") && ("%FAN_STATUS" = "OPENED") then
  3386.     {
  3387.         put close my $righthand
  3388.         var FAN_STATUS CLOSED
  3389.         pause .5
  3390.     }
  3391.     SHEATHING:
  3392.             matchre WEAR_WEAPON where\?
  3393.             matchre RETURN ^Sheathe what\?|^Sheathing an?|^With a flick of your wrist|^With fluid and stealthy movements|^You easily strap|^You hang|^You secure|^You sheath|^You slip|^You strap|you sheath
  3394.         put sheathe my %COMM_STRING
  3395.         matchwait 10
  3396.     WEAR_WEAPON:
  3397.         match STOW_WEAPON You can't wear that!
  3398.         matchre RETURN You sling|Wear what?|You attach|You slide your left arm
  3399.         put wear my %COMM_STRING
  3400.         matchwait 10
  3401.     STOW_WEAPON:
  3402.             matchre RETURN You put|easily strap|already in your inventory
  3403.         put stow my %COMM_STRING
  3404.         matchwait 10
  3405.     SHEATHE_FAIL:
  3406.         echo
  3407.         echo *** Something happened during sheathing ***
  3408.         echo ***                 Aborting script                 ***
  3409.         echo
  3410.         gosub clear
  3411.         put #beep
  3412.         goto ERROR_DONE
  3413.  
  3414. RANGE_SHEATHE:
  3415.     if ("%GAG_ECHO" != "YES") then
  3416.         {
  3417.         echo
  3418.         echo *** RANGE_SHEATHE: ***
  3419.         echo
  3420.         }
  3421.     pause 1
  3422.     put retreat
  3423.     waitfor You
  3424.     pause 1
  3425.     put unload %CURR_WEAPON
  3426.     pause 1
  3427.     STOW_AMMO:
  3428.     matchre STOW_AMMO You pick up|You put
  3429.     matchre GO_ON Stow what?|You stop as you
  3430.     if "%AMMO" = "basilisk head arrow" then put stow basilisk arrow
  3431.     else
  3432.     put stow %AMMO
  3433.     matchwait 40
  3434.     GO_ON:
  3435.     pause 1
  3436.     gosub SHEATHE %CURR_WEAPON
  3437.     return
  3438.  
  3439. ############################################
  3440. ##                                        ##
  3441. ##  Default section, setting and loading  ##
  3442. ##                                        ##
  3443. ############################################
  3444. SET_DEFAULT:
  3445.     if ("%GAG_ECHO" != "YES") then
  3446.     {
  3447.         echo
  3448.         echo *** SET_DEFAULT ***
  3449.         echo Setting default values
  3450.         echo
  3451.     }
  3452.     put #var GH_DEF_SET YES
  3453.     put #var GH_DEF_COUNTER %c
  3454.     put #var GH_DEF_ALTEXP %ALTEXP
  3455.     put #var GH_DEF_AMMO %AMMO
  3456.     put #var GH_DEF_BACKSTAB %BACKSTAB
  3457.     put #var GH_DEF_COMBO1 %_COMBO1
  3458.     put #var GH_DEF_COMBO2 %_COMBO2
  3459.     put #var GH_DEF_COMBO3 %_COMBO3
  3460.     put #var GH_DEF_COMBO4 %_COMBO4
  3461.     put #var GH_DEF_COMBO5 %_COMBO5
  3462.     put #var GH_DEF_COMBO6 %_COMBO6
  3463.     put #var GH_DEF_COMBO7 %_COMBO7
  3464.     put #var GH_DEF_COMBO8 %_COMBO8
  3465.     put #var GH_DEF_CURR_STANCE %CURR_STANCE
  3466.     put #var GH_DEF_WEAPON %CURR_WEAPON
  3467.     put #var GH_DEF_EMPTY_HANDED %EMPTY_HANDED
  3468.     put #var GH_DEF_EVAS_LVL %EVAS_LEVEL
  3469.     put #var GH_DEF_EXP2 %EXP2
  3470.     put #var GH_DEF_FIRE_TYPE %FIRE_TYPE
  3471.     if ("%HAND" = "") then put #var GH_DEF_HAND none
  3472.     else put #var GH_DEF_HAND %HAND
  3473.     put #var GH_DEF_HAND2 %HAND2
  3474.     put #var GH_DEF_MAGIC %MAGIC
  3475.     put #var GH_DEF_MAGIC_TYPE %MAGIC_TYPE
  3476.     put #var GH_DEF_MAGIC_COUNT %MAGIC_COUNT
  3477.     put #var GH_DEF_MAX_TRAIN_TIME %MAX_TRAIN_TIME
  3478.     put #var GH_DEF_NOEVADE %NOEVADE
  3479.     put #var GH_DEF_NOPARRY %NOPARRY
  3480.     put #var GH_DEF_NOSHIELD %NOSHIELD
  3481.     put #var GH_DEF_PARRY_LVL %PARRY_LEVEL
  3482.     put #var GH_DEF_RANGED %RANGED
  3483.     put #var GH_DEF_RUCK %RUCK
  3484.     put #var GH_DEF_SHIELD %SHIELD
  3485.     put #var GH_DEF_SHIELD_LVL %SHIELD_LEVEL
  3486.     put #var GH_DEF_STACK %STACK
  3487.     put #var GH_DEF_THROWN %THROWN
  3488.     put #var GH_DEF_WEAPON_EXP %WEAPON_EXP
  3489.     put #var GH_DEF_XCOUNT %xCOUNT
  3490.     put #var GH_DEF_YOYO %YOYO
  3491.  
  3492.     put #var GH_DEF_AMBUSH $GH_AMBUSH
  3493.     put #var GH_DEF_APPR $GH_APPR
  3494.     put #var GH_DEF_ARRANGE $GH_ARRANGE
  3495.     put #var GH_DEF_BUN $GH_BUN
  3496.     put #var GH_DEF_COUNTING $GH_DANCING
  3497.     put #var GH_DEF_EXP $GH_EXP
  3498.     put #var GH_DEF_HARN $GH_HARN
  3499.     put #var GH_DEF_HUNT $GH_HUNT
  3500.     put #var GH_DEF_JUGGLE $GH_JUGGLE
  3501.     put #var GH_DEF_LOOT $GH_LOOT
  3502.     put #var GH_DEF_LOOT_BOX $GH_LOOT_BOX
  3503.     put #var GH_DEF_LOOT_COIN $GH_LOOT_COIN
  3504.     put #var GH_DEF_LOOT_COLL $GH_LOOT_COLL
  3505.     put #var GH_DEF_LOOT_GEM $GH_LOOT_GEM
  3506.     put #var GH_DEF_LOOT_JUNK $GH_LOOT_JUNK
  3507.     put #var GH_DEF_MANA $GH_MANA
  3508.     put #var GH_DEF_PP $GH_PP
  3509.     put #var GH_DEF_RETREAT $GH_RETREAT
  3510.     put #var GH_DEF_ROAM $GH_ROAM
  3511.     put #var GH_DEF_SCRAPE $GH_SCRAPE
  3512.     put #var GH_DEF_SKIN $GH_SKIN
  3513.     put #var GH_DEF_SKIN_RET $GH_SKIN_RET
  3514.     put #var GH_DEF_SLOW $GH_SLOW
  3515.     put #var GH_DEF_SNAP $GH_SNAP
  3516.     put #var GH_DEF_SPELL $GH_SPELL
  3517.     put #var GH_DEF_STANCE $GH_STANCE
  3518.     if ("$GH_TARGET" = "") then put #var GH_DEF_TARGET none
  3519.     else put #var GH_DEF_TARGET $GH_TARGET
  3520.     put #var GH_DEF_TIMER $GH_TIMER
  3521.     put #var GH_DEF_TRAIN $GH_TRAIN
  3522.  
  3523.     echo
  3524.     echo Default setting are now ready
  3525.     echo
  3526.     exit
  3527.  
  3528. LOAD_DEFAULT_SETTINGS:
  3529.     if ("%GAG_ECHO" != "YES") then
  3530.     {
  3531.         echo
  3532.         echo *** LOAD_DEFAULT_SETTINGS ***
  3533.         echo
  3534.     }
  3535.     gosub GENERAL_TRIGGERS
  3536.     ## Loading default nonweapon settings
  3537.     var ALTEXP $GH_DEF_ALTEXP
  3538.     var BACKSTAB $GH_DEF_BACKSTAB
  3539.     var CURR_STANCE $GH_DEF_CURR_STANCE
  3540.     var EMPTY_HANDED $GH_DEF_EMPTY_HANDED
  3541.     var EVAS_LEVEL $GH_DEF_EVAS_LVL
  3542.     var EXP2 $GH_DEF_EXP2
  3543.     var FIRE_TYPE $GH_DEF_FIRE_TYPE
  3544.     if ("$GH_DEF_HAND" = "none") then var HAND
  3545.     else var HAND $GH_DEF_HAND
  3546.     var HAND2 $GH_DEF_HAND2
  3547.     var MAGIC $GH_DEF_MAGIC
  3548.     var MAGIC_TYPE $GH_DEF_MAGIC_TYPE
  3549.     var MAGIC_COUNT $GH_DEF_MAGIC_COUNT
  3550.     var PARRY_LEVEL $GH_DEF_PARRY_LVL
  3551.     var RANGED $GH_DEF_RANGED
  3552.     var RUCK $GH_DEF_RUCK
  3553.     var SHIELD_LEVEL $GH_DEF_SHIELD_LVL
  3554.     var STACK $GH_DEF_STACK
  3555.     var THROWN $GH_DEF_THROWN
  3556.     var xCOUNT $GH_DEF_XCOUNT
  3557.     var YOYO $GH_DEF_YOYO
  3558.  
  3559.     put #var GH_AMBUSH $GH_DEF_AMBUSH
  3560.     put #var GH_APPR $GH_DEF_APPR
  3561.     put #var GH_ARRANGE $GH_DEF_ARRANGE
  3562.     put #var GH_BUN $GH_DEF_BUN
  3563.     put #var GH_DANCING $GH_DEF_COUNTING
  3564.     if ("$GH_MULTI" = "OFF") then put #var GH_EXP $GH_DEF_EXP
  3565.     put #var GH_HARN $GH_DEF_HARN
  3566.     put #var GH_HUNT $GH_DEF_HUNT
  3567.     put #var GH_JUGGLE $GH_DEF_JUGGLE
  3568.     put #var GH_LOOT $GH_DEF_LOOT
  3569.     put #var GH_LOOT_BOX $GH_DEF_LOOT_BOX
  3570.     put #var GH_LOOT_COIN $GH_DEF_LOOT_COIN
  3571.     put #var GH_LOOT_COLL $GH_DEF_LOOT_COLL
  3572.     put #var GH_LOOT_GEM $GH_DEF_LOOT_GEM
  3573.     put #var GH_LOOT_JUNK $GH_DEF_LOOT_JUNK
  3574.     put #var GH_MANA $GH_DEF_MANA
  3575.     put #var GH_PP $GH_DEF_PP
  3576.     put #var GH_RETREAT $GH_DEF_RETREAT
  3577.     put #var GH_ROAM $GH_DEF_ROAM
  3578.     put #var GH_SCRAPE $GH_DEF_SCRAPE
  3579.     put #var GH_SKIN $GH_DEF_SKIN
  3580.     put #var GH_SKIN_RET $GH_DEF_SKIN_RET
  3581.     put #var GH_SLOW $GH_DEF_SLOW
  3582.     put #var GH_SNAP $GH_DEF_SNAP
  3583.     put #var GH_SPELL $GH_DEF_SPELL
  3584.     put #var GH_STANCE $GH_DEF_STANCE
  3585.     if ("$GH_DEF_TARGET" = "none") then put #var GH_TARGET
  3586.     else put #var GH_TARGET  $GH_DEF_TARGET
  3587.     put #var GH_TIMER $GH_DEF_TIMER
  3588.     if ("$GH_MULTI" = "OFF") then put #var GH_TRAIN $GH_DEF_TRAIN
  3589.  
  3590.     var MAX_TRAIN_TIME $GH_DEF_MAX_TRAIN_TIME
  3591.     DEF_STANCE_SETUP:
  3592.         if ("%CURR_STANCE" = "Evasion") then put stance evasion
  3593.         elseif ("%CURR_STANCE" = "Parry_Ability") then put stance parry
  3594.         elseif ("%CURR_STANCE" = "Shield_Usage") then put stance shield
  3595.         elseif ("%CURR_STANCE" = "Custom") then put stance custom
  3596.  
  3597.     if ("$GH_MULTI" != "OFF") then goto VARIABLE_CHECK
  3598.  
  3599.     ## Loading default weapon settings
  3600.     var AMMO $GH_DEF_AMMO
  3601.     var _COMBO1 $GH_DEF_COMBO1
  3602.     var _COMBO2 $GH_DEF_COMBO2
  3603.     var _COMBO3 $GH_DEF_COMBO3
  3604.     var _COMBO4 $GH_DEF_COMBO4
  3605.     var _COMBO5 $GH_DEF_COMBO5
  3606.     var _COMBO6 $GH_DEF_COMBO6
  3607.     var _COMBO7 $GH_DEF_COMBO7
  3608.     var _COMBO8 $GH_DEF_COMBO8
  3609.     counter set $GH_DEF_COUNTER
  3610.     var RANGED $GH_DEF_RANGED
  3611.     var SHIELD $GH_DEF_SHIELD
  3612.     var CURR_WEAPON $GH_DEF_WEAPON
  3613.     var WEAPON_EXP $GH_DEF_WEAPON_EXP
  3614.     echo
  3615.     echo Ready to go!
  3616.     echo
  3617.     var LAST DEF_WIELD_WEAPON
  3618.     DEF_WIELD_WEAPON:
  3619.             matchre SWAP_CHECK You draw|already holding|free to|With a flick of your wrist
  3620.             match BEGIN_HANDS free hand
  3621.             matchre DEF_REMOVE_WEAPON out of reach|remove|What were you|can't seem|Wield what\?
  3622.         put wield my %CURR_WEAPON
  3623.         matchwait 16
  3624.     DEF_REMOVE_WEAPON:
  3625.             matchre SWAP_CHECK You sling|already holding|inventory|You remove
  3626.             matchre BEGIN_HANDS free hand|hands are full
  3627.             match DEF_GET_WEAPON Remove what?
  3628.         put remove my %CURR_WEAPON
  3629.         matchwait 15
  3630.     DEF_GET_WEAPON:
  3631.             match SWAP_CHECK you get
  3632.             match NO_VALUE Please rephrase that command
  3633.         put get my %CURR_WEAPON
  3634.         matchwait 15
  3635.     goto VARIABLE_ERROR
  3636.     SWAP_CHECK:
  3637.         var LAST SWAP_CHECK
  3638.         if (("%HAND" = "left") && ("$lefthand" = "Empty")) then gosub SWAP_LEFT $righthandnound
  3639.         elseif ("%SHIELD" != "NONE") then gosub EQUIP_SHIELD %SHIELD
  3640.     goto %c
  3641.  
  3642. #####################################
  3643. ##                                 ##
  3644. ##  Action initialization section  ##
  3645. ##                                 ##
  3646. #####################################
  3647. GENERAL_TRIGGERS:
  3648.     action send stand when eval $standing = 0
  3649.     action put #var standing 1 when ^You are already standing
  3650.     action (hunt) goto DONE when reaches over and holds your hand|grabs your arm and drags you|clasps your hand tenderly
  3651.     action (hunt) put #send 5 $lastcommand when You can't do that while entangled in a web.
  3652.     action (hunt) goto STUNNED when eval $stunned = 1
  3653.     action (hunt) goto BLEEDING when eval $bleeding = 1
  3654.     action (hunt) goto ABORT when eval $health < 40
  3655.     action (hunt) goto DEAD when eval $dead = 1
  3656.     action (hunt) goto DROPPED_WEAPON when Your fingers go numb as you drop|You have nothing to swap|You don't have a weapon|With your bare hands\?
  3657.  
  3658.     action var lastmaneuver parry when Last Combat Maneuver.*Parry
  3659.     action var lastmaneuver feint when Last Combat Maneuver.*Feint
  3660.     action var lastmaneuver draw when Last Combat Maneuver.*Draw
  3661.     action var lastmaneuver sweep when Last Combat Maneuver.*Sweep
  3662.     action var lastmaneuver slice when Last Combat Maneuver.*Slice
  3663.     action var lastmaneuver chop when Last Combat Maneuver.*Chop
  3664.     action var lastmaneuver bash when Last Combat Maneuver.*Bash
  3665.     action var lastmaneuver thrust when Last Combat Maneuver.*Thrust
  3666.     action var lastmaneuver shove when Last Combat Maneuver.*Shove
  3667.     action var lastmaneuver jab when Last Combat Maneuver.*Jab
  3668.     action var lastmaneuver dodge when Last Combat Maneuver.*Dodge
  3669.     action var lastmaneuver claw when Last Combat Maneuver.*Claw
  3670.     action var lastmaneuver dodge when Last Combat Maneuver.*Dodge
  3671.     action var lastmaneuver kick when Last Combat Maneuver.*Kick
  3672.     action var lastmaneuver weave when Last Combat Maneuver.*Weave
  3673.     action var lastmaneuver punch when Last Combat Maneuver.*Punch
  3674.     action var lastmaneuver lunge when Last Combat Maneuver.*Lunge
  3675.     action var lastmaneuver bob when Last Combat Maneuver.*Bob
  3676.     action var lastmaneuver circle when Last Combat Maneuver.*Circle
  3677.     return
  3678.  
  3679. RETREAT_TRIGGERS:
  3680.     var RETREATING ON
  3681.     var RETREATED NO
  3682.     action (retreat) if ("%RETREATED" = "YES") then put #queue clear;send retreat;var RETREATED YES when closes to pole weapon range
  3683. MELEE_TRIGGERS:
  3684.     action (retreat) if ("%RETREATED" = "YES") then put #queue clear;send retreat;send retreat;var RETREATED YES when (^\*.*at you\..*You)|(closes to melee range on you)
  3685.     action var RETREATED NO when You retreat from combat
  3686.     action var RETREATED NO when You try to back away
  3687.     action (retreat) on
  3688.     return
  3689.  
  3690. RETREAT_UNTRIGGERS:
  3691.     var RETREATING OFF
  3692.     action remove closes to pole weapon range
  3693.     action remove (^\*.*at you\..*You)|(closes to melee range on you)
  3694.     action remove You retreat from combat
  3695.     action remove You try to back away
  3696.     return
  3697.  
  3698. #####################################
  3699. ##                                 ##
  3700. ##  End of Initialization section  ##
  3701. ##                                 ##
  3702. #####################################
  3703. ADVANCE:
  3704.     if ("%GAG_ECHO" != "YES") then
  3705.     {
  3706.         echo
  3707.         echo *** ADVANCE: ***
  3708.         echo
  3709.     }
  3710.     counter set %s
  3711.     ADV_NOW:
  3712.         if "$guild" = "Necromancer" then goto ADV_NECRO
  3713.         if (($hidden = 1) && ("%guild" = "Paladin")) then put unhid
  3714.         var LAST ADV_NOW
  3715.             matchre FACE You stop advancing|You have lost sight
  3716.             match NO_MONSTERS advance towards?
  3717.             matchre ADVANCING ^You begin
  3718.             matchre ADVANCING_FURTHER ^You are already advancing
  3719.             match %c already at melee
  3720.         put advance
  3721.         matchwait 15
  3722.         goto ERROR
  3723.     ADV_NECRO:
  3724.     var LAST ADV_NECRO
  3725.             matchre NECRO_STOP_ADV You begin to advance on a .+ dirt construct\.|You are already advancing on a .+ dirt construct\.
  3726.             matchre FACE You stop advancing|You have lost sight
  3727.             match NO_MONSTERS advance towards?
  3728.             matchre ADVANCING ^You begin
  3729.             matchre ADVANCING_FURTHER ^You are already advancing
  3730.             match %c already at melee|stops you from advancing any farther\!
  3731.         put advance
  3732.         matchwait 15
  3733.         goto ERROR
  3734.     NECRO_STOP_ADV:
  3735.     send retreat
  3736.     send retreat
  3737.     goto FACE
  3738.     ADVANCING:
  3739.         if ("$GH_APPR" = "YES") then goto APPR_YES
  3740.     ADVANCING_FURTHER:
  3741.         waitforre to melee range|\[You're|You stop advancing because|You have lost sight of your target
  3742.         goto APPR_NO
  3743.  
  3744. APPR_YES:
  3745.     if (("%APPRAISED" = "YES") || ($Appraisal.LearningRate >= 34)) then
  3746.         {
  3747.         if ((("%MAGIC" = "ON") || (matchre("%MAGIC_TYPE","TM|PM")) && ("%LAST" = "MAGIC_PREP")) then return
  3748.         else goto COUNT_$GH_DANCING
  3749.         }
  3750.     else var APPRAISED YES
  3751.     var LAST APPR_YES
  3752.     if ("%GAG_ECHO" != "YES") then
  3753.     {
  3754.         echo
  3755.         echo *** APPR_YES: ***
  3756.         echo
  3757.     }
  3758.     if matchre("$monsterlist", "\b(%nonskinnablecritters)\b") then goto APPR_CREEP
  3759.     if matchre("$monsterlist", "\b(%skinnablecritters)\b") then goto APPR_CREEP
  3760.     if matchre("$monsterlist", "\b(%invasioncritters)\b") then goto APPR_CREEP
  3761.     goto APPR_NO
  3762. APPR_CREEP:
  3763.     var Monster $0
  3764. APPRAISING:
  3765.     var LAST APPRAISING
  3766.         matchre APPR_NO Roundtime|Appraise|You can't determine|appraise|You don't see|still stunned|Mark what\?
  3767.     if ($GH_MARK = ON) then put mark all %Monster
  3768.     else
  3769.         {
  3770.         if ("%guild" == "Ranger" && $Scouting.Ranks > 15) then put scout aware %Monster
  3771.         else put appr %Monster quick
  3772.         }
  3773.     matchwait 15
  3774.     goto APPR_ERROR
  3775.  
  3776. APPR_NO:
  3777.     var lastdirection none
  3778.     if ("%MAGIC" = "ON") then return
  3779.     goto COUNT_$GH_DANCING
  3780.  
  3781. COUNT_ON:
  3782.     var LAST COUNT_ON
  3783. COUNT_START:
  3784.     if (toupper("$GH_STANCE") = "ON")) then gosub SWITCH_STANCE
  3785.     if (($Defending.LearningRate > 33) || ($%ARMOR1.LearningRate > 33) || ($%ARMOR2.LearningRate > 33)) then goto COUNT_OFF
  3786.     if ("%GAG_ECHO" != "YES") then
  3787.     {
  3788.         echo
  3789.         echo *** COUNT_START: ***
  3790.         echo
  3791.     }
  3792.     goto %xCOUNT
  3793.         match COUNT_WAIT_1 You notice only one
  3794.     COUNT_ONE:
  3795.         matchre %c ^You notice two
  3796.     COUNT_TWO:
  3797.         matchre %c ^You notice three
  3798.     COUNT_THREE:
  3799.         matchre %c ^You notice four
  3800.     COUNT_FOUR:
  3801.         matchre %c ^You notice five
  3802.     COUNT_FIVE:
  3803.         matchre %c ^You notice six
  3804.     COUNT_SIX:
  3805.         matchre %c ^You notice (seven|eight|nine|ten|eleven|twelve|twenty)
  3806.         matchre %c ^You notice (.+)teen
  3807.         matchre COUNT_WAIT_1 ^You notice no
  3808.         matchre COUNT_WAIT_1 ^Roundtime
  3809.     put count critter
  3810.     matchwait 15
  3811.     goto ERROR
  3812.  
  3813. COUNT_OFF:
  3814.     goto %c
  3815.  
  3816. FACE:
  3817.     gosub clear
  3818.     if "$guild" != "Empath" && matchre("%MAGIC_TYPE","TM|PM") then gosub COMBAT_COMMAND MAGIC_WAIT
  3819.     if ("%GAG_ECHO" != "YES") then
  3820.     {
  3821.         echo
  3822.         echo *** FACE: ***
  3823.         echo
  3824.     }
  3825.     if ("$guild" = "Empath" && "$GH_CONSTRUCT" = "ON") then goto EMPATH_FACE
  3826.     if "$guild" = "Necromancer" then goto NECRO_FACE
  3827.     var LAST FACE
  3828.         matchre APPR_$GH_APPR You turn to face|You are already
  3829.         matchre CHECK_FOR_MONSTER nothing else to|Face what
  3830.     put face next
  3831.     matchwait 15
  3832.     goto ERROR
  3833.  
  3834. EMPATH_FACE:
  3835.     ## Construct checking ##
  3836.     if matchre ("$monsterlist", "\b(%construct)\b") then
  3837.     {
  3838.         if matchre ("$1", "\b(%construct)\b") then var Empath_Monster $1
  3839.         eval Empath_Monster replacere("%Empath_Monster",".*\s(\w+)\.?\$", "\$1")
  3840.     }
  3841.     else
  3842.     {
  3843.         var xCOUNT COUNT_ONE
  3844.         goto COUNT_WAIT_1
  3845.     }
  3846.     if matchre ("$roomobjs", "((which|that) appears dead|\(dead\))") then GOTO DEAD_MONSTER
  3847.     var LAST FACE
  3848.         matchre APPR_$GH_APPR You turn to face|You are already
  3849.         matchre CHECK_FOR_MONSTER nothing else to|Face what
  3850.         matchre FACE_RETREAT You are too closely
  3851.         matchre EMPATH_FACE What's the point in
  3852.     put face %Empath_Monster
  3853.     matchwait 15
  3854.     goto ERROR
  3855.  
  3856. FACE_RETREAT:
  3857.         match FACE_RETREAT You retreat back
  3858.         match EMPATH_FACE You retreat from
  3859.         match FACE_RETREAT Roundtime
  3860.     send retreat
  3861.     matchwait 15
  3862.     goto ERROR
  3863.  
  3864. NECRO_FACE:
  3865.     var LAST FACE
  3866.         matchre CHECK_FOR_MONSTER nothing else to|Face what|You turn to face a squat dirt construct
  3867.         match APPR_$GH_APPR You turn to face
  3868.     put face next
  3869.     matchwait 15
  3870.     goto ERROR
  3871.  
  3872. CHECK_FOR_MONSTER:
  3873.     var LAST CHECK_FOR_MONSTER
  3874.     if ("%GAG_ECHO" != "YES") then
  3875.     {
  3876.         echo
  3877.         echo *** CHECK_FOR_MONSTER ***
  3878.         echo
  3879.     }
  3880.     if (($hidden = 1) && ("%guild" = "Paladin")) then put unhide
  3881.     counter set %s
  3882.     if "$guild" = "Necromancer" && "$monsterlist" = "a squat dirt construct" then goto NO_MONSTERS
  3883.     if matchre("$monsterlist", "\b(%nonskinnablecritters)\b") then goto APPR_$GH_APPR
  3884.     if matchre("$monsterlist", "\b(%skinnablecritters)\b") then goto APPR_$GH_APPR
  3885.     if matchre("$monsterlist", "\b(%invasioncritters)\b") then goto APPR_$GH_APPR
  3886.     if ("$GH_TIMER" = "ON") then gosub TIMER_ON
  3887.     goto NO_MONSTERS
  3888.  
  3889. NO_MONSTERS:
  3890.     if ("%GAG_ECHO" != "YES") then
  3891.     {
  3892.         echo
  3893.         echo *** NO_MONSTERS: ***
  3894.         echo
  3895.     }
  3896.     if ("%RANGED" = "ON") then
  3897.     {
  3898.         if (matchre("$roomobjs", "%AMMO\b")) then gosub RANGED_CLEAN
  3899.     }
  3900.     if ("%THROWN" = "ON") then
  3901.     {
  3902.         if (matchre("$roomobjs", "%CURR_WEAPON\b")) then
  3903.         {
  3904.             put get %CURR_WEAPON
  3905.         }
  3906.     }
  3907.     if "%SEARCHED" = "NO" &&  matchre ("$roomplayers", "Also here: (\S+)") && matchre ("$roomobjs", "((which|that) appears dead|\(dead\))") then goto DEAD_MONSTER
  3908.     if ((toupper("$GH_JUGGLE") = "ON") && ($Perception.LearningRate < 30)) then goto JUGGLE_STUFF
  3909.     if (toupper("$GH_ROAM") = "ON") then goto MOVE_ROOMS
  3910.     else
  3911.     {
  3912.         if ($hidden = 1) then put unhide
  3913.         pause 3
  3914.         waitforre \.|\?|!|pole|melee|advance
  3915.         goto FACE
  3916.     }
  3917.  
  3918. JUGGLE_STUFF:
  3919.     timer stop
  3920.     var LAST JUGGLE_STUFF
  3921.     if ("%SHIELD" != "NONE") then gosub UNEQUIP_SHIELD
  3922.     if ("%EMPTY_HANDED" != "ON") then
  3923.     {
  3924.         if ("%RANGED" = "ON") then gosub RANGE_SHEATHE
  3925.         else gosub SHEATHE %CURR_WEAPON
  3926.     }
  3927.     if ("%YOYO" = "OFF") then
  3928.     action goto JUGGLE_STOP when ^\*.*at you\..*You|begins to advance on you|to melee range|to polee range|You're|already at melee
  3929.     JUGGLE_TOP:
  3930.         var LAST JUGGLE_TOP
  3931.         if ("%JUGGLIE" = "pebble") then goto juggle
  3932.             match NO_JUGGLIE What were you referring to
  3933.             matchre YOYO_%YOYO You get|You are already
  3934.         put get my %JUGGLIE
  3935.         matchwait 40
  3936.         goto JUGGLE_ERROR
  3937.     YOYO_ON:
  3938.             match JUGGLING You slip the string
  3939.         put wear my %JUGGLIE
  3940.         matchwait 40
  3941.         goto JUGGLE_ERROR
  3942.     YOYO_OFF:
  3943.     JUGGLING:
  3944.         if matchre ("$monsterlist", "%critters") then goto JUGGLE_STOP
  3945.         var LAST JUGGLING
  3946.             matchre JUGGLE_ERROR Your injuries make juggling|But you're not holding|You realize that if your throw|Your wounds begin aching
  3947.             match JUGGLE_EXP Roundtime
  3948.         if ("%YOYO" = "ON") then put throw my %JUGGLIE
  3949.         else put juggle my $juggle
  3950.         matchwait 40
  3951.         goto JUGGLE_ERROR
  3952.     JUGGLE_EXP:
  3953.         if $Perception.LearningRate = 34 then goto JUGGLE_STOP
  3954.         goto JUGGLING
  3955.     JUGGLE_ERROR:
  3956.         echo *** Juggling error ***
  3957.         put #var GH_JUGGLE OFF
  3958.         goto JUGGLE_STOP
  3959.     NO_JUGGLIE:
  3960.         echo *** Can't find your JUGGLIE ***
  3961.     JUGGLE_STOP:
  3962.         action remove ^You finish
  3963.         action remove ^\*.*at you\..*You|begins to advance on you|to melee range|to polee range|You're|already at melee
  3964.         var LAST JUGGLE_STOP
  3965.         pause
  3966.         if ("%YOYO" = "ON") then
  3967.         {
  3968.             put remove %JUGGLIE
  3969.             waitfor off of your finger
  3970.         }
  3971.         pause 0.5
  3972.         put stop play
  3973.         put stow %JUGGLIE
  3974.         waitfor You put your
  3975.         if "$righthand" != "Empty" then put stow right
  3976.         if "$lefthand" != "Empty" then put stow left
  3977.     JUGGLE_DONE:
  3978.         var LAST JUGGLE_DONE
  3979.         if ("%EMPTY_HANDED" != "ON") then gosub WIELD_WEAPON %CURR_WEAPON
  3980.         if (("%HAND" = "left") && ("$righthand" != "Empty")) then gosub SWAP_LEFT $righthandnoun
  3981.         if ("%SHIELD" != "NONE") then gosub EQUIP_SHIELD
  3982.         timer start
  3983.         goto FACE
  3984.  
  3985. MOVE_ROOMS:
  3986.     if ("%GAG_ECHO" != "YES") then
  3987.     {
  3988.         echo
  3989.         echo *** MOVE_ROOMS: ***
  3990.         echo
  3991.     }
  3992.     echo No monsters here, moving rooms
  3993.     pause 1
  3994.  
  3995.     var ROOMNUMBER 0
  3996. HUNTING_FOR_ROOM:
  3997.     var LAST HUNTING_FOR_ROOM
  3998.     action math ROOMNUMBER add 1 when ^To the .+:
  3999.  
  4000.     var ROOM1OCCUPIED FALSE
  4001.     var ROOM2OCCUPIED FALSE
  4002.     var ROOM3OCCUPIED FALSE
  4003.     var ROOM4OCCUPIED FALSE
  4004.     var ROOM5OCCUPIED FALSE
  4005.     var ROOM6OCCUPIED FALSE
  4006.     var ROOM7OCCUPIED FALSE
  4007.     var ROOM8OCCUPIED FALSE
  4008.     action var ROOM%ROOMNUMBEROCCUPIED TRUE when ^  \d+\)   \w+$|^  \d+\)   A hidden \w+$
  4009.     action var ROOM%ROOMNUMBEROCCUPIED TRUE when ^  --\)   Signs of something hidden from sight\.
  4010.  
  4011.     var ROOM1MOBS 0
  4012.     var ROOM2MOBS 0
  4013.     var ROOM3MOBS 0
  4014.     var ROOM4MOBS 0
  4015.     var ROOM5MOBS 0
  4016.     var ROOM6MOBS 0
  4017.     var ROOM7MOBS 0
  4018.     var ROOM8MOBS 0
  4019.  
  4020.     action math ROOM%ROOMNUMBERMOBS add 1 when ^  \d+\)   (a|an)
  4021.     action var ROOM%ROOMNUMBERTARGET $1 when ^  (\d+)\)
  4022.  
  4023.     put stop stalk
  4024.     waitfor stalking
  4025.     put hunt
  4026.     waitforre ^Roundtime:|You find yourself unable to
  4027.  
  4028.     action remove ^To the .+:
  4029.     action remove ^  \d+\)   \w+$|^  \d+\)   A hidden \w+$
  4030.     action remove ^  --\)   Signs of something hidden from sight\.
  4031.     action remove ^  \d+\)   (a|an)
  4032.     action remove ^  (\d+)\)
  4033.  
  4034.     if "%ROOM1OCCUPIED" = "TRUE" then var ROOM1MOBS 0
  4035.     if "%ROOM2OCCUPIED" = "TRUE" then var ROOM2MOBS 0
  4036.     if "%ROOM3OCCUPIED" = "TRUE" then var ROOM3MOBS 0
  4037.     if "%ROOM4OCCUPIED" = "TRUE" then var ROOM4MOBS 0
  4038.     if "%ROOM5OCCUPIED" = "TRUE" then var ROOM5MOBS 0
  4039.     if "%ROOM6OCCUPIED" = "TRUE" then var ROOM6MOBS 0
  4040.     if "%ROOM7OCCUPIED" = "TRUE" then var ROOM7MOBS 0
  4041.     if "%ROOM8OCCUPIED" = "TRUE" then var ROOM8MOBS 0
  4042.  
  4043.     var BESTMOBCOUNT 0
  4044.     var HUNTNUMBER 0
  4045.     if %ROOM1MOBS > %BESTMOBCOUNT then
  4046.     {
  4047.         var BESTMOBCOUNT %ROOM1MOBS
  4048.         var HUNTNUMBER %ROOM1TARGET
  4049.     }
  4050.     if %ROOM2MOBS > %BESTMOBCOUNT then
  4051.     {
  4052.         var BESTMOBCOUNT %ROOM2MOBS
  4053.         var HUNTNUMBER %ROOM2TARGET
  4054.     }
  4055.     if %ROOM3MOBS > %BESTMOBCOUNT then
  4056.     {
  4057.         var BESTMOBCOUNT %ROOM3MOBS
  4058.         var HUNTNUMBER %ROOM3TARGET
  4059.     }
  4060.     if %ROOM4MOBS > %BESTMOBCOUNT then
  4061.     {
  4062.         var BESTMOBCOUNT %ROOM4MOBS
  4063.         var HUNTNUMBER %ROOM4TARGET
  4064.     }
  4065.     if %ROOM5MOBS > %BESTMOBCOUNT then
  4066.     {
  4067.         var BESTMOBCOUNT %ROOM5MOBS
  4068.         var HUNTNUMBER %ROOM5TARGET
  4069.     }
  4070.     if %ROOM6MOBS > %BESTMOBCOUNT then
  4071.     {
  4072.         var BESTMOBCOUNT %ROOM6MOBS
  4073.         var HUNTNUMBER %ROOM6TARGET
  4074.     }
  4075.     if %ROOM7MOBS > %BESTMOBCOUNT then
  4076.     {
  4077.         var BESTMOBCOUNT %ROOM7MOBS
  4078.         var HUNTNUMBER %ROOM7TARGET
  4079.     }
  4080.     if %ROOM8MOBS > %BESTMOBCOUNT then
  4081.     {
  4082.         var BESTMOBCOUNT %ROOM8MOBS
  4083.         var HUNTNUMBER %ROOM8TARGET
  4084.     }
  4085.     pause
  4086.  
  4087.     if %HUNTNUMBER = 0 then goto RANDOM_MOVE
  4088.  
  4089.     if ((toupper("$GH_BUN") = "ON") && contains("$roomobjs", "lumpy bundle")) then
  4090.     {
  4091.             match HUNT_MOVE You pick up
  4092.         put get bundle
  4093.         matchwait 16
  4094.     }
  4095.     HUNT_MOVE:
  4096.         var LAST HUNT_MOVE
  4097.             matchre RANDOM_MOVE You don't have that target currently available|Your prey seems to have completely vanished|You were unable to locate|You find yourself unable|You'll need to be in the area
  4098.             matchre MOVE_ROOMS Also here: (.*)
  4099.             matchre CHECK_OCCUPIED ^You'll need to disengage first|^While in combat?|^Obvious exits|^Obvious paths
  4100.         put hunt %HUNTNUMBER
  4101.         matchwait 60
  4102.  
  4103.     RANDOM_MOVE:
  4104.         var exits 0
  4105.         if $north = 1 then math exits add 1
  4106.         if $northeast = 1 then math exits add 1
  4107.         if $east = 1 then math exits add 1
  4108.         if $southeast = 1 then math exits add 1
  4109.         if $south = 1 then math exits add 1
  4110.         if $southwest = 1 then math exits add 1
  4111.         if $west = 1 then math exits add 1
  4112.         if $northwest = 1 then math exits add 1
  4113.         if $up = 1 then math exits add 1
  4114.         if $down = 1 then math exits add 1
  4115.         if (%exits = 0) then goto CHECK_OCCUPIED
  4116.  
  4117.         random 1 10
  4118.         var move_cycles 0
  4119.         goto MOVE_%r
  4120.  
  4121.     MOVE_1:
  4122.         if ($north = 1) then
  4123.         {
  4124.             if ((%exits > 1) && ("%lastdirection" != "south")) then
  4125.             {
  4126.                 var direction north
  4127.                 goto GOOD_DIRECTION
  4128.             } elseif (%exits = 1) then
  4129.             {
  4130.                 var direction north
  4131.                 goto GOOD_DIRECTION
  4132.             }
  4133.         }
  4134.     MOVE_2:
  4135.         if ($northeast = 1) then
  4136.         {
  4137.             if ((%exits > 1) && ("%lastdirection" != "southwest")) then
  4138.             {
  4139.                 var direction northeast
  4140.                 goto GOOD_DIRECTION
  4141.             } elseif (%exits = 1) then
  4142.             {
  4143.                 var direction northeast
  4144.                 goto GOOD_DIRECTION
  4145.             }
  4146.         }
  4147.     MOVE_3:
  4148.         if ($east = 1) then
  4149.         {
  4150.             if ((%exits > 1) && ("%lastdirection" != "west")) then
  4151.             {
  4152.                 var direction east
  4153.                 goto GOOD_DIRECTION
  4154.             } elseif (%exits = 1) then
  4155.             {
  4156.                 var direction east
  4157.                 goto GOOD_DIRECTION
  4158.             }
  4159.         }
  4160.     MOVE_4:
  4161.         if ($southeast = 1) then
  4162.         {
  4163.             if ((%exits > 1) and (("%lastdirection" != "northwest")) then
  4164.             {
  4165.                 var direction southeast
  4166.                 goto GOOD_DIRECTION
  4167.             } elseif (%exits = 1) then
  4168.             {
  4169.                 var direction southeast
  4170.                 goto GOOD_DIRECTION
  4171.             }
  4172.         }
  4173.     MOVE_5:
  4174.         if ($south = 1) then
  4175.         {
  4176.             if ((%exits > 1) && ("%lastdirection" != "north")) then
  4177.             {
  4178.                 var direction south
  4179.                 goto GOOD_DIRECTION
  4180.             } elseif (%exits = 1) then
  4181.             {
  4182.                 var direction south
  4183.                 goto GOOD_DIRECTION
  4184.             }
  4185.         }
  4186.     MOVE_6:
  4187.         if ($southwest = 1) then
  4188.         {
  4189.             if ((%exits > 1) && ("%lastdirection" != "northeast")) then
  4190.             {
  4191.                 var direction southwest
  4192.                 goto GOOD_DIRECTION
  4193.             } elseif (%exits = 1) then
  4194.             {
  4195.                 var direction southwest
  4196.                 goto GOOD_DIRECTION
  4197.             }
  4198.         }
  4199.     MOVE_7:
  4200.         if ($west = 1) then
  4201.         {
  4202.             if ((%exits > 1) && ("%lastdirection" != "east")) then
  4203.             {
  4204.                 var direction west
  4205.                 goto GOOD_DIRECTION
  4206.             } elseif (%exits = 1) then
  4207.             {
  4208.                 var direction west
  4209.                 goto GOOD_DIRECTION
  4210.             }
  4211.         }
  4212.     MOVE_8:
  4213.         if ($northwest = 1) then
  4214.         {
  4215.             if ((%exits > 1) && ("%lastdirection" != "southeast")) then
  4216.             {
  4217.                 var direction northwest
  4218.                 goto GOOD_DIRECTION
  4219.             } elseif (%exits = 1) then
  4220.             {
  4221.                 var direction northwest
  4222.                 goto GOOD_DIRECTION
  4223.             }
  4224.         }
  4225.     MOVE_9:
  4226.         if ($up = 1) then
  4227.         {
  4228.             if ((%exits > 1) && ("%lastdirection" != "down")) then
  4229.             {
  4230.                 var direction up
  4231.                 goto GOOD_DIRECTION
  4232.             } elseif (%exits = 1) then
  4233.             {
  4234.                 var direction up
  4235.                 goto GOOD_DIRECTION
  4236.             }
  4237.         }
  4238.     MOVE_10:
  4239.         if ($down = 1) then
  4240.         {
  4241.             if ((%exits > 1) && ("%lastdirection" != "up")) then
  4242.             {
  4243.                 var direction down
  4244.                 goto GOOD_DIRECTION
  4245.             } elseif (%exits = 1) then
  4246.             {
  4247.                 var direction down
  4248.                 goto GOOD_DIRECTION
  4249.             }
  4250.         }
  4251.     if (%move_cycles <= 5) then
  4252.     {
  4253.         math move_cycles add 1
  4254.         goto MOVE_1
  4255.     } else goto ERROR
  4256. GOOD_DIRECTION:
  4257.     if ((toupper("$GH_BUN") = "ON") && contains("$roomobjs", "lumpy bundle")) then
  4258.     {
  4259.             match MOVING You pick up
  4260.         put get bundle
  4261.         matchwait 40
  4262.     }
  4263.     MOVING:
  4264.         var LAST MOVING
  4265.             matchre MOVE_ROOMS Also here: (.*)|^You can't go there
  4266.             matchre CHECK_OCCUPIED ^You are engaged|^Obvious exits|^Obvious paths|^While in combat
  4267.         put %direction
  4268.         matchwait 40
  4269.         goto CHECK_OCCUPIED
  4270. FOUND_ROOM:
  4271.     if ("%GAG_ECHO" != "YES") then
  4272.     {
  4273.         echo
  4274.         echo *** FOUND_ROOM: ***
  4275.         echo
  4276.     }
  4277.     if (toupper("$GH_PP") = "ON") then var PP_TIME %t
  4278.     if (toupper("$GH_PILGRIM") = "ON") then var PILGRIM_TIME %t
  4279.     if ((toupper("$GH_BUN") = "ON")) && (("$righthandnoun" = "bundle") || ("$lefthandnoun" = "bundle"))) then
  4280.     {
  4281.         put drop bundle
  4282.         waitfor ^You drop|^What were you referring to
  4283.     }
  4284.     var lastdirection %direction
  4285.     goto FACE
  4286. CHECK_OCCUPIED:
  4287.     put search
  4288.     waitforre ^Roundtime:
  4289.     pause 1
  4290.     if ("$roomplayers" = "") then goto FOUND_ROOM
  4291.     else
  4292.     {
  4293.         put retreat
  4294.         put retreat
  4295.         goto %LAST
  4296.     }
  4297.  
  4298. ######################################
  4299. ###                                ###
  4300. ### This section handles what to   ###
  4301. ### do while waiting for more      ###
  4302. ### creatures                      ###
  4303. ###                                ###
  4304. ######################################
  4305. COUNT_FACE:
  4306.     var LAST COUNT_FACE
  4307.         match COUNT_ASSESS_ADV nothing else to face
  4308.         match APPR_$GH_APPR You turn to
  4309.     put face next
  4310.     matchwait 40
  4311.  
  4312. COUNT_ASSESS_ADV:
  4313.     if (($hidden = 1) && ("%guild" = "Paladin")) then put unhid
  4314.         match COUNT_FACE You stop advancing|You have lost sight
  4315.         match NO_MONSTERS advance towards?
  4316.         matchre APPR_$GH_APPR begin|to melee range|\[You're|already at melee/
  4317.     put advance
  4318.     matchwait 40
  4319.  
  4320. COUNT_ADV:
  4321.     var LAST_COUNT_ADV
  4322.     if (($hidden = 1) && ("%guild" = "Paladin")) then put unhid
  4323.         matchre COUNT_FACE You stop advancing|You have lost sight
  4324.         match NO_MONSTER advance towards?
  4325.         matchre ADVANCING You begin|already advancing
  4326.         match %LAST already at melee
  4327.     put advance
  4328.     matchwait 40
  4329.     goto ERROR
  4330. COUNT_ADVANCING:
  4331.         waitforre to melee range|\[You're
  4332.         goto %LAST
  4333.  
  4334. COUNT_FATIGUE_PAUSE:
  4335.     pause
  4336. COUNT_FATIGUE:
  4337.     var LAST COUNT_FATIGUE
  4338.     if ("%GAG_ECHO" != "YES") then
  4339.         {
  4340.         echo
  4341.         echo *** COUNT_FATIGUE: ***
  4342.         echo
  4343.         }
  4344.     matchre PAUSE \[You're|You stop advancing|Roundtime
  4345.     match COUNT_FATIGUE_CHECK You cannot back away from a chance to continue your slaughter!
  4346.     match COUNT_FATIGUE_CHECK You bob
  4347.     put bob
  4348.     matchwait 40
  4349.     goto COUNT_FATIGUE
  4350.  
  4351. COUNT_FATIGUE_CHECK:
  4352.     if ("%GAG_ECHO" != "YES") then
  4353.     {
  4354.         echo
  4355.         echo *** COUNT_FATIGUE_CHECK: ***
  4356.         echo
  4357.     }
  4358.     if ($stamina < 80) then
  4359.     {
  4360.         goto COUNT_FATIGUE_WAIT
  4361.     } else
  4362.     {
  4363.         goto COUNT_START
  4364.     }
  4365.  
  4366. COUNT_FATIGUE_WAIT:
  4367.     echo
  4368.     echo COUNT_FATIGUE_WAIT:
  4369.     echo
  4370.         matchre COUNT_FATIGUE melee|pole|\[You're
  4371.     matchwait
  4372.  
  4373. #######################################
  4374. ###                                 ###
  4375. ### This section is for waiting for ###
  4376. ### new creatures to show up.       ###
  4377. ### Brawls until more creatures.    ###
  4378. ###                                 ###
  4379. #######################################
  4380. COUNT_WAIT_1:
  4381.     var LAST COUNT_WAIT_1
  4382.     if ("%GAG_ECHO" != "YES") then
  4383.     {
  4384.         echo
  4385.         echo *** COUNT_WAIT_1: parry ***
  4386.         echo
  4387.     }
  4388.         matchre COUNT_WAIT_2 You are already in a position|But you are already dodging|You move into a position to|Roundtime|pointlessly hack
  4389.         matchre COUNT_FATIGUE You're beat,|You're exhausted|You're bone-tired|worn-out
  4390.         matchre COUNT_ADV aren't close enough|You must be closer to use tactical abilities on your opponent\.
  4391.         matchre DEAD_MONSTER balanced\]|balance\]|already dead|very dead
  4392.         matchre COUNT_FACE nothing else
  4393.     put parry
  4394.     matchwait 80
  4395.     goto ATTACK_ERROR
  4396.  
  4397. COUNT_WAIT_2:
  4398. goto COUNT_WAIT_3
  4399.     var LAST COUNT_WAIT_2
  4400.     if ("%GAG_ECHO" != "YES") then
  4401.     {
  4402.         echo
  4403.         echo *** COUNT_WAIT_2: shove ***
  4404.         echo
  4405.     }
  4406.         matchre COUNT_WAIT_3 You are already in a position|But you are already dodging|You move into a position to|Roundtime|pointlessly hack
  4407.         matchre COUNT_FATIGUE You're beat,|You're exhausted|You're bone-tired|worn-out
  4408.         matchre COUNT_ADV aren't close enough|You must be closer to use tactical abilities on your opponent\.
  4409.         matchre DEAD_MONSTER balanced\]|balance\]|already dead|very dead
  4410.         matchre COUNT_FACE nothing else
  4411.     put shove
  4412.     matchwait 80
  4413.     goto ATTACK_ERROR
  4414.  
  4415. COUNT_WAIT_3:
  4416.     var LAST COUNT_WAIT_3
  4417.     if ("%GAG_ECHO" != "YES") then
  4418.     {
  4419.         echo
  4420.         echo *** COUNT_WAIT_3: circle ***
  4421.         echo
  4422.     }
  4423.         matchre COUNT_WAIT_4 You are already in a position|But you are already dodging|You move into a position to|Roundtime|pointlessly hack
  4424.         matchre COUNT_FATIGUE You're beat,|You're exhausted|You're bone-tired|worn-out
  4425.         matchre COUNT_ADV aren't close enough|You must be closer to use tactical abilities on your opponent\.
  4426.         matchre DEAD_MONSTER balanced\]|balance\]|already dead|very dead
  4427.         matchre COUNT_FACE nothing else
  4428.     put circle
  4429.     matchwait 80
  4430.     goto ATTACK_ERROR
  4431.  
  4432. COUNT_WAIT_4:
  4433.     var LAST COUNT_WAIT_4
  4434.     if ("%GAG_ECHO" != "YES") then
  4435.     {
  4436.         echo
  4437.         echo *** COUNT_WAIT_4: weave ***
  4438.         echo
  4439.     }
  4440.         matchre COUNT_WAIT_5 You are already in a position|But you are already dodging|You move into a position to|Roundtime|pointlessly hack
  4441.         matchre COUNT_FATIGUE You're beat,|You're exhausted|You're bone-tired|worn-out
  4442.         matchre COUNT_ADV aren't close enough|You must be closer to use tactical abilities on your opponent\.
  4443.         matchre DEAD_MONSTER balanced\]|balance\]|already dead|very dead
  4444.         matchre COUNT_FACE nothing else
  4445.     put weave
  4446.     matchwait 80
  4447.     goto ATTACK_ERROR
  4448.  
  4449. COUNT_WAIT_5:
  4450.     var LAST COUNT_WAIT_5
  4451.     if ("%GAG_ECHO" != "YES") then
  4452.     {
  4453.         echo
  4454.         echo *** COUNT_WAIT_5: bob ***
  4455.         echo
  4456.     }
  4457.         matchre COUNT_START You are already in a position|But you are already dodging|You move into a position to|Roundtime|pointlessly hack
  4458.         matchre COUNT_FATIGUE You're beat,|You're exhausted|You're bone-tired|worn-out
  4459.         matchre COUNT_ADV aren't close enough|You must be closer to use tactical abilities on your opponent\.
  4460.         matchre DEAD_MONSTER balanced\]|balance\]|already dead|very dead
  4461.         matchre COUNT_FACE nothing else
  4462.     put bob
  4463.     matchwait 80
  4464.     goto ATTACK_ERROR
  4465.  
  4466. ######################################
  4467. ###                                                      ###
  4468. ###      KHRI SECTION!!!                 ###
  4469. ###                                                      ###
  4470. ######################################
  4471.  
  4472. KHRI.CHECK:
  4473.     put khri check
  4474.     pause 0.1
  4475.     pause 0.1
  4476.     if ("$focus" = "OFF") && ($concentration > 20) && ("%FOCUS" = "ON") then gosub KHRI.START "focus"
  4477.     if ("$strike" = "OFF") && ($concentration > 20) && ("%STRIKE" = "ON") then gosub KHRI.START "strike"
  4478.     if ("$prowess" = "OFF") && ($concentration > 20) && ("%PROWESS" = "ON") then gosub KHRI.START "prowess"
  4479.     if ("$avoidance" = "OFF") && ($concentration > 20) && ("%AVOIDANCE" = "ON") then gosub KHRI.START "avoidance"
  4480.     if ("$hasten" = "OFF") && ($concentration > 30) && ("%HASTEN" = "ON") then gosub KHRI.START "hasten"
  4481.     if ("$elusion" = "OFF") && ($concentration > 20) && ("%ELUSION" = "ON") then gosub KHRI.START "elusion"
  4482.     if ("$steady" = "OFF") && ($concentration > 20) && ("%STEADY" = "ON") then gosub KHRI.START "steady"
  4483.     if ("$flight" = "OFF") && ($concentration > 30) && ("%FLIGHT" = "ON") then gosub KHRI.START "flight"
  4484.     if ("$darken" = "OFF") && ($concentration > 30) && ("%DARKEN" = "ON") then gosub KHRI.START "darken"
  4485.     if ("$dampen" = "OFF") && ($concentration > 30) && ("%DAMPEN" = "ON") then gosub KHRI.START "dampen"
  4486.     return
  4487.  
  4488. KHRI.START:
  4489.     pause 0.1
  4490.     matchre KHRI.START ^\.\.\.wait
  4491.     matchre KHRI.DONE ^You have not recovered from your previous use of the \w+ meditation\.$
  4492.     matchre KHRI.DONE ^Focusing intently|Roundtime
  4493.     matchre KHRI.DONE You are not trained in the
  4494.     matchre KHRI.DONE ^You strain, but cannot focus your mind enough to manage that\.$
  4495.     matchre KHRI.DONE ^You're already using the \w+ meditation.
  4496.     matchre KHRI.DONE ^Knowing that a dose of paranoia is healthy for any aspiring Thief, your mind fixates on every possible avenue of escape available to you\.$
  4497.     matchre KHRI.DONE ^Remembering the mantra of mind over matter, you let your dedicated focus seep into your muscles, feeling a sense of heightened strength as well a deeper instinctive understanding of your weaponry\.$
  4498.     matchre KHRI.DONE ^Focusing your mind, you look around yourself to find the subtle differences lurking in the shadows nearby\. After several deep breaths, your senses have attuned themselves to finding the best hiding spots\.$
  4499.     matchre KHRI.DONE ^Willing your body to meet the heightened functionality of your mind, you feel your motions steady considerably\.$
  4500.     matchre KHRI.DONE ^With deep breaths, you recall your training and focus your mind into the most universal of meditations, improving your overall performance\.$
  4501.     matchre KHRI.DONE ^Taking a deep breath, you focus on making your mind and body one, your mental discipline trained on quickly noticing, analyzing, and evading approaching threats\.$
  4502.     matchre KHRI.DONE ^Centering your mind, you allow your practiced discipline to spread throughout your body, making thought and motion one\.$
  4503.     matchre KHRI.DONE ^You calm your body and mind, recalling your training on how to seek the vital part of any opponent. Wrapping yourself in this cool composure, your eyes quickly become drawn to exposed weaknesses around you\.$
  4504.     matchre KHRI.DONE ^Purging yourself of all distractions and extraneous thoughts, you allow your mind and body to become one, becoming preternaturally aware of threats around you and the best ways to defend yourself\.$
  4505.     matchre KHRI.DONE ^Focusing your mind, you attempt to attune your senses to the paths between shadows\.$
  4506.     matchre KHRI.DONE ^\[Sitting, kneeling, or lying down can make starting this khri easier\.\]
  4507.     put (standup) off
  4508.     put kneel
  4509.     put khri start $1
  4510.     matchwait
  4511.  
  4512. KHRI.DONE:
  4513.     put (standup) on
  4514.     return
  4515.  
  4516. ######################################
  4517. ###                                                      ###
  4518. ### THIEF AMBUSH SECTION!                ###
  4519. ###                                                      ###
  4520. ######################################
  4521. AMBUSH.CHECK:
  4522.     math CLOUT.LOOP add 1
  4523.     var ambush.type clout
  4524.     if (%CLOUT.LOOP > 1) then goto AMBUSH.RETURN
  4525.     if ("$Distance" != "Melee") then
  4526.     {
  4527.         put adv
  4528.         RETURN
  4529.     }
  4530.  
  4531. AMBUSH.HAND.CHECK:
  4532.     if "$lefthandnoun" = "shield" then put wear shield
  4533.     if matchre("$lefthandnoun","(%QUIVER.ITEMS)") then put stow left
  4534.     if "%HAND" = "left" and "$righthand" != "Empty" then put stow right
  4535.     if "%HAND" != "left" and "$lefthand" != "Empty" then put stow left
  4536.     pause 0.2
  4537.  
  4538. AMBUSH.DECIDE:
  4539.     pause 0.1
  4540.     if matchre("$righthandnoun","(bola|club|hhr'ata|bludgeon|maul|mace|mattock|star|cane|staff|ngalio|nightstick|khuj|stiletto)") then var ambush.type stun
  4541.     if matchre("$righthandnoun","(sabre|briquet|broadsword|sword|katar|jambiya|javelin|quarterstaff|spear)") then var ambush.type slash
  4542.     if "%BACKSTAB" == "ON" then var ambush.type clout
  4543.     if contains("$roomobjs", "tusky") then var ambush.type clout
  4544.     if $hidden = 1 then goto AMBUSH.IT
  4545.     if (($hidden = 0) && (%level < 50)) then put hide
  4546.     pause 0.1
  4547.  
  4548. AMBUSH.STALK:
  4549.     if %circle < 50 then put hide
  4550.     pause 0.1
  4551.     pause 0.1
  4552.     put stop stalk
  4553.     pause 0.1
  4554.     matchre ADVANCE Stalk what|trying to stalk
  4555.     matchre AMBUSH.STALK reveals|try being out of sight|discovers you|You think|You fail
  4556.     matchre AMBUSH.IT You move into position|You are already stalking|You quickly slip|You're already stalking
  4557.     put stalk
  4558.     matchwait 7
  4559.     goto AMBUSH.CLOUT
  4560.  
  4561. AMBUSH.IT:
  4562.     if "%ambush.type" = "clout" then goto AMBUSH.CLOUT
  4563.     if "%ambush.type" = "stun" then goto AMBUSH.STUN
  4564.     if "%ambush.type" = "slash" then goto AMBUSH.STUN
  4565.     goto AMBUSH.CLOUT
  4566.  
  4567. AMBUSH.STUN:
  4568.     pause 0.1
  4569.     pause 0.5
  4570.     if $hidden = 0 then goto RET.STALK
  4571.     matchre AMBUSH.STALK You must be hidden or invisible
  4572.     matchre AMBUSH.CHECK You need at least one hand
  4573.     matchre AMBUSH.CLOUT debilitated|impaired|out cold|deflect your slashing cut
  4574.     matchre AMBUSH.RETURN blocked harmlessly|You need a weapon|is stunned|isn't even standing
  4575.     matchre AMBUSH.RETURN Roundtime|it is flying|You aren't close enough to attack|There is nothing else|Stalk|suited for this type of maneuver|must be closer
  4576.     put ambush %ambush.type
  4577.     matchwait 10
  4578.     goto AMBUSH.RETURN
  4579.  
  4580. AMBUSH.CLOUT.HIDE:
  4581.     pause 0.1
  4582.     put stalk
  4583.     pause 0.5
  4584.  
  4585. AMBUSH.CLOUT:
  4586.     pause 0.1
  4587.     pause 0.5
  4588.     var ambush.type clout
  4589.     var THROW.LOOP 0
  4590.     #if matchre("$righthandnoun","(sabre|sword|katar|jambiya|quarterstaff|nightstick|khuj)") then var ambush.type stun
  4591.     matchre AMBUSH.CLOUT.HIDE You must be hidden or invisible
  4592.     matchre AMBUSH.CHECK You need at least one hand
  4593.     matchre AMBUSH.RETURN Roundtime|it is flying|You aren't close enough to attack|There is nothing else|Stalk|must be closer
  4594.     matchre AMBUSH.RETURN debilitated|impaired|out cold|deflect your slashing cut|isn't even standing|suited for this type of maneuver|You're not exactly sure
  4595.     put ambush %ambush.type
  4596.     matchwait 15
  4597.  
  4598. AMBUSH.RETURN:
  4599.     var CLOUT.LOOP 0
  4600.     pause 0.2
  4601.     pause 0.1
  4602.     RETURN
  4603.  
  4604. RET.STALK:
  4605.     pause 0.1
  4606.     pause 0.2
  4607.     put ret
  4608.     goto AMBUSH.STALK
  4609.  
  4610. ######################################
  4611. ###                                ###
  4612. ### This section is for the 5-move ###
  4613. ### weapon attack _COMBO            ###
  4614. ###                                ###
  4615. ######################################
  4616. 5_COMBO:
  4617. 500:
  4618.     if ("%lastmaneuver" = "none") then
  4619.     {
  4620.         put stance maneuver
  4621.         waitfor Last Combat Maneuver
  4622.     }
  4623.     var LAST 5_COMBO
  4624.     gosub clear
  4625.     counter set 500
  4626.     save 500
  4627.     if ("%lastmaneuver" = "%_COMBO5") then gosub COMBAT_COMMAND %_COMBO1
  4628.     if ("%lastmaneuver" = "%_COMBO1") then gosub COMBAT_COMMAND %_COMBO2 %HAND $GH_TARGET
  4629.     if ("%lastmaneuver" = "%_COMBO2") then gosub COMBAT_COMMAND %_COMBO3 %HAND $GH_TARGET
  4630.     if ("%lastmaneuver" = "%_COMBO3") then gosub COMBAT_COMMAND %_COMBO4 %HAND $GH_TARGET
  4631.     if ("%lastmaneuver" = "%_COMBO4") then gosub COMBAT_COMMAND %_COMBO5 %HAND $GH_TARGET
  4632.     else gosub COMBAT_COMMAND %_COMBO1
  4633.     if $GH_THIEF = ON then gosub AMBUSH.CHECK
  4634.     if (toupper("$GH_TIMER") = "ON") then goto TIMER_ON
  4635.     if (toupper("$GH_TRAIN") = "ON") then goto EXPCHECK_ON
  4636.     else goto 500
  4637.  
  4638. ######################################
  4639. ###                                ###
  4640. ### This section is for the 6-move ###
  4641. ### weapon attack _COMBO            ###
  4642. ###                                ###
  4643. ######################################
  4644. 6_COMBO:
  4645. 600:
  4646.     if ("%lastmaneuver" = "none") then
  4647.     {
  4648.         put stance maneuver
  4649.         waitfor Last Combat Maneuver
  4650.     }
  4651.     var LAST 6_COMBO
  4652.     gosub clear
  4653.     counter set 600
  4654.     save 600
  4655.     if ("%lastmaneuver" = "%_COMBO6") then gosub COMBAT_COMMAND %_COMBO1
  4656.     if ("%lastmaneuver" = "%_COMBO1") then gosub COMBAT_COMMAND %_COMBO2 %HAND $GH_TARGET
  4657.     if ("%lastmaneuver" = "%_COMBO2") then gosub COMBAT_COMMAND %_COMBO3 %HAND $GH_TARGET
  4658.     if ("%lastmaneuver" = "%_COMBO3") then gosub COMBAT_COMMAND %_COMBO4 %HAND $GH_TARGET
  4659.     if ("%lastmaneuver" = "%_COMBO4") then gosub COMBAT_COMMAND %_COMBO5 %HAND $GH_TARGET
  4660.     if ("%lastmaneuver" = "%_COMBO5") then gosub COMBAT_COMMAND %_COMBO6 %HAND $GH_TARGET
  4661.     else gosub COMBAT_COMMAND %_COMBO1
  4662.     if $GH_THIEF = ON then gosub AMBUSH.CHECK
  4663.     if (toupper("$GH_TIMER") = "ON") then goto TIMER_ON
  4664.     if (toupper("$GH_TRAIN") = "ON") then goto EXPCHECK_ON
  4665.     else goto 600
  4666.  
  4667. ######################################
  4668. ###                                ###
  4669. ### This section is for the 7-move ###
  4670. ### weapon attack _COMBO            ###
  4671. ###                                ###
  4672. ######################################
  4673. 7_COMBO:
  4674. 700:
  4675.     if ("%lastmaneuver" = "none") then
  4676.     {
  4677.         put stance maneuver
  4678.         waitfor Last Combat Maneuver
  4679.     }
  4680.     var LAST 7_COMBO
  4681.     gosub clear
  4682.     counter set 700
  4683.     save 700
  4684.     if ("%lastmaneuver" = "%_COMBO7") then gosub COMBAT_COMMAND %_COMBO1
  4685.     if ("%lastmaneuver" = "%_COMBO1") then gosub COMBAT_COMMAND %_COMBO2 %HAND $GH_TARGET
  4686.     if ("%lastmaneuver" = "%_COMBO2") then gosub COMBAT_COMMAND %_COMBO3 %HAND $GH_TARGET
  4687.     if ("%lastmaneuver" = "%_COMBO3") then gosub COMBAT_COMMAND %_COMBO4 %HAND $GH_TARGET
  4688.     if ("%lastmaneuver" = "%_COMBO4") then gosub COMBAT_COMMAND %_COMBO5 %HAND $GH_TARGET
  4689.     if ("%lastmaneuver" = "%_COMBO5") then gosub COMBAT_COMMAND %_COMBO6 %HAND $GH_TARGET
  4690.     if ("%lastmaneuver" = "%_COMBO6") then gosub COMBAT_COMMAND %_COMBO7 %HAND $GH_TARGET
  4691.     else gosub COMBAT_COMMAND %_COMBO1
  4692.     if $GH_THIEF = ON then gosub AMBUSH.CHECK
  4693.     if (toupper("$GH_TIMER") = "ON") then goto TIMER_ON
  4694.     if (toupper("$GH_TRAIN") = "ON") then goto EXPCHECK_ON
  4695.     else goto 700
  4696.  
  4697. ######################################
  4698. ###                                ###
  4699. ### This section is for the 8-move ###
  4700. ### weapon attack _COMBO            ###
  4701. ###                                ###
  4702. ######################################
  4703. 8_COMBO:
  4704. 800:
  4705.     if ("%lastmaneuver" = "none") then
  4706.     {
  4707.         put stance maneuver
  4708.         waitfor Last Combat Maneuver
  4709.     }
  4710.     var LAST 8_COMBO
  4711.     gosub clear
  4712.     counter set 800
  4713.     save 800
  4714.     if ("%lastmaneuver" = "%_COMBO8") then gosub COMBAT_COMMAND %_COMBO1 %HAND $GH_TARGET
  4715.     if ("%lastmaneuver" = "%_COMBO1") then gosub COMBAT_COMMAND %_COMBO2 %HAND $GH_TARGET
  4716.     if ("%lastmaneuver" = "%_COMBO2") then gosub COMBAT_COMMAND %_COMBO3 %HAND $GH_TARGET
  4717.     if ("%lastmaneuver" = "%_COMBO3") then gosub COMBAT_COMMAND %_COMBO4 %HAND $GH_TARGET
  4718.     if ("%lastmaneuver" = "%_COMBO4") then gosub COMBAT_COMMAND %_COMBO5 %HAND $GH_TARGET
  4719.     if ("%lastmaneuver" = "%_COMBO5") then gosub COMBAT_COMMAND %_COMBO6 %HAND $GH_TARGET
  4720.     if ("%lastmaneuver" = "%_COMBO6") then gosub COMBAT_COMMAND %_COMBO7 %HAND $GH_TARGET
  4721.     if ("%lastmaneuver" = "%_COMBO7") then gosub COMBAT_COMMAND %_COMBO8 %HAND $GH_TARGET
  4722.     else gosub COMBAT_COMMAND %_COMBO1
  4723.     if $GH_THIEF = ON then gosub AMBUSH.CHECK
  4724.     if (toupper("$GH_TIMER") = "ON") then goto TIMER_ON
  4725.     if (toupper("$GH_TRAIN") = "ON") then goto EXPCHECK_ON
  4726.     else goto 800
  4727.  
  4728. ######################################
  4729. ###                                ###
  4730. ### This section is for the ranged ###
  4731. ### weapon attack _COMBO            ###
  4732. ###                                ###
  4733. ######################################
  4734. RANGED:
  4735. 1000:
  4736.     var LAST RANGED
  4737.     save 1000
  4738.     action var FULL_AIM YES when You think you have your best shot possible
  4739.     action var FULL_AIM NO when stop concentrating on aiming
  4740.     if ((toupper("$GH_RETREAT") = "ON") && ("%RETREATING" = "OFF") && (("%FIRE_TYPE" != "SNIPE") || ("%FIRE_TYPE" != "POACH"))) then gosub RETREAT_TRIGGERS
  4741.     if ("%lastmaneuver" = "none") then gosub COMBAT_COMMAND dodge
  4742. RANGED_COMBAT:
  4743. 1010:
  4744.     var LAST RANGED_COMBAT
  4745.     gosub clear
  4746.     counter set 1010
  4747.     save 1010
  4748.     if (("%lastmaneuver" = "dodge") || ("%lastmaneuver" = "FIRE") || ("%lastmaneuver" = "POACH") || ("%lastmaneuver" = "SNIPE")) then
  4749.     {
  4750.         if "%RETREATING" = "ON" then action (retreat) off
  4751.         gosub LOAD
  4752.         gosub AIM
  4753.         if ($GH_THIEF = ON) then gosub AMBUSH.CHECK
  4754.         if "%RETREATING" = "ON" then action (retreat) on
  4755.         #if (toupper("$GH_SNAP") = "ON")) then gosub stun
  4756.         if (("%FIRE_TYPE" = "POACH") || ("%FIRE_TYPE" = "SNIPE")) then gosub HIDE
  4757.         if (toupper("$GH_SNAP") = "OFF")) then gosub AIMING
  4758.         elseif ($GH_SNAP_PAUSE > 0) then pause $GH_SNAP_PAUSE
  4759.         var FULL_AIM NO
  4760.             matchre RANGE_FIRE2 You can not poach|are not hidden
  4761.             match RETURN isn't loaded
  4762.             matchre RETURN ^I could not find what you were
  4763.         gosub COMBAT_COMMAND %FIRE_TYPE $GH_TARGET
  4764.     } else gosub COMBAT_COMMAND dodge
  4765.     goto 1010
  4766.  
  4767. LOAD:
  4768.     matchre CHECK_AMMO ^You don't have the proper ammunition readily available for your
  4769.     matchre RANGE_GET ^You must|your hand jams|^You can ?not load
  4770.     matchre RANGE_REMOVE_CHECK while wearing an? (.+)
  4771.     matchre RETURN Roundtime|is already
  4772.         if $guild = Ranger && $HOL = ON && $GH_DUAL_LOAD = ON then
  4773.         {
  4774.             put load arrows
  4775.             matchwait 80
  4776.             goto RANGED_ERROR
  4777.         }
  4778.         else
  4779.         if $guild = Barbarian && $EAGLE = ON && $GH_DUAL_LOAD = ON  then
  4780.             {
  4781.             put load arrows
  4782.             matchwait 80
  4783.             goto RANGED_ERROR
  4784.         }
  4785.         else
  4786.         put load
  4787.         matchwait 80
  4788.     goto RANGED_ERROR
  4789.  
  4790. AIM:
  4791.     put stow %AMMO
  4792.     var AIM_TIMEOUT %t
  4793.     math AIM_TIMEOUT add 30
  4794.         match RE_LOAD loaded
  4795.         matchre RETURN best shot possible now|already targetting|begin to target|You shift your
  4796.         matchre FACE ^There is nothing
  4797.     put aim
  4798.     matchwait 80
  4799.     goto RANGED_ERROR
  4800.  
  4801. RE_LOAD:
  4802.     gosub clear
  4803.     goto RANGED_COMBAT
  4804.  
  4805. AIMING:
  4806.     if ("%FULL_AIM" = "YES") then return
  4807.     else
  4808.     {
  4809.         if (%t > %AIM_TIMEOUT) then goto RANGED_COMBAT
  4810.         else
  4811.         {
  4812.             pause .5
  4813.             goto AIMING
  4814.         }
  4815.     }
  4816.  
  4817. RANGE_FIRE2:
  4818.     if ("%GAG_ECHO" != "YES") then
  4819.     {
  4820.         echo
  4821.         echo *** Can't poach that, just using FIRE ***
  4822.         echo
  4823.     }
  4824.     var LAST RANGE_FIRE2
  4825.     gosub clear
  4826.         matchre RETURN ^I could not find what you were
  4827.         match RETURN isn't loaded
  4828.     gosub COMBAT_COMMAND FIRE $GH_TARGET
  4829.     goto 1010
  4830.  
  4831. RANGE_GET:
  4832.     var LAST RANGE_GET
  4833.     gosub clear
  4834.     if (matchre("$roomobjs", "%AMMO\b")) then
  4835.         {
  4836.         matchre CHECK_AMMO ^What were you|^You stop as
  4837.         match DEAD_MONSTER ^You pull
  4838.         matchre %c ^Stow what|^You must unload|^You get some
  4839.         matchre RANGE_GET ^You pick up|^You put|^You stow|^You get
  4840.         if "%AMMO" = "basilisk head arrow" then put stow basilisk arrow
  4841.         else
  4842.         put stow %AMMO
  4843.         matchwait 80
  4844.         goto RANGED_ERROR
  4845.     } else goto %c
  4846.  
  4847. RANGE_REMOVE_CHECK:
  4848.     if matchre ("$0", "shield|buckler|pavise|heater|kwarf|sipar|lid|targe\b") then goto RANGE_REMOVE
  4849.     else goto RANGED_ERROR
  4850. RANGE_REMOVE:
  4851.     var REM_SHIELD $0
  4852.     counter set %s
  4853. RANGE_REMOVING:
  4854.     var LAST RANGE_REMOVING
  4855.         matchre RANGE_STOW ^You loosen the straps securing|^You aren't wearing that
  4856.         match RANGED_ERROR ^Remove what?
  4857.     put remove my %REM_SHIELD
  4858.     matchwait 80
  4859.     goto RANGED_ERROR
  4860.  
  4861. RANGE_STOW:
  4862.     var LAST RANGE_STOW
  4863.         match RANGED_ERROR ^Stow What?
  4864.         match RANGE_ADJUST too
  4865.         match RETURN You put
  4866.     put stow my %REM_SHIELD
  4867.     matchwait 16
  4868. RANGE_ADJUST:
  4869.         matchre RANGED_ERROR through the straps|You can't wear any more items like that
  4870.         match RETURN You sling
  4871.     put adjust my %REM_SHIELD
  4872.     put wear my %REM_SHIELD
  4873.     matchwait  30
  4874.     goto RANGED_ERROR
  4875.  
  4876. CHECK_AMMO:
  4877.     if ("%GAG_ECHO" != "YES") then
  4878.     {
  4879.         echo
  4880.         echo *** No ammo on you, checking the ground ***
  4881.         echo
  4882.     }
  4883.     if contains("$roomobjs", "%AMMO") then
  4884.     {
  4885.         gosub RANGED_CLEAN
  4886.         goto 1000
  4887.     }
  4888. NO_AMMO:
  4889.     if ("%GAG_ECHO" != "YES") then
  4890.     {
  4891.         echo
  4892.         echo *** No more ammo, stopping script ***
  4893.         echo
  4894.     }
  4895.     var LAST NO_AMMO
  4896.     if ("%REM_SHIELD" != "NONE") then
  4897.     {
  4898.         gosub EQUIP_SHIELD %REM_SHIELD
  4899.     }
  4900.     gosub RANGE_SHEATHE
  4901.     goto DONE
  4902.  
  4903. ######################################
  4904. ###                                ###
  4905. ### This section is for the ranged ###
  4906. ### weapon attack _COMBO            ###
  4907. ###                                ###
  4908. ######################################
  4909. THROWING:
  4910. 1200:
  4911.     save 1200
  4912.     var LAST THROWING
  4913.     if ((toupper("$GH_RETREAT") = "ON") && ("%RETREATING" = "OFF")) then gosub RETREAT_TRIGGERS
  4914.     if ("%lastmaneuver" = "none") then gosub COMBAT_COMMAND dodge
  4915. THROW_WEAPON:
  4916. 1210:
  4917.     var LAST THROW_WEAPON
  4918.     gosub clear
  4919.     counter set 1210
  4920.     save 1210
  4921.     if ("%LOB" = "OFF" && "%HURL" = "OFF") then gosub COMBAT_COMMAND throw %HAND $GH_TARGET
  4922.     if ("%LOB" = "ON") then gosub COMBAT_COMMAND lob %HAND $GH_TARGET
  4923.     if ("%HURL" = "ON") then gosub COMBAT_COMMAND hurl %HAND $GH_TARGET
  4924.     if ((("%HAND" = "") && ("$righthand" = "Empty")) || (("%HAND" = "left") && ("$lefthand" = "Empty"))) then gosub GET_THROWN
  4925.     if (("%HAND" = "left") && "$righthand" = "%CURR_WEAPON")) then gosub SWAP_LEFT $righthandnoun
  4926.     if (toupper("$GH_TIMER") = "ON") then goto TIMER_ON
  4927.     if (toupper("$GH_TRAIN") = "ON") then goto EXPCHECK_ON
  4928.     goto 1210
  4929.  
  4930. GET_THROWN:
  4931.         match GET_THROWN As you reach for a large frozen club
  4932.         match WEAPON_STUCK What were you
  4933.         matchre RETURN already|You need a free hand to pick that up|You get|You pick up|With a flick|You pull|suddenly leaps toward you|and flies toward you
  4934.     if %BONDED = ON then put invoke
  4935.     else
  4936.     put get %CURR_WEAPON
  4937.     matchwait 15
  4938.     goto THROWN_ERROR
  4939.  
  4940. WEAPON_STUCK:
  4941. 1220:
  4942.     var LAST WEAPON_STUCK
  4943.     if ("%RETREATING" = "ON") then gosub RETREAT_UNTRIGGERS
  4944.     if ("%GAG_ECHO" != "YES") then
  4945.     {
  4946.         echo
  4947.         echo *** Getting weapon back ***
  4948.         echo
  4949.     }
  4950.     gosub clear
  4951.     if !indexof ("$BW", "$") then
  4952.     {
  4953.         if "$BW" != "OFF" && "$GH_BUFF" = "ON" then
  4954.         {
  4955.             if "$righthand" = "Empty" then waitforre leaps back into your
  4956.             goto 1210
  4957.         }
  4958.     }
  4959.     put advance
  4960.     waitforre to melee range|already at melee
  4961.     if (("%lastmaneuver" = "throw") || ("%lastmaneuver" = "jab")) then
  4962.     {
  4963.         match GET_WEAPON comes free and falls to the ground.
  4964.         gosub COMBAT_COMMAND dodge
  4965.     }
  4966.     if ("%lastmaneuver" = "dodge") then
  4967.     {
  4968.         match GET_WEAPON comes free and falls to the ground.
  4969.         gosub COMBAT_COMMAND gouge
  4970.     }
  4971.     if ("%lastmaneuver" = "gouge") then
  4972.     {
  4973.         match GET_WEAPON comes free and falls to the ground.
  4974.         gosub COMBAT_COMMAND claw
  4975.     }
  4976.     if ("%lastmaneuver" = "claw") then
  4977.     {
  4978.         match GET_WEAPON comes free and falls to the ground.
  4979.         gosub COMBAT_COMMAND elbow
  4980.     }
  4981.     if ("%lastmaneuver" = "elbow") then
  4982.     {
  4983.         match GET_WEAPON comes free and falls to the ground.
  4984.         gosub COMBAT_COMMAND jab
  4985.     }
  4986.     else gosub COMBAT_COMMAND dodge
  4987.     goto 1220
  4988.  
  4989. GET_WEAPON:
  4990.     if ((toupper("$GH_RETREAT") = "ON") && ("%RETREATING" = "OFF")) then gosub RETREAT_TRIGGERS
  4991.     gosub clear
  4992.         matchre GET_WEAPON comes free and falls to the ground|As you reach for a large frozen club
  4993.         matchre 1210 already|You get|You pull|You pick|You need a free hand to|What were you
  4994.     put get %CURR_WEAPON
  4995.     matchwait 15
  4996.     goto THROWN_ERROR
  4997.  
  4998. ########################################
  4999. ###                                  ###
  5000. ### This section is for the backstab ###
  5001. ### weapon attack _COMBO              ###
  5002. ###                                  ###
  5003. ########################################
  5004. STABBITY:
  5005. 1300:
  5006.     var LAST STABBITY
  5007.     gosub clear
  5008.     counter set 1300
  5009.     save 1300
  5010.     if ("%lastmaneuver" != "parry") then gosub COMBAT_COMMAND parry
  5011.     if ($hidden != 1) then gosub HIDE
  5012.     if $GH_THIEF = ON then gosub AMBUSH.CHECK
  5013.     if ("%lastmaneuver" = "parry") then
  5014.     {
  5015.         matchre FACE Backstab what\?|Face what\?
  5016.         matchre BS_ATTACK You can't backstab that\.|political|You'll need something a little lighter
  5017.         matchre BAD_WEAPON entirely unsuitable|Backstabbing is much more effective when you use a melee weapon
  5018.         gosub COMBAT_COMMAND backstab %HAND $GH_TARGET
  5019.     }
  5020.     if (toupper("$GH_TIMER") = "ON") then goto TIMER_ON
  5021.     if (toupper("$GH_TRAIN") = "ON") then goto EXPCHECK_ON
  5022.     else goto 1300
  5023. BS_ATTACK:
  5024.     if ("%GAG_ECHO" != "YES") then
  5025.     {
  5026.         echo
  5027.         echo *** Can't backstab, ambushing instead ***
  5028.         echo
  5029.     }
  5030.     gosub clear
  5031.     goto 500
  5032.  
  5033. BAD_WEAPON:
  5034.     if ("%GAG_ECHO" != "YES") then
  5035.     {
  5036.         echo
  5037.         echo *** BAD_WEAPON: ***
  5038.         echo This weapon is not suitable for this type of attack, switching to regular combat
  5039.         echo
  5040.     }
  5041.     counter set 0
  5042.     goto WEAPON_CHECK
  5043.  
  5044. ######################################
  5045. ###                                ###
  5046. ###      Combat Manuever           ###
  5047. ###                                ###
  5048. ######################################
  5049. COMBAT_COMMAND:
  5050.     var COMMAND $0
  5051.     if ((toupper("$GH_RITUAL") = "ON") && ("$%GH_RITUALSPELL" = "OFF")) then
  5052.     {
  5053.         put stance
  5054.         waitforre ^Last Combat Maneuver
  5055.         send stance set %RITUAL_STANCE
  5056.         waitforre ^You are now set|^Setting your
  5057.         if $mana < 70 then waiteval $mana >= 70
  5058.         var rhanditem none
  5059.         var lhanditem none
  5060.         if "$righthand" != "Empty" then
  5061.             {
  5062.             var rhanditem $righthandnoun
  5063.             gosub SHEATHE $righthandnoun
  5064.             }
  5065.         if "$lefthand" != "Empty" then
  5066.             {
  5067.             var lhanditem $lefthandnoun
  5068.             gosub SHEATHE $lefthandnoun
  5069.             }
  5070.         if "%RITUAL_FOCUS_CONTAINER" = WORN then
  5071.         {
  5072.             send remove my %RITUAL_FOCUS
  5073.             waitforre ^You |^Remove what|^What were you referring to|^You aren't wearing that
  5074.         }
  5075.         else
  5076.         {
  5077.             send get %RITUAL_FOCUS from my %RITUAL_FOCUS_CONTAINER
  5078.             waitforre ^You get|^You are already holding that|^What were you referring to
  5079.         }
  5080.         if "%GH_RITUALSPELL" = "ABSOLUTION" && "$GOL" = ON then
  5081.             {
  5082.             send release gol
  5083.             waitforre ^Your increased sense of wellness|^RELEASE Options
  5084.             }
  5085.         send prepare %GH_RITUALSPELL %GH_RITUALMANA
  5086.         waitforre ^%PREP_MESSAGE
  5087.         pause .5
  5088.         send invoke my %RITUAL_FOCUS
  5089.         waitforre ^You feel fully prepared to cast your spell
  5090.         send cast
  5091.         if "%RITUAL_FOCUS_CONTAINER" = WORN then
  5092.         {
  5093.             send wear my %RITUAL_FOCUS
  5094.             waitforre ^You |^What were you referring to|^This .+ can't fit over the
  5095.         }
  5096.         else
  5097.         {
  5098.             send put my %RITUAL_FOCUS in my %RITUAL_FOCUS_CONTAINER
  5099.             waitforre ^You put|^But that is already in your inventory|^Perhaps you should be holding that first|^There isn't any more room in|^Stow what|^What were you referring to
  5100.         }
  5101.         if (%rhanditem != none) then gosub WIELD_WEAPON %CURR_WEAPON
  5102.         if (%lhanditem != none) then gosub WIELD_WEAPON %lhanditem
  5103.         send stance set %estance %pstance %sstance %ostance
  5104.         waitforre ^You are now set|^Setting your
  5105.         if ("%CURR_STANCE" = "Evasion") then put stance evasion
  5106.         elseif ("%CURR_STANCE" = "Parry_Ability") then send stance parry
  5107.         elseif ("%CURR_STANCE" = "Shield_Usage") then send stance shield
  5108.         elseif ("%CURR_STANCE" = "Custom") then send stance custom
  5109.         pause
  5110.     }
  5111.     if (("$GH_FEINT" = "ON") && (("$0" != "feint") && ("$0" != "parry") && ("$0" != "dodge"))) then var COMMAND feint $0
  5112.     if ("%EXP2" != "Offhand_Weapon") then var lastmaneuver $1 $2 $3
  5113.     else var lastmaneuver $1
  5114.     if ("%SEARCHED" = "NO") then
  5115.     {
  5116.         if matchre ("$roomplayers", "Also here: (\S+)") then goto NOT_CHECKING
  5117.         if matchre ("$roomobjs", "((which|that) appears dead|\(dead\))") then goto DEAD_MONSTER
  5118.     }
  5119.     else var SEARCHED NO
  5120.     NOT_CHECKING:
  5121.     if ((toupper("$GH_HUNT") = "ON") && (%t >= %HUNT_TIME) && ($Perception.LearningRate < 30)) then
  5122.     {
  5123.         put hunt
  5124.         var HUNT_TIME %t
  5125.         math HUNT_TIME add 75
  5126.         waitforre Roundtime|You find yourself unable
  5127.     }
  5128.     if ((toupper("$GH_MANIP") = "ON") && (%t >= %MANIP_TIME) && ($Empathy.LearningRate < 30) then
  5129.     {
  5130.         gosub MANIPULATE1
  5131.         var MANIP_TIME %t
  5132.         math MANIP_TIME add 75
  5133.     }
  5134.     if ((toupper("$GH_NISSA") = "ON") && (%t >= %nissa_time) then
  5135.     {
  5136.         gosub DEBNISSA
  5137.         var nissa_time %t
  5138.         math nissa_time add 120
  5139.     }
  5140.     if ((toupper("$GH_PARALYSIS") = "ON") && ($Targeted_Magic.LearningRate < 30) && ($mana >= 30) then gosub TMPARALYSIS
  5141.     if ((toupper("$GH_PP") = "ON") && (%t >= %PP_TIME) && ($Attunement.LearningRate < 30)) then
  5142.     {
  5143.         send power
  5144.         var PP_TIME %t
  5145.         math PP_TIME add 60
  5146.         waitforre Roundtime|^Strangely, you can sense absolutely nothing
  5147.     }
  5148.     if ((toupper("$GH_PILGRIM") = "ON") && (%t >= %PILGRIM_TIME)) then
  5149.     {
  5150.         put remove my pilgrim's badge
  5151.         waitforre ^You take off|^Remove what|^You need a free hand for that
  5152.         put pray pilgrim's badge
  5153.         wait
  5154.         pause
  5155.         send wear my pilgrim's badge
  5156.         waitforre ^You put on|^Wear what|^You are already wearing that
  5157.         pause
  5158.         var PILGRIM_TIME %t
  5159.         math PILGRIM_TIME add 1860
  5160.     }
  5161.     if toupper("$GH_ARMOR") = "ON" then gosub GH_ARMOR_ON
  5162.     if toupper("$GH_BUFF") = "ON" and $mana > 30 then gosub GH_BUFF_ON
  5163.     if $GH_KHRI = ON && %t >= %KHRI_TIME then
  5164.     {
  5165.         gosub KHRI.CHECK
  5166.         var KHRI_TIME %t
  5167.         math KHRI_TIME add 60
  5168.     }
  5169.     if toupper("$juggernaut.orb") = "YES" then gosub DISARM_ORB
  5170.     if ((toupper("$GH_SLOW") = "ON") && ($stamina < 90)) then
  5171.         {
  5172.         if (("%guild" = "Barbarian")) then
  5173.             {
  5174.             send berserk avalanche
  5175.             }
  5176.         waiteval $stamina = 100
  5177.         }
  5178.  
  5179.     if $standing = 0 then
  5180.     {
  5181.         put #send stand
  5182.         pause .5
  5183.     }
  5184.     if (("$GH_ENCHANTE" = "ON") && (%enchante_timer < %t) && ($%enchante_school.LearningRate < 30) && (matchre("%enchante_school", "Augmentation|Utility|Warding"))) then
  5185.     {
  5186.         put release cyclic
  5187.         pause .5
  5188.         put prep %enchante_name %enchante_mana
  5189.         waitfor You feel fully prepared
  5190.         put cast
  5191.         math enchante_timer add %t
  5192.     }
  5193.     if (($Debilitation.LearningRate < 30) && ("%guild" = "Barbarian") && ($hidden != 1)) then
  5194.     {
  5195.         put roar quiet embrace
  5196.         pause .5
  5197.         pause .5
  5198.     }
  5199.     if (($Augmentation.LearningRate < 30) && ("%AUGMENTATION" = "off") && ("%WARDING" = "off") && ("%guild" = "Barbarian")) then
  5200.     {
  5201.         put form monkey
  5202.         var AUGMENTATION on
  5203.         pause .5
  5204.         pause .5
  5205.     }
  5206.     if (($Augmentation.LearningRate = 34) && ("%AUGMENTATION" = "on") && ("%guild" = "Barbarian")) then
  5207.     {
  5208.         put form stop monkey
  5209.         var AUGMENTATION off
  5210.         pause 1
  5211.     }
  5212.     if (($Warding.LearningRate < 30) && ("%WARDING" = "off") && ("%AUGMENTATION" = "off") && ("%guild" = "Barbarian")) then
  5213.     {
  5214.         put form swan
  5215.         var WARDING on
  5216.         pause .5
  5217.         pause .5
  5218.     }
  5219.     if (($Warding.LearningRate = 34) && ("%WARDING" = "on") && ("%guild" = "Barbarian")) then
  5220.     {
  5221.         put form stop swan
  5222.         var WARDING off
  5223.     }
  5224.     if ((toupper("$GH_AMBUSH") = "ON") && ($hidden != 1)) then
  5225.     {
  5226.         if ("%BACKSTAB" = "ON") then gosub HIDE
  5227.         elseif (($Stealth.LearningRate < 30)) then gosub HIDE
  5228.     }
  5229.     if (($hidden = 1) && ("%guild" = "Paladin")) then
  5230.     {
  5231.         send unhide
  5232.         pause 1
  5233.     }
  5234.     if "$guild" = "Empath" && "$GH_CONSTRUCT" = "ON" && "$GH_ANALYZE" = "OFF" then
  5235.     {
  5236.         gosub ASSESS
  5237.     }
  5238.     if ("%COMMAND" = "MAGIC_WAIT") then return
  5239.  
  5240. ATTACK:
  5241. var LAST ATTACK
  5242. if ("$righthandnoun" = "fan") && ("%LAST_FAN_STATUS" = "OPENED") && ("%FAN_STATUS" = "CLOSED") then
  5243. {
  5244.     put open my $righthand
  5245.     var FAN_STATUS OPENED
  5246.     pause .2
  5247. }
  5248. if ($Tactics.LearningRate < 30 && $GH_TACTICS = ON && !matchre("%WEAPON_EXP", "Bow|Crossbow|Slings")) then gosub TACTICSTRAIN
  5249. if ($GH_ANALYZE = ON && !matchre("%WEAPON_EXP", "Bow|Crossbow|Slings")) then gosub DO_ANALYZE
  5250. else
  5251.        {
  5252.                matchre FLYING_MONSTER flying far too high to hit with|flying too high for you to attack
  5253.                matchre FATIGUE You're beat|You're exhausted|You're bone-tired|worn-out
  5254.                 matchre ADVANCE help if you were closer|aren't close enough
  5255.                matchre DEAD_MONSTER balanced\]|balance\]|already dead|very dead|pointlessly hack
  5256.                matchre FACE nothing else|^Face what\?
  5257.                matchre RETURN You are already in a position|But you are already dodging|You move into a position to|Roundtime|must be hidden|What were you|What are you
  5258.        if ("$smite" = "true") then
  5259.        {
  5260.                if ("%COMMAND" = "slice" || "%COMMAND" = "thrust") then
  5261.                {
  5262.                        var OLD_COMMAND %COMMAND
  5263.                        var COMMAND smite
  5264.                }
  5265.        if (contains("%WEAPON_EXP", "_Blunt") then
  5266.        {
  5267.                if ("%COMMAND" = "bash") then
  5268.                {
  5269.                        var OLD_COMMAND %COMMAND
  5270.                        var COMMAND smite
  5271.                }
  5272.        }
  5273.        }
  5274.                if (%BACKSTAB = ON && !(matchre("%COMMAND", "backstab|parry|dodge")) then
  5275.                        {
  5276.                        random 0 8
  5277.                        pause 0.3
  5278.                        put %COMMAND %BODY_PART(%r)
  5279.                        }
  5280.                else
  5281.                        {
  5282.                         if ((%COMMAND = throw) && ($righthand = Empty)) then
  5283.                         {
  5284.                             put get %CURR_WEAPON
  5285.                             waitforre ^You
  5286.                         }
  5287.                        if ("$guild" = "Empath" && "$GH_CONSTRUCT" = "ON") then put %COMMAND %Empath_Monster
  5288.                         else put %COMMAND
  5289.                        }
  5290.                matchwait 5
  5291.        }
  5292.        if ("$smite" = "true") then var COMMAND %OLD_COMMAND
  5293.        return
  5294.        goto ATTACK_ERROR
  5295.  
  5296. TACTICSTRAIN:
  5297.         matchre FACE nothing else to face
  5298.         matchre NEXT_TACT Roundtime|You aren't close enough|flying too high for you to attack
  5299.          matchre ADVANCE must be closer
  5300.          send %TACTICS(%tact_move)
  5301.          matchwait 10
  5302.          goto TACTICSTRAIN
  5303. NEXT_TACT:
  5304.          if %tact_move < 2 then math tact_move add 1
  5305.          else var tact_move 0
  5306.          pause 0.5
  5307.          return
  5308.  
  5309. DO_ANALYZE:
  5310.     var LAST DO_ANALYZE
  5311.     matchre ANALYZE_DONE ^Roundtime|^You recall your combo|^Your analysis
  5312.     matchre ADVANCE ^You must be closer
  5313.     matchre FACE ^Analyze what|^You fail to find any
  5314.     action (combos) on
  5315.     put analyze %barb.tact
  5316.     matchwait 10
  5317.     goto DO_ANALYZE
  5318. ANALYZE_DONE:
  5319.     action (combos) off
  5320.     if !%ANALYZELEVEL = 10 then math ANALYZELEVEL add 1
  5321.     if %ANALYZELEVEL < %ANALYZEAMOUNT then goto DO_ANALYZE
  5322.     goto COMBOSTART
  5323. ANALYZE_FINAL:
  5324.     if (%ANALYZELEVEL = %ANALYZEAMOUNT && "%BARB" != "ON") then
  5325.     {
  5326.         put analyze
  5327.         pause 1
  5328.     }
  5329.     if (("$guild" = "Empath") && ("$GH_CONSTRUCT" = "ON")) then gosub ASSESS
  5330.     gosub MANEUVERSTART %_COMBO(%this.attack)
  5331.     math this.attack add 1
  5332.     var ANALYZELEVEL 0
  5333. COMBOSTART:
  5334.     if %this.attack > %_combocount then
  5335.     {
  5336.         var this.attack 0
  5337.         return
  5338.     }
  5339.     if ((%this.attack = %_combocount) && (%ANALYZELEVEL < %ANALYZEAMOUNT)) then goto ANALYZE_FINAL
  5340.     if (("$guild" = "Empath") && ("$GH_CONSTRUCT" = "ON")) then gosub ASSESS
  5341.     gosub MANEUVERSTART %_COMBO(%this.attack)
  5342.     math this.attack add 1
  5343.     goto ComboStart
  5344. MANEUVERSTART:
  5345.     var maneuver $1
  5346. MANEUVER:
  5347.     var LAST MANEUVER
  5348.     matchre FLYING_MONSTER flying far too high to hit with|flying too high for you to attack
  5349.     matchre FATIGUE You're beat|You're exhausted|You're bone-tired|worn-out
  5350.     matchre COMBO_ADVANCE help if you were closer|aren't close enough
  5351.     matchre DEAD_MONSTER balanced\]|balance\]|already dead|very dead|pointlessly hack
  5352.     matchre FACE nothing else|^Face what\?
  5353.     matchre RETURN You are already in a position|But you are already dodging|You move into a position to|Roundtime|must be hidden|What were you|What are you|^You can not slam
  5354.     put %maneuver
  5355.     matchwait 10
  5356.     goto %LAST
  5357. COMBO_ADVANCE:
  5358.     waitforre melee range
  5359.     goto maneuver
  5360. FLYING_MONSTER:
  5361.     if ("%GAG_ECHO" != "YES") then
  5362.     {
  5363.         echo
  5364.         echo *** Monster is flying, trying attack again ***
  5365.         echo
  5366.     }
  5367.     put #beep
  5368.     pause 3
  5369.     goto ATTACK
  5370. HIDE:
  5371.     if (($Stealth.LearningRate > 33 && %BACKSTAB != ON) then RETURN
  5372.     match HIDE fail
  5373.     matchre HIDE1_RETREAT You are too close|notices|reveals|ruining
  5374.     matchre STALK1 You melt|You blend|Eh\?
  5375.     put hide
  5376.     matchwait 15
  5377.     goto STEALTH_ERROR
  5378. HIDE1_RETREAT:
  5379.     put retreat
  5380.     goto HIDE
  5381. STALK1:
  5382.     if %BACKSTAB = ON then return
  5383.     matchre CIRCLE_CHECK reveals|try being out of sight|discovers you|trying to stalk
  5384.     match STALK1 You think|You fail
  5385.     match FACE Stalk what?
  5386.     matchre RETURN You move into position|You are already stalking|You're already stalking
  5387.     put stalk
  5388.     matchwait 15
  5389.     goto STEALTH_ERROR
  5390. CIRCLE_CHECK:
  5391.     if (("%guild" = "Thief") && (%circle >= 50)) then var circle 1
  5392.     goto HIDE
  5393.  
  5394. ASSESS:
  5395.     matchre SET_ASSESS are facing [?:a|an](.*)(?:\(\d\)\s)
  5396.     matchre SET_ASSESS are behind [?:a|an](.*)(?:\(\d\)\s)
  5397.     matchre SET_ASSESS are flanking [?:a|an](.*)(?:\(\d\)\s)
  5398.     put assess
  5399.     matchwait 15
  5400.  
  5401. SET_ASSESS:
  5402.     if matchre ("$1", "\b(%construct)\b") then var Empath_Monster $1
  5403.     else goto FACE
  5404.     eval Empath_Monster replacere("%Empath_Monster",".*\s(\w+)\.?\$", "\$1")
  5405.     return
  5406.  
  5407. ######################################
  5408. ###                                ###
  5409. ### This section is for Magic      ###
  5410. ###                                ###
  5411. ######################################
  5412. 2000:
  5413. 2500:
  5414. 2600:
  5415. 2700:
  5416. 2800:
  5417. 3000:
  5418. 3010:
  5419. 3200:
  5420. var APPRAISAL NO
  5421. if ((toupper("$GH_RETREAT") = "ON") && ("%RETREATING" = "OFF")) then gosub RETREAT_TRIGGERS
  5422. action var FULL_PREP YES when The formation of the target pattern around
  5423. save %c
  5424.  
  5425. MAGIC_PREP:
  5426. var LAST MAGIC_PREP
  5427. if $GH_APPR = YES then gosub APPR_YES
  5428. if toupper("$GH_TEND") = "ON" && $bleeding = 1 then gosub GH_TEND_ON
  5429. if toupper("$GH_ARMOR") = "ON" then gosub GH_ARMOR_ON
  5430. if toupper("$juggernaut.orb") = "YES" then gosub DISARM_ORB
  5431. if $mana < 60 then waiteval $mana >= 60
  5432.     echo
  5433.     echo MAGIC_PREP:
  5434.     echo
  5435.     if ("%SEARCHED" = "NO") then
  5436.     {
  5437.         if matchre ("$roomobjs", "((which|that) appears dead|\(dead\))") then goto DEAD_MONSTER
  5438.     } else var SEARCHED NO
  5439.     put #var GH_HARN_FLAG NO
  5440.         #if ("%MAGIC_TYPE" = "TM") then match MAGIC_TARGET You trace an arcane sigil in the air, shaping the pattern
  5441.     ##check here
  5442.  
  5443.         #matchre MAGIC_TARGET fully prepared|already preparing
  5444.         #match MAGIC_COMBAT have to strain
  5445.     if "%MAGIC_TYPE" = "TM" then goto MAGIC_TARGET
  5446.     put prep $GH_SPELL $GH_MANA
  5447.     ##CHANGE You close TO YOUR SPELL PREP MESSAGING
  5448.     waitforre (%PREP_MESSAGE)
  5449.     if "$1" = "You have to strain" then goto MAGIC_COMBAT
  5450.     if (($GH_HARN != 0) && (toupper("$GH_HARN_FLAG") = "NO")) then gosub MAGIC_HARNESS
  5451.     waitforre ^You feel fully prepared to cast
  5452.     goto MAGIC_CAST
  5453.     #matchwait 20
  5454.     #goto MAGIC_ERROR
  5455.  
  5456. MAGIC_TARGET:
  5457.     var LAST MAGIC_TARGET
  5458.     echo
  5459.     echo MAGIC_TARGET:
  5460.     echo
  5461.     if ("$guild" = "Empath" && "$GH_CONSTRUCT" = "ON" then gosub ASSESS
  5462.         matchre MAGIC_PREP You don't have a spell prepared|You must be preparing a spell
  5463.         matchre MAGIC_FACE_TM not engaged|I could not
  5464.         matchre MAGIC_TARGET_WAIT1 ^You begin to weave mana lines into|You trace a hasty sigil
  5465.         matchre MAGIC_TARGET_WAIT2 don't need to target|^Your target pattern is already formed
  5466.         matchre MAGIC_TARGET_FAIL patterns? dissipates?
  5467.     put target $GH_SPELL $GH_MANA
  5468.     matchwait 15
  5469.     goto MAGIC_ERROR
  5470.  
  5471. MAGIC_TARGET_WAIT1:
  5472.     if (($GH_HARN != 0) && (toupper("$GH_HARN_FLAG") = "NO")) then gosub MAGIC_HARNESS
  5473.     if ("$GH_SNAP" = "ON") then
  5474.     {
  5475.         if ($GH_SNAP_PAUSE > 0) then pause $GH_SNAP_PAUSE
  5476.         goto MAGIC_CAST
  5477.     }
  5478.     if ("%FULL_PREP" = "YES") then goto MAGIC_CAST
  5479.         matchre MAGIC_CAST ^Your formation of a targeting pattern around|^Your target pattern has finished forming around
  5480.         matchre TARGET_FAIL patterns? dissipates?
  5481.         matchre MAGIC_DEATH ^You gesture|You reach
  5482.     matchwait 30
  5483.     goto MAGIC_ERROR
  5484.  
  5485. MAGIC_TARGET_WAIT2:
  5486.     if ($GH_HARN != 0) then gosub MAGIC_HARNESS
  5487.     if ("$GH_SNAP" = "ON") then
  5488.     {
  5489.         if ($GH_SNAP_PAUSE > 0) then pause $GH_SNAP_PAUSE
  5490.         goto MAGIC_CAST
  5491.     }
  5492.     goto MAGIC_CAST
  5493.  
  5494. MAGIC_TARGET_FAIL:
  5495.     if ("%MAGIC" = "ON") then goto MAGIC_COMBAT
  5496.     put release
  5497.     goto PREP
  5498.  
  5499. MAGIC_HARNESS:
  5500.     echo
  5501.     echo MAGIC_HARNESS:
  5502.     echo
  5503.     put #var GH_HARN_FLAG YES
  5504.         matchre MAGIC_HARNESS_DONE ^You tap into the mana from|^You strain, but cannot harness
  5505.     put harness $GH_HARN
  5506.     matchwait 15
  5507.     goto MAGIC_ERROR
  5508.  
  5509. MAGIC_HARNESS_DONE:
  5510.     pause 0.5
  5511.     return
  5512.  
  5513. MAGIC_FACE_TM:
  5514.     pause 5
  5515.     var LAST MAGIC_FACE_TM
  5516.     echo
  5517.     echo MAGIC_FACE_TM:
  5518.     echo
  5519.     match MAGIC_TARGET You turn
  5520.     matchre MAGIC_FACE_TM There is nothing|Face what\?
  5521.     put face next
  5522.     matchwait 15
  5523.     goto MAGIC_ERROR
  5524.  
  5525. MAGIC_TM_ADV:
  5526.     var LAST MAGIC_TM_ADV
  5527.         match MAGIC_FACE_TM You stop advancing
  5528.         match MAGIC_FACE_TM2 advance towards
  5529.         match MAGIC_FACE_TM You have lost sight
  5530.         matchre MAGIC_TARGET to melee range|\[You're|already at melee|begin
  5531.     put advance
  5532.     matchwait 15
  5533.     goto MAGIC_ERROR
  5534.  
  5535. MAGIC_FACE_TM2:
  5536.     put release spell
  5537.     goto FACE
  5538.  
  5539. MAGIC_CAST:
  5540.     var LAST MAGIC_CAST
  5541.     echo
  5542.     echo MAGIC_CAST:
  5543.     echo
  5544.     var FULL_PREP NO
  5545.         matchre MAGIC_DEATH You gesture|You reach|Roundtime
  5546.         match MAGIC_DEATH_REL because your target is dead
  5547.         match MAGIC_COMBAT You are unable to harness
  5548.         match MAGIC_FACE_TM on yourself!
  5549.         match MAGIC_PREP You don't
  5550.         match MAGIC_FACE_TM2 There is nothing else to face!
  5551.         matchre TARGET_FAIL patterns? dissipates?
  5552.     put cast
  5553.     matchwait 15
  5554.     goto MAGIC_ERROR
  5555.  
  5556. TARGET_FAIL:
  5557.     if ("%GAG_ECHO" != "YES") then
  5558.     {
  5559.         echo
  5560.         echo ***  TARGET_FAIL:  ***
  5561.         echo Failed to target magically
  5562.         echo Re-prepping and trying again
  5563.         echo
  5564.     }
  5565.     put release
  5566.     goto %c
  5567.  
  5568. MAGIC_DEATH_REL:
  5569.     put release spell
  5570.     wait
  5571.     goto DEAD_MONSTER
  5572.  
  5573. MAGIC_DEATH:
  5574.     if ("%MAGIC" = "ON") then goto MAGIC_COMBAT
  5575.     gosub COMBAT_COMMAND MAGIC_WAIT
  5576.     var LAST MAGIC_DEATH
  5577.     if matchre ("$roomobjs", "((which|that) appears dead|\(dead\))") then goto DEAD_MONSTER
  5578.     else goto EXPCHECK_$GH_TRAIN
  5579.  
  5580. MAGIC_COMBAT:
  5581.     pause
  5582.     put release spell
  5583.     if ("%GAG_ECHO" != "YES") then
  5584.     {
  5585.         echo
  5586.         echo *** MAGIC_COMBAT: ***
  5587.         echo
  5588.     }
  5589.     counter subtract 2000
  5590.     if ("%RETREATING" = "ON") then gosub RETREAT_UNTRIGGERS
  5591.     goto %c
  5592.  
  5593. ######################################
  5594. ###                                ###
  5595. ### End of Magics                  ###
  5596. ###                                ###
  5597. ######################################
  5598.  
  5599. RANGED_CLEAN:
  5600.     if ("%GAG_ECHO" != "YES") then
  5601.     {
  5602.         echo
  5603.         echo *** RANGED_CLEAN ***
  5604.         echo
  5605.     }
  5606.     if (("%SHIELD" != "NONE" && ("$lefthandnoun" = "%SHIELD")) then
  5607.     {
  5608.         gosub UNEQUIP_SHIELD
  5609.     }
  5610.     if "%AMMO" = "basilisk head arrow" then put stow basilisk arrow
  5611.     else
  5612.     put stow %AMMO
  5613.     put retreat
  5614.     pause
  5615.         matchre RANGED_CLEAN_DONE You get some|You get a|You are already holding |You must unload|You stop as you realize|^Stow what
  5616.         matchre RANGED_CLEAN You pick up|You pull
  5617.     if "%AMMO" = "basilisk head arrow" then put stow basilisk arrow
  5618.     else
  5619.     put stow %AMMO
  5620.     matchwait 15
  5621.     goto CLEANING_ERROR
  5622.  
  5623. RANGED_CLEAN_DONE:
  5624.     if "%AMMO" = "basilisk head arrow" then put stow basilisk arrow
  5625.     else
  5626.     put stow %AMMO
  5627.     if (("%SHIELD" != "NONE" && ("$lefthand" = "Empty")) then
  5628.     {
  5629.         gosub EQUIP_SHIELD
  5630.     }
  5631.     return
  5632.  
  5633. THROWN_CLEAN:
  5634.     if ("%GAG_ECHO" != "YES") then
  5635.     {
  5636.         echo
  5637.         echo *** THROWN_CLEAN ***
  5638.         echo
  5639.     }
  5640.     put put my %CURR_WEAPON in my %T_SHEATH
  5641.     put retreat
  5642.     pause
  5643.         matchre THROWN_CLEAN_DONE You get some|You get a|You are already holding
  5644.         matchre THROWN_CLEAN You pick up|You pull
  5645.     put get %CURR_WEAPON
  5646.     matchwait 15
  5647.     goto CLEANING_ERROR
  5648.  
  5649. THROWN_CLEAN_DONE:
  5650.     put put my %CURR_WEAPON in my %T_SHEATH
  5651.     return
  5652.  
  5653. WEBBED:
  5654.     if ("%GAG_ECHO" != "YES") then
  5655.     {
  5656.         echo
  5657.         echo *** You have been webbed ***
  5658.         echo
  5659.     }
  5660.     var WEBBED YES
  5661.     action remove eval $webbed = 1
  5662.     action var WEBBED NO when move freely again|free yourself from the webbing\.
  5663.     put #beep
  5664.     if $webbed = 0 then
  5665.     {
  5666.     var WEBBED NO
  5667.     action goto WEBBED when eval $webbed = 1
  5668.     goto %LAST
  5669.     }
  5670.     if ("%WEBBED" = "YES") then
  5671.     {
  5672.         waitforre move freely again|free yourself from the webbing\.
  5673.     }
  5674.     action goto WEBBED when eval $webbed = 1
  5675.     goto %LAST
  5676.  
  5677. STAND:
  5678.     pause 1
  5679.     if ("$standing = 0") then
  5680.     {
  5681.         echo
  5682.         echo *** Knocked down, standing back up ***
  5683.         echo
  5684.     }
  5685.     var GO_BACK %LAST
  5686. STANDING:
  5687.     if ("$standing" = "0") then
  5688.     {
  5689.     var LAST STANDING
  5690.         matchre STANDING cannot manage to stand|The weight of all your possessions|still stunned
  5691.         matchre %GO_BACK ^You stand|^You are already standing
  5692.     put stand
  5693.     matchwait 15
  5694.     goto ERROR
  5695.     }
  5696.  
  5697. FATIGUE:
  5698.     if ("%GAG_ECHO" != "YES") then
  5699.         {
  5700.         echo
  5701.         echo *** FATIGUE: ***
  5702.         echo
  5703.         }
  5704.     if (("%THROWN" = "ON") && matchre("$roomobjs", "%CURR_WEAPON")) then
  5705.         {
  5706.         pause 1
  5707.         put get %CURR_WEAPON
  5708.         waitforre You pick up|You get|You are
  5709.         }
  5710.     var LAST FATIGUE
  5711.     matchre FATIGUE \[You're|You stop advancing
  5712.     match FATIGUE_CHECK You cannot back away from a chance to continue your slaughter!
  5713.     match FATIGUE_CHECK You bob
  5714.     put bob
  5715.     matchwait 40
  5716.     goto FATIGUE_CHECK
  5717.  
  5718. FATIGUE_CHECK:
  5719.     if ("%GAG_ECHO" != "YES") then
  5720.     {
  5721.         echo
  5722.         echo *** FATIGUE_CHECK: ***
  5723.         echo
  5724.     }
  5725.     if ($stamina < 80) then
  5726.     {
  5727.         goto FATIGUE_WAIT
  5728.     } else
  5729.     {
  5730.         goto %c
  5731.     }
  5732.  
  5733. FATIGUE_WAIT:
  5734.     if ("%GAG_ECHO" != "YES") then
  5735.     {
  5736.  
  5737.         echo
  5738.         echo *** FATIGUE_WAIT: ***
  5739.         echo
  5740.     }
  5741.         matchre FATIGUE You feel fully rested|melee|pole|\[You're
  5742.     matchwait
  5743.  
  5744. MANIPULATE1:
  5745.     send manipulate friendship first $manipulate1
  5746.     matchre return ^You strain, but cannot extend your will any further|^You extend your will and attempt to Empathically manipulate .+, but you cannot find any purchase\.
  5747.     matchwait 1
  5748.     send manipulate friendship second $manipulate1
  5749.     matchre return ^You strain, but cannot extend your will any further|^You extend your will and attempt to Empathically manipulate .+, but you cannot find any purchase\.
  5750.     matchwait 1
  5751.     wait
  5752.     send manipulate friendship first $manipulate2
  5753.     matchre return ^You strain, but cannot extend your will any further|^You extend your will and attempt to Empathically manipulate .+, but you cannot find any purchase\.|^Manipulate what
  5754.     wait
  5755.     send manipulate friendship second $manipulate2
  5756.     matchre return ^You strain, but cannot extend your will any further|^You extend your will and attempt to Empathically manipulate .+, but you cannot find any purchase\.|^Manipulate what
  5757.     wait
  5758.     return
  5759.  
  5760. DEBNISSA:
  5761.     var nissacount 0
  5762.     action var nissadone yes when ^You feel fully prepared to cast your spell
  5763. DEBNISSACAST:
  5764.     var nissadone no
  5765.     if %nissacount > 4 then
  5766.     {
  5767.     var nissa_time %t
  5768.     math nissa_time add 120
  5769.     return
  5770.     }
  5771.     if $mana < 65 then
  5772.     {
  5773.     var nissa_time %t
  5774.     math nissa_time add 120
  5775.     return
  5776.     }
  5777.     send prep nb
  5778.     matchre DEBNISSACAST1 ^With tense movements you prepare your body for the
  5779.     matchwait 2
  5780. DEBNISSACAST1:
  5781.     send harness %nissaharness
  5782.     pause
  5783.     send harness %nissaharness
  5784.     pause
  5785.     if %nissadone = no then waiteval %nissadone = yes
  5786.     send cast creature
  5787.     waitforre ^The soothing wave sweeps over the area to encompass
  5788.     math nissacount add 1
  5789.     goto DEBNISSACAST
  5790.  
  5791. TMPARALYSIS:
  5792.     if $mana < 30 then waiteval $mana >= 30
  5793.     send target para %PARAMANA
  5794.     matchre TMPARALYSIS_CAST1 ^You begin to weave mana lines into a target pattern around
  5795.     matchre TMPARALYSIS_END1 ^I could not find what you were referring to
  5796.     matchwait 2
  5797. TMPARALYSIS_CAST1:
  5798.     waitforre ^Your formation of a targeting pattern
  5799.     send cast
  5800. TMPARALYSIS_END1:
  5801.     pause 1
  5802.     send release all
  5803.     return
  5804. TMPARALYSIS_CAST2:
  5805.     pause
  5806.     send harness 6
  5807.     waitforre ^The formation of the target pattern around.+has completed
  5808.     send cast
  5809.     matchre TMPARALYSIS_END2 ^A stream of translucent, golden energy shoots from the palm of your hand towards
  5810.     matchre TMPARALYSIS_NEXT ^Your secondary spell pattern dissipates because your target is dead|^Your patterns dissipate because your target is no longer in range
  5811.     matchwait 2
  5812. TMPARALYSIS_NEXT:
  5813.     math paralysis.index add 1
  5814.     pause
  5815.     goto TMPARALYSIS
  5816. TMPARALYSIS_END2:
  5817.     pause
  5818.     math paralysis.index add 1
  5819.     goto TMPARALYSIS
  5820. TMPARALYSIS_FAIL:
  5821.     send release all
  5822.     waitforre ^You aren't harnessing any mana|^You aren't holding any mana|^You aren't preparing a spell|^You have no cyclic spell active to release|^You let your concentration lapse and feel the spell's energies dissipate|^You release the mana you were holding
  5823.     return
  5824.  
  5825. ######################################
  5826. ###                                ###
  5827. ###      Dead monster routines     ###
  5828. ###                                ###
  5829. ######################################
  5830. DEAD_MONSTER:
  5831.     pause 1
  5832.     gosub clear
  5833.     match clear
  5834.     var SEARCHED YES
  5835.     var APPRAISED NO
  5836.     var LAST DEAD_MONSTER
  5837.     if $GH_ANALYZE = ON then var ANALYZELEVEL 1
  5838.     if ("%BACKSTAB" = "ON") then
  5839.     {
  5840.  
  5841.         counter set 1300
  5842.         save 1300
  5843.     }
  5844.     if ("%RETREATING" = "ON") then gosub RETREAT_UNTRIGGERS
  5845.     if ("%THROWN" = "ON") then
  5846.     {
  5847.         if ((("%HAND" = "") && ("$righthand" = "Empty")) || (("%HAND" = "left") && ("$lefthand" = "Empty"))) then gosub GET_THROWN
  5848.     }
  5849.     if ("%GAG_ECHO" != "YES") then
  5850.     {
  5851.         echo
  5852.         echo *** DEAD_MONSTER: ***
  5853.         echo
  5854.     }
  5855.     var LOCAL $GH_KILLS
  5856.     math LOCAL add 1
  5857.     put #var GH_KILLS %LOCAL
  5858.     if matchre ("$roomobjs", "(%ritualcritters) ((which|that) appears dead|\(dead\))") then
  5859.     {
  5860.     var Monster $1
  5861.     if ("$roomplayers" = "" && "$GH_NECRORITUAL" != "OFF") || ("$roomplayers" = "" "$GH_NECROHEAL" = "ON") then goto PERFORM_RITUAL
  5862.     }
  5863.     NECRO_RETURN:
  5864.     if ("%SHIELD" != "NONE") then
  5865.     {
  5866.         if ("$lefthand" = "Empty") then
  5867.         {
  5868.             gosub EQUIP_SHIELD
  5869.         }
  5870.     }
  5871.     if matchre ("$roomobjs", "(%skinnablecritters) ((which|that) appears dead|\(dead\))") then goto SKIN_MONSTER_$GH_SKIN
  5872.     if matchre ("$roomobjs", "(which|that) appears dead|\(dead\)") then goto SEAR_MONSTER
  5873.     goto NO_MONSTER
  5874.  
  5875. ######################################
  5876. ###                                ###
  5877. ###        Skinning routines       ###
  5878. ###                                ###
  5879. ######################################
  5880. SKIN_MONSTER_ON:
  5881. action remove eval $bleeding = 1
  5882.     var Monster $1
  5883.     if (toupper("$GH_SKIN_RET") = "ON") && ("%RETREATING" = "OFF")) then gosub RETREAT_TRIGGERS
  5884. SKIN_MONSTER:
  5885.     var LAST SKIN_MONSTER
  5886.     pause 1
  5887.     if ("%GAG_ECHO" != "YES") then
  5888.     {
  5889.         echo
  5890.         echo *** SKIN_MONSTER: ***
  5891.         echo
  5892.     }
  5893.     if ("%SHIELD" != "NONE") then
  5894.     {
  5895.         if ("$lefthand" != "Empty") then
  5896.         {
  5897.             gosub UNEQUIP_SHIELD
  5898.         }
  5899.     }
  5900.     goto GET_KNIFE
  5901. PERFORM_RITUAL:
  5902.     var GOING_TO PERFORM_RITUAL_2
  5903.     if $mana > 80 && "$GH_NECROHEAL" = "ON" then gosub health_check
  5904. PERFORM_RITUAL_2:
  5905.     if "$GH_NECRORITUAL" = "OFF" then goto NECRO_RETURN
  5906.     if toupper("$GH_NECRORITUAL") = "HARVEST" && ("%SHIELD" != "NONE") then
  5907.     {
  5908.         if ("$lefthand" != "Empty") then
  5909.         {
  5910.             gosub UNEQUIP_SHIELD
  5911.         }
  5912.     }
  5913.     if (toupper("$GH_NECRORITUAL") = "ARISE") || (toupper("$GH_NECRORITUAL") = "HARVEST") then
  5914.     {
  5915.     put perform preserve on %Monster
  5916.     pause .5
  5917.     pause .5
  5918.     }
  5919.     put Perform $GH_NECRORITUAL on %Monster
  5920.     pause .5
  5921.     pause .5
  5922.     if "$righthandnoun" = "material" || "$lefthandnoun" = "material" then put drop material
  5923.    pause .5
  5924.     goto NECRO_RETURN
  5925.  
  5926.         GET_KNIFE:
  5927.         var LAST GET_KNIFE
  5928.         if ("%BELT_WORN" = "OFF") then
  5929.         {
  5930.             if ("%EMPTY_HANDED" != "ON") then
  5931.             {
  5932.                 if ("%RANGED" = "ON") then gosub RANGE_SHEATHE %CURR_WEAPON
  5933.                 else gosub SHEATHE %CURR_WEAPON
  5934.             }
  5935.             if ("$righthand" != "Empty") then gosub SHEATHE $righthandnoun
  5936.             if ("$lefthand" != "Empty") then gosub SHEATHE $lefthandnoun
  5937.             gosub WIELD_WEAPON knife
  5938.         }
  5939.         var LAST SKINNING
  5940.     ARRANGE_CHECK:
  5941.         if (toupper("$GH_ARRANGE") = "ON") then
  5942.         {
  5943.             var NUM_ARRANGES 0
  5944.             goto ARRANGE_KILL
  5945.         }
  5946.     SKINNING:
  5947.             action put #math GH_SKINS add 1 when into your bundle\.$
  5948.             matchre SKINNING ^You approach
  5949.             matchre DROPPED_SKINNER ^You'll need to have a bladed instrument
  5950.             matchre BUNDLE_OFF ^You must have one hand free to skin.
  5951.             matchre SKIN_FAIL ^Some days it just doesn't pay to wake up|^A heartbreaking slip at the last moment renders your chances|manage to slice it to dripping tatters|You bumble the attempt|but only succeed in reducing|but end up destroying|You fumble and make an improper cut|Maybe helping little old Halfling widows across a busy Crossing street|You claw|twists and slips in your grip|^There isn't another|^Living creatures often object|Skin what\?|^Somehow managing to do EVERYTHING|^You hide|cannot be skinned
  5952.             matchre SKIN_KNIFE_SHEATH into your bundle\.$
  5953.             matchre SKIN_CHECK Roundtime
  5954.         put skin
  5955.         matchwait 15
  5956.         goto SKIN_ERROR
  5957. SKIN_CHECK:
  5958.     if (matchre("$lefthand","%CURR_WEAPON") && ("%EXP2" = "Offhand_Weapon")) then
  5959.     {
  5960.     gosub SHEATHE %CURR_WEAPON
  5961.     gosub SWAP_LEFT
  5962.     }
  5963.     if ("$lefthand" != "Empty") then goto SCRAPE_$GH_SCRAPE
  5964.     if "%WEAPON_EXP" = "Brawling" && "%BELT_WORN" = "ON" && "$righthand" != "Empty" then
  5965.     {
  5966.     gosub SWAP_LEFT
  5967.     goto SCRAPE_$GH_SCRAPE
  5968.     }
  5969. SKIN_FAIL:
  5970.     if ("%GAG_ECHO" != "YES") then
  5971.     {
  5972.         echo
  5973.         echo *** SKIN_FAIL ***
  5974.         echo Skinning failed
  5975.         echo
  5976.     }
  5977.     goto SKIN_KNIFE_SHEATH
  5978. DROPPED_SKINNER:
  5979.     if ("%GAG_ECHO" != "YES") then
  5980.     {
  5981.         echo
  5982.         echo *** Dropped your skinning knife ***
  5983.         echo
  5984.     }
  5985.     pause 1
  5986.     put get knife
  5987.     goto SKINNING
  5988.  
  5989. ARRANGE_KILL:
  5990.     var ArrangeFail 0
  5991.     if ("%GAG_ECHO" != "YES") then
  5992.     {
  5993.         echo
  5994.         echo *** ARRANGE_KILL: ***
  5995.         echo
  5996.     }
  5997. ARRANGING:
  5998.     math NUM_ARRANGES add 1
  5999.     if (%NUM_ARRANGES > $MAX_ARRANGE) then goto SKINNING
  6000.     var LAST ARRANGING
  6001. ARRANGEONLY:
  6002.     matchre SKIN_FAIL corpse is worthless now|Arrange what|^You might want to kill it first|so you can't arrange it either
  6003.     matchre ARRANGING Roundtime|has already been arranged as much as you can manage|You complete arranging
  6004.     matchre ARRANGEFAIL That creature cannot produce
  6005.     if $GH_ARRANGE_ALL = ON && %ArrangeFail = 0 then put arrange all for $GH_SKINPART
  6006.     else if $GH_ARRANGE_ALL = ON && %ArrangeFail = 1 then put arrange all
  6007.     else if $GH_ARRANGE_ALL = OFF && %ArrangeFail = 0 then put arrange for $GH_SKINPART
  6008.     else if $GH_ARRANGE_ALL = OFF && %ArrangeFail = 1 then put arrange
  6009.     matchwait 4
  6010.     goto %LAST
  6011. ARRANGEFAIL:
  6012.     var ArrangeFail 1
  6013.     goto ARRANGEONLY
  6014.  
  6015. SCRAPE_ON:
  6016.     if ($Mechanical_Lore.LearningRate >= 34) then goto SCRAPE_OFF
  6017.     if ("%GAG_ECHO" != "YES") then
  6018.     {
  6019.         echo
  6020.         echo *** SCRAPE_ON: ***
  6021.         echo
  6022.     }
  6023.     var LAST SCRAPE_ON
  6024.     put loot $GH_SEARCH
  6025.     if matchre ("$lefthand", "skin|pelt|hide") then goto SCRAPING
  6026.     goto SCRAPE_OFF
  6027.     SCRAPING:
  6028.         var SKIN $0
  6029.         gosub SHEATHE $righthandnoun
  6030.         put loot $GH_SEARCH
  6031.     GET_SCRAPER:
  6032.         var LAST GET_SCRAPER
  6033.             matchre SCRAPE_CONT You get|You are already hold
  6034.             match SCRAPE_OFF What were you referring to?
  6035.         put get my scraper
  6036.         matchwait 15
  6037.         goto SKIN_ERROR
  6038.     SCRAPE_CONT:
  6039.         var LAST SCRAPE_CONT
  6040.             matchre SCRAPE_CONT cleaning some dirt and debris from it|you snag the scraper
  6041.             matchre SCRAPE_DONE Your %SKIN has been completely cleaned|going to help anything|looks as clean as you can make it.
  6042.         put scrape %SKIN with scraper quick
  6043.         matchwait 15
  6044.         goto SKIN_ERROR
  6045.     SCRAPE_DONE:
  6046.         put stow scraper
  6047.         waitfor You put
  6048.  
  6049. SCRAPE_OFF:
  6050.     goto BUNDLE_$GH_BUN
  6051.  
  6052. BUNDLE_ON:
  6053.     if ("%GAG_ECHO" != "YES") then
  6054.     {
  6055.         echo
  6056.         echo *** BUNDLE_ON: ***
  6057.         echo
  6058.     }
  6059.     var LOCAL $GH_SKINS
  6060.     math LOCAL add 1
  6061.     put #var GH_SKINS %LOCAL
  6062.     var LAST BUNDLE_ON
  6063.         match HAVE_ONE You tap
  6064.         match CHECK_ROPE I could not find what you were
  6065.     put tap bundle
  6066.     matchwait 15
  6067.     goto SKIN_ERROR
  6068. CHECK_ROPE:
  6069.     var LAST CHECK_ROPE
  6070.         match GET_ROPE You tap
  6071.         match NO_MORE_ROPE I could not find
  6072.     ##CHECK HERE
  6073.     put tap bundling rope
  6074.     matchwait 15
  6075.     goto SKIN_ERROR
  6076. NO_MORE_ROPE:
  6077.     if ("%GAG_ECHO" != "YES") then
  6078.     {
  6079.         echo
  6080.         echo *** No more rope for bundling ***
  6081.         echo
  6082.     }
  6083.     put #var GH_BUN OFF
  6084.     goto BUNDLE_OFF
  6085. GET_ROPE:
  6086.     var LAST GET_ROPE
  6087.     pause 1
  6088.     if ("$righthandnoun" != "Empty") then gosub SHEATHE $righthandnoun
  6089. GET_ROPE_CONT:
  6090.     ##CHECK HERE
  6091.     put get my bundling rope
  6092.     waitfor You get
  6093.     put bundle
  6094.     pause 1
  6095.     if toupper("$GH_TIE") = "ON" then gosub TIE_BUNDLE
  6096.     if toupper("$GH_WEAR") = "ON" then gosub WEAR_BUNDLE
  6097.     else
  6098.     {
  6099.     put drop bundle
  6100.     waitfor You drop
  6101.     }
  6102.     goto SKIN_REEQUIP
  6103. TIE_BUNDLE:
  6104. matchre TIE_BUNDLE ^Once you've
  6105. matchre return ^Using the
  6106. put tie my bundle
  6107. matchwait
  6108. HAVE_ONE:
  6109.     if ("$righthandnoun" != "Empty") then gosub SHEATHE $righthandnoun
  6110.     if ("$lefthand" = "Empty") then goto SKIN_ERROR
  6111.     put get bundle
  6112.     if toupper("$GH_WEAR") = "OFF" then put remove bundle
  6113.     waitforre You pick|You sling|You remove|But that is
  6114.     matchre TOO_HEAVY Time to start a new bundle|You try to stuff your
  6115.     matchre HAVE_ONE_CONT You stuff|not going to work|You carefully fit
  6116.     if toupper("$GH_WEAR") = "ON" then
  6117.     {
  6118.         put put my $lefthandnoun in my bundle
  6119.     }
  6120.     else
  6121.     {
  6122.         put put my $lefthandnoun in bundle
  6123.     }
  6124.     matchwait 15
  6125.     goto SKIN_ERROR
  6126. TOO_HEAVY:
  6127.     var LAST TOO_HEAVY
  6128.         match CHECK_ROPE You drop
  6129.         match GET_ROPE But you aren't holding that.
  6130.     put drop bundle
  6131.     matchwait 15
  6132.     goto SKIN_ERROR
  6133. HAVE_ONE_CONT:
  6134.     if toupper("$GH_WEAR") = "ON" && ("$righthandnoun" = "bundle" || "$lefthandnoun" = "bundle" then gosub WEAR_BUNDLE
  6135.     if toupper("$GH_WEAR") = "OFF" then
  6136.     {
  6137.         put drop bundle
  6138.         waitfor You drop
  6139.     }
  6140.     if ("%EMPTY_HANDED" = "ON") then goto SKIN_REEQUIP_DONE
  6141.     else goto SKIN_REEQUIP
  6142. WEAR_BUNDLE:
  6143. matchre PULL_BUNDLE ^You can't wear
  6144. matchre return ^You put|^You attach|^You sling|^You drape|^You are already wearing
  6145. put wear my bundle
  6146. matchwait 5
  6147. goto SKIN_ERROR
  6148.  
  6149. PULL_BUNDLE:
  6150. matchre WEAR_BUNDLE_OFF over your shoulder\.$
  6151. matchre WEAR_BUNDLE around your waist\.$|on your back\.$|attached to your belt\.$|around your shoulders\.$
  6152. put pull my bundle
  6153. matchwait 5
  6154. goto SKIN_ERROR
  6155.  
  6156. WEAR_BUNDLE_OFF:
  6157. echo
  6158. echo *** CAN'T FIND LOCATION TO WEAR BUNDLE
  6159. echo *** WEAR_BUNDLE_OFF ***
  6160. echo
  6161. put #var GH_WEAR OFF
  6162. put drop my bundle
  6163. return
  6164.  
  6165. BUNDLE_OFF:
  6166.     if ("%GAG_ECHO" != "YES") then
  6167.     {
  6168.  
  6169.         echo
  6170.         echo *** BUNDLE_OFF ***
  6171.         echo
  6172.     }
  6173.     var LOCAL $GH_SKINS
  6174.     math LOCAL add 1
  6175.     put #var GH_SKINS %LOCAL
  6176.     if ("$lefthand" != "Empty") then put empty left
  6177.     pause 1
  6178. SKIN_KNIFE_SHEATH:
  6179.     var LAST SKIN_KNIFE_SHEATH
  6180.     action remove into your bundle\.$
  6181.     if ("$righthandnoun" = "knife") then gosub SHEATHE knife
  6182.     goto SKIN_REEQUIP
  6183.  
  6184. SKIN_REEQUIP:
  6185.     var LAST SKIN_REEQUIP
  6186.     if ("%EMPTY_HANDED" != "ON") then
  6187.     {
  6188.         if ("$righthand" = "Empty") then gosub WIELD_WEAPON %CURR_WEAPON
  6189.         if (("%HAND" = "left") && ("$righthand" != "Empty")) then gosub SWAP_LEFT $righthandnoun
  6190.     }
  6191.     if ("%SHIELD" != "NONE") then
  6192.     {
  6193.         if ("$lefthand" = "Empty") then
  6194.         {
  6195.             gosub EQUIP_SHIELD
  6196.         }
  6197.     }
  6198.     if ("%RETREATING" = "ON") then gosub RETREAT_UNTRIGGERS
  6199.     goto SKIN_REEQUIP_DONE
  6200.  
  6201. ######################################
  6202. ###                                ###
  6203. ###        Looting routines        ###
  6204. ###                                ###
  6205. ######################################
  6206. SKIN_MONSTER_OFF:
  6207. SEAR_MONSTER:
  6208.     var Monster $1
  6209. SKIN_REEQUIP_DONE:
  6210.     pause 1
  6211.     gosub clear
  6212.     if ("%GAG_ECHO" != "YES") then
  6213.     {
  6214.         echo
  6215.         echo *** SEAR_MONSTER: ***
  6216.         echo
  6217.     }
  6218.     var LAST SKIN_REEQUIP_DONE
  6219.         matchre TIMER_$GH_TIMER ^I could not find what|not dead
  6220.         matchre SEARCH_OTHER_MONSTER ^Sheesh
  6221.         matchre LOOT_$GH_LOOT ^You search|^You shove your arm|^Roundtime|picked clean of anything|^You should probably wait until|has already been searched
  6222. ##CHECK HERE JUST LOOT
  6223.     put loot $GH_SEARCH
  6224.     matchwait 30
  6225.     goto LOOT_ERROR
  6226.  
  6227. LOOT_OFF:
  6228.     if ("%GAG_ECHO" != "YES") then
  6229.     {
  6230.         echo
  6231.         echo *** Not looting ***
  6232.         echo
  6233.     }
  6234.     goto LOOT_DONE
  6235.  
  6236. LOOT_ON:
  6237.     if ("%GAG_ECHO" != "YES") then
  6238.     {
  6239.         echo
  6240.         echo *** Looting ***
  6241.         echo
  6242.     }
  6243.     var LAST LOOT_ON
  6244.     if ("%SHIELD" != "NONE") then
  6245.     {
  6246.         if ("$lefthand" != "Empty") then
  6247.         {
  6248.             gosub UNEQUIP_SHIELD
  6249.         }
  6250.     }
  6251.     goto LOOT_BOX_$GH_LOOT_BOX
  6252.  
  6253. LOOT_BOX_ON:
  6254.     if matchre ("$roomobjs", "(%boxtype) (%boxes)") then goto GET_BOX
  6255. LOOT_BOX_OFF:
  6256.     goto LOOT_GEM_$GH_LOOT_GEM
  6257.  
  6258. LOOT_GEM_ON:
  6259.     goto STOW_GEM
  6260. LOOT_GEM_OFF:
  6261.     goto LOOT_COLLECTIBLE_$GH_LOOT_COLL
  6262.  
  6263. LOOT_COLLECTIBLE_ON:
  6264.     if matchre ("$roomobjs", "\b(%collectibles)\b") then goto GET_COLLECTIBLE
  6265. LOOT_COLLECTIBLE_OFF:
  6266.     goto LOOT_COIN_$GH_LOOT_COIN
  6267.  
  6268. LOOT_COIN_ON:
  6269.     if matchre ("$roomobjs", "(coin|coins)") then goto GET_COIN
  6270. LOOT_COIN_OFF:
  6271.     goto LOOT_JUNK_$GH_LOOT_JUNK
  6272.  
  6273. LOOT_JUNK_ON:
  6274.     if matchre ("$roomobjs", "(%junkloot)") then goto GET_JUNK
  6275. LOOT_JUNK_OFF:
  6276.     goto NO_LOOT
  6277.  
  6278. GET_BOX:
  6279.     var BOX $0
  6280.     var LOOTED YES
  6281. STOW_BOX:
  6282.     var LAST STOW_BOX
  6283.         matchre NO_MORE_ROOM_BOX any more room in|^Stow what|^You just can't get|^But that's closed
  6284.         matchre LOOT_BOX_ON ^You put your
  6285.     put stow box
  6286.     matchwait 30
  6287.     goto LOOT_ERROR
  6288.  
  6289. NO_MORE_ROOM_BOX:
  6290.     if matchre ("$righthandnoun", "(%boxes)") then put empty right
  6291.     else put empty left
  6292.     waitforre ^You drop|^What were you|is already empty
  6293.     put #var GH_LOOT_BOX OFF
  6294.     put #Beep
  6295.     goto LOOT_GEM_$GH_LOOT_GEM
  6296.  
  6297. STOW_GEM:
  6298.     var LAST STOW_GEM
  6299.         matchre END_GEM ^Stow what
  6300.         matchre NO_MORE_ROOM_GEM any more room in|^You just can't get|^But that's closed|^You think the
  6301.         matchre LOOT_GEM_ON ^You put your|^You open your
  6302.     send stow gem
  6303.     matchwait 30
  6304.     goto LOOT_ERROR
  6305.  
  6306. NO_MORE_ROOM_GEM:
  6307.     if contains("$lefthand","%CURR_WEAPON") then
  6308.     {
  6309.     send drop my $righthandnoun
  6310.     waitforre ^You drop|^What were you
  6311.     }
  6312.     if contains("$righthand","%CURR_WEAPON") then
  6313.     {
  6314.     send drop my $lefthandnoun
  6315.     waitforre ^You drop|^What were you
  6316.     }
  6317.     if toupper("$GH_POUCH") = "ON" then goto SWAP_POUCH
  6318.     put #var GH_LOOT_GEM OFF
  6319. END_GEM:
  6320.     goto LOOT_COIN_$GH_LOOT_COIN
  6321.  
  6322. SWAP_POUCH:
  6323. put remove my %GEM_CONTAINER
  6324. wait
  6325. put put my %GEM_CONTAINER in my %POUCH_CONTAINER
  6326. wait
  6327. matchre NO_POUCH ^What were
  6328. matchre WEAR_POUCH ^You get
  6329. put get my %GEM_CONTAINER
  6330. matchwait
  6331.  
  6332. WEAR_POUCH:
  6333. put wear my %GEM_CONTAINER
  6334. goto LOOT_ON
  6335.  
  6336. NO_POUCH:
  6337. echo No more pouches
  6338. put #var GH_POUCH OFF
  6339. put #var GH_LOOT_GEM OFF
  6340. goto LOOT_COIN_$GH_LOOT_COIN
  6341.  
  6342. GET_COLLECTIBLE:
  6343.     var ITEM $0
  6344.     var LOOTED YES
  6345. STOW_COLLECTIBLE:
  6346.     var LAST STOW_COLLECTIBLE
  6347.         matchre NO_MORE_ROOM_COLLECTIBLE any more room in|^Stow what|^You just can't get|^But that's closed
  6348.         matchre LOOT_COLLECTIBLE_ON ^You put your
  6349.     put stow %ITEM
  6350.     matchwait 30
  6351.     goto LOOT_ERROR
  6352.  
  6353. NO_MORE_ROOM_COLLECTIBLE:
  6354.     if matchre ("$righthandnoun", "(%collectibles)") then put empty right
  6355.     else put empty left
  6356.     waitforre ^You drop|^What were you|is already empty
  6357.     put #var GH_LOOT_COLL OFF
  6358.     goto LOOT_COIN_$GH_LOOT_COIN
  6359.  
  6360. GET_COIN:
  6361.     var LAST GET_COIN
  6362.     put get coin
  6363.     waitforre ^You pick up|^What were you
  6364.     goto LOOT_COIN_ON
  6365.  
  6366. GET_JUNK:
  6367.     var JUNK $0
  6368.     var LOOTED YES
  6369. STOW_JUNK:
  6370.     var LAST STOW_JUNK
  6371.         matchre  NO_MORE_ROOM_JUNK any more room in|^Stow what|^You just can't get|^But that's closed
  6372.         matchre LOOT_JUNK_ON ^You put your
  6373.     put stow %JUNK in %JUNK_CONTAINER
  6374.     matchwait 30
  6375.     goto LOOT_ERROR
  6376.  
  6377. NO_MORE_ROOM_JUNK:
  6378.     put drop %JUNK
  6379.     waitforre ^You drop|^What were you
  6380.     put #var GH_LOOT_JUNK OFF
  6381.     goto NO_LOOT
  6382.  
  6383. TOO_DARK:
  6384.     if ("%GAG_ECHO" != "YES") then
  6385.     {
  6386.         echo
  6387.         echo *** It's too dark to see anything ***
  6388.         echo
  6389.     }
  6390.     goto TIMER_$GH_TIMER
  6391.  
  6392. NO_MONSTER:
  6393.     if ("%GAG_ECHO" != "YES") then
  6394.     {
  6395.         echo
  6396.         echo ***        No recognizable monsters.         ***
  6397.         echo ***      If you think this is an error,      ***
  6398.         echo *** post the creature you just killed please ***
  6399.         echo ***          Or AIM IRXSwmr about it         ***
  6400.         echo
  6401.     }
  6402. ##CHECK HERE just loot
  6403.     put loot $GH_SEARCH
  6404.     goto TIMER_$GH_TIMER
  6405.  
  6406. NO_LOOT:
  6407.     if ("%GAG_ECHO" != "YES") then
  6408.     {
  6409.         echo
  6410.         echo *** No Loot ***
  6411.         echo
  6412.     }
  6413.     if ("%LOOTED" = "YES") then
  6414.     {
  6415.         var LOCAL $GH_LOOTS
  6416.         math LOCAL add 1
  6417.         put #var GH_LOOTS %LOCAL
  6418.         var LOOTED NO
  6419.     }
  6420. LOOT_DONE:
  6421. ##CHECK HERE DELETE LINE BELOW
  6422. action goto BLEEDING when eval $bleeding = 1
  6423.     var LAST LOOT_DONE
  6424.     if ("%RANGED" = "ON") then
  6425.         if matchre("$roomobjs", "%AMMO") then gosub RANGED_CLEAN
  6426.     if ("%THROWN" = "ON") then
  6427.         if matchre("$roomobjs", "%CURR_WEAPON") then gosub THROWN_CLEAN
  6428.     if ("%SHIELD" != "NONE") then
  6429.     {
  6430.         if ("$lefthand" = "Empty") then
  6431.         {
  6432.             gosub EQUIP_SHIELD
  6433.         }
  6434.     }
  6435.     if ((toupper("$GH_RETREAT") = "ON") && ("%RETREATING" = "OFF")) then gosub RETREAT_TRIGGERS
  6436.     goto TIMER_$GH_TIMER
  6437.  
  6438. ######################################
  6439. ###                                ###
  6440. ###   Experience check routines    ###
  6441. ###                                ###
  6442. ######################################
  6443. TIMER_ON:
  6444.     if (%t > (%MAX_TRAIN_TIME)) then goto SWITCH_WEAPON
  6445.     if ("%LAST" = "CHECK_FOR_MONSTER") then return
  6446. TIMER_OFF:
  6447.     goto EXPCHECK_$GH_EXP
  6448.  
  6449. EXPCHECK_ON:
  6450. ##CHECK HERE
  6451. ## if ($%EXP2.LearningRate > 15) then goto SWITCH_WEAPON
  6452. ## else if ($%WEAPON_EXP.LearningRate > 15) then goto SWITCH_WEAPON
  6453. ## }
  6454. ## } else if ($%WEAPON_EXP.LearningRate > 15) then goto SWITCH_WEAPON
  6455.     if ("%ALTEXP" = "ON") then
  6456.     {
  6457.     if (($%EXP2.LearningRate > 15) && ($%WEAPON_EXP.LearningRate > 15)) then goto SWITCH_WEAPON
  6458.     if (("%MAGIC" = "OFF") && (("%EXP2" = "Debilitation") || ("%EXP2" = "Targeted_Magic")) && ($%EXP2.LearningRate > 15)) then goto SWITCH_WEAPON
  6459.     }
  6460.     else if ($%WEAPON_EXP.LearningRate > 15) then goto SWITCH_WEAPON
  6461.  
  6462. EXPCHECK_OFF:
  6463.     var LAST EXPCHECK_OFF
  6464.     if (toupper("$GH_STANCE") = "ON")) then gosub SWITCH_STANCE
  6465.     if (("%MAGIC_TYPE" != "OFF") && ("%MAGIC" != "ON")) then
  6466.         {
  6467.         counter set %MAGIC_COUNT
  6468.         save %c
  6469.         }
  6470.     put #statusbar 1 GH - Kills:$GH_KILLS  Skins:$GH_SKINS  Loots:$GH_LOOTS
  6471.     if ("%SEARCHED" = "YES") then
  6472.         {
  6473.         if ("%MAGIC" = "ON") then
  6474.             {
  6475.             counter set %MAGIC_COUNT
  6476.             save %c
  6477.             goto %c
  6478.             }
  6479.         goto FACE
  6480.         }
  6481.     else goto %c
  6482.  
  6483. MIND_MURKED:
  6484.     if ("%GAG_ECHO" != "YES") then
  6485.     {
  6486.         echo
  6487.         echo *** Mind murked up, going to rest mode***
  6488.         echo
  6489.     }
  6490.     pause 1
  6491.     send sleep
  6492.     var REST ON
  6493.     goto EXPCHECK_OFF
  6494.  
  6495. SWITCH_STANCE:
  6496. ##CHECK HERE
  6497. ##if ($%CURR_STANCE.LearningRate < 30) then return
  6498.     if ($%CURR_STANCE.LearningRate < 30) then return
  6499.     if ("%GAG_ECHO" != "YES") then
  6500.     {
  6501.         echo
  6502.         echo ***     SWITCH_STANCE:    ***
  6503.         echo *** Current stance locked ***
  6504.         echo
  6505.     }
  6506.     if ("%CURR_STANCE" = "Evasion") then
  6507.     {
  6508.         if ("%NOSHIELD" = "OFF") then
  6509.         {
  6510.             send stance shield
  6511.             waitfor You are now set to use
  6512.             var CURR_STANCE Shield_Usage
  6513.         } else
  6514.         {
  6515.             send stance parry
  6516.             waitfor You are now set to use
  6517.             var CURR_STANCE Parry_Ability
  6518.         }
  6519.     } elseif ("%CURR_STANCE" = "Shield_Usage") then
  6520.     {
  6521.         if ("%NOPARRY" = "OFF") then
  6522.         {
  6523.             put stance parry
  6524.             waitfor You are now set to use
  6525.             var CURR_STANCE Parry_Ability
  6526.         } else
  6527.         {
  6528.             put stance evasion
  6529.             waitfor You are now set to use
  6530.             var CURR_STANCE Evasion
  6531.         }
  6532.     } elseif ("%CURR_STANCE" = "Parry_Ability") then
  6533.     {
  6534.         if ("%NOEVADE" = "OFF") then
  6535.         {
  6536.             put stance evasion
  6537.             waitfor You are now set to use
  6538.             var CURR_STANCE Evasion
  6539.         } else
  6540.         {
  6541.             send stance shield
  6542.             waitfor You are now set to use
  6543.             var CURR_STANCE Shield_Usage
  6544.         }
  6545.     }
  6546.     return
  6547.  
  6548. SWITCH_WEAPON:
  6549.     var LAST SWITCH_WEAPON
  6550.     if ("%GAG_ECHO" != "YES") then
  6551.     {
  6552.             echo
  6553.             echo *** SWITCH_WEAPON
  6554.             echo *** Weapon skill locked ***
  6555.             echo
  6556.     }
  6557.     if "$BW" != "OFF" && "$GH_BUFF" = "ON" then
  6558.     {
  6559.     put #send 1 release bond
  6560.     waitforre ^You sense|^You are not|^Release what|^You are ending the bond with your
  6561.     }
  6562.     #put stance evasion
  6563.     #pause .5
  6564.     put #playsystem Open
  6565.     if ("%EMPTY_HANDED" != "ON") then
  6566.     {
  6567.             if ("%RANGED" = "ON") then
  6568.             {
  6569.                 action remove You think you have your best shot possible
  6570.                 action remove stop concentrating on aiming
  6571.                 gosub RANGE_SHEATHE
  6572.                 if (matchre("$roomobjs", "%AMMO\b")) then gosub RANGED_CLEAN
  6573.                 if ("%REM_SHIELD" != "NONE") then
  6574.                 {
  6575.                     pause 1
  6576.                     put get %REM_SHIELD
  6577.                     waitfor You get a
  6578.                     put wear %REM_SHIELD
  6579.                     waitfor You slide
  6580.                 }
  6581.             } else
  6582.             {
  6583.                 put ret
  6584.                 gosub SHEATHE %CURR_WEAPON
  6585.             }
  6586.     }
  6587.     if ("%SHIELD" != "NONE") then
  6588.     {
  6589.             gosub UNEQUIP_SHIELD
  6590.     }
  6591.     if (toupper("$GH_MULTI") != "OFF") then
  6592.     {
  6593.             if ($GH_MULTI_CURR_NUM < $GH_MULTI_NUM) then
  6594.             {
  6595.                 var TEMP $GH_MULTI_CURR_NUM
  6596.                 math TEMP add 1
  6597.                 put #var GH_MULTI_CURR_NUM %TEMP
  6598.             }
  6599.             else
  6600.             {
  6601.                 put #var GH_MULTI_CURR_NUM 1
  6602.             }
  6603.             if (toupper("$GH_MULTI") = "MULTI") then put .hunt MULTIWEAPON $GH_MULTI_$GH_MULTI_CURR_NUM
  6604.             else put .hunt MULTIWEAPON $GH_MULTI_WEAPON_$GH_MULTI_CURR_NUM
  6605.     } else goto DONE
  6606.  
  6607. BLEEDING:
  6608.     if ("%GAG_ECHO" != "YES") then
  6609.     {
  6610.         echo
  6611.         echo *** BLEEDING: ***
  6612.         echo You are bleeding
  6613.         echo Retreating to check health
  6614.         echo
  6615.     }
  6616.     action remove eval $bleeding = 1
  6617.     action var INFECTED YES when ^You.+(infect|disease)
  6618.     pause 0.2
  6619.     var GOING_TO %c
  6620.     var INFECTED NO
  6621.     put health
  6622.     goto HEALTH_CHECK
  6623.  
  6624. STUNNED:
  6625.     if ("%GAG_ECHO" != "YES") then
  6626.     {
  6627.         echo
  6628.         echo *** STUNNED: ***
  6629.         echo You have been stunned.
  6630.         echo Retreating to check health.
  6631.         echo
  6632.     }
  6633.     action remove eval $stunned = 1
  6634.     var GOING_TO %c
  6635. HEALTH_CHECK:
  6636.     gosub clear
  6637.         matchre HEALTH_CHECK pole|still stunned
  6638.         matchre CHECKING_HEALTH ^You retreat from combat|^You try to back away|already as far away as you can get
  6639.     put retreat
  6640.     matchwait 10
  6641. CHECKING_HEALTH:
  6642.     if ("%INFECTED" = "YES") then goto INFECTED
  6643.     if ($health >= 60) then
  6644.     {
  6645.         echo
  6646.         echo Not too beat up, returning to combat
  6647.         echo Be careful!
  6648.         echo
  6649.         action goto BLEEDING when eval $bleeding = 1
  6650.         action goto STUNNED when eval $stunned = 1
  6651.         action remove ^You.+(infect|disease)
  6652.         goto %GOING_TO
  6653.     } else
  6654.     {
  6655.         echo
  6656.         echo Too beat up, aborting
  6657.         echo
  6658.         goto ABORT
  6659.     }
  6660.  
  6661. INFECTED:
  6662.     echo
  6663.     echo Your wounds are infected, seek medical attention!!!
  6664.     echo
  6665.     put #beep
  6666.     goto DEAD
  6667.  
  6668. DROPPED_WEAPON:
  6669.     pause
  6670.     put get %CURR_WEAPON
  6671.     counter set 0
  6672.     goto BEGIN
  6673.  
  6674. ABORT:
  6675.     gosub RETREAT_TRIGGERS
  6676. ABORTING:
  6677.     if ("%GAG_ECHO" != "YES") then
  6678.     {
  6679.         echo
  6680.         echo *** ABORT: ***
  6681.         echo
  6682.     }
  6683.     echo Injured badly, you need medical assistance
  6684.     if ("%DYING" = "ON") then
  6685.     {
  6686.         put look sword
  6687. ##CHECK HERE
  6688. ##      put quit
  6689.     }
  6690.     if ($health <= 30) then goto DEAD
  6691.     put #beep
  6692.     pause 2
  6693.     goto ABORTING
  6694.  
  6695. DEAD:
  6696.     if ("%GAG_ECHO" != "YES") then
  6697.     {
  6698.         echo
  6699.         echo *** DEAD: ***
  6700.         echo
  6701.         echo You are dead, or about to be
  6702.     }
  6703.     if ("%DYING" = "ON") then
  6704.     {
  6705.         put look sword
  6706.         pause 0.5
  6707.         put look sword
  6708.     }
  6709.     put #beep
  6710. ##CHECK HERE
  6711. #   put quit
  6712.     exit
  6713.  
  6714. NO_VALUE:
  6715.     if ("%GAG_ECHO" != "YES") then
  6716.     {
  6717.         echo
  6718.         echo *** NO_VALUE: ***
  6719.         echo
  6720.     }
  6721.     echo Basic use of script .hunta <weapon>
  6722.     goto DONE
  6723.  
  6724. DONE:
  6725.     if ("%REST" = "ON") then send awaken
  6726.     echo
  6727.     echo ***  DONE:  ***
  6728.     echo
  6729.     pause 1
  6730.     put glance
  6731.     put #parse HUNT DONE
  6732.     put #play Done
  6733.     put look
  6734.     exit
  6735.  
  6736. ##############################
  6737. ##                          ##
  6738. ##      Error handling      ##
  6739. ##                          ##
  6740. ##############################
  6741. APPR_ERROR:
  6742.     gosub clear
  6743.     echo
  6744.     echo ***                APPR_ERROR                     ***
  6745.     echo *** Something happened while appraising a critter ***
  6746.     echo
  6747.     goto ERROR_DONE
  6748.  
  6749. ATTACK_ERROR:
  6750.     gosub clear
  6751.     echo
  6752.     echo ***             ATTACK_ERROR               ***
  6753.     echo *** Something bad happened while attacking ***
  6754.     echo
  6755.     goto ERROR_DONE
  6756.  
  6757. CLEANING_ERROR:
  6758.     gosub clear
  6759.     echo
  6760.     echo ***           CLEANING_ERROR              ***
  6761.     echo *** Something bad happened while cleaning ***
  6762.     echo
  6763.     goto ERROR_DONE
  6764.  
  6765. DEFAULT_ERROR:
  6766.     gosub clear
  6767.     echo
  6768.     echo ***                        DEFAULT_ERROR:                          ***
  6769.     echo ***         Cannot use keyword DEFAULT with keyword multi          ***
  6770.     echo *** To use Default settings with multi-weapons, use keyword dmulti ***
  6771.     echo
  6772.     goto ERROR_DONE
  6773.  
  6774. LOOT_ERROR:
  6775.     gosub clear
  6776.     echo
  6777.     echo ***       LOOT_ERROR            ***
  6778.     echo *** Error occured while looting ***
  6779.     echo
  6780.     goto ERROR_DONE
  6781.  
  6782. MAGIC_ERROR:
  6783.     gosub clear
  6784.     echo
  6785.     echo ***         MAGIC_ERROR             ***
  6786.     echo *** Error occured while using magic ***
  6787.     echo
  6788.     goto ERROR_DONE
  6789.  
  6790. RANGED_ERROR:
  6791.     gosub clear
  6792.     echo
  6793.     echo ***         RANGED_ERROR             ***
  6794.     echo *** Error occured while using ranged ***
  6795.     echo
  6796.     goto ERROR_DONE
  6797.  
  6798. SKIN_ERROR:
  6799.     gosub clear
  6800.     echo
  6801.     echo ***          SKIN_ERROR          ***
  6802.     echo *** Error occured while skinning ***
  6803.     echo
  6804.     goto ERROR_DONE
  6805.  
  6806. STEALTH_ERROR:
  6807.     gosub clear
  6808.     echo
  6809.     echo ***           STEALTH_ERROR            ***
  6810.     echo *** Error occured while being stealthy ***
  6811.     echo
  6812.     goto ERROR_DONE
  6813.  
  6814. SWAP_ERROR:
  6815.     gosub clear
  6816.     echo
  6817.     echo ***              SWAP_ERROR:                    ***
  6818.     echo *** Something bad happened while trying to swap ***
  6819.     echo
  6820.     goto ERROR_DONE
  6821.  
  6822. THROWN_ERROR:
  6823.     gosub clear
  6824.     echo
  6825.     echo ***        THROWN_ERROR          ***
  6826.     echo *** Error occured while throwing ***
  6827.     echo
  6828.     goto ERROR_DONE
  6829.  
  6830. VARIABLE_ERROR:
  6831.     gosub clear
  6832.     echo
  6833.     echo ***                VARIABLE_ERROR:                 ***
  6834.     echo *** An error has occured with one of the variables ***
  6835.     echo
  6836.     goto ERROR_DONE
  6837.  
  6838. WEAPON_APPR_ERROR:
  6839.     gosub clear
  6840.     echo
  6841.     echo ***                   WEAPON_APPR_ERROR:                          ***
  6842.     echo *** Something happened while trying to discern the type of weapon ***
  6843.     echo
  6844.     goto ERROR_DONE
  6845.  
  6846. ERROR:
  6847.     gosub clear
  6848.     echo
  6849.     echo *** Some general ERROR occured ***
  6850.     echo
  6851.     goto DONE
  6852.  
  6853. ERROR_DONE:
  6854.     pause 1
  6855.     echo
  6856.     put #parse *** DONE, BUT WITH ERRORS ***
  6857.     echo
  6858.     put #beep
  6859.     put #play Error
  6860.     put stow right
  6861.     pause 1
  6862.     put stow left
  6863.     pause 1
  6864.     put #playsystem Open
  6865.     put glance
  6866.     put #parse HUNT DONE ERROR
  6867.     put look
  6868.     exit
  6869.  
  6870. ##############################
  6871. ##                          ##
  6872. ##    End Error handling    ##
  6873. ##                          ##
  6874. ##############################
  6875.  
  6876. #################################
  6877. ##                             ##
  6878. ##  General Utility functions  ##
  6879. ##                             ##
  6880. #################################
  6881. PAUSE:
  6882.     pause
  6883.     goto %LAST
  6884.  
  6885. RETURN:
  6886.     return
  6887.  
  6888. #################################
  6889. ##                             ##
  6890. ##  Includes and Additions     ##
  6891. ##                             ##
  6892. #################################
  6893.  
  6894. DISARM_ORB:
  6895. put #send disarm orb
  6896. waitforre ^Roundtime
  6897. pause .5
  6898. return
  6899.  
  6900. GH_ARMOR_ON:
  6901. #if $GH_ARMOR_COUNT >= $GH_ARMOR_TOTAL then put #var GH_ARMOR OFF
  6902.         if ("$GH_ARMOR.INCLUDE" = "1" and $%%swap.armor > $swap.learningrate) || ("$GH_ARMOR.INCLUDE" = "0") then
  6903.         {
  6904.         action (hunt) off
  6905.         gosub gh_armor.start
  6906.         action (hunt) on
  6907.         }
  6908.         #if "$GH_ARMOR.INCLUDE" = "0" then
  6909.         #{
  6910.         #action (hunt) off
  6911.         #gosub gh_armor.start
  6912.         #action (hunt) on
  6913.         #}
  6914. return
  6915.  
  6916. GH_BUFF_ON:
  6917. action (hunt) off
  6918.     if toupper("$GH_BUFF_DANGER") = "ON" then action put #send retreat when melee range on you\!|pole weapon range on you\!
  6919.     gosub gh_buff.start
  6920.     if toupper("$GH_BUFF_DANGER") = "ON" then action remove melee range on you\!|pole weapon range on you\!
  6921.     action (hunt) on
  6922. return
  6923.  
  6924.  
  6925. ####################
  6926. ##                ##
  6927. ##  Buff Section  ##
  6928. ##                ##
  6929. ####################
  6930.  
  6931.  
  6932. buff.start:
  6933.     counter set 0
  6934.     action #send 5 $lastcommand when ^You are still stunned
  6935.     action instant var buff.trace YES when ^You sense the holy power return to normal
  6936.     action var FullPrep 1 when You feel fully prepared to cast your spell.
  6937.     #error checking
  6938.     eval buff.total count("%buff.spell", "|")
  6939.     eval buff.total.prep count("%buff.prep", "|")
  6940.     if %buff.total != %buff.total.prep then goto variable.error
  6941.     eval buff.harness.increment.total count("%buff.harness.increment", "|")
  6942.     var FullPrep 0
  6943.     var buff.righthand $righthandnoun
  6944.     var buff.lefthand $lefthandnoun
  6945.     var non.RUE.weapons Bow|Crossbow|Heavy_Thrown|Light_Thrown|Slings
  6946.     var thrown.weapons Heavy_Thrown|Light_Thrown
  6947.     var buff.special.casts Benediction|Cage of Light|Rutilor's Edge|Bond Armaments|Osrel Meraud|Ignite
  6948.  
  6949. buff.magic:
  6950.     if matchre("%WEAPON_EXP", "%non.RUE.weapons") then put #var RUE $righthand
  6951.     if "$RUE" != "$righthand" then put #var RUE OFF
  6952.     if toupper("%buff.ba.thrown") = "YES" then
  6953.         {
  6954.         if !matchre("%WEAPON_EXP", "%thrown.weapons") then put #var BA $righthand
  6955.         }
  6956.     if "$BA" != "$righthand" then put #var BA OFF
  6957.     if "%buff.spell(%c)" = "RUE" && "$righthand" = "Empty" then put #var RUE $righthand
  6958.     if "%buff.spell(%c)" = "BA" && "$righthand" = "Empty" then put #var BA $righthand
  6959.     if "%buff.spell(%c)" != "OM" && toupper("$%buff.spell(%c)") != "OFF" then
  6960.         {
  6961.         counter add 1
  6962.         if %c > %buff.total then return
  6963.         goto buff.magic
  6964.         }
  6965.     if "%buff.spell(%c)" = "OM" then
  6966.         {
  6967.         if $gametime !> $OM then
  6968.             {
  6969.             counter add 1
  6970.             goto buff.magic
  6971.             }
  6972.         }
  6973.     if toupper("%buff.spell(%c)") = "COL" && ($Time.isKatambaUp = 0 && $Time.isYavashUp = 0 && $Time.isXibarUp = 0) then
  6974.         {
  6975.         put #var COL ON
  6976.         return
  6977.         }
  6978.     if "$%buff.spell(%c)" = "" then return
  6979.     if $mana.level <= %buff.manalevel && "%buff.trace" = "YES" then gosub buff.trace
  6980.     gosub buff.release
  6981.     if "$GH_BUFF_DANGER" = "ON" then
  6982.         {
  6983.         put #send ret
  6984.         put #send ret
  6985.         pause .5
  6986.         }
  6987.     gosub buff.prepare
  6988.     if toupper("%buff.cambrinth") != "NO" && %buff.charge.total(%c) > 0 then
  6989.         {
  6990.         if toupper("%buff.worn") = "NO" then
  6991.             {
  6992.             if "%buff.righthand" != "" || "%buff.lefthand" != "" then gosub buff.empty.hands
  6993.             gosub buff.get "%buff.cambrinth"
  6994.             }
  6995.         if toupper("%buff.worn") = "YES" then
  6996.             {
  6997.             if toupper("%buff.remove") = "NO" then
  6998.                 {
  6999.                 if "%buff.righthand" != "" && "%buff.lefthand" != "" then
  7000.                     {
  7001.                     if "%buff.spell(%c)" = "RUE" || "%buff.spell(%c)" = "BA" then gosub buff.empty.hands left
  7002.                     else
  7003.                     gosub buff.empty.hands right
  7004.                     }
  7005.                 }
  7006.             if toupper("%buff.remove") = "YES" then
  7007.                 {
  7008.                 if "%buff.righthand" != "" || "%buff.lefthand" != "" then gosub buff.empty.hands
  7009.                 gosub buff.remove "%buff.cambrinth"
  7010.                 }
  7011.             }
  7012.         gosub buff.charge "%buff.cambrinth"
  7013.         gosub buff.invoke "%buff.cambrinth"
  7014.         }
  7015.         if toupper("%buff.cambrinth") != "NO" && %buff.charge.total(%c) > 0 then
  7016.             {
  7017.             if toupper("%buff.worn") = "NO" then
  7018.                 {
  7019.                 gosub buff.stow
  7020.                 if "$righthandnoun" = "" || "$lefthandnoun" = "" then gosub buff.reequip
  7021.                 }
  7022.             if toupper("%buff.worn") = "YES" then
  7023.                 {
  7024.                 if toupper("%buff.remove") = "NO" then
  7025.                     {
  7026.                     if "$righthand" = "Empty" && "%buff.righthand" != "" then gosub buff.reequip right
  7027.                     if "$lefthand" = "Empty" && "%buff.lefthand" != "" then gosub buff.reequip left
  7028.                     }
  7029.                 if toupper("%buff.remove") = "YES" then
  7030.                     {
  7031.                     gosub buff.wear "%buff.cambrinth"
  7032.                     if "%buff.righthand" = "" || "%buff.lefthand" = "" then gosub buff.reequip
  7033.                     }
  7034.                 }
  7035.             }
  7036.  
  7037.         pause .2
  7038.  
  7039.         if (toupper("%buff.secondcambrinth") != "NO" && %buff.charge.total2(%c) > 0) then
  7040.             {
  7041.             if toupper("%buff.worn") = "NO" then
  7042.                 {
  7043.                 if "%buff.righthand" != "" || "%buff.lefthand" != "" then gosub buff.empty.hands
  7044.                 gosub buff.get "%buff.secondcambrinth"
  7045.                 }
  7046.             if toupper("%buff.worn") = "YES" then
  7047.                 {
  7048.                 if toupper("%buff.remove") = "NO" then
  7049.                     {
  7050.                     if "%buff.righthand" != "" && "%buff.lefthand" != "" then
  7051.                         {
  7052.                         if "%buff.spell(%c)" = "RUE" || "%buff.spell(%c)" = "BA" then gosub buff.empty.hands left
  7053.                         else
  7054.                         gosub buff.empty.hands right
  7055.                         }
  7056.                     }
  7057.                 if toupper("%buff.remove") = "YES" then
  7058.                     {
  7059.                     if "%buff.righthand" != "" || "%buff.lefthand" != "" then gosub buff.empty.hands
  7060.                     gosub buff.remove %buff.secondcambrinth
  7061.                     }
  7062.                 }
  7063.                 gosub buff.charge.2
  7064.                 gosub buff.invoke.2
  7065.             }
  7066.  
  7067.  
  7068.     if toupper("%buff.harness") = "YES" && %buff.harness.total(%c) > 0 then gosub buff.harness
  7069.     gosub buff.cast
  7070.     if toupper("%buff.continue") = "YES" then goto buff.magic
  7071.     return
  7072.  
  7073. buff.trace:
  7074.     matchre buff.trace ^\.\.\.wait|^Sorry, you may
  7075.     matchre buff.trace.success ^You begin to trace the|^You trace a
  7076.     matchre buff.no.trace ^An empty feeling pervades your soul
  7077.     put glyph mana
  7078.     matchwait
  7079.     buff.no.trace:
  7080.     action remove ^You sense the holy power return to normal
  7081.     buff.trace.success:
  7082.     put #var buff.trace NO
  7083.     return
  7084.  
  7085. buff.prepare:
  7086.     if $humming = 1 then
  7087.         {
  7088.         put stop play
  7089.         pause .5
  7090.         }
  7091.     matchre buff.prepare ^\.\.\.wait|^Sorry, you may
  7092.     matchre buff.return %buff.prep.message
  7093.     put prep %buff.spell(%c) %buff.prep(%c)
  7094.     matchwait
  7095.  
  7096. buff.empty.hands:
  7097.     #if "%buff.righthand" != "Empty" && "$1" != "left" then
  7098.     if "%buff.righthand" != "" && "$1" != "left" then
  7099.         {
  7100.         if "$BA" = "$righthandnoun" then
  7101.             {
  7102.             put #send release bond
  7103.             waitforre ^You sense|^You are not|^Release what
  7104.             }
  7105.         if ("$righthandnoun" = "fan") && ("%FAN_STATUS" = "OPENED") then
  7106.             {
  7107.             var LAST_FAN_STATUS OPENED
  7108.             put close my $righthand
  7109.             var FAN_STATUS CLOSED
  7110.             pause .5
  7111.             }
  7112.         put sheath my %buff.righthand
  7113.         pause .5
  7114.         put wear my %buff.righthand
  7115.         pause .5
  7116.         put stow my %buff.righthand
  7117.         pause
  7118.         }
  7119.     if "$1" = "right" then return
  7120.     #if "%buff.lefthand" != "Empty" then
  7121.     if "%buff.lefthand" != "" then
  7122.         {
  7123.         put sheath my %buff.lefthand
  7124.         pause .5
  7125.         put wear my %buff.lefthand
  7126.         pause .5
  7127.         put stow my %buff.lefthand
  7128.         pause
  7129.         }
  7130.     return
  7131.  
  7132. buff.get:
  7133.     matchre buff.get ^\.\.\.wait|^Sorry, you may
  7134.     matchre buff.return ^You get a
  7135.     put get my $1
  7136.     matchwait
  7137.  
  7138. buff.remove:
  7139.     matchre buff.remove ^\.\.\.wait|^Sorry, you may
  7140.     matchre buff.return ^You remove|^You slide
  7141.     put remove my $1
  7142.     matchwait
  7143.  
  7144. buff.charge:
  7145.     var buff.charge.current 0
  7146.  
  7147. buff.charge.1:
  7148.     if %buff.charge.total(%c) > %buff.charge.current then
  7149.         {
  7150.         evalmath charge.difference %buff.charge.total(%c) - %buff.charge.current
  7151.         if %buff.charge.increment <= %charge.difference then put charge my %buff.cambrinth %buff.charge.increment
  7152.         else put charge my %buff.cambrinth %charge.difference
  7153.         waitforre (^The .+\.$|^\.\.\.wait|^Sorry, you|You strain)
  7154.         var buff.cambrinth.result $0
  7155.         if matchre ("%buff.cambrinth.result", "absorbs") then
  7156.             {
  7157.             math buff.charge.current add %buff.charge.increment
  7158.             goto buff.charge.1
  7159.             }
  7160.         if matchre ("%buff.cambrinth.result", "resists|is already") then
  7161.             {
  7162.             var buff.charge.current %buff.charge.total(%c)
  7163.             goto buff.charge.1
  7164.             }
  7165.         if matchre ("%buff.cambrinth.result", "...wait|Sorry, you") then goto buff.charge.1
  7166.         if matchre ("%buff.cambrinth.result", "You strain") then
  7167.             {
  7168.             if $mana < 15 then waiteval $mana >= 20
  7169.             goto buff.charge.1
  7170.             }
  7171.         }
  7172.     return
  7173.  
  7174. buff.charge.2:
  7175.     var buff.charge.current 0
  7176.  
  7177. buff.charge.2A:
  7178.     if %buff.charge.total2(%c) > %buff.charge.current then
  7179.         {
  7180.         evalmath charge.difference %buff.charge.total2(%c) - %buff.charge.current
  7181.         if %buff.charge.increment <= %charge.difference then put charge my %buff.secondcambrinth %buff.charge.increment
  7182.         else put charge my %buff.secondcambrinth %charge.difference
  7183.         waitforre (^The .+\.$|^\.\.\.wait|^Sorry, you|You strain)
  7184.         var buff.cambrinth.result $0
  7185.         if matchre ("%buff.cambrinth.result", "absorbs") then
  7186.             {
  7187.             math buff.charge.current add %buff.charge.increment
  7188.             goto buff.charge.2A
  7189.             }
  7190.         if matchre ("%buff.cambrinth.result", "resists|is already") then
  7191.             {
  7192.             var buff.charge.current %buff.charge.total2(%c)
  7193.             goto buff.charge.2A
  7194.             }
  7195.         if matchre ("%buff.cambrinth.result", "...wait|Sorry, you") then goto buff.charge.2
  7196.         if matchre ("%buff.cambrinth.result", "You strain") then
  7197.             {
  7198.             if $mana < 15 then waiteval $mana >= 20
  7199.             goto buff.charge.2A
  7200.             }
  7201.         }
  7202.     return
  7203.  
  7204. buff.invoke:
  7205.     matchre buff.invoke ^\.\.\.wait|^Sorry, you may
  7206.     matchre buff.return ^The .+ pulses with \w+ energy\.\s*You reach for its center and forge a magical link to it|^Your link to the .+ is intact
  7207.     put invoke my %buff.cambrinth %buff.charge.total(%c)
  7208.     matchwait
  7209.  
  7210. buff.invoke.2:
  7211.     if %buff.charge.total2(%c) = 0 then goto buff.return
  7212.     matchre buff.invoke.2 ^\.\.\.wait|^Sorry, you may
  7213.     matchre buff.return ^The .+ pulses with \w+ energy\.\s*You reach for its center and forge a magical link to it|^Your link to the .+ is intact
  7214.     put invoke my %buff.secondcambrinth %buff.charge.total2(%c)
  7215.     matchwait
  7216.  
  7217. buff.harness:
  7218.     var buff.harness.current 0
  7219.     buff.harness.1:
  7220.     if %buff.harness.total(%c) > %buff.harness.current then
  7221.         {
  7222.         evalmath harness.difference %buff.harness.total(%c) - %buff.harness.current
  7223.         if %buff.harness.increment <= %harness.difference then put harness %buff.harness.increment
  7224.         else put harness %harness.difference
  7225.         waitforre (^The .+\.$|^\.\.\.wait|^Sorry, you|Strain though|You tap into)
  7226.         var buff.harness.result $0
  7227.         if matchre ("%buff.harness.result", "You tap into") then
  7228.             {
  7229.             math buff.harness.current add %buff.harness.increment
  7230.             goto buff.harness.1
  7231.             }
  7232.  
  7233.         if matchre ("%buff.harness.result", "...wait|Sorry, you") then goto buff.harness.1
  7234.         if matchre ("%buff.harness.result", "Strain though") then
  7235.             {
  7236.             if $mana < 15 then waiteval $mana >= 20
  7237.             goto buff.harness.1
  7238.             }
  7239.         }
  7240.     return
  7241.  
  7242. buff.cast:
  7243.     if %FullPrep != 1 then waiteval %FullPrep = 1
  7244.     if "$preparedspell" = "Quicken the Earth" then
  7245.         {
  7246.         gosub buff.cut
  7247.         gosub buff.forage dirt
  7248.         pause .5
  7249.         }
  7250.  
  7251. buff.cast.2:
  7252.     var FullPrep 0
  7253.     if $mana < 10 then waiteval $mana >= 15
  7254.     matchre buff.cast.2 ^\.\.\.wait|^Sorry, you may
  7255.     matchre buff.return ^You contribute your harnessed streams|^A soft silver glow|^Disregarding the pain, you grind the dirt brutally|^You can't cast Rutilor's Edge on yourself|^You can't enhance the|^You clasp your hands|^You don't have|^You gesture|^You let your concentration|^You make a holy gesture|^You reach with both|^Your .+ emits a loud \*snap\* as it discharges all its power to aid your spell|soft silver glow that is absorbed into it\.$|Your spell backfires| You suddenly feel more confident about your skinning abilities|Your senses sharpen considerably|You close yours eyes and focus|You close your eyes and focus|You place your hands on your temples
  7256.     if "$preparedspell" = "Benediction" then put cast %buff.immortal
  7257.     if "$preparedspell" = "Cage of Light" then
  7258.         {
  7259.         if $Time.isKatambaUp = 1 then put cast Katamba
  7260.         if $Time.isYavashUp = 1 then put cast Yavash
  7261.         if $Time.isXibarUp = 1 then put cast Xibar
  7262.         if $Time.isKatambaUp = 0 && $Time.isYavashUp = 0 && $Time.isXibarUp = 0 then put release
  7263.         }
  7264.     if "$preparedspell" = "Rutilor's Edge" || "$preparedspell" = "Bond Armaments" || "$preparedspell" = "Ignite" then put cast $righthandnoun
  7265.     if "$preparedspell" = "Osrel Meraud" then put cast orb
  7266.     #if "$preparedspell" = "Bless" then
  7267.         #{
  7268.         # if "%WEAPON_EXP" = "Brawling" then put cast $charactername
  7269.         # else
  7270.         # put cast $righthandnoun
  7271.         #}
  7272.     if !matchre("$preparedspell", "%buff.special.casts") then
  7273.         {
  7274.         put cast
  7275.         }
  7276.     matchwait
  7277.  
  7278. buff.stow:
  7279.     matchre buff.stow ^\.\.\.wait|^Sorry, you may
  7280.     matchre buff.return ^You put
  7281.     put stow my $1
  7282.     matchwait
  7283.  
  7284. buff.wear:
  7285.     matchre buff.wear ^\.\.\.wait|^Sorry, you may
  7286.     matchre buff.return ^You attach|^You slide|^You wear|^You hang
  7287.     put wear my $1
  7288.     matchwait
  7289.  
  7290. buff.reequip:
  7291.     if "%buff.righthand" != "" && "$1" != "left" then
  7292.         {
  7293.         put wield my %buff.righthand
  7294.         pause .2
  7295.         put remove my %buff.righthand
  7296.         pause .2
  7297.         put get my %buff.righthand
  7298.         pause .2
  7299.         }
  7300.     if "$1" = "right" then return
  7301.     if "%buff.lefthand" != "Empty" && "$1" != "right" then
  7302.         {
  7303.         put wield my %buff.lefthand
  7304.         pause .2
  7305.         put remove my %buff.lefthand
  7306.         pause .2
  7307.         put get my %buff.lefthand
  7308.         pause .2
  7309.         }
  7310.     return
  7311.  
  7312. buff.forage:
  7313.     var buff.forage $1
  7314.     buff.forage.2:
  7315.     if "$righthand" = "dirt" || "$lefthand" = "dirt" then return
  7316.     put ret
  7317.     put ret
  7318.     wait
  7319.     matchre buff.forage.2 ^\.\.\.wait|^Sorry, you|^You cannot forage
  7320.     matchre buff.return some dirt\.$
  7321.     put forage %buff.forage
  7322.     matchwait
  7323.     buff.cut:
  7324.     matchre buff.cut ^\.\.\.wait|^Sorry, you
  7325.     matchre buff.return ^Roundtime|^You've already performed
  7326.     put perform cut
  7327.     matchwait
  7328.  
  7329. buff.release:
  7330.     pause .5
  7331.     matchre buff.release ^\.\.\.wait|^Sorry, you may
  7332.     matchre buff.return ^You aren't harnessing any mana|^You aren't preparing a spell|^You have no cyclic spell active to release
  7333.     send release spell;release mana
  7334.     matchwait
  7335.     variable.error:
  7336.     echo Something wrong with your variables. Some variable did not pass test. Check to make sure there are the proper number in each array variable
  7337.     return
  7338.     buff.return:
  7339.     action remove ^You are still stunned
  7340.     return
  7341.  
  7342. #################################
  7343. ##                             ##
  7344. ##        HELP Section         ##
  7345. ##                             ##
  7346. #################################
  7347. HELP:
  7348.     gosub clear
  7349.     echo
  7350.     echo **************************************************************************************
  7351.     echo **
  7352.     echo ** Ambushing
  7353.     echo ** Appraisal
  7354.     echo ** Armor swapping
  7355.     echo ** Backstabbing
  7356.     echo ** Brawling
  7357.     echo ** Buffing
  7358.     echo ** Counting Critters (Dancing)
  7359.     echo ** Default Setting
  7360.     echo ** Empathic Brawling
  7361.     echo ** Experience Checks/Sleeping with a murked mind
  7362.     echo ** Global Variables
  7363.     echo ** HUNT verb
  7364.     echo ** Juggling
  7365.     echo ** Looting Options
  7366.     echo ** Magic
  7367.     echo ** Multi Skill Training
  7368.     echo ** Offhand Weapon Fighting
  7369.     echo ** Poaching/Sniping
  7370.     echo ** Pouch swapping
  7371.     echo ** power Perception
  7372.     echo ** Roaming a Hunting Ground
  7373.     echo ** Retreating Options
  7374.     echo ** Shields
  7375.     echo ** Skinning Options
  7376.     echo ** Snapfiring
  7377.     echo ** Stance Options
  7378.     echo ** Swappable Weapons (Bastard swords etc.)
  7379.     echo ** Syntax Full
  7380.     echo ** Targeting Body Parts
  7381.     echo ** Timer Training - training for X amount of time
  7382.     echo ** Thrown
  7383.     echo ** Weapons
  7384.     echo **
  7385.     echo ** Please type one of the above options for details.
  7386.     echo **
  7387.     echo **************************************************************************************
  7388.     echo
  7389.         match HELP_AMBUSH ambush
  7390.         match HELP_APP appr
  7391.         match HELP_ARMOR armor
  7392.         match HELP_BACK back
  7393.         matchre HELP_BRAWL brawl
  7394.         matchre HELP_BUFF buff
  7395.         matchre HELP_COUNT count|danc
  7396.         match HELP_DANGER danger
  7397.         matchre HELP_DEF defa|sett
  7398.         matchre HELP_EMPATH empath
  7399.         match HELP_EXP exp
  7400.         matchre HELP_GLOBAL glob|var
  7401.         match HELP_HUNT hunt
  7402.         match HELP_JUGGLE jugg
  7403.         match HELP_LOOT loot
  7404.         match HELP_MAGIC magic
  7405.         match HELP_MULTI multi
  7406.         match HELP_OFFHAND offh
  7407.         matchre HELP_POACH poach|snip
  7408.         matchre HELP_POUCH pouch
  7409.         match HELP_power pow
  7410.         match HELP_ROAM roam
  7411.         match HELP_RETREAT ret
  7412.         match HELP_SHIELD shield
  7413.         match HELP_SKIN skin
  7414.         match HELP_SNAP snap
  7415.         match HELP_STANCE stance
  7416.         match HELP_SWAP swap
  7417.         match HELP_SYNTAX synt
  7418.         match HELP_TARGET targ
  7419.         match HELP_THROWN throw
  7420.         match HELP_TIMER time
  7421.         match HELP_WEAPON weap
  7422.     matchwait
  7423.  
  7424. HELP_GENERAL:
  7425.     echo
  7426.     echo **************************************************************************************
  7427.     echo **
  7428.     echo ** The Option you chose was a "General Command"
  7429.     echo ** General commands must come before any other scripting commands,
  7430.     echo ** but can be mixed in any order with other General Commands.
  7431.     echo **
  7432.     echo ** LIST of General commands: Appraise, Arrange, Block, Bundle, Count, Custom, Dance,
  7433.     echo **                           Default, Dodge, Evade, Exp, Lootall, Lootbox, Lootcoin,
  7434.     echo **                           Lootgem, Retreat, Junk, Multi, Parry, Roam, Timer,
  7435.     echo **                           Target, Train
  7436.     echo **
  7437.     echo **************************************************************************************
  7438.     echo
  7439.     pause 5
  7440.     goto HELP
  7441.  
  7442. HELP_AMBUSH:
  7443.     echo
  7444.     echo **************************************************************************************
  7445.     echo ** For anyone looking to get the drop on someone there's always ambushing.
  7446.     echo ** This function will hide/stalk an enemy and then attack from hiding.  For paladins
  7447.     echo ** it will unhide before advancing and also unhide before attacking to avoid soul hits.
  7448.     echo ** Support is in there for ambushing with ANY melee weapon in the game, as well as
  7449.     echo ** ambushing while brawling.
  7450.     echo **
  7451.     echo ** .hunt ambush {weapon} (shield)
  7452.     echo ** .hunt ambush brawl {weapon} (shield)
  7453.     echo **************************************************************************************
  7454.     echo
  7455.     pause 3
  7456.     goto HELP
  7457.  
  7458. HELP_APP:
  7459.     echo
  7460.     echo **************************************************************************************
  7461.     echo ** The Script can be set-up to appraise the monsters you are fighting.
  7462.     echo **
  7463.     echo ** The script will 'appraise quick' for a 3 second RT.
  7464.     echo ** It attempts to app after a kill, and will app when a monster enters an empty room.
  7465.     echo ** Do to the limitations of the script it can ONLY app the same type of monster as the
  7466.     echo ** last monster you killed.
  7467.     echo ** This creates a sort of "hit or miss" system, but it does work most of the time.
  7468.     echo **
  7469.     echo ** .hunt APPR {weapon} (shield)
  7470.     echo **
  7471.     echo ** Note: The appraisal variable is a global variable so you can turn it on/off as you
  7472.     echo ** so desire while the script is running.  The variable is GH_APPR
  7473.     echo **************************************************************************************
  7474.     echo
  7475.     pause 3
  7476.     goto HELP
  7477.  
  7478. HELP_ARMOR:
  7479.     echo
  7480.     echo **************************************************************************************
  7481.     echo ** The Script can be set-up to swap armors.
  7482.     echo **
  7483.     echo ** The script will swap armors when the learning rate becomes greater than the
  7484.     echo ** GH_ARMOR_RATE is set to.  This variable is found in the setup section at the top.
  7485.     echo ** This armor will only swap through the armors once per run of the script to keep from
  7486.     echo ** Looping endlessly through armors if they all get to the rate.  This count is restarted
  7487.     echo ** Everytime Hunt is re-run tough, such as when using the MULTI option
  7488.     echo **************************************************************************************
  7489.     echo
  7490.     pause 3
  7491.     goto HELP
  7492.  
  7493. HELP_BACK:
  7494.     echo
  7495.     echo **************************************************************************************
  7496.     echo ** For all you sneaky types, backstab is supported.
  7497.     echo ** Just don't try this if you aren't a allowed!
  7498.     echo ** And if you try it with an inappropriate weapon, you will just attack like a Barbarian
  7499.     echo **
  7500.     echo ** .hunt backstab {weapon} (shield)
  7501.     echo **************************************************************************************
  7502.     echo
  7503.     pause 3
  7504.     goto HELP
  7505.  
  7506. HELP_BRAWL:
  7507.     echo
  7508.     echo **************************************************************************************
  7509.     echo ** The script Brawls, no weapons allowed.  Just Fist of Fury
  7510.     echo **
  7511.     echo ** .hunt BRAWL
  7512.     echo **************************************************************************************
  7513.     echo
  7514.     pause 3
  7515.     goto HELP
  7516.  
  7517. HELP_BUFF:
  7518.     echo **************************************************************************************
  7519.     echo ** The Script can be set-up to put up buffing spells, and put them back up when needed
  7520.     echo **
  7521.     echo ** The script gh_buff needs to be edited for your list of spells, preps, and what
  7522.     echo ** to charge the cambrinth at.
  7523.     echo **************************************************************************************
  7524.     echo
  7525.     pause 3
  7526.     goto HELP
  7527.  
  7528. HELP_COUNT:
  7529.     echo
  7530.     echo **************************************************************************************
  7531.     echo ** It is possible to have the script Dance with a certain number of critters without
  7532.     echo ** killing them. The Script will do 'Brawling' until MORE THAN the number of critters
  7533.     echo ** you designate is in the room. (NOT at melee. NOT on you. IN THE ROOM)
  7534.     echo ** Both the Count and Dance keyword works for this function
  7535.     echo **
  7536.     echo ** .hunt COUNT/DANCE <Number of critters to dance with>
  7537.     echo **
  7538.     echo ** Example:
  7539.     echo **  .hunt COUNT/DANCE 3 Scimitar
  7540.     echo **     You will Dance until there are 4 critters, then attack until there are only
  7541.     echo **     3 again.
  7542.     echo **
  7543.     echo ** Note: The dancing variable is a global variable so you can turn it on/off as you
  7544.     echo ** so desire while the script is running.  The variable is GH_DANCING
  7545.     echo **************************************************************************************
  7546.     echo
  7547.     pause 7
  7548.     goto HELP
  7549.  
  7550. HELP_DANGER:
  7551.     echo **************************************************************************************
  7552.     echo ** The Script can be set-up to retreat while casting buffing spells in dangerous areas
  7553.     echo **
  7554.     echo ** This will retreat and stay retreated while buffing.  This option will enable the buff
  7555.     echo ** option too.
  7556.     echo **************************************************************************************
  7557.     echo
  7558.     pause 3
  7559.     goto HELP
  7560.  
  7561. HELP_DEF:
  7562.     echo
  7563.     echo **************************************************************************************
  7564.     echo ** The script can be configured to create 1 default combat setting.
  7565.     echo ** This setting will be used when the script is started with no variables.
  7566.     echo ** It will skip all variable checks and go immediately into combat using
  7567.     echo ** the pre-configured weapon set-up created with this command.
  7568.     echo **
  7569.     echo ** Basically think of this as your "Oh crap! I need to be fighting NOW" set-up.
  7570.     echo **
  7571.     echo ** SYNTAX: .hunta DSET {weapon set-up}
  7572.     echo ** EXAMPLE: .hunta DSET loot skin scimtar shield
  7573.     echo ** USAGE: .hunta
  7574.     echo **
  7575.     echo ** A note on multi word weapons:
  7576.     echo **     If your set-up contains a multi word weapon like short.bow or bastard.sword
  7577.     echo ** there is an added step to get this to work properly. Once you create your set-up,
  7578.     echo ** since it is inside quotes the . is removed making these one word weapons two words,
  7579.     echo ** and thus two variables. To fix this do the following.
  7580.     echo **     Go into your config window and click the "Variables" tab. Find the variable
  7581.     echo ** with your multi word weapon and re-enter the period. This will make it function
  7582.     echo ** properly when default mode is used.  Default variables are all saved as
  7583.     echo ** GH_DEF_<variable name> so they are easily findable
  7584.     echo **
  7585.     echo **************************************************************************************
  7586.     echo
  7587.     pause 10
  7588.     goto HELP_DM
  7589.  
  7590. HELP_DM:
  7591.     echo
  7592.     echo **************************************************************************************
  7593.     echo ** To tie Default setting into a Multi-Weapon Setup use the command DMULTI
  7594.     echo ** This will make the script use your default setting as the first chain in
  7595.     echo ** Multi-weapon set-up. You must have previously set-up default settings to use this.
  7596.     echo ** Also, use DMSET to set the weapons to use
  7597.     echo **
  7598.     echo ** SYNTAX: .hunt DMSET weapon1 weapon2
  7599.     echo ** EXAMPLE: .hunt DMSET scimitar sword mace
  7600.     echo **          This sets up to use these 3 weapons with DEFAULT settings
  7601.     echo ** EXAMPLE: .hunt DMULTI 2 (this will start fighting with weapon 2)
  7602.     echo **
  7603.     echo **************************************************************************************
  7604.     echo
  7605.     pause 3
  7606.     goto HELP
  7607.  
  7608. HELP_EMPATH:
  7609.     echo
  7610.     echo **************************************************************************************
  7611.     echo ** If you're an Empath, or just want to dance with a critter. There is brawling that
  7612.     echo ** doesn't hurt the critter.  No weapons allowed, just like normal brawling
  7613.     echo **
  7614.     echo ** SYNTAX: .hunt EMPATH
  7615.     echo **************************************************************************************
  7616.     echo
  7617.     pause 3
  7618.     goto HELP
  7619.  
  7620. HELP_EXP:
  7621.     echo
  7622.     echo **************************************************************************************
  7623.     echo ** The script has three methods of Checking Experience.
  7624.     echo **   The Main method is using the 'MUlTI' command, where the script will check Exp
  7625.     echo ** and switch weapons to your next set-up when needed. (See the Multi-weapon section)
  7626.     echo **
  7627.     echo **   The second method is using the 'EXP' variable. This causes the script to check the
  7628.     echo ** of the current weapon, or alternate experience (depending on the skill).  If the
  7629.     echo ** learning state of the experience is greater than 10 (dazed or mind locked) the script
  7630.     echo ** stops.
  7631.     echo **
  7632.     echo **   The third method is using the 'TRAIN' variable.  This causes the script to check
  7633.     echo ** the experience after every weapon cycle.  This method also checks after every kill.
  7634.     echo **
  7635.     echo **   The 'MULTI' command defaults to using both the 'TRAIN' and 'EXP' variable so it
  7636.     echo ** will check experience after every weapon cycle and after every kill
  7637.     echo **
  7638.     echo ** SYNTAX: .hunt EXP <weapon> (shield)
  7639.     echo ** SYNTAX: .hunt TRAIN <weapon> (shield)
  7640.     echo **
  7641.     echo ** Note: The training variables are a global variable so you can turn it on/off as you
  7642.     echo ** so desire while the script is running.  The variables are GH_EXP and GH_TRAIN
  7643.     echo ** Note2: You need the EXP plugin to make use of these functions.
  7644.     echo **************************************************************************************
  7645.     echo
  7646.     pause 5
  7647.     goto HELP
  7648.  
  7649. HELP_GLOBAL:
  7650.     echo
  7651.     echo **************************************************************************************
  7652.     echo ** Hunt makes use of global variable so that you may modify your hunting without
  7653.     echo ** having to restart the script all together.  Here is a list of all the global
  7654.     echo ** variables and the allowable values
  7655.     echo **
  7656.     echo ** GH_AMBUSH    - OFF/ON  (ambushing with weapon)
  7657.     echo ** GH_APPR      - NO/YES  (appraising creatures)
  7658.     echo ** GH_ARRANGE   - OFF/ON  (arranging before skinning)
  7659.     echo ** GH_BUN       - OFF/ON  (bundling after skinning)
  7660.     echo ** GH_DANCING   - OFF/ON  (dancing with creatures)
  7661.     echo ** GH_EXP       - OFF/ON  (experience check after kills)
  7662.     echo ** GH_LOOT      - OFF/ON  (general looting, if OFF no looting is done)
  7663.     echo ** GH_LOOT_BOX  - OFF/ON  (box looting)
  7664.     echo ** GH_LOOT_COIN - OFF/ON  (coin looting)
  7665.     echo ** GH_LOOT_GEM  - OFF/ON  (gem looting)
  7666.     echo ** GH_LOOT_JUNK - OFF/ON  (junk looting)
  7667.     echo ** GH_SPELL     - <spell> (spell to cast)
  7668.     echo ** GH_MANA      - <mana>  (mana level to prepare spell at)
  7669.     echo ** GH_HARN      - <mana>  (mana level to harness after prep)
  7670.     echo ** GH_RETREAT   - OFF/ON  (retreating for ranged/magic)
  7671.     echo ** GH_ROAM      - OFF/ON  (roaming when nothing left to kill)
  7672.     echo ** GH_SKIN      - OFF/ON  (skinning creatures)
  7673.     echo ** GH_SKIN_RET  - OFF/ON  (retreating while skinning)
  7674.     echo ** GH_SNAP      - OFF/ON  (snapcasting/snapfiring)
  7675.     echo ** GH_STANCE    - OFF/ON  (stance switching)
  7676.     echo ** GH_TARGET    - <body part> (body part to target)
  7677.     echo ** GH_TIMER     - OFF/ON  (using timing function
  7678.     echo ** GH_TRAIN     - OFF/ON  (exp checks after combat cycles)
  7679.     echo **
  7680.     echo Note: Please note values are case sensitive for all variables with the options ON/OFF/NO/YES.
  7681.     echo      For all other variables, their values are case insensitive
  7682.     echo **************************************************************************************
  7683.     echo
  7684.     pause 10
  7685.     goto HELP
  7686.  
  7687. HELP_HUNT:
  7688.     echo
  7689.     echo **************************************************************************************
  7690.     echo ** The script will use the HUNT verb every 90 seconds to train perception, stalking
  7691.     echo ** and scouting (for the Rangers).  It will hunt before your swing your weapon during
  7692.     echo ** combat.
  7693.     echo **
  7694.     echo ** SYNTAX: .hunta HUNT {weapon} (shield)
  7695.     echo **
  7696.     echo **************************************************************************************
  7697.     echo
  7698.     pause 5
  7699.     goto HELP
  7700.  
  7701. HELP_JUGGLE:
  7702.     echo
  7703.     echo **************************************************************************************
  7704.     echo ** The script can juggle while waiting for new monsters to show up for killing
  7705.     echo **
  7706.     echo ** SYNTAX: .hunt JUGGLE/YOYO {weapon} (shield)
  7707.     echo **
  7708.     echo ** You can also use yoyos as a jugglie.
  7709.     echo **
  7710.     echo ** Note:  For this to work you need to have a global variables:
  7711.     echo **                JUGGLIE = your jugglie of choice, be it standard or a yoyo
  7712.     echo **************************************************************************************
  7713.     echo
  7714.     pause 5
  7715.     goto HELP
  7716.  
  7717. HELP_LOOT:
  7718.     echo
  7719.     echo **************************************************************************************
  7720.     echo ** The Script can be set-up to loot Kills. (It always searches.)
  7721.     echo **
  7722.     echo ** SYNTAX: .hunt LOOTALL {weapon} (shield)    <--- Loots everything
  7723.     echo **
  7724.     echo ** You can also set-up the script to loot specific item types, rather than everything.
  7725.     echo ** The variables for these are:
  7726.     echo **
  7727.     echo ** COLLECTIBLE - will loot collectibles (cards/diras)
  7728.     echo ** LOOTBOX - will only loot boxes until the stow container is full
  7729.     echo ** LOOTCOIN - will only loot coins
  7730.     echo ** LOOTGEM - will only loot gems until the stow container is full
  7731.     echo ** JUNK - will loot junk items (runestones/scrolls/lockpicks etc)
  7732.     echo **
  7733.     echo ** EXAMPLE: .hunt LOOTBOX {weapon} {shield}          <--- Loot boxes but not gems or coins.
  7734.     echo ** EXAMPLE: .hunt LOOTGEM LOOTCOIN {weapon} {shield} <--- Loot coins and gems but not boxes.
  7735.     echo **
  7736.     echo ** Note: The looting variables are a global variable so you can turn it on/off as you
  7737.     echo ** so desire while the script is running.  The variables are GH_LOOT,GH_LOOT_BOX,
  7738.     echo ** GH_LOOT_COIN, GH_LOOT_GEM, and GH_LOOT_JUNK
  7739.     echo **************************************************************************************
  7740.     echo
  7741.     pause 5
  7742.     goto HELP
  7743.  
  7744. HELP_MAGIC:
  7745.     echo
  7746.     echo **************************************************************************************
  7747.     echo ** At long Last, the script can use magic. Both Targeted and none Targeted Magic, be
  7748.     echo **   they attack spells or buff spells. (LB or SOP)
  7749.     echo ** It is however limited to one spell, and the standard prep/target/cast routine.
  7750.     echo **   And The script CANNOT use weapons while a spell is being preped/targeted.
  7751.     echo ** The script can also use brawling with magic.
  7752.     echo **
  7753.     echo ** Commands:  TM/PM = You will use mainly magic to hunt.
  7754.     echo **            MAGIC = You will use mainly weapons to hunt.
  7755.     echo **                 When combined with Multi, TM checks Targeted Magic, PM/MAGIC Primary.
  7756.     echo **
  7757.     echo ** SYNTAX:   .hunt TM/PM/MAGIC <spell> <mana> <harness mana> {weapon} (shield)
  7758.     echo **
  7759.     echo ** EXAMPLES: .hunt TM FB 15 3 scimitar
  7760.     echo **           .hunt MAGIC SOP 20 swap 1 b.sword targe
  7761.     echo **           .hunt PM bolt 5 5 - uses bolt spell and brawling for weapon
  7762.     echo **
  7763.     echo ** Notes: TM/PM will hunt using magic, your weapon is a back-up and is only used when
  7764.     echo **        low on mana.
  7765.     echo **        MAGIC is a single spell cast as the weapon combo repeats.
  7766.     echo **        SNAP can be used for snap casting.
  7767.     echo **************************************************************************************
  7768.     echo
  7769.     pause 10
  7770.     goto HELP
  7771.  
  7772. HELP_MULTI:
  7773.     echo
  7774.     echo **************************************************************************************
  7775.     echo ** To set up multi weapon simply put in SET as the first variable followed by the
  7776.     echo ** hunt set-ups you want to cycle through, each set-up must be inside a set of
  7777.     echo ** quotes (""). Multi-weapon will change set-ups when you reach Dazed in the
  7778.     echo ** current weapon.
  7779.     echo ** SYNTAX:  .hunt MSET "Set-up1" "Set-up2" "Set-up3" ... "Set-up10"
  7780.     echo **        NOTE: You don't have to use all 10 available set-up spots.
  7781.     echo ** EXAMPLE: .hunt MSET "skin loot scimitar shield" "loot app brawl"
  7782.     echo **
  7783.     echo ** USE:
  7784.     echo **     Once set-up, to use the script for multi-weapon simply use the "multi" command.
  7785.     echo ** If you want to start on a set-up that isn't your first one entered simply type in
  7786.     echo ** the number of the set-up you want to start with.
  7787.     echo **
  7788.     echo ** SYNTAX: .hunt MULTI <Set-up number you want to start with>
  7789.     echo ** EXAMPLE: .hunt MULTI - starts with Set-up1
  7790.     echo ** EXAMPLE: .hunt MULTI 3 - starts with Set-up3
  7791.     echo ** I know its a bit complex. AIM: IRXSwmr EMAIL: KllrWhle79@hotmail.com
  7792.     echo **
  7793.     echo ** A note on multi word weapons:
  7794.     echo **     If a set-up contains a multi word weapon like short.bow or bastard.sword there
  7795.     echo ** is an added step to get this to work properly.
  7796.     echo **     Once you create your set-up, since it is inside quotes the . is removed making
  7797.     echo ** these one word weapons two words, and thus two variables. To fix this do the
  7798.     echo ** following.
  7799.     echo **     Go into your config window and click the "Variables" tab. Find the variable
  7800.     echo ** with your multi word weapon and re-enter the period. This will make it function
  7801.     echo ** properly when "multi" is used.  Default variables are all saved as
  7802.     echo ** GH_MULTI_<SETUP NUMBER> so they are easily findable
  7803.     echo **
  7804.     echo **************************************************************************************
  7805.     echo
  7806.     pause 10
  7807.     goto HELP
  7808.  
  7809. HELP_OFFHAND:
  7810.     echo
  7811.     echo **************************************************************************************
  7812.     echo ** The script will fight with your offhand. This function is usable with all melee
  7813.     echo ** weapons and thrown weapons. You must still specify if you want to throw the weapon
  7814.     echo ** just like the throwing function. It will use the typical combat sequence, just with
  7815.     echo ** the left hand. Shields are not usable because they provide no protect when held in
  7816.     echo ** the right hand.
  7817.     echo **
  7818.     echo ** SYNTAX: .hunt OFF {weapon}
  7819.     echo ** EXAMPLE: .hunt OFF scimitar
  7820.     echo ** EXAMPLE: .hunt OFF throw hammer
  7821.     echo **
  7822.     echo **************************************************************************************
  7823.     echo
  7824.     pause 3
  7825.     goto HELP
  7826.  
  7827. HELP_POACH:
  7828.     echo
  7829.     echo **************************************************************************************
  7830.     echo ** For those of you who like your stealth kills at range, Poaching and Sniping is
  7831.     echo ** fully operational.
  7832.     echo **
  7833.     echo ** SYNTAX: .hunt POACH {weapon} (shield(slings and LX only!)
  7834.     echo ** SYNTAX: .hunt SNIPE {weapon} (shield(LX only!)
  7835.     echo **************************************************************************************
  7836.     echo
  7837.     pause 3
  7838.     goto HELP
  7839.  
  7840. HELP_POUCH:
  7841.     echo
  7842.     echo **************************************************************************************
  7843.     echo ** This option will remove a full worn gem pouch, place it into a specified container -
  7844.     echo ** \\$GH_CONTAINER_POUCH_CONTAINER, get another gem pouch, and wear it.
  7845.     echo **
  7846.     echo ** SYNTAX: .hunt POUCH {weapon} (shield)
  7847.     echo **************************************************************************************
  7848.     echo
  7849.     pause 3
  7850.     goto HELP
  7851.  
  7852. HELP_power:
  7853.     echo
  7854.     echo **************************************************************************************
  7855.     echo ** The script will use the perceive verb to train power perception every 6 minutes
  7856.     echo **
  7857.     echo ** SYNTAX: .hunta POWERP {weapon} (shield)
  7858.     echo **
  7859.     echo **************************************************************************************
  7860.     echo
  7861.     pause 5
  7862.     goto HELP
  7863.  
  7864. HELP_ROAM:
  7865.     echo
  7866.     echo **************************************************************************************
  7867.     echo ** The script will roam a hunting area if you run out of things to kill. It will move
  7868.     echo ** throughout the current hunting area and check each room for people and critters.
  7869.     echo ** It will makes sure you have your ammo first; and if you are bundling skins, it will
  7870.     echo ** pick up one bundle to take with you.
  7871.     echo **
  7872.     echo **                         !!!!!! CAUTION !!!!!!
  7873.     echo ** The script does not check to make sure you don't leave the hunting area and enter
  7874.     echo ** other, possibly more dangerous areas. Beforewarned that if there are more difficult
  7875.     echo ** creatures in an adjacent, easily accessed area, use extreme caution with this function.
  7876.     echo ** Also, there is not 100% coverage for people hunting in hiding. Be courteous of others
  7877.     echo ** so you don't get an arrow in the face.
  7878.     echo **
  7879.     echo ** SYNTAX: .hunt ROAM {weapon} (shield)
  7880.     echo **************************************************************************************
  7881.     echo
  7882.     pause 7
  7883.     goto HELP
  7884.  
  7885. HELP_RETREAT:
  7886.     echo
  7887.     echo **************************************************************************************
  7888.     echo ** The script defaults to not staying at a distance while using ranged weapons, thrown
  7889.     echo ** weapons and magic.  If you want to stay at a distance and retreat from combat while
  7890.     echo ** doing these actions, the script can do that with the RETREAT function
  7891.     echo **
  7892.     echo ** SYNTAX: .hunt RET {weapon} (shield)
  7893.     echo **************************************************************************************
  7894.     echo
  7895.     pause 3
  7896.     goto HELP
  7897.  
  7898. HELP_SHIELD:
  7899. HELP_WEAPON:
  7900.     echo
  7901.     echo **************************************************************************************
  7902.     echo ** It works with (just about) any type of weapon in the game. Anytime you can use a
  7903.     echo ** shield, the script supports it.  The script won't even try to pull out a shield if
  7904.     echo ** you are using a two-handed weapon or bow.
  7905.     echo ** !!!WARNING!!! If you are using an arm worn shield DO NOT enter a shield name.
  7906.     echo **
  7907.     echo ** SYNTAX: .hunt {weapon} (shield)
  7908.     echo **
  7909.     echo ** Note: If you have an arm worn shield on when trying to use a bow, the script will
  7910.     echo ** remove and attempt to stow the offending shield
  7911.     echo **************************************************************************************
  7912.     echo
  7913.     pause 3
  7914.     goto HELP
  7915.  
  7916. HELP_SKIN:
  7917.     echo
  7918.     echo **************************************************************************************
  7919.     echo ** Everyone has there own method of how they skin. This script therefore has several
  7920.     echo ** options on how skinning works.
  7921.     echo ** Here are the commands for skinning, and what they do:
  7922.     echo **
  7923.     echo ** SKIN     : Skins, drops the skin if you aren't bundling
  7924.     echo ** BUNDLE   : Same as 'SKIN', but bundles the skins.  If no ropes to bundle, drops skins, drops bundles
  7925.     echo ** SKINRET  : Will make the script retreat before skinning.
  7926.     echo ** SCRAPE   : Will scrape the skins before dropping/bundling them
  7927.     echo ** ARRANGE  : Same as 'SKIN' but it arranges first, also can input number of times to arrange (1-5)
  7928.     echo ** WEAR     : Wears bundles, instead of dropping them
  7929.     echo ** TIE      : Ties bundles off before either dropping or wearing them, reduces item count
  7930.     echo **
  7931.     echo ** There is no need to use 'SKIN' if you are using one of the other options, it knows
  7932.     echo ** you're skinning.  In other words, ".hunt skin bundle" is redundant, just use
  7933.     echo ** ".hunt bundle"
  7934.     echo **
  7935.     echo ** Options can be combined for full effect.
  7936.     echo **
  7937.     echo ** EXAMPLE: .hunt ARRANGE SKINRET {weapon} - this would make the script retreat,
  7938.     echo ** arrange the kill, skin it, and drop the skin.
  7939.     echo **
  7940.     echo ** Note: If you are a ranger and you do "arrange 5" (max arranges) the script will use
  7941.     echo ** "arrange all" to arrange for minimum RT
  7942.     echo **************************************************************************************
  7943.     echo
  7944.     pause 10
  7945.     goto HELP
  7946.  
  7947. HELP_SNAP:
  7948.     echo
  7949.     echo **************************************************************************************
  7950.     echo ** For those of us who are impatient, ALL Ranged systems can be snapfired.
  7951.     echo **   Snapfiring will cause the script to aim and fire instanly after you load until
  7952.     echo ** your target is dead.
  7953.     echo **
  7954.     echo ** SNAP also works with Magic systems. It will fully prepare the spell then Target and
  7955.     echo **   Cast at the same time.
  7956.     echo **
  7957.     echo ** EXAMPLE: .hunt SNAP {weapon} (shield)-(slings and LX only!)
  7958.     echo ** EXAMPLE: .hunt SNAP poach {weapon} (shield)-(slings and LX only!)
  7959.     echo ** EXAMPLE: .hunt SNAP TM FB 15 scimitar
  7960.     echo **************************************************************************************
  7961.     echo
  7962.     pause 3
  7963.     goto HELP
  7964.  
  7965. HELP_STANCE:
  7966.     echo
  7967.     echo **************************************************************************************
  7968.     echo ** The script is able to alter your stance.
  7969.     echo ** Block - Custom - Evasion - Parry
  7970.     echo ** These commands will make the script switch to the preset Stance you enter.
  7971.     echo **
  7972.     echo ** .hunt BLOCK/CUSTOM/EVASION(or DODGE)/PARRY {weapon} (shield)
  7973.     echo **
  7974.     echo ** The script also has the function to switch stances when one is locked. It will
  7975.     echo ** determine your current stance, and then check the experience for that skill. If the
  7976.     echo ** is dazed or above, it will switch stances.  The stance switching goes in the following
  7977.     echo ** order: evasion -> shield -> parry and back
  7978.     echo **
  7979.     echo ** SYNTAX: .hunt STANCE {weapon} (shield)
  7980.     echo **
  7981.     echo ** If you would like to skip one stance, you can indicate which stance you would like to
  7982.     echo ** with the NOEVASION, NOPARRY, or NOSHIELD keywords.  This will skip the indicated
  7983.     echo ** stance.  You may only skip one stance.
  7984.     echo **
  7985.     echo ** Note: You must have the EXP plugin for this function to work
  7986.     echo **************************************************************************************
  7987.     echo
  7988.     pause 5
  7989.     goto HELP
  7990.  
  7991. HELP_SWAP:
  7992.     echo
  7993.     echo **************************************************************************************
  7994.     echo ** The script can be set-up to use swappable weapons.
  7995.     echo ** "Swap X" must be followed by the weapon.
  7996.     echo **
  7997.     echo ** SYNTAX: .hunt SWAP {SE/LE/2HE/SB/LB/2HB/POLE/S} {weapon} (shield)
  7998.     echo **
  7999.     echo ** SE = Uses weapon as Small Edged
  8000.     echo ** LE = Uses weapon as Large Edged
  8001.     echo ** 2HE = Uses weapon as Two-handed Edged
  8002.     echo ** SB = Uses weapon as Small Blunt
  8003.     echo ** LB = Uses weapon as Large Blunt
  8004.     echo ** 2HB = Uses weapon as Two-handed Blunt
  8005.     echo ** POLE = Use this weapon as a Pike
  8006.     echo ** S = Use this weapon as a Stave
  8007.     echo **
  8008.     echo ** EXAMPLES: .hunt SWAP LE sword shield - uses a sword in Large Edged mode
  8009.     echo **          .hunt SWAP POLE spear - uses a spear in Polearm Mode
  8010.     echo **************************************************************************************
  8011.     echo
  8012.     pause 3
  8013.     goto HELP
  8014.  
  8015. HELP_SYNTAX:
  8016.     echo
  8017.     echo **************************************************************************************
  8018.     echo **    This is a brief (for me anyway) description of how the script works
  8019.     echo ** and what order commands come in, as well as a list of all the commands
  8020.     echo ** the script has.
  8021.     echo **
  8022.     echo **    There are many options settings and methods of using the script,
  8023.     echo ** all of which have been programed in and can be called forth using the
  8024.     echo ** correct comamnds. Knowing those commands and how to use them is what
  8025.     echo ** this section is for.
  8026.     echo **
  8027.     echo **    'Command' refers to anything that follows .hunt when starting the script.
  8028.     echo ** There are several types of commands:
  8029.     echo **
  8030.     echo **    'General Commands' have to come before anything else, but can
  8031.     echo ** be placed in any order amongst themselves. These are basic systems
  8032.     echo ** that toggle on or off specific non-combat features.
  8033.     echo **
  8034.     echo **    'Combat Methods' come after 'General Commands' but before
  8035.     echo ** 'Combat Systems'. Methods alter a System in very specifc but minor
  8036.     echo ** ways, and can usually only be used with a specific System.
  8037.     echo **
  8038.     echo **    'Combat Systems' come After Methods, and Immediately before your
  8039.     echo ** Equipment. Systems decide how the script is going to fight. This is usually
  8040.     echo ** defined by your Equipment, but occasionlly a System is used that redefines
  8041.     echo ** how combat is undergone with Certain Equipment.
  8042.     echo **
  8043.     echo **    'Equipment' is always the last command. When the script finds your
  8044.     echo ** Equipment (usually a weapon) it begins combat after equiping you.
  8045.     echo ** Equipment is defined as the in game items you will be using to hunt with.
  8046.     echo **
  8047.     echo **    'Special' commands are.. special. They are usually systems that have
  8048.     echo ** nothing to do with combat itself, but were placed into the script as extras
  8049.     echo ** They are also the commands used to set-up some of the more complex features
  8050.     echo ** of the script.
  8051.     echo **
  8052.     echo ** Command List:
  8053.     echo ** General Commands: Appraise, Arrange, Block, Bundle, Count, Custom, Dance, Default,
  8054.     echo **                   Dodge, Evade, Exp, Lootall, Lootbox, Lootcoin, Lootgem, Retreat,
  8055.     echo **                   Junk, Multi, Parry, Roam, Target, Timer, Train
  8056.     echo ** Combat Methods: Ambush, Snapfire, Stack
  8057.     echo ** Combat Systems: Backstab, Brawl, Empath, Offhand, Snipe, Swap, Throw, TM/PM/Magic
  8058.     echo ** Spcl. Commands: MSET and MULTI (multi weapons), DSET (Default Setting), HELP,
  8059.     echo **                 DMSET and DMULTI (multi weapons with default settings)
  8060.     echo **
  8061.     echo ** SYNTAX ORDER: [] = Special Commands () = General Commands || = Combat Methods
  8062.     echo **               /\ = Combat Systems {} = Equipment
  8063.     echo **
  8064.     echo ** Basic: .hunt {weapon} {shield}
  8065.     echo ** Advan: .hunt () || /\ {}
  8066.     echo ** Spcl.: .hunt []
  8067.     echo **
  8068.     echo ** For more specifc information please refer to the individual HELP sections.
  8069.     echo **
  8070.     echo **************************************************************************************
  8071.     echo
  8072.     pause 20
  8073.     goto HELP
  8074.  
  8075. HELP_TARGET:
  8076.     echo
  8077.     echo **************************************************************************************
  8078.     echo ** So say, you want to behead all your enemies. Well hunt will help you out.
  8079.     echo ** The TARGET variable let's you specify a body part to attack. This will work with all
  8080.     echo ** types of weapons and magic.
  8081.     echo **
  8082.     echo ** SYNTAX: .hunt TARGET <body part> {weapon} (shield)
  8083.     echo ** EXAMPLE: .hunt TARGET head scimitar
  8084.     echo ** EXAMPLE: .hunt TARGET right.arm scimitar
  8085.     echo **
  8086.     echo ** Note: If the body part is multi-word (left arm), use a period (.) to separate the
  8087.     echo ** two words
  8088.     echo **************************************************************************************
  8089.     echo
  8090.     pause 5
  8091.     goto HELP
  8092.  
  8093. HELP_THROWN:
  8094.     echo
  8095.     echo **************************************************************************************
  8096.     echo ** Like to throw things? hunt can satisfy your needs!
  8097.     echo ** The system is also set up to use and handle stacks of throwing weapons. It is not
  8098.     echo ** needed to specify THROW if you are using a STACK, the script knows.
  8099.     echo **
  8100.     echo ** SYNTAX: .hunt THROW {weapon} (shield)
  8101.     echo ** SYNTAX: .hunt STACK {weapon} (shield)
  8102.     echo **************************************************************************************
  8103.     echo
  8104.     pause 3
  8105.     goto HELP
  8106.  
  8107. HELP_TIMER:
  8108.     echo
  8109.     echo **************************************************************************************
  8110.     echo ** Hunt allows for timed hunting rounds.  With the TIMER variable you can set
  8111.     echo ** a limit to how long you want to use a weapon. The timer defaults to 10 minutes,
  8112.     echo ** or 600 seconds, so you can just use that or input your own amount of time.
  8113.     echo **
  8114.     echo ** SYNTAX: .hunt TIMER <time in seconds> {weapon} (shield)
  8115.     echo ** EXAMPLE: .hunt TIMER 900 scimitar - will kill with the scimitar for 15 minutes
  8116.     echo ** EXAMPLE: .hunt TIMER scimitar - will kill with the scimitar for 10 minutes
  8117.     echo **************************************************************************************
  8118.     echo
  8119.     pause 5
  8120.     goto HELP
  8121.  
  8122. DYING:
  8123.     var DYING ON
  8124.     return
  8125.  
  8126. INCLUDES:
  8127.     include gh_armor.cmd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement