Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.find("modem")
- local right = paintutils.loadImage("/bot/images/right.nfp")
- local left = paintutils.loadImage("/bot/images/left.nfp")
- local forward = paintutils.loadImage("/bot/images/forward.nfp")
- local back = paintutils.loadImage("/bot/images/back.nfp")
- local fire = paintutils.loadImage("/bot/images/fire.nfp")
- modem.open(15)
- -- FORWARD
- term.setCursorPos(11,4)
- paintutils.drawImage(forward,term.getCursorPos())
- -- LEFT
- term.setCursorPos(5, 8)
- paintutils.drawImage(left, term.getCursorPos())
- -- RIGHT
- term.setCursorPos(19, 8)
- paintutils.drawImage(right,term.getCursorPos())
- -- BACK
- term.setCursorPos(11,14)
- paintutils.drawImage(back,term.getCursorPos())
- -- FIRE
- term.setCursorPos(10,8)
- paintutils.drawImage(fire,term.getCursorPos())
- repeat
- local event, button, x, y = os.pullEvent("mouse_click")
- if x >= 11 and x <= 16 and y >= 4 and y <=9 then
- modem.transmit(43,15,"forward")
- elseif x >= 5 and x <= 9 and y >= 8 and y <=13 then
- modem.transmit(43,15,"left")
- elseif x >= 19 and x <= 20 and y >= 8 and y <=13 then
- modem.transmit(43,15,"right")
- elseif x >= 11 and x <= 17 and y >= 14 and y <=17 then
- modem.transmit(43,15,"back")
- elseif x >= 10 and x <= 18 and y >= 8 and y <=13 then
- modem.transmit(43,15,"fire")
- end
- sleep(.5)
- until false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement