Skip to content
Outlands Hub

Razor script

SUPER Auto-Lumberjacking

by dennozz · 3514 lines
Download

SUPER Auto-lumber ver.6.14

GatheringLumberjacking
SUPER Auto-Lumberjacking.razor
1# This is an automated backup - check out https://outlands.uorazorscripts.com/script/c042fd33-b750-4cab-89dd-7fefc0e71176 for latest2# Automation by Jaseowns3## Script: SUPER Auto-Lumberjacking4## Created by: dennozz#05#############################################6 7#SUPER Auto-lumber ver.6.148 9#ver.6.14 - Added trap pouch requirement and auto trapping pouch10#ver.6.13 - Fixed bug not recalling when summoning11#ver.6.12 - Removed air, fire and daemon elementals / added detect hidden skill use12#ver.6.11 - Minor fixes13#ver.6.10 - Recalling logic fixes14#ver.6.01 - Auto summoning and auto healing re-make15#ver.6.00 - Added more variables and minor changes16 17#********** INFORMATION **********# 18 19#Made by @dennozz on discord. Feel free to msg me anytime for questions20#Inspired/learned by other scrips in https://outlands.uorazorscripts.com/21 22#IMPORTANT: You will need 1 wooden box and 1 copper key that opens the wooden box (this is for anti-theft)23#           You can craft wooden boxes with 50 carpentry and 50 tinkering24    25#IMPORTANT: You will need to create an in-game options cooldown named `Danger`. 26#Options -> Cooldowns -> New Entry -> Name: `Danger` -> Cooldown Type -> `PvP Timer` -> Done27 28#IMPORTANT: Do NOT use the check mark for text and messages filter in razor. 29#           Instead click on check-mark Enable text filter, click ADD button, then type the message you want to filter individually. CLick on the first check-mark and click okay.30 31# Recommended individual filter messages:32    33# `You are already casting a spell`34# `You are frozen and cannot move` 35# `You have not yet recovered from casting a spell`36# `You do not see any harvestable resources nearby`37 38# My Gathering template (Anti PK):39    40# Lumber - 120   # Mining - 12041# Magery - 100   # Resist - 8042# Healing - 80   # Tracking -8043# Wrestling - 80 # Spirit - 4044# Alchemy - 2045 46#********** SET YOUR SETTINGS **********# 47 48#--- Set auto recall ---#49 50# 0 - will auto recall when PKs are 40 steps or closer (medioum risk)51# 1 - will auto recall when detect PKs at any distance (low risk)52 53@setvar! autoRecall 154 55#-- Set recall type --#56# 0 - using regs (target the book)57# 1 - using scroll (target the book)58# 2 - using charge recall from first rune in book59# 3 - using charge recall from last rune in book60 61@setvar! recallType 362 63#--- Set recall object ---#64# 0 - carry one runebook | carry one rune | if multiple runes name the one you recall `home`65# 1234 - if you carry multiple runebooks or runetomes set the hue of the book you wish to recall (type `>info` to get hue info)66 67@setvar! recallBookHue 17668 69#--- If regs are low auto recall ---#70# 0 - you dont carry regs71# 123 - if below this number will recall72 73@setvar! minRegs 574 75#--- Auto split regs ---#76# 0 - you dont want to split regs into different groups 77# 1 - will auto split regs in different groups (anti-theft)78 79@setvar! autoSplitRegs 180 81# 0 - will automatically select the bag in your backpack on this order : satchel > pouch > backpack bag > round bag > char backpack82# 1 - will automatically select character main backpack only (do not work if regs are already splitted in a different bag)83# 2 - will let you target any bag84    85@setvar! autoSelectBag 086 87#--- Set Elementals Count ---#88 89@setvar! earthElementals 090@setvar! waterElementals 191@setvar! summonCreature 092 93#--- Set mushrooms ---#94 95@setvar! mushroomCount 396@setvar! eatMushWhenManaLowerThan 5097@setvar! mushroomTimerCD 6000098 99#--- Set potions ---#100 101@setvar! drinkStr 1102@setvar! strengthLowerThan 100103 104@setvar! drinkAgility 0105@setvar! drinkMagicResist 0106@setvar! drinkHeal 1107@setvar! drinkCure 1108 109@setvar! drinkRefresh 1110@setvar! drinkWhenMissingStamina 15111 112#--- Set Mage auto heals ---#113 114@setvar! miniHeal 1115@setvar! greaterHeal 1116@setvar! cureSpell 1117 118#--- Auto healing hp diffs ---#119#--- All variables refer to hit points differences ---#120#--- When below certain hit points it will trigger ---#121 122@setvar! activateAutoHealDiff 10123 124@setvar! startCastMiniHealDiff 10125@setvar! endCastMiniHealDiff 30126 127@setvar! castEmergencyMiniHealDiff 65128 129@setvar! startCastGreaterHealDiff 30130@setvar! endCastGreaterHealDiff 200131 132@setvar! drinkHealPotDiff 30133 134@setvar! interruptCastingDiff 40135 136#--- Set Mage Buffs ---#137 138@setvar! magicReflect 1139@setvar! blessSpell 0140@setvar! armorReflect 1141@setvar! protectionSpell 1142 143@setvar! miniumManaToBuff 75144 145#--- Meditation ---#146 147@setvar! useMeditationSkill 1148@setvar! meditateWhenManaBelow 50149@setvar! meditateUntilManaReach 65150 151#--- Set Cooldowns ---#152 153@setvar! storeTimerCD 100000154settimer storeTimer storeTimerCD155 156#--- Weight diff limit  ---#157 158@setvar! myWeightDiff 41159 160@setvar! enableAutoSplitter 1161 162#--- Autosplitter regs, pots, etc. Set auto select bag ---#163# 0 - will let you pick the bag164# 1 - will auto select in order : satchel > pouch > backpack bag > rounded bag > main backpack165 166@setvar! autoSelectRegBag 1167 168#--- Set auto select Potion bag ---#169# 0 - will let you pick the bag170# 1 - will auto select in order : Potions satchel > pouch > backpack bag > rounded bag > main backpack171@setvar! autoSelectPotionBag 1172 173#--- Set auto select bandage/rope bag ---#174# 0 - will let you pick the bag175# 1 - will auto select in order : satchel > pouch > backpack bag > rounded bag > main backpack176@setvar! autoSelectMiscBag 1177 178#-- Use detect hidden --#179@setvar! useDetectHidden 0180 181@setvar! detectTimerCD 1000182settimer detectTimer storeTimerCD183 184#--- Optional : Have a cooldown named `Heal Pot` ---#185 186@setvar! healingPotCD 11000187 188 189#********** DO NOT EDIT FROM HERE UNLESS YOU KNOW HOW TO SCRIPT **********#190 191@setvar! isWorldSaving 0192 193@setvar! maxwaittimeinms 650194 195@setvar! missingRegs 0196 197@setvar! foundBook 0198 199#** Recall triggers **200 201@setvar! enemyFound 0202 203@setvar! myHarvestingTool 3908204 205#-- elementals variables --#206 207removelist maxFollowersList208createlist maxFollowersList209 210@setvar! maxFollowers 0211@setvar! currentFollowers 0212 213if not varexist castingEarth or followers = 0 214    @setvar! castingEarth 0215endif216if not varexist castingWater or followers = 0 217    @setvar! castingWater 0218endif219 220if not varexist castingCreature or followers = 0 221    @setvar! castingCreature 0222endif223    224if earthElementals  = 1225    pushlist maxFollowersList x 226    pushlist maxFollowersList x 227elseif earthElementals = 2228    pushlist maxFollowersList x 229    pushlist maxFollowersList x 230    pushlist maxFollowersList x 231    pushlist maxFollowersList x232endif233 234if waterElementals = 1235    pushlist maxFollowersList x 236    pushlist maxFollowersList x 237elseif waterElementals = 2238    pushlist maxFollowersList x 239    pushlist maxFollowersList x 240    pushlist maxFollowersList x 241    pushlist maxFollowersList x242endif243 244if summonCreature = 1245    pushlist maxFollowersList x 246elseif summonCreature = 2247    pushlist maxFollowersList x 248    pushlist maxFollowersList x 249elseif summonCreature = 3250    pushlist maxFollowersList x 251    pushlist maxFollowersList x 252    pushlist maxFollowersList x 253elseif summonCreature = 4254    pushlist maxFollowersList x 255    pushlist maxFollowersList x 256    pushlist maxFollowersList x 257    pushlist maxFollowersList x 258elseif summonCreature = 5259    pushlist maxFollowersList x 260    pushlist maxFollowersList x 261    pushlist maxFollowersList x 262    pushlist maxFollowersList x 263    pushlist maxFollowersList x 264endif265 266if list maxFollowersList = 0 267    @setvar! maxFollowers 0268    269elseif list maxFollowersList = 1270    @setvar! maxFollowers 1271    272elseif list maxFollowersList = 2273    @setvar! maxFollowers 2274    275elseif list maxFollowersList = 3276    @setvar! maxFollowers 3277    278elseif list maxFollowersList = 4279    @setvar! maxFollowers 4280else 281    @setvar! maxFollowers 5282endif283 284if not varexist earthFirsty or followers = 0285    @setvar! earthFirsty 0286endif287 288if not varexist earthSecondly or followers = 0289    @setvar! earthSecondly 0290endif291 292if not varexist waterFirsty or followers = 0293    @setvar! waterFirsty 0294endif295 296if not varexist waterSecondly or followers = 0297    @setvar! waterSecondly 0298endif299 300if not varexist creatureFirsty or followers = 0301    @setvar! creatureFirsty 0302endif303 304if not varexist creatureSecondly or followers = 0305    @setvar! creatureSecondly 0306endif307 308if not varexist creatureThirdy or followers = 0309    @setvar! creatureThirdy 0310endif311 312if not varexist creatureFourthy or followers = 0313    @setvar! creatureFourthy 0314endif315 316if not varexist creatureFithy or followers = 0317    @setvar! creatureFithy 0318endif319 320#-- list creation --#321 322if not listexists earthListy or followers = 0323    removelist earthListy324    createlist earthListy325endif326 327if not listexists waterListy or followers = 0328    removelist waterListy329    createlist waterListy330endif331 332if not listexists creatureListy or followers = 0333    removelist creatureListy334    createlist creatureListy335endif336 337if maxFollowers > 5 338    overhead "Error Max Followers > 5"339    sysmsg "Error Max Followers > 5:  Check your followers settings"340    stop341endif342 343#** Script msgs timers **344 345@setvar! scriptMessageCD 4500346settimer scriptMessageTimer 0347 348@setvar! beingAttackedCD 5000349settimer beingAttackedTimer 5000350 351#--- Script msgs timers ---#352 353@setvar! overweightMessageCD 3000354settimer overweightMessageTimer overweightMessageCD355 356@setvar! noRegsMessageCD 4000357settimer noRegsMessageTimer noRegsMessageCD358 359@setvar! allGuardCD 3000360settimer allGuardTimer allGuardCD361 362@setvar! foodMessageCD 3333363settimer foodMessageTimer foodMessageCD364 365@setvar! autoHealMessageCD 4500366settimer autoHealMessageTimer 0367 368#--- Summons timers ---#369 370@setvar! summonMsgCD 1500371settimer summonMsgTimer summonMsgCD372 373#--- Resources timers ---#374 375@setvar! pouchMessageCD 2000376settimer pouchMessageTimer pouchMessageCD377 378@setvar! aidsMessageCD 2500379settimer aidsMessageTimer aidsMessageCD380 381@setvar! whiteMessageCD 3000382settimer whiteMessageTimer whiteMessageCD383 384@setvar! blueMessageCD 3500385settimer blueMessageTimer blueMessageCD386 387@setvar! blackMessageCD 4000388settimer blackMessageTimer blackMessageCD389 390@setvar! orangeMessageCD 4500391settimer orangeMessageTimer orangeMessageCD392 393@setvar! yellowMessageCD 5000394settimer yellowMessageTimer yellowMessageCD395 396@setvar! redMessageCD 5500397settimer redMessageTimer redMessageCD398 399#--- Magery buffs timers ---#400 401@setvar! magicReflectCD 15000402settimer magicReflectTimer magicReflectCD403 404@setvar! armorReflectCD 15000405settimer armorReflectTimer armorReflectCD406 407@setvar! protectionCD 15000408settimer protectionTimer protectionCD409 410@setvar! manaMessageCD 2222411settimer manaMessageTimer manaMessageCD412 413#--- Skills timers ---#414 415@setvar! spiritSpeakCD 60000416if not timerexists spiritSpeakTimer417    settimer spiritSpeakTimer spiritSpeakCD418endif419 420@setvar! meditationCD 10500421if not timerexists meditationTimer422    settimer meditationTimer meditationCD423endif424 425@setvar! meditationMessageCD 2777426if not timerexists meditationMessageTimer427    settimer meditationMessageTimer meditationMessageCD428endif429 430if not timerexists mushroomTimer431    settimer mushroomTimer mushroomTimerCD432endif433 434#********** PRE-SCRIPT FOOD BUFF AND TRACKING ON **********435 436if not findbuff "food" and findtype "tray" backpack as fody    437    dclick fody438    wait 200439endif440 441#********* CREATE MUSHROOMS *********442    443if insysmsg "You create"444endif  445 446while counttype 29012 backpack < mushroomCount and findtype 3963 self and findtype 3976 self and mana > 3447    cast 'create food'448    while not casting 449        cast 'create food'450    endwhile451    while casting452    endwhile453    wait 200454    getlabel backpack xxx455    if insysmsg! "you create"456        if insysmsg "you create a magic"457        else458            sysmsg "Wizard's Grimoire `create food` not found" 34459            @setvar! mushroomCount 0460            break 461        endif462    endif463endwhile464 465 466if not findbuff "tracking"467    468    while not gumpexists 4267467659469        sysmsg "opening tracking..." 11470        skill "tracking"471        wait maxwaittimeinms472    endwhile473 474    while not insysmsg "You will now hunt all hostile players"475        sysmsg "setting track to hostile players..." 11476        gumpresponse 8477        wait 500478        waitforgump 4267467659 maxwaittimeinms479    endwhile480    481    if ingump "Begin Hunting" 4267467659482        gumpresponse 6483        wait maxwaittimeinms484        waitforgump 4267467659 maxwaittimeinms485        wait maxwaittimeinms486        gumpclose 4267467659 487        wait 100488    endif489 490    sysmsg "* Now tracking hostile players *" 66491endif492 493#********** AUTO SPLIT REAGENTS **********# 494 495clearignore496 497if enableAutoSplitter = 1498 499    @setvar! amount 0500    @setvar! myRegBag 0501    @setvar! myPotionBag 0502    @setvar! myBandageBag 0503    504    @setvar! maxwaittimeinms 650505    506    507    if autoSelectRegBag = 1508        if findtype 30765 self as b509            @setvar! myRegBag b510        elseif findtype 3705 self as b511            @setvar! myRegBag b512        elseif findtype 3701 self as b513            @setvar! myRegBag b514        elseif findtype 3702 self as b515            @setvar! myRegBag b516        else 517            @setvar! myRegBag backpack518        endif519    else 520        clearsysmsg521        overhead "Select bag:" 68522        @setvar! myRegBag523        wait 200524        while not targetexists and not insysmsg "Select"525            @setvar! myRegBag    526        endwhile527        528        if find myRegBag self529            getlabel myRegBag bagLabel530       531            if "wizard's satchel" in bagLabel or "pouch" in bagLabel or "bag" in bagLabel or "backpack" in bagLabel532                sysmsg "new bag set" 55533            else 534                @setvar! myRegBag 0535                overhead "That is not a bag" 34536                sysmsg "That is not a bag" 34537                stop538            endif539        else 540            overhead "No bag found!" 34541            stop    542        endif543    endif544    545    if autoSelectPotionBag = 1546        if findtype 31262 self as b547            @setvar! myPotionBag b548        elseif findtype 3705 self as b549            @setvar! myPotionBag b550        elseif findtype 3701 self as b551            @setvar! myPotionBag b552        elseif findtype 3702 self as b553            @setvar! myPotionBag b554        else 555            @setvar! myPotionBag backpack556        endif557    else 558        clearsysmsg559        overhead "Select Potion bag:" 68560        @setvar! myPotionBag561        wait 200562        while not targetexists and not insysmsg "Select"563            @setvar! myPotionBag    564        endwhile565        566        if find myPotionBag self567            getlabel myPotionBag bagLabel568            569            if "alchemists satchel" in bagLabel or "pouch" in bagLabel or "bag" in bagLabel or "backpack" in bagLabel570                sysmsg "new bag set" 55571            else 572                @setvar! myPotionBag 0573                overhead "That is not a bag" 34574                sysmsg "That is not a bag" 34575                stop576            endif577        else 578            overhead "No bag found!" 34579            stop    580        endif581    endif582    583    #***** Misc Items  *****584    585    if autoSelectMiscBag = 1586        if findtype 3705 self as b587            @setvar! myMiscBag b588        elseif findtype 3701 self as b589            @setvar! myMiscBag b590        elseif findtype 3702 self as b591            @setvar! myMiscBag b592        else 593            @setvar! myMiscBag backpack594        endif595    else 596        clearsysmsg597        overhead "Select Misc bag:" 68598        @setvar! myMiscBag599        wait 200600        while not targetexists and not insysmsg "Select"601            @setvar! myMiscBag    602        endwhile603        604        if find myMiscBag self605            getlabel myMiscBag bagLabel606            607            if "wizard's satchel" in bagLabel or "pouch" in bagLabel or "bag" in bagLabel or "backpack" in bagLabel608                sysmsg "new bag set" 55609            else 610                @setvar! myMiscBag 0611                overhead "That is not a bag" 34612                sysmsg "That is not a bag" 34613                stop614            endif615        else 616            overhead "No bag found!" 34617            stop    618        endif619    endif620    621    overhead "Splitter Begin.." 55622    623    #***** SPIDER SILK 3981 *****624    625    @setvar! regsID 3981626    @setvar! myCounter 0627    628    while findtype regsID self as r 629        @setvar! myCounter index630        @ignore r631    endwhile632    @clearignore633    634    if counttype regsID self <= 10635        @setvar! amount 2636    elseif counttype regsID self <= 20637        @setvar! amount 4       638    elseif counttype regsID self <= 50639        @setvar! amount 10    640    elseif counttype regsID self <= 100641        @setvar! amount 20    642    elseif counttype regsID self <= 150643        @setvar! amount 30644    elseif counttype regsID self <= 200645        @setvar! amount 40646    else 647        @setvar! amount 50648    endif649    650    while findtype regsID self as regs651        @setvar! moveRegs 0 652        653        if myCounter = 0654            @setvar! moveRegs 1655        elseif myCounter != 0 and not find regs myRegBag656            @setvar! moveRegs 1657        endif658        659        if moveRegs = 1    660            overhead "splitting silks.." 0661            if index = 0662                lift regs amount663                drop myRegBag 44 65 0      664            elseif index = 1665                lift regs amount666                drop myRegBag 68 65 0           667            elseif index = 2668                lift regs amount669                drop myRegBag 96 65 0             670            elseif index = 3671                lift regs amount672                drop myRegBag 121 65 0            673            else674                lift regs amount675                drop myRegBag 142 65 0         676            endif677        endif678        679        @ignore regs 680        681        if moveRegs = 1682            wait maxwaittimeinms683        endif684    endwhile685    686    #***** BLACK PEARL 3962 *****687    688    @setvar! regsID 3962689    @setvar! myCounter 0690    691    while findtype regsID self as r 692        @setvar! myCounter index693        @ignore r694    endwhile695    @clearignore696    697    if counttype regsID self <= 10698        @setvar! amount 2699    elseif counttype regsID self <= 20700        @setvar! amount 4       701    elseif counttype regsID self <= 50702        @setvar! amount 10    703    elseif counttype regsID self <= 100704        @setvar! amount 20    705    elseif counttype regsID self <= 150706        @setvar! amount 30707    elseif counttype regsID self <= 200708        @setvar! amount 40709    else 710        @setvar! amount 50711    endif712    713    while findtype regsID self as regs714        @setvar! moveRegs 0 715        716        if myCounter = 0717            @setvar! moveRegs 1718        elseif myCounter != 0 and not find regs myRegBag719            @setvar! moveRegs 1720        endif721        722        if moveRegs = 1    723            overhead "splitting pearls.." 11724            if index = 0725                lift regs amount726                drop myRegBag 44 65 0      727            elseif index = 1728                lift regs amount729                drop myRegBag 68 65 0           730            elseif index = 2731                lift regs amount732                drop myRegBag 96 65 0             733            elseif index = 3734                lift regs amount735                drop myRegBag 121 65 0            736            else737                lift regs amount738                drop myRegBag 142 65 0         739            endif740        endif741        742        @ignore regs 743        744        if moveRegs = 1745            wait maxwaittimeinms746        endif747    endwhile748    749    #***** NIGHTSHADE 3976 *****750    751    @setvar! regsID 3976752    @setvar! myCounter 0753    754    while findtype regsID self as r 755        @setvar! myCounter index756        @ignore r757    endwhile758    @clearignore759    760    if counttype regsID self <= 10761        @setvar! amount 2762    elseif counttype regsID self <= 20763        @setvar! amount 4       764    elseif counttype regsID self <= 50765        @setvar! amount 10    766    elseif counttype regsID self <= 100767        @setvar! amount 20    768    elseif counttype regsID self <= 150769        @setvar! amount 30770    elseif counttype regsID self <= 200771        @setvar! amount 40772    else 773        @setvar! amount 50774    endif775    776    while findtype regsID self as regs777        @setvar! moveRegs 0 778        779        if myCounter = 0780            @setvar! moveRegs 1781        elseif myCounter != 0 and not find regs myRegBag782            @setvar! moveRegs 1783        endif784        785        if moveRegs = 1    786            overhead "splitting shades.." 66787            if index = 0788                lift regs amount789                drop myRegBag 44 88 0      790            elseif index = 1791                lift regs amount792                drop myRegBag 68 88 0           793            elseif index = 2794                lift regs amount795                drop myRegBag 96 88 0             796            elseif index = 3797                lift regs amount798                drop myRegBag 121 88 0            799            else800                lift regs amount801                drop myRegBag 142 88 0         802            endif803        endif804        805        @ignore regs 806        807        if moveRegs = 1808            wait maxwaittimeinms809        endif810    811    endwhile812    813    #***** MANDRAKE ROOT 3974 *****814    815    @setvar! regsID 3974816    @setvar! myCounter 0817    818    while findtype regsID self as r 819        @setvar! myCounter index820        @ignore r821    endwhile822    @clearignore823    824    if counttype regsID self <= 10825        @setvar! amount 2826    elseif counttype regsID self <= 20827        @setvar! amount 4       828    elseif counttype regsID self <= 50829        @setvar! amount 10    830    elseif counttype regsID self <= 100831        @setvar! amount 20    832    elseif counttype regsID self <= 150833        @setvar! amount 30834    elseif counttype regsID self <= 200835        @setvar! amount 40836    else 837        @setvar! amount 50838    endif839    840    while findtype regsID self as regs841        @setvar! moveRegs 0 842        843        if myCounter = 0844            @setvar! moveRegs 1845        elseif myCounter != 0 and not find regs myRegBag846            @setvar! moveRegs 1847        endif848        849        if moveRegs = 1    850            overhead "splitting roots.." 439851            if index = 0852                lift regs amount853                drop myRegBag 44 88 0      854            elseif index = 1855                lift regs amount856                drop myRegBag 68 88 0           857            elseif index = 2858                lift regs amount859                drop myRegBag 96 88 0             860            elseif index = 3861                lift regs amount862                drop myRegBag 121 88 0            863            else864                lift regs amount865                drop myRegBag 142 88 0         866            endif867        endif868        869        @ignore regs 870        871        if moveRegs = 1872            wait maxwaittimeinms873        endif874    875    endwhile876    877    #***** SULFUROUS ASH 3980 *****878    879    @setvar! regsID 3980880    @setvar! myCounter 0881    882    while findtype regsID self as r 883        @setvar! myCounter index884        @ignore r885    endwhile886    @clearignore887    888    if counttype regsID self <= 10889        @setvar! amount 2890    elseif counttype regsID self <= 20891        @setvar! amount 4       892    elseif counttype regsID self <= 50893        @setvar! amount 10    894    elseif counttype regsID self <= 100895        @setvar! amount 20    896    elseif counttype regsID self <= 150897        @setvar! amount 30898    elseif counttype regsID self <= 200899        @setvar! amount 40900    else 901        @setvar! amount 50902    endif903    904    while findtype regsID self as regs905        @setvar! moveRegs 0 906        907        if myCounter = 0908            @setvar! moveRegs 1909        elseif myCounter != 0 and not find regs myRegBag910            @setvar! moveRegs 1911        endif912        913        if moveRegs = 1    914            overhead "splitting ashes.." 56915            if index = 0916                lift regs amount917                drop myRegBag 44 112 0      918            elseif index = 1919                lift regs amount920                drop myRegBag 68 112 0           921            elseif index = 2922                lift regs amount923                drop myRegBag 96 112 0             924            elseif index = 3925                lift regs amount926                drop myRegBag 121 112 0            927            else928                lift regs amount929                drop myRegBag 142 112 0         930            endif931        endif932        933        @ignore regs 934        935        if moveRegs = 1936            wait maxwaittimeinms937        endif938    939    endwhile940    941    #***** GINSENG 3973 *****942    943    @setvar! regsID 3973944    @setvar! myCounter 0945    946    while findtype regsID self as r 947        @setvar! myCounter index948        @ignore r949    endwhile950    @clearignore951    952    if counttype regsID self <= 10953        @setvar! amount 2954    elseif counttype regsID self <= 20955        @setvar! amount 4       956    elseif counttype regsID self <= 50957        @setvar! amount 10    958    elseif counttype regsID self <= 100959        @setvar! amount 20    960    elseif counttype regsID self <= 150961        @setvar! amount 30962    elseif counttype regsID self <= 200963        @setvar! amount 40964    else 965        @setvar! amount 50966    endif967    968    while findtype regsID self as regs969        @setvar! moveRegs 0 970        971        if myCounter = 0972            @setvar! moveRegs 1973        elseif myCounter != 0 and not find regs myRegBag974            @setvar! moveRegs 1975        endif976        977        if moveRegs = 1    978            overhead "splitting gings.." 149979            if index = 0980                lift regs amount981                drop myRegBag 44 112 0      982            elseif index = 1983                lift regs amount984                drop myRegBag 68 112 0           985            elseif index = 2986                lift regs amount987                drop myRegBag 96 112 0             988            elseif index = 3989                lift regs amount990                drop myRegBag 121 112 0            991            else992                lift regs amount993                drop myRegBag 142 112 0         994            endif995        endif996        997        @ignore regs 998        999        if moveRegs = 11000            wait maxwaittimeinms1001        endif1002    1003    endwhile1004    1005    #***** BLOSSMOSS 3963 *****1006    1007    @setvar! regsID 39631008    @setvar! myCounter 01009    1010    while findtype regsID self as r 1011        @setvar! myCounter index1012        @ignore r1013    endwhile1014    @clearignore1015    1016    if counttype regsID self <= 101017        @setvar! amount 21018    elseif counttype regsID self <= 201019        @setvar! amount 4       1020    elseif counttype regsID self <= 501021        @setvar! amount 10    1022    elseif counttype regsID self <= 1001023        @setvar! amount 20    1024    elseif counttype regsID self <= 1501025        @setvar! amount 301026    elseif counttype regsID self <= 2001027        @setvar! amount 401028    else 1029        @setvar! amount 501030    endif1031    1032    while findtype regsID self as regs1033        @setvar! moveRegs 0 1034        1035        if myCounter = 01036            @setvar! moveRegs 11037        elseif myCounter != 0 and not find regs myRegBag1038            @setvar! moveRegs 11039        endif1040        1041        if moveRegs = 1    1042            overhead "splitting bloods.." 351043            if index = 01044                lift regs amount1045                drop myRegBag 44 130 0      1046            elseif index = 11047                lift regs amount1048                drop myRegBag 68 130 0           1049            elseif index = 21050                lift regs amount1051                drop myRegBag 96 130 0             1052            elseif index = 31053                lift regs amount1054                drop myRegBag 121 130 0            1055            else1056                lift regs amount1057                drop myRegBag 142 130 0         1058            endif1059        endif1060        1061        @ignore regs 1062        1063        if moveRegs = 11064            wait maxwaittimeinms1065        endif1066    1067    endwhile1068    1069    #***** GARILIC 3972 *****1070    1071    @setvar! regsID 39721072    @setvar! myCounter 01073    1074    while findtype regsID self as r 1075        @setvar! myCounter index1076        @ignore r1077    endwhile1078    @clearignore1079    1080    if counttype regsID self <= 101081        @setvar! amount 21082    elseif counttype regsID self <= 201083        @setvar! amount 4       1084    elseif counttype regsID self <= 501085        @setvar! amount 10    1086    elseif counttype regsID self <= 1001087        @setvar! amount 20    1088    elseif counttype regsID self <= 1501089        @setvar! amount 301090    elseif counttype regsID self <= 2001091        @setvar! amount 401092    else 1093        @setvar! amount 501094    endif1095    1096    while findtype regsID self as regs1097        @setvar! moveRegs 0 1098        1099        if myCounter = 01100            @setvar! moveRegs 11101        elseif myCounter != 0 and not find regs myRegBag1102            @setvar! moveRegs 11103        endif1104        1105        if moveRegs = 1    1106            overhead "splitting garlics.." 9101107            if index = 01108                lift regs amount1109                drop myRegBag 44 130 0      1110            elseif index = 11111                lift regs amount1112                drop myRegBag 68 130 0           1113            elseif index = 21114                lift regs amount1115                drop myRegBag 96 130 0             1116            elseif index = 31117                lift regs amount1118                drop myRegBag 121 130 0            1119            else1120                lift regs amount1121                drop myRegBag 142 130 0         1122            endif1123        endif1124        @ignore regs 1125        1126        if moveRegs = 11127            wait maxwaittimeinms1128        endif1129    1130    endwhile1131    1132    #***** RECALL SCROLL 8012 *****1133    1134    @setvar! regsID 80121135    @setvar! myCounter 01136    1137    while findtype regsID self as r 1138        @setvar! myCounter index1139        @ignore r1140    endwhile1141    @clearignore1142    1143    if counttype regsID self <= 51144        @setvar! amount 11145    elseif counttype regsID self <= 101146        @setvar! amount 2       1147    elseif counttype regsID self <= 201148        @setvar! amount 4    1149    elseif counttype regsID self <= 401150        @setvar! amount 8    1151    else 1152        @setvar! amount 151153    endif1154    1155    while findtype regsID self as regs1156        @setvar! moveRegs 0 1157        1158        if myCounter = 01159            @setvar! moveRegs 11160        elseif myCounter != 0 and not find regs myRegBag1161            @setvar! moveRegs 11162        endif1163        if moveRegs = 1    1164            overhead "splitting scrolls.." 01165            if index = 01166                lift regs amount1167                drop myRegBag 44 88 0      1168            elseif index = 11169                lift regs amount1170                drop myRegBag 68 88 0           1171            elseif index = 21172                lift regs amount1173                drop myRegBag 96 88 0             1174            elseif index = 31175                lift regs amount1176                drop myRegBag 121 88 0            1177            else1178                lift regs amount1179                drop myRegBag 142 88 0         1180            endif1181        endif1182        1183        @ignore regs 1184        1185        if moveRegs = 11186            wait maxwaittimeinms1187        endif1188    endwhile1189    1190    1191    #***** Greater Heal 3852 *****1192    1193    @setvar! regsID 38521194    @setvar! myCounter 01195    1196    while findtype regsID self as r 1197        @setvar! myCounter index1198        @ignore r1199    endwhile1200    @clearignore1201    1202    if counttype regsID self <= 101203        @setvar! amount 21204    elseif counttype regsID self <= 201205        @setvar! amount 4       1206    elseif counttype regsID self <= 501207        @setvar! amount 10    1208    elseif counttype regsID self <= 1001209        @setvar! amount 20    1210    elseif counttype regsID self <= 1501211        @setvar! amount 301212    elseif counttype regsID self <= 2001213        @setvar! amount 401214    else 1215        @setvar! amount 501216    endif1217    1218    while findtype regsID self as regs1219        @setvar! moveRegs 0 1220        1221        if myCounter = 01222            @setvar! moveRegs 11223        elseif myCounter != 0 and not find regs myPotionBag1224            @setvar! moveRegs 11225        endif1226        1227        if moveRegs = 1    1228            overhead "splitting Greater Heal.." 481229            if index = 01230                lift regs amount1231                drop myPotionBag 44 65 0      1232            elseif index = 11233                lift regs amount1234                drop myPotionBag 68 65 0           1235            elseif index = 21236                lift regs amount1237                drop myPotionBag 96 65 0             1238            elseif index = 31239                lift regs amount1240                drop myPotionBag 121 65 0            1241            else1242                lift regs amount1243                drop myPotionBag 142 65 0         1244            endif1245        endif1246        1247        @ignore regs 1248        1249        if moveRegs = 11250            wait maxwaittimeinms1251        endif1252    1253    endwhile1254    1255    #***** Greater Cure 3847 *****1256    1257    @setvar! regsID 38471258    @setvar! myCounter 01259    1260    while findtype regsID self as r 1261        @setvar! myCounter index1262        @ignore r1263    endwhile1264    @clearignore1265    1266    if counttype regsID self <= 101267        @setvar! amount 21268    elseif counttype regsID self <= 201269        @setvar! amount 4       1270    elseif counttype regsID self <= 501271        @setvar! amount 10    1272    elseif counttype regsID self <= 1001273        @setvar! amount 20    1274    elseif counttype regsID self <= 1501275        @setvar! amount 301276    elseif counttype regsID self <= 2001277        @setvar! amount 401278    else 1279        @setvar! amount 501280    endif1281    1282    while findtype regsID self as regs1283        @setvar! moveRegs 0 1284        1285        if myCounter = 01286            @setvar! moveRegs 11287        elseif myCounter != 0 and not find regs myPotionBag1288            @setvar! moveRegs 11289        endif1290        1291        if moveRegs = 1    1292            overhead "splitting Greater Cure.." 441293            if index = 01294                lift regs amount1295                drop myPotionBag 44 65 0      1296            elseif index = 11297                lift regs amount1298                drop myPotionBag 68 65 0           1299            elseif index = 21300                lift regs amount1301                drop myPotionBag 96 65 0             1302            elseif index = 31303                lift regs amount1304                drop myPotionBag 121 65 0            1305            else1306                lift regs amount1307                drop myPotionBag 142 65 0         1308            endif1309        endif1310        1311        @ignore regs 1312        1313        if moveRegs = 11314            wait maxwaittimeinms1315        endif1316    1317    endwhile1318    1319    1320    #***** Greater Agility 3848 *****1321    1322    @setvar! regsID 38481323    @setvar! myCounter 01324    1325    while findtype regsID self as r 1326        @setvar! myCounter index1327        @ignore r1328    endwhile1329    @clearignore1330    1331    if counttype regsID self <= 101332        @setvar! amount 11333    elseif counttype regsID self <= 201334        @setvar! amount 2       1335    elseif counttype regsID self <= 501336        @setvar! amount 4    1337    elseif counttype regsID self <= 1001338        @setvar! amount 10    1339    elseif counttype regsID self <= 1501340        @setvar! amount 201341    elseif counttype regsID self <= 2001342        @setvar! amount 301343    else 1344        @setvar! amount 401345    endif1346    1347    while findtype regsID self as regs1348        @setvar! moveRegs 0 1349        1350        if myCounter = 01351            @setvar! moveRegs 11352        elseif myCounter != 0 and not find regs myPotionBag1353            @setvar! moveRegs 11354        endif1355        1356        if moveRegs = 1    1357            overhead "splitting Greater Agility.." 931358            if index = 01359                lift regs amount1360                drop myPotionBag 44 88 0      1361            elseif index = 11362                lift regs amount1363                drop myPotionBag 68 88 0           1364            elseif index = 21365                lift regs amount1366                drop myPotionBag 96 88 0             1367            elseif index = 31368                lift regs amount1369                drop myPotionBag 121 88 0            1370            else1371                lift regs amount1372                drop myPotionBag 142 88 0         1373            endif1374        endif1375        1376        @ignore regs 1377        1378        if moveRegs = 11379            wait maxwaittimeinms1380        endif1381    1382    endwhile1383    1384    1385    #***** Total Refresh 3851 *****1386    1387    @setvar! regsID 38511388    @setvar! myCounter 01389    1390    while findtype regsID self as r 1391        @setvar! myCounter index1392        @ignore r1393    endwhile1394    @clearignore1395    1396    if counttype regsID self <= 101397        @setvar! amount 21398    elseif counttype regsID self <= 201399        @setvar! amount 4       1400    elseif counttype regsID self <= 501401        @setvar! amount 10    1402    elseif counttype regsID self <= 1001403        @setvar! amount 20    1404    elseif counttype regsID self <= 1501405        @setvar! amount 301406    elseif counttype regsID self <= 2001407        @setvar! amount 401408    else 1409        @setvar! amount 501410    endif1411    1412    while findtype regsID self as regs1413        @setvar! moveRegs 0 1414        1415        if myCounter = 01416            @setvar! moveRegs 11417        elseif myCounter != 0 and not find regs myPotionBag1418            @setvar! moveRegs 11419        endif1420        1421        if moveRegs = 1    1422            overhead "splitting Total Refresh.." 381423            if index = 01424                lift regs amount1425                drop myPotionBag 44 88 0      1426            elseif index = 11427                lift regs amount1428                drop myPotionBag 68 88 0           1429            elseif index = 21430                lift regs amount1431                drop myPotionBag 96 88 0             1432            elseif index = 31433                lift regs amount1434                drop myPotionBag 121 88 0            1435            else1436                lift regs amount1437                drop myPotionBag 142 88 0         1438            endif1439        endif1440        1441        @ignore regs 1442        1443        if moveRegs = 11444            wait maxwaittimeinms1445        endif1446    1447    endwhile1448    1449    1450    1451    #***** Greater Magic Resist 3846 *****1452    1453    @setvar! regsID 38461454    @setvar! myCounter 01455    1456    while findtype regsID self as r 1457        @setvar! myCounter index1458        @ignore r1459    endwhile1460    @clearignore1461    1462    if counttype regsID self <= 101463        @setvar! amount 11464    elseif counttype regsID self <= 201465        @setvar! amount 2       1466    elseif counttype regsID self <= 501467        @setvar! amount 5   1468    elseif counttype regsID self <= 1001469        @setvar! amount 10    1470    elseif counttype regsID self <= 1501471        @setvar! amount 201472    elseif counttype regsID self <= 2001473        @setvar! amount 301474    else 1475        @setvar! amount 401476    endif1477    1478    while findtype regsID self as regs1479        @setvar! moveRegs 0 1480        1481        if myCounter = 01482            @setvar! moveRegs 11483        elseif myCounter != 0 and not find regs myPotionBag1484            @setvar! moveRegs 11485        endif1486        1487        if moveRegs = 1    1488            overhead "splitting Greater Magic Resist.." 8971489            if index = 01490                lift regs amount1491                drop myPotionBag 44 112 0      1492            elseif index = 11493                lift regs amount1494                drop myPotionBag 68 112 0           1495            elseif index = 21496                lift regs amount1497                drop myPotionBag 96 112 0             1498            elseif index = 31499                lift regs amount1500                drop myPotionBag 121 112 0            1501            else1502                lift regs amount1503                drop myPotionBag 142 112 0         1504            endif1505        endif1506        1507        @ignore regs 1508        1509        if moveRegs = 11510            wait maxwaittimeinms1511        endif1512    1513    endwhile1514    1515    1516    #***** Greater Strength 3849 *****1517    1518    @setvar! regsID 38491519    @setvar! myCounter 01520    1521    while findtype regsID self as r 1522        @setvar! myCounter index1523        @ignore r1524    endwhile1525    @clearignore1526    1527    if counttype regsID self <= 101528        @setvar! amount 21529    elseif counttype regsID self <= 201530        @setvar! amount 4       1531    elseif counttype regsID self <= 501532        @setvar! amount 10    1533    elseif counttype regsID self <= 1001534        @setvar! amount 20    1535    elseif counttype regsID self <= 1501536        @setvar! amount 301537    elseif counttype regsID self <= 2001538        @setvar! amount 401539    else 1540        @setvar! amount 501541    endif1542    1543    while findtype regsID self as regs1544        @setvar! moveRegs 0 1545        1546        if myCounter = 01547            @setvar! moveRegs 11548        elseif myCounter != 0 and not find regs myPotionBag1549            @setvar! moveRegs 11550        endif1551        1552        if moveRegs = 1    1553            overhead "splitting Greater Strength.." 20411554            if index = 01555                lift regs amount1556                drop myPotionBag 44 112 0      1557            elseif index = 11558                lift regs amount1559                drop myPotionBag 68 112 0           1560            elseif index = 21561                lift regs amount1562                drop myPotionBag 96 112 0             1563            elseif index = 31564                lift regs amount1565                drop myPotionBag 121 112 0            1566            else1567                lift regs amount1568                drop myPotionBag 142 112 0         1569            endif1570        endif1571        1572        @ignore regs 1573        1574        if moveRegs = 11575            wait maxwaittimeinms1576        endif1577    1578    endwhile1579    1580    1581    #***** Greater Explode 3853 *****1582    1583    @setvar! regsID 38531584    @setvar! myCounter 01585    1586    while findtype regsID self as r 1587        @setvar! myCounter index1588        @ignore r1589    endwhile1590    @clearignore1591    1592    if counttype regsID self <= 101593        @setvar! amount 21594    elseif counttype regsID self <= 201595        @setvar! amount 4       1596    elseif counttype regsID self <= 501597        @setvar! amount 10    1598    elseif counttype regsID self <= 1001599        @setvar! amount 20    1600    elseif counttype regsID self <= 1501601        @setvar! amount 301602    elseif counttype regsID self <= 2001603        @setvar! amount 401604    else 1605        @setvar! amount 501606    endif1607    1608    while findtype regsID self as regs1609        @setvar! moveRegs 0 1610        1611        if myCounter = 01612            @setvar! moveRegs 11613        elseif myCounter != 0 and not find regs myPotionBag1614            @setvar! moveRegs 11615        endif1616        1617        if moveRegs = 1    1618            overhead "splitting Greater Explode.." 12751619            if index = 01620                lift regs amount1621                drop myPotionBag 44 130 0      1622            elseif index = 11623                lift regs amount1624                drop myPotionBag 68 130 0           1625            elseif index = 21626                lift regs amount1627                drop myPotionBag 96 130 0             1628            elseif index = 31629                lift regs amount1630                drop myPotionBag 121 130 0            1631            else1632                lift regs amount1633                drop myPotionBag 142 130 0         1634            endif1635        endif1636        1637        @ignore regs 1638        1639        if moveRegs = 11640            wait maxwaittimeinms1641        endif1642    1643    endwhile1644    1645    1646    1647    #***** Lethal Poison 3850 *****1648    1649    @setvar! regsID 38501650    @setvar! myCounter 01651    1652    while findtype regsID self as r 1653        @setvar! myCounter index1654        @ignore r1655    endwhile1656    @clearignore1657    1658    if counttype regsID self <= 101659        @setvar! amount 21660    elseif counttype regsID self <= 201661        @setvar! amount 4       1662    elseif counttype regsID self <= 501663        @setvar! amount 10    1664    elseif counttype regsID self <= 1001665        @setvar! amount 20    1666    elseif counttype regsID self <= 1501667        @setvar! amount 301668    elseif counttype regsID self <= 2001669        @setvar! amount 401670    else 1671        @setvar! amount 501672    endif1673    1674    while findtype regsID self as regs1675        @setvar! moveRegs 0 1676        1677        if myCounter = 01678            @setvar! moveRegs 11679        elseif myCounter != 0 and not find regs myPotionBag1680            @setvar! moveRegs 11681        endif1682        1683        if moveRegs = 1    1684            overhead "splitting Lethal Poison.." 12671685            if index = 01686                lift regs amount1687                drop myPotionBag 44 130 0      1688            elseif index = 11689                lift regs amount1690                drop myPotionBag 68 130 0           1691            elseif index = 21692                lift regs amount1693                drop myPotionBag 96 130 0             1694            elseif index = 31695                lift regs amount1696                drop myPotionBag 121 130 0            1697            else1698                lift regs amount1699                drop myPotionBag 142 130 0         1700            endif1701        endif1702        @ignore regs 1703        1704        if moveRegs = 11705            wait maxwaittimeinms1706        endif1707    endwhile1708    1709    1710    #***** Bandages 3617 *****1711    1712    @setvar! regsID 36171713    @setvar! myCounter 01714    1715    while findtype regsID self as r 1716        @setvar! myCounter index1717        @ignore r1718    endwhile1719    @clearignore1720    1721    if counttype regsID self <= 101722        @setvar! amount 21723    elseif counttype regsID self <= 201724        @setvar! amount 4       1725    elseif counttype regsID self <= 501726        @setvar! amount 10    1727    elseif counttype regsID self <= 1001728        @setvar! amount 20    1729    elseif counttype regsID self <= 1501730        @setvar! amount 301731    elseif counttype regsID self <= 2001732        @setvar! amount 401733    else 1734        @setvar! amount 501735    endif1736    1737    while findtype regsID self as regs1738        @setvar! moveRegs 0 1739        1740        if myCounter = 01741            @setvar! moveRegs 11742        elseif myCounter != 0 and not find regs myMiscBag1743            @setvar! moveRegs 11744        endif1745        1746        if moveRegs = 1    1747            overhead "splitting Bandages.." 01748            if index = 01749                lift regs amount1750                drop myMiscBag 44 65 0      1751            elseif index = 11752                lift regs amount1753                drop myMiscBag 68 65 0           1754            elseif index = 21755                lift regs amount1756                drop myMiscBag 96 65 0             1757            elseif index = 31758                lift regs amount1759                drop myMiscBag 121 65 0            1760            else1761                lift regs amount1762                drop myMiscBag 142 65 0         1763            endif1764        endif1765        1766        @ignore regs 1767        1768        if moveRegs = 11769            wait maxwaittimeinms1770        endif1771    1772    endwhile1773    1774    #***** Rope 5370 *****1775    1776    @setvar! regsID 53701777    @setvar! myCounter 01778    1779    while findtype regsID self as r 1780        @setvar! myCounter index1781        @ignore r1782    endwhile1783    @clearignore1784    1785    if counttype regsID self <= 101786        @setvar! amount 21787    elseif counttype regsID self <= 201788        @setvar! amount 4       1789    elseif counttype regsID self <= 501790        @setvar! amount 10    1791    elseif counttype regsID self <= 1001792        @setvar! amount 20    1793    elseif counttype regsID self <= 1501794        @setvar! amount 301795    elseif counttype regsID self <= 2001796        @setvar! amount 401797    else 1798        @setvar! amount 501799    endif1800    1801    while findtype regsID self as regs1802        @setvar! moveRegs 0 1803        1804        if myCounter = 01805            @setvar! moveRegs 11806        elseif myCounter != 0 and not find regs myMiscBag1807            @setvar! moveRegs 11808        endif1809        1810        if moveRegs = 1    1811            overhead "splitting Rope.." 3601812            if index = 01813                lift regs amount1814                drop myMiscBag 44 65 0      1815            elseif index = 11816                lift regs amount1817                drop myMiscBag 68 65 0           1818            elseif index = 21819                lift regs amount1820                drop myMiscBag 96 65 0             1821            elseif index = 31822                lift regs amount1823                drop myMiscBag 121 65 0            1824            else1825                lift regs amount1826                drop myMiscBag 142 65 0         1827            endif1828        endif1829        1830        @ignore regs 1831        1832        if moveRegs = 11833            wait maxwaittimeinms1834        endif1835    endwhile1836    1837    overhead "Splitter completed" 01838 1839endif1840 1841sysmsg "* auto-lumber activated *" 661842overhead "* auto-lumber activated *" 661843 1844clearsysmsg1845clearhands both1846 1847while not dead 1848    settimer cycleTimer 01849    1850    if targetexists1851        hotkey 'cancel current target'  1852    endif1853    1854    if enemyFound = 01855        if insysmsg! "Now tracking" or insysmsg! "Distance to"1856            @setvar! enemyFound 11857        endif1858    endif1859 1860#********** TRIGGER AUTO-RECALL IF BEING ATTACKED / OUT OF REGS / ENEMY TOO CLOSE **********1861    1862    if cooldown "Danger" > 0 1863        if timer beingAttackedTimer > beingAttackedCD1864            sysmsg "* being attacked *" 341865            settimer beingAttackedTimer 01866        endif1867        @setvar! autoRecall 11868        @setvar! enemyFound 11869    endif  1870    1871    if minRegs != 01872        if counttype 3963 self <= minRegs or counttype 3973 self <= minRegs or counttype 3972 self <= minRegs or counttype 3980 self <= minRegs or counttype 3962 self <= minRegs or counttype 3981 self <= minRegs or counttype 3974 self <= minRegs or counttype 3976 self <= minRegs1873            overhead "* low reagents *" 341874            sysmsg " *low reagents recalling out *" 341875            1876            @setvar! autoRecall 11877            @setvar! enemyFound 11878        endif1879    endif1880    1881    if insysmsg ": 0 s" or insysmsg ": 1 s" or insysmsg ": 2 s" or insysmsg ": 3 s" or insysmsg ": 4 s" or insysmsg ": 5 s" or insysmsg ": 6 s" or insysmsg ": 7 s" or insysmsg ": 8 s" or insysmsg ": 9 s"1882        sysmsg "* recalling enemy very close [d 0-9] *" 331883        @setvar! autoRecall 11884        @setvar! enemyFound 11885    elseif insysmsg ": 10 s" or insysmsg ": 11 s" or insysmsg ": 12 s" or insysmsg ": 13 s" or insysmsg ": 14 s" or insysmsg ": 15 s" or insysmsg ": 16 s" or insysmsg ": 17 s"1886        sysmsg "* recalling enemy very close [d 10-17] *" 331887        @setvar! autoRecall 11888        @setvar! enemyFound 11889    elseif insysmsg ": 18 s" or insysmsg ": 19 s" or insysmsg ": 20 s" or insysmsg ": 21 s" or insysmsg ": 22 s" or insysmsg ": 23 s" or insysmsg ": 24 s" or insysmsg ": 25 s"1890        sysmsg "* recalling enemy very close [d 18-25] *" 331891        @setvar! autoRecall 11892        @setvar! enemyFound 11893    elseif insysmsg ": 26 s" or insysmsg ": 27 s" or insysmsg ": 28 s" or insysmsg ": 29 s" or insysmsg ": 30 s" or insysmsg ": 31 s" or insysmsg ": 32 s" or insysmsg ": 33 s"1894        sysmsg "* recalling enemy very close [d 26-33] *" 331895        @setvar! autoRecall 11896        @setvar! enemyFound 11897    elseif insysmsg ": 34 s" or insysmsg ": 35 s" or insysmsg ": 36 s" or insysmsg ": 37 s" or insysmsg ": 38 s" or insysmsg ": 39 s" or insysmsg ": 40 s"1898        sysmsg "* recalling enemy very close [d 34-40] *" 331899        @setvar! autoRecall 11900        @setvar! enemyFound 11901    elseif insysmsg "(0 s" or insysmsg "(1 s" or insysmsg "(2 s" or insysmsg "(3 s" or insysmsg "(4 s" or insysmsg "(5 s" or insysmsg "(6 s" or insysmsg "(7 s" or insysmsg "(8 s" or insysmsg "(9 s"1902        sysmsg "* recalling enemy very close [n 0-9] *" 331903        @setvar! autoRecall 11904        @setvar! enemyFound 11905    elseif insysmsg "(10 s" or insysmsg "(11 s" or insysmsg "(12 s" or insysmsg "(13 s" or insysmsg "(14 s" or insysmsg "(15 s" or insysmsg "(16 s" or insysmsg "(17 s"1906        sysmsg "* recalling enemy very close [n 10-17] *" 331907        @setvar! autoRecall 11908        @setvar! enemyFound 11909    elseif insysmsg "(18 s" or insysmsg "(19 s" or insysmsg "(20 s" or insysmsg "(21 s" or insysmsg "(22 s" or insysmsg "(23 s" or insysmsg "(24 s" or insysmsg "(25 s"1910        sysmsg "* recalling enemy very close [n 18-25] *" 331911        @setvar! autoRecall 11912        @setvar! enemyFound 11913    elseif insysmsg "(26 s" or insysmsg "(27 s" or insysmsg "(28 s" or insysmsg "(29 s" or insysmsg "(30 s" or insysmsg "(31 s" or insysmsg "(32 s" or insysmsg "(33 s"1914        sysmsg "* recalling enemy very close [n 26-33] *" 331915        @setvar! autoRecall 11916        @setvar! enemyFound 11917    elseif insysmsg "(34 s" or insysmsg "(35 s" or insysmsg "(36 s" or insysmsg "(37 s" or insysmsg "(38 s" or insysmsg "(39 s" or insysmsg "(40 s"1918        sysmsg "* recalling enemy very close [n 34-40] *" 331919        @setvar! autoRecall 11920        @setvar! enemyFound 11921    endif1922    1923#********** AUTO-RECALL OUT IF NECESSARY **********1924    1925    if enemyFound = 1 and autoRecall = 11926        sysmsg "recalling..." 661927        interrupt1928        clearignore1929        if targetexists1930            hotkey 'cancel current target'  1931            wait 2501932        endif1933        1934        while mana <= 10 and diffhits < activateAutoHealDiff1935            overhead "* low mana to recall *" 441936            wait maxwaittimeinms1937        endwhile1938        1939#********** USING REAGENTS OR RECALL SCROLL ********** 1940 1941        if insysmsg "that location is blocked"1942        endif1943        if insysmsg "charges"1944        endif1945        if insysmsg "Your concentration is disturbed"1946        endif1947        if insysmsg "marked"1948        endif1949 1950        if recallType = 0 or recallType = 11951        1952            while not casting1953                if recallType = 01954                    cast 'recall'1955                    #sysmsg "recalling using regs" 111956                else 1957                    dclicktype "recall" self1958                    #sysmsg "recalling using scroll" 111959                endif1960            endwhile 1961            1962            while not targetexists1963                if insysmsg "Your concentration is disturbed"1964                    interrupt1965                    break                1966                endif            1967            endwhile1968            1969            if targetexists and findtype "runebook|runetome" backpack as obj1970                1971                while findtype "runebook|runetome" backpack as book 1972                    if hue book = recallBookHue                          1973                        target book1974                        wait 2501975                        break1976                    endif                              1977                    @ignore book                           1978                endwhile1979                1980                clearignore1981                1982                if insysmsg "marked"1983                    sysmsg "Runebook is not marked! Mark the book NOW!" 161984                elseif insysmsg "blocked"1985                    sysmsg "Location Blocked! Now using book charge first rune!" 161986                    @setvar! recallType 21987                elseif not findtype 3974 self or not findtype 3962 self or not findtype 3963 self 1988                    sysmsg "No reagents! Now using book charge first rune!"1989                    @setvar! recallType 21990                elseif targetexists1991                    sysmsg "Hued Book not found. Switching to any book hue" 161992                    @setvar! recallBookHue 01993                else 1994                    overhead "Successful" 65 1995                    sysmsg "Lumberjacking Completed!" 65 1996                    stop  1997                endif                    1998                1999            elseif targetexists and findtype "recall rune" backpack as obj2000                @setvar! tempRune 0  2001 2002                while findtype "recall rune" backpack as obj2003                    getlabel obj runeLabel  2004                    if "blank" in runeLabel2005                    else 2006                        if "home" in runeLabel2007                            target obj2008                            @setvar! tempRune obj  2009                            break2010                        endif2011                        @setvar! tempRune obj    2012                    endif2013                    @ignore obj2014                endwhile2015                2016                @clearignore2017                wait 2502018                2019                if tempRune = 0 2020                    sysmsg "No recalleable rune found" 342021                    hotkey "cancel current target"                2022                elseif insysmsg "blocked" 2023                    sysmsg "Location Blocked!" 342024                else2025                    overhead "Successful" 65 2026                    sysmsg "Lumberjacking Completed!" 65    2027                    stop2028                endif                                     2029                                                     2030            elseif targetexists2031                sysmsg "No recall book or rune found" 342032                stop2033            endif2034 2035        elseif recallType = 2 or recallType = 32036 2037#********** USING RECALL BOOK CHARGE **********   2038            2039            if findtype "runebook|runetome" backpack2040            2041                while diffhits < activateAutoHealDiff2042                    @setvar! foundBook 02043                    2044                    while findtype "runebook" backpack as book2045                        if hue book = recallBookHue or recallBookHue = 02046                            dclick book backpack2047                            waitforgump 1551740969 maxwaittimeinms2048                            2049                            if recallType = 22050                                gumpresponse 2 2051                            elseif recallType = 32052                                gumpresponse 922053                            endif2054                            2055                            @setvar! foundBook book2056                            break2057                        else 2058                            @ignore book2059                        endif2060                    endwhile2061                    2062                    while foundBook = 0 and findtype "runetome" backpack as book2063                        if gumpexists 1670900272064                            gumpclose 1670900272065                            wait 2502066                        endif2067                        2068                        if hue book = recallBookHue or recallBookHue = 02069                            dclick book backpack2070                            waitforgump 167090027 maxwaittimeinms2071                            2072                            if recallType = 22073                                gumpresponse 100 2074                            elseif recallType = 3 2075                                gumpresponse 1252076                            endif2077                            2078                            @setvar! foundBook book2079                            break2080                        else 2081                            @ignore book2082                        endif2083                    endwhile2084                    2085                    wait 2502086                    clearignore2087                    2088                    while casting2089                    endwhile2090                    2091                    wait 2502092                    2093                    if foundBook = 0 2094                        sysmsg "Recall book not found!" 34   2095                        sysmsg "Switching to type 0 using reagents" 552096                    elseif insysmsg "charges"2097                        sysmsg "No recall charges!" 342098                        sysmsg "Switching to type 0 using reagents" 552099                    elseif insysmsg "This book"2100                        sysmsg "Recall book cooldown!" 342101                    else2102                        if insysmsg "concentration"2103                            sysmsg "Interrupted!" 342104                        elseif insysmsg "location"2105                            sysmsg "Location blocked!" 2106                            if recallType = 2 2107                                @setvar! recallType 3 2108                                sysmsg "Switching to type 3 last rune charge" 552109                            else2110                                @setvar! recallType 22111                                sysmsg "Switching to type 2 first rune charge" 552112                            endif2113                        else2114                            overhead "Successful" 65 2115                            sysmsg "Lumberjacking Completed!" 652116                            stop2117                        endif2118                    endif2119                endwhile2120            else 2121                overhead "No runebook or runetome found to use charge!" 342122            endif2123        else 2124            overhead "Variable 'recallType' value out of range" 342125        endif                     2126    endif2127    2128#********** AUTO HEALING START  **********#         2129 2130    while diffhits >= activateAutoHealDiff or paralyzed or poisoned2131        if dead2132            stop2133        endif2134        2135        if not findtype 3972 or not findtype 3962  or not findtype 3963 or not findtype 3980 or not findtype 3976 or not findtype 3973 or not findtype 3974 or not findtype 3981 2136            @setvar! missingRegs 12137            if timer noRegsMessageTimer > noRegsMessageCD2138                overhead "* Missing Reagents *" 342139                settimer noRegsMessageTimer 02140            endif2141        endif2142        2143        @setvar! castingInterrupted 02144        2145        if timer allGuardTimer > allGuardCD and followers > 02146            sysmsg "heal loop: all guard"2147            say 'ALL Guard ME' 882148            settimer allGuardTimer 02149        endif2150        2151        if timer autoHealMessageTimer > autoHealMessageCD2152            overhead "* auto-healing *" 902153            settimer autoHealMessageTimer 02154        endif   2155    2156        if not findbuff "food" 2157            if findtype "tray" backpack as fody    2158                dclick fody2159                wait 2002160            else 2161                if timer foodMessageTimer > foodMessageCD2162                    overhead "No food found!" 342163                    settimer foodMessageTimer 02164                endif2165            endif2166        endif2167        2168        #--- Drink str pot ---#2169        2170        if drinkStr = 1 and str < strengthLowerThan2171            if not findbuff "Strength" 2172                if findtype "White Potion" self2173                    dclicktype "White Potion"2174                    wait 2002175                else2176                    if timer whiteMessageTimer > whiteMessageCD2177                        overhead "Out of str pots" 342178                        settimer whiteMessageTimer 0 2179                    endif2180                endif2181            endif2182        endif2183        2184        #--- Drink agility pot ---#2185        2186        if drinkAgility = 12187            if not findbuff "Agility" 2188                if findtype "Blue Potion" self2189                    dclicktype "Blue Potion"2190                    wait 2002191                else2192                    if timer blueMessageTimer > blueMessageCD2193                        overhead "Out of agility pots" 342194                        settimer blueMessageTimer 0 2195                    endif2196                endif2197            endif2198        endif2199            2200        #--- Drink magic resist pot ---#2201    2202        if drinkMagicResist = 12203            if not findbuff "Magic Resist" 2204                if findtype "Black Potion" self2205                    dclicktype "Black Potion"2206                    wait 2002207                else2208                    if timer blackMessageTimer > blackMessageCD2209                        overhead "Out of resist pots" 342210                        settimer blackMessageTimer 02211                    endif2212                endif2213            endif2214        endif2215        2216        #--- Drink red pot ---#2217        2218        if diffstam > drinkWhenMissingStamina and 1 = drinkRefresh2219            if findtype "Red Potion" self2220                dclicktype "Red Potion"2221                wait 2002222            else2223                if timer redMessageTimer > redMessageCD2224                    overhead "Out of refresh pots" 342225                    settimer redMessageTimer 0 2226                endif2227            endif2228        endif2229        2230        #--- Trapped ---#2231        2232        if paralyzed 2233            if findtype "pouch" backpack 38 2234                yell "[pouch"            2235                wait 2002236            else2237                if timer pouchMessageTimer > pouchMessageCD2238                    overhead "Out of Pouches!" 342239                    settimer pouchMessageTimer 02240                endif2241            endif2242        endif2243            2244        #--- Self bandage ---#2245        2246        if diffhits >= 1 and not bandaging2247            if skill 'healing' >= 50 or skill "veterinary" >= 502248                if findtype 'clean bandage%s%' backpack2249                2250                    if targetexists2251                        hotkey 'cancel current target'  2252                    endif2253                    dclicktype 'clean bandage%s%'2254                    waitfortarget maxwaittimeinms2255                    target 'self'2256                    wait 200            2257                else2258                    if timer aidsMessageTimer > aidsMessageCD2259                        overhead "Out of bandages" 342260                        settimer aidsMessageTimer 02261                    endif2262                endif2263            endif2264        endif2265            2266        #--- Poisoned ---#2267        2268        if 1 = drinkCure or 1 = cureSpell2269            while poisoned2270                if findtype "Orange Potion" self2271                    2272                    dclicktype "Orange Potion"2273                    wait 2002274                else2275                    if timer orangeMessageTimer > orangeMessageCD2276                        overhead "Out of cure pots" 342277                        settimer orangeMessageTimer 02278                    endif2279                    2280                    if diffhits >= 30 or not findtype 3972 self or not findtype 3973 self2281                        break2282                    endif2283                    2284                    if skill 'magery' >= 40 and mana >= 6 and 1 = cureSpell and not casting2285                        cast 'cure'2286                        wait 502287                        while not casting                   2288                            if targetexists2289                                hotkey 'cancel current target'2290                            endif2291                            cast 'cure'  2292                            wait 502293                        endwhile  2294                        while not targetexists and casting2295                        endwhile2296                        waitfortarget maxwaittimeinms2297                        target 'self' 2298                        wait 2002299                    else 2300                        break2301                    endif2302                endif2303            endwhile2304        endif2305            2306        #--- Drink Heal Pot ---#2307        2308        if diffhits >= drinkHealPotDiff and 1 = drinkHeal2309            if findtype "Yellow Potion" self as hPot2310                getlabel hPot potLabel2311                if "next" in potLabel2312                    #do nothing2313                else2314                    @setvar! ch 02315                    2316                    if counttype 3852 self as c2317                        @setvar! ch c2318                    endif2319                    if insysmsg "potion satchel used"2320                    endif2321                    2322                    dclicktype 38522323                    getlabel backpack xxx2324                    wait 2002325                                2326                    if ch != counttype 3852 self or insysmsg "potion satchel used"2327                        cooldown "Heal Pot" healingPotCD2328                    endif2329                endif2330            else2331                if timer yellowMessageTimer > yellowMessageCD2332                    overhead "Out of heals pots" 342333                    settimer yellowMessageTimer 02334                endif2335            endif2336        endif2337            2338        #--- Cast heals ---#2339        2340        if skill 'magery' >= 40 and diffhits >= startCastMiniHealDiff and diffhits < endCastMiniHealDiff and mana >= 4 and miniHeal = 1 and not casting2341            if insysmsg "Your concentration is disturbed"2342            endif  2343            2344            sysmsg 'mini heal' 112345            cast 'heal'2346            while not casting                   2347                if targetexists2348                    hotkey 'cancel current target'2349                endif2350                cast 'heal'2351            endwhile  2352            2353            while not targetexists2354                if insysmsg "Your concentration is disturbed"2355                    interrupt2356                    @setvar! castingInterrupted 12357                    break                2358                endif2359            endwhile2360            2361            if 0 = castingInterrupted2362                target 'self' 2363            endif 2364            2365        elseif skill 'magery' >= 40 and diffhits >= castEmergencyMiniHealDiff and mana >= 4 and miniHeal = 1 and not casting2366            if insysmsg "Your concentration is disturbed"2367            endif  2368            sysmsg "mini heal" 112369            cast 'heal'2370            while not casting                   2371                if targetexists2372                    hotkey 'cancel current target'2373                endif2374                cast 'heal'2375            endwhile  2376            2377            while not targetexists2378                if insysmsg "Your concentration is disturbed"2379                    interrupt2380                    @setvar! castingInterrupted 12381                    break                2382                endif2383            endwhile2384            2385            if 0 = castingInterrupted2386                target 'self' 2387            endif 2388            2389        elseif skill 'magery' >= 60 and diffhits >= startCastGreaterHealDiff and diffhits < endCastGreaterHealDiff and mana >= 11 and greaterHeal = 1 and not casting2390            if insysmsg "Your concentration is disturbed"2391            endif  2392                        2393            sysmsg "greater heal" 112394            cast 'greater heal'         2395            while not casting                   2396                if targetexists2397                    hotkey 'cancel current target'2398                endif2399                cast 'greater heal'2400            endwhile  2401            2402            @settimer! spellTimer 0  2403            @setvar! spellCD 800  2404            2405            while not targetexists2406                if insysmsg "Your concentration is disturbed"2407                    interrupt2408                    @setvar! castingInterrupted 12409                    break                2410                endif 2411                2412                if timer spellTimer < spellCD2413                    #--- Poisoned ---#2414                    2415                    if 1 = drinkCure2416                        while poisoned and casting and not targetexists 2417                            if findtype "Orange Potion" self2418                                dclicktype "Orange Potion"2419                                wait 2002420                            else2421                                if timer orangeMessageTimer > orangeMessageCD2422                                    overhead "Out of cure pots" 342423                                    settimer orangeMessageTimer 02424                                endif2425                                break2426                            endif2427                        endwhile2428                    endif            2429                2430                    #--- Drink Heal Pot ---#2431                    2432                    if diffhits >= drinkHealPotDiff and 1 = drinkHeal and casting and not targetexists2433                        if findtype "Yellow Potion" self as hPot2434                            getlabel hPot potLabel2435                            if "next" in potLabel2436                                #do nothing2437                            else2438                                @setvar! ch 02439                                2440                                if counttype 3852 self as c2441                                    @setvar! ch c2442                                endif2443                                if insysmsg "potion satchel used"2444                                endif2445            2446                                dclicktype 38522447                                getlabel backpack xxx2448                                wait 2002449                                            2450                                if ch != counttype 3852 self or insysmsg "potion satchel used"2451                                    cooldown "Heal Pot" healingPotCD2452                                    if diffhits < activateAutoHealDiff2453                                        interrupt2454                                        if targetexists2455                                            hotkey 'cancel current target'2456                                        endif2457                                    endif2458                                endif2459                            endif2460                        else2461                            if timer yellowMessageTimer > yellowMessageCD2462                                overhead "Out of heals pots" 342463                                settimer yellowMessageTimer 02464                            endif2465                        endif2466                    endif2467                endif2468            endwhile2469            2470            if 0 = castingInterrupted2471                target 'self' 2472            endif 2473        2474        endif 2475    2476    endwhile2477    2478    @setvar! castingInterrupted 02479    2480    while findtype 3705 backpack as pouchy and diffhits < activateAutoHealDiff and findtype 3972 self and findtype 3973 and findtype 39802481        if hue pouchy = 38    2482        else2483            cast 'magic trap'    2484            while not casting                   2485                if targetexists2486                    hotkey 'cancel current target'2487                endif2488                cast 'magic trap'2489            endwhile 2490            2491            while not targetexists2492                if insysmsg "Your concentration is disturbed"2493                    interrupt2494                    @setvar! castingInterrupted 12495                    break                2496                endif2497            endwhile2498            2499            if 0 = castingInterrupted2500                target pouchy 2501            endif 2502        endif2503        @ignore pouchy2504        2505    endwhile2506    2507    clearignore 2508    2509#********** AUTO-MAGERY BUFFS IF NEEDED **********          2510    @setvar! castingInterrupted 02511    2512    if magicReflect = 1 and skill 'magery' >= 70 and not findbuff "Magic Reflection" and mana >= miniumManaToBuff and diffhits < activateAutoHealDiff and timer magicReflectTimer > magicReflectCD and findtype 3972 self and findtype 3974 self and findtype 3981 self2513        if insysmsg "that spell will not"2514        endif2515        if insysmsg "that spell is already"2516        endif2517        sysmsg "magic reflect" 112518        cast 'Magic Reflection'2519        while not casting 2520            getlabel backpack xxx2521            wait 2002522            if insysmsg "that spell will not" or insysmsg "that spell is already"2523                settimer magicReflectTimer 02524                break  2525            endif2526            if targetexists2527                hotkey 'cancel current target'2528            endif2529            cast 'Magic Reflection'2530        endwhile 2531        2532        while casting 2533            if diffhits >= interruptCastingDiff2534                interrupt2535                @setvar! castingInterrupted 1 2536                break2537            endif            2538            #--- Poisoned ---#2539            2540            if 1 = drinkCure2541                while poisoned and casting and not targetexists 2542                    if findtype "Orange Potion" self2543                        sysmsg "pot cure - reflect" 112544                        dclicktype "Orange Potion"2545                        wait 2002546                    else2547                        if timer orangeMessageTimer > orangeMessageCD2548                            overhead "Out of cure pots" 342549                            settimer orangeMessageTimer 02550                        endif2551                        break2552                    endif2553                endwhile2554            endif            2555        2556            #--- Drink Heal Pot ---#2557            2558            if diffhits >= drinkHealPotDiff and 1 = drinkHeal and casting and not targetexists2559                if findtype "Yellow Potion" self as hPot2560                    getlabel hPot potLabel2561                    if "next" in potLabel2562                        #do nothing2563                    else2564                        @setvar! ch 02565                        2566                        if counttype 3852 self as c2567                            @setvar! ch c2568                        endif2569                        if insysmsg "potion satchel used"2570                        endif2571                        sysmsg "pot heal - reflect" 112572                        dclicktype 38522573                        getlabel backpack xxx2574                        wait 2002575                                    2576                        if ch != counttype 3852 self or insysmsg "potion satchel used"2577                            cooldown "Heal Pot" healingPotCD2578                        endif2579                    endif2580                else2581                    if timer yellowMessageTimer > yellowMessageCD2582                        overhead "Out of heals pots" 342583                        settimer yellowMessageTimer 02584                    endif2585                endif2586            endif2587            2588        endwhile2589        wait 200  2590  2591    endif2592    2593    if armorReflect = 1 and skill 'magery' >= 30 and not findbuff "Reactive Armor" and mana >= miniumManaToBuff and diffhits < activateAutoHealDiff and timer armorReflectTimer > armorReflectCD and findtype 3980 self and findtype 3972 self and findtype 3981 self2594        if insysmsg "that spell will not"2595        endif2596        if insysmsg "that spell is already"2597        endif2598        sysmsg "reflect armor" 112599        cast 'Reactive Armor'2600        while not casting   2601            getlabel backpack xxx2602            wait 2002603            if insysmsg "that spell will not" or insysmsg "that spell is already"2604                settimer armorReflectTimer 02605                break  2606            endif2607            if targetexists2608                hotkey 'cancel current target'2609            endif2610            cast 'Reactive Armor'2611        endwhile  2612        2613        while casting 2614        endwhile2615        getlabel backpack xxx2616        wait 200  2617    endif     2618    2619    if protectionSpell = 1 and skill 'magery' >= 40 and not findbuff "Protection" and mana >= miniumManaToBuff and diffhits < activateAutoHealDiff and findtype 3980 self and findtype 3972 self and findtype 3973 self2620        sysmsg "protect" 112621        cast 'Protection'2622        while not casting2623            if targetexists2624                hotkey 'cancel current target'2625            endif2626            cast 'Protection'2627        endwhile  2628        while casting2629        endwhile2630        wait 200  2631    endif 2632    2633    if blessSpell = 1 and skill 'magery' >= 50 and not findbuff "Cunning" and mana >= miniumManaToBuff and diffhits < activateAutoHealDiff and findtype 3972 self and findtype 3974 self2634        sysmsg "bless" 112635        cast 'Bless'         2636        while not casting                  2637            if targetexists2638                hotkey 'cancel current target'2639            endif2640            cast 'Bless'2641            wait 502642        endwhile  2643        2644        while not targetexists and casting2645        endwhile2646        2647        waitfortarget maxwaittimeinms2648        target 'self' 2649        wait 200  2650    endif  2651 2652#********** CHECK FOR WOODEN BOX & CAST SUMMONS ********** 2653 2654    if not findtype "wooden box" backpack or not findtype "copper key" backpack2655        overhead "Need 1 wooden box and 1 copper key to begin!" 332656        wait maxwaittimeinms     2657    elseif not findtype 3705 backpack2658        overhead "No pouches found for trap"2659        wait maxwaittimeinms2660    elseif counttype 2474 backpack > 1 or counttype 4110 backpack > 1 2661         overhead "You have more than 2 wooden boxes or more than 2 copper keys" 332662         wait maxwaittimeinms       2663    elseif findtype "wooden box" backpack as chest and findtype "copper key" backpack as key2664        getlabel chest chestLabel2665        if "items" in chestLabel2666            dclick key2667            waitfortarget maxwaittimeinms2668            target chest2669            wait maxwaittimeinms2670            overhead "[chest locked]" 552671        endif2672 2673#********** START AUTO SUMMONING **********# 2674 2675        while followers < maxFollowers and diffhits < activateAutoHealDiff2676        2677            if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 02678                break2679            endif  2680            2681            #--- Eat Food ---#2682    2683            if not findbuff "food" 2684                if findtype "tray" backpack as fody    2685                    dclick fody2686                    wait 2002687                else 2688                    if timer foodMessageTimer > foodMessageCD2689                        overhead "No food found!" 342690                        settimer foodMessageTimer 02691                    endif2692                endif2693            endif2694            2695            #--- Drink str pot ---#2696            2697            if drinkStr = 1 and str < strengthLowerThan2698                if not findbuff "Strength" 2699                    if findtype "White Potion" self2700                        dclicktype "White Potion"2701                        wait 2002702                    else2703                        if timer whiteMessageTimer > whiteMessageCD2704                            overhead "Out of str pots" 342705                            settimer whiteMessageTimer 0 2706                        endif2707                    endif2708                endif2709            endif2710            2711            #--- Drink agility pot ---#2712            2713            if drinkAgility = 12714                if not findbuff "Agility" 2715                    if findtype "Blue Potion" self2716                        dclicktype "Blue Potion"2717                        wait 2002718                    else2719                        if timer blueMessageTimer > blueMessageCD2720                            overhead "Out of agility pots" 342721                            settimer blueMessageTimer 0 2722                        endif2723                    endif2724                endif2725            endif2726                2727            #--- Drink magic resist pot ---#2728        2729            if drinkMagicResist = 12730                if not findbuff "Magic Resist" 2731                    if findtype "Black Potion" self2732                        dclicktype "Black Potion"2733                        wait 2002734                    else2735                        if timer blackMessageTimer > blackMessageCD2736                            overhead "Out of resist pots" 342737                            settimer blackMessageTimer 02738                        endif2739                    endif2740                endif2741            endif2742            2743            #--- Drink red pot ---#2744            2745            if diffstam > drinkWhenMissingStamina and 1 = drinkRefresh2746                if findtype "Red Potion" self2747                    dclicktype "Red Potion"2748                    wait 2002749                else2750                    if timer redMessageTimer > redMessageCD2751                        overhead "Out of refresh pots" 342752                        settimer redMessageTimer 0 2753                    endif2754                endif2755            endif2756            2757            #--- Create mushroom ---#2758            2759            if insysmsg "You create"2760            endif   2761            2762            while counttype 29012 backpack < mushroomCount and findtype 3963 self and findtype 3976 self and mana > 32763                cast 'create food'2764                while not casting 2765                    cast 'create food'2766                endwhile2767                while casting2768                endwhile2769                wait 2002770                getlabel backpack xxx2771                if insysmsg! "you create"2772                    if insysmsg "you create a magic"2773                    else2774                        sysmsg "Wizard's Grimoire `create food` not found" 342775                        @setvar! mushroomCount 02776                        break 2777                    endif2778                endif2779            endwhile2780            2781            #--- Eat Mushroom ---#2782         2783            if mana < eatMushWhenManaLowerThan and mushroomCount > 0 and timer mushroomTimer > mushroomTimerCD2784                if counttype 29012 backpack2785                    if insysmsg "You consume a magic mushroom"2786                    endif2787                    sysmsg "Eating mush." 442788                    dclicktype 29012 backpack2789                    getlabel backpack xxx2790                    wait 2002791                    2792                    if insysmsg "You consume a magic mushroom"2793                        settimer mushroomTimer 02794                    endif2795                else 2796                    overhead "No mushrooms found!" 342797                endif2798            endif2799            2800            #--- Use Meditation ---#2801            2802            if 0 = useMeditationSkill and mana < 50 2803                break2804            elseif 1 = useMeditationSkill and mana < 50 and not findbuff "meditating" and timer meditationTimer > meditationCD2805                if insysmsg "you are at peace"2806                endif2807                if insysmsg "you enter a meditative trance"2808                endif2809                if insysmsg "You must wait a few moments to use another skill."2810                endif2811                2812                skill 'meditation'2813                getlabel backpack xxx2814                wait 2002815                if not findbuff 'meditating'2816                    settimer meditationTimer 75002817                elseif findbuff 'meditating'2818                    warmode on2819                    warmode off2820                    settimer meditationTimer 02821                    while mana < 50 and diffhits < activateAutoHealDiff2822                        if not findbuff 'meditating'2823                            break2824                        endif2825                        if timer meditationMessageTimer > meditationMessageCD2826                            overhead "* actively meditating *" 112827                            settimer meditationMessageTimer 02828                        endif2829                    endwhile2830                endif2831            endif 2832            2833            #--- Check for new elementals ---#2834            2835            if 1 = castingEarth and followers > 12836                sysmsg "fixing earth" 442837                while findtype 158|14 ground -1 -1 12 as ele 2838                    menu ele 12839                    waitfortarget maxwaittimeinms2840                    if targetexists 2841                        if ele != earthFirsty and ele != earthSecondly2842                            hotkey 'cancel current target'2843                            2844                            if earthFirsty = 0 2845                                @setvar! earthFirsty ele2846                                sysmsg "add earth 1" 112847                                overhead "Earth 1" 634 ele2848                            else 2849                                @setvar! earthSecondly ele2850                                sysmsg "add earth 2" 112851                                overhead "Earth 2" 634 ele2852                            endif2853                            2854                            break2855                        endif2856                    endif2857                    @ignore ele2858                endwhile    2859                @clearignore2860                @setvar! castingEarth 02861                2862            elseif 1 = castingWater and followers > 12863                sysmsg "fixing water" 442864                while findtype 740|16 ground -1 -1 12 as ele 2865                    menu ele 12866                    waitfortarget maxwaittimeinms2867                    if targetexists 2868                        if ele != waterFirsty and ele != waterSecondly2869                            hotkey 'cancel current target'2870                            2871                            if waterFirsty = 0 2872                                @setvar! waterFirsty ele2873                                sysmsg "add water 1" 112874                                overhead "Water 1" 399 ele2875                            else 2876                                @setvar! waterSecondly ele2877                                sysmsg "add water 2" 112878                                overhead "Water 2" 399 ele2879                            endif2880                            2881                            break2882                        endif2883                    endif2884                    @ignore ele2885                endwhile2886                @clearignore2887                @setvar! castingWater 02888                2889            elseif 1 = castingCreature and followers > 02890                sysmsg "fixing creature" 442891                while findtype 215|211|302|317|225|212|202|213|716|729|51|74|214|206|776|737|718|739|718|29|776|317|302|39|56|26|3|57|50|382|717|736|270 ground -1 -1 12 as ele 2892                    menu ele 12893                    waitfortarget maxwaittimeinms2894                    if targetexists 2895                        if ele != creatureFirsty and ele != creatureSecondly and ele != creatureThirdy and ele != creatureFourthy and ele != creatureFithy2896                            hotkey 'cancel current target'2897                            wait 502898                            menu ele 32899                            if creatureFirsty = 0 2900                                @setvar! creatureFirsty ele2901                                sysmsg "Creature 1" 112902                                overhead "Creature 1" 11 ele2903                            elseif creatureSecondly = 0 2904                                @setvar! creatureSecondly ele2905                                sysmsg "add creature 2" 112906                                overhead "Creature 2" 11 ele2907                            elseif creatureThirdy = 0 2908                                @setvar! creatureThirdy ele2909                                sysmsg "add creature 3" 112910                                overhead "Creature 3" 11 ele2911                            elseif creatureFourthy = 0 2912                                @setvar! creatureFourthy ele2913                                sysmsg "add creature 4" 112914                                overhead "Creature 4" 11 ele2915                            elseif creatureFithy = 0 2916                                @setvar! creatureFithy ele2917                                sysmsg "add creature 5" 112918                                overhead "Creature 5" 11 ele2919                            endif2920                            2921                            break2922                        endif2923                    endif2924                    @ignore ele2925                endwhile 2926                @clearignore2927                @setvar! castingCreature 02928            endif2929            2930            #--- Check for dead elementals ---#2931            2932            if earthFirsty != 0 and dead earthFirsty2933                if list earthListy != 02934                    poplist earthListy 'front' 2935                    sysmsg "pop earth 1"2936                endif 2937                @setvar! earthFirsty 02938            endif2939                2940            if earthSecondly != 0 and dead earthSecondly2941                if list earthListy != 02942                    poplist earthListy 'front'  2943                    sysmsg "pop earth 2"2944                endif  2945                @setvar! earthSecondly 02946            endif2947                2948            if waterFirsty != 0 and dead waterFirsty2949                if list waterListy != 02950                    poplist waterListy 'front'  2951                    sysmsg "pop water 1"2952                endif2953                @setvar! waterFirsty 02954            endif2955                2956            if waterSecondly != 0 and dead waterSecondly2957                if list waterListy != 02958                    poplist waterListy 'front' 2959                    sysmsg "pop water 2"2960                endif2961                @setvar! waterSecondly 02962            endif2963                2964            if creatureFirsty != 0 and dead creatureFirsty 2965                if list creatureListy != 02966                    poplist creatureListy 'front'2967                    sysmsg "pop creature 1"2968                endif 2969                @setvar! creatureFirsty 02970            endif2971                2972            if creatureSecondly != 0 and dead creatureSecondly 2973                if list creatureListy != 02974                    poplist creatureListy 'front'2975                    sysmsg "pop creature 2"2976                endif 2977                @setvar! creatureSecondly 02978            endif2979                2980            if creatureThirdy != 0 and dead creatureThirdy 2981                if list creatureListy != 02982                    poplist creatureListy 'front'2983                    sysmsg "pop creature 3"2984                endif 2985                @setvar! creatureThirdy 02986            endif2987                2988            if creatureFourthy != 0 and dead creatureFourthy 2989                if list creatureListy != 02990                    poplist creatureListy 'front'2991                    sysmsg "pop creature 4"2992                endif 2993                @setvar! creatureFourthy 02994            endif2995                2996            if creatureFithy != 0 and dead creatureFithy 2997                if list creatureListy != 02998                    poplist creatureListy 'front'2999                    sysmsg "pop creature 5"3000                endif 3001                @setvar! creatureFithy 03002            endif3003            3004            @clearsysmsg3005            @setvar! wasInterrupted 03006            3007            if list earthListy = 0 3008                #sysmsg "Earth List = 0"3009            elseif list earthListy = 13010                #sysmsg "Earth List = 1"3011            elseif list earthListy = 23012                #sysmsg "Earth List = 2"3013            endif3014            3015            if list waterListy = 0 3016                #sysmsg "Water List = 0"3017            elseif list waterListy = 13018                #sysmsg "Water List = 1"3019            elseif list waterListy = 23020                #sysmsg "Water List = 2"3021            endif3022            3023            if list creatureListy = 0 3024                #sysmsg "Creature List = 0"3025            elseif list creatureListy = 13026                #sysmsg "Creature List = 1"3027            elseif list creatureListy = 23028                #sysmsg "Creature List = 2"3029            elseif list creatureListy = 23030                #sysmsg "Creature List = 2"3031            elseif list creatureListy = 23032                #sysmsg "Creature List = 2"3033            endif3034            3035            @setvar! missingSummonRegs 03036            @setvar! summoningSucessful 03037            3038            if not findtype 3963 self or not findtype 3974 self or not findtype 3981 self3039                @setvar! missingSummonRegs 13040                if timer noRegsMessageTimer > noRegsMessageCD3041                    overhead 'No regs to summon!' 343042                    sysmsg 'No regs to summon!' 343043                    settimer noRegsMessageTimer 03044                endif3045                wait noRegsMessageCD3046            elseif mana < 503047                if timer noRegsMessageTimer > noRegsMessageCD3048                    overhead "* low mana to summon *" 343049                    settimer noRegsMessageTimer 03050                endif3051            endif3052            3053                3054    #********** CAST EARTH ELEMENTAL **********# 3055        3056            if earthElementals != 0 and list earthListy < earthElementals and followers < 4 and diffhits < activateAutoHealDiff and not casting and missingSummonRegs = 0 and mana > 493057                if insysmsg "world is saving"3058                endif3059                3060                @setvar! isWorldSaving 03061                3062                cast 'Earth Elemental'3063                @setvar! castingEarth 13064                while not casting                   3065                    cast 'Earth Elemental'  3066                    if targetexists3067                        hotkey 'cancel current target'3068                    endif3069                endwhile  3070                3071                while not dead3072                3073                    if enemyFound = 03074                        if insysmsg! "Now tracking" or insysmsg! "Distance to"3075                            @setvar! enemyFound 13076                        endif3077                    endif3078                    3079                    if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 03080                        interrupt3081                        @setvar! wasInterrupted 1 3082                        break3083                    endif  3084                3085                     if insysmsg "world is saving"3086                        interrupt3087                        @setvar! isWorldSaving 13088                        @setvar! wasInterrupted 1 3089                        break3090                    endif        3091                    3092                    if diffhits >= interruptCastingDiff3093                        @setvar! wasInterrupted 1 3094                        sysmsg "interrupted low health" 333095                        interrupt3096                        break3097                    endif3098                    3099                    if not casting3100                        getlabel backpack xxx3101                        wait 2003102                        3103                        if insysmsg "Your concentration"3104                            @setvar! wasInterrupted 1 3105                            sysmsg "interrupted concentration" 33   3106                        else 3107                            sysmsg "casting finished" 113108                        endif3109                        3110                        break3111                    endif3112                    3113                    if timer summonMsgTimer > summonMsgCD3114                        overhead "* summoning earth... *" 6343115                        sysmsg "* summoning earth... *" 6343116                        settimer summonMsgTimer 03117                    endif3118                    3119                endwhile3120    3121                if 0 = wasInterrupted3122                    @setvar! summoningSucessful 13123                    sysmsg "Summon Earth Successful" 3124                    pushlist earthListy 'x' 'front'3125                    3126                    while not dead3127                        if findtype 158|14 ground -1 -1 12 as ele 3128                            menu ele 13129                            waitfortarget maxwaittimeinms3130                            if targetexists 3131                                if ele != earthFirsty and ele != earthSecondly3132                                    hotkey 'cancel current target'3133                                    wait 503134                                    menu ele 3 3135                                    3136                                    if earthFirsty = 0 3137                                        @setvar! earthFirsty ele3138                                        sysmsg "add earth 1" 113139                                        overhead "Earth 1" 634 ele3140                                    else 3141                                        @setvar! earthSecondly ele3142                                        sysmsg "add earth 2" 113143                                        overhead "Earth 2" 634 ele3144                                    endif3145                                    3146                                    break3147                                endif3148                            endif3149                            @ignore ele3150                        endif3151                    endwhile3152                    3153                    clearignore3154                    @setvar! castingEarth 03155                endif3156                3157    #********** CAST WATER ELEMENTAL **********# 3158            3159            elseif waterElementals != 0 and list waterListy < waterElementals and followers < 4 and diffhits < activateAutoHealDiff and not casting and missingSummonRegs = 0 and mana > 493160                if insysmsg "world is saving"3161                endif3162                3163                @setvar! isWorldSaving 03164                3165                cast 'Water Elemental'3166                @setvar! castingWater 13167                while not casting                   3168                    cast 'Water Elemental'  3169                    if targetexists3170                        hotkey 'cancel current target'3171                    endif3172                endwhile 3173                3174                while not dead3175                3176                    if enemyFound = 03177                        if insysmsg! "Now tracking" or insysmsg! "Distance to"3178                            @setvar! enemyFound 13179                        endif3180                    endif3181                    3182                    if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 03183                        interrupt3184                        @setvar! wasInterrupted 1 3185                        break3186                    endif          3187    3188                     if insysmsg "world is saving"3189                        interrupt3190                        @setvar! isWorldSaving 13191                        @setvar! wasInterrupted 1 3192                        break3193                    endif                 3194    3195                    if diffhits >= interruptCastingDiff3196                        @setvar! wasInterrupted 1 3197                        sysmsg "interrupted low health" 333198                        interrupt3199                        break3200                    endif3201                    3202                    if not casting3203                        getlabel backpack xxx3204                        wait 2003205                        3206                        if insysmsg "Your concentration"3207                            @setvar! wasInterrupted 1 3208                            sysmsg "interrupted concentration" 33   3209                        else 3210                            sysmsg "casting finished" 113211                        endif3212                        3213                        break3214                    endif3215                    3216                    if timer summonMsgTimer > summonMsgCD3217                        overhead "* summoning water... *" 3993218                        sysmsg "* summoning water... *" 3993219                        settimer summonMsgTimer 03220                    endif3221                    3222                endwhile3223    3224                if 0 = wasInterrupted3225                    @setvar! summoningSucessful 13226                    sysmsg "Summon Water Successful" 3227                    pushlist waterListy 'x' 'front'3228                    3229                    while not dead3230                        if findtype 740|16 ground -1 -1 12 as ele 3231                            menu ele 13232                            waitfortarget maxwaittimeinms3233                            if targetexists 3234                                if ele != waterFirsty and ele != waterSecondly3235                                    hotkey 'cancel current target'3236                                    wait 503237                                    menu ele 3 3238                                    if waterFirsty = 0 3239                                        @setvar! waterFirsty ele3240                                        sysmsg "add water 1" 113241                                        overhead "Water 1" 399 ele3242                                    else 3243                                        @setvar! waterSecondly ele3244                                        sysmsg "add water 2" 113245                                        overhead "Water 2" 399 ele3246                                    endif3247                                    3248                                    break3249                                endif3250                            endif3251                            @ignore ele3252                        endif3253                    endwhile3254                    3255                    clearignore3256                    @setvar! castingWater 03257                endif3258                3259    #********** CAST SUMMON CREATURE **********# 3260            3261            elseif summonCreature != 0 and list creatureListy < summonCreature and followers < 5 and diffhits < activateAutoHealDiff and not casting and missingSummonRegs = 0 and mana > 13                   3262                if insysmsg "world is saving"3263                endif3264                3265                @setvar! isWorldSaving 03266                3267                cast 'Summ. Creature'3268                @setvar! castingCreature 13269                while not casting                   3270                    cast 'Summ. Creature'  3271                    if targetexists3272                        hotkey 'cancel current target'3273                    endif3274                endwhile  3275                3276                while not dead3277 3278                    if enemyFound = 03279                        if insysmsg! "Now tracking" or insysmsg! "Distance to"3280                            @setvar! enemyFound 13281                        endif3282                    endif3283                    3284                    if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 03285                        interrupt3286                        @setvar! wasInterrupted 1 3287                        break3288                    endif  3289                    3290                     if insysmsg "world is saving"3291                        interrupt3292                        @setvar! isWorldSaving 13293                        @setvar! wasInterrupted 1 3294                        break3295                    endif 3296                    3297                    if diffhits >= interruptCastingDiff3298                        @setvar! wasInterrupted 1 3299                        sysmsg "interrupted low health" 333300                        interrupt3301                        break3302                    endif3303                    3304                    if not casting3305                        getlabel backpack xxx3306                        wait 2003307                        3308                        if insysmsg "Your concentration"3309                            @setvar! wasInterrupted 1 3310                            sysmsg "interrupted concentration" 33   3311                        else 3312                            sysmsg "casting finished" 113313                        endif3314                        3315                        break3316                    endif3317                    3318                    if timer summonMsgTimer > summonMsgCD3319                        overhead "* summon creature... *" 8813320                        sysmsg "* summon creature... *" 8813321                        settimer summonMsgTimer 03322                    endif3323                    3324                endwhile3325    3326                if 0 = wasInterrupted3327                    @setvar! summoningSucessful 13328                    sysmsg "Summon Creature Successful" 3329                    pushlist creatureListy 'x' 'front'3330                    while not dead3331                        if findtype 215|211|302|317|225|212|202|213|716|729|51|74|214|206|776|737|718|739|718|29|776|317|302|39|56|26|3|57|50|382|717|736|270 ground -1 -1 12 as ele 3332                            menu ele 13333                            waitfortarget maxwaittimeinms3334                            if targetexists 3335                                if ele != creatureFirsty and ele != creatureSecondly and ele != creatureThirdy and ele != creatureFourthy and ele != creatureFithy3336                                    hotkey 'cancel current target'3337                                    wait 503338                                    menu ele 3                                3339                                    if creatureFirsty = 0 3340                                        @setvar! creatureFirsty ele3341                                        sysmsg "add creature 1" 11 3342                                        overhead "Creature 1" 11 ele3343                                    elseif creatureSecondly = 0 3344                                        @setvar! creatureSecondly ele3345                                        sysmsg "add creature 2" 113346                                        overhead "Creature 2" 11 ele3347                                    elseif creatureThirdy = 0 3348                                        @setvar! creatureThirdy ele3349                                        sysmsg "add creature 3" 113350                                        overhead "Creature 3" 11 ele3351                                    elseif creatureFourthy = 0 3352                                        @setvar! creatureFourthy ele3353                                        sysmsg "add creature 4" 113354                                        overhead "Creature 4" 11 ele3355                                    elseif creatureFithy = 0 3356                                        @setvar! creatureFithy ele3357                                        sysmsg "add creature 5" 113358                                        overhead "Creature 5" 11 ele3359                                    endif3360                                    3361                                    break3362                                endif3363                            endif3364                            @ignore ele3365                        endif3366                    endwhile3367                    3368                    clearignore3369                    @setvar! castingCreature 03370                endif3371                3372            endif3373        3374        endwhile3375        3376 #********** BEGING HARVESTING **********  3377 3378        if diffweight <= myWeightDiff3379            overhead '[Overveight Reached]' 443380            wait maxwaittimeinms    3381        elseif 1 = autoRecall and 1 = enemyFound or cooldown 'Danger' > 0 3382            sysmsg "Enemy Found: skip harvesting"3383        else3384            while lhandempty and rhandempty3385                if not findtype myHarvestingTool backpack3386                    overhead "Out of hatchets!" 363387                    wait maxwaittimeinms3388                elseif not casting3389                    dclicktype myHarvestingTool3390                    wait 2003391                endif3392            endwhile3393            3394            while not targetexists 3395                hotkey 'Use Item In Hand'3396                waitfortarget maxwaittimeinms3397            endwhile3398            target 'self'   3399            3400            settimer beginChopTimer 03401 3402            while not insysmsg! "harvesting is not allowed" and not insysmsg "you chop" and not insysmsg "you hack" and not insysmsg! "you do not see" and not insysmsg! "you have recently" and diffhits < activateAutoHealDiff3403                if enemyFound = 03404                    if insysmsg! "Now tracking" or insysmsg! "Distance to"3405                        @setvar! enemyFound 13406                    endif3407                endif3408                3409                if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 03410                    break3411                endif            3412                3413                if timer beginChopTimer > 650 and timer beginChopTimer < 100003414                    overhead "* chopping tree *" 113415                    settimer beginChopTimer 100003416                endif3417            endwhile3418            3419            if insysmsg "you do not see any"3420                overhead "* move to other tree *" 443421                wait 5003422            elseif insysmsg "you have recently"3423                overhead "* travel cooldown *" 9013424                wait 5003425            elseif insysmsg "harvesting is not allowed"3426                overhead "* Harvest NOT allowed! *" 333427                wait 5003428            else3429                #overhead "* tree chopped *" 11    3430            endif    3431 3432#********** CUT LOGS INTO BOARDS AND SECURE BOARDS INSIDE LOCKED WOODEN BOX **********  3433 3434            if timer storeTimer > storeTimerCD or counttype 7133 backpack > 120 or counttype 7133 backpack 2207 > 15 or counttype 7133 backpack 2219 > 10 or counttype 7133 backpack 1763 > 53435                settimer storeTimer 03436                if targetexists3437                    hotkey 'cancel current target'  3438                endif3439 3440                while findtype "log%s" backpack any any 1 as myLogs and diffhits < activateAutoHealDiff 3441                    if enemyFound = 03442                        if insysmsg! "Now tracking" or insysmsg! "Distance to"3443                            @setvar! enemyFound 13444                        endif3445                    endif3446                    3447                    if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 03448                        break3449                    endif                          3450                    3451                    overhead "* refining logs *" 883452                    hotkey 'Use Item In Hand'3453                    waitfortarget maxwaittimeinms3454                    target myLogs3455                    wait maxwaittimeinms3456                endwhile3457                3458                while findtype "board%s" backpack any any 1 as boardz and diffhits < activateAutoHealDiff3459                    if enemyFound = 03460                        if insysmsg! "Now tracking" or insysmsg! "Distance to"3461                            @setvar! enemyFound 13462                        endif3463                    endif3464                    3465                    if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 03466                        break3467                    endif      3468                    3469                    overhead "* securing boards *" 88    3470                    wait 1003471                    lift boardz 99993472                    drop chest -1 -1 03473                    wait maxwaittimeinms3474 3475                    if insysmsg "it appears"3476                        overhead "[unlocking chest]" 743477                        dclick key3478                        waitfortarget maxwaittimeinms3479                        target chest3480                        wait maxwaittimeinms3481                    endif3482                endwhile3483                3484            endif3485        endif3486        3487        getlabel chest chestLabel3488        if "items" in chestLabel3489            dclick key3490            waitfortarget maxwaittimeinms3491            target chest3492            wait maxwaittimeinms3493            overhead "[chest locked]" 553494        endif3495        3496    endif3497    3498    if useDetectHidden = 1 and timer detectTimer > detectTimerCD3499        if insysmsg "where"3500        endif3501        3502        skill 'detectinghidden'3503        waitfortarget maxwaittimeinms 3504        target 'self'3505    3506        if insysmsg "where"3507            overhead "* detecting hidden *"3508        endif3509        3510        settimer detectTimer 03511     endif3512    3513    #sysmsg "Loop cycle elapsed : {{cycleTimer}}"    3514endwhile