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!

Knives' Chat v2.0

kmwill23

Sorceror
Do you have another custom gump called InfoGump, perhaps defined in Server.Gumps, or perhaps Server.Misc?

Ambiguous errors occur when you have to classes of the same name in different places causing a conflict.
 

sUpplier1

Wanderer
I'm receiving chat option Saving Errors on every World Save.

Error Log:
ChatInfo -> OnSave

Chat.bin - 0 (zero) bytes after saves

What information should I provide to help you to find what's wrong?
I'm running non-english shard, so maybe the problem is with non-English characters in Profile?
 
Sirsly

i haven't changed anything, and i'm getting this error:

Code:
- Error: Scripts\@Custom\System - Knives Chat\Gumps\ListGump.cs: CS0104: (line494, column 4) 'InfoGump' is an ambiguous reference - Error: Scripts\@Custom\System - Knives Chat\Gumps\ListGump.cs: CS0104: (line500, column 4) 'InfoGump' is an ambiguous reference - Error: Scripts\@Custom\System - Knives Chat\Gumps\OptionsGump.cs: CS0104: (line 363, column 4) 'InfoGump' is an ambiguous reference - Error: Scripts\@Custom\System - Knives Chat\Gumps\PmGump.cs: CS0104: (line 137, column 4) 'InfoGump' is an ambiguous reference - Error: Scripts\@Custom\System - Knives Chat\Gumps\ProfileGump.cs: CS0104: (line 142, column 4) 'InfoGump' is an ambiguous reference​



any ideas?

-Sly
Anyone who has SphericalSloaris's Enhancement System will get these errors. It contains a script called InfoGump too.
 

numatra

Wanderer
Hmm... not sure I'm liking the new gump interface or the new button placement... it seems a bit akward compared to the first version.

Anyway it's still a great script, kmwill. I havent seen you make anything that wasn't top notch... I envy you :)

Just my 2 cents, button placement and gump kinda icky.
 

LFFPicard

Sorceror
Is there anyway to get around the infogump.cs problem, i have the ehnacment system also but would liek to keep this and use Chat v2.0

Any help welcome, in the meantime i will attemp (Cannot code ATALL) to edit the ehance system to look for infogumpe.cs or something, change the whole name.
 

LFFPicard

Sorceror
OK very easy fix even for a bad coder myself :)

In SphericalSloaris's Enhancement System find infogump.cs and poen it, every instance of infogump just change to infogumpe

Rename infogump.cs to infogumpe.cs

Now open weaponsgump.cs and on line 141 add a "e" onto infogump
Save and restart server..

No more conflicts :)
 

LFFPicard

Sorceror
The onyl problem i am getting now with the IRC part is the serve ri am tryign to use asks me to register first.

Is there a certain part fo the code i can add a registration command or somethign so that i can get onto the server?

I know the Readme says Registration not supported, but i really liek this chat system and dont want to install a seperate IRC script just for that.
 

Nagash

Sorceror
Thanks for uptdating this great script. I like a lot Merlin's suggestion about staff showing as players if they want to do so.
 

kmwill23

Sorceror
Nice to see you were able to get it working LFFPicard! I am going to send you a forum PM concerning the IRC registration.

numatra and supplier, sending you PMs as well.
 

sh1ny

Wanderer
I want to request a profanity filter in the chat system if it's possible. With configurable words etc. I am using the default runuo profanity detection, and i made it so when players say some bad words, it would not display them but some random replacement. Would be good if this chat system can have the same options as the profanity filters.... :)
 

sh1ny

Wanderer
My mistake then :( Can you add some options then ? What to do when filtered word is detected ? I've made the profanity detection make them say random speech :)
 

Freya

Wanderer
Bunch of Errors =/

Hiyas... I just put this system in, to replace the older version I had, and it's giving a bunch compiling errors... :confused: Here's the list... what am I missing or doing wrong? I installed what was there in d/l =/ Thanks!
Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (15 errors, 1 warnings)
 - Error: Scripts\Customs\Chat System Knives\Commands\ChatOptions.cs: CS0246: (l
ine 16, column 4) The type or namespace name 'OptionsGump' could not be found (a
re you missing a using directive or an assembly reference?)
 - Error: Scripts\Customs\Chat System Knives\Commands\GuildChat.cs: CS0246: (lin
e 47, column 32) The type or namespace name 'Listing' could not be found (are yo
u missing a using directive or an assembly reference?)
 - Error: Scripts\Customs\Chat System Knives\Commands\GuildChat.cs: CS0246: (lin
e 47, column 5) The type or namespace name 'ListGump' could not be found (are yo
u missing a using directive or an assembly reference?)
 - Error: Scripts\Customs\Chat System Knives\Commands\IRC.cs: CS0246: (line 33,
column 6) The type or namespace name 'OptionsGump' could not be found (are you m
issing a using directive or an assembly reference?)
 - Error: Scripts\Customs\Chat System Knives\Commands\Pm.cs: CS0246: (line 31, c
olumn 6) The type or namespace name 'OptionsGump' could not be found (are you mi
ssing a using directive or an assembly reference?)
 - Error: Scripts\Customs\Chat System Knives\Commands\Pm.cs: CS0246: (line 87, c
olumn 32) The type or namespace name 'Listing' could not be found (are you missi
ng a using directive or an assembly reference?)
 - Error: Scripts\Customs\Chat System Knives\Commands\Pm.cs: CS0246: (line 87, c
olumn 5) The type or namespace name 'ListGump' could not be found (are you missi
ng a using directive or an assembly reference?)
 - Error: Scripts\Customs\Chat System Knives\Commands\Pm.cs: CS0246: (line 99, c
olumn 6) The type or namespace name 'PmGump' could not be found (are you missing
 a using directive or an assembly reference?)
 - Error: Scripts\Customs\Chat System Knives\Commands\Pm.cs: CS0246: (line 101,
column 6) The type or namespace name 'PmChoiceGump' could not be found (are you
missing a using directive or an assembly reference?)
 - Error: Scripts\Customs\Chat System Knives\Commands\PublicChat.cs: CS0246: (li
ne 31, column 6) The type or namespace name 'OptionsGump' could not be found (ar
e you missing a using directive or an assembly reference?)
 - Error: Scripts\Customs\Chat System Knives\Commands\PublicChat.cs: CS0246: (li
ne 50, column 32) The type or namespace name 'Listing' could not be found (are y
ou missing a using directive or an assembly reference?)
 - Error: Scripts\Customs\Chat System Knives\Commands\PublicChat.cs: CS0246: (li
ne 50, column 5) The type or namespace name 'ListGump' could not be found (are y
ou missing a using directive or an assembly reference?)
 - Error: Scripts\Customs\Chat System Knives\Misc\ChatInfo.cs: CS0246: (line 238
, column 5) The type or namespace name 'PmNotifyGump' could not be found (are yo
u missing a using directive or an assembly reference?)
 - Error: Scripts\Customs\Chat System Knives\Misc\ChatInfo.cs: CS0246: (line 429
, column 4) The type or namespace name 'PmNotifyGump' could not be found (are yo
u missing a using directive or an assembly reference?)
 - Error: Scripts\Customs\Chat System Knives\Misc\ChatInfo.cs: CS0246: (line 465
, column 5) The type or namespace name 'PmNotifyGump' could not be found (are yo
u missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
 

kmwill23

Sorceror
Right off it looks like you didn't unzip the Gumps folder =) The download has four folders: Commands, Gumps, Misc, Utilities

Be sure you have them all, especially the ones which you see the errors for. Example: OptionsGump.cs

Sh1ny, that does sound like an interesting idea! Maybe as an option instead of ban, have them say something silly!
 

sh1ny

Wanderer
Hehe. Here is my modified ProfanityProtection.cs just as an example :

Code:
using System;
using Server;
using Server.Network;

namespace Server.Misc
{
	public enum ProfanityAction
	{
		None,			// no action taken
		Disallow,		// speech is not displayed
		Criminal,		// makes the player criminal, not killable by guards
		CriminalAction,	// makes the player criminal, can be killed by guards
		Disconnect,		// player is kicked
		Other			// some other implementation
	}

	public class ProfanityProtection
	{
		private static bool Enabled = true;
		private static ProfanityAction Action = ProfanityAction.Other; // change here what to do when profanity is detected

		public static void Initialize()
		{
			if ( Enabled )
				EventSink.Speech += new SpeechEventHandler( EventSink_Speech );
		}

		private static bool OnProfanityDetected( Mobile from, string speech )
		{
			switch ( Action )
			{
				case ProfanityAction.None: return true;
				case ProfanityAction.Disallow: return false;
				case ProfanityAction.Criminal: from.Criminal = true; return true;
				case ProfanityAction.CriminalAction: from.CriminalAction( false ); return true;
				case ProfanityAction.Disconnect:
				{
					NetState ns = from.NetState;

					if ( ns != null )
						ns.Dispose();

					return false;
				}
				default:
				case ProfanityAction.Other: // TODO: Provide custom implementation if this is chosen
				{
					return false;
				}
			}
		}	

		private static void EventSink_Speech( SpeechEventArgs e )
		{
			Mobile from = e.Mobile;

			if ( from.AccessLevel > AccessLevel.Player )
				return;

			if ( !NameVerification.Validate( e.Speech, 0, int.MaxValue, true, true, false, int.MaxValue, m_Exceptions, m_Disallowed, m_StartDisallowed ) )
			{
				e.Blocked = !OnProfanityDetected( from, e.Speech );
				DoRandomSpeech( from );
			}	
		}
		
		private static void DoRandomSpeech( Mobile from )
		{
			int coldrex = Utility.Random ( 3 );
			
			switch ( coldrex )
			{
				default: //break;
				case 0: 
				{
					from.Say("I Love You");
					break;
				}
				case 1:
				{
					from.Say("Ich Liebe Dich");
					break;
				}
				case 2:
				{
					from.Say("Cool Dude !");
					break;
				}
			}
		}					

		private static char[] m_Exceptions = new char[]
			{
				' ', '-', '.', '\'', '"', ',', '_', '+', '=', '~', '`', '!', '^', '*', '\\', '/', ';', ':', '<', '>', '[', ']', '{', '}', '?', '|', '(', ')', '%', '$', '&', '#', '@'
			};

		private static string[] m_StartDisallowed = new string[]{};

		private static string[] m_Disallowed = new string[]
			{
				"jigaboo",
				"chigaboo",
				"wop",
				"kyke",
				"kike",
				"tit",
				"spic",
				"prick",
				"piss",
				"lezbo",
				"lesbo",
				"felatio",
				"dyke",
				"dildo",
				"chinc",
				"chink",
				"cunnilingus",
				"cum",
				"cocksucker",
				"cock",
				"clitoris",
				"clit",
				"ass",
				"hitler",
				"penis",
				"nigga",
				"nigger",
				"klit",
				"kunt",
				"jiz",
				"jism",
				"jerkoff",
				"jackoff",
				"goddamn",
				"fag",
				"blowjob",
				"bitch",
				"asshole",
				"dick",
				"pussy",
				"snatch",
				"cunt",
				"twat",
				"shit",
				"fuck"
			};
	}
}
 

ledbettr

Sorceror
Save Errors

I'm receiving chat option Saving Errors on every World Save.

Error Log:
ChatInfo -> OnSave

Chat.bin - 0 (zero) bytes after saves

What information should I provide to help you to find what's wrong?
I'm running non-english shard, so maybe the problem is with non-English characters in Profile?

I am having this same problem, any ideas on a fix for it? Also, I am not sure if it's the chat system or not, but everything that is said in the world is going to the command console, how can I turn this off?
 

kmwill23

Sorceror
Ledbettr, I know the chat system isn't outputting speech to the console, and have no idea where you'd begin looking to find it =P

As for the other problem, I am trying to debug what may be causing it, but haven't heard back from sUpplier1 in a while. I am going to send you a PM and see what info I can get from ya!

sh1ny, I never realized how RunUO handled profanity. I'm going to have to plug in some of those features!
 

ledbettr

Sorceror
Option 2 You are the man (or woman if that is the case)! That fixed my problem with sending everything to the server console.

I am wondering if the two may be related somehow, I am currently waiting for my next world save to see if I get the chat error again.
 
Top