Jump to content




R a simple commandline Turtle control

turtle

  • You cannot reply to this topic
No replies to this topic

#1 sEi

  • Members
  • 41 posts

Posted 02 February 2016 - 06:08 AM

Used for simple handling of the turtle from the command-line.
My first LUA script and i ended up using it a lot - Bad coding but it works :)
I have made some nifty little batch files where i am using R via the shell command! None published though, just mentioning as inspiration.

SYNTAX: <Program name> <Orders> [Run this program after completion]

Example 1:
r fffurrfffdll
This orders the turtle to go forward 3, up 1, turning right 2 times, forward 3,
down 1, turning left 2 times. - If anything is blocking the path it will stop
with an error message.

Example 2:
r Bffrff3y
This orders the turtle to move 2 forward, turn right, move 2 forward and finally place a block from slot #3 below the turtle.
NOTE: Since the orders starts with a "B" then it will dig blocks if any is present in its path

The code:
Spoiler

https://pastebin.com/aDY5Ez8M I suggest to save the program as "r" for easy use

pastebin get aDY5Ez8M r

My very first script when i started with CC (and LUA), but i have ended up using it very much and as mentioned also made several batch files where i use the "r" program via shell thingy.

Any feedback is very much appreciated.

/sEi

Edited by sEi, 02 February 2016 - 06:10 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users