Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local event = require("event")
- local sides = require("sides")
- local os = require("os")
- local colors = require("colors")
- local term = require("term")
- local gpu = component.gpu
- local rs = component.redstone
- local turncount = 3
- function hardmode()
- term.clear()
- component.gpu.fill(80, 25, 3, 3, "X") return end
- while true do
- local _, _, x, y, _, player = event.pull('touch')
- if x == 80 and y == 25 then
- rs.setBundledOutput(sides.back, colors.lime, 1) os.sleep(1) rs.setBundledOutput(sides.back, colors.lime, 0)
- elseif x ~= 80 or y ~= 25 then
- component.gpu.set(x, y, "O")
- rs.setBundledOutput(sides.back, colors.red, 1) os.sleep(1) rs.setBundledOutput(sides.back, colors.red, 0)
- end
- turncount = turncount - 1
- if turncount == 0 then
- term.clear()
- io.stderr:write("You're out of turns! Try again by typing 'archery' into the terminal") return
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement