January 15, 20188 yr 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!
January 15, 20188 yr Author 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
Create an account or sign in to comment