Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Releases

Custom Script Releases This forum is where you can release your custom scripts for other users to use.

Please note: By releasing your scripts here you are submitting them to the public and as such agree to make them public domain. The RunUO Team has made its software GPL for you to use and enjoy you should do the same for anything based off of RunUO.

Reply
 
Thread Tools Display Modes
Old 09-08-2006, 04:18 PM   #1 (permalink)
Forum Newbie
 
poorchava's Avatar
 
Join Date: May 2006
Location: Wroclaw, Poland
Age: 21
Posts: 63
Send a message via MSN to poorchava
Default Poorchava's Simple Jail System

Great thanks to Irian for helping me a lot when writing this script




This is my jail system designed for the shard iI'm currently working on.
How it works?
To jail a player, u must type [jail <hours> and target that player. Any int may be entered. If no number is entered, targeted player is jailed for 12 hours by defalut. Jailed player is teleported to jail, frozen and squelched. In his/her backpack a special item is placed, which when double-clicked shows time of penalty left, or teleports player out from jail, unfreezes and unsquelches (if the jail time is up). There are 2 locations to which a player is sent when freed from jail depending on the player being a murderer (red name) or not, so that the guards didn't instantly whack the ex-prisoner, and let's say unarmed crafter didn't get owned in an unguarded zone. By default these locations are on Ilshenar map, but that's easily changable (it is so now, cuz my shard uses Lakeshire on Ilshenar as the main town). There is a way to instantly unjail a player. It is [unjail command. When a jailed player is targeted with this command, he or she may instantly leave jail using the white ball in his/her backpack.

Versions, updates, bugs etc.
ver 1.01 :
Fixed a bug that caused a server crash when tried to jail a non-mobile or non-player.

Now i consider this version stable, as i didn't found any situation in which the script breaks/crashes server/works wrong way.

Installation
1) Drop files FreeFromJailBall.cs and JailCommand.cs into customs.
2) Edit file Scripts/Mobiles/PlayerMobile.cs. At line 95 add
Code:
public DateTime m_JailFreeTime;
[CommandProperty( AccessLevel.GameMaster )]
        public DateTime JailFreeTime
        {
            get { return m_JailFreeTime; }
            set { m_JailFreeTime = value; }
        }
If you have any suggestions about way the script is written, how it works etc. or if you find any bugs please write them down here.
This is my first script i have ever wrote from a scratch, so don't hestitate to judge me
Attached Files
File Type: rar jail.rar (1.9 KB, 345 views)

Last edited by poorchava; 09-08-2006 at 04:24 PM.
poorchava is offline   Reply With Quote
Old 09-09-2006, 08:57 AM   #2 (permalink)
Newbie
 
Join Date: Jul 2006
Posts: 43
Default

Nice script, any chance it will be updated for 2.0?
Xenovia is offline   Reply With Quote
Old 09-09-2006, 12:56 PM   #3 (permalink)
Forum Newbie
 
poorchava's Avatar
 
Join Date: May 2006
Location: Wroclaw, Poland
Age: 21
Posts: 63
Send a message via MSN to poorchava
Default

To be honest, i don't know how to do it, but script is so simple, that updating shouldn't be any hard. Well... I dodn't test it with v.2.0, so it's possible, that it will work without any changes.
poorchava is offline   Reply With Quote
Old 10-03-2006, 05:45 PM   #4 (permalink)
Account Terminated
 
Join Date: May 2006
Posts: 189
Default

I know this script is old and you may not support it anymore but you should add a command line argument to which cell they are sent to corresponding to the go menu. Because if I were going to use it i wouldnt want all my players in one central cell and if the argument is null just target your default cell that way people who dont give as much as a horseshit as me, dont HAVE to use it =D

Hope you can get around t it! (My scripting capability isnt that great or Id do it myself... yes i have tried =P)
Ruined1 is offline   Reply With Quote
Old 10-15-2006, 09:01 AM   #5 (permalink)
Forum Newbie
 
Join Date: Oct 2006
Age: 19
Posts: 1
Default

Quote:
Originally Posted by poorchava
Great thanks to Irian for helping me a lot when writing this script




This is my jail system designed for the shard iI'm currently working on.
How it works?
To jail a player, u must type [jail <hours> and target that player. Any int may be entered. If no number is entered, targeted player is jailed for 12 hours by defalut. Jailed player is teleported to jail, frozen and squelched. In his/her backpack a special item is placed, which when double-clicked shows time of penalty left, or teleports player out from jail, unfreezes and unsquelches (if the jail time is up). There are 2 locations to which a player is sent when freed from jail depending on the player being a murderer (red name) or not, so that the guards didn't instantly whack the ex-prisoner, and let's say unarmed crafter didn't get owned in an unguarded zone. By default these locations are on Ilshenar map, but that's easily changable (it is so now, cuz my shard uses Lakeshire on Ilshenar as the main town). There is a way to instantly unjail a player. It is [unjail command. When a jailed player is targeted with this command, he or she may instantly leave jail using the white ball in his/her backpack.

Versions, updates, bugs etc.
ver 1.01 :
Fixed a bug that caused a server crash when tried to jail a non-mobile or non-player.

Now i consider this version stable, as i didn't found any situation in which the script breaks/crashes server/works wrong way.

Installation
1) Drop files FreeFromJailBall.cs and JailCommand.cs into customs.
2) Edit file Scripts/Mobiles/PlayerMobile.cs. At line 95 add
Code:
public DateTime m_JailFreeTime;
[CommandProperty( AccessLevel.GameMaster )]
        public DateTime JailFreeTime
        {
            get { return m_JailFreeTime; }
            set { m_JailFreeTime = value; }
        }
If you have any suggestions about way the script is written, how it works etc. or if you find any bugs please write them down here.
This is my first script i have ever wrote from a scratch, so don't hestitate to judge me
... And I have inquiry. What means to you ,,at line 95 add´´ . I am stupid and thank-you
Fifin is offline   Reply With Quote
Old 10-15-2006, 09:17 AM   #6 (permalink)
Forum Expert
 
Join Date: Dec 2005
Location: London UK
Age: 22
Posts: 411
Default

Quote:
Originally Posted by Fifin
... And I have inquiry. What means to you ,,at line 95 add´´ . I am stupid and thank-you
Open your playermobile script hold down control and press G i little "gump" will pop up in there type 95 and press ok it will take you to line 95 of the script then add the code he listed above.
skills3200 is offline   Reply With Quote
Old 10-15-2006, 09:40 PM   #7 (permalink)
Forum Newbie
 
Admin SevenEleven's Avatar
 
Join Date: Oct 2006
Posts: 5
Default Awesome

This script is awesome thanks.
__________________
Admin SevenEleven
Admin-Forever-High
Admin SevenEleven is offline   Reply With Quote
Old 10-16-2006, 09:50 PM   #8 (permalink)
Forum Newbie
 
poorchava's Avatar
 
Join Date: May 2006
Location: Wroclaw, Poland
Age: 21
Posts: 63
Send a message via MSN to poorchava
Default

Quote:
I know this script is old and you may not support it anymore but you should add a command line argument to which cell they are sent to corresponding to the go menu. Because if I were going to use it i wouldnt want all my players in one central cell and if the argument is null just target your default cell that way people who dont give as much as a horseshit as me, dont HAVE to use it =D
Well, i don't think it would be any hard to add it to the script, but needs some time, which i don't have now. Anyway, i don't see any point in putting players into separate cells. I made script squelch and freeze them, so that only thing a jailed player can do is LogOut.

If you want to make some gump for cell selection you might want to look at Tithing Gump to see how GumpEngine works. If i wanted to place players into separate cells,I'd make something like this
Code:
switch (Utility.Random(6))
{
case 0: //put into cell #1
case 1: //put into cell #2
.
.
and so on
.
.

}

Maybe when I finish my current project (3rd Degree Equation Solver) I'll take a look at this script, but I don;t expect it happening any soon
poorchava is offline   Reply With Quote
Old 10-17-2006, 04:05 PM   #9 (permalink)
Forum Expert
 
Join Date: Jan 2004
Location: Florida
Age: 33
Posts: 544
Default

Quote:
Originally Posted by poorchava
2) Edit file Scripts/Mobiles/PlayerMobile.cs. At line 95 add
Code:
public DateTime m_JailFreeTime;
[CommandProperty( AccessLevel.GameMaster )]
        public DateTime JailFreeTime
        {
            get { return m_JailFreeTime; }
            set { m_JailFreeTime = value; }
        }
If you have any suggestions about way the script is written, how it works etc. or if you find any bugs please write them down here.
This is my first script i have ever wrote from a scratch, so don't hestitate to judge me
If you only add this to Playermobile, without serializing it, you will lose the info if the server reboots.
Avelyn is offline   Reply With Quote
Old 10-20-2006, 03:19 AM   #10 (permalink)
Forum Newbie
 
poorchava's Avatar
 
Join Date: May 2006
Location: Wroclaw, Poland
Age: 21
Posts: 63
Send a message via MSN to poorchava
Default

oooOOOO (o.O) damn! How comes nobody before you saw this, omfg!

Sadly, i can't fix it right now (no time for anything, not only scripting)
poorchava is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5