[Mod] Protector+ [protectorplus]

tux_peng
Member
Posts: 99
Joined: Thu Dec 06, 2012 18:21

by tux_peng » Post

Weird, I modified the begest protect to be half the size, so It would work for my server-- do you think it would be possible to create a PvP flag?
Servers now up (Economy, no PvP) Forum up already! http://tuxcraft.info

User avatar
Aqua
Member
Posts: 641
Joined: Wed Aug 22, 2012 09:11
Location: Sydney~Singapore
Contact:

by Aqua » Post

I'll look at the code again and yes I think its possible to make a PvP flag.
Hi there ^.~

tux_peng
Member
Posts: 99
Joined: Thu Dec 06, 2012 18:21

by tux_peng » Post

Aqua wrote:I'll look at the code again and yes I think its possible to make a PvP flag.
Cool, thank. My server is currently NoPvP, but areas would make it interesting
Servers now up (Economy, no PvP) Forum up already! http://tuxcraft.info

tux_peng
Member
Posts: 99
Joined: Thu Dec 06, 2012 18:21

by tux_peng » Post

I made a small change to init.lua

http://pastebin.com/duhTwNTz

It replaces the hard coded protector sizes with variables defined at the top of the file
Servers now up (Economy, no PvP) Forum up already! http://tuxcraft.info

Shizaku
Member
Posts: 10
Joined: Wed Feb 27, 2013 08:10

by Shizaku » Post

can someone plz tell me how to get the protector to work seems like only the biggest one is working. i seen in the forms someone was working on it all day and got it to work. can you plz show what you didn under init to fix this its not working and i would really like this to work so i can build things without people recking them dont want to place the biggest one everywhere.
Last edited by Shizaku on Fri Mar 08, 2013 09:06, edited 1 time in total.

User avatar
Aqua
Member
Posts: 641
Joined: Wed Aug 22, 2012 09:11
Location: Sydney~Singapore
Contact:

by Aqua » Post

tux_peng wrote:I made a small change to init.lua

http://pastebin.com/duhTwNTz

It replaces the hard coded protector sizes with variables defined at the top of the file
Can you update this link. I wanna have a look at this.
Shizaku wrote:can someone plz tell me how to get the protector to work seems like only the biggest one is working. i seen in the forms someone was working on it all day and got it to work. can you plz show what you didn under init to fix this its not working and i would really like this to work so i can build things without people recking them dont want to place the biggest one everywhere.
I'm not really sure. I'm gonna have to restart it and try find the problems.
Hi there ^.~

Shizaku
Member
Posts: 10
Joined: Wed Feb 27, 2013 08:10

by Shizaku » Post

Aqua wrote:
tux_peng wrote:I made a small change to init.lua

http://pastebin.com/duhTwNTz

It replaces the hard coded protector sizes with variables defined at the top of the file
Can you update this link. I wanna have a look at this.
Shizaku wrote:can someone plz tell me how to get the protector to work seems like only the biggest one is working. i seen in the forms someone was working on it all day and got it to work. can you plz show what you didn under init to fix this its not working and i would really like this to work so i can build things without people recking them dont want to place the biggest one everywhere.
I'm not really sure. I'm gonna have to restart it and try find the problems.
thanks me and my wife and few of are friends where going to use them for are homes. made some really nice text for them under paint. soon as they start working ill poste a bunch of text i made. i really like how i can add text that easy. i use to sit there on paint all the time now i have a place to hang out with what i make

Shizaku
Member
Posts: 10
Joined: Wed Feb 27, 2013 08:10

by Shizaku » Post

well i try everything with that scrip, even if you take all the others out and make 3 mods still they just dont want to work together. the scrip is right i put each one in and remove the others to test them all they all work. but just not together only 1 works. so i guess i download another protector and im useing the 1 scrip from yours and another land claim mod block so i at least have 2, i just didnt want to drop the big ones off a mob till my last zone, would rather have the small ones drop for players. thanks for trying but i guess im good now good luck :)

prestidigitator
Member
Posts: 647
Joined: Thu Feb 21, 2013 23:54

by prestidigitator » Post

Idea to fix the performance issue mentioned: calculate all the 16x16 chunks a protector block's radius touches, and store a hash map of chunk -> protector block position list. When a permission check is required calculate the chunk the player is attempting to modify, iterate through the protector list for that chunk, and do a distance check for each protector. You can run an ABM on protectors every so often (e.g. 10 seconds) to make sure they are registered with the chunks, and run a global function on a longer period timer to clean things up just in case chunks are unloaded or protector blocks have somehow been removed without unregistering themselves.

This should optimize things for protection over larger areas. Provided the protected regions don't overlap much, it should on average change each permission check to O(1) instead of O(N^3) when protectors cover an NxNxN region.

User avatar
Bas080
Member
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080
Location: Netherlands

by Bas080 » Post

May i request a node that only adds ownership for directly connecting nodes. Handy for when you just want to set owner of a single node. That way you can make owned door or sign by placing an ownership block on one of it's sides. Or use it in more practical ways i just can't think of atm. ..., Secret doors that do not give away there location because of larger protection area?

User avatar
sfan5-bot
Member
Posts: 34
Joined: Thu Mar 28, 2013 11:19
Location: /usr/bin/python2.7

by sfan5-bot » Post

[EE] No Dependencies found


Please fix these Mistakes and report this post, a moderator will delete it
If you believe I have made a Mistake contact sfan5

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

by Element » Post

i cant download it
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9

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

by Element » Post

the download link wont work
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

The site on which the files were hosted is long gone. Maybe someone has a copy of this mod?
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
Aqua
Member
Posts: 641
Joined: Wed Aug 22, 2012 09:11
Location: Sydney~Singapore
Contact:

by Aqua » Post

Don't use this mod. I don't think it works very well. And I'm not going to work on it. Try Zeg's one.
Hi there ^.~

User avatar
TenPlus1
Member
Posts: 3728
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] Protector+ [protectorplus]

by TenPlus1 » Post

Link to newer version of protector block: viewtopic.php?t=9376

Post Reply

Who is online

Users browsing this forum: rudzik8 and 44 guests