I’m really struggling sorry It shows how much I suck with scripting. I’m okayish with macro but the script part I just can’t understand for somer reason.
Because how the hell in a macro I can properly do something and also change the macro’s icon based on what I’ve done with the script? That is the part is not going into my mind.
Goal:
Simple macro (button) where I push it and based on the four location it changes to the apropriate dragon mount to ride and also changes the button to reflect that mount’s icon.
I’m trying with GtZoneText and C_MountJournal.SummonByID, but I honestly got lost int he else ifs, and also my syntax probably broken.
#showtooltip
/run local zoneName = GetZoneText();
if zoneName==“Waking Shores” then C_MountJournal.SummonByID(1589)
elseif zoneName==“Ohn’ahran Plains” then C_MountJournal.SummonByID(1590)
elseif zoneName==“The Azure Span” then C_MountJournal.SummonByID(1563)
elseif zoneName==“Thaldraszus” then C_MountJournal.SummonByID(1591); end
And then I didn’t even touch on the icon change part, it just complicated.
Appreciate the help in advance
Update: It works however in the dragon city it didn’t so I have to add additional zones probably or some exclusion if not any of these four areas, then some other mount should be choosen. But its working now.
/run local zT = GetZoneText() C_MountJournal.SummonByID(zt=="Waking Shores" and 1589 or zT=="Ohn'ahran Plains" and 1590 or zT=="The Azure Span" and 1563 or 1591)
About 15 years ago, I wrote myself an addon that rewrites a macro when I change zones. Worst case is that I’ll still have the macro from the previous zone if it doesn’t update correctly, but on the plus side, the icon works great and it gives me a lot more flexibility than just zones (equipped items, and classes and even talents). I don’t use it for mounts, but I guess I could.
I mostly used this for raid and encounter-specific macros. You could even have a macro changed based on a mob you target (when you target the boss before you enter combat). Saves a lot of space in the macro UI and toolbars/keybinds.
I haven’t released the addon as it’s 100% custom to my needs and has gotten quite messy over the years, but when an addon doesn’t really have much of a UI and just simple event handlers (like for when you change zones), it’s pretty easy to write and maintain for yourself.
@Elvenbane that litemount doesn’t look too light to me sorry. I rather have one cool mount macro, after all only Dragons need to be handled for me right now.
Question: Is there an "If xy == “something” OR statement? How can I do OR in a statement, it seems not working, trying to find it in api but so far I couldn’t.
However, strangely the script stopped working completely. I was assuming its too long, although my macro toolking can shoot bigger than 255 character macros as well. Just not working at all. :S No errors (well at least not errors that pops up as error but might be debug would show something IF I would know how to debug in WoW.
/script local zoneName = GetZoneText(); if zoneName == “Waking Shores” or zoneName == “Obsidian Observatory” or zoneName == “Ruby Lifeshrine” then C_MountJournal.SummonByID(1589) elseif zoneName == “Ohn’ahran Plains” then C_MountJournal.SummonByID(1590) elseif zoneName == “The Azure Span” then C_MountJournal.SummonByID(1563) elseif zoneName == “Thaldraszus” or zoneName == “Valdrakken” then C_MountJournal.SummonByID(1591) end
/run local z = GetZoneText(); C_MountJournal.SummonByID(z == "Waking Shores" or z == "Obsidian Observatory" or z == "Ruby Lifeshrine" and 1589 or z == "Ohn'ahran Plains" and 1590 or z == "The Azure Span" and 1563 or 1591)