Execute program by Redstone signal

From 8x9craft
Jump to: navigation, search

for example, if you want to set the password to lock the door by hakkun. but now you have to run the program it beforehand someone uses it.

solving

If you set the password lock program to usb disk like item and you can set the item to left hand of hakkun

The program will be executed by red stone singnal input.

but it doesn't execute if he running program something.

you can meke useful password lock system by hakkun.

if(crab.getRedStoneInput("back") > 0){
    var pass = crab.ask('Hey Say the password!');
    if(pass == "12345"){
        crab.say("Ok")
        crab.setRedStoneOutput(15, "front")
        crab.sleep(60)
    }else{
        crab.say("bye")
    }    
}


See also