Page 1 of 2

[mod] Jail [0.0.1] [jail]

PostPosted: Wed Jan 09, 2013 04:51
by RAPHAEL
EDIT: Decided to experiment with github. This mod is now on github.

The idea hit me earlier tonight when building a small town on the DTAmedia server.. why isn't there a jail mod? With the help of kaeza (thank you again) this mod was born.

What does it do? It allows anyone with the "jail" priv to send players to jail and release them from jail. Every 30 seconds it sends prisoners back to jail (in case they escape). You can edit the init.lua file to change how often it sends the prisoners to jail and also the jail coordinates. This mod also adds unbreakable jail wall, jail glass, jail bars and a warden pick (for breaking said unbreakable blocks).

To send someone to jail, do:
/jail playername

To release someone from jail do:
/release playername

To grant someone the priv to send someone to jail and release them do:
/grant playername jail

To get jail wall, glass, bars or pick:
/giveme wardenpick
/giveme jail:jailwall
/giveme jail:glass
/giveme jail:ironbars

You MUST build a jail before you can send someone to jail! (this shouldn't have to be mentioned but mentioning it anyway).

No screenshots are offered since theres nothing really to screenshot.

Feel free to offer better textures and any ideas. Also report any issues.


License: WTFPL (basically do what you want)
License URL: https://github.com/TheZenKitteh/minetest-jail/blob/master/LICENSE.txt
Download: https://github.com/TheZenKitteh/minetest-jail/archive/master.zip
Sources: https://github.com/TheZenKitteh/minetest-jail
To Install: Download the zip file, extract and rename resulting folder to jail. Move jail folder to mod directory.
Dependencies: None

EDIT: Yes I know the wardenpick looks very retarded. Feel free to offer a better texture :P

PostPosted: Wed Jan 09, 2013 05:01
by jojoa1997
yay this could be implemented on hungergame servers

PostPosted: Wed Jan 09, 2013 13:04
by rarkenin
Are you using set_attach to keep the person attached to the jail?

PostPosted: Wed Jan 09, 2013 14:09
by kaeza
Seems like you have added more features.
+1 My friend.

RAPHAEL wrote:With the help of kaeza (thank you again) this mod was born.

Image

PostPosted: Thu Jan 10, 2013 03:59
by RAPHAEL
rarkenin wrote:Are you using set_attach to keep the person attached to the jail?


No for the time being it just re-teleports listed prisoners back to jail every 30 seconds.

PostPosted: Fri Jan 11, 2013 20:52
by RAPHAEL
Decided to experiment with github hosting. Mod now hosted on github. See first post for details.

PostPosted: Sat Jan 12, 2013 01:42
by Melkor
I made a texture pack for this mod:
i build a jail just for fun, only to see how its look:

Image

Image

Image

Image


Download HERE http://ompldr.org/vaDFoNQ/Textures.zip
Licence: WTFPL


Image

"im innocent!!!"

PostPosted: Tue Jan 15, 2013 17:57
by rubenwardy
This looks fun...

PostPosted: Tue Jan 15, 2013 23:39
by shaunbrown1995
Testing on my server now.

I'll let you know if i find bugs.

PostPosted: Mon Apr 01, 2013 03:40
by ETC
Do you mind if I incorporate the code into another mod? I'll link back to this mod.

PostPosted: Mon Apr 01, 2013 15:33
by Luke123
This is a good mod for severs +1

PostPosted: Mon Apr 01, 2013 20:08
by rarkenin
Yeah. A noclip client can get out easily. Maybe poll for the jailed user's position then reset as needed?

Or perhaps use the entity attach feature.

PostPosted: Mon Apr 01, 2013 20:59
by Calinou
+1, attach the jailed guy to an invisible entity. :)

PostPosted: Tue Apr 02, 2013 10:13
by markveidemanis
What about the /spawn command in some servers?

PostPosted: Tue Apr 02, 2013 10:22
by Calinou
markveidemanis wrote:What about the /spawn command in some servers?


Tell the "spawn" mod devs to check for a "no_spawn" privilege which prevents the use of /spawn and grant it to the jailed players. Same for /home.

PostPosted: Tue Apr 02, 2013 11:54
by Traxie21
Why not just save all privs to a file when someone is sent to jail, then revoke all privs, and restore them from that file when unjailed.

PostPosted: Sun Jul 07, 2013 13:37
by Cooper97
rarkenin wrote:Are you using set_attach to keep the person attached to the jail?


Please make a version of the Jail Mod which use set_attach instead of a teleport.
Please make it also so that it revokes the privileges interact, fly, teleport and noclip of a jailed player.

PostPosted: Sun Jul 07, 2013 16:15
by Evergreen
Cooper97 wrote:
rarkenin wrote:Are you using set_attach to keep the person attached to the jail?


Please make a version of the Jail Mod which use set_attach instead of a teleport.
Please make it also so that it revokes the privileges interact, fly, teleport and noclip of a jailed player.
If someone could do that, then jails will actually be useful in minetest. :P

PostPosted: Sun Jul 07, 2013 17:55
by Shire
Maybe someone could make a Bubba/Bertha NPC, either for the fun of it, or make them hostile toward whoever's in the jail. That'd be hilarious.

PostPosted: Wed Jul 10, 2013 18:50
by webdesigner97
I was thinking of such a mod too :D I started it, but you were faster ;)

But the idea is really great!

PostPosted: Fri Jul 12, 2013 03:56
by BadWolf
I installed it, and built a jail. But if I /jail someone they don't transer into the jail

PostPosted: Fri Jul 12, 2013 09:56
by Cooper97
RAPHAEL wrote:You can edit the init.lua file to change how often it sends the prisoners to jail and also the jail coordinates.


You must change the jail coordinates in the init.lua file. Then it should work.

PostPosted: Sat Aug 03, 2013 12:04
by Junkman
It would be cool if a player who kills an other would become "pvp mod". It's name would become red, and when someone kills him in return the killer will go jailed for one hour or something like that.

PostPosted: Mon Aug 05, 2013 01:42
by Element
how do i change the jail coords.

PostPosted: Mon Aug 05, 2013 08:54
by PenguinDad
Element wrote:how do i change the jail coords.

You have to change in init.lua:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local jailpos = { x = -517, y = 36, z = 169 }
to the coordinates where you built the jail.

PostPosted: Wed Aug 07, 2013 01:22
by VanessaE
I am normally not one to say "just Google it"... but come on, that's what search engines are for.

A text editor is a program such as gedit or nodepad, that lets you edit plain text files, which is the form most computer programs' source code and scripts take, including Lua mods like those in Minetest.

If you don't know what these things are for, you should *NOT* be editing anything - you should be learning about this stuff.

PostPosted: Wed Aug 07, 2013 02:27
by Element
thank you all...i have now changed the coords.

PostPosted: Wed Aug 07, 2013 11:39
by Cooper97
Cooper97 wrote:
rarkenin wrote:Are you using set_attach to keep the person attached to the jail?


Please make a version of the Jail Mod which use set_attach instead of a teleport.
Please make it also so that it revokes the privileges interact, fly, teleport and noclip of a jailed player.


Is any good mod programmer here who can make such a version? It is bad that Raphael is not only since 3 months. The code is WTFPL (see in the first post).

PostPosted: Sat Aug 17, 2013 02:15
by SegFault22
Suggestion: Somehow make it possible to define two corners of the area of a ''jail'' (like with node_ownership areas), and check if people put in jail are in that area, and if not, then teleport them back to jail. That way, they can walk around in the cell without being moved to the center every few seconds.

PostPosted: Mon Aug 19, 2013 06:35
by Cooper97
SegFault22 wrote:Suggestion: Somehow make it possible to define two corners of the area of a ''jail'' (like with node_ownership areas), and check if people put in jail are in that area, and if not, then teleport them back to jail. That way, they can walk around in the cell without being moved to the center every few seconds.


The using of set_attach should be more useful than a normal teleport.