I was looking for a jail command because we did not have one. I found a system instead.

To give credit where credit is due:
Thank you to Scriptiz for posting and fixing this system to work with RunUO2.2.
Original post is here:
http://www.runuo.com/community/threads/cats-jail-system-on-runuo-2-2-svn-862.485983/

I commented out a couple of over-rides so it will compile just fine with the current distro. There are optional edits you can do, but it works just fine the way it is. I am uploading and sharing with the community because you have helped me out numerous times.
 

Attachments

  • Cat's Jail System 2.2b.zip
    23.1 KB · Views: 92
Found original posting with details:
http://www.runuo.com/community/threads/cats-jail-system.29025/


Details on the system:
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
 
Hi, ive upload this script and try, it work great but when serve auto-save it crash. (sorry for bad eng)

This is the crashlog, can help me please?

ServUO Version 0.5, Build 6602.25457
Operating System: Microsoft Windows NT 6.1.7601 Service Pack 1
.NET Framework: 4.0.30319.42000
Time: 29/01/2018 20:54:43
Mobiles: 3476
Items: 16747
Exception:
System.Exception: World Save event threw an exception. Save failed! ---> System.IO.IOException: The process cannot access the file 'C:\Users\Administrator\Desktop\Olam Server\Saves\Jailings\Jailings.idx' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Server.AsyncWriter..ctor(String filename, Int32 buffSize, Boolean prefix) in c:\Users\Administrator\Desktop\Olam Server\Server\Serialization.cs:line 1878
at Server.Commands.JailSystem.onSave(WorldSaveEventArgs e)
at Server.WorldSaveEventHandler.Invoke(WorldSaveEventArgs e)
at Server.EventSink.InvokeWorldSave(WorldSaveEventArgs e) in c:\Users\Administrator\Desktop\Olam Server\Server\EventSink.cs:line 1601
at Server.World.Save(Boolean message, Boolean permitBackgroundWrite) in c:\Users\Administrator\Desktop\Olam Server\Server\World.cs:line 1143
--- End of inner exception stack trace ---
at Server.World.Save(Boolean message, Boolean permitBackgroundWrite) in c:\Users\Administrator\Desktop\Olam Server\Server\World.cs:line 1147
at Server.Timer.DelayCallTimer.OnTick() in c:\Users\Administrator\Desktop\Olam Server\Server\Timer.cs:line 616
at Server.Timer.Slice() in c:\Users\Administrator\Desktop\Olam Server\Server\Timer.cs:line 410
at Server.Core.Main(String[] args) in c:\Users\Administrator\Desktop\Olam Server\Server\Main.cs:line 588

Clients:
- Count: 0
 
I have installed the jail system works fine.. but then when the world saves, I get this message below

"System.Exception: World Save event threw an exception. Save failed! ---> System.IO.IOException: The process cannot access the file 'C:\RunUO-2.6\Saves\Jailings\Jailings.idx' because it is being used by another process."
 
ServUO Version 0.5, Build 7300.24250
Operating System: Microsoft Windows NT 6.2.9200.0
.NET Framework: 4.0.30319.42000
Time: 12.01.2020 19:50:10
Mobiles: 60558
Items: 399085
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Commands.JailSystem.fromAccount(Account a)
at Server.Commands.JailSystem.OnLoginJail(LoginEventArgs e)
at Server.LoginEventHandler.Invoke(LoginEventArgs e)
at Server.EventSink.InvokeLogin(LoginEventArgs e)
at Server.Network.PacketHandlers.DoLogin(NetState state)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)
 
@john burns

With the new server build engine mechanism (compilator), we encountered numerous warnings/errors with custom files - which had not occurred before. I mean the current state # 4835 - compared to the version before the compiler mechanics changes.
Warnings are reported in the area of - among others - Cats Jail 2.2 system. I am attaching the log from the compilation attempt (with part of Cat's warnings).

Compile ServUO for Windows

Press any key to continue . . .

C:\ServerUO\UOMGGameTEST>dotnet build -c Release
Microsoft (R) Build Engine version 16.7.0-preview-20360-03+188921e2f for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

Determining projects to restore...
Restored C:\ServerUO\UOMGGameTEST\Ultima\Ultima.csproj (in 167 ms).
Restored C:\ServerUO\UOMGGameTEST\Server\Server.csproj (in 167 ms).
Restored C:\ServerUO\UOMGGameTEST\Scripts\Scripts.csproj (in 167 ms).
Ultima -> C:\ServerUO\UOMGGameTEST\Ultima\bin\Release\Ultima.dll
Server -> C:\ServerUO\UOMGGameTEST\Server\bin\Release\Server.dll

Custom\Cat's Jail System 2.2b\JailRC1.cs(1106,43): warning CS0168: The variable 'ne' is declared but never used [C:\ServerUO\UOMGGameTEST\Scripts\Scripts.csproj]
Custom\Cat's Jail System 2.2b\JailRC1.cs(1615,24): warning CS0414: The field 'JailReviewGump.m_reason' is assigned but its value is never used [C:\ServerUO\UOMGGameTEST\Scripts\Scripts.csproj]

Press any key to continue . . .
 
Back