Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Releases

Custom Script Releases This forum is where you can release your custom scripts for other users to use.

Please note: By releasing your scripts here you are submitting them to the public and as such agree to make them public domain. The RunUO Team has made its software GPL for you to use and enjoy you should do the same for anything based off of RunUO.

Reply
 
Thread Tools Display Modes
Old 03-19-2007, 12:53 PM   #401 (permalink)
Forum Expert
 
kmwill23's Avatar
 
Join Date: Feb 2003
Location: Phoenix, Arizona
Age: 31
Posts: 1,118
Send a message via MSN to kmwill23
Default

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.
__________________
"Morality is a lonely path." - Me
kmwill23 is offline   Reply With Quote
Old 03-23-2007, 08:09 AM   #402 (permalink)
Forum Expert
 
Join Date: Oct 2002
Location: Germany (american though)
Age: 33
Posts: 957
Default

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
__________________
Aeternum Shard

Last edited by Jarrod; 03-23-2007 at 09:01 AM. Reason: expanded the functionality
Jarrod is offline   Reply With Quote
Old 03-26-2007, 09:11 AM   #403 (permalink)
Forum Newbie
 
narcof's Avatar
 
Join Date: Dec 2004
Location: Everywhere
Posts: 19
Default 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
Attached Images
File Type: bmp chatimage.bmp (317.3 KB, 65 views)
__________________
No Wife, No Horse, No Moustache...
narcof is offline   Reply With Quote
Old 03-26-2007, 11:37 AM   #404 (permalink)
Forum Expert
 
kmwill23's Avatar
 
Join Date: Feb 2003
Location: Phoenix, Arizona
Age: 31
Posts: 1,118
Send a message via MSN to kmwill23
Default

My players reported it too =) Try this update out.
Attached Files
File Type: cs ListGump.cs (44.5 KB, 36 views)
__________________
"Morality is a lonely path." - Me
kmwill23 is offline   Reply With Quote
Old 03-26-2007, 11:52 AM   #405 (permalink)
Forum Expert
 
Erica's Avatar
 
Join Date: Jan 2005
Location: Laramie Wyoming
Age: 43
Posts: 1,279
Send a message via ICQ to Erica Send a message via AIM to Erica Send a message via MSN to Erica Send a message via Yahoo to Erica Send a message via Skype™ to Erica
Default

Does this System work with RunUO 2.0 SVN 162.
__________________
Erica is offline   Reply With Quote
Old 03-26-2007, 12:01 PM   #406 (permalink)
Newbie
 
artio's Avatar
 
Join Date: Jun 2005
Posts: 87
Default

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
Quote:
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!

Last edited by artio; 03-26-2007 at 12:16 PM. Reason: figured it out :P
artio is offline   Reply With Quote
Old 03-26-2007, 04:02 PM   #407 (permalink)
Forum Newbie
 
narcof's Avatar
 
Join Date: Dec 2004
Location: Everywhere
Posts: 19
Default

Quote:
Originally Posted by kmwill23 View Post
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.
Attached Images
File Type: bmp chatimage2.bmp (215.2 KB, 52 views)
__________________
No Wife, No Horse, No Moustache...
narcof is offline   Reply With Quote
Old 03-27-2007, 02:15 AM   #408 (permalink)
Forum Expert
 
kmwill23's Avatar
 
Join Date: Feb 2003
Location: Phoenix, Arizona
Age: 31
Posts: 1,118
Send a message via MSN to kmwill23
Default

Hhhmmm, I'll go tinker some more than!
__________________
"Morality is a lonely path." - Me
kmwill23 is offline   Reply With Quote
Old 04-08-2007, 03:59 PM   #409 (permalink)
Forum Novice
 
Join Date: May 2005
Age: 36
Posts: 175
Default 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**
PoolMan is offline   Reply With Quote
Old 04-08-2007, 10:56 PM   #410 (permalink)
Forum Expert
 
kmwill23's Avatar
 
Join Date: Feb 2003
Location: Phoenix, Arizona
Age: 31
Posts: 1,118
Send a message via MSN to kmwill23
Default

Extremely difficult to do, and would eat a bit of CPU each time it tried =)
__________________
"Morality is a lonely path." - Me
kmwill23 is offline   Reply With Quote
Old 04-11-2007, 05:24 AM   #411 (permalink)
Forum Newbie
 
Join Date: Jun 2005
Age: 31
Posts: 45
Default

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
yarex is offline   Reply With Quote
Old 04-23-2007, 02:10 PM   #412 (permalink)
Forum Expert
 
killsom3thing's Avatar
 
Join Date: Feb 2006
Location: Colorado
Age: 20
Posts: 310
Default 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

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
killsom3thing is offline   Reply With Quote
Old 04-24-2007, 02:46 AM   #413 (permalink)
Forum Expert
 
