Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- turtle.select(2)
- ref = turtle.refuel()
- if ref == false then
- print("I couldn't find any kind of fuel! Have you put it in the 2nd slot?")
- sleep(2)
- os.reboot()
- end
- turtle.select(1)
- print("GET READY...GO!")
- print("Arrow keys, control arrow direction!")
- print("A-D keys, turn the turtle!")
- print("SPACE key, shoot!!")
- print("Q key, quit!")
- print("U key, + shoot charge!")
- print("J key, - shoot charge!")
- bow = peripheral.wrap("left")
- xDir = 0
- Pw = 0.1
- yDir = 0
- while true do
- event, key = os.pullEvent("key")
- if key == 57 then
- bow.shoot(Pw,xDir,yDir)
- elseif key == 30 then
- turtle.turnLeft()
- elseif key == 32 then
- turtle.turnRight()
- elseif key == 16 then
- os.reboot()
- elseif key == 200 then
- yDir = yDir + 1
- elseif key == 208 then
- yDir = yDir - 1
- elseif key == 203 then
- xDir = xDir - 1
- elseif key == 205 then
- xDir = xDir + 1
- elseif key == 22 then
- if Pw < 1 then
- Pw = Pw + 0.1
- end
- elseif key == 36 then
- if Pw > 0.1 then
- Pw = Pw - 0.1
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement