RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[RunUO 2.0 RC1] Knives' Chat 3.0

greywolf79

Sorceror
GREAT SCRIPT!!! I love this script package. I was able to install it into RunUO 2.0 RC1 without any trouble and did the same in SVN 238. It is an awesome set too, thanks for making it.

GreyWolf.
 

nadious

Sorceror
Thanks, KmWill. That seemed the do it! That will make a HUGE difference on our shard in helping to keep characters independent from 'players.'

I do have another, question... recent I've added the IRC support and we have our own IRC server up and running. The system runs great and is configured to work properly... though, ever since I have activated the IRC function, I get the following message on my console window when I start up the server:

'Length cannot be less than zero.
Parameter name: length'

This appears three times. This only started to happen when I activated the IRC function of the chat script. Any ideas on what could be causing this?
 

jehatt

Wanderer
There is a big problem on [g command. I use chat system for 2 months on my server but when my online users become 150 I recognize that [g command make so much lag. When any player uses [guildchat command cpu usage become 100%. So when cpu usage become %100 server freezes..
As a result how can we solve this problem.
 

kmwill23

Sorceror
nadious;710877 said:
Thanks, KmWill. That seemed the do it! That will make a HUGE difference on our shard in helping to keep characters independent from 'players.'

I do have another, question... recent I've added the IRC support and we have our own IRC server up and running. The system runs great and is configured to work properly... though, ever since I have activated the IRC function, I get the following message on my console window when I start up the server:

'Length cannot be less than zero.
Parameter name: length'

This appears three times. This only started to happen when I activated the IRC function of the chat script. Any ideas on what could be causing this?

I believe the patch fixes the less than zero bug! I know it did for one server anyhow =)
 

kmwill23

Sorceror
jehatt;711215 said:
There is a big problem on [g command. I use chat system for 2 months on my server but when my online users become 150 I recognize that [g command make so much lag. When any player uses [guildchat command cpu usage become 100%. So when cpu usage become %100 server freezes..
As a result how can we solve this problem.

Hhhhmmm... there is nothing really different happening in the guild chat over regular chat. The system is also being run on multiple 300+ user servers, without this being reported.

You mentioned [guildchat. Did you change the command name to that?
 

nadious

Sorceror
kmwill,

Patch didn't fix it. :( Still, it's not a big issue. I was just curious if there was a way to fix it that you knew of, but until then... don't worry too much about it. The system works just fine even with the message.

I do have (yet another...) question. Now, I do realize what I'm about to post is not your script, but I was curious if you could look at it and see what I could change in it to make it work WITH your system. What it does is announce when players log in and log out. Simple little script and my players love it!

What I would like it to, is to send the broadcast messages to the PUBLIC chat channel, so the users that are in the IRC server will be able to tell when characters log on and log off. We have players that like to chat with other players in game (while they are just on the IRC server) and this would help them keep track of who joins the game and who leaves while they are in the chat channel.

Here's the script in question: (Which is a great script, btw...)

Code:
/*Login/logout broadcasting
 * Author: mordero
 * Email: [email protected]
 * Description: Will broadcast to current players when someone else has logged in/out. If the person who has logged in/out is above a certain access level, just broadcasts to the staff.
 * Install: Just drag it into your custom script folder.
 */
using System;
using System.Text;
using Server;
using Server.Commands;

namespace mordero.Custom
{
    class Broadcast
    {
        //{0} is the name of the player
        private readonly static string m_LoginMessage = "{0} has entered the world! ";//logging in
        private readonly static string m_LogoutMessage = "{0} has left the world.";//logging out
        private readonly static int m_LoginHue = 1153;//logging in hue
        private readonly static int m_LogoutHue = 1153;//logging out hue
        //maximum access level to announce
        private static AccessLevel m_AnnounceLevel = AccessLevel.Player;
        /// <summary>
        /// Subscribes to the login and out event
        /// </summary>
        public static void Initialize()
        {
            EventSink.Login += new LoginEventHandler(EventSink_Login);
            EventSink.Logout += new LogoutEventHandler(EventSink_Logout);
        }
        /// <summary>
        /// On player logout, broadcast a message.
        /// </summary>
        public static void EventSink_Logout(LogoutEventArgs e)
        {
            if (e.Mobile.Player)
            {
                if (e.Mobile.AccessLevel <= m_AnnounceLevel)
                    CommandHandlers.BroadcastMessage(AccessLevel.Player, m_LogoutHue, String.Format(m_LogoutMessage, e.Mobile.Name));
                else //broadcast any other level to the staff
                    CommandHandlers.BroadcastMessage(AccessLevel.Counselor, m_LogoutHue, String.Format(m_LogoutMessage, e.Mobile.Name));
            }
        }
        /// <summary>
        /// On player login, broadcast a message.
        /// </summary>
        public static void EventSink_Login(LoginEventArgs e)
        {
            if (e.Mobile.Player)
            {
                if (e.Mobile.AccessLevel <= m_AnnounceLevel)
                    CommandHandlers.BroadcastMessage(AccessLevel.Player, m_LoginHue, String.Format(m_LoginMessage, e.Mobile.Name));
                else //broadcast any other level to the staff
                    CommandHandlers.BroadcastMessage(AccessLevel.Counselor, m_LoginHue, String.Format(m_LoginMessage, e.Mobile.Name));
            }
        }
    }
}

Is is possible to do what I want to do with this script and your system?

As always, thanks for all your help.
 

koluch

Sorceror
Crash :(

Server Crash Report
===================
RunUO Version 2.0, Build 2814.25355
Operating System: Microsoft Windows NT 5.2.3790 Service Pack 2
.NET Framework: 2.0.50727.832
Time: 10/1/2007 5:54:32 PM
Mobiles: 15821
Items: 138730
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Knives.Chat3.ListGump10.BuildTabs(Int32 width, Int32 y) in c:\SERVER 237\Scripts\Customs\Knives Chat 3.0 Beta 9\Gumps\1.0 Skin\ListGump10.cs:line 240
at Knives.Chat3.ListGump10.BuildGump() in c:\SERVER 237\Scripts\Customs\Knives Chat 3.0 Beta 9\Gumps\1.0 Skin\ListGump10.cs:line 234
at Knives.Chat3.GumpPlus.NewGump(Boolean clear) in c:\SERVER 237\Scripts\Customs\Knives Chat 3.0 Beta 9\Gumps\Gumps Plus\GumpPlus.cs:line 65
at Knives.Chat3.GumpPlus.NewGump() in c:\SERVER 237\Scripts\Customs\Knives Chat 3.0 Beta 9\Gumps\Gumps Plus\GumpPlus.cs:line 57
at Server.Timer.DelayCallTimer.OnTick()
at Server.Timer.Slice()
at Server.Core.Main(String[] args)

Using svn 237.
Any idea howI can correct this, we have used your chat versions from the get go :]

Koluch
 

nadious

Sorceror
Koluch,

Did you try the patch on the first post? In the zip file, it states that it was a patch that helped fix a crash when the 1.0 skin was used. I just looked at your log and saw it was a crash with 1.0... figured I'd point that out in case you might have missed it before.

Just a suggestion (if you haven't already tried that.)
 

Karmageddon

Sorceror
I know that Chat and Pms can be logged with this system. But, is there a way to log world and party chat with this.

I know as an admin or higher you can see world and party chat, so there has to be a way to log it. I'm just not seeing anything where I can do this.
 

Manu

Knight
I think not. But there is a script in here somewhere that allows logging of pretty much EVERYTHING, just can't remember the damn name...
 

kmwill23

Sorceror
Look at that, I go away for a bit and everyone else helps =) Yeah, I'm on the downside of UO atm, finally started working again after an almost 4 year break. Damn taxes...
 

qwerty84

Sorceror
Warnings resolved:

comment line 24 in Knives Chat 3.0 Beta 9\General\MultiConnection.cs
Code:
[SIZE=2]//private Server.Timer c_ConnectTimer;[/SIZE]

uncomment line 68 in Knives Chat 3.0 Beta 9\General\MultiConnection.cs
Code:
Console.WriteLine(e.Message);

line 137
Code:
Console.WriteLine(e.Message);

line 168
Code:
Console.WriteLine(e.Message);

line 187
Code:
Console.WriteLine(e.Message);

line 259
Code:
Console.WriteLine(e.Message);

Modify Knives Chat 3.0 Beta 9\Gumps\Error Reporting\

remove:
Code:
using System.Web.Mail;

insert
Code:
using System.Net.Mail;

remove:
Code:
        private static void SendEmail()
        {
            string txt = s_Error;
            Exception e = s_Exception;
 
            try
            {
                MailMessage mail = new MailMessage();
                mail.To = "[email protected]";
                mail.From = Server.Misc.ServerList.ServerName;
                mail.Subject = "Automated Chat Error Report";
                mail.Body = Server.Misc.ServerList.ServerName + " \r \r " + txt + " \r \r " + e.Message + " \r \r " + e.Source + " \r \r " + e.StackTrace;
                string schema = "http://schemas.microsoft.com/cdo/configuration/";
                mail.Fields.Add(schema + "smtpserverport", "465");
                mail.Fields.Add(schema + "smtpusessl", "true");
                mail.Fields[schema + "smtpauthenticate"] = "1";
                mail.Fields[schema + "sendusername"] = "[email protected]";
                mail.Fields[schema + "sendpassword"] = "openmail";
                SmtpMail.SmtpServer = "smtp.gmail.com";
                SmtpMail.Send(mail);
            }
            catch(Exception ex)
            {
                Console.WriteLine("Email failed to send.");
                Console.WriteLine(ex.Message);
                Console.WriteLine(ex.Source);
                Console.WriteLine(ex.StackTrace);
            }
        }

insert
Code:
        private static void SendEmail()
        {
            string txt = s_Error;
            Exception e = s_Exception;
 
            try
            {
                MailAddress from = new MailAddress("----Necesity----", "Exception");
                MailAddress to = new MailAddress("----Necesity----", "Bug Reporter");
                MailMessage mail = new MailMessage(from, to);
                mail.Subject = "Automated Chat Error Report";
                mail.Body = Server.Misc.ServerList.ServerName + " \r \r " + txt + " \r \r " + e.Message + " \r \r " + e.Source + " \r \r " + e.StackTrace;
                SmtpClient client = new SmtpClient("----Necesity----");
                Console.WriteLine("Sending an e-mail message to {0} by using SMTP host {1} port {2}.", to.ToString(), client.Host, client.Port);
                client.Send(mail);
            }
            catch(Exception ex)
            {
                Console.WriteLine("Email failed to send.");
                Console.WriteLine(ex.Message);
                Console.WriteLine(ex.Source);
                Console.WriteLine(ex.StackTrace);
            }
        }

tried and it works
 

Goov Maeloc

Wanderer
When my players try the alliance chat, it works as a guild chat. Only players in the same guild can read it.

Is there any way to fix it? Thanks in advance :)
 

LordHogFred

Knight
Ooer, I just ran into a strange error.
Whenever I try to set my PM sound and press the play button I get the following error:
Code:
Play Sound gump name triggered an error.
Collection was modified; enumeration operation may not execute.
mscorlib
   at System.Collections.Hashtable.HashtableEnumerator.MoveNext()
   at Knives.Chat3.Data.set_DefaultSound(Int32 value)
   at Knives.Chat3.MailGump.PlaySound()
   at Knives.Chat3.ButtonPlus.Invoke()
   at Knives.Chat3.GumpPlus.OnResponse(NetState state, RelayInfo info)

Any ideas :confused:
 
Top