Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Drake's Minecraft Killbot (ComputerCraft mod)
- --moving the computer in a strafe like fashion (as opposed to 'normal' movement)
- function strafe(direction)
- if direction == "right" then
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- elseif direction == "left" then
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- end
- end
- --menu displaying user options
- function menu()
- print("Running Drake's Killbot Prototype...\n")
- print("Please choose from the following actions:\n")
- print("1. Create and detonate bomb.")
- print("2. Murder Shawn.")
- term.write("Your answer:")
- answer = read()
- return answer
- end
- --informing user of fuel warning
- if turtle.getFuelLevel() == 0 then
- print("WARNING: NO FUEL LOADED.")
- end
- --getting requested killbot action
- action = menu()
- --user selects action: bomb
- --REQUIREMENTS:
- --3 TNT slot 1, 10 redstone slot 2, 1 redstone torch slot 3
- if action == "1" then
- print("Initiating bombing sequence...")
- for i = 1,10 do
- turtle.forward()
- end
- --placing center front bomb
- turtle.select(1)
- turtle.place()
- --placing right front block
- strafe("right")
- turtle.place()
- --left front block
- strafe("left")
- strafe("left")
- turtle.place()
- --recentering
- strafe("right")
- --placing redstone while backing up to original position
- turtle.select(2)
- for i = 1,10 do
- turtle.back()
- turtle.place()
- end
- --placing the redstone torch
- turtle.back()
- turtle.select(3)
- turtle.place()
- --retrieving redstone torch after placing
- turtle.dig()
- turtle.suck()
- --user selects action: kill shawn
- elseif answer == "2" then
- print("Feature not yet added :(")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement