Advertisement
DoddyLeSel

GrueMitaine

Feb 22nd, 2025 (edited)
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.04 KB | Gaming | 0 0
  1. image = paintutils.loadImage("interface_grue.nfp")
  2. paintutils.drawImage(image, 1, 1)
  3.  
  4. SERVPRINCIPAL = rednet.lookup("grue2", "grue_dono2")
  5. SERVSECONDAIRE = rednet.lookup("grue", "grue_dono")
  6.  
  7. local function flechedroite()
  8.     rednet.send(SERVPRINCIPAL, "clutch1", "grue2")
  9.     rednet.send(SERVPRINCIPAL, "gantry0", "grue2")
  10.     rednet.send(SERVPRINCIPAL, "gearshift1", "grue2")
  11.     rednet.send(SERVPRINCIPAL, "clutch0", "grue2")
  12.     sleep(5)
  13.     rednet.send(SERVPRINCIPAL, "clutch1", "grue2")
  14. end
  15.  
  16. local function flechegauche()
  17.     rednet.send(SERVPRINCIPAL, "clutch1", "grue2")
  18.     rednet.send(SERVPRINCIPAL, "gantry0", "grue2")
  19.     rednet.send(SERVPRINCIPAL, "gearshift0", "grue2")
  20.     rednet.send(SERVPRINCIPAL, "clutch0", "grue2")
  21.     sleep(5)
  22.     rednet.send(SERVPRINCIPAL, "clutch1", "grue2")
  23. end
  24.  
  25. local function flechehaut()
  26.     rednet.send(SERVPRINCIPAL, "clutch1", "grue2")
  27.     rednet.send(SERVPRINCIPAL, "gantry1", "grue2")
  28.     rednet.send(SERVPRINCIPAL, "gearshift1", "grue2")
  29.     rednet.send(SERVPRINCIPAL, "clutch0", "grue2")
  30.     sleep(5)
  31.     rednet.send(SERVPRINCIPAL, "clutch1", "grue2")
  32. end
  33.  
  34. local function flechebas()
  35.     rednet.send(SERVPRINCIPAL, "clutch1", "grue2")
  36.     rednet.send(SERVPRINCIPAL, "gantry1", "grue2")
  37.     rednet.send(SERVPRINCIPAL, "gearshift0", "grue2")
  38.     rednet.send(SERVPRINCIPAL, "clutch0", "grue2")
  39.     sleep(5)
  40.     rednet.send(SERVPRINCIPAL, "clutch1", "grue2")
  41. end
  42.  
  43. local function button1()
  44.    
  45. end
  46.  
  47. local function button2()
  48.    
  49. end
  50.  
  51. buttons = {{"flechedroite", 18, 23, 15, 18, flechedroite},
  52.         {"flechegauche", 2, 7, 15, 18, flechegauche},
  53.         {"flechehaut", 10, 15, 10, 13, flechehaut},
  54.         {"flechebas", 10, 15, 15, 18, flechebas},
  55.         {"button1", 2, 7, 2, 5, button1},
  56.         {"button2", 18, 23, 2, 5, button2}}
  57.  
  58.  
  59. while true do
  60.  
  61.     event, button, x, y = os.pullEvent("mouse_click")
  62.  
  63.     for i = 1,6 do
  64.         if button == 1 and buttons[i][2] < x and x < buttons[i][3] and buttons[i][4] < y and y < buttons[i][5] then
  65.             buttons[i][6]()
  66.         end
  67.     end
  68. end
  69.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement