Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Alle variabler
- local Spawner_BlazeH = "1"
- local Spawner_BlazeV = "2"
- local Spawner_Spider = "3"
- local Spawner_Skeleton = "4"
- --Toggle variabler
- local BlazeH_state = 0
- local BlazeV_state = 0
- local Spider_state = 0
- local Skeleton_state = 0
- rednet.open("left")
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print("Programmer:")
- if BlazeH_state == 0 then print("1. Skru PÅ Blaze H spawner")
- elseif BlazeH_state == 1 then print("1. Skru AV Blaze H spawner")
- end
- if BlazeV_state == 0 then print("2. Skru PÅ Blaze V spawner")
- elseif BlazeV_state == 1 then print("2. Skru AV Blaze V spawner")
- end
- if Spider_state == 0 then print("3. Skru PÅ Spider spawner")
- elseif Spider_state == 1 then print("3. Skru AV Spider spawner")
- end
- if Skeleton_state == 0 then print("4. Skru PÅ Skeleton spawner")
- elseif Skeleton_state == 1 then print("4. Skru AV Skeleton spawner")
- end
- term.setCursorPos(1,15)
- write("Kjør program: ")
- UserInput = read()
- if UserInput == Spawner_BlazeH and BlazeH_state == 0 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_BlazeHToggle")
- BlazeH_state = BlazeH_state + 1
- elseif UserInput == Spawner_BlazeH and BlazeH_state == 1 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_BlazeHToggle")
- BlazeH_state = BlazeH_state - 1
- end
- if UserInput == Spawner_BlazeV and BlazeV_state == 0 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_BlazeVToggle")
- BlazeV_state = BlazeV_state + 1
- elseif UserInput == Spawner_BlazeV and BlazeV_state == 1 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_BlazeVToggle")
- BlazeV_state = BlazeV_state - 1
- end
- if UserInput == Spawner_Spider and Spider_state == 0 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_SpiderToggle")
- Spider_state = Spider_state + 1
- elseif UserInput == Spawner_Spider and Spider_state == 1 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_SpiderToggle")
- Spider_state = Spider_state - 1
- end
- if UserInput == Spawner_Skeleton and Skeleton_state == 0 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_SkeletonToggle")
- Skeleton_state = Skeleton_state + 1
- elseif UserInput == Spawner_Skeleton and Skeleton_state == 1 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.broadcast("Spawner_SkeletonToggle")
- Skeleton_state = Skeleton_state - 1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement