<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.computercraft.info/wiki/index.php?action=history&amp;feed=atom&amp;title=Turtlemove_%28Custom_API%29</id>
		<title>Turtlemove (Custom API) - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://www.computercraft.info/wiki/index.php?action=history&amp;feed=atom&amp;title=Turtlemove_%28Custom_API%29"/>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtlemove_(Custom_API)&amp;action=history"/>
		<updated>2026-07-11T08:13:21Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Turtlemove_(Custom_API)&amp;diff=3895&amp;oldid=prev</id>
		<title>AfterLifeLochie: Moved to CAT:UnofficialAPIs</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtlemove_(Custom_API)&amp;diff=3895&amp;oldid=prev"/>
				<updated>2012-11-28T16:04:30Z</updated>
		
		<summary type="html">&lt;p&gt;Moved to CAT:UnofficialAPIs&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 16:04, 28 November 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 93:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 93:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Unofficial_APIs]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key ccraft_wiki-mw_:diff:version:1.11a:oldid:3320:newid:3895 --&gt;
&lt;/table&gt;</summary>
		<author><name>AfterLifeLochie</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Turtlemove_(Custom_API)&amp;diff=3320&amp;oldid=prev</id>
		<title>Thesbros at 18:30, 6 October 2012</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtlemove_(Custom_API)&amp;diff=3320&amp;oldid=prev"/>
				<updated>2012-10-06T18:30:55Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 18:30, 6 October 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The turtlemove API is an &amp;lt;b&amp;gt;unofficial API&amp;lt;/b&amp;gt;. This means that you must install it manually.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The turtlemove API is an &amp;lt;b&amp;gt;unofficial API&amp;lt;/b&amp;gt;. This means that you must install it manually.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br /&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The turtlemove api will be an API to facilitate programming your turtle's movement. It is in development.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The turtlemove api will be an API to facilitate programming your turtle's movement. It is in development.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Thesbros</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Turtlemove_(Custom_API)&amp;diff=3319&amp;oldid=prev</id>
		<title>Thesbros: Created page with &quot;The turtlemove API is an &lt;b&gt;unofficial API&lt;/b&gt;. This means that you must install it manually. The turtlemove api will be an API to facilitate programming your turtle's movemen...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtlemove_(Custom_API)&amp;diff=3319&amp;oldid=prev"/>
				<updated>2012-10-06T18:30:39Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;The turtlemove API is an &amp;lt;b&amp;gt;unofficial API&amp;lt;/b&amp;gt;. This means that you must install it manually. The turtlemove api will be an API to facilitate programming your turtle&amp;#039;s movemen...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The turtlemove API is an &amp;lt;b&amp;gt;unofficial API&amp;lt;/b&amp;gt;. This means that you must install it manually.&lt;br /&gt;
The turtlemove api will be an API to facilitate programming your turtle's movement. It is in development.&lt;br /&gt;
&lt;br /&gt;
==doString==&lt;br /&gt;
'''doString(str=&amp;quot;&amp;quot;, checkFuel=10, refuel=true, fuelRetLocation={x,y,z})'''&lt;br /&gt;
&lt;br /&gt;
doString takes as an argument a commandstr and some options. The commandstr is defined below.&lt;br /&gt;
If the recorder is not on, Store and Goto require a wireless modem (for GPS).&lt;br /&gt;
If any unsupported operation is attempted, the function will cause an error().&lt;br /&gt;
&lt;br /&gt;
===checkFuel===&lt;br /&gt;
* -2: The turtle will attempt to return to fuelRetLocation if it has exactly that much fuel left after refueling attempts.&lt;br /&gt;
* -1: The turtle will make no attempt to examine fuel levels.&lt;br /&gt;
* n&amp;gt;=0: The API call will halt with a return of the string position if less than this much fuel is left AND refueling attempts fail.&lt;br /&gt;
===refuel===&lt;br /&gt;
* true: The turtle will try all slots, starting with 1, in an attempt to refuel.&lt;br /&gt;
* false: The turtle will never attempt refueling,&lt;br /&gt;
===commandstr===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
commandstr := {command}*&lt;br /&gt;
command := {direction} | {repeat} | {store} | {goto} | {mine} | {place} | {whitespace}&lt;br /&gt;
whitespace := Anything not defined here&lt;br /&gt;
direction := 'f' | 'b' | 'u' | 'd' | 'l' | 'r'&lt;br /&gt;
repeat := 'X{number}['{commandstr}']'&lt;br /&gt;
store := 'S&amp;lt;'{identifier}'&amp;gt;'&lt;br /&gt;
goto := 'G&amp;lt;'{identifier}'&amp;gt;'&lt;br /&gt;
identifier := [a-zA-Z0-9_ ]+&lt;br /&gt;
number := [0-9]+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
turtlemove = {}&lt;br /&gt;
&lt;br /&gt;
local ALLCMDS=fbudlrxsg&lt;br /&gt;
function turtlemove.doString(str, checkFuel, refuel, fuelRetLocation)&lt;br /&gt;
  local function fuelCheck()&lt;br /&gt;
    --TODO&lt;br /&gt;
  end&lt;br /&gt;
  local pos=0&lt;br /&gt;
  local str = string.lower(str)&lt;br /&gt;
  while pos &amp;lt;= string.len(str) do&lt;br /&gt;
    pos = pos+1&lt;br /&gt;
    fuelCheck()&lt;br /&gt;
    local c = string.sub(str,pos,pos)&lt;br /&gt;
    if string.find(ALLCMDS,c,1,true) then&lt;br /&gt;
      if string.find(&amp;quot;fbudlr&amp;quot;,c,1,true) then&lt;br /&gt;
        if c==&amp;quot;f&amp;quot; then&lt;br /&gt;
          while not turtle.forward() do os.sleep(0.01) end&lt;br /&gt;
        elseif c==&amp;quot;b&amp;quot; then&lt;br /&gt;
          while not turtle.back() do os.sleep(0.01) end&lt;br /&gt;
        elseif c==&amp;quot;u&amp;quot; then&lt;br /&gt;
          while not turtle.up() do os.sleep(0.01) end&lt;br /&gt;
        elseif c==&amp;quot;d&amp;quot; then&lt;br /&gt;
          while not turtle.down() do os.sleep(0.01) end&lt;br /&gt;
        elseif c==&amp;quot;l&amp;quot; then&lt;br /&gt;
          while not turtle.turnLeft() do os.sleep(0.01) end&lt;br /&gt;
        elseif c==&amp;quot;r&amp;quot; then&lt;br /&gt;
          while not turtle.turnRight() do os.sleep(0.01) end&lt;br /&gt;
        end&lt;br /&gt;
      elseif c==&amp;quot;x&amp;quot; then&lt;br /&gt;
        local numstr = &amp;quot;&amp;quot;&lt;br /&gt;
        while pos &amp;lt;= string.len(str) do&lt;br /&gt;
          pos = pos + 1&lt;br /&gt;
          c2 = string.sub(str,pos,pos)&lt;br /&gt;
          -- break check&lt;br /&gt;
          if c2 == &amp;quot;[&amp;quot; then break end&lt;br /&gt;
          -- errorcheck&lt;br /&gt;
          if not string.find(&amp;quot;0123456789&amp;quot;,c2,1,true) then error(&amp;quot;Unexpected character &amp;quot;..c2..&amp;quot; at position &amp;quot;..pos..&amp;quot; in repetition count&amp;quot;) end&lt;br /&gt;
          numstr = numstr .. c2&lt;br /&gt;
        end&lt;br /&gt;
        local pos_b = pos&lt;br /&gt;
        local reps = tonumber(numstr)&lt;br /&gt;
        if reps == nil then error(&amp;quot;Repeated section at postition &amp;quot;..pos..&amp;quot; has no repetition count&amp;quot;) end&lt;br /&gt;
        while true do&lt;br /&gt;
          pos=pos+1&lt;br /&gt;
          c3=string.sub(str,pos,pos)&lt;br /&gt;
          if c3==&amp;quot;]&amp;quot; then break end&lt;br /&gt;
          if pos &amp;gt; string.len(str) then error(&amp;quot;Repeated section not closed by position &amp;quot;..pos) end&lt;br /&gt;
        end&lt;br /&gt;
        local cmdstr = string.sub(str,pos_b,pos)&lt;br /&gt;
        for i=1, reps do&lt;br /&gt;
          turtlemove.doString(cmdstr)&lt;br /&gt;
        end&lt;br /&gt;
      else&lt;br /&gt;
        error(&amp;quot;Unimplemented character &amp;quot;..string.sub(str,pos,pos)..&amp;quot; at position &amp;quot;..pos)&lt;br /&gt;
      end&lt;br /&gt;
    else&lt;br /&gt;
      error(&amp;quot;Unexpected character &amp;quot;..string.sub(str,pos,pos)..&amp;quot; at position &amp;quot;..pos)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Thesbros</name></author>	</entry>

	</feed>