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!

Speech Cop Jailing System.

X

Xanthos

Guest
Speech Cop Jailing System version 1.8

This is a basic jailing and speech monitor system.

Commands : [jail [unjail [AddJailWords [DeleteJailWords [ListJailWords

If a player says any of the words in the file jaiwords.cs, they will be automatically jailed on the spot. If you want the system to monitor chat speech as well there is a method, in jailcommand.cs, that must be called from the chat command handler. An example and explanation for how to do this with Knives Chat 2.0 is provided in jailcommand.cs. If you want to prevent players from leaving jail using the stuck option you will also need to set up a custom region encompassing your jail; Regions In a Box works well for that.

Installation:
  1. Unzip the package
  2. Drop in your custom folder
  3. Copy or move the jailwords.txt file to your Data folder.
  4. Restart your server.
  5. Add a JailTeleporter (ideally this is at a location accessible to inmates in your jail, however it need not be visible or accessible to them for the system to work properly).
  6. Modify the props on the teleporter to change the locations of the jail and release spots, etc. (most installations will not need to change the source files since the most common configurations can be accessed via the properties on the teleporter).
Changes in 1.8
  • Added the Murder Free Location to the in game configuration. Use props on the jail teleporter to configure it.
  • Cursing in jail now gets the player kicked, in addition to fined and an increased sentence.
  • There is now an option to the jail command to squelch the player when jailed.
Changes in 1.7 1/14/06
Thanks go to Novafire, whose ideas make up the bulk of this release.
  • Extracts a fine from jailed players.
  • Provides two free locations based on noteriety - one for murderers with 5 or more counts and one for the rest.
  • Swearing in jail no longer teleports the player to jail since they are already there.
  • Players are now jailed in a burst of flame and lighting which leaves behind nothing but their smoldering boots.
  • The package now unzips into a Xanthos directory - keeping the package files within the Xanthos directory in your customs directory is recommended.
Changes in 1.5 8/7/05
  • Fixed an interaction with the safe rez context whereby an immovable death shroud would be left in a dead jailed player's pack.
  • All jail configuration is now done in game - no more need to edit scripts or restart the server.
  • New commands: AddJailWords, DeleteJailWords and ListJailWords allow in game changes and review of the jailable words.
  • The speech filter can be enabled/diabled by editing the properties on the JailTeleporter allowing an admin to turn on and off autojailing on speech.
Changes in 1.4 6/10/05
Special thanks to Thundar for his help and ideas on this release.
  • Jail Rock is now deleted when players are released or jailed
  • Players are now teleported to the free location immediately upon release
  • Free players in the Jail Guard's line of sight who step too close are jailed
  • Access levels of jailed players are now persisted when the server shuts down - therefore players with access level counselor and above, jailed after this release, will have their proper access level restored when set free
  • Some of the messages have changed
  • The jail teleporter is now visible when created
  • Jail rock can no longer be created in-game using [add, unless JailRock.cs is compiled with JAIL_TESTING defined.
Changes in 1.3 6/7/05
  • Free and jail teleport locations, hammer difficulty and type of tiles to mine are now settable in game using the [props on the jail teleporter.
  • The teleporter will now remove any jail rock from the player's pack as they exit jail.
  • Fixed the guard spamming.
  • Fixed another crash in the unjail command related to the hashtable.
Changes in 1.2 6/5/05
  • Moved the name of the tiles to mine and the name of the rock mined there with the rest of the configuration variables.
  • Added a comment that describes how to find the name of the tiles to be mined.
  • Fixed the guard logic so he speaks again.
Changes in 1.1 6/2/05
  • All pets are now stabled when a player is jailed
  • Player access level is stored and set to Player, then back to its original value on release
  • Fixed a bug where the hammer could be unequipped on certain conditions. This change required that the Hammer inherit from BaseWeapon. Unfortunately this will cause a one time deletion of all existing hammers, and susbsequent release of all prisoners - guard your women and children!
  • Fixed a crashing bug when a player is set free using the [UnJail command
  • Moved all configurable options into the Jail class
  • Changed the hue of the teleporter to be more noticable
 

Attachments

  • Jail 1.8.zip
    12.2 KB · Views: 528
  • Utilities 1.2.zip
    6.8 KB · Views: 342

ssalter

Account Terminated
Sounds interesting. What bugs did you find in the previous submissions? I took SS and GR's code and modified it to fit my jail requirements and, so far, have experienced no difficulties.
 
X

Xanthos

Guest
Well the most obvious problem was that they were rebuilding the bad word array everytime someone spoke. A lot of inconsistencies in the code like variable naming, unused variables, and so on that made it hard to follow. An error that allows players to end up with large negative amounts of rock to mine. I stopped keeping track at that point and went for a complete rewrite.
 

Iomega0318

Sorceror
lol.. ok I ve had theres for a bit but havent used it.. Ill use yours but I need help with something.. I made a custom mining camp/jail place and the whole floor is cave floor.. I dont know how to change it to make it work.. Ive tried all kinds of changes.. can you help me with it pls..
 
This is a great update for this. The only issues I've seen with this so far are,

Players with pets other then the mount hey had will probably end up loosing them. dono if thats by design or not.

Counslors can be jailed by cursing, but can use [tele [go or [who to get out.

and I experenced a crash. I belive, that it happned when I used the [unjail command, and either missed the guy, or hit esc to cancel.


Exception:
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.ArrayListEnumeratorSimple.MoveNext()
at Xanthos.SpeechCop.UnJailTarget.OnTarget(Mobile from, Object targ)
at Server.Targeting.Target.Invoke(Mobile from, Object targeted)
at Server.Network.PacketHandlers.TargetResponse(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)

I Did fix the counslor escape plan on my shard, but I also have staff orbs. I just added a change acess level to the jailing part, and since all possessions go in the bank that includes their orbs and they cant break out. I even went a step farther and included GMs in being able to be jailed, because I dont want any staff slip of the toungs...
 

Iomega0318

Sorceror
Xanthos said:
If you look in the original thread by Grim Reaper there are suggestions on how to get the hammer to mine in a cave. You will also need to change the teleport locations for your jail location and where you would like them released to when they step on the "door to freedom".
yes i know but it didnt help me any and I try'd everything they told me to change.. still wouldnt work..
 
X

Xanthos

Guest
Updated to version 1.1 - see the first post for the zip file and notes on the changes.
 

Iomega0318

Sorceror
Xanthos said:
What about the pickaxe or shovel code? If they can mine in a cave (im not sure if they can or not) then you could use that as your model.
hmm that may work... Ill go try that then get back with yall..
 

Saint666

Wanderer
how would i

how would i transform the script or edit it to make it so if you cuse in the house you own it will not put you in jail?
 

Thundar

Wanderer
i changed the location to go to the internal jail in tram and i added cave floor tiles. i tested to see if i can mine normally from those tiles and i can but i am not sure what line to change in yer script to get it to mine from that instead of just mountain walls could u enlighten me if it is jsut that one line here in JailHammer.cs?

if ( toLand.Name == "rock" )

thx i love the script btw Also i checked the link from the archive i changed "rock" to "cave floor" and i still get no rock, any ideas?
 
X

Xanthos

Guest
Get the latest release. I added some config variables and instruction in the comment next to the variable to help make mining different locations easier for everyone. Basically you use the command
Code:
[get name
and target a tile to get the name to set the variable to. Worked well for me - let me know if it gives you any grief :)
 
X

Xanthos

Guest
Saint666 said:
how would i transform the script or edit it to make it so if you cuse in the house you own it will not put you in jail?
Look in HouseRegion.cs for how to determine if they are in their house. You would then use that to determine whether or not to call JailThem().
 

Thundar

Wanderer
sweet thx Xanthos that worked just fine only one prob it still crashes as soon as i use the [unjail cmd on an inmate i have yer newest download too


*EDIT* Also i noticed that the player can leave the jail once done and keep all the Jail Rock he had extra i would think that the Jail Rock should be deleted upon steping on the door to freedom or at the time of turning in the last Jail Rock like the hammer disappears....once again this is a great script i love it u did a great job and this is only an idea for u :) keep up the good work
 
X

Xanthos

Guest
I cannot repro the crash, can you send me the log?

Good suggestion on the jail rock removal - consider it done.
 

Thundar

Wanderer
here is the crash report:

xception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Xanthos.SpeechCop.UnJailTarget.OnTarget(Mobile from, Object targ)
at Server.Targeting.Target.Invoke(Mobile from, Object targeted)
at Server.Network.PacketHandlers.TargetResponse(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)

np yw for the suggestion u have great support also
 

aleon

Wanderer
Well im working on jail system that doesnt jail people but actualy gives a squeach jail and puts a book in the backpack to let the player read the book 1500 times during that time he could not speak just like squealched during that time until the book is finished when the reading is finished his squealch would go of its more practicular.Like for other things im looking at uo samurai empire easyuo doesnt work on samurai empire which is very useful for this im trying to change the core to enforce the players to use samurai empire but not beta because beta supports easyuo still working on it.

Also 1 more thing i just had a question i saw on the third party forum iris client just like World Of Warcraft but its based on uo changed uo motor much more better 3d motor does the runuo dev team working on the motors ?
 

Thundar

Wanderer
not sure if that book thing is gonna be effective because u can use razor to loop reading the book i beleive so basically they could read that book in a matter of seconds while taking a smoke break.. i could be wrong tho....just giving u feedback on that is all ;)
 

Saint666

Wanderer
would is be this section?



public override void OnSpeech( SpeechEventArgs e )
{
Mobile from = e.Mobile;

if ( !from.Alive || !m_House.IsInside( from ) || !m_House.IsActive )
return;

bool isOwner = m_House.IsOwner( from );
bool isCoOwner = isOwner || m_House.IsCoOwner( from );
bool isFriend = isCoOwner || m_House.IsFriend( from );
 
Top