Download
(6Kb)
Download
Updated: 05-10-23 11:17 PM
Pictures
File Info
Compatibility:
Embers of Neltharion (10.1.0)
Updated:05-10-23 11:17 PM
Created:07-05-16 02:38 PM
Downloads:1,607
Favorites:7
MD5:

gmMounts

Version: 1010-2023051101
by: gmarco, Wexen

gmMounts
(previously known as MountRndCat)

This is a tiny addon that let you define custom categories and then random summon a mount from them.

To use the addon you FIRST need to rename the file categories-sample.lua to categories.lua in the addon directory and edit it with the names of your favorite mounts.

If you modify the categories.lua file while the game client is active you have to reload the game interface with command:

/reload

Usage:

Create a macro like this to summon your mounts:


/gmm [btn:2] flying ; [btn:3] repair ; [swimming] ground ; [mod:shift] funny ; [mod:alt] favorites!; all!

or simply use the command from the cli, i.e.:


/gmm - This help
/gmm category - Summon a random mount from your 'category' list
/gmm favorites! - Summon a random mount from your favorite list
/gmm all! - Summon a random mount

The categories are shared on all characters on the same account.


Here is a categories.lua suitable for alliance players (english client):


Lua Code:
  1. gmMounts_tbl = {
  2.    
  3.     flying = {
  4.         "Swift Green Gryphon",
  5.         "Swift Blue Gryphon",
  6.         "Swift Red Gryphon",
  7.     },
  8.    
  9.     ground = {
  10.         "Swift Mistsaber",
  11.         "Swift Moonsaber",
  12.       },
  13.    
  14.     repair = {
  15.         "Traveler's Tundra Mammoth",
  16.         "Grand Expedition Yak",
  17.     },
  18.    
  19.     funny = {
  20.         "Azure Water Strider",
  21.         "Sea Turtle",
  22.    
  23.     },
  24.    
  25.     combo = {
  26.         "Sandstone Drake",
  27.         "Mekgineer's Chopper",
  28.     },
  29.    
  30.    
  31.    -- add your custom categories here
  32. }

N.B. Please remember to backup your custom categories.lua before updating.

-- I also whish to thanks SDPhantom and Phanx for their help, code and suggestions that help me so much in understanding and writing my first addon

1010-2023051101
- bump toc
- added in .toc the IconTexture key

1000-2022110601
- added X-WoWI-ID and X-Curse-Project-ID keywords to let WowUp manage it
- bump toc

900-2020101401
- bump toc
- first fixes to work with 9.0.x

830-2020031501
- bump toc

820-2019062801
- bump toc

810-2018122201
- bump toc

801-2018081101
- bump toc

720-2017032801
- bump toc

1.0-2016102601
- bump toc

1.0-2016070501
- changed name and references to gmMounts
- bump toc for 7.0
- used the new C_MountJournal functions

--- Previous changes of MountRndCat

1.0-2015101801
- fixed a bug where a mount with the same name but with 2 ids can't be summoned (thanks to Phanx for the input and ideas)
- add the default category " favorites! " which randomly summon a mount from the favorites.
Basically it is the same of the "Summon Random Favorite Mount" spell, but I need it to use in a macro.
To do it you can also use a simple:

C_MountJournal.Summon(0)

but I found it acts more as a switch than a summon.
So you press once it summon a random favorite you press twice it dismiss.
I have to check it better.

- add the default category " all! " which randomly summon a mount
- fix the code to prevent to summon the active mount

1.0-2015062401
- bump toc for 6.2

1.0-2015022501
-bump toc for 6.1

1.0-2014101501
- bump toc for 6.0
- migrate to C_MountJournal API

1.0-2013091001
- bump toc for 5.4

1.0-2013052101
- bump toc for 5.3

1.0-2013030401
- bump toc
1.0-2015062401
- bump toc for 6.2

1.0-2015022501
-bump toc for 6.1

1.0-2014101501
- bump toc for 6.0
- migrate to C_MountJournal API

1.0-2013091001
- bump toc for 5.4

1.0-2013052101
- bump toc for 5.3

1.0-2013030401
- bump toc
Optional Files (0)


