Thread Tools Display Modes
07-02-18, 05:47 AM   #1
alikim
A Fallenroot Satyr
Join Date: Jul 2015
Posts: 27
How to pickup a mount to the cursor by ID?

I want to write a lua code that picks up a mount ( I know it's ID from GetActionInfo) and places it on an Action Slot.
I know PickupSpell, PickupItem, PickupMacro to pickup those things by their ID, but that doesn't seem to work with mounts.
  Reply With Quote
07-02-18, 09:48 AM   #2
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,364
While I know next to nothing about Lua, I have to ask you - can you still place your mount on the action bars? It's been almost two years since I played WoW and that's why I asked. I used to have a couple of mounts on my action bars and all I did was put them there manually.
__________________
Ahhhh, the vagueries of the aging mind. Wait.... What was I saying?


Carbonite <----- GitHub main module (Maps ONLY) download link. The other modules are also available on GitHub.
Carbonite-CLASSIC<----- GitHub link to Carbonite Classic. Thanks to ircdirk for this!
  Reply With Quote
07-02-18, 10:36 AM   #3
alikim
A Fallenroot Satyr
Join Date: Jul 2015
Posts: 27
Originally Posted by jeffy162 View Post
While I know next to nothing about Lua, I have to ask you - can you still place your mount on the action bars? It's been almost two years since I played WoW and that's why I asked. I used to have a couple of mounts on my action bars and all I did was put them there manually.
Yes, you can put all sorts of mounts on the action bars but I can't find a way to do it programmably.

The only way to put something on the action bars that I know of is to pick it on the cursor with PickupXXX(objectID) Lua command and then PlaceAction(actionBarSlotID) from the cursor. I made it work for spells, items and macroses but I got stuck with mounts.

Last edited by alikim : 07-02-18 at 10:40 AM.
  Reply With Quote
07-02-18, 11:30 AM   #4
AcidWeb
A Theradrim Guardian
 
AcidWeb's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 68
C_MountJournal.Pickup(id). But you need check mount UI code as id might be internal.
  Reply With Quote
07-02-18, 11:38 AM   #5
saxitoxin
A Theradrim Guardian
 
saxitoxin's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 60
what mount are you trying to pick up?

try this:
Code:
		local creatureName, spellID, icon, active, isUsable, sourceType, isFavorite, isFactionSpecific, faction, hideOnChar, isCollected, mountID = C_MountJournal.GetMountInfoByID(246)
		PickupSpell(spellID or creatureName)
mountID 246 is the Azure Drake
  Reply With Quote
07-02-18, 12:34 PM   #6
alikim
A Fallenroot Satyr
Join Date: Jul 2015
Posts: 27
That helped, thank you!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » How to pickup a mount to the cursor by ID?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off