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!

Cat's Jail system

Cat

Wanderer
Cat's Jail system

Summary:
b36.
For those wondering, this version is new as of 3/1/04

it includes a few bug fixes, several requested features and a new [cage command.

(yeah, I was bored)

use [adminjail to setup the jail system the way you'd like it.

You might notice I started working on a fast movement auto jailing piece, but it doesnt work correctly yet (and is disabled).

Description:
*steals someone elses description and adds some*
[jail - jails the selected person
[release - will release that person
[adminjail - brings up the gump where you can mess with settings and see the jailings
[macro - sends the person a gump that will jail them if not replied to in an amount of time
[warn - sends a huge gump to that person warning them
"jailtime" - say this in jail and it will tell you how long you are jailed and why
"what time is it" - tells you the current time
[review look at someones jail history

theres a few more commands in there I think.

In those last two you don't include the "" marks =)

Has an autojailer for foul language and ooc. Can both be disabled.
[cage - throws them in a cage on the spot, great deal of fun
Installation:
drop the script in the scripts folder someplace.

if you want the player mobile context menus follow the directions in the script. The script works without the context menus. I dont use them as they make it easy to accidently jail a player... but other people like them.

Deleted account bug fix in the adminjail gump
removed the fast walk detection spam (I wonder if theres a better way to detect that)
couple other small crash guards

**updated script** 3/20/04
**updated script** 6/17/04 jailrc1.zip is a temp version
 

Attachments

  • jail.zip
    23.7 KB · Views: 3,256
  • jailrc1.zip
    21 KB · Views: 1,708

TomC

Wanderer
Excellent Script. I was playing with this a couple of days ago. Had some minor issues at the time, but I'll go ahead and DL this fresh one and test it again before I post.

Thanks and keep up the great work.


TomC
 

ditmar

Wanderer
I have some issues to :


Crashlog

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Scripts.Commands.JailAdminGump.buildReviews()
at Server.Scripts.Commands.JailAdminGump.buildit(AdminJailGumpPage page, Int32 subpage, Int32 id)
at Server.Scripts.Commands.JailAdminGump..ctor(AdminJailGumpPage page, Int32 subpage, Int32 id)
at Server.Scripts.Commands.JailAdminGump.OnResponse(NetState sender, RelayInfo info)
at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)

Occasionaly i get release timer errors in my console. If i see one again i will post it.

Ditmar.

P.S You fogat to mention the [killjail command in the description, which i just used :)
 

Cat

Wanderer
ditmar said:
I have some issues to :


Crashlog

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Scripts.Commands.JailAdminGump.buildReviews()
at Server.Scripts.Commands.JailAdminGump.buildit(AdminJailGumpPage page, Int32 subpage, Int32 id)
at Server.Scripts.Commands.JailAdminGump..ctor(AdminJailGumpPage page, Int32 subpage, Int32 id)
at Server.Scripts.Commands.JailAdminGump.OnResponse(NetState sender, RelayInfo info)
at Server.Network.PacketHandlers.DisplayGumpResponse(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)

Occasionaly i get release timer errors in my console. If i see one again i will post it.

Ditmar.

P.S You fogat to mention the [killjail command in the description, which i just used :)

Hm, I keep forgetting about killjail.


that crash was with this current download?
 

ditmar

Wanderer
Yes this current one, however it still had jails from an older system. I was reviewing an older jail (not made by the current version of the script), it could be compatibility.

I killed all jails now, if it happens again i will post it.

Ditmar.
 

mechlar

Wanderer
Staff being jailed

I love the program but for some reason even when staff not jailed for language is checked my staff gets jailed>? Help hehe !!! My staff likes to cuss i just dont wants players too hehe !!!
 

Avelyn

Sorceror
mechlar said:
I love the program but for some reason even when staff not jailed for language is checked my staff gets jailed>? Help hehe !!! My staff likes to cuss i just dont wants players too hehe !!!


Just use an if statement to check the access level of the playermobile before the jailing takes place. Only allow it to happen if it is a player.
 
C

cscroop

Guest
I'll bet the cause of that error was the "I deleted a jailed account bug."

This system is great, I use it, and everyone ought to too. However it does have a flaw, and that is if you delete a jailed account, the shard will crash on AdminJail. Not right away, just when you turn to the last page. All my staff know not to delete jailed accounts, because the only fix, I've found anyway, is to delete the saved jailing file and start over. Which leaves all jailed players trapped until someone sees them in there sometime.

Just a warning.

And congrats on a very useful script.
 

ditmar

Wanderer
cscroop said:
I'll bet the cause of that error was the "I deleted a jailed account bug."

This system is great, I use it, and everyone ought to too. However it does have a flaw, and that is if you delete a jailed account, the shard will crash on AdminJail. Not right away, just when you turn to the last page. All my staff know not to delete jailed accounts, because the only fix, I've found anyway, is to delete the saved jailing file and start over. Which leaves all jailed players trapped until someone sees them in there sometime.

Just a warning.

And congrats on a very useful script.

Ye its possible that thats it. I delete accounts that havent been used for 25 days and usually that are pretty huge amounts so i dont see which accounts i removed but that could be the case. [killjail is a command to remove jailings if u know the number of the "bugged" jailing u can just remove it with [killjail and u dont have to replace the folder.

Cat can u make a workaround suppose it is the problem of "unexisting" accounts to not make it crash on that ?

Thanks in advance!
 

Khaz

Knight
I downloaded and setup this jail system fine. No problems or errors or anything like that - I'm just wondering if there's a way to clear the Review information on a certain character/account. I looked through the logs and scanned the Jail.cs file, but couldn't find where that info is stored. Hope you can help, np if not.
 

Cat

Wanderer
mechlar said:
I love the program but for some reason even when staff not jailed for language is checked my staff gets jailed>? Help hehe !!! My staff likes to cuss i just dont wants players too hehe !!!
This is the first I've heard of this issue
I'll double check the code behind it.

you might want to make sure they are being jailed for cursing and not ooc stuff....

I think that has a seperate check. (to be honest I havent changed settings in a while on my server so I dont remember all the options, configured it and forgot it.)


ditmar said:
Ye its possible that thats it. I delete accounts that havent been used for 25 days and usually that are pretty huge amounts so i dont see which accounts i removed but that could be the case. [killjail is a command to remove jailings if u know the number of the "bugged" jailing u can just remove it with [killjail and u dont have to replace the folder.

Cat can u make a workaround suppose it is the problem of "unexisting" accounts to not make it crash on that ?

Thanks in advance!

Yeah that's possible. I'll have it do a check on the account and delete the jailing if the account no-longer exisits. I never took into account the possiblity that someone would delete an account.... and since I'm about to delete a couple hundred....
 

Cat

Wanderer
Khaz said:
I downloaded and setup this jail system fine. No problems or errors or anything like that - I'm just wondering if there's a way to clear the Review information on a certain character/account. I looked through the logs and scanned the Jail.cs file, but couldn't find where that info is stored. Hope you can help, np if not.

No they cant be by design, at least not directly.

The items in the review/history are meant to be a log of the players jailings/releases and warnings that follows them for all time. This way if a player gets caught exploiting a bug, theres a record of for all gms to see 1, 2 ,6 or 18 months later.

Having said that,
In theory you can edit your accounts.xml file and remove the tags that contain the history.
in doing so you reset some of the features like jail time based on the # of offenses. (and if I feel the need, jail time based on the number of warnings for the offense that landed them in jail.)

also, if you screw up your accounts file....well, you'll have unhappy players.

The jail script does not directly edit the file, but it uses built in methods of the account object.

Hope that helps.
 
C

cscroop

Guest
Thanks Cat, that's been on my to do list for weeks, and I never got to it.

I'd really appreciate it. Awesome script, way to go.
 

TomC

Wanderer
Just testing this on myself - Shard isn't public yet.

I like the new menu layout and online customization.

Is it just me, but when I jail myself, then either [release or [unjail, I seem to stay in jail. Does the script keep the origination location and send you back ideally?


TomC
 

TomC

Wanderer
Hmm. I sent a normal character account to jail for 5 minutes and it never released. Also, when I released them manually, they were still in the cell.

When I do [adminjail and look at 'review current jailings" at the bottom it reads:
This account has been released, but currently has characters in jail.

There is only one character on that test account.


Ideas?
 

Cat

Wanderer
Noramly when a release fails it logs something to the console....

you might need to turn on "debug mode" to get a useful message. uncomment the #define jaildebug line (I think that's right, I dont have the code in front of me atm, but its at the top of the jail.cs file)

By popular request, I will be renaming the file to Jailsystem.cs forthe next release.
It seems a few new admins have been overwriting the regions/jail.cs file.
 

kieran

Wanderer
Errors with editing playmobile

- Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 820, column 4) The type or namespace name 'JailSystem' could not be found (are you missing a using directive or an assembly reference?)

I get this problem with it. Do i just need to edit playmobile?

Thanks
 

Devious

Wanderer
Cat.... :D Great Script!! i love it. only one question or problem. i want to edit the script itself to allow the words on the ooc list and put in new ones. but i edited the words and the old ones are still working. any suggestions on what i am missing? i am making it so ppl can't get all racial on me and stuff. i don't want that. Thank You
 
Top