Interesting, though this one has some issues. It's largely dependent on having active chatframes with the message event registered. If you have multiple chatframes with the same event registered, it will send duplicate replies for each one.
Lua Code:
local function AutoReply(event, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12)
if event == "CHAT_MSG_WHISPER" then
SendChatMessage("I'm busy", "WHISPER", nil, arg2)
end
end
ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER", AutoReply)
Originally Posted by ChatGPT
You can run this script by typing the command /run AutoReply() in the chat window, or by binding it to a macro.
|
This will do nothing as the callback function is expecting various arguments from a chat event that it isn't getting.
Originally Posted by ChatGPT
You can run this script by typing the command /run AutoReply() in the chat window, or by binding it to a macro.
You can run this script by typing the command /run CheckPowerInfusion() in the chat window, or by binding it to a macro.
|
Revisiting the second and also in the third prompt, these functions are defined as locals. You can't even access them with
/run.