Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local screen = paintutils.loadImage('controlling')
- paintutils.drawImage(screen, 1, 1)
- while true do
- local event, button, x, y = os.pullEvent('mouse_click')
- --print('X: ', x, " ", "Y: ", y)
- if x>8 and x<15 and y>1 and y<6 then
- rednet.send(7,"forward")
- elseif x>8 and x<15 and y>13 and y<19 then
- rednet.send(7,"back")
- elseif x>1 and x<7 and y>7 and y<12 then
- rednet.send(7,"left")
- elseif x>14 and x<24 and y>7 and y<12 then
- rednet.send(7,"right")
- elseif x>8 and x<15 and y>7 and y<12 then
- rednet.send(7,"fuel")
- elseif x>1 and x<7 and y>13 and y<19 then
- rednet.send(7,"up")
- elseif x>16 and x<24 and y>13 and y<19 then
- rednet.send(7,"down")
- end
- end
Add Comment
Please, Sign In to add comment