Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- image = paintutils.loadImage("interface_grue.nfp")
- paintutils.drawImage(image, 1, 1)
- SERVPRINCIPAL = rednet.lookup("grue2", "grue_dono2")
- SERVSECONDAIRE = rednet.lookup("grue", "grue_dono")
- local function flechedroite()
- rednet.send(SERVPRINCIPAL, "clutch1", "grue2")
- rednet.send(SERVPRINCIPAL, "gantry0", "grue2")
- rednet.send(SERVPRINCIPAL, "gearshift1", "grue2")
- rednet.send(SERVPRINCIPAL, "clutch0", "grue2")
- sleep(5)
- rednet.send(SERVPRINCIPAL, "clutch1", "grue2")
- end
- local function flechegauche()
- rednet.send(SERVPRINCIPAL, "clutch1", "grue2")
- rednet.send(SERVPRINCIPAL, "gantry0", "grue2")
- rednet.send(SERVPRINCIPAL, "gearshift0", "grue2")
- rednet.send(SERVPRINCIPAL, "clutch0", "grue2")
- sleep(5)
- rednet.send(SERVPRINCIPAL, "clutch1", "grue2")
- end
- local function flechehaut()
- rednet.send(SERVPRINCIPAL, "clutch1", "grue2")
- rednet.send(SERVPRINCIPAL, "gantry1", "grue2")
- rednet.send(SERVPRINCIPAL, "gearshift1", "grue2")
- rednet.send(SERVPRINCIPAL, "clutch0", "grue2")
- sleep(5)
- rednet.send(SERVPRINCIPAL, "clutch1", "grue2")
- end
- local function flechebas()
- rednet.send(SERVPRINCIPAL, "clutch1", "grue2")
- rednet.send(SERVPRINCIPAL, "gantry1", "grue2")
- rednet.send(SERVPRINCIPAL, "gearshift0", "grue2")
- rednet.send(SERVPRINCIPAL, "clutch0", "grue2")
- sleep(5)
- rednet.send(SERVPRINCIPAL, "clutch1", "grue2")
- end
- local function button1()
- end
- local function button2()
- end
- buttons = {{"flechedroite", 18, 23, 15, 18, flechedroite},
- {"flechegauche", 2, 7, 15, 18, flechegauche},
- {"flechehaut", 10, 15, 10, 13, flechehaut},
- {"flechebas", 10, 15, 15, 18, flechebas},
- {"button1", 2, 7, 2, 5, button1},
- {"button2", 18, 23, 2, 5, button2}}
- while true do
- event, button, x, y = os.pullEvent("mouse_click")
- for i = 1,6 do
- if button == 1 and buttons[i][2] < x and x < buttons[i][3] and buttons[i][4] < y and y < buttons[i][5] then
- buttons[i][6]()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement