Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- local p = peripheral.wrap
- local diamond = p("tile_extrautils_chestmini_name_0") --diamond blocks proxy chest
- local quartz = p("tile_extrautils_chestmini_name_1") --quartz blocks proxy chest
- local glowstone = p("tile_extrautils_chestmini_name_2") --glowstone blocks proxy chest
- local draconium = p("tile_extrautils_chestmini_name_3") --draconium blocks proxy chest
- local resStone = p("tile_extrautils_chestmini_name_4") --resurrection stone proxy chest
- local m = peripheral.wrap("right") -- monitor position
- m.clear()
- rednet.open("back")
- function countDiamond()
- for i=1,1 do
- local slot = diamond.getStackInSlot(i)
- if slot == nil then
- m.setCursorPos(1,5)
- m.write("There is currently 0/4 diamond blocks")
- else
- m.setCursorPos(1,5)
- m.write("There is currently " ..slot.qty.. "/4 diamond blocks")
- end
- end
- end
- function countQuartz()
- for i=1,1 do
- local slot = quartz.getStackInSlot(i)
- if slot == nil then
- m.setCursorPos(1,7)
- m.write("There is currently 0/12 quartz pillars")
- else
- m.setCursorPos(1,7)
- m.write("There is currently " ..slot.qty.. "/12 quartz pillars")
- end
- end
- end
- function countGlowstone()
- for i=1,1 do
- local slot = glowstone.getStackInSlot(i)
- if slot == nil then
- m.setCursorPos(1,9)
- m.write("There is currently 0/4 glowstone blocks")
- else
- m.setCursorPos(1,9)
- m.write("There is currently " ..slot.qty.. "/4 glowstone blocks")
- end
- end
- end
- function countDraconium()
- for i=1,1 do
- local slot = draconium.getStackInSlot(i)
- if slot == nil then
- m.setCursorPos(1,11)
- m.write("There is currently 0/4 charged draconium blocks")
- else
- m.setCursorPos(1,11)
- m.write("There is currently " ..slot.qty.. "/4 charged draconium blocks")
- end
- end
- end
- function countRes()
- for i=1,1 do
- local slot = resStone.getStackInSlot(i)
- if slot == nil then
- m.setCursorPos(1,13)
- m.write("There is currently 0/4 resurrection stones")
- else
- m.setCursorPos(1,13)
- m.write("There is currently " ..slot.qty.. "/1 resurrection stones")
- end
- end
- end
- function checkDiamond()
- for i=1,1 do
- local slot = diamond.getStackInSlot(i)
- if slot == nil then
- levelDiamond = 0
- else
- levelDiamond = slot.qty
- end
- end
- end
- function checkQuartz()
- for i=1,1 do
- local slot = quartz.getStackInSlot(i)
- if slot == nil then
- levelQuartz = 0
- else
- levelQuartz = slot.qty
- end
- end
- end
- function checkGlowstone()
- for i=1,1 do
- local slot = glowstone.getStackInSlot(i)
- if slot == nil then
- levelGlowstone = 0
- else
- levelGlowstone = slot.qty
- end
- end
- end
- function checkDraconium()
- for i=1,1 do
- local slot = draconium.getStackInSlot(i)
- if slot == nil then
- levelDraconium = 0
- else
- levelDraconium = slot.qty
- end
- end
- end
- function checkRes()
- for i=1,1 do
- local slot = resStone.getStackInSlot(i)
- if slot == nil then
- levelRes = 0
- else
- levelRes = slot.qty
- end
- end
- end
- function fillTable()
- button.setTable("Activate The Ritual!", start,10,41,16,18)
- button.screen()
- end
- function getClick()
- event,side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- function start()
- button.flash("Activate The Ritual!")
- print("Dragon Spawning!")
- end
- button.heading("Auto Dragon Spawner")
- --getClick()
- while true do
- countDiamond()
- sleep(0)
- countQuartz()
- sleep(0)
- countGlowstone()
- sleep(0)
- countDraconium()
- sleep(0)
- countRes()
- sleep(0)
- checkDiamond()
- sleep(0)
- checkQuartz()
- sleep(0)
- checkGlowstone()
- sleep(0)
- checkDraconium()
- sleep(0)
- checkRes(0)
- if levelDiamond >= 4 and
- levelQuartz >= 12 and
- levelGlowstone >= 4 and
- levelDraconium >= 4 and
- levelRes >= 1
- then
- countDiamond()
- countQuartz()
- countGlowstone()
- countDraconium()
- countRes()
- fillTable()
- getClick()
- sleep(0.5)
- m.clear()
- button.heading("Auto Dragon Spawner")
- else
- end
- end
- -- checkDiamond()
- -- checkQuartz()
- -- checkGlowstone()
- -- checkDraconium()
- -- checkRes()
- -- if levelDiamond >=4 and
- -- levelQuartz >=12 and
- -- levelGlowstone >=4 and
- -- levelDraconium >=4 and
- -- levelRes >=1
- -- then
- -- fillTable()
- -- break
- -- else
- -- end
- --end
- --button.heading("Auto Dragon Summoner!")
- --while true do
- -- getClick()
- -- countDiamond()
- -- countQuartz()
- -- countGlowstone()
- -- countDraconium()
- -- countRes()
- --end
- --for i=1,5 do
- --local slot = chest.getStackInSlot(i)
- -- if i ~= nil then
- -- if slot == nil then
- -- print("No items in slot " ..i)
- -- else
- -- print("There is " ..slot.qty.." " ..slot.name.. " in slot " ..i)
- -- end
- -- end
- --end
Add Comment
Please, Sign In to add comment