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

Admin Only Command Hookup Peripheral

Started by SnappComputerCraft, 27 July 2014 - 08:24 PM
SnappComputerCraft #1
Posted 27 July 2014 - 10:24 PM
Say you're making a Fallout-esque RP server and you want the players on your server to input their initial S.P.E.C.I.A.L on a computer and put it into your custom made character card plugin. But then you realize, how are you supposed to do that? Well, if there is a Server Admin Only peripheral similar to the modems in size and similar to a command block in function, one could simply code the program saying if the player completes the S.P.E.C.I.A.L test with these values to record those values in their character card with the Command Hookup wrapped to whatever side it's on (preferably the back cause that's probably against a wall).

Here's how that code would work:
First the computer will check who is using the computer and identify them to the hookup if it requires a username. Then there's normal computer code, blah blah blah, input variable, then once the player clicks the finish button and it activates some code that puts the variable into the command and sends the command. In this case the command would be this:
/fo setspecial <character name> <S P E C I A L>

If this has been suggested before I have not seen it when I searched.
Edited on 27 July 2014 - 08:39 PM
theoriginalbit #2
Posted 27 July 2014 - 10:43 PM
and why not just use command blocks?
Cranium #3
Posted 28 July 2014 - 06:30 AM
Agreed. Computers can already output commands to command blocks. You can enable this feature in the config.
Edited on 28 July 2014 - 04:31 AM
bigbrainiac10 #4
Posted 28 July 2014 - 01:30 PM
So you want a peripheral for something that's possible in vanilla minecraft?
flaghacker #5
Posted 28 July 2014 - 05:05 PM
So you want a peripheral for something that's possible in vanilla minecraft?

Dude, when he wrote that he probably didn't know about the command block API. Don't repeat what others said already, the point has been made.
Edited on 28 July 2014 - 03:06 PM
SnappComputerCraft #6
Posted 04 September 2014 - 01:06 AM
Really? I didn't see that in the configs, and how would I put that in code anyways?
Bomb Bloke #7
Posted 04 September 2014 - 01:26 AM
Search for this bit:

    # Enable Command Block peripheral support
    B:enableCommandBlock=false

See here for further details.

The catch is that users do not need admin rights to manipulate a command block via ComputerCraft. They still need them to place the blocks in the first place, though.