Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- function drawKeyboard()
- term.clear()
- term.setCursorPos(1,2)
- print("+---+---+---+---+")
- print("|Del| W |Ent| ^ |")
- print("+---+---+---+---+")
- print("| A | S | D | v |")
- print("+---+---+---+---+")
- print("|Inv:001| - | + |")
- print("+---+---+---+---+")
- end
- drawKeyboard()
- local TSID = 79
- local invCount = 1
- while true do
- local event,button,X,Y = os.pullEventRaw()
- if event == "mouse_click" then
- if X >= 2 and X <= 4 and Y == 3 and button == 1 then
- rednet.send(TSID,"dig")
- elseif X >= 6 and X <= 8 and Y == 3 and button == 1 then
- rednet.send(TSID,"forward")
- elseif X >= 10 and X <= 12 and Y == 3 and button == 1 then
- rednet.send(TSID,"place")
- elseif X >= 14 and X <= 16 and Y == 3 and button == 1 then
- rednet.send(TSID,"up")
- elseif X >= 2 and X <= 4 and Y == 5 and button == 1 then
- rednet.send(TSID,"turnLeft")
- elseif X >= 6 and X <= 8 and Y == 5 and button == 1 then
- rednet.send(TSID,"back")
- elseif X >= 10 and X <= 12 and Y == 5 and button == 1 then
- rednet.send(TSID,"turnRight")
- elseif X >= 14 and X <= 16 and Y == 5 and button == 1 then
- rednet.send(TSID,"down")
- elseif X >= 10 and X <= 12 and Y == 7 and button == 1 then
- if invCount >= 2 and incCount <= 9 then
- invCount = invCount - 1
- sendInvCount = tostring(invCount)
- rednet.send(TSID,sendInvCount)
- term.setCursorPos(6,7)
- write("00"..tostring(invCount))
- elseif invCount <= 1 then
- invCount = 1
- rednet.send(TSID,"1")
- term.setCursorPos(6,7)
- write("00"..tostring(invCount))
- elseif invCount <= 10 then
- end
- elseif
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement