Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- event, param1=os.pullEvent("key")
- if param1==200 then --Hoch
- if turtle.forward() == true then
- print("Erfolgreich 1 Feld FORWARD bewegt")
- else
- print("Fehler")
- end
- end
- if param1==203 then --Links
- if turtle.turnLeft() == true then
- print("Erfolgreich nach LINKS gedreht")
- else
- print("Fehler")
- end
- end
- if param1==205 then --Rechts
- if turtle.turnRight() == true then
- print("Erfolgreich nach RECHTS gedreht")
- else
- print("Fehler")
- end
- end
- if param1==208 then --Runter
- if turtle.back() == true then
- print("Erfolgreich 1 Feld BACK bewegt")
- else
- print("Fehler")
- end
- end
- if param1==72 then --Num8
- if turtle.up() == true then
- print("Erfolgreich 1 Feld UP bewegt")
- else
- print("Fehler")
- end
- end
- if param1==80 then --Num2
- if turtle.down() == true then
- print("Erfolgreich 1 Feld DOWN bewegt")
- else
- print("Fehler")
- end
- end
- if param1==73 then --Num9
- if turtle.digUp() == true then
- print("Erfolgreich 1 Feld UP geturtelt")
- else
- print("Fehler")
- end
- end
- if param1==77 then --Num6
- if turtle.dig() == true then
- print("Erfolgreich 1 Feld FRONT geturtelt")
- else
- print("Fehler")
- end
- end
- if param1==81 then --Num3
- if turtle.digDown() == true then
- print("Erfolgreich 1 Feld DOWN geturtelt")
- else
- print("Fehler")
- end
- end
- if param1==201 then --Page up
- slot = turtle.getSelectedSlot()
- if slot == 16 then
- slot = 1
- else
- slot = slot + 1
- end
- if turtle.select(slot) then
- print("Erfolgreich nächsten Slot ausgewählt")
- else
- print("Fehler")
- end
- end
- if param1==209 then --Page down
- slot = turtle.getSelectedSlot()
- if slot == 1 then
- slot = 16
- else
- slot = slot - 1
- end
- if turtle.select(slot) then
- print("Erfolgreich nächsten Slot ausgewählt")
- else
- print("Fehler")
- end
- end
- if param1==71 then -- Num7
- if turtle.placeUp() == true then
- print("Erfolgreich 1 Block UP gesetzt")
- else
- print("Fehler")
- end
- end
- if param1==75 then --Num4
- if turtle.place() == true then
- print("Erfolgreich 1 Block FRONT gesetzt")
- else
- print("Fehler")
- end
- end
- if param1==79 then --Num1
- if turtle.placeDown() == true then
- print("Erfolgreich 1 Block DOWN gesetzt")
- else
- print("Fehler")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement