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
People should be aware that there is a change needed to get it to work on RC2 though... Mine worked fine on RC1, but I had to go into RUOVersion.cs and change the settings in there that said rc1 to say rc2. But it is great, and I am glad to be using it in both my rc1 and rc2 shards now.


GreyWolf.
 

Marlboro_Man

Wanderer
not working?

I am running and RCI1 server and I have downloaded your beta 9 and your patch, i put the files into the customs folder in the scripts folder, did a server reboot, logged in and nothing, i tried using the various commands, but to no avail. I get no errors or anything, just does not want to work, this is my first experience with knives and there are no there downloads or versions of it I have except for the beta 9 and the patch1 ,please help
 

greywolf79

Sorceror
MarlboroMan... Check one of my threads, look for a thread marked Scripts by GreyWolf79 (it is not there for me to claim credit for, I have marked on the post and in the download some items are not mine but altered by me to run). In the zip is a copy of the chat system (just with the change so it works on rc2 instead). To get it to run on RC1 all that should need to be done is go into RUOVersion and change all the rc2 into rc1 (I think there is 2 spots, maybe 3).

Then just drop it into your custom folder and it should work, that is what I did for my rc2 shard - copied it from the rc1 and made the change in ruoversion...

GreyWolf.
 

GhostRiderGrey

Sorceror
We are using this chat system on our shard and absolutely love it. Is it possible to have it show the staff level of staffers in public chat? For example:

<Public> GhostRiderGrey [Owner] Hello world!

or

<Public> Rothgar [Counselor] Hello world!!

I have looked through the scripts and options but have failed to find it. Any assistance would be appreciated.
-GhostRiderGrey
 

greywolf79

Sorceror
I am still new to programming over all, and to c# I am still learning every day... If I were trying to do that to the chat system so that it would give their access level I would search for the section in the chat files that deals with posting the name with the message and then look at the pet leveling files from the FSTS pet breeding package where it shows the way the pets name and level are posted when it raises a level and try to mix that type into it (but like I said I am new to this and my idea may only cause errors - I am not trying to make this change so I have not tried). But I figured the idea of mine may spawn an idea. I know when I was looking in the pet leveling system it said something like "name" {level} type setup... maybe something along the same lines but with {accesslevel} or {display access level} or what ever the command would be for that type thing is... Good luck, and if you succede post here what you did so others can make the change, I suspect I myself would end up using it eventually (just working on a lot of projects myself right now).

GreyWolf.
 

greywolf79

Sorceror
My apologies... I did not mean to post twice... I have a touchy computer and a bad connection to the net right now, so it duped my post.

GreyWolf.
 

Trip3033

Sorceror
GhostRiderGrey;773486 said:
We are using this chat system on our shard and absolutely love it. Is it possible to have it show the staff level of staffers in public chat? For example:

<Public> GhostRiderGrey [Owner] Hello world!

or

<Public> Rothgar [Counselor] Hello world!!

I have looked through the scripts and options but have failed to find it. Any assistance would be appreciated.
-GhostRiderGrey

why not just change there name to GostRiderGrey [Owner] etc. etc. then it show ur name as <Public> GhostRiderGrey [Owner] Hello world! it will save you the troubles....

greywolf79;771062 said:
People should be aware that there is a change needed to get it to work on RC2 though... Mine worked fine on RC1, but I had to go into RUOVersion.cs and change the settings in there that said rc1 to say rc2. But it is great, and I am glad to be using it in both my rc1 and rc2 shards now.


GreyWolf.

I didnt have to change or do anything to work on my server... i just added it and thats it...it worked just fine
 

GhostRiderGrey

Sorceror
Trip3033;773630 said:
why not just change there name to GostRiderGrey [Owner] etc. etc. then it show ur name as <Public> GhostRiderGrey [Owner] Hello world! it will save you the troubles....


We considered this, but if you do that, when you appear in-game to a player, you appear as GhostRiderGrey [Owner] [Owner], because the system automatically tags your character with their staff title. Is there a way to turn off the automatically generated staff title?

Thanks also Greywolf79. I will investigate your suggestion.

-GhostRiderGrey
 

razzles

Wanderer
GhostRiderGrey;773648 said:
Trip3033;773630 said:
why not just change there name to GostRiderGrey [Owner] etc. etc. then it show ur name as <Public> GhostRiderGrey [Owner] Hello world! it will save you the troubles....


We considered this, but if you do that, when you appear in-game to a player, you appear as GhostRiderGrey [Owner] [Owner], because the system automatically tags your character with their staff title. Is there a way to turn off the automatically generated staff title?

Thanks also Greywolf79. I will investigate your suggestion.

-GhostRiderGrey

I haven't fully tested this yet, but if you make this modification to the Broadcast method in Channel.cs it should work. (At least it has on my initial tests.) Changes are in red.

Code:
        protected virtual void Broadcast(Mobile m, string msg)
        {
            [COLOR="Red"]string a_Name;
            if (m.AccessLevel > AccessLevel.Player)
                a_Name = String.Format("{0} [{1}]", m.RawName, m.AccessLevel.ToString());
            else
                a_Name = m.RawName;[/COLOR]

            foreach (Data data in Data.Datas.Values)
            {
                if (c_Mobiles.Contains(data.Mobile) && !data.Ignores.Contains(m))
                {
                    if (c_Style == ChatStyle.Regional && data.Mobile.Region != m.Region)
                        continue;

                    data.Mobile.SendMessage(m.AccessLevel == AccessLevel.Player ? ColorFor(data.Mobile) : Data.GetData(m).StaffC, String.Format("<{0}{1}> {2}: {3}", NameFor(m), (c_Style == ChatStyle.Regional && m.Region != null ? "-" + m.Region.Name : ""), [COLOR="red"]a_Name[/COLOR], msg));
                }
                else if (data.Mobile.AccessLevel >= m.AccessLevel && ((data.GlobalC && !data.GIgnores.Contains(m)) || data.GListens.Contains(m)))
                    data.Mobile.SendMessage(data.GlobalCC, String.Format("(Global) <{0}{1}> {2}: {3}", c_Name, (c_Style == ChatStyle.Regional && m.Region != null ? "-" + m.Region.Name : ""), [COLOR="red"]a_Name[/COLOR], msg));
            }
        }
 

GhostRiderGrey

Sorceror
Tested and Implemented!! It is working wonderfully well. Thanks a million razzels!

Fixed channel.cs file posted here for others. :)

-GhostRiderGrey
 

Attachments

  • Channel.rar
    3 KB · Views: 35

GhostRiderGrey

Sorceror
Not sure if I should post this here or in the Xanthos Jail script thread. I have installed and activated Xanthos Jail system and changed the Knives Jail.cs file so that the two tie together. It seems to be working for local chat (i.e. one player standiing next to another and talking) but bad words in Public chat (or PMs) are not triggering a jailing (they do still get masked out with ****). Could someone steer me towards the issue and possible solution?

RC1 bye the way.

Thanks much,
-GhostRiderGrey
 

razzles

Wanderer
GhostRiderGrey;776516 said:
Not sure if I should post this here or in the Xanthos Jail script thread. I have installed and activated Xanthos Jail system and changed the Knives Jail.cs file so that the two tie together. It seems to be working for local chat (i.e. one player standiing next to another and talking) but bad words in Public chat (or PMs) are not triggering a jailing (they do still get masked out with ****). Could someone steer me towards the issue and possible solution?

RC1 bye the way.

Thanks much,
-GhostRiderGrey

I believe you can set that in the Filter Options in Knives. Make sure the Filter Penalty is set to Jail.
 

GhostRiderGrey

Sorceror
Thanks razzles, there is an option in knives fora filter penalty of Jail. But is this using the knives filter list or the Xanthos list? The xanthos list seems to work better, as the knives will take the t i t out of title with ***, or the a s s out of assume, which is annoying. The xanthos list does not do this.
 

GhostRiderGrey

Sorceror
if you have have the option to jail turned on in knives, and you have tit and ass in the knives filter list, then saying title or assume will get you jailed. Not good, lol

-GhostRiderGrey
 

razzles

Wanderer
GhostRiderGrey;776857 said:
if you have have the option to jail turned on in knives, and you have tit and ass in the knives filter list, then saying title or assume will get you jailed. Not good, lol

-GhostRiderGrey

I was looking through the code for Xanthos Jail system (I use that one also) and found this little comment:
Code:
		//
		// Call this from your chat system command handler to have public 
		// chat monitored.
		// For instance, to add monitoring to Knives chat 2.0
		// Search for:
		// string text = Filter( e.Mobile, e.ArgString );
		// and insert this line directly after it (uncommented):
		// Xanthos.SpeechCop.Jail.CheckChatSpeech( e.Mobile, text );	// <- xanthos Jail speech change this line only
		//

In chat 3.0 it's changed a bit, it's now handled in Channel.cs in the OnChat(Mobile m, string msg, bool spam) method. I've shown the added lines in red below along with a few lines before and after so finding it shouldn't be difficult:

Code:
            if (!CanChat(m, true))
                return;

            if(c_Filter)
                msg = Chat3.Filter.FilterText(m, msg);

            [COLOR="Red"]Xanthos.SpeechCop.Jail.CheckChatSpeech(m, msg);[/COLOR]

            if (!CanChat(m, false))
                return;

            if (!c_Mobiles.Contains(m))
            {
                m.SendMessage(Data.GetData(m).SystemC, General.Local(34));
                return;
            }

I don't filter any speech or chat on my shard, but I think that should take care of it so you can leave the filtering off in Knives and Xanthos will still check chats using the Xanthos filters.
 

GhostRiderGrey

Sorceror
Wow Razzles, TY. Quick question. In the latest revision of Xanthos jail, he changed the namespace
Code:
Changed the namespace from the SpeechCop to JailSystem
would this make a difference in your line of code?
Code:
Xanthos.SpeechCop.Jail.CheckChatSpeech(m, msg);
should SpeechCop be JailSystem? I will test tonight when I get home from work and see what works.

Thanks again!
-GhostRiderGrey

*EDIT* Just checked and SpeechCop does need to be changed to JailSystem
Code:
Xanthos.JailSystem.Jail.CheckChatSpeech(m, msg);
this allows it to compile. Will test functionality tonight.
Thanks!!
 

razzles

Wanderer
You're right, I didn't check the namespace, just pasted it in. At least that was an easy fix. Hope that works for ya.
 

GhostRiderGrey

Sorceror
Have tested and are making progress. With the latest change, it is now monitoring Public as well as local chat using the Xanthos word list. It is not, however, monitoring PMs yet. Do you have suggestions as to where to look to change this?

Thanks!
GhostRiderGrey
 

razzles

Wanderer
GhostRiderGrey;777007 said:
Have tested and are making progress. With the latest change, it is now monitoring Public as well as local chat using the Xanthos word list. It is not, however, monitoring PMs yet. Do you have suggestions as to where to look to change this?

Thanks!
GhostRiderGrey

From the looks of it, in SendMessageGump.cs:
Code:
            if (Data.GetData(Owner).Recording == this)
                Data.GetData(Owner).Recording = null;

            if (Data.FilterMsg)
            {
                c_Text = Filter.FilterText(Owner, c_Text, false);
                c_Subject = Filter.FilterText(Owner, c_Subject, false);
            }

            [COLOR="Red"]Xanthos.JailSystem.Jail.CheckChatSpeech(Owner, c_Text);
            Xanthos.JailSystem.Jail.CheckChatSpeech(Owner, c_Subject);[/COLOR]

            if (c_MsgType == MsgType.System)
            {
                foreach (Data data in Data.Datas.Values)
                {
                    data.AddMessage(new Message(Owner, c_Subject, c_Text, MsgType.System));
                    General.PmNotify(data.Mobile);
                }
            }
 
Top