Skip to content
Outlands Hub

Razor script

Boat Bot v4.1a

by Brozan (Syal) · 1981 lines
Download

Part of the attack routine is to call a Razor Dress routine named "bow". Create it if you want it. Will not break script if it does not exist

CombatSailing
Boat Bot v41a.razor
1# This is an automated backup - check out https://outlands.uorazorscripts.com/script/1028582d-fe44-4f78-89e0-669ff9ad3de5 for latest2# Automation by Jaseowns3## Script: Boat Bot v4.1a4## Created by: Brozan (Syal)#45235#############################################6 7#Part of the attack routine is to call a Razor Dress routine named "bow".  Create it if you want it.  Will not break script if it does not exist8 9#Target Lock:10#0=default behavior (Let the script try to be intelligent)11#1=Area discord -- kill one thing at a time (Good for things that do not want to spread damage.  12#2=Single target discord -- switch target after every round of skill usages (SPECIAL NOTE: Bosses will switch target type to this on purpose so you kill NPC spawns with bot and target disco boss)13@setvar targetLockType 2 14 15#Summon Type Selector.  Having Necromancy skill will still summon necro version.  We will always use Summon Creature as 5th slot.  Still requires 80 SS or Necro to trigger16#MAKE SURE you only select two here.  Selecting more will break stuff.  17#Valid Values are 0, 1, or 2 and it will summon that many of that type: Example setting fireElem to 2 will summon 2 fire elems.  Setting earthEleme to 1 and waterElem to 1 will summon 1 earth elemental and 1 waterElem18@setvar fireElem 219@setvar earthElem 020@setvar airElem 021@setvar waterElem 022@setvar daemonSum 023 24#Repair Priority Queue.  Set these as 1/2/3.  If you fail to put one for each of these it will break shit.  Just leave it alone if you do not care25@setvar repairHullOrder 326@setvar repairGunsOrder 127@setvar repairSailsOrder 228 29#Dynamic Boss Repair - Switches to hull priority on bosses.  Set to 1 to turn on.  Have to restart script to reset after bosses30@setvar dynamicBossRepair 131 32#Set this to 1 if you do not  want to select your own tillerman (useful for recall or if you switch boats a lot.  Causes issues sometimes if it finds a friends dynamically)33@setvar dynamicTiller 034 35#Set this to 1 if you want to throw self overboard if a ship repair kit is on the deck36@setvar triggerOverboard 037 38#Set this to 1 to attempt to keep the bot from repairing within the combat repair window (only repairs 60-120s after boarding an NPC ship)39@setvar repairLockdown 040 41#Set this to 1 to slow down repairs by 30s on bosses so you aren't always repairing42@setvar slowRepairsBosses 143 44#Set this to 1 if you want to keep up buffs for Reactive Armour and Magic Reflect45@setvar buffRA 046@setvar buffMR 0 47 48#Set this to 1 to cast Mass Curse on first new enemy  49@setvar massCurseToggle 150 51#Set this to 1 if you want to simulate always being boarded on NPC ship for testing reasons52@setvar alwaysBoarded 053 54#Set this to 0 if you want to keep my super awesome say commands (1 mutes the bot except important stuff like food or fighting party)55@setvar sayLess 056 57#Set this to 1 if you want to be a super fucking awesome pirate58@setvar sayMore 059 60#Set this to 1 if you want bot to defuse close by bombs and reembark61@setvar defuseBombs 162 63#Set this to 1 to have bot reload right after embarking64@setvar reloadCannons 065 66#Set this to 1 if you want to upgrade greater poison casts67@setvar upgradePoison 168 69#Set this if you want to have bot recall on dock.  Must have a book in pack named Home and first rune be the house to recall to if not magery.  If magery make home the default rune70#IF YOU TURN THIS ON YOU MUST GO TO THE SECTION NAMED "WALK THIS WAY" AND SET UP DIRECTIONS INTO YOUR HOUSE FROM RECALL LOCATION71@setvar goHomeBotYouAreDrunk 172 73#Set this to 1 if you want the bot to try to loot holds using RESTOCK-2 restock agent.  Update the ship hue list below if you are using this. 74@setvar stealTheBooty 175 76#push your ship hues to this list for dynamic looting77createlist shipHues78clearlist shipHues79pushlist shipHues 293380 81 82##################################################################################83##################################################################################84##################################################################################85##############                                                 ###################86##############              No setup below here                ###################87##############                                                 ###################88##################################################################################89##################################################################################90##################################################################################91 92clearsysmsg 93clearignore94 95if 'sayMore' = 196    say "YO HO MATEY AWAY!" 3397    wait 50098endif99 100#Timers.  We used to do these on an if exists basis, but it fubard too much stuff if you leave client open forever101createtimer 'petAttack' 102settimer 'petAttack' 0103createtimer 'discoTimer'104settimer 'discoTimer' 5000105createtimer 'repairBoat'106settimer 'repairBoat' 8000107createtimer "shroomy"108settimer "shroomy" 61000109createtimer 'buffDisco'110settimer 'buffDisco' 300000111createtimer 'buffProvo'112settimer 'buffProvo' 300000113createtimer 'buffPeace'114settimer 'buffPeace' 300000115createtimer 'buffBeg'116settimer 'buffBeg' 300000 117createtimer 'bardLock'118settimer 'bardLock' 0119createtimer "aid time"120settimer "aid time" 8000121createtimer 'RepairHull'122settimer 'RepairHull' 0123createtimer 'buffTaste'124settimer 'buffTaste' 15000125createtimer 'newTargetCheck'126settimer 'newTargetCheck' 15000127createtimer 'spiritSpeakCheck'128settimer 'spiritSpeakCheck' 15000129createtimer 'foodCheck'130settimer 'foodCheck' 120000131createtimer 'crookCheck'132settimer 'crookCheck' 120000133createtimer 'crewHealing'134settimer 'crewHealing' 120000135createtimer 'onBoard'136settimer 'onBoard' 120000137createtimer 'painSpkeTimer'138settimer 'painSpkeTimer' 120000139createtimer 'poisonStrikeTimer'140settimer 'poisonStrikeTimer' 120000141createtimer 'vampTimer'142settimer 'vampTimer' 120000143createtimer 'dressTimer'144settimer 'dressTimer' 120000145createtimer 'provkeBossTimer' 146settimer 'provkeBossTimer' 1500000147createtimer 'goHomeBotYouAreDrunkTimer'148settimer 'goHomeBotYouAreDrunkTimer' 100000149createtimer 'scriptRunning'150settimer 'scriptRunning' 100000151createtimer 'singSeaShanties'152settimer 'singSeaShanties' 70000153createtimer 'sanityEmbarkCheck'154settimer 'sanityEmbarkCheck' 0155createtimer "walkingTooMuch" 156settimer "walkingTooMuch" 0157 158#Clear lastt t arget from last run - this can cause a weird bug159unsetvar 'lastserial' 160 161#Create list of instrument types and dclick if found162removelist 'instrumentTypes'163createlist 'instrumentTypes'164pushlist 'instrumentTypes' 10245165pushlist 'instrumentTypes' 3762166pushlist 'instrumentTypes' 3740167pushlist 'instrumentTypes' 3742168pushlist 'instrumentTypes' 3763169 170#Create list of reagents171createlist regTypes172clearlist regTypes173@pushlist 'regTypes' 3963174@pushlist 'regTypes' 3962175@pushlist 'regTypes' 3973176@pushlist 'regTypes' 3972177@pushlist 'regTypes' 3980178@pushlist 'regTypes' 3981179@pushlist 'regTypes' 3976180@pushlist 'regTypes' 3974181 182#create list of food types since tray does not work any more183createlist foodTypes 184clearlist foodTypes185@pushlist 'foodTypes' 28879186@pushlist 'foodTypes' 28888187@pushlist 'foodTypes' 28885188@pushlist 'foodTypes' 29774189@pushlist 'foodTypes' 28883190@pushlist 'foodTypes' 28880191@pushlist 'foodTypes' 29773192@pushlist 'foodTypes' 28881193 194#create list of tillermen195createlist tillerMenList196clearlist tillerMenList197@pushlist 'tillerMenList' 15952198@pushlist 'tillerMenList' 15955199@pushlist 'tillerMenList' 15950200@pushlist 'tillerMenList' 15947201 202unsetvar 'tillerDude'203if dynamicTiller = 0204    overhead "Target Tillerman"205    @setvar tillerDude 206else207    #try to find tillerman    208	foreach tillerMenVar in tillerMenList209		if findtype tillerMenVar ground as found210			overhead "Tillerman Set"211			setvar 'tillerDude' 'found'212			dclick 'tillerDude'213			wait 500214		endif215	endfor216endif217 218#Hold IDs219createlist holdIDs220clearlist holdIDs221pushlist holdIDs 16019222pushlist holdIDs 16046223pushlist holdIDs 15973224pushlist holdIDs 16057225 226 227#NPC Ship Hues228createlist NPCshipHues229clearlist NPCshipHues230#druid231pushlist NPCshipHues 2845232#Vile233pushlist NPCshipHues 2841234#Ossurary 235pushlist NPCshipHues 2840236#pirate237pushlist NPCshipHues 2269238#merchant239pushlist NPCshipHues 2766240#ghost241pushlist NPCshipHues 2955242#orc reaver243pushlist NPCshipHues 2141244#raider245pushlist NPCshipHues 2927246#tradesman247pushlist NPCshipHues 2347248#Lizardman249pushlist NPCshipHues 2363250#explorer251pushlist NPCshipHues 2845252#fisherman253pushlist NPCshipHues 2076254#daemon255pushlist NPCshipHues 2740256#submerged257pushlist NPCshipHues 2826258 259#Set up walking list for dymanic loot260createlist walking261clearlist walking262 263#list for dump stuff264createlist lootTypes265clearlist lootTypes266@pushlist 'lootTypes' 'muffins'267@pushlist 'lootTypes' 'gold coin'268@pushlist 'lootTypes' 'cooked fish'269@pushlist 'lootTypes' 'Crab SOUTH'270@pushlist 'lootTypes' 'Lobster SOUTH'271@pushlist 'lootTypes' 'raw fish steak%s%'272@pushlist 'lootTypes' 'Blood Moss'273@pushlist 'lootTypes' 'Black Pearl%s%'274@pushlist 'lootTypes' 'Ginseng'275@pushlist 'lootTypes' 'Garlic'276@pushlist 'lootTypes' 'Sulfurous Ash'277@pushlist 'lootTypes' "Spider's Silk" 278@pushlist 'lootTypes' 'Nightshade'279@pushlist 'lootTypes' 'Mandrake Root%s%' //MR280@pushlist 'lootTypes' 'cut%s% of raw ribs'281@pushlist 'lootTypes' 'cut up leather'282@pushlist 'lootTypes' 'clean bandage%s%'283@pushlist 'lootTypes' 'arrow'284@pushlist 'lootTypes' 'crossbow bolt'285# ' for formatting reasons286 287createlist ItemTypes288clearlist ItemTypes289//martial manual290@pushlist 'ItemTypes' 22187291//Shields292@pushlist 'ItemTypes' 0x1b72 //BronzeShields293@pushlist 'ItemTypes' 0x1b73 //Buckler294@pushlist 'ItemTypes' 0x1b7b //MetalShield295@pushlist 'ItemTypes' 0x1b74 //MetalKiteShield296@pushlist 'ItemTypes' 0x1b79 //TearKiteShield297@pushlist 'ItemTypes' 0x1b7a //WoodenShield298@pushlist 'ItemTypes' 0x1b76 //HeaterShield299@pushlist 'ItemTypes' 0x1b77 //HeaterShield300//Platemail301@pushlist 'ItemTypes' 0x1408 //CloseHelmet302@pushlist 'ItemTypes' 0x1410 //PlatemailArms303@pushlist 'ItemTypes' 0x1417 //PlatemailArms304@pushlist 'ItemTypes' 0x1411 //PlatemailLegs305@pushlist 'ItemTypes' 0x1412 //PlateHelm306@pushlist 'ItemTypes' 0x1413 //PlateGorget307@pushlist 'ItemTypes' 0x1418 //PlatemailGloves308@pushlist 'ItemTypes' 0x1415 //PlateChest309@pushlist 'ItemTypes' 0x140a //Helmet310@pushlist 'ItemTypes' 0x140c //Bascinet311@pushlist 'ItemTypes' 0x140e //NorseHelm312//Chainmail313@pushlist 'ItemTypes' 0x13bb //ChainmailCoif314@pushlist 'ItemTypes' 0x13c3 //ChainmailLeggins315@pushlist 'ItemTypes' 0x13c4 //ChainmailChest316@pushlist 'ItemTypes' 0x13c0 //ChainmailHelm317//Ringmail318@pushlist 'ItemTypes' 0x13ef //RingmailArms319@pushlist 'ItemTypes' 0x13f2 //RingmailGloves320@pushlist 'ItemTypes' 0x13ed //RingmailChest321@pushlist 'ItemTypes' 0x13f1 //RingmailLeggins322@pushlist 'ItemTypes' 0x140b //RingmailHelm323//Studded324@pushlist 'ItemTypes' 0x1dba //Studdedcap325@pushlist 'ItemTypes' 0x13e1 //StuddedLeggings326@pushlist 'ItemTypes' 0x13db //StuddedTunic327@pushlist 'ItemTypes' 0x13d5 //StuddedGloves328@pushlist 'ItemTypes' 0x13d6 //StuddedGorget329@pushlist 'ItemTypes' 0x13dc //StuddedSleeves330//Leather331@pushlist 'ItemTypes' 0x13ce //LeatherGloves332@pushlist 'ItemTypes' 0x13cd //LeatherSleeves333@pushlist 'ItemTypes' 0x13d3 //LeatherChest334@pushlist 'ItemTypes' 0x13cb //LeatherPants335@pushlist 'ItemTypes' 0x13c7 //LeatherGorget336@pushlist 'ItemTypes' 0x1db9 //LeatherCap337@pushlist 'ItemTypes' 0x13c5 //LeatherArms338//FemaleArmor339@pushlist 'ItemTypes' 0x1c04 //FemalePlate340@pushlist 'ItemTypes' 0x1c09 //FemalePlateSkirt341@pushlist 'ItemTypes' 0x1c0c //FemaleStuddedBustier342@pushlist 'ItemTypes' 0x1c02 //FemaleStuddedArmor343@pushlist 'ItemTypes' 0x1c09 //FemaleRingmailSkirt344@pushlist 'ItemTypes' 0x1c00 //FemaleLeatherShorts345@pushlist 'ItemTypes' 0x1c09 //FemaleLeatherSkirt346@pushlist 'ItemTypes' 0x1c06 //FemaleLeatherArmor347@pushlist 'ItemTypes' 0x1c0b //FemaleLeatherBustier348@pushlist 'ItemTypes' 0x1c09 //FemaleBoneSkirt349//Fencing350@pushlist 'ItemTypes' 0xf62  //Spear351@pushlist 'ItemTypes' 0x1403 //ShortSpear352@pushlist 'ItemTypes' 0xe87  //Pitchfork353@pushlist 'ItemTypes' 0x1405 //Warfork354@pushlist 'ItemTypes' 0x1401 //Kryss355@pushlist 'ItemTypes' 0xf52  //Dagger356//Macing357@pushlist 'ItemTypes' 0x13b0 //Waraxe358@pushlist 'ItemTypes' 0xdf0  //BlackStaff359@pushlist 'ItemTypes' 0x1439 //WarHammer360@pushlist 'ItemTypes' 0x1407 //WarMace361@pushlist 'ItemTypes' 0xe89  //QuarterStaff362@pushlist 'ItemTypes' 0x143d //HammerPick363@pushlist 'ItemTypes' 0x13b4 //Club364@pushlist 'ItemTypes' 0xe81  //ShepherdsCrook365@pushlist 'ItemTypes' 0x13f8 //GnarledStaff366@pushlist 'ItemTypes' 0xf5c  //Mace367@pushlist 'ItemTypes' 0x143b //Maul368//Swords369@pushlist 'ItemTypes' 0x13b9 //VikingSword370@pushlist 'ItemTypes' 0xf61  //Longsword371@pushlist 'ItemTypes' 0x1441 //Cutlass372@pushlist 'ItemTypes' 0x13b6 //Scimitar373@pushlist 'ItemTypes' 0xec4  //SkinningKnife374@pushlist 'ItemTypes' 0x13f6 //ButcherKnife375@pushlist 'ItemTypes' 0xf5e  //Broadsword376@pushlist 'ItemTypes' 0x13ff //Katana377@pushlist 'ItemTypes' 0xec3  //Cleaver378//Axes379@pushlist 'ItemTypes' 0xf43 //Hatchet380@pushlist 'ItemTypes' 0xf45 //ExecutionersAxe381@pushlist 'ItemTypes' 0xf4d //Bardiche382@pushlist 'ItemTypes' 0xf4b  //DoubleAxe383@pushlist 'ItemTypes' 0x143e //Halberd384@pushlist 'ItemTypes' 0x13fb //LargeBattleAxe385@pushlist 'ItemTypes' 0x1443 //TwoHandedAxe386@pushlist 'ItemTypes' 0xf47  //BattleAxe387@pushlist 'ItemTypes' 0xf49  //Axe388//Bows389@pushlist 'ItemTypes' 0x13fd //HeavyXbow390@pushlist 'ItemTypes' 0xf50  //Xbow391@pushlist 'ItemTypes' 0x13b2 //bow392//Instruments393@pushlist 'ItemTypes' 0xeb2 //Harp394@pushlist 'ItemTypes' 0xe9c //Drums395@pushlist 'ItemTypes' 0xeb3 //Lute396@pushlist 'ItemTypes' 0xe9e //Tambourine397@pushlist 'ItemTypes' 0x2805 //BambooFlute398//Other Helmets399@pushlist 'ItemTypes' 0x140f //NorseHelm400//BoneArmor401@pushlist 'ItemTypes' 0x1451 //BoneHelm402@pushlist 'ItemTypes' 0x1457 //BoneLegs403@pushlist 'ItemTypes' 0x1453 //BoneArms404@pushlist 'ItemTypes' 0x1455 //BoneGloves405//SlayerWands406@pushlist 'ItemTypes' 0xdf2 //SlayerWands407@pushlist 'ItemTypes' 0xdf3 //SlayerWands408@pushlist 'ItemTypes' 0xdf4 //SlayerWands409@pushlist 'ItemTypes' 0xdf5 //SlayerWands410//OtherSTuff, that wasnt in list...411@pushlist 'ItemTypes' 0xdf5 //SlayerWands412@pushlist 'ItemTypes' 0xefa //SpellBook413@pushlist 'ItemTypes' 0x141a //platemailleggings414@pushlist 'ItemTypes' 0x1b7a //woodenshield415@pushlist 'ItemTypes' 0x13e2 //studdedchets416@pushlist 'ItemTypes' 0x1b79 //woodenkiteshield417@pushlist 'ItemTypes' 0x26bd //harpoon418@pushlist 'ItemTypes' 0x1c05 //Femaleplatechest419@pushlist 'ItemTypes' 0x1c0d //studdedbrasier420@pushlist 'ItemTypes' 0x1c01 //leathershorts421@pushlist 'ItemTypes' 0x1b75 //metalkiteshield422@pushlist 'ItemTypes' 0x1c07 //Femaleleather423@pushlist 'ItemTypes' 0x1416 //platemailchest424@pushlist 'ItemTypes' 0x13dd //studdedgloves425@pushlist 'ItemTypes' 0x1454 //Bonechest426@pushlist 'ItemTypes' 0x13d2 //leatherleggings427@pushlist 'ItemTypes' 0x1409 //closehelm428@pushlist 'ItemTypes' 0x13d4 //studdedarms429 430 431#Loop through instruments and dclick one432if skill "Musicianship" > 50433    foreach instrumentType in 'instrumentTypes'434        dclicktype instrumentType435    endfor436endif437 438#open necro book439if skill "Necromancy" > 50440    dclicktype "8787"441    waitforgump 3897999232442    gumpresponse 2 3897999232443    wait 250444    gumpclose 3897999232445endif   446 447#Set boarded state - 1=boarded NPC 0=on our ship448@setvar 'boardState' 0449#Set up tracking sate 1=tracking 0=not450@setvar 'trackState' 0451#set up var to check if we have enemies in range452@setvar 'closeEnemy' 0453#set up blue tracking option454@setvar 'blueSighted' 0455#Boss Tracker456@setvar 'bossFight' 0457#Target Lock458@setvar targetLock targetLockType459#discoLock460@setvar discoLock targetLockType461#provoke boss462@setvar 'provokeBoss' 0463#set bot at home flag464@setvar 'botAtHome' 0465#set where we are on wellerman466@setvar wellerManProgress 0467#Var to track if we found hold468@setvar stopWalking 0469#Set up hold tracker470@setvar holdToLoot 0471#Set up hold tracker for own boat472@setvar myShipHold 0473#Variable to track NPC Hold474@setvar npcHold 0475 476 477#set pets if they exist478if skill "Veterinary" > 50 and followers >= 1479    overhead "Target pet 1" 480    setvar! pet1481    overhead "Target pet 2"482    setvar! pet2483    overhead "Target pet 3"484    setvar! pet3 485endif   486 487if skill "Healing" > 50488    say '[ShipHotbars'489    wait 500490endif   491 492#do camping buff at least once regardless of buff status493#camping buff494if skill "Camping" > 50 495    #cut some kindling off our boat...seriously496    if not findtype 3553 backpack497        dclicktype 3922498        waitfortarget 4500499        target 'self'500        wait 600501    endif502    if not findtype 3555 true503        dclicktype 3553 backpack504        wait 350505        while insysmsg "You fail to ignite"506            wait 3000    507            dclicktype "kindling" backpack508            wait 350509        endwhile510    endif511    wait 600512endif513 514     515if followers > 1516    say "All guard me"517endif   518 519 520while not dead521    #Announce we are running522    if timer "scriptRunning" > 15000523        overhead "Bot is running"524        settimer "scriptRunning" 0525    endif526    527    #Dynamic Tillerman Check528    if dynamicTiller = 1529        if not varexist 'tillerDude'530			foreach tillerMenVar in tillerMenList531				if findtype tillerMenVar ground as found532					overhead "Tillerman Set"533					setvar 'tillerDude' 'found'534					dclick 'tillerDude'535					wait 500536				endif537			endfor538        endif539    endif540    #put in a pause so we dont spam 541    wait 100    542    543    if alwaysBoarded = 1544        @setvar boardState 1545    endif546    547    #Be a real pirate548    if wellerManProgress = 0 and sayMore = 1 and timer "singSeaShanties" > 20000 and boardState = 0549        wait 500550        say "There once was a ship that put to sea / The name of the ship was the Billy of Tea " 45551        wait 500552        say "/ The winds blew up, her bow dipped down / Oh blow, my bully boys, blow" 45553        settimer 'singSeaShanties' 0554        @setvar wellerManProgress 1555    elseif wellerManProgress = 1 and sayMore = 1 and timer "singSeaShanties" > 20000 and boardState = 0556        wait 500557        say "Soon may the Wellerman come / To bring us sugar and tea and rum " 45558        wait 500559        say "/ One day, when the tonguing is done / Well take our leave and go"  45560        settimer 'singSeaShanties' 0561        @setvar wellerManProgress 2562    elseif wellerManProgress = 2 and sayMore = 1 and timer "singSeaShanties" > 20000 and boardState = 0563        wait 500564        say "Shed not been two weeks from shore / When down on her a right whale bore " 45565        wait 500566        say "/ The captain called all hands and swore / Hed take that whale in tow" 45567        settimer 'singSeaShanties' 0568        @setvar wellerManProgress 3569    elseif wellerManProgress = 3 and sayMore = 1 and timer "singSeaShanties" > 20000 and boardState = 0570        wait 500571        say "Soon may the Wellerman come / To bring us sugar and tea and rum / One day, when the tonguing is done / Well take our leave and go" 45572        settimer 'singSeaShanties' 0573        @setvar wellerManProgress 4574    elseif wellerManProgress = 4 and sayMore = 1 and timer "singSeaShanties" > 20000 and boardState = 0575        wait 500576        say "Da-da-da-da-da / Da-da-da-da-da-da-da / Da-da-da-da-da-da-da-da-da-da-da" 45 577        settimer 'singSeaShanties' 0578        @setvar wellerManProgress 0579    endif580    581    ###############                                             ###############582    ###############Start routines that keep us alive or set vars###############583    ###############                                             ###############   584    585    #make sure a cursor does not exist from before586    if targetexists587        hotkey "Cancel Current Target"588        wait 350589    endif   590    591    #Check if we are on NPC ship592    if insysmsg "You board the ship"593        @setvar 'boardState' 1 594        settimer "onBoard" 0595        @setvar stopWalking 0596        if sayLess = 0 597            wait 500598            say "***Lets Gooooo! (Lets Gooooo!) / If you want it you can get it let me know (let me know)**" 44599        endif600    endif601    602    #disco routine if target lock is 1 or we are on a humanoid boat603    if discoLock = 1 or targetLockType = 1604        if  skill "Discordance" > 50 and timer "bardLock" > 10000 and timer "discoTimer" > 5150 and closeEnemy = 1 605            overhead "Disco Target!" 33606            skill "Discordance" 607            wft 500608            target self609            settimer "discoTimer" 0610            settimer "bardLock" 4750611        endif612    endif613    614    #hidden check615    if hidden and boardState = 0616        continue617    endif618    619    #dont let this guy die routine620    if hp < 55 621        overhead 'Drinking heal!'622        potion "heal"623        wait 200624    endif625    #Chiv Poisoned626    if skill "Chivalry" > 50 and poisoned 627        say "[cleansebyfire"628    endif629    #Magery Survival630    if skill "Magery" > 50631        #we cast arch here bc it probably hit whole crew632        if poisoned 'self'633            cast 'Arch Cure'634            waitfortarget 1755635            target 'self'636            wait 666637        endif638        if diffhits > 18639            cast "greater heal"640            wft 3500641            target self642            wait 650 643        endif   644        #Eat a magic mushroom if we have 645        #25  less mana than full646        if mana < 70 and timer "shroomy" >= 65000647            dclicktype '29012'648            overhead 'Mushroom Power!'649            settimer "shroomy" 0650        endif651    endif652    # Bandage Survival653    if skill 'Healing' > 50654        if insysmsg 'You begin applying the bandages'655            settimer 'aid time' 0656        endif657        if diffhits > 10 and timer 'aid time' > 10250 658            hotkey 'bandage self'659            settimer 'aid time' 0660        endif661        if insysmsg 'You begin applying the bandages'662            settimer 'aid time' 0663        endif664    endif665    666    #Goes through blue gates667    if findtype 3948 'ground' 0 1 2 as 'bluegate'668        dclick 'bluegate'669        waitforgump 3899019871670        gumpresponse 2671        wait 500672        say "[embark"673        wait 500674        say "[embarkfollowers"675        wait 500676        @setvar botAtHome 0677    endif678    679    #Pet Healing    680    if skill "Veterinary" > 50 and followers >= 1 and diffhits <= 10681         if timer 'aid time' > 10250 and timer 'crewHealing' > 5050682            dclicktype 3617683            wft 2500684            target pet1         685            wait 500686            if insysmsg 'You begin applying the bandages'687                settimer 'aid time' 4500688                settimer 'crewHealing' 0689            endif690         endif691         if timer 'aid time' > 10250 and timer 'crewHealing' > 5050692            dclicktype 3617693            wft 2500694            target pet2       695            wait 500 696            if insysmsg 'You begin applying the bandages'697                settimer 'aid time' 4500698                settimer 'crewHealing' 0699            endif700         endif701         if timer 'aid time' > 10250 and timer 'crewHealing' > 5050702            dclicktype 3617703            wft 2500704            target pet3      705            wait 250  706            if insysmsg 'You begin applying the bandages'707                settimer 'aid time' 4500708                settimer 'crewHealing' 0709            endif710         endif       711        #We checked all - pause for spam712        if timer 'crewHealing' > 5050 and skill 'Healing' <= 50713            settimer 'crewHealing' 1000714        endif715    endif716    #Crew Healing717    if skill 'Healing' > 50 and diffhits <= 10718        if timer 'aid time' > 10250 and timer 'crewHealing' > 5050719            gumpresponse 20 1722920179720            wait 250 721            if insysmsg 'You begin applying the bandages'722                settimer 'aid time' 4500723                settimer 'crewHealing' 0724            endif725        endif726        if timer 'aid time' > 10250 and timer 'crewHealing' > 5050727            gumpresponse 21 1722920179728            wait 250 729            if insysmsg 'You begin applying the bandages'   730                settimer 'aid time' 4500731                settimer 'crewHealing' 0732            endif733        endif734        if timer 'aid time' > 10250 and timer 'crewHealing' > 5050735            gumpresponse 22 1722920179736            wait 250 737            if insysmsg 'You begin applying the bandages'738                settimer 'aid time' 4500739                settimer 'crewHealing' 0740            endif741        endif742        if timer 'aid time' > 10250 and timer 'crewHealing' > 5050743            gumpresponse 23 1722920179744            wait 250 745            if insysmsg 'You begin applying the bandages'746                settimer 'aid time' 4500747                settimer 'crewHealing' 0748            endif749        endif750        if timer 'aid time' > 10250 and timer 'crewHealing' > 5050751            gumpresponse 24 1722920179752            wait 250 753            if insysmsg 'You begin applying the bandages'754                settimer 'aid time' 4500755                settimer 'crewHealing' 0756            endif757        endif758        if timer 'aid time' > 10250 and timer 'crewHealing' > 5050759            gumpresponse 25 1722920179760            wait 250 761            if insysmsg 'You begin applying the bandages'762                settimer 'aid time' 4500763                settimer 'crewHealing' 0764            endif765        endif  766        #We checked all - pause for spam767        if timer 'crewHealing' > 5050768            settimer 'crewHealing' 1000769        endif770    endif771    772    ###############                                           ###############773    ###############   Start buff routines                     ###############774    ###############                                           ###############775    #Throw self overboard if a ship repair kit is on the deck776    if 'triggerOverboard' = 1777        if findtype 25758 ground any any 8778            say "So long fair world"779            wait 500780            say "[throwselfoverboard"781            stop782        endif783    endif784    785    786    #Tracking Routine - Turn it on if we have not yet787    if skill 'Tracking' >= 20 and 'trackState' = 0788        while not insysmsg "You will receive"789            hotkey 'Tracking'790            gumpresponse 6 4267467659791            wait 500792        endwhile    793        gumpclose 4267467659794        @setvar 'trackState' 1795    endif796    797    #food buff routine798    if timer 'foodCheck' > 60000 and not findbuff 'food satisfaction'799		@setvar foundFood 0800		foreach foodStuff in foodTypes801			if findtype foodStuff as found802				wait 600803				dclick found804				@setvar foundFood 1805			endif806		endfor807		if foundFood = 0808			wait 600809			say "I appear to be out of food!"810			wait 600811			say "I appear to be out of food!"812			wait 600813			say "I appear to be out of food!"814		endif815        settimer 'foodCheck' 0816    endif817    818    #Follower Routine819    if skill "Necromancy" > 80 or skill "Spirit Speak" > 80820        if followers < 4 and mana > 50821            #Lost a big pet, resummon822            settimer "bardLock" 0823            if skill "Necromancy" > 80824                say "[VengefulSpirit"825                wait 1000826            endif827            #check for pure summons they do not require as much logic828            if 'fireElem' = 2829                cast 'Fire Elemental'830            elseif 'airElem' = 2831                cast 'Air Elemental'832            elseif 'daemonSum' = 2833                cast 'Summon Daemon'834            elseif 'earthElem' = 2835                cast 'Earth Elemental'836            elseif 'waterElem' = 2837                cast 'Water Elemental'838            endif839            840            #Check for single summons               841            if 'fireElem' = 1 842                if skill "Necromancy" > 80843                    if not findtype 24 ground any any 12 844                        overhead "Casting one lich"845                        say "a fire elemental release"846                        cast 'Fire Elemental'847                    endif848                else849                    if not findtype 15 ground any any 12 850                        overhead "Casting plain fire elem"851                        cast 'Fire Elemental' 852                    endif853                endif854            endif           855            if 'airElem' = 1 856                if skill "Necromancy" > 80857                    if not findtype 306 ground any any 12 858                        say "an air elemental release"859                        cast 'Air Elemental'860                    endif861                else862                    if not findtype 13 ground any any 12 863                        cast 'Air Elemental'864                    endif865                endif866            endif       867            if 'earthElem' = 1 868                if skill "Necromancy" > 80869                    if not findtype 158 ground any any 12 870                        say "an earth elemental release"871                        cast 'Earth Elemental'872                    endif873                else874                    if not findtype 14  ground any any 12 875                        cast 'Earth Elemental'876                    endif877                endif878            endif       879            if 'waterElem' = 1 880                if skill "Necromancy" > 80881                    if not findtype 740 ground any any 12 882                        say "a water elemental release"883                        cast 'Water Elemental'884                    endif885                else886                    if not findtype 16  ground any any 12 887                        cast 'Water Elemental'888                    endif889                endif890            endif           891            if 'waterElem' = 1 892                if skill "Necromancy" > 80893                    if not findtype 722 ground any any 12 894                        say "a daemon release"895                        cast 'Summon Daemon'896                    endif897                else898                    if not findtype 9  ground any any 12 899                        cast 'Summon Daemon'900                    endif901                endif902            endif           903            wait 6000904            say "All Guard Me"905            906            #rebuff to get pet buffed907            if mana > 15 and followers >= 4908                cast 'Bless'909                waitfortarget 2500910                target 'self'911                wait 750912            endif913        endif914    endif915    #Summon Creature Routine916    if skill "Necromancy" > 80 or skill "Spirit Speak" > 80917        if followers = 4 and mana > 30918            settimer "bardLock" 0919            if skill "Necromancy" > 80920                say "[VengefulSpirit"921                wait 1000922            endif923            cast 'Summ. Creature'924            wait 5000925            say "All Guard Me"926        endif   927    endif928    #camping buff929    if skill "Camping" > 50 and not findbuff "Campfire Visit"930        if not findtype 3553 backpack931            say "Need more kindling" 932            wait 355933            say "Need more kindling" 934            wait 355935            say "Need more kindling" 936            wait 355937        endif938    939        if not findtype 3555 true940            dclicktype 3553 backpack941            wait 350942            while insysmsg "You fail to ignite"943                wait 3000    944                dclicktype "kindling" backpack945                wait 350946            endwhile947        endif948        wait 600949    endif   950    #Bot sits and waits on a gate if it has recalled recently951    if botAtHome = 1952        continue953    endif954    #spirit speak only if on own boat and corpses present.  Do not SS if we have necromancy as we have liches and this is wasted time955    if skill "Spirit Speak" > 50 and timer "bardLock" > 10000 and timer "spiritSpeakCheck" > 30000 and 'boardState' = 0 and  skill "Necromancy" < 50956        if findtype 8198 ground any any 12 as found957            overhead "spirit speak"958            hotkey 'Spirit Speak'959            settimer "spiritSpeakCheck" 0960            settimer "bardLock" 8000961        endif962    endif963    if skill "Discordance" > 50 and timer "bardLock" > 10000 and timer "buffDisco" > 300000964        overhead "Disco Buff"965        skill "Discordance" 966        wft 2500967        targettype 3701968        settimer "buffDisco" 0969        settimer "bardLock" 0970    endif971    if skill "Begging" > 50  and timer "bardLock" > 10000 and timer "buffBeg" > 60000972        overhead "Begging Buff"973        skill "Begging" 974        settimer "buffBeg" 0975        settimer "bardLock" 5000976    endif977    if skill "Provocation" > 50 and timer "bardLock" > 11000 and timer "buffProvo" > 300000978        overhead "Provo Buff"979        skill "Provocation" 980        wft 2500981        targettype 3701982        settimer "buffProvo" 0983        settimer "bardLock" 0984    endif985    if skill "Peacemaking" >= 20 and timer "bardLock" > 10000 and timer "buffPeace" > 300000986        overhead "Peace Buff"987        skill "Peacemaking" 988        wft 2500989        targettype 3701990        settimer "buffPeace" 0991        settimer "bardLock" 0992    endif993    #Arch Protection994    if boardState = 0 and mana > 50 and skill "Magery" > 50 and timer "bardLock" > 10000 and not findbuff "Protection"995        cast 'Arch Protection'996        waitfortarget 2500997        target 'self'998    endif999    #Bless1000    if boardState = 0 and mana > 50 and skill "Magery" > 50 and timer "bardLock" > 10000 and not findbuff "Strength" 1001        overhead "Mage Buff"1002        cast 'Bless'1003        waitfortarget 25001004        target 'self'1005        wait 7501006        cast 'Bless'1007        waitfortarget 25001008        target 'self'1009        wait 7501010        cast 'Bless'1011        waitfortarget 25001012        target 'self'1013        wait 7501014    endif1015    #I do not know why you would want to do this1016    if findtype 3976 ground1017        if triggerOverboard != 21018            @setvar defuseBombs 01019            say "[reload"1020            wait 15000          1021        endif1022    endif    1023    if mana > 50 and skill "Magery" > 50 and timer "bardLock" > 10000 and not findbuff "Reactive Armor" and buffRA = 11024        cast 'Reactive Armor'1025        wait 7501026    endif1027    if mana > 50 and skill "Magery" > 50 and timer "bardLock" > 10000 and not findbuff "Magic Reflection" and buffMR = 11028        cast 'Magic Reflection'1029        wait 7501030    endif1031 1032    if skill "Taste Identification" > 50 and timer "bardLock" > 10000 and timer "buffTaste" > 600001033        overhead "tasteidentification Buff"1034        skill "tasteid"1035        wft 25001036        targettype 3701 backpack1037        settimer "buffTaste" 01038        settimer "bardLock" 50001039    endif1040    1041    1042    ###############                                     ###############1043    ###############Start dynamic walking routine on NPC ###############1044    ###############                                     ###############   1045    1046    1047    1048    #Dynamic walk to hold1049    if stealTheBooty = 1 and boardState = 1 and bossFight = 0 and stopWalking = 01050        #we are looting and we are on an NPC and we are not on a boss1051        overhead "Move to hold" 231052        #ignore our own boat1053        clearignore1054        #ignore my own ships hold1055        foreach holdID in holdIDs1056            foreach shipHue in shipHues1057                if findtype holdID ground shipHue as found                  1058                    ignore found1059                endif1060            endfor1061        endfor1062        1063        #Clear walklist1064        clearlist walking        1065        if findtype 16046 ground as foundHold1066            @setvar npcHold foundHold1067            pushlist walking  "Right, running"1068            pushlist walking  "Up, running"1069        elseif findtype 15973 ground as foundHold1070            @setvar npcHold foundHold1071            pushlist walking  "Down, running"1072            pushlist walking  "Right, running"1073        elseif findtype 16057 ground as foundHold1074            #south1075            @setvar npcHold foundHold1076            pushlist walking  "Down, running"1077            pushlist walking  "Left, running"1078        elseif findtype 16019 ground as foundHold1079            @setvar npcHold foundHold1080            pushlist walking  "Up, running"1081            pushlist walking  "Left, running"1082        endif1083		1084 1085		#druid1086		if hue npcHold =  28451087			wait 6001088			say "druid BOAT!"1089		endif1090		#Vile1091		if hue npcHold =  28411092			wait 6001093			say "vile BOAT!"1094		endif1095		#ossuary 1096		if hue npcHold =  28401097			wait 6001098			say "ossuary BOAT!"1099		endif1100		#pirate1101		if hue npcHold =  22691102			wait 6001103			say "pirate BOAT!"1104		endif1105		#merchant1106		if hue npcHold =  27661107			wait 6001108			say "merchant BOAT!"1109		endif1110		#ghost1111		if hue npcHold =  29551112			wait 6001113			say "ghost BOAT!"1114		endif1115		#orc reaver1116		if hue npcHold =  21411117			wait 6001118			say "reaver BOAT!"1119		endif1120		#raider1121		if hue npcHold =  29271122			wait 6001123			say "raider BOAT!"1124		endif1125		#tradesman1126		if hue npcHold =  23471127			wait 6001128			say "tradesman BOAT!"1129		endif1130		#Lizardman1131		if hue npcHold =  23631132			wait 6001133			say "Lizardman BOAT!"1134		endif1135		#explorer1136		if hue npcHold =  28451137			wait 6001138			say "explorer BOAT!"1139		endif1140		#fisherman1141		if hue npcHold =  20761142			wait 6001143			say "fisherman BOAT!"1144		endif1145		#daemon1146		if hue npcHold =  27401147			wait 6001148			say "daemon BOAT!"1149		endif1150		#submerged1151		if hue npcHold =  28261152			wait 6001153			say "submerged BOAT!"1154		endif1155                1156        #start actual walking1157        while stopWalking = 01158            foreach walkDir in walking1159                #reset walk timer1160                settimer "walkingTooMuch" 01161                while timer "walkingTooMuch" < 2500 and stopWalking = 0 1162                    #Roam the boat1163                    walk walkDir1164                    #are we by a hold?1165                    foreach holdID in holdIDs1166                        if findtype holdID ground any any 2 as found1167                            @setvar stopWalking 11168                            @setvar holdToLoot found1169                        endif1170                        if findtype 5188 ground 1171                            dclicktype '5188'  1172                            say "[embark"1173                            wait 6001174                            say "[embarkfollowers"1175                            wait 6001176                            @setvar stopWalking 11177                            @setvar boardState 01178                        endif1179                    endfor1180                endwhile1181                settimer "walkingTooMuch" 01182            endfor1183        endwhile1184        1185        if stopWalking = 1 and sayLess = 01186            wait 5001187            say "Yarr we got the hold.  Lets loot this sucker dry.  Just kill tha crew now!" 331188        endif   1189    #End of dynamic loot routine1190    endif   1191    1192    1193    ###############                                                   ###############1194    ###############    Start routines that do not require target      ###############1195    ###############                                                   ###############   1196 1197 1198    1199    #Check if we are on NPC ship AGAIN1200    if insysmsg "You board the ship"1201        @setvar 'boardState' 1 1202        settimer "onBoard" 01203        @setvar stopWalking 01204        if sayLess = 0 1205            wait 5001206            say "***Lets Gooooo! (Lets Gooooo!) / If you want it you can get it let me know (let me know)**" 441207        endif1208    endif1209 1210    #Sanity Embark Check every 20s1211    if boardState = 0 and closeEnemy = 01212        if timer "sanityEmbarkCheck" > 20000 and varexist 'tillerDude' 1213            hotkey 'Cancel Current Target'1214            dclick tillerDude1215            wait 2001216            if insysmsg "were not found"	                1217				#try to find tillerman    1218				foreach tillerMenVar in tillerMenList1219					if findtype tillerMenVar ground as found1220						overhead "Tillerman Set"1221						setvar 'tillerDude' 'found'1222						dclick 'tillerDude'1223						wait 5001224					endif1225				endfor1226				wait 4001227                say "[embark"                   1228            endif1229            gumpresponse 21 42165932701230            wait 2001231            if insysmsg "do you wish to disembark"1232                #cancel current target, we are on a boat                1233                hotkey 'Cancel Current Target'1234            else 1235                gumpresponse 22 42165932701236                wait 1001237                #we do this to make sure embark worked1238                say "[embark"1239                wait 5001240                say "[embarkfollowers"1241            endif1242            1243            settimer 'sanityEmbarkCheck' 01244        endif1245    endif1246    1247    if timer "sanityEmbarkCheck" > 70000 and not varexist 'tillerDude'1248        wait 5001249        say "Why the hell have we not found a tillerman yet???"1250    endif1251                1252    #Yell if we are not in fighting party1253    if insysmsg "You must be a part of your initial embarking"1254        say "Hey! I am not in the fighting party!!!" 231255        wait 5001256        say "Hey! I am not in the fighting party!!!" 231257        wait 5001258        say "Hey! I am not in the fighting party!!!" 231259        wait 5001260    endif    1261 1262    #check for bombs nearby and defuses them1263    if defuseBombs = 11264        if findtype '5188' ground -1 -1 21265            dclicktype '5188'1266            say "[embark"1267            wait 6001268            say "[embarkfollowers"1269            wait 6001270        endif1271        if findtype '5188' ground 1272            dclicktype '5188'  1273            say "[embark"1274            wait 6001275            say "[embarkfollowers"1276            wait 6001277        endif1278    endif1279    1280    #Check if we broke an instrument1281    if skill "Musicianship" > 501282        if insysmsg "What instrument shall you play"1283            @setvar newInstrument 0 1284            foreach instrumentType in 'instrumentTypes'1285                if findtype instrumentType as foundInstrument1286                    dclick foundInstrument              1287                    @setvar newInstrument 11288                endif1289            endfor1290            if newInstrument = 01291                say "I am out of instruments!!!"1292                wait 5001293                say "I am out of instruments!!!"1294                wait 5001295                say "I am out of instruments!!!"1296                wait 5001297            endif1298        endif1299    endif1300    #meditation routine 1301    if skill "Meditation" > 80 and mana < 30 and timer bardLock >= 100001302        skill 'meditation'1303        settimer "bardLock" 01304    endif1305    1306    #Recall if you are docked1307    if goHomeBotYouAreDrunk = 1 and timer goHomeBotYouAreDrunkTimer > 15000 and botAtHome = 0 and boardState = 0     1308        clearsysmsg1309        #Test boat condition1310        say "[shipmenu"1311        wait 2501312        if insysmsg "You must be closer"1313            #Embark and try again1314            say "[embark"1315            wait 5001316            say "[shipmenu"1317            wait 200            1318            if insysmsg "You must be closer"1319                clearignore 1320                unsetvar 'gfto'1321                while not dead and findtype 8901 'backpack' as 'runeBook'1322                    getlabel 'runeBook' 'runeBookLabel'1323                    if 'Home' in 'runeBookLabel'1324                        setvar 'gtfo' 'runeBook'1325                        overhead 'Set recall to rune book'1326                        break1327                    endif1328                    @ignore 'runeBook'1329                endwhile1330                while not dead and findtype 7956 'backpack' as 'runeBook'1331                    getlabel 'runeBook' 'runeBookLabel'1332                    if 'Home' in 'runeBookLabel'1333                        setvar 'gtfo' 'runeBook'1334                        overhead 'Set recall to rune book'1335                        break1336                    endif1337                    @ignore 'runeBook'1338                endwhile              1339                if not varexist 'gtfo'1340                    say 'You need a book or rune named Home on bot' 331341                    wait 5001342                    say 'You need a book or rune named Home on bot' 331343                    wait 5001344                    say 'You need a book or rune named Home on bot' 331345                    wait 5001346                elseif skill magery > 601347                    overhead 'Spell Cast'1348                    cast 'recall'1349                    wft 50001350                    target 'gtfo'1351                elseif findtype 8012 'backpack' as recallScrolls1352                    if skill magery > 201353                        overhead 'Recall Scroll'1354                        #We have magery but prefer scrolls1355                        dclick 'recallScrolls'1356                        wft 50001357                        target 'gtfo'1358                    else 1359                        overhead 'Book use'1360                        #We have loose recalls but recall with book1361                        dclick 'gtfo'1362                        wait 2501363                        gumpresponse 2    1364                    endif1365                else1366                    #Book use1367                    overhead 'Book use'1368                    dclick 'gtfo'1369                    wait 2501370                    gumpresponse 2        1371                endif1372                1373                #WALK THIS WAY1374                #Change the 3 numbers at the end of this to where you want to stop and ressupply.  Change the walk direction to the direction you need to go1375                while not dead and not position 4006 904 51376                    walk 'North'1377                    wait 1501378                endwhile1379                if findtype 'storage shelf' ground any any 2 as found1380                    menu found 0 1381                    wft 25001382                    target self1383                    menu found 11384                endif1385                #Change the 3 numbers at the end of this to where you want to stop and wait on a gate.  Change the walk direction to the direction you need to go1386                while not dead and not position 4006 909 01387                    walk 'South'1388                    wait 1501389                endwhile1390                @setvar botAtHome 11391            endif   1392        endif1393        @settimer "goHomeBotYouAreDrunkTimer" 0 1394        #Skip rest of this loop1395        continue1396    endif1397    1398    #Necro Abilities1399    if skill "Necromancy" > 80 1400        #painspike1401        if 'boardState' = 1 and timer "painSpkeTimer" > 350001402            if findtype 8198 ground any any 10 as found1403                say '[painspike'1404                wft 5001405                target found1406                wait 3501407                settimer "painSpkeTimer" 01408            endif  1409        #Vamp 1410        elseif 'boardState' = 0  and timer "vampTimer" > 350001411            if findtype 8198 ground any any 10 as found1412                say '[vampiricembrace' 1413                wft 5001414                target found1415                settimer "vampTimer" 01416                wait 3501417            endif    1418        endif1419    endif   1420    1421    #Repair Routine - 1422    if 'closeEnemy' = 0 or bossFight = 11423        if bossFight = 11424            @setvar repairGunsOrder 31425            @setvar repairSailsOrder 21426            @setvar repairHullOrder 11427        endif1428        if timer "RepairHull" > 340001429            @setvar startRepairs 01430            if repairLockdown = 0 or bossFight = 11431                @setvar startRepairs 1          1432            elseif timer "onBoard" > 62000 and timer "onBoard" <= 125000    1433                @setvar startRepairs 11434            endif1435            1436            if startRepairs = 11437                if repairHullOrder = 1                  1438                    say '[RepairHull'1439                elseif repairGunsOrder = 1                  1440                    say '[RepairGuns'1441                else 1442                    say '[RepairSails'  1443                endif1444                wait 200                1445                if insysmsg "guns do not need" or insysmsg 'hull does not need' or insysmsg 'sails do not need'1446                    if repairHullOrder = 21447                        say '[RepairHull'1448                    elseif repairSailsOrder = 21449                        say '[RepairSails'  1450                    else 1451                        say '[RepairGuns'1452                    endif1453                endif1454                wait 2001455                if insysmsg "guns do not need" or insysmsg 'hull does not need' or insysmsg 'sails do not need'1456                    if repairGunsOrder = 31457                        say '[RepairGuns'1458                    elseif repairSailsOrder = 31459                        say '[RepairSails'  1460                    else 1461                        say '[RepairHull'1462                    endif1463                endif1464                if bossFight = 1 and slowRepairsBosses = 1 1465                    settimer "RepairHull" 01466                else 1467                    settimer "RepairHull" 300001468                endif1469            endif1470        endif1471    endif    1472    1473    #Check if we started ar epair and sit around.  Also if it's PvP related pouch   1474    if insysmsg 'you cannot move!'1475        overhead 'Paralyzed!' 341476        say [pouch1477    endif1478    1479    while findbuff 'Paralyze'       1480        if insysmsg 'you cannot move!'1481            overhead 'Paralyzed!' 341482            say [pouch1483        endif1484        wait 1001485    endwhile1486    1487    #Put on your clothes1488    if timer "dressTimer" > 100001489        #Try to dress 1490        dress "bow"   1491        settimer "dressTimer" 01492        1493        if followers > 11494            say "All guard me"1495        endif   1496        1497        if skill "Magery" > 501498            foreach reg in 'regTypes'1499                if counttype reg < 31500                    wait 5001501                    say "Hey! I am Low on regs!" 231502                    wait 5001503                    say "Hey! I am Low on regs!" 231504                    wait 5001505                    say "Hey! I am Low on regs!" 231506                endif1507            endfor1508        endif1509    endif1510    endif1511    1512    1513    1514    #Check if we are on NPC ship A THIRD TIME1515    if insysmsg "You board the ship"1516        @setvar 'boardState' 1 1517        settimer "onBoard" 01518        @setvar stopWalking 01519        if sayLess = 0 1520            wait 5001521            say "***Lets Gooooo! (Lets Gooooo!) / If you want it you can get it let me know (let me know)**" 441522        endif1523    endif1524    ###############                                         ###############1525    ###############    Start target search / embark routine ###############1526    ###############                                         ###############   1527    if timer "newTargetCheck" > 25001528        #reset timer1529        settimer "newTargetCheck" 01530        @setvar searchNew 11531        if varexist 'lastserial'1532            if targetLock = 1 1533                if noto 'lastserial' = invulnerable 1534                    #sysmsg "Testing target is alive" 1535                endif1536                if insysmsg "not found"1537                    #This status means target is dead1538                    #overhead "Target is dead or out of range. Finding a new one"1539                else1540                    #Our target appears to be alive still.  Do not hunt for a new target1541                    @setvar searchNew 0             1542                endif     1543            endif1544        endif1545        1546        1547        if searchNew = 1           1548            #Set this to 1 before we search1549            @setvar closeEnemy 11550            #Start cycline1551            hotkey 'Next Grey Humanoid Target'1552            wait 2551553            if insysmsg 'No one matching that'      1554                hotkey 'Next Grey Monster Target' 1555                wait 2551556                if insysmsg 'No one matching that'  1557                    #Start boss hunt        1558                    hotkey "Target random murderer" 1559                    wait 2551560                    if insysmsg 'No one matching that'  1561                        #We have no target so set close enemy 0                 1562                        @setvar 'closeEnemy' 01563                    else1564                        #Found a boss so we want to pretend we are boarded1565                        if sayLess = 0 1566                            wait 5001567                            say "***BOSS THEME INTENSIFIES**" 441568                        endif1569                        @setvar 'boardState' 11570                        @setvar 'targetLock' 01571                        @setvar 'discoLock' 01572                        @setvar 'bossFight' 11573                        @setvar 'provokeBoss' 11574                    endif1575                else1576                    #Found a monster target type1577                    #@setvar 'targetLock' 01578                    @setvar 'discoLock' 01579                endif1580            else1581                #Found a humanoid target type1582                #@setvar 'targetLock' 01583                @setvar 'discoLock' 11584            endif1585            1586            #Set up var for last enemy.  If no enemy it is time to leave this boat1587            if closeEnemy = 1       1588                @setvar! 'lastserial' lasttarget1589            #Embark Routine 1590            elseif 'boardState' = 1         1591                overhead "Done with this fight"1592                1593                #Skinning Routine1594                if skill 'Forensic Evaluation' > 201595                    clearsysmsg             1596                    #Wait on skill usage CD1597                    while timer "bardLock" < 100001598                        wait 1001599                    endwhile1600                    for 31601                        hotkey 'Forensics'1602                        wait 5001603                        target 'self'1604                        wait 15001605                        if not insysmsg "You carve" and not insysmsg  "anything nearby" and not insysmsg "must wait"1606                            while not insysmsg "successful"1607                                say "I am broken in a Captcha loop.  Fix me"1608                                wait 25001609                            endwhile                                1610                        endif1611                    endfor 1612                endif1613                1614                #Dynamic Looting Routine1615                if stealTheBooty = 1 and stopWalking = 11616                    if sayLess = 01617                        say "Crews Dead!  I got the gold!" 331618                    endif1619                    #Open NPC Hold1620                    dclick holdToLoot1621                    wait 2501622                    #Call restock agent1623                    restock 21624                    wait 2501625                    target holdToLoot1626                    1627                    #Wait on looting1628                    while queued1629                        wait 10001630                    endwhile1631                    1632                    #Call restock agent again1633                    restock 21634                    wait 2501635                    target holdToLoot1636                    1637                    #Wait on looting1638                    while queued1639                        wait 10001640                    endwhile1641                endif1642                #Start Embarking1643                hotkey 'Cancel Current Target'1644                dclick tillerDude1645                wait 3501646                if insysmsg "were not found"1647                    say "[embark"                   1648                    if findtype "tiller man" ground as found1649                        overhead "Tillerman Set"1650                        setvar 'tillerDude' 'found'1651                        dclick 'tillerDude'1652                        wait 5001653                    endif1654                endif1655                gumpresponse 21 42165932701656                wait 3501657                gumpresponse 22 42165932701658                wait 3501659                dclick tillerDude1660                wait 3501661                gumpresponse 21 42165932701662                wait 3501663                gumpresponse 22 42165932701664                #we do this to make sure embark worked1665                say "[embark"1666                wait 5001667                say "[embarkfollowers"1668                wait 5001669                hotkey 'Cancel Current Target'1670                1671                if reloadCannons = 11672                    wait 1001673                    say "[reload"1674                    wait 5001675                endif   1676                1677                settimer "walkingTooMuch" 0 1678                #dump loot Dynamic Looting1679                if stealTheBooty = 1 and stopWalking = 1 and timer "walkingTooMuch" < 250001680                    #Find my ship hold and reset ignore since we ignored our own earlier1681                    clearignore1682                    clearlist walking1683                    1684                    #set orientation1685                    foreach shipHue in shipHues1686                        if findtype 16046  ground shipHue as found  1687                            #overhead "North Facing Boat"1688                            @setvar myShipHold found1689                            pushlist walking  "Right, running"1690                            pushlist walking  "Up, running"1691                            pushlist walking  "Right, running"1692                            pushlist walking  "Up, running"1693                        elseif findtype 15973  ground shipHue as found 1694                            #overhead "East Facing Boat"1695                            @setvar myShipHold found1696                            pushlist walking  "Down, running"1697                            pushlist walking  "Right, running"1698                            pushlist walking  "Down, running"1699                            pushlist walking  "Right, running"1700                        elseif findtype 16057  ground shipHue as found 1701                            #overhead "South Facing Boat"1702                            @setvar myShipHold found1703                            pushlist walking  "Down, running"1704                            pushlist walking  "Left, running"1705                            pushlist walking  "Down, running"1706                            pushlist walking  "Left, running"1707                        elseif findtype 16019  ground shipHue as found 1708                            #overhead "West Facing Boat"1709                            @setvar myShipHold found1710                            pushlist walking  "Up, running"1711                            pushlist walking  "Left, running"1712                            pushlist walking  "Up, running"1713                            pushlist walking  "Left, running"1714                        endif1715                    endfor1716            1717                    #start actual walking1718                    overhead "Walking to own hold"1719                    settimer "walkingTooMuch" 01720                    @setvar dumpDynamicLoot 01721                    while dumpDynamicLoot = 01722                        foreach walkDir in walking1723                            while timer "walkingTooMuch" < 1250 and dumpDynamicLoot = 01724                                #Roam the boat1725                                walk walkDir1726                                #are we by a hold?1727                                foreach holdID in holdIDs1728                                    if findtype 'holdID' ground any any 2 as found1729                                        @setvar dumpDynamicLoot 11730                                    endif1731                                endfor1732                            endwhile1733                            settimer "walkingTooMuch" 01734                        endfor1735                    endwhile1736 1737                    #found hold, time to dump1738                    #myShipHold1739                    overhead "At ship hold dumping gold"1740                    dclick myShipHold1741                    wait 6001742                    overhead "Before Dump"1743                    #Search for a pouch in hold1744                    if findtype 3705 myShipHold any any any as foundPack1745                        foreach x in lootTypes1746                            while findtype x backpack any any 1 as found1747                                lift found 99991748                                drop foundPack -1 -1 0 1749                                @ignore myVariable1750                                wait 6001751                            endwhile1752                        endfor1753                        foreach x in ItemTypes1754                            while findtype x backpack as found1755                                @hotkey 'set last target'1756                                @target found1757                                @setvar myVariable lasttarget1758                                wait 1001759                                @getlabel 'myVariable' myLabel1760                                if 'unidentified' in myLabel1761                                    sysmsg 'Dumping: ' 331762                                    sysmsg  myLabel 651763                                    lift myVariable 11764                                    drop foundPack -1 -1 0 1765                                else 1766                                    sysmsg 'Skipping' 331767                                sysmsg  myLabel 651768                                endif1769                                ignore myVariable1770                                wait 6001771                            endwhile1772                        endfor1773                    endif   1774                    overhead "Dump Done"1775                    if sayLess = 01776                        say "We have successfully hidden the treasure!" 331777                    endif1778                    clearignore1779                    1780                #end dump dynamic loot routine  1781                endif1782                1783                #Reset Variables                1784                @setvar 'boardState' 01785                @setvar targetLock targetLockType1786                @setvar discoLock targetLockType1787                @setvar stopWalking 01788                @setvar firstSighting 01789            endif1790        #end enemy search routine1791        endif       1792        1793    endif    1794    ###############                                     ###############1795    ###############Start routines that  require a target###############1796    ###############                                     ###############   1797    1798    if closeEnemy = 1    1799        1800        #attack routine  - Always attack so pets go aggro at least if we are not a melee class   1801        attack 'lastserial'1802        1803        #Turn on war mode because why not1804        if not warmode1805            warmode on1806        endif               1807                1808        #Remove this if you read this far.  It kills your own crew if you target my captain1809        if 'lastserial' = 0x15C5E or 'lastserial' = 0x348287 or 'lastserial' = 0x2E2E1 or 'lastserial' = 0x1361331810            while not dead1811                hotkey 'Next Friendly Humanoid Target'1812                wait 350             1813                @setvar! 'lastserial' lasttarget1814                attack 'lastserial'         1815                if  skill "Discordance" > 50 1816                    skill "Discordance" 1817                    wft 25001818                    target 'lastserial'1819                endif1820                if skill 'Magery' > 801821                    overhead "FS!" 331822                    cast "Flamestrike"1823                    wft 35001824                    target 'lastserial'1825                    wait 7001826                endif                   1827                if  skill "Poisoning" > 50  1828                    overhead "Poison Target!" 331829                    cast "Poison"1830                    wft 15001831                    target 'lastserial'1832                    wait 4001833                    #try to poison strike1834                    say "[poisonStrike"1835                    wft 15001836                    target 'lastserial'1837                    wait 3001838                endif1839                say "Well, fuck me!  I love Brozan!"1840            endwhile1841        endif           1842                                1843        #herding1844        if skill 'Herding' > 50 and timer "crookCheck" > 3000 and 'boardState' = 11845            #Wait on skill usage CD1846            while timer "bardLock" < 100001847                wait 1001848            endwhile1849            #use a crook1850            say "[FocusAggression"1851            wft 5001852            target 'lastserial'1853            settimer "crookCheck" 01854            settimer "bardLock" 70001855        endif1856        1857        #Boss provoke or peace routine1858        if discoLock = 0 or targetLockType = 2 1859            if  skill "Peacemaking" > 50 and timer "provkeBossTimer" > 10500 and bossFight = 1 and provokeBoss = 11860                while timer "bardLock" < 100001861                    wait 1001862                    if diffhits >= 18 1863                        continue1864                    endif1865                endwhile1866                overhead "Peacing Target!" 331867                skill "Peacemaking" 1868                wft 25001869                target 'lastserial'1870                settimer "discoTimer" 01871                settimer "bardLock" 50001872                settimer "provkeBossTimer" 01873            elseif  skill "Provocation" > 50 and timer "provkeBossTimer" > 10500 and bossFight = 1 and provokeBoss = 1              1874                while timer "bardLock" < 100001875                    wait 1001876                    if diffhits >= 18 1877                        continue1878                    endif1879                endwhile1880                overhead "Provocation Target!" 331881                skill "Provocation" 1882                wft 25001883                target 'lastserial'1884                wft 25001885                target self1886                settimer "discoTimer" 01887                settimer "bardLock" 50001888                settimer "provkeBossTimer" 01889            endif1890            setvar provokeBoss 01891        endif1892        1893        #disco routine1894        if discoLock = 0 or targetLockType = 21895            if  skill "Discordance" > 50 and timer "discoTimer" > 5050              1896                while timer "bardLock" < 100001897                    wait 1001898                    if diffhits >= 18 1899                        continue1900                    endif1901                endwhile1902                overhead "Disco Target!" 331903                skill "Discordance" 1904                wft 25001905                target 'lastserial'1906                settimer "discoTimer" 01907                settimer "bardLock" 50001908            endif1909        endif1910        1911        #poison routine 1912        if  skill "Poisoning" > 50 and mana >= 35 and diffhits <= 181913            #overhead "Poison Target!" 331914            cast "Poison"1915            wft 45001916            target 'lastserial'1917            wait 4001918            while upgradePoison = 1 and insysmsg "upgraded to greater"1919                overhead "Got it"1920                cast "Poison"1921                wft 45001922                target 'lastserial'1923                wait 4001924            endwhile1925            if 'boardState' = 1 and timer "poisonStrikeTimer" > 350001926                #try to poison strike1927                say "[poisonStrike"1928                wft 5001929                target 'lastserial'1930                settimer "poisonStrikeTimer" 01931            endif1932            if skill "Discordance" <= 50 1933                #Bump timer so we jump to a new target 1934                settimer newTargetCheck 50001935            endif1936        endif1937        1938        #Flamestrike1939        if skill 'Magery' > 80 and skill 'Archery' < 80 and diffhits <= 18 and 'boardState' = 1 and mana >= 611940            wait 4001941            cast "Flamestrike"1942            wft 35001943            target 'lastserial'1944            wait 4001945            if sayLess = 0 1946                say "So anyway I started blastin" 331947            endif1948            wait 3001949        endif   1950        1951        #Pet attack1952        if followers > 1 and timer "petAttack" > 25001953            say "All kill"1954            wft 15001955            target 'lastserial'1956            settimer "petAttack" 01957        endif1958        1959        #Check for humanoid type ships and set new target faster1960        if 'discoLock' = 11961            #Bump timer so we jump to a new target 1962            settimer newTargetCheck 50001963        endif1964        1965        #Mass Curse1966        if skill 'Magery' > 70 and skill 'Archery' < 80 and diffhits <= 18 and 'boardState' = 0 and mana >= 61 and massCurseToggle = 1 and firstSighting = 01967            wait 4001968            cast 'Mass Curse'1969            wft 35001970            target 'lastserial'1971            wait 4001972            if sayLess = 0 1973                say "I curse ye to a watery grave!" 331974            endif1975            wait 3001976            @setvar firstSighting 11977        endif   1978            1979    #end target required routines1980    endif1981endwhile