Macro different use depending on map/battleground

Locked
User avatar
Gnurg
Posts: 2420
Joined: 28 Jan 2013 19:38
Location: Oslo, Norway

Macro different use depending on map/battleground

#1 » Post by Gnurg » 12 Feb 2017 21:19

Would it be possible to make a macro act differently depending if you're in a bg or raid?

Basically:

Code: Select all

if <in battleground>
equip PvP-Weapon
else
equip PvE-Weapon
HAI
CAN HAZ STDIO?
VISIBLE "HAI WORLD, IZ GNURF!"
KTHXBYE

User avatar
Regent
Tester
Posts: 375
Joined: 30 Apr 2014 16:11
Location: Darnassus, Teldrassil.
Contact:

Re: Macro different use depending on map/battleground

#2 » Post by Regent » 12 Feb 2017 21:33

As far as I know, if / else statements aren't supported in WoW's macro coding (Lua, I believe).
The closest I've gotten to getting something similar (in druid's case) is just a swap macro based on this:
(It can be modified to any gear slot, the one below being used for relics on a druid tank to swap idols depending on situation).

Code: Select all


#showtooltip 18
/equip [mod:alt,noequipped:Idol of the Crying Moon]Idol of the Crying Moon;[noequipped:Idol of Mutilation]Idol of Mutilation
Otherwise, an addon like Outfitter can handle it for you automatically. It has conditions built in for various activities & situations and so it can modify your gear accordingly. I use it with my own designated gear sets and it works like a charm.
It's also a great replacement for the built-in (and really crappy) gear manager too.
Hope this helps.
Rest in Peace,
Sarah Melody Jones.
May 20, 1989 - May 12, 2018.
Beloved Girlfriend & Mother-To-Be.
When I close my eyes, I see you.
When I open my eyes, I miss you.

ImageImageImageImageImageImageImageImage
Regent- - - - - - - - -Regentt- - - - - - - - -Regennt- - - - - - - - -Regency

User avatar
Wilcox
Posts: 1589
Joined: 16 Dec 2012 13:37
Location: Kebabland

Re: Macro different use depending on map/battleground

#3 » Post by Wilcox » 13 Feb 2017 07:00

tried switch?

User avatar
Gnurg
Posts: 2420
Joined: 28 Jan 2013 19:38
Location: Oslo, Norway

Re: Macro different use depending on map/battleground

#4 » Post by Gnurg » 13 Feb 2017 08:39

I don't think outfitter would to switch weapon while in combat. I need the macro for when jumping between 1h and 2h.
HAI
CAN HAZ STDIO?
VISIBLE "HAI WORLD, IZ GNURF!"
KTHXBYE

User avatar
SomethingWitty
Posts: 138
Joined: 27 Aug 2013 20:25

Re: Macro different use depending on map/battleground

#5 » Post by SomethingWitty » 13 Feb 2017 10:42

Gnurg wrote:I don't think outfitter would to switch weapon while in combat. I need the macro for when jumping between 1h and 2h.
/equipslot16 [some 1h] *I think the slots are 16/17 might be wrong.
/equipslot17 [some shield]
/cast Shield Slam/Reflect/whatever ability that requires a shield

/equipslot16 [some 2h]
/cast Mortal Strike/Heroic Strike/whatever ability that does damage without requiring a shield

Bind these 2 macros to replace your normal skills, downside is that you can't MS/HS with a shield on, so i recommend just having the /equiplsot16 [some 2h] on its own with its own bind and keeping the original MS/HS.
"he cant even base a shit + he is worst pvp player in here and he tells us we are bad in pvp this is nonesense its like Englez will say that virdo is bad in leading raids and in pve and after virdo asks him why he say that and for what reason englez will say 'i dont want to destroy your statements ive been there done that etc' "-Balanced 2015

User avatar
Gnurg
Posts: 2420
Joined: 28 Jan 2013 19:38
Location: Oslo, Norway

Re: Macro different use depending on map/battleground

#6 » Post by Gnurg » 13 Feb 2017 10:49

SomethingWitty wrote:
Gnurg wrote:I don't think outfitter would to switch weapon while in combat. I need the macro for when jumping between 1h and 2h.
/equipslot16 [some 1h] *I think the slots are 16/17 might be wrong.
/equipslot17 [some shield]
/cast Shield Slam/Reflect/whatever ability that requires a shield

/equipslot16 [some 2h]
/cast Mortal Strike/Heroic Strike/whatever ability that does damage without requiring a shield

Bind these 2 macros to replace your normal skills, downside is that you can't MS/HS with a shield on, so i recommend just having the /equiplsot16 [some 2h] on its own with its own bind and keeping the original MS/HS.
This I already know.

I need this part to be different depending on if I am in a battleground or not. i.e. equip the PvP 1-hander while in bgs and PvE 1-hander while not in bgs.
HAI
CAN HAZ STDIO?
VISIBLE "HAI WORLD, IZ GNURF!"
KTHXBYE

User avatar
Eronox
MVP
Posts: 2331
Joined: 24 Apr 2016 11:03
Location: in ICC & Healing

Re: Macro different use depending on map/battleground

#7 » Post by Eronox » 13 Feb 2017 15:22

.

There's things that never will be right I know, and things need changin' everywhere you go.
But 'til we start to make a move to make a few things right,
You'll never see me wear a suit of white.

- J.R Cash


User avatar
Xenitron
Posts: 49
Joined: 21 Oct 2016 23:23

Re: Macro different use depending on map/battleground

#8 » Post by Xenitron » 13 Feb 2017 15:33

there is way you can make macro do something when some function of macro matches part of interface letters, so you can change it to do something when it gets parts of name of some zones.
I found macro that sells all grey items in inventory and it finds them by color so..
Anyways I think good way to start making that macro is to find somewhere macro for mount that changes accordingly to zone you are in and just adjust it

User avatar
Xenitron
Posts: 49
Joined: 21 Oct 2016 23:23

Re: Macro different use depending on map/battleground

#9 » Post by Xenitron » 13 Feb 2017 15:42

Later I will try to find you a macro that writes name of interface part that mouse is howering over so it could maybe help you

User avatar
Eronox
MVP
Posts: 2331
Joined: 24 Apr 2016 11:03
Location: in ICC & Healing

Re: Macro different use depending on map/battleground

#10 » Post by Eronox » 26 Feb 2017 22:42

Gnurg wrote:Summon!
Hello, Mr. Janitor here. Is this still an active question or have you found a solution to your desires?
.

There's things that never will be right I know, and things need changin' everywhere you go.
But 'til we start to make a move to make a few things right,
You'll never see me wear a suit of white.

- J.R Cash


User avatar
Gnurg
Posts: 2420
Joined: 28 Jan 2013 19:38
Location: Oslo, Norway

Re: Macro different use depending on map/battleground

#11 » Post by Gnurg » 26 Feb 2017 22:42

Eronox wrote:
Gnurg wrote:Summon!
Hello, Mr. Janitor here. Is this still an active question or have you found a solution to your desires?
Sure
HAI
CAN HAZ STDIO?
VISIBLE "HAI WORLD, IZ GNURF!"
KTHXBYE

Locked

Who is online

Users browsing this forum: No registered users and 2 guests