Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print()
- local colortable = {colors.red,colors.lightBlue,colors.orange,
- colors.pink,colors.green,colors.lime,
- colors.blue,colors.cyan,colors.purple}
- local shulkerboxcolor = {"red","lightblue","orange",
- "pink","green","lime",
- "blue","cyan","purple"}
- local function printmat(num)
- if num==10 then
- for i = 1 ,9 do
- write("|")
- term.setTextColor(colortable[i])
- write(i)
- term.setTextColor(1)
- if i%3==0 then
- write("|\n")
- end
- end
- else
- local highlight = false
- for i = 1,9 do
- if i == num then
- term.setTextColor(16)
- write("|")
- term.setTextColor(colortable[i])
- write(i)
- term.setTextColor(16)
- write("|")
- term.setTextColor(1)
- highlight = true
- if i%3==0 then
- write("\n")
- highlight = false
- end
- else
- if highlight==false then
- write("|")
- else
- highlight = false
- end
- term.setTextColor(colortable[i])
- write(i)
- term.setTextColor(1)
- if i%3==0 then
- write("|\n")
- end
- end
- end
- end
- end
- printmat()
- if pocket then
- while true do
- local event, button, x, y = os.pullEvent("mouse_click")
- --term.clear()
- shell.execute("clear")
- if y<6 and (x==2 or x == 4 or x == 6) then
- local num = x/2
- if y == 4 then
- num = num + 3
- elseif y == 5 then
- num = num + 6
- end
- term.setTextColor(colortable[num])
- print(shulkerboxcolor[num],"shulker box")
- term.setTextColor(1)
- print("[Return] [Retrive] [X]")
- printmat(num)
- event, button, x, y = os.pullEvent("mouse_click")
- if y == 2 then
- if x<9 then
- local ReturnOrRetrive = true
- write("Returning the ")
- term.setTextColor(colortable[num])
- print(shulkerboxcolor[num]," shulker box")
- term.setTextColor(1)
- elseif x>9 and x<19 then
- local ReturnOrRetrive = false
- write("Retriving the ")
- term.setTextColor(colortable[num])
- print(shulkerboxcolor[num]," shulker box")
- term.setTextColor(1)
- end
- else
- shell.execute("clear")
- print("Please choose a shulker Box")
- printmat(10)
- end
- else
- print("Please choose a shulker Box")
- printmat(10)
- end
- end
- end
- redstone.setOutput("right",true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement