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

kmwill23

Sorceror
Not a bug really =)

The Show Staff setting is for individual channels. If it were a gobal setting then adding to the online count would make sense. I think an option to show the staff in the online count would make more sense.
 

Jarrod

Sorceror
THE !SEEN COMMAND WAS LAST UPDATED: 03-23-2007, 12:01 PM

heres the first small plug-in for IRC commands:

in IrcConnection.cs:

at the top add:

using Server.Accounting;
using Server.Mobiles;
using System.Collections.Generic;

and then further down, under this:
Code:
if (str.ToLower().IndexOf("!status") != -1 && c_NextStatus < DateTime.Now)
                    {
                        c_NextStatus = DateTime.Now + TimeSpan.FromSeconds(15);
                        s_Connection.SendMessage(String.Format("PRIVMSG {0} : {1}", Data.IrcRoom, Status));
                        BroadcastSystem(Status);
                    }

add this

Code:
		            if (str.ToLower().IndexOf("!seen") != -1 && c_NextStatus < DateTime.Now)
		            {
					string s1 = str;
					int s2 = str.ToLower().IndexOf("!seen")+6;
					int checklength = s1.Length - s2; 
					int found = 0;
					int found2 = 0;
					if (checklength > 0) //catch invalid values
					{
						s1 = s1.Substring(s2, checklength); //everything after "!seen_" is who they are looking for
						c_NextStatus = DateTime.Now + TimeSpan.FromSeconds(15);
						//now look for s1 online
						List<NetState> states = NetState.Instances;
						for (int i = 0; i < states.Count; ++i )
						{
							Mobile m = states[i].Mobile;
							if (m !=null)
								if (m.Name.ToLower() == s1.ToLower())
									found = 1;
						}
						//------------
						if (found > 0) //ok it was found online. return the results
							s_Connection.SendMessage(String.Format("PRIVMSG {0} : {1}{2}", Data.IrcRoom, s1, " is currently in-game." ));
						else //it wasnt found online. Is it a player at all??
						{
							List<Mobile> mobs = new List<Mobile>( World.Mobiles.Values );
							foreach ( Mobile m in mobs ) //lets look through the mobs list
							{
								if ( m is PlayerMobile ) //is it a player?
								{
									if (m.Name.ToLower() == s1.ToLower())
									{
										Account acct = m.Account as Account;
										found2 = 1; //a player with that name was found. Return the last logged in date and time.
										s_Connection.SendMessage(String.Format("PRIVMSG {0} : {1}{2}{3}{4}", Data.IrcRoom, s1, " was last seen on: ", acct.LastLogin, " (GMT+1 Server Local Time)" ));	
									}
								}
							}
							if ((found == 0) && (found2 == 0)) //a character with that name was not found in the mobiles list. It does not exist on this shard.
								s_Connection.SendMessage(String.Format("PRIVMSG {0} : {1}{2}{3}",  Data.IrcRoom, "The name: ", s1, " is not being used by any players registered at Aeternum." ));	
						}
						//------------
					}
					else // no name was given, or an invalid name was given.
						s_Connection.SendMessage(String.Format("PRIVMSG {0} : {1}", Data.IrcRoom, "You have specified an invalid name. " ));
				}

now when you type !seen PlayerX in the IRC Channel, you will get one of three results:
PlayerX is currently in-game.
PlayerX was last seen on DATE TIME (GMT+1 Server Local Time) //make sure to change this to your time zone
The name: PlayerX is not being used by any players registered at Aeternum. //change Aeternum to your shard name

and if you just type !seen it will let you know the name is invalid

I will be updating this until it is added to the main script ;)
 

narcof

Wanderer
Hidden Players

Hi Knives

We've been using the system on our shard since day one, with virtually no issues except one that players are starting to nag me about - its that when players set their status to 'Hidden' they are still visible in the Public List - their colour changes and status is shown as 'Hidden' but whilst their online they still show amongst the online players and therefore can be identified as online by other players. (attached pic shows what I mean!)

I've looked at trying to get a fix in this, its something that's carried over since I can remember and is still in Beta 9. Any ideas?

Many thanks as always
Narcof
 

Attachments

  • chatimage.bmp
    317.3 KB · Views: 88

