Advertisement
MagmaLP

Minium_Stone-Reperatur-Info_PC

Oct 28th, 2023 (edited)
865
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.61 KB | None | 0 0
  1. mon = peripheral.wrap("front")
  2.  
  3. function msg(gap, line, text)
  4.     mon.setCursorPos(gap,line)
  5.     text = mon.write(text)
  6. end
  7.  
  8. function clear()
  9.     mon.setCursorPos(1,1)
  10.     mon.clear()
  11. end
  12.  
  13. clear()
  14. msg(03,01,"Repair your Miniumstones")
  15. msg(03,02,"~~~~~~~~~~~~~~~~~~~~~~~~")
  16.  
  17. msg(01,04,"1. Open Trade-O-Mat")
  18. msg(01,05,"2. Insert 4 Shard of Minium")
  19. msg(01,06,"3. Insert also a Miniumstone")
  20. msg(01,07,"   no matter how broken it is")
  21. msg(01,08,"4. Now you get a new Stone")
  22.  
  23. msg(01,11,"  problem ?  -> click here <-")
  24. x = 0
  25.  
  26. while true do
  27.     a = 1
  28.     local event, side, X, Y = os.pullEvent("monitor_touch")
  29.     if X >= 01 and X <= 30 and Y >= 10 and Y <= 12 and side == "front" and a == 1 then
  30.         clear()
  31.         a = 2
  32.         msg(01,01,"Press Reboot:                ")
  33.         msg(01,02,"~~~~~~~~~~~~~                ")
  34.         msg(01,04,"To get back Shard of Minium  ")
  35.         msg(01,05,"and Miniumstones.            ")
  36.         msg(01,07,"If System is frozen.         ")
  37.         msg(01,09,"    --> REBOOT <--           ")
  38.         msg(01,12,"                      -> back")
  39.         local event, side, X, Y = os.pullEvent("monitor_touch")
  40.         if X >= 01 and X <= 22 and Y >= 08 and Y <= 10 and side == "front" and a == 2 then --reboot
  41.             rs.setOutput("top", true)
  42.             rs.setOutput("left", true)
  43.             sleep(1.5)
  44.             rs.setOutput("top", false)
  45.             rs.setOutput("left", false)
  46.             os.reboot()
  47.         elseif X >= 23 and X <= 29 and Y >= 11 and Y <= 12 and side == "front" and a == 2 then --back
  48.             os.reboot()
  49.         end
  50.     end
  51.     sleep(0.5)
  52. end
  53.  
  54.  
  55.    
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement