ArmorMacrosSet: Difference between revisions

From CLUMP
Jump to navigationJump to search
No edit summary
Line 1: Line 1:
=Armor Macros=
=Armor Macros=
New F12 macro
New F12 toggle armor on/off macro. It also uses "/armor" or "eib" to equip and "dib" to uneqiup.


  "/exarm" call examineArmor
  "/exarm" call examineArmor
Line 7: Line 7:
  set equipShield 1
  set equipShield 1
  set myshirt "shirt1"
  set myshirt "shirt1"
set defaultshield "Knight's Shield"
   
   
  "equipArmor" call equipArmor
  "/armor" call equipArmor
  "dib" call removeArmor
  "dib" call removeArmor
  "eib" call equipArmor
  "eib" call equipArmor
Line 36: Line 37:
  end if
  end if
  else
  else
  "/equip Knight's Shield\r"
  "/equip " defaultshield "\r"
  message "* Shield too damaged *"
  message "* Shield too damaged *"
  end if
  end if
Line 56: Line 57:
  //Iron Shield unequip
  //Iron Shield unequip
  if @my.left_item >= "iron"
  if @my.left_item >= "iron"
  "/equip Knight's Shield\r"
  "/equip " defaultshield "\r"
  else  
  else  
  message "*Iron Shield already unequipped."
  message "*Iron Shield already unequipped."
Line 90: Line 91:
  end if
  end if
   
   
  "/selectitem TarynbaneHelm\r"
  "/selectitem iron helmet\r"
  pause 1
  pause 1
  "/examine\r"
  "/examine\r"
Line 99: Line 100:
  end if
  end if
   
   
  "/selectitem TarynbaneShield\r"
  "/selectitem iron shield\r"
  pause 1
  pause 1
  "/examine\r"
  "/examine\r"

Revision as of 21:52, 8 March 2015

Armor Macros

New F12 toggle armor on/off macro. It also uses "/armor" or "eib" to equip and "dib" to uneqiup.

"/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
{
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 iron helmet\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
}

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
}