1. #1
    Legendary! FuxieDK's Avatar
    Join Date
    Apr 2012
    Location
    København
    Posts
    6,876

    Question Random Hearthstone macro

    I have this macro
    Code:
    #showtooltip Fire Eater's Hearthstone
    /run local f,t=RnT or CreateFrame("Button","RnT",nil,"SecureActionButtonTemplate") f:SetAttribute("type","item") t=GetItemInfo(C_ToyBox.GetToyFromIndex(random(9))) f:SetAttribute("item",t) print("Cast:",t)
    /click RnT
    I have 9 different HS marked as faveorite, and clicking my macro selecte one of them (by random), prints "Cast: <name of HS>" and starts casting it...
    So far, so good...


    However.... After I login, each and every time I use the macro is says "Cast: nil" and do nothing..... until I open my Toy Box, the it works as expected until I log out and back in...

    Is there any way around this mandatory opening of Toy Box?
    Fact (because I say so): TBC > Cata > Legion > MoP > BfA > WoD = WotLK

    My pet collection --> http://www.warcraftpets.com/collection/FuxieDK/

  2. #2
    /script LoadAddOn("Blizzard_Collections")

  3. #3
    For items, you can actually do the following:

    /castrandom item:ID, item:ID, item:ID

    For example, the default hearthstone is item:6948 and innkeeper's daughter is item:64488.
    Last edited by Kanegasi; 2019-11-07 at 05:52 AM.


    addons
    weakauras
    Lua Wall of Shame
    Originally Posted by Zarhym (Blue Tracker)
    this thread is a waste of internet

  4. #4
    Legendary! FuxieDK's Avatar
    Join Date
    Apr 2012
    Location
    København
    Posts
    6,876
    Quote Originally Posted by d87 View Post
    /script LoadAddOn("Blizzard_Collections")
    Is that a one time use, or does it need to be run, every time I log in?
    Quote Originally Posted by Kanegasi View Post
    For items, you can actually do the following:

    /castrandom item:ID, item:ID, item:ID

    For example, the default hearthstone is item:6948 and innkeeper's daughter is item:64488.
    But the different HSs are not items, they are toys; does it still work?
    Fact (because I say so): TBC > Cata > Legion > MoP > BfA > WoD = WotLK

    My pet collection --> http://www.warcraftpets.com/collection/FuxieDK/

  5. #5
    Yes, it works.

    But keep in mind that if you interrupt the casting, when you cast it again it will use the same toy, until you reload the interface.
    Last edited by George; 2019-11-07 at 06:58 AM.

  6. #6
    Toys are items. The toy box is a "fake" bag. When you get a toy and "learn" it, the item is attached to you.


    addons
    weakauras
    Lua Wall of Shame
    Originally Posted by Zarhym (Blue Tracker)
    this thread is a waste of internet

  7. #7
    Quote Originally Posted by Kanegasi View Post
    For items, you can actually do the following:

    /castrandom item:ID, item:ID, item:ID

    For example, the default hearthstone is item:6948 and innkeeper's daughter is item:64488.
    This worked fine for the new Eternal Traveler's Hearthstone for me, but did not work at all for my Holographic Digitalization Hearthstone or Tome of Town Portal. Any time I tried to use the macro with other hearthstones added it would only cast the Eternal Traveler's for me and after removing it would not cast either of the other two at all.

  8. #8
    Indeed, Tome of Town portal doesn't work with /castrandom.

    You only got Eternal Traveler because you didn't let it finish the cast. Let it finish the cast or reload the UI for a chance to get a different one.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •