This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Agent Silence's profile picture

Safeguard - Protection with Command Computers

Started by Agent Silence, 18 April 2015 - 06:15 PM
Agent Silence #1
Posted 18 April 2015 - 08:15 PM
Hello there! I have made a quick 32 line program that sets anyone in range that isn't on the whitelist to Adventure mode. When they leave the range, it sets anyone in adventure mode to survival mode. The only downside is that you have to edit the program manually to change the whitelist and range.

pastebin get fXfKVnRj startup

Please notify me of any bugs, if you find any.
Edited on 18 April 2015 - 06:18 PM
biggest yikes #2
Posted 18 April 2015 - 09:22 PM
Haven't tested yet, but it looks like the detection of the scoreboard objective (if found == false) should be outside the for loop
chexo3 #3
Posted 16 December 2015 - 03:03 PM
Why do you need a scoreboard objective? Couldn't you just use tables, and the http api to get UUIDs from usernames? Then just use that for protection.
Wojbie #4
Posted 16 December 2015 - 03:35 PM
Hmm interesting program but i see one problem. I am inside range and not whitelisted. I got set to adventure. I die. I respawn at spawn that is more than range+11 blocks away. I am still stuck in adventure mode.

Anyhow this program makes me consider so many interesting command programs that a person could make.