[Package Index | Mudlib Index | Effect Index]
.
int add_cell(string cell, int security)This function adds a cell to the prison. At the moment only one cell is permitted per security level.
void add_prisoner(object prisoner, int security)This function adds a player as a prisoner. Creates the container where to store his item.s
int calculate_bail(string name)Calculates the amount of money-units that bailing a player at this time costs.
void check_prisoners()This function is called by chime() to release all prisoners whos sentence is over and reduce the time left for those who have to stay a bit longer.
void clean_records()This function goes through the prisoner records and removes every one which does not have a valid user as the key.
void confiscate_items(object prisoner, object container, int security)
int do_bail_info(string name)This command gives the player info on how much it will cost to bail another player.
int do_bail_out(object player)This command bails a player from prison.
int do_imprison(object player)The command used to imprison a criminal. Gets the security level, removes the arrested-effect and turns the player over to the prison. NPCs are moved to the rubbish room.
void do_release(string name)This function is called when a player is due to be released from prison. Adds the "being released from prison"-property to prevent a player from running while his stuff is being returned.
void do_return_stuff(string name)This function loads a player's confiscated items, then calls out get_stuff_from_container to actually return the items.
void event_lockpick(object ob, object player, int success)
void get_stuff_from_container(string name)Function which moves the items from a player's container back to the player. If he can't carry them for any reason, they are dropped onto the floor.
void lock_cells()This function closes all cell-doors and locks them.
void perform_container_merge(object container, object box)
void prisoner_escape(string name)This function is called by the cells if a player inside them leaves without haveing the "being released from prison"-property on him.
void prisoner_login(string name)This function is called by the cells if a player logs in inside them.
void prisoner_net_dead(string name)This function is called by the cells if a player inside them goes net-dead.
void prisoner_quit(string name)This function is called by the cells if a player inside them quits.
void prisoner_refresh(string name)This function is called by the watch-handler if a registered criminal refreshes or deletes. If he's got any items in this prison, the files are erased.
void prisoner_release(string name)This function is used to delete a prisoner from the prisoners-mapping and return his confiscated items.
string * query_cells()This function returns the filenames of all the cells associated with this prison.
int query_prison()Function to verify this is a prison.
int query_prisoner(string name)This function checks whether the specified player is a valid prisoner.
mapping query_prisoners()Function to return the _prisoners-mapping. The elements are of the prisoner-class.
string query_savepath()Queries the path where the prison saves everything.
int query_tells_used(string name)This function returns how many tells a prisoner has used.
int query_time_left(string name)
int remove_cell(int security)This function removes a cell from the prison.
void remove_corpse()This function removes all corpses from all cells and dumps them here.
void return_boxed_items(object prisoner, object container)
void send_away_npcs()This functions clears up all NPCs in the room, since for some reasons they tend to pile up. Fighting NPCs are ignored. If the NPC does not have any move zones, it is assumed it is not supposed to wander around and moved to the rubbish room. If it does have one which is not Ankh-Morpork, add AM and send it away. Otherwise ignore it.
int set_guard(string name)This sets the name of the guard to use.
int set_savepath(string path)This sets the path where the prison shall store its savefile and those of the prisoners.
void tell_time_left(object player)This function tells a player how much time he has left to serve.
void tell_used(string name)This function is called when a prisoner uses up a tell.
void throw_out(object player)This function throws a player out of prison if he doesn't belong there.
int time_passed_in_quarter_hour()This function calculates the time necessary to correct the quarter-hour reducing of the sentence directly after imprisonment.
class prisoner { int cell; int time_to_serve; int logged_on; int confiscated; int tells_used; }