Mount macro using lua script

hello there!
i was googling for a while now but i cant get my macro to work.
the idea is to summon Flourishing Whimsydrake while i am in the emerald dream,
summon highland drake when dragonriding is possible and summoning an old flying mount if only flyable. i found some lua code which works for itself but i need to combine it with the other 2 lanes below. since my client is german the names are german aswell. i am sure there is a better option using zone and mount IDs. im just not experienced enough using lua.

#showtooltip
/run if GetZoneText() == “Smaragdgrüner Traum” then C_MountJournal.SummonByID(?) else C_MountJournal.SummonByID(0) end // thats the raw code i found in another post
/cast Hochlanddrache (highland drake)
/cast [flyable] Seuchenfledermaus von Unterstadt (undercity plaguebat)

thx for your help <3

1830 per wowhead

https://www.wowhead.com/spell=425338/flourishing-whimsydrake

thx very much. this solves at least the problem of the missing mount ID^^

You can get the Zone ID the same way
https://www.wowhead.com/zone=14529/emerald-dream

But you’re better off using map ids

#showtooltip
/run if C_Map.GetBestMapForUnit("player") == 2200 then C_MountJournal.SummonByID(1830) elseif IsAdvancedFlyableArea() then C_MountJournal.SummonByID(1563) else C_MountJournal.SummonByID(1049) end

Alternatively, you can save yourself all this hassle and just use LiteMount
https://www.curseforge.com/wow/addons/litemount

omg you fixed it thank you so much <3
i tried lite mount but it only works for 1 char since the fav. list is accountwide. the macro on the other hand can be adjusted for every alt^^
thx tho for helping me out!

edit: i just saw you can use profiles for different chars so ye litemount is actually a much better solution

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.