//Raul's Armor Macro 1.1.2 //f2 toggles armor //it will check your armor wear levels before it equips the first time //while the armor is equipped it will check for dings //it will not equip armor that is too damaged, and will unequip armor that becomes too damaged //f10 will scan your armor f2 call armormacro f10 call armorcheck armormacro { if armoring != 1 setglobal armoring 1 setglobal armoron 0 if @my.head_item >= "iron helmet <#" setglobal armoron 1 goto armor end if if @my.left_item >= "iron shield <#" setglobal armoron 1 goto armor end if if @my.torso_item >= "iron breastplate <#" setglobal armoron 1 end if label armor if armoron == 1 if @my.torso_item >= "iron breastplate <#" "/equip shirt 1\r" end if if @my.left_item >= "iron shield <#" "/unequip ironshield\r" end if if @my.head_item >= "iron helmet <#" "/unequip ironhelmet\r" end if pause 3 setglobal armorcheckloopon 0 else call armorequip if armorcheckloopon != 1 call armorcheckloop end if end if setglobal armoring 0 end if } armorequip { if armorchecked != 1 call armorcheck set justcheckedarmor 1 end if if bplevel >= 2 "/equip ironbreastplate\r" end if if shieldlevel >= 2 "/equip ironshield\r" end if if helmetlevel >= 2 "/equip ironhelmet\r" end if setglobal armoring 0 if justcheckedarmor != 1 //call armorcheck end if } armorcheck { if armorchecking != 1 setglobal armorchecking 1 call bpcheck call shieldcheck call helmetcheck setglobal armorchecked 1 message "* BP:" bplevel "/ 5 [] Shield:" shieldlevel "/ 5 [] Helmet:" helmetlevel "/ 5" setglobal armorchecking 0 if armorcheckloopon != 1 setglobal armoron 0 if @my.head_item >= "iron helmet <#" setglobal armoron 1 goto skip end if if @my.left_item >= "iron shield <#" setglobal armoron 1 goto skip end if if @my.torso_item >= "iron breastplate <#" setglobal armoron 1 end if label skip if armoron == 1 call armorcheckloop end if end if end if } bpcheck { setglobal checkingitem "breastplate" call armorchecker setglobal bplevel checkinglevel } shieldcheck { setglobal checkingitem "shield" call armorchecker setglobal shieldlevel checkinglevel } helmetcheck { setglobal checkingitem "helmet" call armorchecker setglobal helmetlevel checkinglevel } armorchecker { set checkingtimer 0 setglobal checkinglevel NA label checkingstart "/selectitem 'iron " checkingitem "'\r" "/examine\r" pause 1 if @env.textlog >= "is brand new." setglobal checkinglevel 5 end if if @env.textlog >= "is in nearly perfect condition." setglobal checkinglevel 5 end if if @env.textlog >= "is in very good condition." setglobal checkinglevel 4 end if if @env.textlog >= "is starting to look a little worn." setglobal checkinglevel 3 end if if @env.textlog >= "is in serious need of repair." setglobal checkinglevel 2 end if if @env.textlog >= "is going to fall apart any day now." setglobal checkinglevel 1 end if if @env.textlog >= "is no longer functional." setglobal checkinglevel 0 end if if @env.textlog >= "will examine the item selected in your Inventory window." setglobal checkinglevel -1 end if if checkinglevel == NA if checkingtimer > 2 set checkingtimer 0 goto checkingstart end if set checkingtimer + 1 goto checkingstart end if } armorcheckloop { setglobal armorcheckloopon 1 label start if armorcheckloopon == 1 if @env.textlog >= "looks less effective" setglobal armorwornmessage @env.textlog message ding call armorwearcheck end if pause 1 goto start end if } armorwearcheck { if armorwornmessage >= "breastplate" call bpcheck message * BP bplevel / 5 if bplevel <= 1 if my.torso_item >= "iron breastplate <#" "/unequip ironbreastplate\r" end if end if end if if armorwornmessage >= "shield" call shieldcheck message * Shield shieldlevel / 5 if shieldlevel <= 1 if my.left_item >= "iron shield <#" "/unequip ironshield\r" end if end if end if if armorwornmessage >= "helmet" call helmetcheck message * Helmet helmetlevel / 5 if helmetlevel <= 1 if my.head_item >= "iron helmet <#" "/unequip ironhelmet\r" end if end if end if }