ArmorMacrosSet: Difference between revisions

From CLUMP
Jump to navigationJump to search
(Armor Macros)
 
m (→‎Armor Macros: — added important to top)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Armor Macros=
New F12 toggle armor on/off macro. It also uses
"/armor" or "eib" to equip
and
"dib" to uneqiup.
See IMPORTANT in examineArmor macro, & change to your shield’s name.
"/exarm" call examineArmor
set equipBPlate 1
set equipHelm 1
set equipShield 1
set myshirt "shirt1"
set defaultshield "Knight's Shield"
"/armor" call equipArmor
"dib" call removeArmor
"eib" call equipArmor
F12 call toggleArmor
// --*EquipMacro
equipArmor
{
if @my.torso_item != "iron breastplate"
setglobal myshirt @my.torso_item
end if
//Helm Equip
if equipHelm == 1
"/equip iron helmet\r"
else
message "* Helmet too damaged *"
end if
// --*ShieldEquip
if equipShield == 1
if @my.left_item != "chain"
"/equip iron shield\r"
else
message "*Chain Equipped: Not equipping iron shield to avoid accidental dropping of chainees"
end if
else
"/equip " defaultshield "\r"
message "* Shield too damaged *"
end if
// --*Breastplate Equip
if equipBPlate == 1
      "/equip ironbreast \r"
    else
      message "* breastplate too damaged *"
      "/equip shirt1\r"
    end if
}
// --*RemoveMacro
removeArmor
{
"/unequip iron helmet\r"
//Iron Shield unequip
if @my.left_item >= "iron"
"/equip " defaultshield "\r"
else
message "*Iron Shield already unequipped."
end if
//Breastplate Unequip
if @my.torso_item >= "breastplate"
    "/equip " myshirt "\r"
else
message "*Iron Breastplate already unequipped."
end if
}
// --*ToggleArmor
toggleArmor
{
if @my.head_item >= "helmet"
call removeArmor
else
call equipArmor
end if
}
// --*ExamineMacro
examineArmor
{
"/selectitem iron breastplate\r"
pause 1
"/examine\r"
if @env.textLog > "fall apart"
setglobal equipBPlate 0
else
setglobal equipBPlate 1
end if
"/selectitem helmet\r"
pause 1
"/examine\r"
if @env.textLog > "fall apart"
setglobal equipHelm 0
else
setglobal equipHelm 1
end if
"/selectitem Shield\r" //*IMPORTANT:name your shield & use the name instead of "shield" if it selects the wrong one
message "*if <error> name your shield & use the name instead of 'shield'"
pause 1
"/examine\r"
if @env.textLog > "fall apart"
setglobal equipShield 0
else
setglobal equipShield 1
end if
}
==Armor Macros Information==
==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.''  
'''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. See [[Training#Repairing_Items|Repairing Items]] for armor wear levels.''  


'''''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.''
'''''Rangers Please Note:''' If you have the [[Rangers#Heartwood_Charm|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.  
'''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.
'''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==
==Armor Macros==
  //set these triggers to your liking
  //set these triggers to your liking
Line 29: Line 147:
  setglobal equipBPlate 1
  setglobal equipBPlate 1
  end if
  end if
  "/selectitem iron helm\r"
  "/selectitem helmet\r"
  pause 1
  pause 1
  "/examine\r"
  "/examine\r"
Line 37: Line 155:
  setglobal equipHelm 1
  setglobal equipHelm 1
  end if
  end if
  "/selectitem iron shield\r"
  "/selectitem shield 1\r"
  pause 1
  pause 1
  "/examine\r"
  "/examine\r"

Latest revision as of 12:04, 28 May 2022

Armor Macros[edit]

New F12 toggle armor on/off macro. It also uses

"/armor" or "eib" to equip 

and

"dib" to uneqiup. 

See IMPORTANT in examineArmor macro, & change to your shield’s name.

"/exarm" call examineArmor
set equipBPlate 1
set equipHelm 1
set equipShield 1
set myshirt "shirt1"
set defaultshield "Knight's Shield"

"/armor" call equipArmor
"dib" call removeArmor
"eib"	call equipArmor

F12 call toggleArmor

// --*EquipMacro
equipArmor
{
if @my.torso_item != "iron breastplate"
	setglobal myshirt @my.torso_item
end if

//Helm Equip
if equipHelm == 1
	"/equip iron helmet\r"
else
	message "* Helmet too damaged *"
end if

// --*ShieldEquip
if equipShield == 1
	if @my.left_item != "chain"
		"/equip iron shield\r"
	else 
		message "*Chain Equipped: Not equipping iron shield to avoid accidental dropping of chainees"
	end if
else
	"/equip " defaultshield "\r"
	message "* Shield too damaged *"
end if

// --*Breastplate Equip
if equipBPlate == 1
      "/equip ironbreast \r"
   else
      message "* breastplate too damaged *"
      "/equip shirt1\r"
   end if
}

// --*RemoveMacro
removeArmor
{
"/unequip iron helmet\r"

//Iron Shield unequip
if @my.left_item >= "iron"
		"/equip " defaultshield "\r"
else 
	message "*Iron Shield already unequipped."
end if

//Breastplate Unequip
if @my.torso_item >= "breastplate"
   	"/equip " myshirt "\r"
else 
	message "*Iron Breastplate already unequipped."
end if
}

// --*ToggleArmor
toggleArmor
{
if @my.head_item >= "helmet"
	call removeArmor
else
	call equipArmor
end if
}

// --*ExamineMacro
examineArmor
{
"/selectitem iron breastplate\r"
pause 1
"/examine\r"
if @env.textLog > "fall apart"
	setglobal equipBPlate 0
else
	setglobal equipBPlate 1
end if

"/selectitem helmet\r"
pause 1
"/examine\r"
if @env.textLog > "fall apart"
	setglobal equipHelm 0
else
	setglobal equipHelm 1
end if

"/selectitem Shield\r" //*IMPORTANT:name your shield & use the name instead of "shield" if it selects the wrong one
message "*if <error> name your shield & use the name instead of 'shield'"
pause 1
"/examine\r"
if @env.textLog > "fall apart"
	setglobal equipShield 0
else
	setglobal equipShield 1
end if
}

Armor Macros Information[edit]

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. See Repairing Items for armor wear levels.

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[edit]

//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 helmet\r"
pause 1
"/examine\r"
if @env.textLog > "fall apart"
	setglobal equipHelm 0
else
	setglobal equipHelm 1
end if
"/selectitem shield 1\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
}