Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("loading 'Miner-Control'...")
- -- Definitionen:
- local Tx = 2
- local Rx = 1
- local modem = peripheral.warp("back")
- function write_ui()
- term.clear()
- term.setCursorPos(1,1)
- print("+-------------------------------------------------+")
- print("| GFC's Miner-Control |")
- print("| Do not make an illegal copy of this |")
- print("| cause its free you idiot :D |")
- print("| COMMANDS |")
- print("| W/A/S/D for the Miner-Ship |")
- print("| R/F (Up/Down) for the Transporter |")
- print("| T/G (Up/Down) for the Ring-Cutter |")
- print("| |")
- print("+-------------------------------------------------+")
- end
- function Send( msg )
- modem.transmit(Tx,Rx,msg)
- end
- modem.open(2)
- while true do
- write_ui()
- local event, scancode = os.pullEvent("key")
- if scancode == 16 then
- return
- else
- cmd_send(scancode)
- local event, side, freqency, replyFrequency, message, distance = os.pullEvent("modem_message")
- term.setCursorPos(22,9)
- print(message)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement