Sadly right now I don't have much free time myself. I'll see what I can do though.
if (p.HasGump(typeof(ChatGump)))
{
CG = (ChatGump)p.FindGump(typeof(ChatGump));
CP = CG.PAGE;
if (CP == Page)
{
p.CloseGump(typeof(ChatGump));
p.SendGump(new ChatGump(p, CP));
}
}
if (p.HasGump(typeof(ChatGump) ))
{
CG = (ChatGump)p.FindGump(typeof(ChatGump));
CP = CG.PAGE;
if (CP == Page)
{
p.CloseGump(typeof(ChatGump));
p.SendGump(new ChatGump(p, CP));
}
else if ( CP != Page && p.AccessLevel >= AccessLevel.Counselor )
{
p.CloseGump(typeof(ChatGump));
p.SendGump( new ChatGump(p, (int)CHAN.STAFF));
}
}
Okay , found a way to do one of the things I wanted. Figured I would share.
Now if a Staff member types in staff tab then it will automatically set all online staff players tab to the Staff tab
In Chat.cs change
Code:if (p.HasGump(typeof(ChatGump))) { CG = (ChatGump)p.FindGump(typeof(ChatGump)); CP = CG.PAGE; if (CP == Page) { p.CloseGump(typeof(ChatGump)); p.SendGump(new ChatGump(p, CP)); } }
to
Code:if (p.HasGump(typeof(ChatGump) )) { CG = (ChatGump)p.FindGump(typeof(ChatGump)); CP = CG.PAGE; if (CP == Page) { p.CloseGump(typeof(ChatGump)); p.SendGump(new ChatGump(p, CP)); } else if ( CP != Page && p.AccessLevel >= AccessLevel.Counselor ) { p.CloseGump(typeof(ChatGump)); p.SendGump( new ChatGump(p, (int)CHAN.STAFF)); } }
Thanks Talow,Just want to let you know an unintended side effect of this would be that if your staffer was typing in another tap, it will close it, and then reopen on another tab, and the person will have to start what they where typing on the first tab all over again.
else
{
if (SETTINGS.Send_Message_As_SysMessage_If_Gump_Closed && CS.Messages.Count > 0)
p.SendMessage( "<WORLD> " + (CS.Messages[CS.Messages.Count - 1].MOBILE.RawName + " : " + CS.Messages[CS.Messages.Count - 1].MESSAGE));
}
That's the reason I included the reverse option, because with RunUO and UO's limitations, you can't auto scroll gumps =/Does anyone know a way that the tab can be recolored to a different color when a new message comes in , if that tab is not your current tab?
Also , when I set the Reverse to false , so that the newest is at bottom. It works but the chat box is scrolling back up to the top, so you really cant see what anyway is saying.
I like this idea, however to reduce potential lag, this is not currently a feature that is available, sorry.Does anyone know a way that the tab can be recolored to a different color when a new message comes in , if that tab is not your current tab?
Also , when I set the Reverse to false , so that the newest is at bottom. It works but the chat box is scrolling back up to the top, so you really cant see what anyway is saying.
-Removed [m as a default command prefix.
-Added option to disable the chat input box completely.
-Added option to disable the entire BoxerChat system.
-Fixed the chat messages when the gump is closed, it will not work for guild messages though, but it shouldn't display messages when it's not supposed to anymore.
Replace all files, if you want to keep your settings file add these lines:
C#:public static bool BoxerChat_Enabled = true; public static bool Chat_Input_Gump_Enabled = true;...
if ((CS.LastMessage == CHAN.STAFF) && (CS.Staff_Messages.Count > 0) && (p.AccessLevel == SETTINGS.Staff_Tab_Access_Level || p.AccessLevel > SETTINGS.Staff_Tab_Access_Level))
p.SendMessage(("<Staff Only> " + CS.Staff_Messages[CS.Staff_Messages.Count - 1].MOBILE.RawName + " : " + CS.Staff_Messages[CS.Staff_Messages.Count - 1].MESSAGE));
if(CS.LastMessage == CHAN.GUILD && CS.Guild_Messages.Count > 0 )
p.SendMessage(("<Guild Chat> " + CS.Guild_Messages[CS.Guild_Messages.Count - 1].MOBILE.RawName + " : " + CS.Guild_Messages[CS.Guild_Messages.Count - 1].MESSAGE));
-Fixed a mistake in the System Message part of the code.
-Guild messages are now displayed when the gump is closed as a System Message.
public static void On_Chat_Staff(CommandEventArgs e)
{
if (e.ArgString == null || e.ArgString == "")
{
if (SETTINGS.ONLINE_LIST_NO_TEXT)
e.Mobile.SendGump(new OnlineGump(e.Mobile));
return;
}
Mobile Chatter = e.Mobile;
string Message = e.ArgString.Trim();
Init CS = Init.Chat_Server;
CS.LastMessage = CHAN.STAFF;
AddMessage(CS.Staff_Messages, Chatter, Message, 3);
if (SETTINGS.SendGumpOnChat)
{
SendGump((int)CHAN.STAFF, Chatter); //Send the chatter the gump if it is closed
}
}
public static void On_Chat_World(CommandEventArgs e)
{
if (e.ArgString == null || e.ArgString == "")
{
if (SETTINGS.ONLINE_LIST_NO_TEXT)
e.Mobile.SendGump(new OnlineGump(e.Mobile));
return;
}
Mobile Chatter = e.Mobile;
string Message = e.ArgString.Trim();
Init CS = Init.Chat_Server;
CS.LastMessage = CHAN.WORLD;
AddMessage(CS.Messages, Chatter, Message, 1);
if (SETTINGS.SendGumpOnChat)
{
SendGump((int)CHAN.WORLD, Chatter); //Send the chatter the gump if it is closed
}
}
public static void On_Chat_Guild(CommandEventArgs e)
{
if (e.ArgString == null || e.ArgString == "")
{
if (SETTINGS.ONLINE_LIST_NO_TEXT)
e.Mobile.SendGump(new OnlineGump(e.Mobile));
return;
}
Mobile Chatter = e.Mobile;
if (Init.Show_For_Guild(Chatter))
{
string Message = e.ArgString.Trim();
Init CS = Init.Chat_Server;
CS.LastMessage = CHAN.GUILD;
AddMessage(CS.Guild_Messages, Chatter, Message, 2);
if (SETTINGS.SendGumpOnChat)
{
SendGump((int)CHAN.GUILD, Chatter); //Send the chatter the gump if it is closed
}
}
}
public static bool Chat_Input_Gump_Enabled = false; //Enable or disable the chat input gump(Not the chat gump itself, the mini chat box under it)
public static bool REVERSE_MESSAGES = true;//Display newest messages at the top of the box if true
public static bool Color_Names = true; //Color names based on the colors set below?
public static bool Enable_World_Tab = true; //Enable the world tab?
public static bool Enable_Guild_Tab = true; //Enable the guild tab?
public static bool Enable_Staff_Tab = true; //Enable the staff tab?
public static bool Open_On_Login = true; //Open the chat dialog on login?
public static bool Disable_Guild_When_Not_In_Guild = true; //Disable the guild for players not in a guild
public static bool SendGumpOnChat = true; //Disable the auto send of a gump when a chat sent
case 1004:
{
if (p.HasGump(typeof(ChatGump)))
p.CloseGump(typeof(ChatGump));
if (p.HasGump(typeof(ChatBox)))
p.CloseGump(typeof(ChatBox));
if (p.HasGump(typeof(MinChatGump)))
p.CloseGump(typeof(MinChatGump));
p.SendGump(new MinChatGump(p, CHANPAGE));
break;