Can this be automated? - WoWInterface
Thread Tools Display Modes
06-24-21, 03:11 AM   #1
A Deviate Faerie Dragon
Join Date: Apr 2021
Posts: 15
Can this be automated?

I need an addon that will select the first option to recruit more troops. Am I allowed to automate that with an addon?
  Reply With Quote
06-24-21, 06:10 AM   #2
nUI Maintainer
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,651
Others may know for sure one way or another .. but I would suspect that it wouldn't be allowed as any action needs a hardware event .. so if you were to have that autoclicked it would mean clicking the mouse or pressing the keyboard .. which is the same as selecting the item in question and thus may as well leave it as is. But like I said, others may know with a better level of knowledge on the subject.
  Reply With Quote
06-24-21, 03:20 PM   #3
A Molten Giant
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 602
Lua Code:
  1. local f=CreateFrame("frame")
  2. f:RegisterEvent("GOSSIP_SHOW")
  3. f:SetScript("OnEvent",function()
  5.     -- get the npc id from its guid
  6.     local _,_,_,_,_,npc=strsplit("-",(UnitGUID("npc")) or "")
  8.     -- its a string because it just came from a string
  9.     if npc=="135614" then -- wowhead.com/npc=135614
  11.         -- first argument is the ordered number of the gossip window
  12.         -- in this case, 2 would select "stay awhile and listen"
  13.         -- second argument is when a gossip option pops up a box
  14.         -- that needs input, currently only used to interact with
  15.         -- the Tyrael's Hilt npc or Landro Longshot
  16.         -- third argument skips any possible confirmation dialog
  17.         -- that the gossip option may generate
  18.         C_GossipInfo.SelectOption(1,"",true)
  20.     end
  21. end)
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Can this be automated?

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