Losmy 1 Posted January 15, 2018 Share Posted January 15, 2018 Hi I'm using Party Chat commands which reads party chat and does lua/c++ commands accordingly, this is very usefull for when im running my 5 man bot group but I've got a problem where it can only read chat from party members and not the party leader. This is the code where it reads the chat while (chat.ActuelRead != Channel.GetMsgActuelInWow && Products.IsStarted) { var msg = chat.ReadMsg(); if (!string.IsNullOrWhiteSpace(msg.Msg) && ((int)msg.Channel == 49 || msg.Channel == ChatTypeId.PARTY)) { foreach (var c in PartyChatCommandSettings.CurrentSetting.Commands) { if (c.IsValid() && string.Equals(c.CommandChat.Trim(), msg.Msg.Trim(), StringComparison.CurrentCultureIgnoreCase)) { c.Run(); break; } } } } If i change leader then the leader won't be able to litsen to the commands anymore. I need my bots being able to litsen to the leader because that's where I have all the logic for queuing and joining dungeons. Thanks in advance! Link to comment https://wrobot.eu/forums/topic/8274-party-leader-channel-id/ Share on other sites More sharing options...
Losmy 1 Posted January 15, 2018 Author Share Posted January 15, 2018 I fixed this problem by adding Logging.Write("Channel = " + ((int)msg.Channel) + " (message: " + msg.Msg + ")"); just above var msg = chat.ReadMsg(); in the party chat .cs script and I read in the log what ID the channel had. I found that the party leader had channel 51 insted of normal party which was 2. This could be different in any privaate server so do this check if party leader does not work Link to comment https://wrobot.eu/forums/topic/8274-party-leader-channel-id/#findComment-37760 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