#Auto follow WA broke with DF. Need a fix.

57 messages · Page 1 of 1 (latest)

obsidian goblet
#

I do not understand what you want.

jaunty hazel
#

!scanevents You could listen for a custom event fired from a macro, E.g. /run WeakAuras.ScanEvents("MY_CUSTOM_FOLLOW_EVENT") and run FollowUnit(aura_env.targetUnit) there. Then the previous code you had would just set targetUnit based on the whisper message. For prompting the user you could just display the aura for a period of time when you receieve a relative chat message pepeShrug

dusky creek
#

I also don't know what you're looking for (unless you're just making a request for someone to make you a weak aura, in which case IDK if that's something we do here)

Additionally:

cause now following REQUIRES hardware input.
I can't find info on this, do you have a source?

jaunty hazel
#

That part is correct, from testing it on beta right now

dusky creek
#

So /follow doesn't work?

#

wild

jaunty hazel
#

That does, because triggering a chat message manually counts as a hardware event since you have to press a button

#

Wouldn't work if you tried to fire /follow programmatically without a HW event though

dusky creek
#

ty for the info 🙂

sterile marsh
#

But yeah if you're willing to do it, I am asking to modify the weakaura to make it funcion as I designed it, as I am not able to code it properly I'm afraid

#

But if that's against the rules of the discord to ask, I didn't know it

dusky creek
#

I don't think it is against the rules, I checked and if it's in #server-rules then I missed it. I can't make promises but later I might be able to do something.

That being said, I do recommend that you try to learn how to make this weak aura. I think you might be surprised how easy you can accomplish something like this, and I don't know if you even need code.

#

If you wanted a text aura that just did that, you could use a trigger that looks for chat messages, and then if it finds it, display the text. No code needed. If you needed additional functionality then it gets a bit trickier depending on need

sterile marsh
#

Ah sorry, I might have been misleading in explaining how I want it to work

#

The weakaura shoudn't just alert you that someone typed the follow/stop follow message in chat. The " alert " message isn't supposed to be just a message. The weakaura should alert you and then listen to your button presses. Pressing a pre-set button ( for example the key A ) would then make your toon follow or stop follow

#

Now you might ask why, if I have to press a button in any case, I don't just use a macro for that and get rid of the weakaura all together, and here's the reason why not:

I would need multiple macroes to press ( one to follow one to stop follow, the latter of which doesn't exist btw ) and I'd have to set each macro to a different key
Instead, with this I can do all of it with one key

#

( btw yes if it was just a text to display I could have figured it out by myself probably :< )

jaunty hazel
sterile marsh
#

you say override because I used A as an example, and A is already used in wow by default?

#

I might just use a key that is not used in wow

#

R for example does nothing

#

What is clickable territory btw? X

#

*XD

jaunty hazel
#

!clickable

brazen meteorBOT
jaunty hazel
#

If you don'tneed to dynamically override a keybind, just use a macro like I said before

dusky creek
#

You could use a macro like this I think:

/target @mouseover
/follow
/targetlasttarget

when the WA pops, mouse over your target and hit it. When you would want to stop, mouse over yourself and hit it. I think this would work based on the face that you're calling FollowUnit("player") which makes me think if you typed /follow targeting yourself, you'd stop following.

sterile marsh
#

So a weak aura can't work as I designed it?

sterile marsh
jaunty hazel
sterile marsh
#

I am trying to understand your solution. So I make a macro that triggers an event, and the character that has to say follow or stop follow will instead press that macro, to make my weakaura react to it?

#

but it still woudn't change the fact that on my side, follow can't be procced automatically

jaunty hazel
#

No, the other player will send a chat message like before, which will set the target to follow. But you can use the macro to trigger the follow action on that target (without having to target/mouseover them manually).

#

So, yes it will still require a hardware event on your client

sterile marsh
#

so using that macro simply follows who wrote the message

#

(?)

#

if yes, and that macro can also stop following ( which I think can do ) then we have a solution

jaunty hazel
#
function(event, message, sender, ...)
  if event == "CHAT_MSG" then -- Or w/e event you're firing on
    local name = Ambiguate(sender, 'short')
    local allowed_users = aura_env.config.allowed_users
    
    if strlen(allowed_users)>0 then
        if not tContains({strsplit(",", allowed_users)}, name) then
            return
        end
    end
    
    -- In the CHAT_MSG handler, we set an aura variable to remember the unit. Since we can't fire FollowUnit directly.
    if message == aura_env.config.command_follow then
        aura_env.unit = name
    elseif message == aura_env.config.command_stop then
        aura_env.unit = "player"
    end
  elseif event == "MY_CUSTOM_FOLLOW_EVENT" then -- This is what you call int the macro, just name it something appropriate.
    FollowUnit(aura_env.unit)
  end
end
#

And your macro looks like ```
/run WeakAuras.ScanEvents("MY_CUSTOM_FOLLOW_EVENT")

sterile marsh
#

it seems it's not working, let me send a ss to check it's all okay

sterile marsh
#

I got told that followunit can now only be called by blizzard functionality

#

any way to confirm that?

#

cause it could explain why the WA doesn't work I guess(?)

sterile marsh
#

From the topic I linked in the wow forums.
That's basically what I want to achieve. Listening to the chat say event and then firing follow with a key press

#

Any way to convert the code written by this guy to work with FollowUnit?

normal wave
#

It's basically running, what blizzard calls, a secure code. Not sure you can do that in WAs.

jaunty hazel
#

It's not secure code, it just only works when the code has been fired from a hardware event. Problem here is WA is sending a fake event on options close for the macro event that's causing it to try and call FollowUnit. You can change that behaviour so it instead seems a STATUS event in the information tab

sterile marsh
#

wait so this is why the weakaura you made yday isn't working? I have to un-tick the STATUS thingy in the information tab?

jaunty hazel
#

Yea, that's at least one problem. I also might have mistyped something but this option should be unticked at least:

sterile marsh
#

Yeah okay I have unticket it, but it's still not functioning

#

Maybe there's something else wrong in the code. But if it is, it's weird. Because weakaura per se isn't finding any.

candid fox
#

But you have bugsack right?

sterile marsh
#

Yeah, it's not finding any errors tho