[mod] Jail [0.0.1] [jail]

User avatar
RAPHAEL
Member
 
Posts: 627
Joined: Tue Nov 01, 2011 09:09

[mod] Jail [0.0.1] [jail]

by RAPHAEL » Wed Jan 09, 2013 04:51

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
Last edited by RAPHAEL on Sun Jan 27, 2013 04:36, edited 1 time in total.
"Before you speak, ask yourself: Is it kind, is it true, is it necessary, does it improve upon the silence?"
My mods: http://goo.gl/n4kpn
(Currently Various, Industrial, Fakeblocks, Jail, MoarCraft, Christmas, Replicator, minetest dev installer for linux, bash mod installer, windows mod installer)
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Wed Jan 09, 2013 05:01

yay this could be implemented on hungergame servers
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

rarkenin
Member
 
Posts: 668
Joined: Tue Nov 20, 2012 20:48

by rarkenin » Wed Jan 09, 2013 13:04

Are you using set_attach to keep the person attached to the jail?
Admin pro tempore on 0gb.us:30000. Ask me if you have a problem, or just want help.
This is a signature virus. Add me to your signature so that I can multiply.
Now working on my own clone, Mosstest.
I guess I'm back for some time.
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Wed Jan 09, 2013 14:09

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
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

User avatar
RAPHAEL
Member
 
Posts: 627
Joined: Tue Nov 01, 2011 09:09

by RAPHAEL » Thu Jan 10, 2013 03:59

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.
"Before you speak, ask yourself: Is it kind, is it true, is it necessary, does it improve upon the silence?"
My mods: http://goo.gl/n4kpn
(Currently Various, Industrial, Fakeblocks, Jail, MoarCraft, Christmas, Replicator, minetest dev installer for linux, bash mod installer, windows mod installer)
 

User avatar
RAPHAEL
Member
 
Posts: 627
Joined: Tue Nov 01, 2011 09:09

by RAPHAEL » Fri Jan 11, 2013 20:52

Decided to experiment with github hosting. Mod now hosted on github. See first post for details.
"Before you speak, ask yourself: Is it kind, is it true, is it necessary, does it improve upon the silence?"
My mods: http://goo.gl/n4kpn
(Currently Various, Industrial, Fakeblocks, Jail, MoarCraft, Christmas, Replicator, minetest dev installer for linux, bash mod installer, windows mod installer)
 

User avatar
Melkor
Member
 
Posts: 285
Joined: Sat Sep 24, 2011 01:03

by Melkor » Sat Jan 12, 2013 01:42

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!!!"
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Tue Jan 15, 2013 17:57

This looks fun...
 

shaunbrown1995
Member
 
Posts: 96
Joined: Fri Mar 30, 2012 19:03

by shaunbrown1995 » Tue Jan 15, 2013 23:39

Testing on my server now.

I'll let you know if i find bugs.
 

ETC
New member
 
Posts: 4
Joined: Thu Mar 28, 2013 18:45

by ETC » Mon Apr 01, 2013 03:40

Do you mind if I incorporate the code into another mod? I'll link back to this mod.
Last edited by ETC on Mon Apr 01, 2013 03:40, edited 1 time in total.
 

User avatar
Luke123
Member
 
Posts: 51
Joined: Sun Mar 31, 2013 17:51

by Luke123 » Mon Apr 01, 2013 15:33

This is a good mod for severs +1
My minetest username is <King>
BTW I like pie <3
 

rarkenin
Member
 
Posts: 668
Joined: Tue Nov 20, 2012 20:48

by rarkenin » Mon Apr 01, 2013 20:08

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.
Admin pro tempore on 0gb.us:30000. Ask me if you have a problem, or just want help.
This is a signature virus. Add me to your signature so that I can multiply.
Now working on my own clone, Mosstest.
I guess I'm back for some time.
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Mon Apr 01, 2013 20:59

+1, attach the jailed guy to an invisible entity. :)
Last edited by Calinou on Mon Apr 01, 2013 21:01, edited 1 time in total.
 

markveidemanis
Member
 
Posts: 211
Joined: Thu Sep 27, 2012 15:41

by markveidemanis » Tue Apr 02, 2013 10:13

What about the /spawn command in some servers?
BitCoin: 1Eq4arvykGNa1YC2DbJpWcwGfMvtFGjAoR
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Tue Apr 02, 2013 10:22

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.
 

User avatar
Traxie21
Member
 
Posts: 753
Joined: Mon Dec 31, 2012 10:48

by Traxie21 » Tue Apr 02, 2013 11:54

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.
 

User avatar
Cooper97
Member
 
Posts: 52
Joined: Thu Feb 21, 2013 19:55

by Cooper97 » Sun Jul 07, 2013 13:37

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.
Last edited by Cooper97 on Sun Jul 07, 2013 13:48, edited 1 time in total.
Sorry for my bad english. (I am from germany.)
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Sun Jul 07, 2013 16:15

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
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

Shire
Member
 
Posts: 19
Joined: Sat Jul 06, 2013 13:20

by Shire » Sun Jul 07, 2013 17:55

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.
 

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

by webdesigner97 » Wed Jul 10, 2013 18:50

I was thinking of such a mod too :D I started it, but you were faster ;)

But the idea is really great!
 

BadWolf
Member
 
Posts: 42
Joined: Thu Jun 27, 2013 17:27

by BadWolf » Fri Jul 12, 2013 03:56

I installed it, and built a jail. But if I /jail someone they don't transer into the jail
 

User avatar
Cooper97
Member
 
Posts: 52
Joined: Thu Feb 21, 2013 19:55

by Cooper97 » Fri Jul 12, 2013 09:56

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.
Sorry for my bad english. (I am from germany.)
 

User avatar
Junkman
New member
 
Posts: 5
Joined: Sat Aug 03, 2013 11:59

by Junkman » Sat Aug 03, 2013 12:04

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.
Last edited by Junkman on Sat Aug 03, 2013 12:40, edited 1 time in total.
 

User avatar
Element
Member
 
Posts: 269
Joined: Tue Jun 11, 2013 00:27
IRC: Elementwing4962
In-game: Elementwing4962

by Element » Mon Aug 05, 2013 01:42

how do i change the jail coords.
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9
 

User avatar
PenguinDad
Member
 
Posts: 122
Joined: Wed Apr 10, 2013 16:46
GitHub: PenguinDad
IRC: PenguinDad GhostDoge
In-game: PenguinDad

by PenguinDad » Mon Aug 05, 2013 08:54

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.
Last edited by PenguinDad on Mon Aug 05, 2013 15:18, edited 1 time in total.
<Cyndra> Programming properly in C++ feels like putting together a jigsaw puzzle
<Cyndra> where the peices don't fit and the picture doesn't matter.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Wed Aug 07, 2013 01:22

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.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
Element
Member
 
Posts: 269
Joined: Tue Jun 11, 2013 00:27
IRC: Elementwing4962
In-game: Elementwing4962

by Element » Wed Aug 07, 2013 02:27

thank you all...i have now changed the coords.
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9
 

User avatar
Cooper97
Member
 
Posts: 52
Joined: Thu Feb 21, 2013 19:55

by Cooper97 » Wed Aug 07, 2013 11:39

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).
Sorry for my bad english. (I am from germany.)
 

User avatar
SegFault22
Member
 
Posts: 870
Joined: Mon May 21, 2012 03:17

by SegFault22 » Sat Aug 17, 2013 02:15

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.
Resources are abundant; only money is scarce. People should not have to work hard and remain poor just to pay for the needs of survival.
Society can thrive without money - but only if productive members of society are rewarded for being productive.
 

User avatar
Cooper97
Member
 
Posts: 52
Joined: Thu Feb 21, 2013 19:55

by Cooper97 » Mon Aug 19, 2013 06:35

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.
Sorry for my bad english. (I am from germany.)
 

Next

Return to Old Mods

Who is online

Users browsing this forum: No registered users and 5 guests

cron