ArmorMacrosSet: Difference between revisions
Armor Macros |
(No difference)
|
Revision as of 20:20, 13 August 2014
Armor Macros Information
Purpose: This macro set will equip, de-equip and examine armor. Note: The equip macro checks to make sure each piece is not about to fall apart before equipping it for safety.
Rangers Please Note: If you have the heartwood charm equipped, this will not de-equip it to equip the shield. This is in case you are taking off your armor while using the heartwood charm to run faster.
Instructions: Copy the code below into its own file and link it by adding include "filename.txt" in either your default or character macro file.
Use: By Default typing /exarm will call examinearmor . Use eib and dib equips and de-equip armor. (armorup also will call armor.) You can change the triggers that call the macros at the top to your liking, or add additional ones.
Armor Macros
//set these triggers to your liking
"/exarm" call examinearmor //examines armor
"eib" call armor // equips armor
"armorup" call armor //equips armor
"dib" call armoroff //de-equips armor
//global armor state defaults DO NOT EDIT (these assume armor is about to fall apart for safety)
set equipBPlate 1
set equipHelm 1
set equipShield 1
examinearmor
{
"/selectitem iron breastplate\r"
pause 1
"/examine\r"
if @env.textLog > "fall apart"
setglobal equipBPlate 0
else
setglobal equipBPlate 1
end if
"/selectitem iron helm\r"
pause 1
"/examine\r"
if @env.textLog > "fall apart"
setglobal equipHelm 0
else
setglobal equipHelm 1
end if
"/selectitem iron shield\r"
pause 1
"/examine\r"
if @env.textLog > "fall apart"
setglobal equipShield 0
else
setglobal equipShield 1
end if
}
armoroff
{
"/unequip iron helmet 1\r"
if @my.left_item != "Heartwood Charm"
"/equip wooden shield\r"
end if
call armorup
}
armor
{
call examinearmor
setglobal shirt @my.torso_item
if equipHelm == 1
"/equip iron helmet\r"
else
message "* Helmet too damaged *"
end if
if equipShield == 1
"/equip iron shield\r"
else
"/equip wooden shield\r"
message "* Shield too damaged *"
end if
call armorup
}
armorup
{
set mytop @my.torso_item
if mytop >= "shirt"
setglobal myshirt @my.torso_item
if equipBPlate == 1
"/equip ironbreast \r"
else
message "* breastplate too damaged *"
"/equip shirt1 Black\r"
end if
else if mytop >= "iron"
message myshirt
if myshirt == ""
"/equip shirt1 Black\r"
message "default called"
else
"/equip " myshirt "\r"
message "global " myshirt " called"
end if
else
if equipBPlate == 1
"/equip ironbreast \r"
else
message "* breastplate too damaged *"
"/equip shirt1 Black\r"
end if
end if
}