User:Kunzite1/Useful macros/General

= AddOns = Total number of installed Addons /run local num = GetNumAddOns; DEFAULT_CHAT_FRAME:AddMessage("You are currently running " .. num .. " addons you nutjob!")

= Combat = Auto-Attack before ability/spell. /startattack /use Stormstrike
 * 1) showtooltip

Trinket before ability/spell /use 13 /use Stormstrike
 * 1) showtooltip Stormstrike

= Dungeon Finder = If not in dungeon, teleport in If in dungeon, teleport out /run LFGTeleport(IsInLFGDungeon)

= Gear =

Trinket
 Trinket One  /use 13  Trinket Two  /use 14
 * 1) showtooltip 13
 * 1) showtooltip 14

= Map =

Coordinates
Character is in [Zone] @ 0,0 /script px,py=GetPlayerMapPosition("player");z=GetZoneText; /script DEFAULT_CHAT_FRAME:AddMessage(format("%s is in [%s] @ %i,%i",UnitName("player"),z,px*100,py*100))

[Zone - Subzone] 0,0 /script x,y=GetPlayerMapPosition("player");z=GetZoneText;s=GetSubZoneText;if(s~="")then z=z.." - "..s end /script d=4;p=10^d;x=floor(x*p+0.5)/p;y=floor(y*p+0.5)/p;DEFAULT_CHAT_FRAME:AddMessage(format("[%s] %s,%s",z,x*100,y*100))

= Pets =

Companions
/run CallCompanion("CRITTER",random(GetNumCompanions("CRITTER")))

Mounts
/run CallCompanion("MOUNT",random(GetNumCompanions("MOUNT")))

/use [combat] Ghost Wolf /userandom [nocombat,noflying] Purple Skeletal Warhorse, Swift Brewfest Ram

= Professions =

Crafting
/run CloseTradeSkill /cast Leatherworking /run r="Light Leather"; /run for i=1,GetNumTradeSkills do if GetTradeSkillInfo(i)==r then CloseTradeSkill DoTradeSkill(i) break end end
 * 1) showtooltip Ruined Leather Scraps

= Targetting =

Focus
Set target as focus If no target, clears focus /clearfocus /focus

Assist Focus /assist focus