kmwill23's Avatar
 
Join Date: Feb 2003
Location: Phoenix, Arizona
Age: 31
Posts: 1,118
Send a message via MSN to kmwill23
Default

Quote:
Originally Posted by killsom3thing View Post
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

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.
Attached Files
File Type: cs ListGump10.cs (47.6 KB, 43 views)
__________________
"Morality is a lonely path." - Me
kmwill23 is offline   Reply With Quote
Old 04-24-2007, 03:19 AM   #414 (permalink)
Forum Expert
 
killsom3thing's Avatar
 
Join Date: Feb 2006
Location: Colorado
Age: 20
Posts: 310
Default

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?
__________________
The most valuable runUO tool can be found simply by clicking this link!
killsom3thing is offline   Reply With Quote
Old 04-24-2007, 04:08 AM   #415 (permalink)
Forum Novice
 
qwerty84's Avatar
 
Join Date: Apr 2006
Location: Abbiategrasso, Italy
Age: 24
Posts: 134
Send a message via ICQ to qwerty84 Send a message via MSN to qwerty84
Default

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'
qwerty84 is offline   Reply With Quote
Old 04-24-2007, 05:40 AM   #416 (permalink)
Forum Newbie
 
Join Date: Jun 2005
Age: 31
Posts: 45
Default

Thank you for that BuildTabs fix!
yarex is offline   Reply With Quote
Old 04-24-2007, 11:27 AM   #417 (permalink)
Forum Expert
 
kmwill23's Avatar
 
Join Date: Feb 2003
Location: Phoenix, Arizona
Age: 31
Posts: 1,118
Send a message via MSN to kmwill23
Default

Quote:
Originally Posted by qwerty84 View Post
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 =)
__________________
"Morality is a lonely path." - Me
kmwill23 is offline   Reply With Quote
Old 04-24-2007, 11:31 AM   #418 (permalink)
Forum Expert
 
kmwill23's Avatar
 
Join Date: Feb 2003
Location: Phoenix, Arizona
Age: 31
Posts: 1,118
Send a message via MSN to kmwill23
Default

Quote:
Originally Posted by killsom3thing View Post
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.
__________________
"Morality is a lonely path." - Me
kmwill23 is offline   Reply With Quote
Old 04-24-2007, 03:13 PM   #419 (permalink)
Forum Expert
 
killsom3thing's Avatar
 
Join Date: Feb 2006
Location: Colorado
Age: 20
Posts: 310
Default

Quote:
Originally Posted by kmwill23 View Post
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.
__________________
The most valuable runUO tool can be found simply by clicking this link!
killsom3thing is offline   Reply With Quote
Old 04-26-2007, 04:12 AM   #420 (permalink)
Forum Novice
 
Join Date: May 2004
Age: 26
Posts: 114
Default

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.
__________________
godfood is offline   Reply With Quote
Old 04-26-2007, 07:54 PM   #421 (permalink)
Forum Novice
 
Join Date: May 2004
Age: 26
Posts: 114
Default [Wishlist]

Would it be possible to add the ability to export chat to additional IRC chans?

My thinking on this would be to have a staff chatroom on irc that would receive all chat messages be it Public, Multi, Guild Etc.
__________________

Last edited by godfood; 04-26-2007 at 07:59 PM.
godfood is offline   Reply With Quote
Old 04-27-2007, 03:42 AM   #422 (permalink)
Forum Expert
 
kmwill23's Avatar
 
Join Date: Feb 2003
Location: Phoenix, Arizona
Age: 31
Posts: 1,118
Send a message via MSN to kmwill23
Default

Sounds like you are looking for multiple IRC connections. That may be possible, but you'd have to use multiple IRC servers to get past IP limitations for IRC servers.
__________________
"Morality is a lonely path." - Me
kmwill23 is offline   Reply With Quote
Old 04-27-2007, 04:23 AM   #423 (permalink)
Forum Novice
 
Join Date: May 2004
Age: 26
Posts: 114
Default

I think you're over thinking it. The way it is now, the RunUO server connect's to the IRC server. Once it's connected to the IRC server, it joins a set channel. I just want it to join 2 channels. Additionally it would be nice to control what it send to the channels individually, I.E. the second channel it would send all chat messages for staff to monitor. and not relay anything said in the second channel back to the UO server, or if it did, have it only send it on the staff channel. Am I making sense?
__________________
godfood is offline   Reply With Quote
Old 04-27-2007, 10:24 AM   #424 (permalink)
Forum Expert
 
kmwill23's Avatar
 
Join Date: Feb 2003
Location: Phoenix, Arizona
Age: 31
Posts: 1,118
Send a message via MSN to kmwill23
Default

Ah ha, I got ya =) Not a bad idea!
__________________
"Morality is a lonely path." - Me
kmwill23 is offline   Reply With Quote