Weer36 3 Posted July 20, 2022 Share Posted July 20, 2022 How to read message text in EventsLua.AttachEventLua("CHAT_MSG_SYSTEM", () => {})? Chat.Messages.Count is zero. Link to comment https://wrobot.eu/forums/topic/14660-chat_msg_system/ Share on other sites More sharing options...
RandomVer 0 Posted July 20, 2022 Share Posted July 20, 2022 using robotManager.Helpful; using System; using System.Collections.Generic; using wManager.Plugin; using wManager.Wow.Helpers; public class Main : IPlugin { public void Initialize() { EventsLuaWithArgs.OnEventsLuaStringWithArgs += ChatEvent; } public void Dispose() { EventsLuaWithArgs.OnEventsLuaStringWithArgs -= ChatEvent; } public void Settings() { throw new NotImplementedException(); } private static void ChatEvent(String EventName, List<String> Args) { if(EventName.ToString() == "CHAT_MSG_SYSTEM") { for (int i = 0; i < Args.Count -1; i++) { Logging.WriteDebug($"Args{i} = {Args[i].ToString()}"); } } } } try this. Main.cs Link to comment https://wrobot.eu/forums/topic/14660-chat_msg_system/#findComment-66289 Share on other sites More sharing options...
Weer36 3 Posted July 21, 2022 Author Share Posted July 21, 2022 tyvm! btw, EventsLuaWithArgs.OnEventsLuaStringWithArgs += ChatEvent; can't work, but EventsLuaWithArgs.OnEventsLuaStringWithArgs += (e, a) => {}; with same procedure code works fine. I'm confuzed ) Link to comment https://wrobot.eu/forums/topic/14660-chat_msg_system/#findComment-66301 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now