Discussion forum > Suggestions
New protection system - Gonna try and code it
Chief149:
Ok so I previously made a suggestion for a new protection system. With the system you purchase 2 redstone ores for very cheap, and then you place them to form a cube just like when world edit is used and the user selects point 1 and point 2. Then the user has the option to buy the protection for 50 cents per block or not. I looked into the precious stones plugin, and I am just having too hard of a time understanding the dude's style of programming. Therefore I will make an attempt at making my idea a reality, but I'm going to need a few tidbits of information.
First off, while flatfiles are easier to read/write, they are also noobish for a programmer to work with, and it doesn't take much for them to get messed up. Therefore I need to know what type of database this server uses. I am assuming it's a basic SQL server, but I just want to make sure. Until then I guess I could code everything other than the storage system.
optical:
Yes, MySQL. Use the abstraction layer provided by Preciousstones
Chief149:
Yeah, I did see the abstraction layer in the project file which should be of help since I don't know SQL.
Thanks dude, Ill see what I can do with this, and hopefully I can get it to work!
Chief149:
Sorry for the double post, but I think I have to bump this thread in order to get a reply, but does the area protect plugin on this server have an API I can use? If so I could just have my plugin take advantage of the Area Protect api by protecting areas with the boundries of the two placed redstone ore blocks.
cschurz:
i've never seen any of your code, despite seeing claims that you know how to program. i'm a bit skeptical, so let's just do a quick test...
you wish to build a system that protects a cube given two input coordinates (the redstone ores placed in the opposite corners of the desired cube)
write me some code to print out each coordinate that should be protected given a set of input coordinates in this format:
input:
--- Code: ---1 1 1 2 2 2
--- End code ---
where 1 1 1 is the x,y,z coordinate of the first redstone block and 2 2 2 is the x,y,z coordinate of the second redstone block.
this would be the output for the line "1 1 1 2 2 2"
output:
--- Code: ---1 1 1
1 1 2
1 2 1
1 2 2
2 1 1
2 1 2
2 2 1
2 2 2
--- End code ---
i don't care what order the output is in, as long as it is complete.
no time limit, no stress, just show me that you can at least write some code.
Navigation
[0] Message Index
[#] Next page
Go to full version