|
||
|
|||||||
| 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. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Newbie
|
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 Last edited by poorchava; 09-08-2006 at 04:24 PM. |
|
|
|
|
|
#4 (permalink) |
|
Account Terminated
Join Date: May 2006
Posts: 189
|
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) |
|
|
|
|
|
#5 (permalink) | |
|
Forum Newbie
Join Date: Oct 2006
Age: 19
Posts: 1
|
Quote:
![]() |
|
|
|
|
|
|
#6 (permalink) | |
|
Forum Expert
Join Date: Dec 2005
Location: London UK
Age: 22
Posts: 411
|
Quote:
|
|
|
|
|
|
|
#8 (permalink) | |
|
Forum Newbie
|
Quote:
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 |
|
|
|
|
|
|
#9 (permalink) | |
|
Forum Expert
Join Date: Jan 2004
Location: Florida
Age: 33
Posts: 544
|
Quote:
|
|
|
|
|
|
|
#10 (permalink) |
|
Forum Newbie
|
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) |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|