Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --os.pullEvent = os.pullEventRaw
- --[[
- Minigame Mobspawner
- Version 1.0
- made by minemuffin & _Tim1998_
- ]]
- nir = peripheral.wrap("top")
- --m = peripheral.wrap("front")
- chat = peripheral.wrap("left")
- cabel = "bottom"
- rednet.open("back")
- --Variable
- cb1 = colors.orange -- In Arena teleportieren
- cb2 = colors.magenta -- Aus Arena teleportieren
- cb3 = colors.green -- In verlierer Raum teleportieren
- cb4 = colors.blue -- In Gewinner Raum teleportieren
- boden = colors.white -- Boden åB6ffnen
- tank = colors.black -- Tank entleeren
- spawnmob1 = colors.lightGray
- spawnmob2 = colors.cyan
- spawnmob3 = colors.purple
- spawnmob4 = colors.brown
- playerdetector = colors.red
- --[[
- wall_1 = colors.blue
- wall_2 = colors.yellow
- wall_3 = colors.lime
- wall_4 = colors.pink
- wall_5 = colors.gray
- ]]
- welle = 1
- lv1 = 10
- lv2 = 20
- lv3 = 30
- lv4 = 40
- lv5 = 45
- --[[function mob1()
- rs.setBundledOutput (cabel, spawnmob1)
- sleep(10)
- rs.setBundledOutput(cabel,colors.subtract(rs.getBundledOutput(cabel), spawnmob1) )
- end
- function mob2()
- rs.setBundledOutput (cabel,colors.combine(spawnmob1,spawnmob2))
- sleep(10)
- rs.setBundledOutput(cabel,colors.subtract(rs.getBundledOutput(cabel), colors.combine(spawnmob1,spawnmob2)) )
- end
- function mob3()
- rs.setBundledOutput (cabel,colors.combine(spawnmob1,spawnmob2,spawnmob3))
- sleep(10)
- rs.setBundledOutput(cabel,colors.subtract(rs.getBundledOutput(cabel), colors.combine(spawnmob1,spawnmob2,spawnmob3)) )
- end
- function mob4()
- rs.setBundledOutput (cabel,colors.combine(spawnmob1,spawnmob2,spawnmob3,spawnmob4))
- sleep(10)
- rs.setBundledOutput(cabel,colors.subtract(rs.getBundledOutput(cabel), colors.combine(spawnmob1,spawnmob2,spawnmob3,spawnmob4)) )
- end
- ]]
- function Port1() --In Arena teleportieren
- rs.setBundledOutput (cabel, cb1)
- sleep(1)
- rs.setBundledOutput(cabel,colors.subtract(rs.getBundledOutput(cabel), cb1) )
- sleep(0,8)
- end
- function Port2()
- rs.setBundledOutput (cabel, cb2) --Aus Arena teleportieren
- sleep(1)
- rs.setBundledOutput(cabel,colors.subtract(rs.getBundledOutput(cabel), cb2) )
- sleep(0,8)
- end
- function PortV()
- rs.setBundledOutput (cabel, cb3) -- In verlierer Raum teleportieren
- sleep(1)
- rs.setBundledOutput(cabel,colors.subtract(rs.getBundledOutput(cabel), cb3) )
- sleep(0,8)
- end
- function PortG()
- rs.setBundledOutput (cabel, cb4) -- In Gewinner Raum teleportieren
- sleep(1)
- rs.setBundledOutput(cabel,colors.subtract(rs.getBundledOutput(cabel), cb4) )
- sleep(0,8)
- end
- function mobs()
- if welle == 1 then
- rs.setBundledOutput (cabel, spawnmob1)
- sleep(10)
- rs.setBundledOutput(cabel,colors.subtract(rs.getBundledOutput(cabel), spawnmob1) )
- end
- if welle == 2 then
- rs.setBundledOutput (cabel,colors.combine(spawnmob1,spawnmob2))
- sleep(10)
- rs.setBundledOutput(cabel,colors.subtract(rs.getBundledOutput(cabel), colors.combine(spawnmob1,spawnmob2)) )
- end
- if welle == 3 then
- rs.setBundledOutput (cabel,colors.combine(spawnmob1,spawnmob2,spawnmob3))
- sleep(10)
- rs.setBundledOutput(cabel,colors.subtract(rs.getBundledOutput(cabel), colors.combine(spawnmob1,spawnmob2,spawnmob3)) )
- end
- if welle == 4 then
- rs.setBundledOutput (cabel,colors.combine(spawnmob1,spawnmob2,spawnmob3,spawnmob4))
- sleep(10)
- rs.setBundledOutput(cabel,colors.subtract(rs.getBundledOutput(cabel),colors.combine(spawnmob1,spawnmob2,spawnmob3,spawnmob4)) )
- end
- end
- function start()
- if rs.testBundledInput (cabel, playerdetector) == true then
- rednet.send(681, "STOP")
- rs.setBundledOutput(cabel, 0)
- sleep(2)
- Port1()
- chat.say("Elliminiere alle Mobs in "..lv1.." Sekunden")
- mobs()
- sleep(lv1)
- Port2()
- sleep(0,5)
- chat.say("Auswertung...")
- rednet.send(681, "STOP")
- rs.setBundledOutput (cabel, boden)
- sleep(25)
- a1,b1,c1,d1 = nir.get(1)
- fuel1 = d1["amount"]
- if fuel1 == 0 then
- welle = welle + 1
- print(fuel1)
- chat.say("Geschafft")
- sleep(2)
- chat.say("Bereit fåBCr Welle 2 ?? :D")
- sleep(2)
- Welle2()
- else
- print(fuel1)
- chat.say("Leider hast du es nicht geschafft alle Mobs in "..lv1.." zu tåB6ten")
- chat.say("Versuche es erneut")
- PortV()
- rednet.send(681, "STOP")
- rednet.send(681, "Auf")
- end
- rs.setBundledOutput(cabel, tank)
- else
- chat.say("Kein Spieler in Reichweite gefunden, breche das Minispiel jetzt ab")
- sleep(1)
- rednet.send(681, "Auf")
- end
- end
- function Welle2()
- if rs.testBundledInput (cabel, playerdetector) == true then
- rednet.send(681, "1")
- rs.setBundledOutput(cabel, 0)
- sleep(2)
- Port1()
- chat.say("Elliminiere alle Mobs in "..lv2.." Sekunden")
- mobs()
- sleep(lv2)
- Port2()
- sleep(0,5)
- chat.say("Auswertung...")
- rednet.send(681, "STOP")
- rs.setBundledOutput (cabel, boden)
- sleep(25)
- a1,b1,c1,d1 = nir.get(1)
- fuel1 = d1["amount"]
- if fuel1 == 0 then
- welle = welle + 1
- print(fuel1)
- chat.say("Geschafft")
- chat.say("Bereit fåBCr Welle 3 ?? :D")
- sleep(2)
- Welle3()
- else
- print(fuel1)
- chat.say("Leider hast du es nicht geschafft alle Mobs in "..lv2.." zu tåB6ten")
- chat.say("Versuche es erneut")
- PortV()
- rednet.send(681, "STOP")
- rednet.send(681, "Auf")
- end
- rs.setBundledOutput(cabel, tank)
- else
- chat.say("Kein Spieler in Reichweite gefunden, breche das Minispiel jetzt ab")
- sleep(1)
- rednet.send(681, "Auf")
- end
- end
- function Welle3()
- if rs.testBundledInput (cabel, playerdetector) == true then
- rednet.send(681, "2")
- rs.setBundledOutput(cabel, 0)
- sleep(2)
- Port1()
- chat.say("Elliminiere alle Mobs in "..lv3.." Sekunden")
- mobs()
- sleep(lv3)
- Port2()
- sleep(0,5)
- chat.say("Auswertung...")
- rednet.send(681, "STOP")
- rs.setBundledOutput (cabel, boden)
- sleep(25)
- a1,b1,c1,d1 = nir.get(1)
- fuel1 = d1["amount"]
- if fuel1 == 0 then
- welle = welle + 1
- print(fuel1)
- chat.say("Geschafft")
- chat.say("Bereit fåBCr Welle 4 ?? :D")
- sleep(2)
- Welle4()
- else
- print(fuel1)
- chat.say("Leider hast du es nicht geschafft alle Mobs in " ..lv3.." zu tåB6ten")
- chat.say("Versuche es erneut")
- PortV()
- rednet.send(681, "STOP")
- rednet.send(681, "Auf")
- end
- rs.setBundledOutput(cabel, tank)
- else
- chat.say("Kein Spieler in Reichweite gefunden, breche das Minispiel jetzt ab")
- sleep(1)
- rednet.send(681, "Auf")
- end
- end
- function Welle4()
- if rs.testBundledInput (cabel, playerdetector) == true then
- rednet.send(681, "3")
- rs.setBundledOutput(cabel, 0)
- sleep(2)
- Port1()
- chat.say("Elliminiere alle Mobs in "..lv4.." Sekunden")
- mobs()
- sleep(lv4)
- Port2()
- sleep(0,5)
- chat.say("Auswertung...")
- rednet.send(681, "STOP")
- rs.setBundledOutput (cabel, boden)
- sleep(25)
- a1,b1,c1,d1 = nir.get(1)
- fuel1 = d1["amount"]
- if fuel1 == 0 then
- welle = welle + 1
- print(fuel1)
- chat.say("Herzlichen GlåBCckwunsch")
- PortG()
- rednet.send(681, "STOP")
- rednet.send(681, "Auf")
- else
- print(fuel1)
- chat.say("Leider hast du es nicht geschafft alle Mobs in "..lv4.." zu tåB6ten")
- chat.say("Versuche es erneut")
- PortV()
- rednet.send(681, "STOP")
- rednet.send(681, "Auf")
- end
- rs.setBundledOutput(cabel, tank)
- else
- chat.say("Kein Spieler in Reichweite gefunden, breche das Minispiel jetzt ab")
- sleep(1)
- rednet.send(681, "Auf")
- end
- end
- while true do
- if rs.getInput("right") == true then
- welle = 1
- rs.setBundledOutput(cabel, tank)
- rednet.send(681, "Zu")
- sleep(1,5)
- start()
- end
- sleep(0,5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement