PVP active in one or more areas

User avatar
luizrpgluiz
Member
 
Posts: 18
Joined: Thu Mar 19, 2015 18:11
IRC: luizrpgluiz
In-game: luizinho

PVP active in one or more areas

by luizrpgluiz » Thu Aug 13, 2015 23:07

would be very good in some future update has just pvp activated in just in one or more areas in minetest.
 

User avatar
programmingchicken
Member
 
Posts: 540
Joined: Sat Apr 18, 2015 02:20
Location: not here
GitHub: pchicken
IRC: chicken pchicken

Re: PVP active in one or more areas

by programmingchicken » Thu Aug 13, 2015 23:39

there is minetest.register_on_punch() to disable damage, you can easily check the position of the puncher and punchee to see if they are in an area.
<gamerdude> I apologize for the above content
 

User avatar
orwell
Member
 
Posts: 778
Joined: Wed Jun 24, 2015 18:45
Location: Raxacoricofallapatorius
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell

Re: PVP active in one or more areas

by orwell » Tue Aug 18, 2015 08:39

I implemented PvP active/inactive in areas in my mod:
https://forum.minetest.net/viewtopic.php?f=9&t=12754
Either use my mod or write your own mod.

Remember that the register_on_punchplayer() does not exist yet in stable 0.4.12, it is available in 0.4.12-dev only.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

User avatar
programmingchicken
Member
 
Posts: 540
Joined: Sat Apr 18, 2015 02:20
Location: not here
GitHub: pchicken
IRC: chicken pchicken

Re: PVP active in one or more areas

by programmingchicken » Tue Aug 18, 2015 14:47

Oh. I guess since I use dev it works for me. :3
<gamerdude> I apologize for the above content
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: PVP active in one or more areas

by everamzah » Tue Aug 18, 2015 16:22

I use an AreaStore to mark an area and check if a player is in it on punch: https://github.com/everamzah/dcb/blob/m ... /nopvp.lua -- I imagine this is the entirely wrong way to use AreaStore but it seems to work. I invert the damage instead of disabling it. The red tint shows on the punch, and I wonder if there's a real good way to disable PVP such that no damage is even registered, so that the screen doesn't tint red.
 

User avatar
programmingchicken
Member
 
Posts: 540
Joined: Sat Apr 18, 2015 02:20
Location: not here
GitHub: pchicken
IRC: chicken pchicken

Re: PVP active in one or more areas

by programmingchicken » Tue Aug 18, 2015 22:04

in 0.4.12-dev register_on_punchplayer you can return true to bypass damage.
<gamerdude> I apologize for the above content
 

User avatar
Gael de Sailly
Member
 
Posts: 726
Joined: Sun Jan 26, 2014 17:01
Location: Lyon, France
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly Ginkgoo

Re: PVP active in one or more areas

by Gael de Sailly » Mon Aug 24, 2015 22:02

May be used by servers to disable PvP in the spawn. I'll bring this idea to MinetestForFun's server.
Just realize how bored we would be if the world was perfect.
 

User avatar
TenPlus1
Member
 
Posts: 2574
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: PVP active in one or more areas

by TenPlus1 » Tue Aug 25, 2015 06:37

The latest Protector Redo allows for PVP to be disabled inside protected areas and a separate setting to protect an area around spawn so noobs don't end up killing one another :)

viewtopic.php?f=9&t=9376#p143164
 

User avatar
luizrpgluiz
Member
 
Posts: 18
Joined: Thu Mar 19, 2015 18:11
IRC: luizrpgluiz
In-game: luizinho

Re: PVP active in one or more areas

by luizrpgluiz » Tue Nov 24, 2015 17:15

TenPlus1 wrote:The latest Protector Redo allows for PVP to be disabled inside protected areas and a separate setting to protect an area around spawn so noobs don't end up killing one another :)

viewtopic.php?f=9&t=9376#p143164



TenPlus1, I auditioned placing the line of protective pvp = true in minetest.conf and is not working to pvp protection on protected land and I'm using the latest version of minetest which is the 0.4.13
 

User avatar
TenPlus1
Member
 
Posts: 2574
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: PVP active in one or more areas

by TenPlus1 » Tue Nov 24, 2015 17:53

luizrpgluiz: make sure the lines reads as follows (10 is radius protected around spawn):

protector_pvp = true
protector_pvp_spawn = 10
 

twoelk
Member
 
Posts: 1317
Joined: Fri Apr 19, 2013 16:19
Location: northern Germany
GitHub: twoelk
IRC: twoelk
In-game: twoelk

Re: PVP active in one or more areas

by twoelk » Wed Nov 25, 2015 09:18

TenPlus1 wrote:The latest Protector Redo allows for PVP to be disabled inside protected areas and a separate setting to protect an area around spawn so noobs don't end up killing one another :)

viewtopic.php?f=9&t=9376#p143164
...
make sure the lines reads as follows (10 is radius protected around spawn):

protector_pvp = true
protector_pvp_spawn = 10


I might be missing something but could you document these functions in the first post of the mod thread please?

some other thoughts that came to me was wether this mod would allow multiple spawns such as some servers use or even allow a list of coordinates as safe-place input.
 

User avatar
TenPlus1
Member
 
Posts: 2574
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: PVP active in one or more areas

by TenPlus1 » Sun Nov 29, 2015 09:40

For multiple spawns simple place protection blocks around that area which has the same effect of disabling PVP in that area apart from the owner of the protectors.
 


Return to Feature Discussion



Who is online

Users browsing this forum: No registered users and 1 guest