Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --mobfarm system
- bundledout = {}
- bundledout[1] = "white"
- bundledout[2] = "orange"
- bundledout[3] = "magenta"
- bundledout[4] = "lightBlue"
- bundledout[5] = "yellow"
- bundledout[6] = "lime"
- bundledout[7] = "pink"
- bundledout[8] = "gray"
- bundledout[9] = "lightGray"
- bundledout[10] = "cyan"
- bundledout[11] = "purple"
- bundledout[12] = "blue"
- bundledout[13] = "brown"
- bundledout[14] = "green"
- bundledout[15] = "red"
- bundledout[16] = "black"
- playerinside = "top"
- bundledin = {}
- bundledin[1] = 15
- bundledin[2] = 20
- bundledin[3] = 30
- bundledin[4] = 60
- --do not edit anything
- mon = peripheral.wrap("back")
- kontostand = 0
- mobout = 0
- function logo()
- mon.setTextColor(colors.cyan)
- mon.setBackgroundColor(colors.gray)
- mon.setCursorPos((x-16)/2,1)
- mon.write("Jo")
- mon.setTextColor(colors.orange)
- mon.write("Ja")
- mon.setTextColor(colors.lightGray)
- mon.write(" Productions")
- end
- function midwrite(str, yP)
- mon.setCursorPos((x-#str)/2,yP)
- mon.write(str)
- end
- function bdraw(num, str, ison)
- if num > 0 and num < 5 then
- yP = 4
- xp = 12*(num-0)-10
- elseif num > 4 and num < 9 then
- yP = 8
- xp = 12*(num-4)-10
- elseif num > 8 and num < 13 then
- yP = 12
- xp = 12*(num-8)-10
- elseif num > 12 and num < 17 then
- yP = 16
- xp = 12*(num-12)-10
- else
- return
- end
- mon.setCursorPos(xp, yP)
- if ison then
- mon.setBackgroundColor(colors.lime)
- else
- mon.setBackgroundColor(colors.red)
- end
- for i=1,10 do
- mon.write(" ")
- end
- mon.setCursorPos(xp+((10-#str)/2),yP)
- mon.write(str)
- end
- function start()
- mon.clear()
- x,y = mon.getSize()
- mon.setBackgroundColor(colors.lightGray)
- for i=1,y do
- mon.setCursorPos(1,i)
- for _=1,x do
- mon.write(" ")
- end
- end
- mon.setBackgroundColor(colors.gray)
- for i=4,y-3 do
- mon.setCursorPos(1,i)
- for _=4,x-3 do
- mon.write(" ")
- end
- end
- midwrite("Klicke um fortzufahren...",y)
- event, xPos, yPos = os.pullEvent("monitor_touch")
- einwurf()
- end
- function einwurf()
- mon.clear()
- x,y = mon.getSize()
- mon.setBackgroundColor(colors.lightGray)
- for i=1,y do
- mon.setCursorPos(1,i)
- for _=1,x do
- mon.write(" ")
- end
- end
- mon.setBackgroundColor(colors.gray)
- for i=4,y-3 do
- mon.setCursorPos(1,i)
- for _=4,x-3 do
- mon.write(" ")
- end
- end
- midwrite("Klicke um fortzufahren...",y)
- event, xPos, yPos = os.pullEvent()
- if event == "redstone" then
- number = 1
- for k,v in pairs(bundledin) do
- if rs.testBundledInput("right", number) then
- kontostand = kontostand + number
- end
- number = number * 2
- end
- elseif event == "monitor_touch" then
- mobwahl()
- else
- einwurf()
- end
- end
- function mobwahl()
- mon.clear()
- x,y = mon.getSize()
- mon.setBackgroundColor(colors.lightGray)
- for i=1,y do
- mon.setCursorPos(1,i)
- for _=1,x do
- mon.write(" ")
- end
- end
- mon.setBackgroundColor(colors.gray)
- for i=4,y-3 do
- mon.setCursorPos(1,i)
- for _=4,x-3 do
- mon.write(" ")
- end
- end
- midwrite("Waehle nun die Mobs aus...",y)
- event, xPos, yPos = os.pullEvent()
- for k,v in pairs(bundledout) do
- num = 1
- for i=1,k do
- num = num * 2
- end
- bdraw(k,v,colors.test(mobout,num))
- end
- midwrite("Klicke um fortzufahren...",y)
- event, xPos, yPos = os.pullEvent()
- end
- start()
Add Comment
Please, Sign In to add comment