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.
GreyWolf.
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?
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.
/*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));
}
}
}
}
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)
[SIZE=2]//private Server.Timer c_ConnectTimer;[/SIZE]
Console.WriteLine(e.Message);
Console.WriteLine(e.Message);
Console.WriteLine(e.Message);
Console.WriteLine(e.Message);
Console.WriteLine(e.Message);
using System.Web.Mail;
using System.Net.Mail;
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);
}
}
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);
}
}
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)