artio

Wanderer
Does this new ListGump.cs replace the ListGump10.cs? or is it in addition to? nevermind i found i didnt look well enough :)

and erica i looked in the docs i have and it says
Summary:

Version 3.0 Beta 9
Supports RunUO 2.0 RC1, RunUO 1.0 Final

*** This version may work with the current RunUO 2.0 SVN, and this may change as the SVN changes. Please report this to me, as I can add patches to allow functionality.
:)
Thank you KMWILL23 your chat system kicks tushy!
 

narcof

Wanderer
kmwill23;667157 said:
My players reported it too =) Try this update out.

OK thanks for coming back so quick with this one, I ran it up on test shard - it's close - the hidden players now don't appear in amongst the online players, they appear in the list of offline players, however hidden players can still be identified by the fact that they'll jump to the head of the list above the alphanumeric players in the offline list as identified by the hidden player 'TestBunny' in the attached screenshot.
 

Attachments

  • chatimage2.bmp
    215.2 KB · Views: 69
P

PoolMan

Guest
Question on Filters:

Is there any way to filter things like ty, yw, cya ? With out it filtering out every word that ends in ty ? city comes out looking like ci**
 

yarex

Wanderer
RunUO Version 2.0, Build 2648.37241
Operating System: Microsoft Windows NT 5.2.3790 Service Pack 1
.NET Framework: 2.0.50727.42
Time: 4/7/2007 11:33:28 PM
Mobiles: 33208
Items: 348265
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Knives.Chat3.ListGump10.BuildTabs(Int32 width, Int32 y)
at Knives.Chat3.ListGump10.BuildGump()
at Knives.Chat3.GumpPlus.NewGump(Boolean clear)
at Knives.Chat3.GumpPlus.NewGump()
at Server.Timer.DelayCallTimer.OnTick() in E:\projects\runuo2.0\new\Timer.cs:line 660
at Server.Timer.Slice() in E:\projects\runuo2.0\new\Timer.cs:line 499
at Server.Core.Main(String[] args) in E:\projects\runuo2.0\new\Main.cs:line 450
 
IRC crash

I'm experiencing a problem where no matter what character I'm on, if I use [i the server crashes and reboots. The thing is, if I use [c before using [i it works fine :confused:

Here is the log:
Server Crash Report
===================

RunUO Version 2.0, Build 2357.32527
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2
.NET Framework: 2.0.50727.42
Time: 4/23/2007 11:07:39 AM
Mobiles: 54
Items: 1622
Clients:
- Count: 1
+ (IP) (account) (mobile = 0x5 'Kalias')

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Knives.Chat3.ListGump10.BuildTabs(Int32 width, Int32 y)
at Knives.Chat3.ListGump10.BuildGump()
at Knives.Chat3.GumpPlus.NewGump(Boolean clear)
at Knives.Chat3.GumpPlus.NewGump()
at Server.Timer.DelayCallTimer.OnTick()
at Server.Timer.Slice()
at Server.Core.Main(String[] args)




Also, non-crash related, is there a way to change the color of the message upon logging in that displays your mail so it isnt yellow?

Many thanks
 

kmwill23

Sorceror
killsom3thing;676828 said:
I'm experiencing a problem where no matter what character I'm on, if I use [i the server crashes and reboots. The thing is, if I use [c before using [i it works fine :confused:

Here is the log:
Server Crash Report
===================

RunUO Version 2.0, Build 2357.32527
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 2
.NET Framework: 2.0.50727.42
Time: 4/23/2007 11:07:39 AM
Mobiles: 54
Items: 1622
Clients:
- Count: 1
+ (IP) (account) (mobile = 0x5 'Kalias')

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Knives.Chat3.ListGump10.BuildTabs(Int32 width, Int32 y)
at Knives.Chat3.ListGump10.BuildGump()
at Knives.Chat3.GumpPlus.NewGump(Boolean clear)
at Knives.Chat3.GumpPlus.NewGump()
at Server.Timer.DelayCallTimer.OnTick()
at Server.Timer.Slice()
at Server.Core.Main(String[] args)




Also, non-crash related, is there a way to change the color of the message upon logging in that displays your mail so it isnt yellow?

Many thanks

Try this updated file and let me know!

And, you can change that text color with the System Color setting in your chat settings.
 

Attachments

  • ListGump10.cs
    47.6 KB · Views: 71
Thanks for the updated file it works great :)
and I see what you meant with the system color, but is there a way to overide the text colors (in chat and system) for everyone?
 

qwerty84

Sorceror
Code:
 + Custom/Chat 3.0 Beta 9/General/MultiConnection.cs:
    CS0168: Line 65: The variable 'e' is declared but never used
    CS0168: Line 134: The variable 'e' is declared but never used
    CS0168: Line 165: The variable 'e' is declared but never used
    CS0168: Line 184: The variable 'e' is declared but never used
    CS0168: Line 201: The variable 'e' is declared but never used
    CS0168: Line 252: The variable 'e' is declared but never used
 + Custom/Chat 3.0 Beta 9/Gumps/Error Reporting/Errors.cs:
    CS0618: Line 91: 'System.Web.Mail.MailMessage' is obsolete: 'The recommended alternative is System.Net.Mail.MailMessage. http://go.microsoft.com/fwlink/?linkid=14202'
    CS0618: Line 91: 'System.Web.Mail.MailMessage' is obsolete: 'The recommended alternative is System.Net.Mail.MailMessage. http://go.microsoft.com/fwlink/?linkid=14202'
    CS0618: Line 102: 'System.Web.Mail.SmtpMail' is obsolete: 'The recommended alternative is System.Net.Mail.SmtpClient. http://go.microsoft.com/fwlink/?linkid=14202'
 

kmwill23

Sorceror
qwerty84;677149 said:
Code:
 + Custom/Chat 3.0 Beta 9/General/MultiConnection.cs:
    CS0168: Line 65: The variable 'e' is declared but never used
    CS0168: Line 134: The variable 'e' is declared but never used
    CS0168: Line 165: The variable 'e' is declared but never used
    CS0168: Line 184: The variable 'e' is declared but never used
    CS0168: Line 201: The variable 'e' is declared but never used
    CS0168: Line 252: The variable 'e' is declared but never used
 + Custom/Chat 3.0 Beta 9/Gumps/Error Reporting/Errors.cs:
    CS0618: Line 91: 'System.Web.Mail.MailMessage' is obsolete: 'The recommended alternative is System.Net.Mail.MailMessage. http://go.microsoft.com/fwlink/?linkid=14202'
    CS0618: Line 91: 'System.Web.Mail.MailMessage' is obsolete: 'The recommended alternative is System.Net.Mail.MailMessage. http://go.microsoft.com/fwlink/?linkid=14202'
    CS0618: Line 102: 'System.Web.Mail.SmtpMail' is obsolete: 'The recommended alternative is System.Net.Mail.SmtpClient. http://go.microsoft.com/fwlink/?linkid=14202'

I am aware =)
 

kmwill23

Sorceror
killsom3thing;677138 said:
Thanks for the updated file it works great :)
and I see what you meant with the system color, but is there a way to overide the text colors (in chat and system) for everyone?

If you want you can go into the script file and change it there. You'll have to play around with colors. What I do is change the hue of an item in game to get the color I want.

The setting is in General.cs, search for this:

args.Mobile.SendMessage(Data.GetData(args.Mobile).SystemC, General.Local(258), Data.GetData(args.Mobile).Messages.Count, Data.MaxMsgs);

And replace Data.GetData(args.Mobile).SystemC with your hue number.
 
kmwill23;677209 said:
If you want you can go into the script file and change it there. You'll have to play around with colors. What I do is change the hue of an item in game to get the color I want.

The setting is in General.cs, search for this:

args.Mobile.SendMessage(Data.GetData(args.Mobile).SystemC, General.Local(258), Data.GetData(args.Mobile).Messages.Count, Data.MaxMsgs);

And replace Data.GetData(args.Mobile).SystemC with your hue number.

Great, thanks a bunch! I already have the id's I need :) I use the utility off of uostratics that allows me to see the hues.mul :)

Thanks again.
 

godfood

Sorceror
Hey Kmwill23,

I was wondering if there was a way to give configuration access to individual staffers, or if it's all handled on access level.
 
Top