Archived Files (1)
File Name
Version
Size
Author
Date
1000-2022110601
6kB
gmarco
11-06-22 03:22 AM


Post A Reply Comment Options
Unread 05-21-20, 08:23 PM  
AkumaGekido
A Murloc Raider

Forum posts: 6
File comments: 17
Uploads: 0
Really like this addon, been using it a couple years. I was juust wondering if there's a way you could implement "weights" to the mounts. Maybe something like a 0-1 scale so you can determine the chances for each mount to be summoned.
Report comment to moderator  
Reply With Quote
Unread 06-14-17, 05:40 AM  
aallkkaa
A Warpwood Thunder Caller
 
aallkkaa's Avatar
AddOn Author - Click to view AddOns

Forum posts: 98
File comments: 32
Uploads: 3
I love your addon but I had to make a couple tweaks to it.
The output of running fc core.lua core-ORIGINALBAK.lua where "core.lua" is my modified version and "core-ORIGINALBAK.lua" is your original version is as follows:
Code:
Comparing files core.lua and CORE-ORIGINALBAK.LUA
***** core.lua
        if category=="help" then
                print(prgname .. ":")
                print("/gmm help - This help")
                print("/gmm category - Summon a random mount from your 'category' list")
***** CORE-ORIGINALBAK.LUA
        if category=="" then
                print(prgname .. ":")
                print("/gmm  - This help")
                print("/gmm category - Summon a random mount from your 'category' list")
*****

***** core.lua
                C_MountJournal.SummonByID(CategoryMounts[number])
                -- print(prgname .. " is summoning... " .. name)

***** CORE-ORIGINALBAK.LUA
                C_MountJournal.SummonByID(CategoryMounts[number])
                print(prgname .. " is summoning... " .. name)

*****

***** core.lua
        elseif category=="" then
***** CORE-ORIGINALBAK.LUA
*****
The first change makes it so that the help message is displayed upon
Code:
/gmm help
instead of upon
Code:
/gmm
The third/last change makes it so /gmm does nothing. I need this so that the following macro works (almost) as it would were I to use /castrandom <condition-based parameters> instead of /gmm <condition-based categories>:
Code:
/gmm [nomounted, swimming] swimming; [nomounted, flyable] flying; [nomounted] ground;
/dismount [mounted]
Aside from using categories' names instead of a comma-separated list of mounts' names, the difference from using /gmm instead of /castrandom is that I had to add a final semicolon to the end to simulate a /gmm "" and do nothing (in case the character is indoors or whatever) and not get an error message in the process.

The second change is simply what you suggested earlier in this thread, so as to not display the "Summoning ..." chat message.

I'm not acutally asking you to implement these changes but I figured you might like to know how people are using and editing your addon.
Last edited by aallkkaa : 06-14-17 at 05:40 AM.
Report comment to moderator  
Reply With Quote
Unread 03-29-17, 02:51 AM  
gmarco
An Onyxian Warder
 
gmarco's Avatar
AddOn Author - Click to view AddOns

Forum posts: 362
File comments: 334
Uploads: 46
Originally Posted by AkumaGekido
Hi, tried a few random mount addons, but none of them seemed to let you use flying mounts in non-flying areas. Found this one and it's just what I want. Just wondering though if there's a way to turn off the chat announcement when summing a mount. Again great addon.

Hi,
there is no defined cfg that you can set at the moment to silent it.

I can implement it easily in a next version btw.
In the meantime you can comment out the lines that make the output.

So, for example, line 109:

Lua Code:
  1. print(prgname .. " is summoning... " .. name)

should become in this way:

Lua Code:
  1. -- print(prgname .. " is summoning... " .. name)

Stay tuned and thanks for your kind appreciation.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
Report comment to moderator  
Reply With Quote
Unread 03-29-17, 02:27 AM  
AkumaGekido
A Murloc Raider

Forum posts: 6
File comments: 17
Uploads: 0
Hi, tried a few random mount addons, but none of them seemed to let you use flying mounts in non-flying areas. Found this one and it's just what I want. Just wondering though if there's a way to turn off the chat announcement when summing a mount. Again great addon.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: