~RoM Macros

TARGETING

Target nearest Enemy
/script TargetNearestEnemy();

Target Self
/script TargetUnit(“player”);

Target Party Member
(any of the below – caution: party order can change)
/script TargetUnit(“party1″);              or
/script TargetUnit(“party2″);              or
/script TargetUnit(“party3″);              or
/script TargetUnit(“party4″);              or
/script TargetUnit(“party5″);

Follow (useful if you often party with one other person)
/script FollowUnit( “party1″ )

Assist macros
/script AssistUnit(“target”);            (need to select target first)

/script AssistUnit(“party1″);         (assists 1st party member)

INTERFACE

Action bar lock toggle
/script if (ACTIONBUTTON_LOCKED==true) then ACTIONBUTTON_LOCKED=false; else ACTIONBUTTON_LOCKED=true; end

Minimap & Target info placement (2 examples – you can adjust #’s to get desired effect)

/script MinimapFrame:ClearAllAnchors(); MinimapFrame:SetAnchor(“TOPRIGHT”, “TOPRIGHT”, WorldFrame, -8, 28);
/script TargetFrame:ClearAllAnchors(); TargetFrame:SetAnchor(“BOTTOM”, “BOTTOM”, WorldFrame, 260, -165)

/script MinimapFrame:ClearAllAnchors(); MinimapFrame:SetAnchor(“TOPRIGHT”, “TOPRIGHT”, WorldFrame, -8, 28);
/script TargetFrame:ClearAllAnchors(); TargetFrame:SetAnchor(“TOPRIGHT”, “TOPRIGHT”, WorldFrame, -270, 10)

INFORMATION GATHERING

Class Info
/script local mainClass, subClass = UnitClass(“target”); DEFAULT_CHAT_FRAME:AddMessage( mainClass .. “/” .. subClass );

Mob Hitpoints – how many? (not the % that shows up in the health bar)
/script DEFAULT_CHAT_FRAME:AddMessage(UnitName(“target”)..” has “..UnitChangeHealth(“target”)..” health.”);

Name/Level/Class/Health of targeted Creature
/script local mainClass, subClass = UnitClass(“target”); DEFAULT_CHAT_FRAME:AddMessage(UnitName(“target”)..” is a lv”..UnitLevel(“target”)..” “..mainClass .. “/” .. subClass..” and has “..UnitChangeHealth(“target”)..” health.” );

another, if you have trouble with the one above is:

/script local mainClass, subClass = UnitClass("target"); DEFAULT_CHAT_FRAME:AddMessage(UnitName("target").." is a lv"..UnitLevel("target").." "..mainClass .. "/" .. subClass.." and has "..UnitChangeHealth("target").." health." );

or to say outloud
/script local var1 = UnitLevel(“target”); var2 = UnitHealth(“target”); var3 = UnitName(“target”); SendChatMessage(var3..” is level “..var1..” and has “..var2..” health.”, “SAY” );