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

Computer craft number Passwort

Started by xevox, 28 May 2013 - 07:08 AM
xevox #1
Posted 28 May 2013 - 09:08 AM
Titel: Computer craft number Passwort

Hey i have see this today

this is in minecraft tekkit lite 0.6.5 version



and my question are how i can code this or any can code me this.

sorry for bad english
Pyro_ #2
Posted 28 May 2013 - 11:55 AM
This is a program that implements touch screen buttons, similar to like you see there

(props to Xenthera)

http://pastebin.com/7f8y6GCZ

Have a look at how they've implemented them, and see if you can adapt them to your liking.

Then you just need to hardcode the accepted password in your LUA file probably in an array, which would allow for easy checking, and store keypresses in a variable (array would probably be easiest) in said LUA file.
If they match your hardcoded password, unlock a door, launch a missile, set off TNT or do whatever you like, if not, set off more TNT or something.

When the clear button is pressed, simply have it write 'nil' to the first 10 or so elements of the array.

Sorry I can't be of more help, but I have to go sleep now, I have uni in the morning.
Xenthera #3
Posted 28 May 2013 - 03:01 PM
Edit: Now that I think about it… Someone could easily terminate the program. Just hide the terminal from view. I mean, if they really wanted they'd break through the door in the first place, right?


Coded it for you, Added some features I though would be cool. Since I don't know exactly what you want, I coded it to output a redstone signal which you can run to whatever you want. (cough door cough)



I setup some easy to access variables at the top, feel free to change them to what you need.

I changed the colors because that orange was just hideous. ;)/>

http://pastebin.com/Zd6yQmqG


pastebin get Zd6yQmqG lock

Final Result: