[Mod] Privilege Areas [0.1] [privilegeareas]

User avatar
rubenwardy
Moderator
 
Posts: 4801
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

[Mod] Privilege Areas [0.1] [privilegeareas]

by rubenwardy » Wed Apr 10, 2013 15:16

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.

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.
Last edited by rubenwardy on Wed May 18, 2016 21:47, edited 3 times in total.
 

User avatar
Traxie21
Member
 
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.

by Traxie21 » Wed Apr 10, 2013 15:17

Hm, this could easily work with my ranks system for faster setup.
 

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

by jojoa1997 » Wed Apr 10, 2013 15:18

this could work with adventure maps
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

User avatar
rubenwardy
Moderator
 
Posts: 4801
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Wed Apr 10, 2013 16:00

Added box areas.

Soon: A gui for the admin.
 

User avatar
sfan5
Moderator
 
Posts: 3703
Joined: Wed Aug 24, 2011 09:44
Location: Germany
GitHub: sfan5
IRC: sfan5

by sfan5 » Wed Apr 10, 2013 17:29

Nice!
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
rubenwardy
Moderator
 
Posts: 4801
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Thu Apr 11, 2013 15:21

Added a gui that adds an area.

Code: Select all
/privareas
 

User avatar
BlockMen
Developer
 
Posts: 768
Joined: Fri Mar 01, 2013 17:24
Location: Germany
GitHub: BlockMen
 

User avatar
BrunoMine
Member
 
Posts: 964
Joined: Thu Apr 25, 2013 17:29
Location: SP-Brasil
GitHub: BrunoMine

by BrunoMine » Sat Sep 21, 2013 21:29

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?
Code: Select all
/privareas <privilege> <Coordnate1> <Coordinate2>
Last edited by BrunoMine on Sat Sep 21, 2013 23:29, edited 1 time in total.
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

User avatar
Inocudom
Member
 
Posts: 2945
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Sat Sep 21, 2013 22:38

Thank you for making this mod. I like the fact that players can't interact in areas they don't own.
 

User avatar
BrunoMine
Member
 
Posts: 964
Joined: Thu Apr 25, 2013 17:29
Location: SP-Brasil
GitHub: BrunoMine

by BrunoMine » Sun Sep 22, 2013 15:59

I went into the multiplayer mode.
I did a test. Look what happened:

[spoiler]
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]
Last edited by BrunoMine on Mon Sep 23, 2013 01:14, edited 1 time in total.
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

User avatar
Inocudom
Member
 
Posts: 2945
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Mon Sep 23, 2013 00:55

An idea for this mod is that creative or survival could be set per player.
 

User avatar
BrunoMine
Member
 
Posts: 964
Joined: Thu Apr 25, 2013 17:29
Location: SP-Brasil
GitHub: BrunoMine

by BrunoMine » Mon Sep 23, 2013 01:15

brunob.santos wrote:I went into the multiplayer mode.
I did a test. Look what happened:

[spoiler]
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.
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

User avatar
rubenwardy
Moderator
 
Posts: 4801
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Wed Dec 11, 2013 12:41

Sorry, brunob.santos, I completely missed that bug report.

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

User avatar
LuxAtheris
Member
 
Posts: 169
Joined: Fri Oct 25, 2013 00:54
Location: Aether

by LuxAtheris » Fri Dec 27, 2013 07:05

Is this mod still ongoing?
Believe you can and you’re halfway there.
 

User avatar
rubenwardy
Moderator
 
Posts: 4801
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Fri Dec 27, 2013 08:52

It is not dead, but i have not got around to updating it yet.
 

User avatar
LuxAtheris
Member
 
Posts: 169
Joined: Fri Oct 25, 2013 00:54
Location: Aether

by LuxAtheris » Fri Dec 27, 2013 10:33

rubenwardy wrote:It is not dead, but i have not got around to updating it yet.

Ohh,sorry about that.
Believe you can and you’re halfway there.
 

User avatar
LuxAtheris
Member
 
Posts: 169
Joined: Fri Oct 25, 2013 00:54
Location: Aether

by LuxAtheris » Fri Jan 03, 2014 09:56

I cant understand this.
Believe you can and you’re halfway there.
 

User avatar
BirgitLachner
Member
 
Posts: 279
Joined: Thu May 05, 2016 10:18
In-game: Bibs
 

User avatar
Lone_Wolf
Member
 
Posts: 1591
Joined: Sun Apr 09, 2017 05:50
Location: Hometown server
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf or Somebody
 

User avatar
Lone_Wolf
Member
 
Posts: 1591
Joined: Sun Apr 09, 2017 05:50
Location: Hometown server
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf or Somebody

Re: [Mod] Privilege Areas [0.1] [privilegeareas]

by Lone_Wolf » Sat Oct 21, 2017 14:27

When I clicked 'Add' in the gui this happened:
Code: Select all
2017-10-21 07:19:13: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'privilegeareas' in callback on_playerReceiveFields(): ...etest\bin\..\games\minefight\mods\privilegeareas/gui.lua:159: bad argument #1 to 'insert' (table expected, got nil)
2017-10-21 07:19:13: ERROR[Main]: stack traceback:
2017-10-21 07:19:13: ERROR[Main]:    [C]: in function 'insert'
2017-10-21 07:19:13: ERROR[Main]:    ...etest\bin\..\games\minefight\mods\privilegeareas/gui.lua:159: in function <...etest\bin\..\games\minefight\mods\privilegeareas/gui.lua:141>
2017-10-21 07:19:13: ERROR[Main]:    ...\Desktop\MT\Minetest\bin\..\builtin\game\register.lua:412: in function <...\Desktop\MT\Minetest\bin\..\builtin\game\register.lua:392>
 

User avatar
BirgitLachner
Member
 
Posts: 279
Joined: Thu May 05, 2016 10:18
In-game: Bibs
 

User avatar
ManElevation
Member
 
Posts: 699
Joined: Tue Aug 02, 2016 22:04
Location: Madrid,Spain
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
 

User avatar
rubenwardy
Moderator
 
Posts: 4801
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Privilege Areas [0.1] [privilegeareas]

by rubenwardy » Sun Oct 22, 2017 19:31

I'm not currently maintaining this mod, and have been considering it old and unmaintained. However given the interest I'm willing to pick up support again when I'm freer in a few weeks time
 

User avatar
Lone_Wolf
Member
 
Posts: 1591
Joined: Sun Apr 09, 2017 05:50
Location: Hometown server
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf or Somebody
 


Return to Old Mods



Who is online

Users browsing this forum: No registered users and 0 guests