Guest User

mana

a guest
Apr 7th, 2015
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.91 KB | None | 0 0
  1. os.loadAPI("button")
  2. m = peripheral.wrap("monitor_4")
  3. m.clear()
  4.  
  5. local rs = rs.getAnalogInput("top")
  6.  
  7. function fillTable()
  8.    button.setTable("Endoflames", endoflame, 2,13,2,4)
  9.    button.screen()
  10. end
  11.  
  12. function getClick()
  13.    event,side,x,y = os.pullEvent("monitor_touch")
  14.    button.checkxy(x,y)
  15. end
  16.  
  17. function endoflame()
  18.    button.toggleButton("Endoflames")
  19.    print("test")
  20. end  
  21.  
  22. --Draw Pool
  23. term.redirect(m)
  24. term.setCursorPos(1,1)
  25. paintutils.drawFilledBox(2,17,28,18, colors.white)
  26. paintutils.drawFilledBox(2,9,4,17,colors.white)
  27. paintutils.drawFilledBox(26,9,28,17, colors.white)
  28. term.redirect(term.native())
  29.  
  30. fillTable()
  31.  
  32. function mana()  
  33.    --Draw mana in mana pool
  34.    rs = rs.getAnalogInput("top")
  35.    term.redirect(m)
  36.    term.setCursorPos(1,1)
  37.    paintutils.drawFilledBox(5,rs*2,25,16,colors.blue)
  38.    term.redirect(term.native())
  39.    end      
  40.      
  41. while true do
  42. getClick()
  43. end
Advertisement
Add Comment
Please, Sign In to add comment