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
Devious said:
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

Dont edit the script.

It is all managed via the adminjail gump.
editing the script to do this doesnt work.

why? because the words are saved in the jailings folder in the saves along with the jailings. So you edit the script, start the server, the edits are overwritten by the jail systems load event.

Trust me, you dont want to muck with the load event.

Change the settings from with the game by the [adminjail command.
 

Cat

Wanderer
kieran said:
- 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

Yes,
you must be using the context menus.
Add using Server.Scripts.Commands;
to the top of the playermobile.cs
you're (most likely) missing the namespace reference.

*edited to correct the namespace*
 

Karami

Wanderer
Spamming FastWalk

Since i installed this script my console is screaming out about Fastwalk Detected then player name is there a way to stop this?
 
Cat works great and all, but a question, untill i loaded this, and prior to loading i cleared my saved jail folder, using your old system. im running beta 36, and sence i put this new system in I have spammed accross my server screen fastmovement detected on all my players and staff..... If the fast walk is dissabled as the script says why do i get this now and not before, common on 35, but i have never seen this tillnow on the 36 server? do i need to change something or go back to your old system, sence i record my server logs, it uses a lot of data now???? please advise


Pendragon
 

Karami

Wanderer
Karami said:
Since i installed this script my console is screaming out about Fastwalk Detected then player name is there a way to stop this?

Its okies i worked out how to solve this..
 

Cat

Wanderer
Karami said:
Since i installed this script my console is screaming out about Fastwalk Detected then player name is there a way to stop this?

this has been fixed,
so has the imfamous deleted account bug in the adminjail gump.

Keep them bugs rolling in. the more I hear about the more I squish.
 

Cat

Wanderer
Avelyn said:
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.

The script already has that option built in, you can turn it on or off from the adminjail gump.

I cant say there is any supported feature in the script that you cant turn on or off from the adminjail gump....with one exception. That's the playermobile context menus and that isnt an edit tothe jail script, it is to the playermobile (or sub classed playermobile) script.
 

Asmodaeus

Wanderer
Hiya Cat! Installed your awesome system and played with all of the commands. The ONLY bug I found was when you [cage a player, he/she can teleport out? But when you put them back in, they can't. Something to do with the cage not taking effect until actually placed "inside" the cage, not the cage placed around the player.
Otherwise, it owns my soul. Saved alot of trouble for me and my staff, thanks :)

Just found this:
Code:
JailSystem: Release failed-System.NullReferenceException: Object reference not s
et to an instance of an object.
   at Server.Scripts.Commands.JailSystem.release()

Found this when trying to release players through the Adminjail command. It is the error given when releasing a player and still getting the "Player was realeased but another from the account is still in jail" or whatever.
 

Cat

Wanderer
Asmodaeus said:
Hiya Cat! Installed your awesome system and played with all of the commands. The ONLY bug I found was when you [cage a player, he/she can teleport out? But when you put them back in, they can't. Something to do with the cage not taking effect until actually placed "inside" the cage, not the cage placed around the player.
Otherwise, it owns my soul. Saved alot of trouble for me and my staff, thanks :)

Just found this:
Code:
JailSystem: Release failed-System.NullReferenceException: Object reference not s
et to an instance of an object.
   at Server.Scripts.Commands.JailSystem.release()

Found this when trying to release players through the Adminjail command. It is the error given when releasing a player and still getting the "Player was realeased but another from the account is still in jail" or whatever.

Hmmm post the rest of the stack dump.

yeah the cage creates a region, but the player doesnt register as being in the region when it is dropped on their head.

I might revisit that and see about moving the player back onto them self and try to force the region update that way.
 
C

cscroop

Guest
I found that and fixed it right away, here is my fix. I did just what Cat said, except I bounce the player to 0 0 0 and then back to their spot. It happens so fast the client doesn't even redraw the screen, so they never see a change. Players in the area will just see the person's name reappear over their head as the cage falls on them.

Code:
public class cageTarget : Target
	{
		private Point3D newcell;

		public cageTarget() : base( -1, false, TargetFlags.None )
		{
		}
		protected override void OnTarget( Mobile from, object targeted )
		{
			if ( from is PlayerMobile && targeted is PlayerMobile )
			{
				Mobile m=(Mobile)targeted;
				new aCage(m);
				newcell = m.Location;
				m.Location = new Point3D(0,0,0);
				m.Location = newcell;
			}
		}
	}
 

Cat

Wanderer
Asmodaeus said:
Hiya Cat! Installed your awesome system and played with all of the commands. The ONLY bug I found was when you [cage a player, he/she can teleport out? But when you put them back in, they can't. Something to do with the cage not taking effect until actually placed "inside" the cage, not the cage placed around the player.
Otherwise, it owns my soul. Saved alot of trouble for me and my staff, thanks :)

Just found this:
Code:
JailSystem: Release failed-System.NullReferenceException: Object reference not s
et to an instance of an object.
   at Server.Scripts.Commands.JailSystem.release()

Found this when trying to release players through the Adminjail command. It is the error given when releasing a player and still getting the "Player was realeased but another from the account is still in jail" or whatever.

This isnt really an error. This is often caused by a jiling object where the account has been deleted.

Use the adminjail command to cycle through the accounts, that should remove the bad jailing. I added that advice to the script.

cscroop said:
I found that and fixed it right away, here is my fix. I did just what Cat said, except I bounce the player to 0 0 0 and then back to their spot. It happens so fast the client doesn't even redraw the screen, so they never see a change. Players in the area will just see the person's name reappear over their head as the cage falls on them.

I added your change, thanks.

***Addition*** a second script has been added, thats right, another script.

This one includes a fun command [jailwraith
it was written to remove distruptive players from an event. There is no report to fillout, they are automaticly jailed.

Anyways it's a good example of how to write custom jailing effects for the jailsystem.

I have disabled the fastwalk code and resolved the related lag issue.

Enjoy.
 

lordjezroth

Wanderer
I had the old jail script and when i tried to replace it with this script i got this error.

Code:
Scripts: Compiling C# scripts...failed (19 errors, 0 warnings)
 - Error: Scripts\Custom\jail.cs: CS0101: (line 42, column 15) The namespace 'Se
rver.Scripts.Commands' already contains a definition for 'JailSystem'
 - Error: Scripts\Custom\jail.cs: CS0101: (line 1595, column 15) The namespace '
Server.Scripts.Commands' already contains a definition for 'warnTarget'
 - Error: Scripts\Custom\jail.cs: CS0101: (line 1621, column 15) The namespace '
Server.Scripts.Commands' already contains a definition for 'macroTarget'
 - Error: Scripts\Custom\jail.cs: CS0101: (line 1635, column 15) The namespace '
Server.Scripts.Commands' already contains a definition for 'cageTarget'
 - Error: Scripts\Custom\jail.cs: CS0101: (line 1655, column 15) The namespace '
Server.Scripts.Commands' already contains a definition for 'JailTarget'
 - Error: Scripts\Custom\jail.cs: CS0101: (line 1703, column 15) The namespace '
Server.Scripts.Commands' already contains a definition for 'jailReviewGump'
 - Error: Scripts\Custom\jail.cs: CS0101: (line 1849, column 15) The namespace '
Server.Scripts.Commands' already contains a definition for 'JailWarnGump'
 - Error: Scripts\Custom\jail.cs: CS0101: (line 1986, column 15) The namespace '
Server.Scripts.Commands' already contains a definition for 'unattendedMacroGump'

 - Error: Scripts\Custom\jail.cs: CS0101: (line 2116, column 15) The namespace '
Server.Scripts.Commands' already contains a definition for 'JailWarningGump'
 - Error: Scripts\Custom\jail.cs: CS0101: (line 2147, column 15) The namespace '
Server.Scripts.Commands' already contains a definition for 'JailGump'
 - Error: Scripts\Custom\jail.cs: CS0101: (line 2407, column 15) The namespace '
Server.Scripts.Commands' already contains a definition for 'JailBanGump'
 - Error: Scripts\Custom\jail.cs: CS0101: (line 2451, column 15) The namespace '
Server.Scripts.Commands' already contains a definition for 'JailAdminGump'
 - Error: Scripts\Custom\jail.cs: CS0101: (line 3181, column 15) The namespace '
Server.Scripts.Commands' already contains a definition for 'ReviewEntry'
 - Error: Scripts\Custom\jail.cs: CS0101: (line 3196, column 15) The namespace '
Server.Scripts.Commands' already contains a definition for 'JailEntry'
 - Error: Scripts\Custom\jail.cs: CS0101: (line 3212, column 15) The namespace '
Server.Scripts.Commands' already contains a definition for 'unJailEntry'
 - Error: Scripts\Custom\jail.cs: CS0101: (line 3236, column 15) The namespace '
Server.Scripts.Commands' already contains a definition for 'macroerEntry'
 - Error: Scripts\Custom\jail.cs: CS0101: (line 3267, column 15) The namespace '
Server.Items' already contains a definition for 'smokingFootGear'
 - Error: Scripts\Custom\jail.cs: CS0101: (line 3354, column 15) The namespace '
Server.Items' already contains a definition for 'aCage'
 - Error: Scripts\Custom\jail.cs: CS0101: (line 3488, column 15) The namespace '
Server.Regions' already contains a definition for 'holdingCell'
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
 

ditmar

Wanderer
Cat said:
...
***Addition*** a second script has been added, thats right, another script.

This one includes a fun command [jailwraith
it was written to remove distruptive players from an event. There is no report to fillout, they are automaticly jailed.
...

It's maybe good to know where they will be released ? Or are they just jailed and should they be released manually ? This is good to know because i have my events at the Green Acres and i do not want my players to hang around there.
 

Asmodaeus

Wanderer
OMG Cat!

Downloaded and inserted the updated scripts! [Cage and [JailWraith work soo well, that the players are requesting that they be jailed in THAT manner! Talk about success?!
100% A+ job Cat! I will be following your progress whenever and wherever you go, lol!
(Could you plz have sex with my wife? I want to make sure that the child is worth a damn? Unless you are female, could I adopt one of yours?)
 

Cat

Wanderer
ditmar said:
It's maybe good to know where they will be released ? Or are they just jailed and should they be released manually ? This is good to know because i have my events at the Green Acres and i do not want my players to hang around there.

My advice for areas where you dont want players without a gm present is to make a custom region, like EventArea

add 3 things too it
1 ) a bool eventRunning

2) an onEnter event that checks their accesslevel and if they are a player and an event is not running boot them out to some predefined location

3 ) a speech event that on a given word from a gamemaster toggels the value of eventRunning.
 

Cat

Wanderer
Asmodaeus said:
Downloaded and inserted the updated scripts! [Cage and [JailWraith work soo well, that the players are requesting that they be jailed in THAT manner! Talk about success?!
100% A+ job Cat! I will be following your progress whenever and wherever you go, lol!
(Could you plz have sex with my wife? I want to make sure that the child is worth a damn? Unless you are female, could I adopt one of yours?)

*blinks*

You're welcome.

I think my wife might object.... (which on an unrelated note) we're expecting our second child here shortly.

As of other work, the other projects I do are GMTools and my shard.
There are other projects in the works that you can follow at www.salemx.net (as well as the shard)
 

flowerbudd

Sorceror
Code:
Scripts: Compiling C# scripts...failed (9 errors, 0 warnings)
 - Error: Scripts\Regions\jail.cs: CS0101: (line 42, column 15) The namespace 'S
erver.Scripts.Commands' already contains a definition for 'JailSystem'
 - Error: Scripts\Regions\jail.cs: CS0101: (line 1595, column 15) The namespace
'Server.Scripts.Commands' already contains a definition for 'warnTarget'
 - Error: Scripts\Regions\jail.cs: CS0101: (line 1655, column 15) The namespace
'Server.Scripts.Commands' already contains a definition for 'JailTarget'
 - Error: Scripts\Regions\jail.cs: CS0101: (line 1703, column 15) The namespace
'Server.Scripts.Commands' already contains a definition for 'jailReviewGump'
 - Error: Scripts\Regions\jail.cs: CS0101: (line 1849, column 15) The namespace
'Server.Scripts.Commands' already contains a definition for 'JailWarnGump'
 - Error: Scripts\Regions\jail.cs: CS0101: (line 1986, column 15) The namespace
'Server.Scripts.Commands' already contains a definition for 'unattendedMacroGump
'
 - Error: Scripts\Regions\jail.cs: CS0101: (line 2116, column 15) The namespace
'Server.Scripts.Commands' already contains a definition for 'JailWarningGump'
 - Error: Scripts\Regions\jail.cs: CS0101: (line 2147, column 15) The namespace
'Server.Scripts.Commands' already contains a definition for 'JailGump'
 - Error: Scripts\Regions\jail.cs: CS0101: (line 3267, column 15) The namespace
'Server.Items' already contains a definition for 'smokingFootGear'
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
r
Scripts: Compiling C# scripts...failed (10 errors, 6 warnings)
 - Warning: Scripts\custom\SeedBoxGump.cs: CS0219: (line 80, column 30) The vari
able 'initialState' is assigned but its value is never used
 - Error: Scripts\custom\WarithJailEffect.cs: CS0234: (line 269, column 48) The
type or namespace name 'Jail' does not exist in the class or namespace 'Server.R
egions' (are you missing an assembly reference?)
 - Error: Scripts\Engines\Help\HelpGump.cs: CS0234: (line 224, column 41) The ty
pe or namespace name 'Jail' does not exist in the class or namespace 'Server.Reg
ions' (are you missing an assembly reference?)
 - Error: Scripts\Engines\Help\HelpGump.cs: CS0234: (line 277, column 35) The ty
pe or namespace name 'Jail' does not exist in the class or namespace 'Server.Reg
ions' (are you missing an assembly reference?)
 - Warning: Scripts\Engines\Help\PageQueue.cs: CS0183: (line 288, column 7) The
given expression is always of the provided ('Server.Mobile') type
 - Warning: Scripts\Engines\Help\PageQueue.cs: CS0183: (line 292, column 46) The
 given expression is always of the provided ('Server.Mobile') type
 - Warning: Scripts\Engines\Help\PageQueueGump.cs: CS0183: (line 722, column 74)
 The given expression is always of the provided ('Server.Mobile') type
 - Warning: Scripts\Engines\Help\PageQueueGump.cs: CS0183: (line 764, column 75)
 The given expression is always of the provided ('Server.Mobile') type
 - Error: Scripts\Misc\skillcheck.cs: CS0234: (line 265, column 38) The type or
namespace name 'Jail' does not exist in the class or namespace 'Server.Regions'
(are you missing an assembly reference?)
 - Warning: Scripts\Mobiles\Naturalist.cs: CS0164: (line 126, column 6) This lab
el has not been referenced
 - Error: Scripts\Regions\jail.cs: CS0234: (line 903, column 40) The type or nam
espace name 'Jail' does not exist in the class or namespace 'Server.Regions' (ar
e you missing an assembly reference?)
 - Error: Scripts\Regions\jail.cs: CS0234: (line 1049, column 28) The type or na
mespace name 'Jail' does not exist in the class or namespace 'Server.Regions' (a
re you missing an assembly reference?)
 - Error: Scripts\Regions\jail.cs: CS0234: (line 1123, column 63) The type or na
mespace name 'Jail' does not exist in the class or namespace 'Server.Regions' (a
re you missing an assembly reference?)
 - Error: Scripts\Regions\jail.cs: CS0234: (line 1150, column 40) The type or na
mespace name 'Jail' does not exist in the class or namespace 'Server.Regions' (a
re you missing an assembly reference?)
 - Error: Scripts\Regions\jail.cs: CS0234: (line 1186, column 58) The type or na
mespace name 'Jail' does not exist in the class or namespace 'Server.Regions' (a
re you missing an assembly reference?)
 - Error: Scripts\Regions\jail.cs: CS0234: (line 1528, column 29) The type or na
mespace name 'Jail' does not exist in the class or namespace 'Server.Regions' (a
re you missing 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.

I only have the new script in my files, only once

please anyone? i cant get my server up now :( i tried to just delete it but it needs a jail script so if anyone has his old one, or can fix this?
 

Cat

Wanderer
flowerbudd said:
I only have the new script in my files, only once

please anyone? i cant get my server up now :( i tried to just delete it but it needs a jail script so if anyone has his old one, or can fix this?

You overwrote the scripts\regions\jail.cs file.

restore that file from the zip and place this jail.cs elsewhere


A short history on jail.cs

When I first wrote the jailsystem, before I ever released it...
I put it in the same file as the region for jail (jail.cs).

I later copied my jail.cs and removed the region information so if runuo updated the jail region file, the script wouldnt break.

However, I never renamed the file.

Therefore you should have 2 marshmellows, no more, no less. gah I mean 2 jail.cs files. One in the regions folder (where the jail region is defined) and one elsewhere. I keep mine in scripts\custom. Others keep theirs in the misc folder.
 
Top