SUPER Auto-lumber and mining ver.1.02
GatheringLumberjackingMining
SUPER-AUTO Mining and Lumberjacking.razor
1# This is an automated backup - check out https://outlands.uorazorscripts.com/script/75dd2fcd-e761-43c6-a749-d96466779185 for latest2# Automation by Jaseowns3## Script: SUPER-AUTO Mining and Lumberjacking4## Created by: dennozz#05#############################################6 7#SUPER Auto-lumber and mining ver.1.028 9# Set Lumberjacking = 1 10# Set Mining = 011 12@setvar! GATHERING 013 14#ver.1.01 - Minor change to auto trap. Now can enable or disable15#ver.1.00 - Merge of auto mining and lumberjacking16 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#--- Set Elementals Count ---#76 77@setvar! earthElementals 078@setvar! waterElementals 179@setvar! summonCreature 080 81#--- Set mushrooms ---#82 83@setvar! mushroomCount 384@setvar! eatMushWhenManaLowerThan 5085@setvar! mushroomTimerCD 6000086 87#--- Set Auto Trap Pouch ---#88 89@setvar! autoTrapPouches 190 91#--- Set potions ---#92 93@setvar! drinkStr 194@setvar! strengthLowerThan 10095 96@setvar! drinkAgility 097@setvar! drinkMagicResist 098@setvar! drinkHeal 199@setvar! drinkCure 1100 101@setvar! drinkRefresh 1102@setvar! drinkWhenMissingStamina 15103 104#--- Set Mage auto heals ---#105 106@setvar! miniHeal 1107@setvar! greaterHeal 1108@setvar! cureSpell 1109 110#--- Auto healing hp diffs ---#111#--- All variables refer to hit points differences ---#112#--- When below certain hit points it will trigger ---#113 114@setvar! activateAutoHealDiff 10115 116@setvar! startCastMiniHealDiff 10117@setvar! endCastMiniHealDiff 30118 119@setvar! castEmergencyMiniHealDiff 65120 121@setvar! startCastGreaterHealDiff 30122@setvar! endCastGreaterHealDiff 200123 124@setvar! drinkHealPotDiff 30125 126@setvar! interruptCastingDiff 40127 128#--- Set Mage Buffs ---#129 130@setvar! magicReflect 1131@setvar! blessSpell 0132@setvar! armorReflect 1133@setvar! protectionSpell 1134 135@setvar! miniumManaToBuff 75136 137#--- Meditation ---#138 139@setvar! useMeditationSkill 1140@setvar! meditateWhenManaBelow 50141@setvar! meditateUntilManaReach 65142 143#--- Set Cooldowns ---#144 145@setvar! storeTimerCD 100000146settimer storeTimer storeTimerCD147 148@setvar! mineTimerCD 575149 150#--- Weight diff limit ---#151 152@setvar! myWeightDiff 41153 154@setvar! enableAutoSplitter 1155 156#--- Autosplitter regs, pots, etc. Set auto select bag ---#157# 0 - will let you pick the bag158# 1 - will auto select in order : satchel > pouch > backpack bag > rounded bag > main backpack159 160@setvar! autoSelectRegBag 1161 162#--- Set auto select Potion bag ---#163# 0 - will let you pick the bag164# 1 - will auto select in order : Potions satchel > pouch > backpack bag > rounded bag > main backpack165@setvar! autoSelectPotionBag 1166 167#--- Set auto select bandage/rope bag ---#168# 0 - will let you pick the bag169# 1 - will auto select in order : satchel > pouch > backpack bag > rounded bag > main backpack170@setvar! autoSelectMiscBag 1171 172#-- Use detect hidden --#173@setvar! useDetectHidden 0174 175@setvar! detectTimerCD 1000176settimer detectTimer storeTimerCD177 178#--- Optional : Have a cooldown named `Heal Pot` ---#179 180@setvar! healingPotCD 11000181 182 183#********** DO NOT EDIT FROM HERE UNLESS YOU KNOW HOW TO SCRIPT **********#184 185@setvar! maxwaittimeinms 650186@setvar! foundBook 0187 188@setvar! enemyFound 0189@setvar! isOverweight 0190 191@setvar! myPack 0192@setvar! smeltingOre 0193 194if GATHERING = 1195 @setvar! myHarvestingTool 3908196else 197 @setvar! myHarvestingTool 3718198endif199 200#--- elementals variables ---#201 202removelist maxFollowersList203createlist maxFollowersList204 205@setvar! maxFollowers 0206@setvar! currentFollowers 0207 208if not varexist castingEarth or followers = 0 209 @setvar! castingEarth 0210endif211if not varexist castingWater or followers = 0 212 @setvar! castingWater 0213endif214 215if not varexist castingCreature or followers = 0 216 @setvar! castingCreature 0217endif218 219if earthElementals = 1220 pushlist maxFollowersList x 221 pushlist maxFollowersList x 222elseif earthElementals = 2223 pushlist maxFollowersList x 224 pushlist maxFollowersList x 225 pushlist maxFollowersList x 226 pushlist maxFollowersList x227endif228 229if waterElementals = 1230 pushlist maxFollowersList x 231 pushlist maxFollowersList x 232elseif waterElementals = 2233 pushlist maxFollowersList x 234 pushlist maxFollowersList x 235 pushlist maxFollowersList x 236 pushlist maxFollowersList x237endif238 239if summonCreature = 1240 pushlist maxFollowersList x 241elseif summonCreature = 2242 pushlist maxFollowersList x 243 pushlist maxFollowersList x 244elseif summonCreature = 3245 pushlist maxFollowersList x 246 pushlist maxFollowersList x 247 pushlist maxFollowersList x 248elseif summonCreature = 4249 pushlist maxFollowersList x 250 pushlist maxFollowersList x 251 pushlist maxFollowersList x 252 pushlist maxFollowersList x 253elseif summonCreature = 5254 pushlist maxFollowersList x 255 pushlist maxFollowersList x 256 pushlist maxFollowersList x 257 pushlist maxFollowersList x 258 pushlist maxFollowersList x 259endif260 261if list maxFollowersList = 0 262 @setvar! maxFollowers 0263 264elseif list maxFollowersList = 1265 @setvar! maxFollowers 1266 267elseif list maxFollowersList = 2268 @setvar! maxFollowers 2269 270elseif list maxFollowersList = 3271 @setvar! maxFollowers 3272 273elseif list maxFollowersList = 4274 @setvar! maxFollowers 4275else 276 @setvar! maxFollowers 5277endif278 279if not varexist earthFirsty or followers = 0280 @setvar! earthFirsty 0281endif282 283if not varexist earthSecondly or followers = 0284 @setvar! earthSecondly 0285endif286 287if not varexist waterFirsty or followers = 0288 @setvar! waterFirsty 0289endif290 291if not varexist waterSecondly or followers = 0292 @setvar! waterSecondly 0293endif294 295if not varexist creatureFirsty or followers = 0296 @setvar! creatureFirsty 0297endif298 299if not varexist creatureSecondly or followers = 0300 @setvar! creatureSecondly 0301endif302 303if not varexist creatureThirdy or followers = 0304 @setvar! creatureThirdy 0305endif306 307if not varexist creatureFourthy or followers = 0308 @setvar! creatureFourthy 0309endif310 311if not varexist creatureFithy or followers = 0312 @setvar! creatureFithy 0313endif314 315#-- list creation --#316 317if not listexists earthListy or followers = 0318 removelist earthListy319 createlist earthListy320endif321 322if not listexists waterListy or followers = 0323 removelist waterListy324 createlist waterListy325endif326 327if not listexists creatureListy or followers = 0328 removelist creatureListy329 createlist creatureListy330endif331 332if maxFollowers > 5 333 overhead "Error Max Followers > 5"334 sysmsg "Error Max Followers > 5: Check your followers settings"335 stop336endif337 338#--- Script msgs timers ---#339 340@setvar! scriptMessageCD 4500341settimer scriptMessageTimer 0342 343@setvar! beingAttackedCD 5000344settimer beingAttackedTimer 5000345 346@setvar! overweightMessageCD 3000347settimer overweightMessageTimer overweightMessageCD348 349@setvar! noRegsMessageCD 4000350settimer noRegsMessageTimer noRegsMessageCD351 352@setvar! allGuardCD 3000353settimer allGuardTimer allGuardCD354 355@setvar! foodMessageCD 3333356settimer foodMessageTimer foodMessageCD357 358@setvar! autoHealMessageCD 4500359settimer autoHealMessageTimer 0360 361#--- Summons timers ---#362 363@setvar! summonMsgCD 1500364settimer summonMsgTimer summonMsgCD365 366#--- Resources timers ---#367 368@setvar! pouchMessageCD 2000369settimer pouchMessageTimer pouchMessageCD370 371@setvar! aidsMessageCD 2500372settimer aidsMessageTimer aidsMessageCD373 374@setvar! whiteMessageCD 3000375settimer whiteMessageTimer whiteMessageCD376 377@setvar! blueMessageCD 3500378settimer blueMessageTimer blueMessageCD379 380@setvar! blackMessageCD 4000381settimer blackMessageTimer blackMessageCD382 383@setvar! orangeMessageCD 4500384settimer orangeMessageTimer orangeMessageCD385 386@setvar! yellowMessageCD 5000387settimer yellowMessageTimer yellowMessageCD388 389@setvar! redMessageCD 5500390settimer redMessageTimer redMessageCD391 392#--- Magery buffs timers ---#393 394@setvar! magicReflectCD 15000395settimer magicReflectTimer magicReflectCD396 397@setvar! armorReflectCD 15000398settimer armorReflectTimer armorReflectCD399 400@setvar! protectionCD 15000401settimer protectionTimer protectionCD402 403@setvar! manaMessageCD 2222404settimer manaMessageTimer manaMessageCD405 406#--- Skills timers ---#407 408@setvar! spiritSpeakCD 60000409if not timerexists spiritSpeakTimer410 settimer spiritSpeakTimer spiritSpeakCD411endif412 413@setvar! meditationCD 10500414if not timerexists meditationTimer415 settimer meditationTimer meditationCD416endif417 418@setvar! meditationMessageCD 2777419if not timerexists meditationMessageTimer420 settimer meditationMessageTimer meditationMessageCD421endif422 423if not timerexists mushroomTimer424 settimer mushroomTimer mushroomTimerCD425endif426 427#********** PRE-SCRIPT FOOD BUFF AND TRACKING ON **********428 429if not findbuff "food" and findtype "tray" backpack as fody 430 dclick fody431 wait 200432endif433 434#********* CREATE MUSHROOMS *********435 436if insysmsg "You create"437endif 438 439while counttype 29012 backpack < mushroomCount and findtype 3963 self and findtype 3976 self and mana > 3440 cast 'create food'441 while not casting 442 cast 'create food'443 endwhile444 while casting445 endwhile446 wait 200447 getlabel backpack xxx448 if insysmsg! "you create"449 if insysmsg "you create a magic"450 else451 sysmsg "Wizard's Grimoire `create food` not found" 34452 @setvar! mushroomCount 0453 break 454 endif455 endif456endwhile457 458 459if not findbuff "tracking"460 461 while not gumpexists 4267467659462 sysmsg "opening tracking..." 11463 skill "tracking"464 wait maxwaittimeinms465 endwhile466 467 while not insysmsg "You will now hunt all hostile players"468 sysmsg "setting track to hostile players..." 11469 gumpresponse 8470 wait 500471 waitforgump 4267467659 maxwaittimeinms472 endwhile473 474 if ingump "Begin Hunting" 4267467659475 gumpresponse 6476 wait maxwaittimeinms477 waitforgump 4267467659 maxwaittimeinms478 wait maxwaittimeinms479 gumpclose 4267467659 480 wait 100481 endif482 483 sysmsg "* Now tracking hostile players *" 66484endif485 486#********** AUTO SPLIT REAGENTS **********# 487 488@clearignore489 490if enableAutoSplitter = 1491 492 @setvar! amount 0493 @setvar! myRegBag 0494 @setvar! myPotionBag 0495 @setvar! myBandageBag 0496 497 @setvar! maxwaittimeinms 650498 499 500 if autoSelectRegBag = 1501 if findtype 30765 self as b502 @setvar! myRegBag b503 elseif findtype 3705 self as b504 @setvar! myRegBag b505 elseif findtype 3701 self as b506 @setvar! myRegBag b507 elseif findtype 3702 self as b508 @setvar! myRegBag b509 else 510 @setvar! myRegBag backpack511 endif512 else 513 clearsysmsg514 overhead "Select bag:" 68515 @setvar! myRegBag516 wait 200517 while not targetexists and not insysmsg "Select"518 @setvar! myRegBag 519 endwhile520 521 if find myRegBag self522 getlabel myRegBag bagLabel523 524 if "wizard's satchel" in bagLabel or "pouch" in bagLabel or "bag" in bagLabel or "backpack" in bagLabel525 sysmsg "new bag set" 55526 else 527 @setvar! myRegBag 0528 overhead "That is not a bag" 34529 sysmsg "That is not a bag" 34530 stop531 endif532 else 533 overhead "No bag found!" 34534 stop 535 endif536 endif537 538 if autoSelectPotionBag = 1539 if findtype 31262 self as b540 @setvar! myPotionBag b541 elseif findtype 3705 self as b542 @setvar! myPotionBag b543 elseif findtype 3701 self as b544 @setvar! myPotionBag b545 elseif findtype 3702 self as b546 @setvar! myPotionBag b547 else 548 @setvar! myPotionBag backpack549 endif550 else 551 clearsysmsg552 overhead "Select Potion bag:" 68553 @setvar! myPotionBag554 wait 200555 while not targetexists and not insysmsg "Select"556 @setvar! myPotionBag 557 endwhile558 559 if find myPotionBag self560 getlabel myPotionBag bagLabel561 562 if "alchemists satchel" in bagLabel or "pouch" in bagLabel or "bag" in bagLabel or "backpack" in bagLabel563 sysmsg "new bag set" 55564 else 565 @setvar! myPotionBag 0566 overhead "That is not a bag" 34567 sysmsg "That is not a bag" 34568 stop569 endif570 else 571 overhead "No bag found!" 34572 stop 573 endif574 endif575 576 #***** Misc Items *****577 578 if autoSelectMiscBag = 1579 if findtype 3705 self as b580 @setvar! myMiscBag b581 elseif findtype 3701 self as b582 @setvar! myMiscBag b583 elseif findtype 3702 self as b584 @setvar! myMiscBag b585 else 586 @setvar! myMiscBag backpack587 endif588 else 589 clearsysmsg590 overhead "Select Misc bag:" 68591 @setvar! myMiscBag592 wait 200593 while not targetexists and not insysmsg "Select"594 @setvar! myMiscBag 595 endwhile596 597 if find myMiscBag self598 getlabel myMiscBag bagLabel599 600 if "wizard's satchel" in bagLabel or "pouch" in bagLabel or "bag" in bagLabel or "backpack" in bagLabel601 sysmsg "new bag set" 55602 else 603 @setvar! myMiscBag 0604 overhead "That is not a bag" 34605 sysmsg "That is not a bag" 34606 stop607 endif608 else 609 overhead "No bag found!" 34610 stop 611 endif612 endif613 614 overhead "Splitter Begin.." 55615 616 #***** SPIDER SILK 3981 *****617 618 @setvar! regsID 3981619 @setvar! myCounter 0620 621 while findtype regsID self as r 622 @setvar! myCounter index623 @ignore r624 endwhile625 @clearignore626 627 if counttype regsID self <= 10628 @setvar! amount 2629 elseif counttype regsID self <= 20630 @setvar! amount 4 631 elseif counttype regsID self <= 50632 @setvar! amount 10 633 elseif counttype regsID self <= 100634 @setvar! amount 20 635 elseif counttype regsID self <= 150636 @setvar! amount 30637 elseif counttype regsID self <= 200638 @setvar! amount 40639 else 640 @setvar! amount 50641 endif642 643 while findtype regsID self as regs644 @setvar! moveRegs 0 645 646 if myCounter = 0647 @setvar! moveRegs 1648 elseif myCounter != 0 and not find regs myRegBag649 @setvar! moveRegs 1650 endif651 652 if moveRegs = 1 653 overhead "splitting silks.." 0654 if index = 0655 lift regs amount656 drop myRegBag 44 65 0 657 elseif index = 1658 lift regs amount659 drop myRegBag 68 65 0 660 elseif index = 2661 lift regs amount662 drop myRegBag 96 65 0 663 elseif index = 3664 lift regs amount665 drop myRegBag 121 65 0 666 else667 lift regs amount668 drop myRegBag 142 65 0 669 endif670 endif671 672 @ignore regs 673 674 if moveRegs = 1675 wait maxwaittimeinms676 endif677 endwhile678 679 #***** BLACK PEARL 3962 *****680 681 @setvar! regsID 3962682 @setvar! myCounter 0683 684 while findtype regsID self as r 685 @setvar! myCounter index686 @ignore r687 endwhile688 @clearignore689 690 if counttype regsID self <= 10691 @setvar! amount 2692 elseif counttype regsID self <= 20693 @setvar! amount 4 694 elseif counttype regsID self <= 50695 @setvar! amount 10 696 elseif counttype regsID self <= 100697 @setvar! amount 20 698 elseif counttype regsID self <= 150699 @setvar! amount 30700 elseif counttype regsID self <= 200701 @setvar! amount 40702 else 703 @setvar! amount 50704 endif705 706 while findtype regsID self as regs707 @setvar! moveRegs 0 708 709 if myCounter = 0710 @setvar! moveRegs 1711 elseif myCounter != 0 and not find regs myRegBag712 @setvar! moveRegs 1713 endif714 715 if moveRegs = 1 716 overhead "splitting pearls.." 11717 if index = 0718 lift regs amount719 drop myRegBag 44 65 0 720 elseif index = 1721 lift regs amount722 drop myRegBag 68 65 0 723 elseif index = 2724 lift regs amount725 drop myRegBag 96 65 0 726 elseif index = 3727 lift regs amount728 drop myRegBag 121 65 0 729 else730 lift regs amount731 drop myRegBag 142 65 0 732 endif733 endif734 735 @ignore regs 736 737 if moveRegs = 1738 wait maxwaittimeinms739 endif740 endwhile741 742 #***** NIGHTSHADE 3976 *****743 744 @setvar! regsID 3976745 @setvar! myCounter 0746 747 while findtype regsID self as r 748 @setvar! myCounter index749 @ignore r750 endwhile751 @clearignore752 753 if counttype regsID self <= 10754 @setvar! amount 2755 elseif counttype regsID self <= 20756 @setvar! amount 4 757 elseif counttype regsID self <= 50758 @setvar! amount 10 759 elseif counttype regsID self <= 100760 @setvar! amount 20 761 elseif counttype regsID self <= 150762 @setvar! amount 30763 elseif counttype regsID self <= 200764 @setvar! amount 40765 else 766 @setvar! amount 50767 endif768 769 while findtype regsID self as regs770 @setvar! moveRegs 0 771 772 if myCounter = 0773 @setvar! moveRegs 1774 elseif myCounter != 0 and not find regs myRegBag775 @setvar! moveRegs 1776 endif777 778 if moveRegs = 1 779 overhead "splitting shades.." 66780 if index = 0781 lift regs amount782 drop myRegBag 44 88 0 783 elseif index = 1784 lift regs amount785 drop myRegBag 68 88 0 786 elseif index = 2787 lift regs amount788 drop myRegBag 96 88 0 789 elseif index = 3790 lift regs amount791 drop myRegBag 121 88 0 792 else793 lift regs amount794 drop myRegBag 142 88 0 795 endif796 endif797 798 @ignore regs 799 800 if moveRegs = 1801 wait maxwaittimeinms802 endif803 804 endwhile805 806 #***** MANDRAKE ROOT 3974 *****807 808 @setvar! regsID 3974809 @setvar! myCounter 0810 811 while findtype regsID self as r 812 @setvar! myCounter index813 @ignore r814 endwhile815 @clearignore816 817 if counttype regsID self <= 10818 @setvar! amount 2819 elseif counttype regsID self <= 20820 @setvar! amount 4 821 elseif counttype regsID self <= 50822 @setvar! amount 10 823 elseif counttype regsID self <= 100824 @setvar! amount 20 825 elseif counttype regsID self <= 150826 @setvar! amount 30827 elseif counttype regsID self <= 200828 @setvar! amount 40829 else 830 @setvar! amount 50831 endif832 833 while findtype regsID self as regs834 @setvar! moveRegs 0 835 836 if myCounter = 0837 @setvar! moveRegs 1838 elseif myCounter != 0 and not find regs myRegBag839 @setvar! moveRegs 1840 endif841 842 if moveRegs = 1 843 overhead "splitting roots.." 439844 if index = 0845 lift regs amount846 drop myRegBag 44 88 0 847 elseif index = 1848 lift regs amount849 drop myRegBag 68 88 0 850 elseif index = 2851 lift regs amount852 drop myRegBag 96 88 0 853 elseif index = 3854 lift regs amount855 drop myRegBag 121 88 0 856 else857 lift regs amount858 drop myRegBag 142 88 0 859 endif860 endif861 862 @ignore regs 863 864 if moveRegs = 1865 wait maxwaittimeinms866 endif867 868 endwhile869 870 #***** SULFUROUS ASH 3980 *****871 872 @setvar! regsID 3980873 @setvar! myCounter 0874 875 while findtype regsID self as r 876 @setvar! myCounter index877 @ignore r878 endwhile879 @clearignore880 881 if counttype regsID self <= 10882 @setvar! amount 2883 elseif counttype regsID self <= 20884 @setvar! amount 4 885 elseif counttype regsID self <= 50886 @setvar! amount 10 887 elseif counttype regsID self <= 100888 @setvar! amount 20 889 elseif counttype regsID self <= 150890 @setvar! amount 30891 elseif counttype regsID self <= 200892 @setvar! amount 40893 else 894 @setvar! amount 50895 endif896 897 while findtype regsID self as regs898 @setvar! moveRegs 0 899 900 if myCounter = 0901 @setvar! moveRegs 1902 elseif myCounter != 0 and not find regs myRegBag903 @setvar! moveRegs 1904 endif905 906 if moveRegs = 1 907 overhead "splitting ashes.." 56908 if index = 0909 lift regs amount910 drop myRegBag 44 112 0 911 elseif index = 1912 lift regs amount913 drop myRegBag 68 112 0 914 elseif index = 2915 lift regs amount916 drop myRegBag 96 112 0 917 elseif index = 3918 lift regs amount919 drop myRegBag 121 112 0 920 else921 lift regs amount922 drop myRegBag 142 112 0 923 endif924 endif925 926 @ignore regs 927 928 if moveRegs = 1929 wait maxwaittimeinms930 endif931 932 endwhile933 934 #***** GINSENG 3973 *****935 936 @setvar! regsID 3973937 @setvar! myCounter 0938 939 while findtype regsID self as r 940 @setvar! myCounter index941 @ignore r942 endwhile943 @clearignore944 945 if counttype regsID self <= 10946 @setvar! amount 2947 elseif counttype regsID self <= 20948 @setvar! amount 4 949 elseif counttype regsID self <= 50950 @setvar! amount 10 951 elseif counttype regsID self <= 100952 @setvar! amount 20 953 elseif counttype regsID self <= 150954 @setvar! amount 30955 elseif counttype regsID self <= 200956 @setvar! amount 40957 else 958 @setvar! amount 50959 endif960 961 while findtype regsID self as regs962 @setvar! moveRegs 0 963 964 if myCounter = 0965 @setvar! moveRegs 1966 elseif myCounter != 0 and not find regs myRegBag967 @setvar! moveRegs 1968 endif969 970 if moveRegs = 1 971 overhead "splitting gings.." 149972 if index = 0973 lift regs amount974 drop myRegBag 44 112 0 975 elseif index = 1976 lift regs amount977 drop myRegBag 68 112 0 978 elseif index = 2979 lift regs amount980 drop myRegBag 96 112 0 981 elseif index = 3982 lift regs amount983 drop myRegBag 121 112 0 984 else985 lift regs amount986 drop myRegBag 142 112 0 987 endif988 endif989 990 @ignore regs 991 992 if moveRegs = 1993 wait maxwaittimeinms994 endif995 996 endwhile997 998 #***** BLOSSMOSS 3963 *****999 1000 @setvar! regsID 39631001 @setvar! myCounter 01002 1003 while findtype regsID self as r 1004 @setvar! myCounter index1005 @ignore r1006 endwhile1007 @clearignore1008 1009 if counttype regsID self <= 101010 @setvar! amount 21011 elseif counttype regsID self <= 201012 @setvar! amount 4 1013 elseif counttype regsID self <= 501014 @setvar! amount 10 1015 elseif counttype regsID self <= 1001016 @setvar! amount 20 1017 elseif counttype regsID self <= 1501018 @setvar! amount 301019 elseif counttype regsID self <= 2001020 @setvar! amount 401021 else 1022 @setvar! amount 501023 endif1024 1025 while findtype regsID self as regs1026 @setvar! moveRegs 0 1027 1028 if myCounter = 01029 @setvar! moveRegs 11030 elseif myCounter != 0 and not find regs myRegBag1031 @setvar! moveRegs 11032 endif1033 1034 if moveRegs = 1 1035 overhead "splitting bloods.." 351036 if index = 01037 lift regs amount1038 drop myRegBag 44 130 0 1039 elseif index = 11040 lift regs amount1041 drop myRegBag 68 130 0 1042 elseif index = 21043 lift regs amount1044 drop myRegBag 96 130 0 1045 elseif index = 31046 lift regs amount1047 drop myRegBag 121 130 0 1048 else1049 lift regs amount1050 drop myRegBag 142 130 0 1051 endif1052 endif1053 1054 @ignore regs 1055 1056 if moveRegs = 11057 wait maxwaittimeinms1058 endif1059 1060 endwhile1061 1062 #***** GARILIC 3972 *****1063 1064 @setvar! regsID 39721065 @setvar! myCounter 01066 1067 while findtype regsID self as r 1068 @setvar! myCounter index1069 @ignore r1070 endwhile1071 @clearignore1072 1073 if counttype regsID self <= 101074 @setvar! amount 21075 elseif counttype regsID self <= 201076 @setvar! amount 4 1077 elseif counttype regsID self <= 501078 @setvar! amount 10 1079 elseif counttype regsID self <= 1001080 @setvar! amount 20 1081 elseif counttype regsID self <= 1501082 @setvar! amount 301083 elseif counttype regsID self <= 2001084 @setvar! amount 401085 else 1086 @setvar! amount 501087 endif1088 1089 while findtype regsID self as regs1090 @setvar! moveRegs 0 1091 1092 if myCounter = 01093 @setvar! moveRegs 11094 elseif myCounter != 0 and not find regs myRegBag1095 @setvar! moveRegs 11096 endif1097 1098 if moveRegs = 1 1099 overhead "splitting garlics.." 9101100 if index = 01101 lift regs amount1102 drop myRegBag 44 130 0 1103 elseif index = 11104 lift regs amount1105 drop myRegBag 68 130 0 1106 elseif index = 21107 lift regs amount1108 drop myRegBag 96 130 0 1109 elseif index = 31110 lift regs amount1111 drop myRegBag 121 130 0 1112 else1113 lift regs amount1114 drop myRegBag 142 130 0 1115 endif1116 endif1117 @ignore regs 1118 1119 if moveRegs = 11120 wait maxwaittimeinms1121 endif1122 1123 endwhile1124 1125 #***** RECALL SCROLL 8012 *****1126 1127 @setvar! regsID 80121128 @setvar! myCounter 01129 1130 while findtype regsID self as r 1131 @setvar! myCounter index1132 @ignore r1133 endwhile1134 @clearignore1135 1136 if counttype regsID self <= 51137 @setvar! amount 11138 elseif counttype regsID self <= 101139 @setvar! amount 2 1140 elseif counttype regsID self <= 201141 @setvar! amount 4 1142 elseif counttype regsID self <= 401143 @setvar! amount 8 1144 else 1145 @setvar! amount 151146 endif1147 1148 while findtype regsID self as regs1149 @setvar! moveRegs 0 1150 1151 if myCounter = 01152 @setvar! moveRegs 11153 elseif myCounter != 0 and not find regs myRegBag1154 @setvar! moveRegs 11155 endif1156 if moveRegs = 1 1157 overhead "splitting scrolls.." 01158 if index = 01159 lift regs amount1160 drop myRegBag 44 88 0 1161 elseif index = 11162 lift regs amount1163 drop myRegBag 68 88 0 1164 elseif index = 21165 lift regs amount1166 drop myRegBag 96 88 0 1167 elseif index = 31168 lift regs amount1169 drop myRegBag 121 88 0 1170 else1171 lift regs amount1172 drop myRegBag 142 88 0 1173 endif1174 endif1175 1176 @ignore regs 1177 1178 if moveRegs = 11179 wait maxwaittimeinms1180 endif1181 endwhile1182 1183 1184 #***** Greater Heal 3852 *****1185 1186 @setvar! regsID 38521187 @setvar! myCounter 01188 1189 while findtype regsID self as r 1190 @setvar! myCounter index1191 @ignore r1192 endwhile1193 @clearignore1194 1195 if counttype regsID self <= 101196 @setvar! amount 21197 elseif counttype regsID self <= 201198 @setvar! amount 4 1199 elseif counttype regsID self <= 501200 @setvar! amount 10 1201 elseif counttype regsID self <= 1001202 @setvar! amount 20 1203 elseif counttype regsID self <= 1501204 @setvar! amount 301205 elseif counttype regsID self <= 2001206 @setvar! amount 401207 else 1208 @setvar! amount 501209 endif1210 1211 while findtype regsID self as regs1212 @setvar! moveRegs 0 1213 1214 if myCounter = 01215 @setvar! moveRegs 11216 elseif myCounter != 0 and not find regs myPotionBag1217 @setvar! moveRegs 11218 endif1219 1220 if moveRegs = 1 1221 overhead "splitting Greater Heal.." 481222 if index = 01223 lift regs amount1224 drop myPotionBag 44 65 0 1225 elseif index = 11226 lift regs amount1227 drop myPotionBag 68 65 0 1228 elseif index = 21229 lift regs amount1230 drop myPotionBag 96 65 0 1231 elseif index = 31232 lift regs amount1233 drop myPotionBag 121 65 0 1234 else1235 lift regs amount1236 drop myPotionBag 142 65 0 1237 endif1238 endif1239 1240 @ignore regs 1241 1242 if moveRegs = 11243 wait maxwaittimeinms1244 endif1245 1246 endwhile1247 1248 #***** Greater Cure 3847 *****1249 1250 @setvar! regsID 38471251 @setvar! myCounter 01252 1253 while findtype regsID self as r 1254 @setvar! myCounter index1255 @ignore r1256 endwhile1257 @clearignore1258 1259 if counttype regsID self <= 101260 @setvar! amount 21261 elseif counttype regsID self <= 201262 @setvar! amount 4 1263 elseif counttype regsID self <= 501264 @setvar! amount 10 1265 elseif counttype regsID self <= 1001266 @setvar! amount 20 1267 elseif counttype regsID self <= 1501268 @setvar! amount 301269 elseif counttype regsID self <= 2001270 @setvar! amount 401271 else 1272 @setvar! amount 501273 endif1274 1275 while findtype regsID self as regs1276 @setvar! moveRegs 0 1277 1278 if myCounter = 01279 @setvar! moveRegs 11280 elseif myCounter != 0 and not find regs myPotionBag1281 @setvar! moveRegs 11282 endif1283 1284 if moveRegs = 1 1285 overhead "splitting Greater Cure.." 441286 if index = 01287 lift regs amount1288 drop myPotionBag 44 65 0 1289 elseif index = 11290 lift regs amount1291 drop myPotionBag 68 65 0 1292 elseif index = 21293 lift regs amount1294 drop myPotionBag 96 65 0 1295 elseif index = 31296 lift regs amount1297 drop myPotionBag 121 65 0 1298 else1299 lift regs amount1300 drop myPotionBag 142 65 0 1301 endif1302 endif1303 1304 @ignore regs 1305 1306 if moveRegs = 11307 wait maxwaittimeinms1308 endif1309 1310 endwhile1311 1312 1313 #***** Greater Agility 3848 *****1314 1315 @setvar! regsID 38481316 @setvar! myCounter 01317 1318 while findtype regsID self as r 1319 @setvar! myCounter index1320 @ignore r1321 endwhile1322 @clearignore1323 1324 if counttype regsID self <= 101325 @setvar! amount 11326 elseif counttype regsID self <= 201327 @setvar! amount 2 1328 elseif counttype regsID self <= 501329 @setvar! amount 4 1330 elseif counttype regsID self <= 1001331 @setvar! amount 10 1332 elseif counttype regsID self <= 1501333 @setvar! amount 201334 elseif counttype regsID self <= 2001335 @setvar! amount 301336 else 1337 @setvar! amount 401338 endif1339 1340 while findtype regsID self as regs1341 @setvar! moveRegs 0 1342 1343 if myCounter = 01344 @setvar! moveRegs 11345 elseif myCounter != 0 and not find regs myPotionBag1346 @setvar! moveRegs 11347 endif1348 1349 if moveRegs = 1 1350 overhead "splitting Greater Agility.." 931351 if index = 01352 lift regs amount1353 drop myPotionBag 44 88 0 1354 elseif index = 11355 lift regs amount1356 drop myPotionBag 68 88 0 1357 elseif index = 21358 lift regs amount1359 drop myPotionBag 96 88 0 1360 elseif index = 31361 lift regs amount1362 drop myPotionBag 121 88 0 1363 else1364 lift regs amount1365 drop myPotionBag 142 88 0 1366 endif1367 endif1368 1369 @ignore regs 1370 1371 if moveRegs = 11372 wait maxwaittimeinms1373 endif1374 1375 endwhile1376 1377 1378 #***** Total Refresh 3851 *****1379 1380 @setvar! regsID 38511381 @setvar! myCounter 01382 1383 while findtype regsID self as r 1384 @setvar! myCounter index1385 @ignore r1386 endwhile1387 @clearignore1388 1389 if counttype regsID self <= 101390 @setvar! amount 21391 elseif counttype regsID self <= 201392 @setvar! amount 4 1393 elseif counttype regsID self <= 501394 @setvar! amount 10 1395 elseif counttype regsID self <= 1001396 @setvar! amount 20 1397 elseif counttype regsID self <= 1501398 @setvar! amount 301399 elseif counttype regsID self <= 2001400 @setvar! amount 401401 else 1402 @setvar! amount 501403 endif1404 1405 while findtype regsID self as regs1406 @setvar! moveRegs 0 1407 1408 if myCounter = 01409 @setvar! moveRegs 11410 elseif myCounter != 0 and not find regs myPotionBag1411 @setvar! moveRegs 11412 endif1413 1414 if moveRegs = 1 1415 overhead "splitting Total Refresh.." 381416 if index = 01417 lift regs amount1418 drop myPotionBag 44 88 0 1419 elseif index = 11420 lift regs amount1421 drop myPotionBag 68 88 0 1422 elseif index = 21423 lift regs amount1424 drop myPotionBag 96 88 0 1425 elseif index = 31426 lift regs amount1427 drop myPotionBag 121 88 0 1428 else1429 lift regs amount1430 drop myPotionBag 142 88 0 1431 endif1432 endif1433 1434 @ignore regs 1435 1436 if moveRegs = 11437 wait maxwaittimeinms1438 endif1439 1440 endwhile1441 1442 1443 1444 #***** Greater Magic Resist 3846 *****1445 1446 @setvar! regsID 38461447 @setvar! myCounter 01448 1449 while findtype regsID self as r 1450 @setvar! myCounter index1451 @ignore r1452 endwhile1453 @clearignore1454 1455 if counttype regsID self <= 101456 @setvar! amount 11457 elseif counttype regsID self <= 201458 @setvar! amount 2 1459 elseif counttype regsID self <= 501460 @setvar! amount 5 1461 elseif counttype regsID self <= 1001462 @setvar! amount 10 1463 elseif counttype regsID self <= 1501464 @setvar! amount 201465 elseif counttype regsID self <= 2001466 @setvar! amount 301467 else 1468 @setvar! amount 401469 endif1470 1471 while findtype regsID self as regs1472 @setvar! moveRegs 0 1473 1474 if myCounter = 01475 @setvar! moveRegs 11476 elseif myCounter != 0 and not find regs myPotionBag1477 @setvar! moveRegs 11478 endif1479 1480 if moveRegs = 1 1481 overhead "splitting Greater Magic Resist.." 8971482 if index = 01483 lift regs amount1484 drop myPotionBag 44 112 0 1485 elseif index = 11486 lift regs amount1487 drop myPotionBag 68 112 0 1488 elseif index = 21489 lift regs amount1490 drop myPotionBag 96 112 0 1491 elseif index = 31492 lift regs amount1493 drop myPotionBag 121 112 0 1494 else1495 lift regs amount1496 drop myPotionBag 142 112 0 1497 endif1498 endif1499 1500 @ignore regs 1501 1502 if moveRegs = 11503 wait maxwaittimeinms1504 endif1505 1506 endwhile1507 1508 1509 #***** Greater Strength 3849 *****1510 1511 @setvar! regsID 38491512 @setvar! myCounter 01513 1514 while findtype regsID self as r 1515 @setvar! myCounter index1516 @ignore r1517 endwhile1518 @clearignore1519 1520 if counttype regsID self <= 101521 @setvar! amount 21522 elseif counttype regsID self <= 201523 @setvar! amount 4 1524 elseif counttype regsID self <= 501525 @setvar! amount 10 1526 elseif counttype regsID self <= 1001527 @setvar! amount 20 1528 elseif counttype regsID self <= 1501529 @setvar! amount 301530 elseif counttype regsID self <= 2001531 @setvar! amount 401532 else 1533 @setvar! amount 501534 endif1535 1536 while findtype regsID self as regs1537 @setvar! moveRegs 0 1538 1539 if myCounter = 01540 @setvar! moveRegs 11541 elseif myCounter != 0 and not find regs myPotionBag1542 @setvar! moveRegs 11543 endif1544 1545 if moveRegs = 1 1546 overhead "splitting Greater Strength.." 20411547 if index = 01548 lift regs amount1549 drop myPotionBag 44 112 0 1550 elseif index = 11551 lift regs amount1552 drop myPotionBag 68 112 0 1553 elseif index = 21554 lift regs amount1555 drop myPotionBag 96 112 0 1556 elseif index = 31557 lift regs amount1558 drop myPotionBag 121 112 0 1559 else1560 lift regs amount1561 drop myPotionBag 142 112 0 1562 endif1563 endif1564 1565 @ignore regs 1566 1567 if moveRegs = 11568 wait maxwaittimeinms1569 endif1570 1571 endwhile1572 1573 1574 #***** Greater Explode 3853 *****1575 1576 @setvar! regsID 38531577 @setvar! myCounter 01578 1579 while findtype regsID self as r 1580 @setvar! myCounter index1581 @ignore r1582 endwhile1583 @clearignore1584 1585 if counttype regsID self <= 101586 @setvar! amount 21587 elseif counttype regsID self <= 201588 @setvar! amount 4 1589 elseif counttype regsID self <= 501590 @setvar! amount 10 1591 elseif counttype regsID self <= 1001592 @setvar! amount 20 1593 elseif counttype regsID self <= 1501594 @setvar! amount 301595 elseif counttype regsID self <= 2001596 @setvar! amount 401597 else 1598 @setvar! amount 501599 endif1600 1601 while findtype regsID self as regs1602 @setvar! moveRegs 0 1603 1604 if myCounter = 01605 @setvar! moveRegs 11606 elseif myCounter != 0 and not find regs myPotionBag1607 @setvar! moveRegs 11608 endif1609 1610 if moveRegs = 1 1611 overhead "splitting Greater Explode.." 12751612 if index = 01613 lift regs amount1614 drop myPotionBag 44 130 0 1615 elseif index = 11616 lift regs amount1617 drop myPotionBag 68 130 0 1618 elseif index = 21619 lift regs amount1620 drop myPotionBag 96 130 0 1621 elseif index = 31622 lift regs amount1623 drop myPotionBag 121 130 0 1624 else1625 lift regs amount1626 drop myPotionBag 142 130 0 1627 endif1628 endif1629 1630 @ignore regs 1631 1632 if moveRegs = 11633 wait maxwaittimeinms1634 endif1635 1636 endwhile1637 1638 1639 1640 #***** Lethal Poison 3850 *****1641 1642 @setvar! regsID 38501643 @setvar! myCounter 01644 1645 while findtype regsID self as r 1646 @setvar! myCounter index1647 @ignore r1648 endwhile1649 @clearignore1650 1651 if counttype regsID self <= 101652 @setvar! amount 21653 elseif counttype regsID self <= 201654 @setvar! amount 4 1655 elseif counttype regsID self <= 501656 @setvar! amount 10 1657 elseif counttype regsID self <= 1001658 @setvar! amount 20 1659 elseif counttype regsID self <= 1501660 @setvar! amount 301661 elseif counttype regsID self <= 2001662 @setvar! amount 401663 else 1664 @setvar! amount 501665 endif1666 1667 while findtype regsID self as regs1668 @setvar! moveRegs 0 1669 1670 if myCounter = 01671 @setvar! moveRegs 11672 elseif myCounter != 0 and not find regs myPotionBag1673 @setvar! moveRegs 11674 endif1675 1676 if moveRegs = 1 1677 overhead "splitting Lethal Poison.." 12671678 if index = 01679 lift regs amount1680 drop myPotionBag 44 130 0 1681 elseif index = 11682 lift regs amount1683 drop myPotionBag 68 130 0 1684 elseif index = 21685 lift regs amount1686 drop myPotionBag 96 130 0 1687 elseif index = 31688 lift regs amount1689 drop myPotionBag 121 130 0 1690 else1691 lift regs amount1692 drop myPotionBag 142 130 0 1693 endif1694 endif1695 @ignore regs 1696 1697 if moveRegs = 11698 wait maxwaittimeinms1699 endif1700 endwhile1701 1702 1703 #***** Bandages 3617 *****1704 1705 @setvar! regsID 36171706 @setvar! myCounter 01707 1708 while findtype regsID self as r 1709 @setvar! myCounter index1710 @ignore r1711 endwhile1712 @clearignore1713 1714 if counttype regsID self <= 101715 @setvar! amount 21716 elseif counttype regsID self <= 201717 @setvar! amount 4 1718 elseif counttype regsID self <= 501719 @setvar! amount 10 1720 elseif counttype regsID self <= 1001721 @setvar! amount 20 1722 elseif counttype regsID self <= 1501723 @setvar! amount 301724 elseif counttype regsID self <= 2001725 @setvar! amount 401726 else 1727 @setvar! amount 501728 endif1729 1730 while findtype regsID self as regs1731 @setvar! moveRegs 0 1732 1733 if myCounter = 01734 @setvar! moveRegs 11735 elseif myCounter != 0 and not find regs myMiscBag1736 @setvar! moveRegs 11737 endif1738 1739 if moveRegs = 1 1740 overhead "splitting Bandages.." 01741 if index = 01742 lift regs amount1743 drop myMiscBag 44 65 0 1744 elseif index = 11745 lift regs amount1746 drop myMiscBag 68 65 0 1747 elseif index = 21748 lift regs amount1749 drop myMiscBag 96 65 0 1750 elseif index = 31751 lift regs amount1752 drop myMiscBag 121 65 0 1753 else1754 lift regs amount1755 drop myMiscBag 142 65 0 1756 endif1757 endif1758 1759 @ignore regs 1760 1761 if moveRegs = 11762 wait maxwaittimeinms1763 endif1764 1765 endwhile1766 1767 #***** Rope 5370 *****1768 1769 @setvar! regsID 53701770 @setvar! myCounter 01771 1772 while findtype regsID self as r 1773 @setvar! myCounter index1774 @ignore r1775 endwhile1776 @clearignore1777 1778 if counttype regsID self <= 101779 @setvar! amount 21780 elseif counttype regsID self <= 201781 @setvar! amount 4 1782 elseif counttype regsID self <= 501783 @setvar! amount 10 1784 elseif counttype regsID self <= 1001785 @setvar! amount 20 1786 elseif counttype regsID self <= 1501787 @setvar! amount 301788 elseif counttype regsID self <= 2001789 @setvar! amount 401790 else 1791 @setvar! amount 501792 endif1793 1794 while findtype regsID self as regs1795 @setvar! moveRegs 0 1796 1797 if myCounter = 01798 @setvar! moveRegs 11799 elseif myCounter != 0 and not find regs myMiscBag1800 @setvar! moveRegs 11801 endif1802 1803 if moveRegs = 1 1804 overhead "splitting Rope.." 3601805 if index = 01806 lift regs amount1807 drop myMiscBag 44 65 0 1808 elseif index = 11809 lift regs amount1810 drop myMiscBag 68 65 0 1811 elseif index = 21812 lift regs amount1813 drop myMiscBag 96 65 0 1814 elseif index = 31815 lift regs amount1816 drop myMiscBag 121 65 0 1817 else1818 lift regs amount1819 drop myMiscBag 142 65 0 1820 endif1821 endif1822 1823 @ignore regs 1824 1825 if moveRegs = 11826 wait maxwaittimeinms1827 endif1828 endwhile1829 1830 overhead "Splitter completed" 01831 1832endif1833 1834if GATHERING = 11835 sysmsg "* auto-lumber activated *" 661836 overhead "* auto-lumber activated *" 661837else 1838 sysmsg "* auto-mining activated *" 551839 overhead "* auto-mining activated *" 551840endif1841 1842clearsysmsg1843clearhands both1844 1845while not dead 1846 settimer cycleTimer 01847 1848 if targetexists1849 hotkey 'cancel current target' 1850 endif1851 1852 if enemyFound = 01853 if insysmsg! "Now tracking" or insysmsg! "Distance to"1854 @setvar! enemyFound 11855 endif1856 endif1857 1858#********** TRIGGER AUTO-RECALL IF BEING ATTACKED / OUT OF REGS / ENEMY TOO CLOSE **********1859 1860 if cooldown "Danger" > 0 1861 if timer beingAttackedTimer > beingAttackedCD1862 sysmsg "* being attacked *" 341863 settimer beingAttackedTimer 01864 endif1865 @setvar! autoRecall 11866 @setvar! enemyFound 11867 endif 1868 1869 if minRegs != 01870 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 <= minRegs1871 overhead "* low reagents *" 341872 sysmsg " *low reagents recalling out *" 341873 1874 @setvar! autoRecall 11875 @setvar! enemyFound 11876 endif1877 endif1878 1879 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"1880 sysmsg "* recalling enemy very close [d 0-9] *" 331881 @setvar! autoRecall 11882 @setvar! enemyFound 11883 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"1884 sysmsg "* recalling enemy very close [d 10-17] *" 331885 @setvar! autoRecall 11886 @setvar! enemyFound 11887 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"1888 sysmsg "* recalling enemy very close [d 18-25] *" 331889 @setvar! autoRecall 11890 @setvar! enemyFound 11891 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"1892 sysmsg "* recalling enemy very close [d 26-33] *" 331893 @setvar! autoRecall 11894 @setvar! enemyFound 11895 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"1896 sysmsg "* recalling enemy very close [d 34-40] *" 331897 @setvar! autoRecall 11898 @setvar! enemyFound 11899 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"1900 sysmsg "* recalling enemy very close [n 0-9] *" 331901 @setvar! autoRecall 11902 @setvar! enemyFound 11903 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"1904 sysmsg "* recalling enemy very close [n 10-17] *" 331905 @setvar! autoRecall 11906 @setvar! enemyFound 11907 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"1908 sysmsg "* recalling enemy very close [n 18-25] *" 331909 @setvar! autoRecall 11910 @setvar! enemyFound 11911 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"1912 sysmsg "* recalling enemy very close [n 26-33] *" 331913 @setvar! autoRecall 11914 @setvar! enemyFound 11915 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"1916 sysmsg "* recalling enemy very close [n 34-40] *" 331917 @setvar! autoRecall 11918 @setvar! enemyFound 11919 endif1920 1921#********** AUTO-RECALL OUT IF NECESSARY **********1922 1923 if enemyFound = 1 and autoRecall = 11924 sysmsg "recalling..." 661925 interrupt1926 clearignore1927 if targetexists1928 hotkey 'cancel current target' 1929 wait 2501930 endif1931 1932 while mana <= 10 and diffhits < activateAutoHealDiff1933 overhead "* low mana to recall *" 441934 wait maxwaittimeinms1935 endwhile1936 1937#********** USING REAGENTS OR RECALL SCROLL ********** 1938 1939 if insysmsg "that location is blocked"1940 endif1941 if insysmsg "charges"1942 endif1943 if insysmsg "Your concentration is disturbed"1944 endif1945 if insysmsg "marked"1946 endif1947 1948 if recallType = 0 or recallType = 11949 1950 while not casting1951 if recallType = 01952 cast 'recall'1953 #sysmsg "recalling using regs" 111954 else 1955 dclicktype "recall" self1956 #sysmsg "recalling using scroll" 111957 endif1958 endwhile 1959 1960 while not targetexists1961 if insysmsg "Your concentration is disturbed"1962 interrupt1963 break 1964 endif 1965 endwhile1966 1967 if targetexists and findtype "runebook|runetome" backpack as obj1968 1969 while findtype "runebook|runetome" backpack as book 1970 if hue book = recallBookHue 1971 target book1972 wait 2501973 break1974 endif 1975 @ignore book 1976 endwhile1977 1978 clearignore1979 1980 if insysmsg "marked"1981 sysmsg "Runebook is not marked! Mark the book NOW!" 161982 elseif insysmsg "blocked"1983 sysmsg "Location Blocked! Now using book charge first rune!" 161984 @setvar! recallType 21985 elseif not findtype 3974 self or not findtype 3962 self or not findtype 3963 self 1986 sysmsg "No reagents! Now using book charge first rune!"1987 @setvar! recallType 21988 elseif targetexists1989 sysmsg "Hued Book not found. Switching to any book hue" 161990 @setvar! recallBookHue 01991 else 1992 overhead "Successful" 65 1993 sysmsg "Lumberjacking Completed!" 65 1994 stop 1995 endif 1996 1997 elseif targetexists and findtype "recall rune" backpack as obj1998 @setvar! tempRune 0 1999 2000 while findtype "recall rune" backpack as obj2001 getlabel obj runeLabel 2002 if "blank" in runeLabel2003 else 2004 if "home" in runeLabel2005 target obj2006 @setvar! tempRune obj 2007 break2008 endif2009 @setvar! tempRune obj 2010 endif2011 @ignore obj2012 endwhile2013 2014 @clearignore2015 wait 2502016 2017 if tempRune = 0 2018 sysmsg "No recalleable rune found" 342019 hotkey "cancel current target" 2020 elseif insysmsg "blocked" 2021 sysmsg "Location Blocked!" 342022 else2023 overhead "Successful" 65 2024 sysmsg "Lumberjacking Completed!" 65 2025 stop2026 endif 2027 2028 elseif targetexists2029 sysmsg "No recall book or rune found" 342030 stop2031 endif2032 2033 elseif recallType = 2 or recallType = 32034 2035#********** USING RECALL BOOK CHARGE ********** 2036 2037 if findtype "runebook|runetome" backpack2038 2039 while diffhits < activateAutoHealDiff2040 @setvar! foundBook 02041 2042 while findtype "runebook" backpack as book2043 if hue book = recallBookHue or recallBookHue = 02044 dclick book backpack2045 waitforgump 1551740969 maxwaittimeinms2046 2047 if recallType = 22048 gumpresponse 2 2049 elseif recallType = 32050 gumpresponse 922051 endif2052 2053 @setvar! foundBook book2054 break2055 else 2056 @ignore book2057 endif2058 endwhile2059 2060 while foundBook = 0 and findtype "runetome" backpack as book2061 if gumpexists 1670900272062 gumpclose 1670900272063 wait 2502064 endif2065 2066 if hue book = recallBookHue or recallBookHue = 02067 dclick book backpack2068 waitforgump 167090027 maxwaittimeinms2069 2070 if recallType = 22071 gumpresponse 100 2072 elseif recallType = 3 2073 gumpresponse 1252074 endif2075 2076 @setvar! foundBook book2077 break2078 else 2079 @ignore book2080 endif2081 endwhile2082 2083 wait 2502084 clearignore2085 2086 while casting2087 endwhile2088 2089 wait 2502090 2091 if foundBook = 0 2092 sysmsg "Recall book not found!" 34 2093 sysmsg "Switching to type 0 using reagents" 552094 elseif insysmsg "charges"2095 sysmsg "No recall charges!" 342096 sysmsg "Switching to type 0 using reagents" 552097 elseif insysmsg "This book"2098 sysmsg "Recall book cooldown!" 342099 else2100 if insysmsg "concentration"2101 sysmsg "Interrupted!" 342102 elseif insysmsg "location"2103 sysmsg "Location blocked!" 2104 if recallType = 2 2105 @setvar! recallType 3 2106 sysmsg "Switching to type 3 last rune charge" 552107 else2108 @setvar! recallType 22109 sysmsg "Switching to type 2 first rune charge" 552110 endif2111 else2112 overhead "Successful" 65 2113 sysmsg "Lumberjacking Completed!" 652114 stop2115 endif2116 endif2117 endwhile2118 else 2119 overhead "No runebook or runetome found to use charge!" 342120 endif2121 else 2122 overhead "Variable 'recallType' value out of range" 342123 endif 2124 endif2125 2126#********** AUTO HEALING START **********# 2127 2128 while diffhits >= activateAutoHealDiff or paralyzed or poisoned2129 if dead2130 stop2131 endif2132 2133 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 2134 if timer noRegsMessageTimer > noRegsMessageCD2135 overhead "* Missing Reagents *" 342136 settimer noRegsMessageTimer 02137 endif2138 endif2139 2140 @setvar! castingInterrupted 02141 2142 if timer allGuardTimer > allGuardCD and followers > 02143 sysmsg "heal loop: all guard"2144 say 'ALL Guard ME' 882145 settimer allGuardTimer 02146 endif2147 2148 if timer autoHealMessageTimer > autoHealMessageCD2149 overhead "* auto-healing *" 902150 settimer autoHealMessageTimer 02151 endif 2152 2153 if not findbuff "food" 2154 if findtype "tray" backpack as fody 2155 dclick fody2156 wait 2002157 else 2158 if timer foodMessageTimer > foodMessageCD2159 overhead "No food found!" 342160 settimer foodMessageTimer 02161 endif2162 endif2163 endif2164 2165 #--- Drink str pot ---#2166 2167 if drinkStr = 1 and str < strengthLowerThan2168 if not findbuff "Strength" 2169 if findtype "White Potion" self2170 dclicktype "White Potion"2171 wait 2002172 else2173 if timer whiteMessageTimer > whiteMessageCD2174 overhead "Out of str pots" 342175 settimer whiteMessageTimer 0 2176 endif2177 endif2178 endif2179 endif2180 2181 #--- Drink agility pot ---#2182 2183 if drinkAgility = 12184 if not findbuff "Agility" 2185 if findtype "Blue Potion" self2186 dclicktype "Blue Potion"2187 wait 2002188 else2189 if timer blueMessageTimer > blueMessageCD2190 overhead "Out of agility pots" 342191 settimer blueMessageTimer 0 2192 endif2193 endif2194 endif2195 endif2196 2197 #--- Drink magic resist pot ---#2198 2199 if drinkMagicResist = 12200 if not findbuff "Magic Resist" 2201 if findtype "Black Potion" self2202 dclicktype "Black Potion"2203 wait 2002204 else2205 if timer blackMessageTimer > blackMessageCD2206 overhead "Out of resist pots" 342207 settimer blackMessageTimer 02208 endif2209 endif2210 endif2211 endif2212 2213 #--- Drink red pot ---#2214 2215 if diffstam > drinkWhenMissingStamina and 1 = drinkRefresh2216 if findtype "Red Potion" self2217 dclicktype "Red Potion"2218 wait 2002219 else2220 if timer redMessageTimer > redMessageCD2221 overhead "Out of refresh pots" 342222 settimer redMessageTimer 0 2223 endif2224 endif2225 endif2226 2227 #--- Trapped ---#2228 2229 if paralyzed 2230 if findtype "pouch" backpack 38 2231 yell "[pouch" 2232 wait 2002233 else2234 if timer pouchMessageTimer > pouchMessageCD2235 overhead "Out of Pouches!" 342236 settimer pouchMessageTimer 02237 endif2238 endif2239 endif2240 2241 #--- Self bandage ---#2242 2243 if diffhits >= 1 and not bandaging2244 if skill 'healing' >= 50 or skill "veterinary" >= 502245 if findtype 'clean bandage%s%' backpack2246 2247 if targetexists2248 hotkey 'cancel current target' 2249 endif2250 dclicktype 'clean bandage%s%'2251 waitfortarget maxwaittimeinms2252 target 'self'2253 wait 200 2254 else2255 if timer aidsMessageTimer > aidsMessageCD2256 overhead "Out of bandages" 342257 settimer aidsMessageTimer 02258 endif2259 endif2260 endif2261 endif2262 2263 #--- Poisoned ---#2264 2265 if 1 = drinkCure or 1 = cureSpell2266 while poisoned2267 if findtype "Orange Potion" self2268 2269 dclicktype "Orange Potion"2270 wait 2002271 else2272 if timer orangeMessageTimer > orangeMessageCD2273 overhead "Out of cure pots" 342274 settimer orangeMessageTimer 02275 endif2276 2277 if diffhits >= 30 or not findtype 3972 self or not findtype 3973 self2278 break2279 endif2280 2281 if skill 'magery' >= 40 and mana >= 6 and 1 = cureSpell and not casting2282 cast 'cure'2283 wait 502284 while not casting 2285 if targetexists2286 hotkey 'cancel current target'2287 endif2288 cast 'cure' 2289 wait 502290 endwhile 2291 while not targetexists and casting2292 endwhile2293 waitfortarget maxwaittimeinms2294 target 'self' 2295 wait 2002296 else 2297 break2298 endif2299 endif2300 endwhile2301 endif2302 2303 #--- Drink Heal Pot ---#2304 2305 if diffhits >= drinkHealPotDiff and 1 = drinkHeal2306 if findtype "Yellow Potion" self as hPot2307 getlabel hPot potLabel2308 if "next" in potLabel2309 #do nothing2310 else2311 @setvar! ch 02312 2313 if counttype 3852 self as c2314 @setvar! ch c2315 endif2316 if insysmsg "potion satchel used"2317 endif2318 2319 dclicktype 38522320 getlabel backpack xxx2321 wait 2002322 2323 if ch != counttype 3852 self or insysmsg "potion satchel used"2324 cooldown "Heal Pot" healingPotCD2325 endif2326 endif2327 else2328 if timer yellowMessageTimer > yellowMessageCD2329 overhead "Out of heals pots" 342330 settimer yellowMessageTimer 02331 endif2332 endif2333 endif2334 2335 #--- Cast heals ---#2336 2337 if skill 'magery' >= 40 and diffhits >= startCastMiniHealDiff and diffhits < endCastMiniHealDiff and mana >= 4 and miniHeal = 1 and not casting2338 if insysmsg "Your concentration is disturbed"2339 endif 2340 2341 sysmsg 'mini heal' 112342 cast 'heal'2343 while not casting 2344 if targetexists2345 hotkey 'cancel current target'2346 endif2347 cast 'heal'2348 endwhile 2349 2350 while not targetexists2351 if insysmsg "Your concentration is disturbed"2352 interrupt2353 @setvar! castingInterrupted 12354 break 2355 endif2356 endwhile2357 2358 if 0 = castingInterrupted2359 target 'self' 2360 endif 2361 2362 elseif skill 'magery' >= 40 and diffhits >= castEmergencyMiniHealDiff and mana >= 4 and miniHeal = 1 and not casting2363 if insysmsg "Your concentration is disturbed"2364 endif 2365 sysmsg "mini heal" 112366 cast 'heal'2367 while not casting 2368 if targetexists2369 hotkey 'cancel current target'2370 endif2371 cast 'heal'2372 endwhile 2373 2374 while not targetexists2375 if insysmsg "Your concentration is disturbed"2376 interrupt2377 @setvar! castingInterrupted 12378 break 2379 endif2380 endwhile2381 2382 if 0 = castingInterrupted2383 target 'self' 2384 endif 2385 2386 elseif skill 'magery' >= 60 and diffhits >= startCastGreaterHealDiff and diffhits < endCastGreaterHealDiff and mana >= 11 and greaterHeal = 1 and not casting2387 if insysmsg "Your concentration is disturbed"2388 endif 2389 2390 sysmsg "greater heal" 112391 cast 'greater heal' 2392 while not casting 2393 if targetexists2394 hotkey 'cancel current target'2395 endif2396 cast 'greater heal'2397 endwhile 2398 2399 @settimer! spellTimer 0 2400 @setvar! spellCD 800 2401 2402 while not targetexists2403 if insysmsg "Your concentration is disturbed"2404 interrupt2405 @setvar! castingInterrupted 12406 break 2407 endif 2408 2409 if timer spellTimer < spellCD2410 #--- Poisoned ---#2411 2412 if 1 = drinkCure2413 while poisoned and casting and not targetexists 2414 if findtype "Orange Potion" self2415 dclicktype "Orange Potion"2416 wait 2002417 else2418 if timer orangeMessageTimer > orangeMessageCD2419 overhead "Out of cure pots" 342420 settimer orangeMessageTimer 02421 endif2422 break2423 endif2424 endwhile2425 endif 2426 2427 #--- Drink Heal Pot ---#2428 2429 if diffhits >= drinkHealPotDiff and 1 = drinkHeal and casting and not targetexists2430 if findtype "Yellow Potion" self as hPot2431 getlabel hPot potLabel2432 if "next" in potLabel2433 #do nothing2434 else2435 @setvar! ch 02436 2437 if counttype 3852 self as c2438 @setvar! ch c2439 endif2440 if insysmsg "potion satchel used"2441 endif2442 2443 dclicktype 38522444 getlabel backpack xxx2445 wait 2002446 2447 if ch != counttype 3852 self or insysmsg "potion satchel used"2448 cooldown "Heal Pot" healingPotCD2449 if diffhits < activateAutoHealDiff2450 interrupt2451 if targetexists2452 hotkey 'cancel current target'2453 endif2454 endif2455 endif2456 endif2457 else2458 if timer yellowMessageTimer > yellowMessageCD2459 overhead "Out of heals pots" 342460 settimer yellowMessageTimer 02461 endif2462 endif2463 endif2464 endif2465 endwhile2466 2467 if 0 = castingInterrupted2468 target 'self' 2469 endif 2470 2471 endif 2472 2473 endwhile2474 2475 @setvar! castingInterrupted 02476 2477 if autoTrapPouches = 12478 while findtype 3705 backpack 0 and findtype 3972 self and findtype 3973 self and findtype 3980 self2479 cast 'magic trap' 2480 while not casting 2481 if targetexists2482 hotkey 'cancel current target'2483 endif2484 cast 'magic trap'2485 endwhile 2486 2487 while not targetexists2488 if insysmsg "Your concentration is disturbed"2489 interrupt2490 @setvar! castingInterrupted 12491 break 2492 endif2493 endwhile2494 2495 if 0 = castingInterrupted2496 target self 2497 endif 2498 wait 2002499 endwhile2500 endif2501 2502#********** AUTO-MAGERY BUFFS IF NEEDED ********** 2503 @setvar! castingInterrupted 02504 2505 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 self2506 if insysmsg "that spell will not"2507 endif2508 if insysmsg "that spell is already"2509 endif2510 sysmsg "magic reflect" 112511 cast 'Magic Reflection'2512 while not casting 2513 getlabel backpack xxx2514 wait 2002515 if insysmsg "that spell will not" or insysmsg "that spell is already"2516 settimer magicReflectTimer 02517 break 2518 endif2519 if targetexists2520 hotkey 'cancel current target'2521 endif2522 cast 'Magic Reflection'2523 endwhile 2524 2525 while casting 2526 if diffhits >= interruptCastingDiff2527 interrupt2528 @setvar! castingInterrupted 1 2529 break2530 endif 2531 #--- Poisoned ---#2532 2533 if 1 = drinkCure2534 while poisoned and casting and not targetexists 2535 if findtype "Orange Potion" self2536 sysmsg "pot cure - reflect" 112537 dclicktype "Orange Potion"2538 wait 2002539 else2540 if timer orangeMessageTimer > orangeMessageCD2541 overhead "Out of cure pots" 342542 settimer orangeMessageTimer 02543 endif2544 break2545 endif2546 endwhile2547 endif 2548 2549 #--- Drink Heal Pot ---#2550 2551 if diffhits >= drinkHealPotDiff and 1 = drinkHeal and casting and not targetexists2552 if findtype "Yellow Potion" self as hPot2553 getlabel hPot potLabel2554 if "next" in potLabel2555 #do nothing2556 else2557 @setvar! ch 02558 2559 if counttype 3852 self as c2560 @setvar! ch c2561 endif2562 if insysmsg "potion satchel used"2563 endif2564 sysmsg "pot heal - reflect" 112565 dclicktype 38522566 getlabel backpack xxx2567 wait 2002568 2569 if ch != counttype 3852 self or insysmsg "potion satchel used"2570 cooldown "Heal Pot" healingPotCD2571 endif2572 endif2573 else2574 if timer yellowMessageTimer > yellowMessageCD2575 overhead "Out of heals pots" 342576 settimer yellowMessageTimer 02577 endif2578 endif2579 endif2580 2581 endwhile2582 wait 200 2583 2584 endif2585 2586 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 self2587 if insysmsg "that spell will not"2588 endif2589 if insysmsg "that spell is already"2590 endif2591 sysmsg "reflect armor" 112592 cast 'Reactive Armor'2593 while not casting 2594 getlabel backpack xxx2595 wait 2002596 if insysmsg "that spell will not" or insysmsg "that spell is already"2597 settimer armorReflectTimer 02598 break 2599 endif2600 if targetexists2601 hotkey 'cancel current target'2602 endif2603 cast 'Reactive Armor'2604 endwhile 2605 2606 while casting 2607 endwhile2608 getlabel backpack xxx2609 wait 200 2610 endif 2611 2612 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 self2613 sysmsg "protect" 112614 cast 'Protection'2615 while not casting2616 if targetexists2617 hotkey 'cancel current target'2618 endif2619 cast 'Protection'2620 endwhile 2621 while casting2622 endwhile2623 wait 200 2624 endif 2625 2626 if blessSpell = 1 and skill 'magery' >= 50 and not findbuff "Cunning" and mana >= miniumManaToBuff and diffhits < activateAutoHealDiff and findtype 3972 self and findtype 3974 self2627 sysmsg "bless" 112628 cast 'Bless' 2629 while not casting 2630 if targetexists2631 hotkey 'cancel current target'2632 endif2633 cast 'Bless'2634 wait 502635 endwhile 2636 2637 while not targetexists and casting2638 endwhile2639 2640 waitfortarget maxwaittimeinms2641 target 'self' 2642 wait 200 2643 endif 2644 2645#********** CHECK FOR WOODEN BOX & CAST SUMMONS ********** 2646 2647 if not findtype "wooden box" backpack or not findtype "copper key" backpack2648 overhead "Need 1 wooden box and 1 copper key to begin!" 332649 wait maxwaittimeinms 2650 elseif not findtype 3705 backpack2651 overhead "No pouches found for trap"2652 wait maxwaittimeinms2653 elseif counttype 2474 backpack > 1 or counttype 4110 backpack > 1 2654 overhead "You have more than 2 wooden boxes or more than 2 copper keys" 332655 wait maxwaittimeinms 2656 elseif findtype "wooden box" backpack as chest and findtype "copper key" backpack as key2657 getlabel chest chestLabel2658 if "items" in chestLabel2659 dclick key2660 waitfortarget maxwaittimeinms2661 target chest2662 wait maxwaittimeinms2663 overhead "[chest locked]" 552664 endif2665 2666#********** START AUTO SUMMONING **********# 2667 2668 while followers < maxFollowers and diffhits < activateAutoHealDiff2669 2670 if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 02671 break2672 endif 2673 2674 #--- Eat Food ---#2675 2676 if not findbuff "food" 2677 if findtype "tray" backpack as fody 2678 dclick fody2679 wait 2002680 else 2681 if timer foodMessageTimer > foodMessageCD2682 overhead "No food found!" 342683 settimer foodMessageTimer 02684 endif2685 endif2686 endif2687 2688 #--- Drink str pot ---#2689 2690 if drinkStr = 1 and str < strengthLowerThan2691 if not findbuff "Strength" 2692 if findtype "White Potion" self2693 dclicktype "White Potion"2694 wait 2002695 else2696 if timer whiteMessageTimer > whiteMessageCD2697 overhead "Out of str pots" 342698 settimer whiteMessageTimer 0 2699 endif2700 endif2701 endif2702 endif2703 2704 #--- Drink agility pot ---#2705 2706 if drinkAgility = 12707 if not findbuff "Agility" 2708 if findtype "Blue Potion" self2709 dclicktype "Blue Potion"2710 wait 2002711 else2712 if timer blueMessageTimer > blueMessageCD2713 overhead "Out of agility pots" 342714 settimer blueMessageTimer 0 2715 endif2716 endif2717 endif2718 endif2719 2720 #--- Drink magic resist pot ---#2721 2722 if drinkMagicResist = 12723 if not findbuff "Magic Resist" 2724 if findtype "Black Potion" self2725 dclicktype "Black Potion"2726 wait 2002727 else2728 if timer blackMessageTimer > blackMessageCD2729 overhead "Out of resist pots" 342730 settimer blackMessageTimer 02731 endif2732 endif2733 endif2734 endif2735 2736 #--- Drink red pot ---#2737 2738 if diffstam > drinkWhenMissingStamina and 1 = drinkRefresh2739 if findtype "Red Potion" self2740 dclicktype "Red Potion"2741 wait 2002742 else2743 if timer redMessageTimer > redMessageCD2744 overhead "Out of refresh pots" 342745 settimer redMessageTimer 0 2746 endif2747 endif2748 endif2749 2750 #--- Create mushroom ---#2751 2752 if insysmsg "You create"2753 endif 2754 2755 while counttype 29012 backpack < mushroomCount and findtype 3963 self and findtype 3976 self and mana > 32756 cast 'create food'2757 while not casting 2758 cast 'create food'2759 endwhile2760 while casting2761 endwhile2762 wait 2002763 getlabel backpack xxx2764 if insysmsg! "you create"2765 if insysmsg "you create a magic"2766 else2767 sysmsg "Wizard's Grimoire `create food` not found" 342768 @setvar! mushroomCount 02769 break 2770 endif2771 endif2772 endwhile2773 2774 #--- Eat Mushroom ---#2775 2776 if mana < eatMushWhenManaLowerThan and mushroomCount > 0 and timer mushroomTimer > mushroomTimerCD2777 if counttype 29012 backpack2778 if insysmsg "You consume a magic mushroom"2779 endif2780 sysmsg "Eating mush." 442781 dclicktype 29012 backpack2782 getlabel backpack xxx2783 wait 2002784 2785 if insysmsg "You consume a magic mushroom"2786 settimer mushroomTimer 02787 endif2788 else 2789 overhead "No mushrooms found!" 342790 endif2791 endif2792 2793 #--- Use Meditation ---#2794 2795 if 0 = useMeditationSkill and mana < 50 2796 break2797 elseif 1 = useMeditationSkill and mana < 50 and not findbuff "meditating" and timer meditationTimer > meditationCD2798 if insysmsg "you are at peace"2799 endif2800 if insysmsg "you enter a meditative trance"2801 endif2802 if insysmsg "You must wait a few moments to use another skill."2803 endif2804 2805 skill 'meditation'2806 getlabel backpack xxx2807 wait 2002808 if not findbuff 'meditating'2809 settimer meditationTimer 75002810 elseif findbuff 'meditating'2811 warmode on2812 warmode off2813 settimer meditationTimer 02814 while mana < 50 and diffhits < activateAutoHealDiff2815 if not findbuff 'meditating'2816 break2817 endif2818 if timer meditationMessageTimer > meditationMessageCD2819 overhead "* actively meditating *" 112820 settimer meditationMessageTimer 02821 endif2822 endwhile2823 endif2824 endif 2825 2826 #--- Check for new elementals ---#2827 2828 if 1 = castingEarth and followers > 12829 sysmsg "fixing earth" 442830 while findtype 158|14 ground -1 -1 12 as ele 2831 menu ele 12832 waitfortarget maxwaittimeinms2833 if targetexists 2834 if ele != earthFirsty and ele != earthSecondly2835 hotkey 'cancel current target'2836 2837 if earthFirsty = 0 2838 @setvar! earthFirsty ele2839 sysmsg "add earth 1" 112840 overhead "Earth 1" 634 ele2841 else 2842 @setvar! earthSecondly ele2843 sysmsg "add earth 2" 112844 overhead "Earth 2" 634 ele2845 endif2846 2847 break2848 endif2849 endif2850 @ignore ele2851 endwhile 2852 @clearignore2853 @setvar! castingEarth 02854 2855 elseif 1 = castingWater and followers > 12856 sysmsg "fixing water" 442857 while findtype 740|16 ground -1 -1 12 as ele 2858 menu ele 12859 waitfortarget maxwaittimeinms2860 if targetexists 2861 if ele != waterFirsty and ele != waterSecondly2862 hotkey 'cancel current target'2863 2864 if waterFirsty = 0 2865 @setvar! waterFirsty ele2866 sysmsg "add water 1" 112867 overhead "Water 1" 399 ele2868 else 2869 @setvar! waterSecondly ele2870 sysmsg "add water 2" 112871 overhead "Water 2" 399 ele2872 endif2873 2874 break2875 endif2876 endif2877 @ignore ele2878 endwhile2879 @clearignore2880 @setvar! castingWater 02881 2882 elseif 1 = castingCreature and followers > 02883 sysmsg "fixing creature" 442884 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 2885 menu ele 12886 waitfortarget maxwaittimeinms2887 if targetexists 2888 if ele != creatureFirsty and ele != creatureSecondly and ele != creatureThirdy and ele != creatureFourthy and ele != creatureFithy2889 hotkey 'cancel current target'2890 wait 502891 menu ele 32892 if creatureFirsty = 0 2893 @setvar! creatureFirsty ele2894 sysmsg "Creature 1" 112895 overhead "Creature 1" 11 ele2896 elseif creatureSecondly = 0 2897 @setvar! creatureSecondly ele2898 sysmsg "add creature 2" 112899 overhead "Creature 2" 11 ele2900 elseif creatureThirdy = 0 2901 @setvar! creatureThirdy ele2902 sysmsg "add creature 3" 112903 overhead "Creature 3" 11 ele2904 elseif creatureFourthy = 0 2905 @setvar! creatureFourthy ele2906 sysmsg "add creature 4" 112907 overhead "Creature 4" 11 ele2908 elseif creatureFithy = 0 2909 @setvar! creatureFithy ele2910 sysmsg "add creature 5" 112911 overhead "Creature 5" 11 ele2912 endif2913 2914 break2915 endif2916 endif2917 @ignore ele2918 endwhile 2919 @clearignore2920 @setvar! castingCreature 02921 endif2922 2923 #--- Check for dead elementals ---#2924 2925 if earthFirsty != 0 and dead earthFirsty2926 if list earthListy != 02927 poplist earthListy 'front' 2928 sysmsg "pop earth 1"2929 endif 2930 @setvar! earthFirsty 02931 endif2932 2933 if earthSecondly != 0 and dead earthSecondly2934 if list earthListy != 02935 poplist earthListy 'front' 2936 sysmsg "pop earth 2"2937 endif 2938 @setvar! earthSecondly 02939 endif2940 2941 if waterFirsty != 0 and dead waterFirsty2942 if list waterListy != 02943 poplist waterListy 'front' 2944 sysmsg "pop water 1"2945 endif2946 @setvar! waterFirsty 02947 endif2948 2949 if waterSecondly != 0 and dead waterSecondly2950 if list waterListy != 02951 poplist waterListy 'front' 2952 sysmsg "pop water 2"2953 endif2954 @setvar! waterSecondly 02955 endif2956 2957 if creatureFirsty != 0 and dead creatureFirsty 2958 if list creatureListy != 02959 poplist creatureListy 'front'2960 sysmsg "pop creature 1"2961 endif 2962 @setvar! creatureFirsty 02963 endif2964 2965 if creatureSecondly != 0 and dead creatureSecondly 2966 if list creatureListy != 02967 poplist creatureListy 'front'2968 sysmsg "pop creature 2"2969 endif 2970 @setvar! creatureSecondly 02971 endif2972 2973 if creatureThirdy != 0 and dead creatureThirdy 2974 if list creatureListy != 02975 poplist creatureListy 'front'2976 sysmsg "pop creature 3"2977 endif 2978 @setvar! creatureThirdy 02979 endif2980 2981 if creatureFourthy != 0 and dead creatureFourthy 2982 if list creatureListy != 02983 poplist creatureListy 'front'2984 sysmsg "pop creature 4"2985 endif 2986 @setvar! creatureFourthy 02987 endif2988 2989 if creatureFithy != 0 and dead creatureFithy 2990 if list creatureListy != 02991 poplist creatureListy 'front'2992 sysmsg "pop creature 5"2993 endif 2994 @setvar! creatureFithy 02995 endif2996 2997 @clearsysmsg2998 @setvar! wasInterrupted 02999 3000 if list earthListy = 0 3001 #sysmsg "Earth List = 0"3002 elseif list earthListy = 13003 #sysmsg "Earth List = 1"3004 elseif list earthListy = 23005 #sysmsg "Earth List = 2"3006 endif3007 3008 if list waterListy = 0 3009 #sysmsg "Water List = 0"3010 elseif list waterListy = 13011 #sysmsg "Water List = 1"3012 elseif list waterListy = 23013 #sysmsg "Water List = 2"3014 endif3015 3016 if list creatureListy = 0 3017 #sysmsg "Creature List = 0"3018 elseif list creatureListy = 13019 #sysmsg "Creature List = 1"3020 elseif list creatureListy = 23021 #sysmsg "Creature List = 2"3022 elseif list creatureListy = 23023 #sysmsg "Creature List = 2"3024 elseif list creatureListy = 23025 #sysmsg "Creature List = 2"3026 endif3027 3028 @setvar! missingSummonRegs 03029 @setvar! summoningSucessful 03030 3031 if not findtype 3963 self or not findtype 3974 self or not findtype 3981 self3032 @setvar! missingSummonRegs 13033 if timer noRegsMessageTimer > noRegsMessageCD3034 overhead 'No regs to summon!' 343035 sysmsg 'No regs to summon!' 343036 settimer noRegsMessageTimer 03037 endif3038 wait noRegsMessageCD3039 elseif mana < 503040 if timer noRegsMessageTimer > noRegsMessageCD3041 overhead "* low mana to summon *" 343042 settimer noRegsMessageTimer 03043 endif3044 endif3045 3046 3047 #********** CAST EARTH ELEMENTAL **********# 3048 3049 if earthElementals != 0 and list earthListy < earthElementals and followers < 4 and diffhits < activateAutoHealDiff and not casting and missingSummonRegs = 0 and mana > 493050 if insysmsg "world is saving"3051 endif3052 3053 @setvar! isWorldSaving 03054 3055 cast 'Earth Elemental'3056 @setvar! castingEarth 13057 while not casting 3058 cast 'Earth Elemental' 3059 if targetexists3060 hotkey 'cancel current target'3061 endif3062 endwhile 3063 3064 while not dead3065 3066 if enemyFound = 03067 if insysmsg! "Now tracking" or insysmsg! "Distance to"3068 @setvar! enemyFound 13069 endif3070 endif3071 3072 if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 03073 interrupt3074 @setvar! wasInterrupted 1 3075 break3076 endif 3077 3078 if insysmsg "world is saving"3079 interrupt3080 @setvar! isWorldSaving 13081 @setvar! wasInterrupted 1 3082 break3083 endif 3084 3085 if diffhits >= interruptCastingDiff3086 @setvar! wasInterrupted 1 3087 sysmsg "interrupted low health" 333088 interrupt3089 break3090 endif3091 3092 if not casting3093 getlabel backpack xxx3094 wait 2003095 3096 if insysmsg "Your concentration"3097 @setvar! wasInterrupted 1 3098 sysmsg "interrupted concentration" 33 3099 else 3100 sysmsg "casting finished" 113101 endif3102 3103 break3104 endif3105 3106 if timer summonMsgTimer > summonMsgCD3107 overhead "* summoning earth... *" 6343108 sysmsg "* summoning earth... *" 6343109 settimer summonMsgTimer 03110 endif3111 3112 endwhile3113 3114 if 0 = wasInterrupted3115 @setvar! summoningSucessful 13116 sysmsg "Summon Earth Successful" 3117 pushlist earthListy 'x' 'front'3118 3119 while not dead3120 if findtype 158|14 ground -1 -1 12 as ele 3121 menu ele 13122 waitfortarget maxwaittimeinms3123 if targetexists 3124 if ele != earthFirsty and ele != earthSecondly3125 hotkey 'cancel current target'3126 wait 503127 menu ele 3 3128 3129 if earthFirsty = 0 3130 @setvar! earthFirsty ele3131 sysmsg "add earth 1" 113132 overhead "Earth 1" 634 ele3133 else 3134 @setvar! earthSecondly ele3135 sysmsg "add earth 2" 113136 overhead "Earth 2" 634 ele3137 endif3138 3139 break3140 endif3141 endif3142 @ignore ele3143 endif3144 endwhile3145 3146 clearignore3147 @setvar! castingEarth 03148 endif3149 3150 #********** CAST WATER ELEMENTAL **********# 3151 3152 elseif waterElementals != 0 and list waterListy < waterElementals and followers < 4 and diffhits < activateAutoHealDiff and not casting and missingSummonRegs = 0 and mana > 493153 if insysmsg "world is saving"3154 endif3155 3156 @setvar! isWorldSaving 03157 3158 cast 'Water Elemental'3159 @setvar! castingWater 13160 while not casting 3161 cast 'Water Elemental' 3162 if targetexists3163 hotkey 'cancel current target'3164 endif3165 endwhile 3166 3167 while not dead3168 3169 if enemyFound = 03170 if insysmsg! "Now tracking" or insysmsg! "Distance to"3171 @setvar! enemyFound 13172 endif3173 endif3174 3175 if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 03176 interrupt3177 @setvar! wasInterrupted 1 3178 break3179 endif 3180 3181 if insysmsg "world is saving"3182 interrupt3183 @setvar! isWorldSaving 13184 @setvar! wasInterrupted 1 3185 break3186 endif 3187 3188 if diffhits >= interruptCastingDiff3189 @setvar! wasInterrupted 1 3190 sysmsg "interrupted low health" 333191 interrupt3192 break3193 endif3194 3195 if not casting3196 getlabel backpack xxx3197 wait 2003198 3199 if insysmsg "Your concentration"3200 @setvar! wasInterrupted 1 3201 sysmsg "interrupted concentration" 33 3202 else 3203 sysmsg "casting finished" 113204 endif3205 3206 break3207 endif3208 3209 if timer summonMsgTimer > summonMsgCD3210 overhead "* summoning water... *" 3993211 sysmsg "* summoning water... *" 3993212 settimer summonMsgTimer 03213 endif3214 3215 endwhile3216 3217 if 0 = wasInterrupted3218 @setvar! summoningSucessful 13219 sysmsg "Summon Water Successful" 3220 pushlist waterListy 'x' 'front'3221 3222 while not dead3223 if findtype 740|16 ground -1 -1 12 as ele 3224 menu ele 13225 waitfortarget maxwaittimeinms3226 if targetexists 3227 if ele != waterFirsty and ele != waterSecondly3228 hotkey 'cancel current target'3229 wait 503230 menu ele 3 3231 if waterFirsty = 0 3232 @setvar! waterFirsty ele3233 sysmsg "add water 1" 113234 overhead "Water 1" 399 ele3235 else 3236 @setvar! waterSecondly ele3237 sysmsg "add water 2" 113238 overhead "Water 2" 399 ele3239 endif3240 3241 break3242 endif3243 endif3244 @ignore ele3245 endif3246 endwhile3247 3248 clearignore3249 @setvar! castingWater 03250 endif3251 3252 #********** CAST SUMMON CREATURE **********# 3253 3254 elseif summonCreature != 0 and list creatureListy < summonCreature and followers < 5 and diffhits < activateAutoHealDiff and not casting and missingSummonRegs = 0 and mana > 13 3255 if insysmsg "world is saving"3256 endif3257 3258 @setvar! isWorldSaving 03259 3260 cast 'Summ. Creature'3261 @setvar! castingCreature 13262 while not casting 3263 cast 'Summ. Creature' 3264 if targetexists3265 hotkey 'cancel current target'3266 endif3267 endwhile 3268 3269 while not dead3270 3271 if enemyFound = 03272 if insysmsg! "Now tracking" or insysmsg! "Distance to"3273 @setvar! enemyFound 13274 endif3275 endif3276 3277 if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 03278 interrupt3279 @setvar! wasInterrupted 1 3280 break3281 endif 3282 3283 if insysmsg "world is saving"3284 interrupt3285 @setvar! isWorldSaving 13286 @setvar! wasInterrupted 1 3287 break3288 endif 3289 3290 if diffhits >= interruptCastingDiff3291 @setvar! wasInterrupted 1 3292 sysmsg "interrupted low health" 333293 interrupt3294 break3295 endif3296 3297 if not casting3298 getlabel backpack xxx3299 wait 2003300 3301 if insysmsg "Your concentration"3302 @setvar! wasInterrupted 1 3303 sysmsg "interrupted concentration" 33 3304 else 3305 sysmsg "casting finished" 113306 endif3307 3308 break3309 endif3310 3311 if timer summonMsgTimer > summonMsgCD3312 overhead "* summon creature... *" 8813313 sysmsg "* summon creature... *" 8813314 settimer summonMsgTimer 03315 endif3316 3317 endwhile3318 3319 if 0 = wasInterrupted3320 @setvar! summoningSucessful 13321 sysmsg "Summon Creature Successful" 3322 pushlist creatureListy 'x' 'front'3323 while not dead3324 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 3325 menu ele 13326 waitfortarget maxwaittimeinms3327 if targetexists 3328 if ele != creatureFirsty and ele != creatureSecondly and ele != creatureThirdy and ele != creatureFourthy and ele != creatureFithy3329 hotkey 'cancel current target'3330 wait 503331 menu ele 3 3332 if creatureFirsty = 0 3333 @setvar! creatureFirsty ele3334 sysmsg "add creature 1" 11 3335 overhead "Creature 1" 11 ele3336 elseif creatureSecondly = 0 3337 @setvar! creatureSecondly ele3338 sysmsg "add creature 2" 113339 overhead "Creature 2" 11 ele3340 elseif creatureThirdy = 0 3341 @setvar! creatureThirdy ele3342 sysmsg "add creature 3" 113343 overhead "Creature 3" 11 ele3344 elseif creatureFourthy = 0 3345 @setvar! creatureFourthy ele3346 sysmsg "add creature 4" 113347 overhead "Creature 4" 11 ele3348 elseif creatureFithy = 0 3349 @setvar! creatureFithy ele3350 sysmsg "add creature 5" 113351 overhead "Creature 5" 11 ele3352 endif3353 3354 break3355 endif3356 endif3357 @ignore ele3358 endif3359 endwhile3360 3361 clearignore3362 @setvar! castingCreature 03363 endif3364 3365 endif3366 3367 endwhile3368 3369 #********** BEGING HARVESTING ********** 3370 3371 if GATHERING = 1 3372 3373 if diffweight <= myWeightDiff3374 overhead '[Overveight Reached]' 443375 wait maxwaittimeinms 3376 elseif 1 = autoRecall and 1 = enemyFound or cooldown 'Danger' > 0 3377 sysmsg "Enemy Found: skip harvesting"3378 else3379 while lhandempty and rhandempty3380 if not findtype myHarvestingTool backpack3381 overhead "Out of hatchets!" 363382 wait maxwaittimeinms3383 elseif not casting3384 dclicktype myHarvestingTool3385 wait 2003386 endif3387 endwhile3388 3389 while not targetexists 3390 hotkey 'Use Item In Hand'3391 waitfortarget maxwaittimeinms3392 endwhile3393 target 'self' 3394 3395 settimer beginChopTimer 03396 3397 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 < activateAutoHealDiff3398 if enemyFound = 03399 if insysmsg! "Now tracking" or insysmsg! "Distance to"3400 @setvar! enemyFound 13401 endif3402 endif3403 3404 if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 03405 break3406 endif 3407 3408 if timer beginChopTimer > 650 and timer beginChopTimer < 100003409 overhead "* chopping tree *" 113410 settimer beginChopTimer 100003411 endif3412 endwhile3413 3414 if insysmsg "you do not see any"3415 overhead "* move to other tree *" 443416 wait 5003417 elseif insysmsg "you have recently"3418 overhead "* travel cooldown *" 9013419 wait 5003420 elseif insysmsg "harvesting is not allowed"3421 overhead "* Harvest NOT allowed! *" 333422 wait 5003423 else3424 #overhead "* tree chopped *" 11 3425 endif 3426 3427 #********** CUT LOGS INTO BOARDS AND SECURE BOARDS INSIDE LOCKED WOODEN BOX ********** 3428 3429 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 > 53430 settimer storeTimer 03431 if targetexists3432 hotkey 'cancel current target' 3433 endif3434 3435 while findtype "log%s" backpack any any 1 as myLogs and diffhits < activateAutoHealDiff 3436 if enemyFound = 03437 if insysmsg! "Now tracking" or insysmsg! "Distance to"3438 @setvar! enemyFound 13439 endif3440 endif3441 3442 if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 03443 break3444 endif 3445 3446 overhead "* refining logs *" 883447 hotkey 'Use Item In Hand'3448 waitfortarget maxwaittimeinms3449 target myLogs3450 wait maxwaittimeinms3451 endwhile3452 3453 while findtype "board%s" backpack any any 1 as boardz and diffhits < activateAutoHealDiff3454 if enemyFound = 03455 if insysmsg! "Now tracking" or insysmsg! "Distance to"3456 @setvar! enemyFound 13457 endif3458 endif3459 3460 if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 03461 break3462 endif 3463 3464 overhead "* securing boards *" 88 3465 wait 1003466 lift boardz 99993467 drop chest -1 -1 03468 wait maxwaittimeinms3469 3470 if insysmsg "it appears"3471 overhead "[unlocking chest]" 743472 dclick key3473 waitfortarget maxwaittimeinms3474 target chest3475 wait maxwaittimeinms3476 endif3477 endwhile3478 3479 endif3480 endif3481 3482 else 3483 3484 #********** IF OVERWEIGHT AUTO-DETECT PACK HORSE/LLAMA AND MOVE ORE TO PACK ********** 3485 3486 if findtype 291|292 ground -1 -1 12 as pack3487 if myPack = 0 and noto pack = "friend"3488 @setvar! myPack pack3489 endif 3490 endif3491 3492 if diffweight <= myWeightDiff or weight > maxweight3493 @setvar! isOverweight 13494 if timer overweightMessageTimer > overweightMessageCD3495 overhead '[Overweight Reached]' 44 3496 settimer overweightMessageTimer 03497 endif3498 else 3499 @setvar! isOverweight 03500 endif3501 3502 if find myPack ground -1 -1 12 and 1 = isOverweight3503 3504 while findtype "iron ore" backpack any any 1 as ore and diffhits < activateAutoHealDiff 3505 3506 if enemyFound = 03507 if insysmsg! "Now tracking" or insysmsg! "Distance to"3508 @setvar! enemyFound 13509 endif3510 endif3511 3512 if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 03513 break3514 endif 3515 3516 if find myPack ground -1 -1 23517 dclick myPack3518 wait 2003519 if counttype "iron ore" myPack >= 9753520 overhead "* packy is full *" 343521 sysmsg "* auto recalling packy is full *" 343522 @setvar! enemyFound 13523 @setvar! autoRecall 1 3524 elseif counttype "iron ore" myPack >= 900 3525 lift ore 253526 drop myPack 3527 getlabel myPack testyL3528 sysmsg '{{testyL}}'3529 overhead "* dropping ore in pack *" 543530 wait 650 3531 else 3532 lift ore 503533 drop myPack 3534 getlabel myPack testyL3535 sysmsg '{{testyL}}'3536 overhead "* dropping ore in pack *" 543537 wait 650 3538 endif 3539 else 3540 overhead "* move closer to pack *" 443541 wait 650 3542 endif3543 3544 endwhile 3545 3546 getlabel myPack packLabel3547 3548 overhead "{{packLabel}}" 88 myPack3549 sysmsg "{{packLabel}}" 88 myPack3550 3551 endif3552 3553 3554 #********** BEGIN HARVESTING ********** 3555 3556 while lhandempty and rhandempty3557 3558 if enemyFound = 03559 if insysmsg! "Now tracking" or insysmsg! "Distance to"3560 @setvar! enemyFound 13561 endif3562 endif3563 3564 if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 03565 break3566 endif 3567 3568 if not findtype myHarvestingTool backpack3569 overhead "Out of pickaxes!" 363570 wait maxwaittimeinms3571 elseif not casting 3572 dclicktype myHarvestingTool3573 wait maxwaittimeinms3574 endif3575 endwhile3576 3577 if 0 = isOverweight3578 hotkey 'Use Item In Hand'3579 3580 settimer mineTimer 03581 3582 while timer mineTimer < mineTimerCD and diffhits < activateAutoHealDiff3583 if enemyFound = 03584 if insysmsg! "Now tracking" or insysmsg! "Distance to"3585 @setvar! enemyFound 13586 endif3587 endif3588 3589 if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 03590 break3591 endif 3592 endwhile3593 3594 getlabel backpack xxx3595 wait 200 3596 3597 if insysmsg "you do not see any"3598 overhead "* no more ore to mine*" 44 3599 elseif insysmsg "you have recently traveled"3600 overhead "* travel cooldown *" 9013601 else3602 overhead "* mining ore *" 11 3603 endif 3604 endif3605 3606 #********** SECURING INGOTS in LOCKED WOODEN BOX IF FOUND IN BACKPACK ********** 3607 3608 while findtype 7154 backpack any any 1 as ingotz and diffhits < activateAutoHealDiff 3609 3610 if enemyFound = 03611 if insysmsg! "Now tracking" or insysmsg! "Distance to"3612 @setvar! enemyFound 13613 endif3614 endif3615 3616 if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 03617 break3618 endif 3619 3620 overhead "* securing ingots *" 113621 clearsysmsg 3622 wait 2003623 lift ingotz 99993624 drop chest -1 -1 03625 3626 getlabel backpack xxx3627 wait 6503628 3629 if insysmsg "it appears"3630 overhead "[unlocking chest]" 443631 dclick key3632 waitfortarget 10003633 target chest3634 wait 6503635 endif3636 endwhile3637 3638 getlabel chest chestLabel3639 if "items" in chestLabel3640 dclick key3641 waitfortarget 10003642 target chest3643 overhead "[chest closed]" 543644 endif3645 3646 #********** AUTO-DETECT NEARBY FORGES AND AUTO SMELT ORE FROM BACKPACK AND PACK HORSE/LLAMA ********** 3647 3648 if findtype "forge" ground -1 -1 3 as forgy3649 overhead " * FORGE NEAR HERE *" 88 forgy 3650 while find forgy ground -1 -1 3 and findtype "iron ore" backpack as ore3651 3652 if enemyFound = 03653 if insysmsg! "Now tracking" or insysmsg! "Distance to"3654 @setvar! enemyFound 13655 endif3656 endif3657 3658 if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 03659 break3660 endif 3661 3662 dclick ore3663 getlabel backpack xxx3664 wait 6503665 if insysmsg "you smelt"3666 overhead "* backpack ore smelted *" 883667 elseif insysmsg "You do not see any nearby forges"3668 overhead "* forge too far away *" 443669 endif 3670 endwhile3671 3672 if find myPack ground -1 -1 23673 getlabel myPack packLabel3674 3675 if "[0/2000" in packLabel3676 #pack is empty3677 else 3678 dclick myPack3679 wait 6503680 3681 while find forgy ground -1 -1 3 and findtype "iron ore" myPack as ore3682 if enemyFound = 03683 if insysmsg! "Now tracking" or insysmsg! "Distance to"3684 @setvar! enemyFound 13685 endif3686 endif3687 3688 if autoRecall = 1 and enemyFound = 1 or cooldown 'Danger' > 03689 interrupt3690 break3691 endif3692 3693 dclick ore3694 getlabel backpack xxx3695 wait 6503696 if insysmsg "you smelt"3697 overhead "* pack ore smelted *" 883698 getlabel myPack packLabel3699 overhead "{{packLabel}}" 113700 sysmsg "{{packLabel}}" 113701 elseif insysmsg "you do not see" 3702 overhead "* pack too far smelt *" 44 myPack3703 endif 3704 endwhile3705 3706 endif3707 endif3708 3709 elseif findtype "forge" ground -1 -1 4 as forgy3710 overhead " * FORGE HERE *" 88 forgy 3711 elseif findtype "forge" ground -1 -1 6 as forgy3712 overhead " * FORGE HERE *" 88 forgy 3713 elseif findtype "forge" ground -1 -1 8 as forgy3714 overhead " * FORGE HERE *" 88 forgy 3715 elseif findtype "forge" ground -1 -1 10 as forgy3716 overhead " * FORGE HERE *" 88 forgy 3717 elseif findtype "forge" ground -1 -1 12 as forgy3718 overhead " * FORGE HERE *" 88 forgy 3719 endif 3720 3721 endif3722 3723 getlabel chest chestLabel3724 if "items" in chestLabel3725 dclick key3726 waitfortarget maxwaittimeinms3727 target chest3728 wait maxwaittimeinms3729 overhead "[chest locked]" 553730 endif3731 3732 endif3733 3734 if useDetectHidden = 1 and timer detectTimer > detectTimerCD3735 if insysmsg "where"3736 endif3737 3738 skill 'detectinghidden'3739 waitfortarget maxwaittimeinms 3740 target 'self'3741 3742 if insysmsg "where"3743 overhead "* detecting hidden *"3744 endif3745 3746 settimer detectTimer 03747 endif3748 3749 #sysmsg "Loop cycle elapsed : {{cycleTimer}}" 3750endwhile