Page 1 of 1

[Mod] Privilege Areas [0.1] [privilegeareas]

PostPosted: Wed Apr 10, 2013 15:16
by rubenwardy
This mod grant or revokes privileges to players depending on their position.

Download



License: WTFPL
Dependencies: None

Download Latest
... view it on Github

USAGE


You need to define areas.

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
{
    type="box",  -- box or radius area types
    location = {x=-30000,y=100,z=-30000},
    location2 = {x=30000,y=30000,z=30000},
    actions = {
        on_enter = {
            grant = {"fly"}
        },
           
        on_leave = {
            take = {"fly"}
        }
    },
}


If player enters the area (is less than 10 metres away from {0,100,0}), "fly" is granted.
If player leaves the area (is more than 10 metres away from {0,100,0}),"fly" is taken away.

PostPosted: Wed Apr 10, 2013 15:17
by Traxie21
Hm, this could easily work with my ranks system for faster setup.

PostPosted: Wed Apr 10, 2013 15:18
by jojoa1997
this could work with adventure maps

PostPosted: Wed Apr 10, 2013 16:00
by rubenwardy
Added box areas.

Soon: A gui for the admin.

PostPosted: Wed Apr 10, 2013 17:29
by sfan5
Nice!

PostPosted: Thu Apr 11, 2013 15:21
by rubenwardy
Added a gui that adds an area.

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
/privareas

PostPosted: Thu Apr 11, 2013 15:24
by BlockMen
+1

PostPosted: Sat Sep 21, 2013 21:29
by BrunoMine
This mod seems very useful, but I do not understand how it works.
I already downloaded the mod but do not know how to use lo.Aonde I write the coordinates? Where do I put the privs? which file?

Was that it?
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
/privareas <privilege> <Coordnate1> <Coordinate2>

PostPosted: Sat Sep 21, 2013 22:38
by Inocudom
Thank you for making this mod. I like the fact that players can't interact in areas they don't own.

PostPosted: Sun Sep 22, 2013 15:59
by BrunoMine
I went into the multiplayer mode.
I did a test. Look what happened:

[spoiler]
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
-------------
  Separator 
-------------

GUIConfigureWorld: Not allowing focus change.
GUIConfigureWorld: Not allowing focus change.
[PrivilegeAreas] Loading data
12:56:54: ACTION[main]:         .__               __                   __   
12:56:54: ACTION[main]:   _____ |__| ____   _____/  |_  ____   _______/  |_
12:56:54: ACTION[main]:  /     \|  |/    \_/ __ \   __\/ __ \ /  ___/\   __\
12:56:54: ACTION[main]: |  Y Y  \  |   |  \  ___/|  | \  ___/ \___ \  |  | 
12:56:54: ACTION[main]: |__|_|  /__|___|  /\___  >__|  \___  >____  > |__| 
12:56:54: ACTION[main]:       \/        \/     \/          \/     \/       
12:56:54: ACTION[main]: World at [C:\Users\Bruno\Desktop\minetest-0.4.7\bin\..\worlds\ddd]
12:56:54: ACTION[main]: Server for gameid="minetest" listening on port 30000.
creative inventory size: 176
on_newplayer
[PrivilegeAreas] writing player table for admin
12:56:55: ACTION[ServerThread]: admin joins game. List of players: admin
Font size: 8 17
Showing add area form to admin
submitting
Showing add action form for area 1
{type = "box", location = {y = 1, x = 1, z = 1}, actions = {on_leave = {}, on_enter = {}}, location2 = {y = 2, x = 2, z = 2}}
submitting
12:57:42: ACTION[ServerThread]: admin leaves game. List of players:
12:57:42: ERROR[main]: ServerError: LuaError: error: ...esktop\minetest-0.4.7\bin\..\mods\privilegeareas/gui.lua:159: bad argument #1 to 'insert' (table expected, got nil)
12:57:42: ERROR[main]: stack traceback:
[PrivilegeAreas] Saving data
In trans_func.
Access violation at 5474754F write?=8 address=1416918351
12:57:43: ERROR[main]: Some exception: "Access violation"
In trans_func.
Access violation at 00D3A0B0 write?=8 address=13869232
12:57:43: ERROR[main]: ERROR: An unhandled exception occurred: Access violation

In thread 8ac:
..\..\src\minetest\src\main.cpp:2181: main: Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD 8ac:
#0  main
(Leftover data: #1  ServerMap::save)
(Leftover data: #2  ServerMap::saveBlock)
(Leftover data: #3  Client::Receive)
(Leftover data: #4  Client::ProcessData)
(Leftover data: #5  MeshUpdateQueue::addBlock)

minetest stopped working![/spoiler]

PostPosted: Mon Sep 23, 2013 00:55
by Inocudom
An idea for this mod is that creative or survival could be set per player.

PostPosted: Mon Sep 23, 2013 01:15
by BrunoMine
brunob.santos wrote:I went into the multiplayer mode.
I did a test. Look what happened:

[spoiler]
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
-------------
  Separator 
-------------

GUIConfigureWorld: Not allowing focus change.
GUIConfigureWorld: Not allowing focus change.
[PrivilegeAreas] Loading data
12:56:54: ACTION[main]:         .__               __                   __   
12:56:54: ACTION[main]:   _____ |__| ____   _____/  |_  ____   _______/  |_
12:56:54: ACTION[main]:  /     \|  |/    \_/ __ \   __\/ __ \ /  ___/\   __\
12:56:54: ACTION[main]: |  Y Y  \  |   |  \  ___/|  | \  ___/ \___ \  |  | 
12:56:54: ACTION[main]: |__|_|  /__|___|  /\___  >__|  \___  >____  > |__| 
12:56:54: ACTION[main]:       \/        \/     \/          \/     \/       
12:56:54: ACTION[main]: World at [C:\Users\Bruno\Desktop\minetest-0.4.7\bin\..\worlds\ddd]
12:56:54: ACTION[main]: Server for gameid="minetest" listening on port 30000.
creative inventory size: 176
on_newplayer
[PrivilegeAreas] writing player table for admin
12:56:55: ACTION[ServerThread]: admin joins game. List of players: admin
Font size: 8 17
Showing add area form to admin
submitting
Showing add action form for area 1
{type = "box", location = {y = 1, x = 1, z = 1}, actions = {on_leave = {}, on_enter = {}}, location2 = {y = 2, x = 2, z = 2}}
submitting
12:57:42: ACTION[ServerThread]: admin leaves game. List of players:
12:57:42: ERROR[main]: ServerError: LuaError: error: ...esktop\minetest-0.4.7\bin\..\mods\privilegeareas/gui.lua:159: bad argument #1 to 'insert' (table expected, got nil)
12:57:42: ERROR[main]: stack traceback:
[PrivilegeAreas] Saving data
In trans_func.
Access violation at 5474754F write?=8 address=1416918351
12:57:43: ERROR[main]: Some exception: "Access violation"
In trans_func.
Access violation at 00D3A0B0 write?=8 address=13869232
12:57:43: ERROR[main]: ERROR: An unhandled exception occurred: Access violation

In thread 8ac:
..\..\src\minetest\src\main.cpp:2181: main: Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD 8ac:
#0  main
(Leftover data: #1  ServerMap::save)
(Leftover data: #2  ServerMap::saveBlock)
(Leftover data: #3  Client::Receive)
(Leftover data: #4  Client::ProcessData)
(Leftover data: #5  MeshUpdateQueue::addBlock)

minetest stopped working![/spoiler]


Translate my complaint.

PostPosted: Wed Dec 11, 2013 12:41
by rubenwardy
Sorry, brunob.santos, I completely missed that bug report.

I will be updating this soon. (I will also add awards support).

PostPosted: Fri Dec 27, 2013 07:05
by LuxAtheris
Is this mod still ongoing?

PostPosted: Fri Dec 27, 2013 08:52
by rubenwardy
It is not dead, but i have not got around to updating it yet.

PostPosted: Fri Dec 27, 2013 10:33
by LuxAtheris
rubenwardy wrote:It is not dead, but i have not got around to updating it yet.

Ohh,sorry about that.

PostPosted: Fri Jan 03, 2014 09:56
by LuxAtheris
I cant understand this.