Taruu

infopanelT.lua

Feb 24th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.50 KB | None | 0 0
  1. --pastebin get mESAaVtL infopanelT.lua
  2. API = require("buttonAPI")
  3. API.clear()
  4. local event = require("event")
  5. local computer = require("computer")
  6. local term = require("term")
  7. local component = require("component")
  8. local gpu = component.gpu
  9. local rs = component.redstone
  10. local colors = require("colors")
  11. local side = require("sides")
  12.  
  13. function API.fillTable()
  14.   API.setTable("Главная", test1, 0,15,23,24)  
  15.   API.setTable("Команды", test2, 18,33,23,24)
  16.   API.setTable("Инфо", test3, 36,51,23,24)
  17.   API.setTable("Планы", test4, 54,69,23,24)
  18.   API.screen()
  19. end
  20.  
  21. function getClick()
  22.   local _, _, x, y = event.pull(1,touch)
  23.   if x == nil or y == nil then
  24.     local h, w = gpu.getResolution()
  25.     gpu.set(h, w, ".")
  26.     gpu.set(h, w, " ")
  27.   else
  28.     API.checkxy(x,y)
  29.   end
  30. end
  31.  
  32. function test1()
  33.   API.clear()
  34.   API.fillTable()
  35.   API.heading("Info panel Military-Industrial MineCraft Server")
  36.   gpu.set(3,5, "                     Добро пожаловать на сервер")
  37.   gpu.set(3,6, "         Military-Industrial MineCraft Server by Taruu")
  38.   gpu.set(4,8, "  На этом сервере нет приватов и минимум запрещенных предметов.")
  39.   gpu.set(4,9, "    Сервер с военным уклоном т.е приходи и грабь кого хочешь.")
  40.   gpu.set(4,10, "       Сервер постоянно онлайн и поддерживается админом")
  41. end
  42.  
  43. function test2()
  44.   API.clear()
  45.   API.fillTable()
  46.   API.heading("Команды")
  47.   gpu.set(5,5, "/call - тп к человеку ")
  48.   gpu.set(5,6, "/spawn - тп на спавн ")
  49.   gpu.set(5,7, "/sethome - точка дома ")
  50.   gpu.set(5,8, "/home - тп домой ")
  51.   gpu.set(5,9, "/warp <название варпа> - тп на варп")
  52.   gpu.set(5,10, "/warp randomtp - рандом тп по миру")
  53.  
  54. end
  55.  
  56. function test3()
  57.   API.clear()
  58.   API.fillTable()
  59.   API.heading("Инфо")
  60.   gpu.set(20,20,"Что то важное епт")
  61. end
  62.  
  63. function test4()
  64.   API.clear()
  65.   API.fillTable()
  66.   API.heading("Планы")
  67.   gpu.set(5,5, "В будущем на сервер установят моды:")
  68.   gpu.set(5,6, "-Galacticraft")
  69.   gpu.set(5,7, " -Galacticraft Add-on - More Planets")
  70.   gpu.set(5,8, "-Techguns")
  71. end
  72.  
  73. term.setCursorBlink(false)
  74. gpu.setResolution(80, 25)
  75. API.clear()
  76. API.fillTable()
  77. API.heading("Info panel Military-Industrial MineCraft Server")
  78.  
  79.  
  80. while true do
  81.   getClick()
  82. end
Add Comment
Please, Sign In to add comment