[Mod] Privilege Areas [0.1] [privilegeareas]

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

[Mod] Privilege Areas [0.1] [privilegeareas]

by rubenwardy » Post

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.
Contact:

by Traxie21 » Post

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 » Post

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

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

by rubenwardy » Post

Added box areas.

Soon: A gui for the admin.

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

by sfan5 » Post

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

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

by rubenwardy » Post

Added a gui that adds an area.

Code: Select all

/privareas

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

by BlockMen » Post

+1

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

by BrunoMine » Post

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: 3089
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Post

Thank you for making this mod. I like the fact that players can't interact in areas they don't own.
You can now find my videos at BitChute: https://www.bitchute.com/channel/some_cheeky_jinuskian/

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

by BrunoMine » Post

I went into the multiplayer mode.
I did a test. Look what happened:
+ 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: 3089
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Post

An idea for this mod is that creative or survival could be set per player.
You can now find my videos at BitChute: https://www.bitchute.com/channel/some_cheeky_jinuskian/

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

by BrunoMine » Post

brunob.santos wrote:I went into the multiplayer mode.
I did a test. Look what happened:
+ Spoiler
Translate my complaint.
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com

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

by rubenwardy » Post

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 » Post

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

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

by rubenwardy » Post

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 » Post

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 » Post

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

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

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

by BirgitLachner » Post

Is the Mod still useable with the newest version?

User avatar
Lone_Wolf
Member
Posts: 2341
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: Lone_Wolf or LoneWolfHT
In-game: Lone_Wolf
Location: Not there, THERE!

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

by Lone_Wolf » Post

Just what I was looking for! I hope it will work...

User avatar
Lone_Wolf
Member
Posts: 2341
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: Lone_Wolf or LoneWolfHT
In-game: Lone_Wolf
Location: Not there, THERE!

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

by Lone_Wolf » Post

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: 383
Joined: Thu May 05, 2016 10:18
In-game: Bibs

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

by BirgitLachner » Post

Would be quite usefull for educational use ...

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

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

by ManElevation » Post

hum interesting, does it still work?
My Public Mods! Discord: Rottweiler Games#3368

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

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

by rubenwardy » Post

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: 2341
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: Lone_Wolf or LoneWolfHT
In-game: Lone_Wolf
Location: Not there, THERE!

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

by Lone_Wolf » Post

I redownloaded the mod today and got this error
Image

User avatar
AndroBuilder
Member
Posts: 51
Joined: Mon Dec 04, 2017 11:34
In-game: AndroBuilder

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

by AndroBuilder » Post

Code: Select all

privilegeareas = {
 
    players = nil,
    userdata = {},
areas = {
        type="box",  -- box or radius area types
        location = {x=450,y=80,z=2010},
        location2 = {x=550,y=300,z=2080},
        actions = {
            on_enter = {
                grant = {"fly"}
            },
            on_leave = {
                take = {"fly"}
            }
        },
},
 
    createPlayerTable = function(player)
        if not privilegeareas.players then
            load_data()
        end
....
....
....
and no fly privalage on the server if a user enters this area.
What did i make wrong?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest