http://www.computercraft.info/wiki/api.php?action=feedcontributions&user=Banane9&feedformat=atomComputerCraft Wiki - User contributions [en]2024-03-28T11:01:05ZUser contributionsMediaWiki 1.24.1http://www.computercraft.info/wiki/index.php?title=Turtle.forward&diff=2324Turtle.forward2012-07-25T19:54:13Z<p>Banane9: made code smaller :)</p>
<hr />
<div>{{Function<br />
|name=turtle.forward<br />
|api=turtle<br />
|returns=[[boolean]] whether the turtle succeeded in moving forward<br />
|addon=ComputerCraft<br />
|desc=Attempts to move the turtle forward.<br />
|examples=<br />
{{Example<br />
|desc=Tries to move the turtle forward and outputs whether it worked or not.<br />
|code=if turtle.forward() then<br />
[[print]] ("Turtle moved forward.")<br />
else<br />
[[print]] ("Turtle didn't move forward.")<br />
end<br />
|output= Turtle moved forward. or Turtle didn't move forward.<br />
}}<br />
{{Example<br />
|desc=Tries to move the turtle forward x number of times. X is specified by the user and if the turtle can't move forward it will break the block infront of it.<br />
|code=Arg = (...) -- gets the parameters from the user<br />
if Arg ~= nil then<br />
Arg = [[tonumber]] (Arg) -- make it a number<br />
a = 1<br />
while a <= Arg do<br />
if not turtle.forward() then<br />
[[turtle.dig]]()<br />
turtle.forward()<br />
end<br />
a = a + 1<br />
end<br />
else<br />
[[print]] ("Missing parameter.")<br />
end<br />
|output= Either the turtle moving the specified amount of times or missing parameter.<br />
}}<br />
{{Example<br />
|desc=Digs until the turtle can move forward.<br />
|code=while not turtle.forward() do<br />
[[turtle.dig]]()<br />
end<br />
|output= The turtle moves forward.<br />
}}<br />
}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=Talk:Tnt_cannon(code)&diff=2323Talk:Tnt cannon(code)2012-07-25T17:10:22Z<p>Banane9: Created page with "This tutorial is bad written and not very usefull, delete? --~~~~"</p>
<hr />
<div>This tutorial is bad written and not very usefull, delete? --[[User:Banane9|Banane9]] 17:10, 25 July 2012 (UTC)</div>Banane9http://www.computercraft.info/wiki/index.php?title=Cobble_Generator&diff=2272Cobble Generator2012-07-21T19:00:35Z<p>Banane9: Undo revision 2267 by 176.251.229.81 (talk)</p>
<hr />
<div>== Colors ==<br />
Run Loop: <span style="color:blue">while true do</span><br><br />
If: <span style="color:green">if a==b then</span><br><br />
Action: <span style="color:red">turtle.dig()</span><br><br />
Var: <span style="color:DarkViolet">a = turtle.getItemCount(1)</span><br><br />
Print: <span style="color:OrangeRed">Print("Cobble Farm")</span><br><br />
For: <span style="color:DarkCyan">for i=1,9 do</span><br><br />
== Image ==<br />
[[File:SmallGen.png]]<br />
<br />
== Coding ==<br />
First, you have to make a loop so the machine keeps running:<br />
<span style="color:blue">while true do</span><br />
''''Command<br />
<span style="color:blue">end</span><br />
Now, inside of the loop, you have to add something to detect the block:<br />
<span style="color:blue">while true do</span><br />
<span style="color:green">if turtle.detect() then</span><br />
''''Command<br />
<span style="color:green">end</span><br />
<span style="color:blue">end</span><br />
After that, the block must be mined:<br />
<span style="color:blue">while true do</span><br />
<span style="color:green">if turtle.detect() then</span><br />
<span style="color:red">turtle.dig()</span><br />
<span style="color:green">end</span><br />
<span style="color:blue">end</span><br />
This detects if a block is present, and then mines it.<br />
However, when all the 9 block spaces are filled with blocks (9*64=576 blocks), they must be dropped to collect new blocks:<br />
<span style="color:blue">while true do</span><br />
<span style="color:green">if turtle.detect() then</span><br />
<span style="color:red">turtle.dig()</span><br />
<span style="color:green">end</span><br />
<span style="color:DarkViolet">itemcount = turtle.getItemCount(9)</span><br />
<span style="color:green">if itemcount == 64 then</span><br />
''''Drop all stacks<br />
<span style="color:green">end</span><br />
<span style="color:blue">end</span><br />
To drop all stacks, another loop must be added:<br />
<span style="color:blue">while true do</span><br />
<span style="color:green">if turtle.detect() then</span><br />
<span style="color:red">turtle.dig()</span><br />
<span style="color:green">end</span><br />
<span style="color:DarkViolet">itemcount = turtle.getItemCount(9)</span><br />
<span style="color:green">if itemcount == 64 then</span><br />
<span style="color:DarkCyan">for i=1,9 do</span><br />
''''Select each stack and then drops it<br />
<span style="color:DarkCyan">end</span><br />
<span style="color:green">end</span><br />
<span style="color:blue">end</span><br />
To select each stack and drop it, a <span style="color:red">turtle.select()</span> and a <span style="color:red">turtle.drop()</span> must be added:<br />
<span style="color:blue">while true do</span><br />
<span style="color:green">if turtle.detect() then</span><br />
<span style="color:red">turtle.dig()</span><br />
<span style="color:green">end</span><br />
<span style="color:DarkViolet">itemcount = turtle.getItemCount(9)</span><br />
<span style="color:green">if itemcount == 64 then</span><br />
<span style="color:DarkCyan">for i=1,9 do</span><br />
<span style="color:red">turtle.select(i)<span><br />
<span style="color:red">turtle.drop()<span><br />
<span style="color:DarkCyan">end</span><br />
<span style="color:red">turtle.select(1)<span><br />
<span style="color:green">end</span><br />
<span style="color:blue">end</span><br />
<br />
== Advanced Generator ==<br />
This is the generator I created (for use with (height:4 width:2) monitor):<br />
<br />
function counter()<br />
<span style="color:DarkViolet">local i = 0</span><br />
return function() i = i + 1 return i end<br />
end<br />
function modStr(num)<br />
<span style="color:green">if num < 10 then</span><br />
return "0" .. num<br />
<span style="color:green">else</span><br />
return num<br />
<span style="color:green">end</span><br />
end<br />
<span style="color:blue">while true do</span><br />
<span style="color:green">if turtle.detect() then</span><br />
<span style="color:red">turtle.dig()</span><br />
<span style="color:red">term.clear()</span><br />
<span style="color:red">term.setCursorPos(1,1)</span><br />
<span style="color:DarkViolet">local total = 0</span><br />
<span style="color:DarkCyan">for i=1,9,1 do</span><br />
<span style="color:DarkViolet">total = total + turtle.getItemCount(i)</span><br />
<span style="color:DarkCyan">end</span><br />
<span style="color:DarkCyan">for i=1,9,1 do</span><br />
<span style="color:OrangeRed">print("Row " .. i .. ": " .. turtle.getItemCount(i) .. " (" .. math.floor((turtle.getItemCount(i)/total)*100) .. "%)")</span><br />
<span style="color:DarkCyan">end</span><br />
<span style="color:OrangeRed">print("Total: " .. total)</span><br />
<span style="color:OrangeRed">print("-----------------")</span><br />
<span style="color:DarkViolet">local iterator = counter()</span><br />
<span style="color:OrangeRed">print(" ___ ___ ___ ")</span><br />
<span style="color:OrangeRed">print("|" .. modStr(turtle.getItemCount(iterator())) .. " |" .. modStr(turtle.getItemCount(iterator())) .. " |" .. modStr(turtle.getItemCount(iterator())) .. " |")</span><br />
<span style="color:OrangeRed">print("|___|___|___|")</span><br />
<span style="color:OrangeRed">print("|" .. modStr(turtle.getItemCount(iterator())) .. " |" .. modStr(turtle.getItemCount(iterator())) .. " |" .. modStr(turtle.getItemCount(iterator())) .. " |")</span><br />
<span style="color:OrangeRed">print("|---|---|---|")</span><br />
<span style="color:OrangeRed">print("|" .. modStr(turtle.getItemCount(iterator())) .. " |" .. modStr(turtle.getItemCount(iterator())) .. " |" .. modStr(turtle.getItemCount(iterator()))) .. " |")</span><br />
<span style="color:OrangeRed">print("|___|___|___|")</span><br />
<span style="color:OrangeRed">print(" ")</span><br />
<span style="color:OrangeRed">print("-----------------")</span><br />
<span style="color:OrangeRed">print("Cobble Farmer")</span><br />
<span style="color:OrangeRed">print("By: NewFletcher")</span><br />
<span style="color:green">end</span><br />
<span style="color:DarkViolet">totalcount = turtle.getItemCount(9)</span><br />
<span style="color:green">if totalcount == 64 then</span><br />
<span style="color:red">term.clear()</span><br />
<span style="color:red">term.setCursorPos(1,1)</span><br />
<span style="color:OrangeRed">print("Dropping Stacks")</span><br />
<span style="color:OrangeRed">print("...Please wait.")</span><br />
<span style="color:red">sleep(1)</span><br />
<span style="color:DarkCyan">for i=1,9 do</span><br />
<span style="color:red">turtle.select(i)</span><br />
<span style="color:red">turtle.drop()</span><br />
<span style="color:DarkCyan">end</span><br />
<span style="color:red">turtle.select(1)</span><br />
<span style="color:DarkCyan">end</span><br />
<span style="color:blue">end</span><br />
Images:<br><br />
[[File:MyCob.png]]<br><br><br />
[[File:MyGen.png]]<br />
<br />
[[Category:Tutorials]]</div>Banane9http://www.computercraft.info/wiki/index.php?title=Talk:Turtle_(API)&diff=2140Talk:Turtle (API)2012-07-14T15:14:45Z<p>Banane9: </p>
<hr />
<div>Is there a way to detect a block's type? Preferably without picking it up; it would be nice to be able to write a function to check the block about to be broken against a list of "Do not break" blocks, such as Industrial craft's MFSU, which loses all held power when picked up. <br />
<br />
Also I request a way to set server-wide list of blocks immune to the turtle.dig() functions, such as say personal safes (Industrial Craft again).<small><span class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:50.131.199.48|50.131.199.48]] ([[User talk:50.131.199.48|talk]] • [[Special:Contributions/50.131.199.48|contribs]]) </span></small><!-- Template:Unsigned --><br />
:As far as I know, there's no way to check the block type with the current API. Could be a feature in the future though, never know. {{User:Scarfacial/Signature|22:17 - 8 March 2012}}<br />
::Would be interesting to see if one could write a function for that. {{User:Banane9/Signature|22:43 - 9 March 2012}}<br />
:::i would see it too please. But i dont think that you can make that in a function<br />
:::[[User:Dude|Dude]] 22:13, 9 March 2012 (UTC)<br />
::::You can determine if the block matches the one in it's inventory using turtle.select(slot) and then turtle.compare() or turtle.compareUp() or turtle.compareDown()<br />
<br />
== turtle collect ? ==<br />
<br />
i understand that the turtle can drop items from its inventory with turtle.drop( [amount] )<br />
but is there a way to make the turtle collect items (like a player would do) around and store it in inventory ?<br />
(from what i understand right now the turtle collects items taken from a digged block ?<br />
thanks<br />
:Nope they don't collect items that are already dropped --[[User:Banane9|Banane9]] 12:22, 11 July 2012 (UTC)<br />
<br />
== treefarm ==<br />
<br />
i have write a big programm (120 lines) that destory the tree full (with the leaves) when the tree is grown. so the turtle can plant an new tree an beginn at the start. My problem: the programm dont work and i cant find the faults... <small><span class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:Dude|Dude]] ([[User talk:Dude|talk]] • [[Special:Contributions/Dude|contribs]]) </span></small><!-- Template:Unsigned --><br />
:Maybe because the leaves of the tree decay and that f*cks up the code? We cant help you without seeing your code ;) --[[User:Banane9|Banane9]] 12:22, 11 July 2012 (UTC)<br />
::On a similar note, I have written a disassembler script which (mostly) disassembles arbitrary things from the top down, but it really gets messed up by doors and other turtles and pistons, it is basically because interacting with blocks only works well if the blocks don't change while you are trying to deal with them/use them for navigating.<br />
<br />
== turtles w/ buildcraft ==<br />
my turtle can't seem to place pipes, what am I doing wrong? I have the right slot selected, what else could be wrong?<br />
:I dont know, maybe it just doesnt work :P and stop removing the other answeres :P --[[User:Banane9|Banane9]] 15:14, 14 July 2012 (UTC)</div>Banane9http://www.computercraft.info/wiki/index.php?title=Loops&diff=2131Loops2012-07-13T21:15:43Z<p>Banane9: added bunch of links</p>
<hr />
<div>[[Category:Tutorials]]<br />
This is a tutorial page for loops and their application.<br />
<br />
== Introducing Loops ==<br />
<br />
At some point while coding, you will most likely want to run some code multiple times, without writing out a lot of code. While it is true that functions can shorten your code, there may be situations where even thouse don't simplify it enough. That's where loops come in.<br />
<br />
Here is a script without loops<br />
local [[function]] GetName()<br />
[[write]]("Enter a name: ")<br />
return [[read]]()<br />
end<br />
<br />
local Name1 = GetName()<br />
local Name2 = GetName()<br />
local Name3 = GetName()<br />
local Name4 = GetName()<br />
local Name5 = GetName()<br />
<br />
[[write]]("You have entered "..Name1.." "..Name2.." "..Name3.." "..Name4.." "..Name5)<br />
<br />
As you can see, there is quite a lot of repetition, even when we're using a function.<br />
<br />
== The For loop ==<br />
<br />
The for loop is the most basic loop. It is in the following format<br />
for Variable = Start, End, Interval do<br />
--Insert code here<br />
end<br />
Variable is a number that will track where we are in the loop. It is usually called "i", or something more appropriate to the script. Start is a number to indicate the start point for the loop. This is generally 1, so the loop can count up easily. End is the number the loop will count to. Interval is an optional argument, and will specify how big the jumps would be . Ie, it specifies how much to add or subtract from Variable every loop.<br />
<br />
The best way to discover how the for loop works is to try it yourself. Try changing the numbers the following code to see how it reacts.<br />
for i=1,10 do<br />
[[print]]( "i is "..[[tostring]](i) )<br />
end<br />
Notice how it always counts up until Variable is the same or greater than End. Start, End, and Interval can also be variables, so it can loop a different number of times<br />
[[write]]("How many times should I loop? ")<br />
local Num = tostring( read() )<br />
for i=1,Num do<br />
[[print]]("Looped "..[[tostring]](i).." time(s).")<br />
end<br />
<br />
<br />
To simplify the first script using a for loop, it would look something like this:<br />
local string = ""<br />
for i=1,5 do<br />
[[write]]("Enter a name: ")<br />
string=string.." "..read()<br />
end<br />
[[write]]("You have entered "..string)<br />
<br />
== The While loop ==<br />
<br />
The While loop will continue looping until a certain condition is met.<br />
local Answer, Correct = "", "2"<br />
while Answer~=Correct do<br />
[[write]]("What is the sum of 1 and 1 (1+1)? ")<br />
Answer = [[read]]()<br />
<br />
if Answer == Correct then print("Correct!") else print("Incorrect!") end<br />
end<br />
<br />
This type of loop is useful for if you don't want to specify a definite end for the loop. Although infinite loops are ill-advised, you may want to use one at some point. To terminate a program stuck in a loop, hold Ctrl + T while in the computers interface.<br />
while [[boolean|true]] do --Always loop<br />
--Code here<br />
end<br />
<br />
== The Repeat loop ==<br />
A very simple loop to repeat something a stated number of times. The first line declares a local variable and sets its value to 1<br />
the repeat loop will print i until i = 5. Other conditions can also be used. unlike the while loop the repeat loop will always be <br />
executed once.<br />
<br />
local i = 1<br />
repeat<br />
[[print]](i)<br />
i = i + 1 <br />
until i == 5'''</div>Banane9http://www.computercraft.info/wiki/index.php?title=Loops&diff=2130Loops2012-07-13T21:11:04Z<p>Banane9: /* The Repeat loop */ fixed code box</p>
<hr />
<div>[[Category:Tutorials]]<br />
This is a tutorial page for loops and their application.<br />
<br />
== Introducing Loops ==<br />
<br />
At some point while coding, you will most likely want to run some code multiple times, without writing out a lot of code. While it is true that functions can shorten your code, there may be situations where even thouse don't simplify it enough. That's where loops come in.<br />
<br />
Here is a script without loops<br />
local function GetName()<br />
write("Enter a name: ")<br />
return read()<br />
end<br />
<br />
local Name1 = GetName()<br />
local Name2 = GetName()<br />
local Name3 = GetName()<br />
local Name4 = GetName()<br />
local Name5 = GetName()<br />
<br />
write("You have entered "..Name1.." "..Name2.." "..Name3.." "..Name4.." "..Name5)<br />
<br />
As you can see, there is quite a lot of repetition, even when we're using a function.<br />
<br />
== The For loop ==<br />
<br />
The for loop is the most basic loop. It is in the following format<br />
for Variable = Start, End, Interval do<br />
--Insert code here<br />
end<br />
Variable is a number that will track where we are in the loop. It is usually called "i", or something more appropriate to the script. Start is a number to indicate the start point for the loop. This is generally 1, so the loop can count up easily. End is the number the loop will count to. Interval is an optional argument, and will specify how big the jumps would be . Ie, it specifies how much to add or subtract from Variable every loop.<br />
<br />
The best way to discover how the for loop works is to try it yourself. Try changing the numbers the following code to see how it reacts.<br />
for i=1,10 do<br />
print( "i is "..tostring(i) )<br />
end<br />
Notice how it always counts up until Variable is the same or greater than End. Start, End, and Interval can also be variables, so it can loop a different number of times<br />
write("How many times should I loop? ")<br />
local Num = tostring( read() )<br />
for i=1,Num do<br />
print("Looped "..tostring(i).." time(s).")<br />
end<br />
<br />
<br />
To simplify the first script using a for loop, it would look something like this:<br />
local string = ""<br />
for i=1,5 do<br />
write("Enter a name: ")<br />
string=string.." "..read()<br />
end<br />
write("You have entered "..string)<br />
<br />
== The While loop ==<br />
<br />
The While loop will continue looping until a certain condition is met.<br />
local Answer, Correct = "", "2"<br />
while Answer~=Correct do<br />
write("What is the sum of 1 and 1 (1+1)? ")<br />
Answer = read()<br />
<br />
if Answer == Correct then print("Correct!") else print("Incorrect!") end<br />
end<br />
<br />
This type of loop is useful for if you don't want to specify a definite end for the loop. Although infinite loops are ill-advised, you may want to use one at some point. To terminate a program stuck in a loop, hold Ctrl + T while in the computers interface.<br />
while true do --Always loop<br />
--Code here<br />
end<br />
<br />
== The Repeat loop ==<br />
A very simple loop to repeat something a stated number of times. The first line declares a local variable and sets its value to 1<br />
the repeat loop will print i until i = 5. Other conditions can also be used. unlike the while loop the repeat loop will always be <br />
executed once.<br />
<br />
local i = 1<br />
repeat<br />
print(i)<br />
i = i + 1 <br />
until i == 5'''</div>Banane9http://www.computercraft.info/wiki/index.php?title=Talk:Os.queueEvent&diff=2127Talk:Os.queueEvent2012-07-13T14:33:33Z<p>Banane9: </p>
<hr />
<div>Is the Code supposed to not output hello when a redstone current comes?<br />
--[[User:Banane9|Banane9]] 15:21, 12 July 2012 (UTC)<br />
:It is supposed to output "Hello" when a redstone current from the left side comes or when the player hits Enter - which works for me --[[User:Pinkishu|Pinkishu]] 14:35, 13 July 2012 (CEST)<br />
:: if event == "redstone" then<br />
if rs.getInput("left") then<br />
os.queueEvent("key",28)<br />
end<br />
elseif event == "key" then<br />
if param1 == 28 then<br />
print("Hello")<br />
end<br />
end<br />
::but the code says elseif, so i wonder why that would be executed when the event is redstone.<br />
:::Oh ok the while true loop and qeue event -.-<br />
--[[User:Banane9|Banane9]] 14:33, 13 July 2012 (UTC)</div>Banane9http://www.computercraft.info/wiki/index.php?title=Talk:Os.queueEvent&diff=2126Talk:Os.queueEvent2012-07-13T14:32:35Z<p>Banane9: </p>
<hr />
<div>Is the Code supposed to not output hello when a redstone current comes?<br />
--[[User:Banane9|Banane9]] 15:21, 12 July 2012 (UTC)<br />
:It is supposed to output "Hello" when a redstone current from the left side comes or when the player hits Enter - which works for me --[[User:Pinkishu|Pinkishu]] 14:35, 13 July 2012 (CEST)<br />
:: if event == "redstone" then<br />
if rs.getInput("left") then<br />
os.queueEvent("key",28)<br />
end<br />
elseif event == "key" then<br />
if param1 == 28 then<br />
print("Hello")<br />
end<br />
end<br />
but the code says elseif, so i wonder why that would be executed when the event is redstone.</div>Banane9http://www.computercraft.info/wiki/index.php?title=Redstone.getInput&diff=2120Redstone.getInput2012-07-13T11:32:42Z<p>Banane9: added a link</p>
<hr />
<div>{{lowercase}}<br />
{{Function<br />
|name=redstone.getInput<br />
|args=[[string]] side<br />
|returns=[[boolean]] state of redstone signal<br />
|api=redstone<br />
|examples=<br />
{{Example<br />
|desc=Checks if the computer is receiving a redstone signal<br />
|code=[[print]] (redstone.getInput("back"))<br />
|output=true if the computer is getting redstone power from the back; otherwise false<br />
}}<br />
|notes=<br />
* This function will throw an error if you give it an invalid side.<br />
}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=Talk:Creating_a_simple_name_reading_program&diff=2105Talk:Creating a simple name reading program2012-07-12T15:25:35Z<p>Banane9: /* Kinda useless */ new section</p>
<hr />
<div>questions here<br />
<br />
== Kinda useless ==<br />
<br />
Why should I claim it to be mine, its pretty useless. Anyone who red the explaination to the function [[read|read()]] will know how to do this :P<br />
--[[User:Banane9|Banane9]] 15:25, 12 July 2012 (UTC)</div>Banane9http://www.computercraft.info/wiki/index.php?title=Talk:Os.queueEvent&diff=2104Talk:Os.queueEvent2012-07-12T15:21:48Z<p>Banane9: Created page with "Is the Code supposed to not output hello when a redstone current comes? --~~~~"</p>
<hr />
<div>Is the Code supposed to not output hello when a redstone current comes?<br />
--[[User:Banane9|Banane9]] 15:21, 12 July 2012 (UTC)</div>Banane9http://www.computercraft.info/wiki/index.php?title=Vector_(API)&diff=2103Vector (API)2012-07-12T15:19:14Z<p>Banane9: Undo revision 2101 by 91.121.27.33 (talk) yea removing that crap</p>
<hr />
<div>The vector API provides methods to create and manipulate vectors. An introduction to vectors can be found on [http://en.wikipedia.org/wiki/Euclidean_vector Wikipedia].<br />
<br />
<br />
{| border="1" cellpadding="2" cellspacing="0"<br />
!colspan="2" style="text-align: center; background: #DDDDDD"|Static methods<br />
|-<br />
|style="text-align: center; background: #EFEFEF" width="200px"|Method name<br />
|style="text-align: center; background: #EFEFEF" width="*"|Description<br />
|-<br />
|vector.new(x, y, z)<br />
|Creates a vector.<br /><br />
''@param'' '''x, y, z''' the vector coordinates<br /><br />
''@return'' the created vector<br />
|}<br />
<br />
<br />
{| border="1" cellpadding="2" cellspacing="0"<br />
!colspan="2" style="text-align: center; background: #DDDDDD"|Object methods<br />
|-<br />
|style="text-align: center; background: #EFEFEF" width="200px"|Method name<br />
|style="text-align: center; background: #EFEFEF" width="*"|Description<br />
|-<br />
|vectorA:add(vectorB)<br />
|Adds vectorB to vectorA and returns the resulted vector. Can also be used by writing vectorA + vectorB.<br />
|-<br />
|vectorA:sub(vectorB)<br />
|Subtracts vectorB to vectorA and returns the resulted vector. Can also be used by writing vectorA - vectorB.<br />
|-<br />
|vectorA:mul(vectorB)<br />
|Multiplies vectorB with vectorA and returns the resulted vector. Can also be used by writing vectorA * vectorB.<br />
|-<br />
|vectorA:dot(vectorB)<br />
|Returns the dot product of vectorA and vectorB.<br />
|-<br />
|vectorA:cross(vectorB)<br />
|Returns the vector which resulted in the cross product of vectorA and vectorB.<br />
|-<br />
|vectorA:length()<br />
|Returns the vector's length.<br />
|-<br />
|vectorA:normalize()<br />
|Normalizes the vector and returns the result as a new vector.<br />
|-<br />
|vectorA:round()<br />
|Rounds the vector coordinates to the nearest integers and returns the result as a new vector.<br />
|-<br />
|vectorA:tostring()<br />
|Returns a string representation of the vector in the form of "x,y,z".<br />
|}<br />
<br />
[[Category:APIs]]</div>Banane9http://www.computercraft.info/wiki/index.php?title=Talk:Turtle_(API)&diff=2088Talk:Turtle (API)2012-07-11T12:22:42Z<p>Banane9: </p>
<hr />
<div>Is there a way to detect a block's type? Preferably without picking it up; it would be nice to be able to write a function to check the block about to be broken against a list of "Do not break" blocks, such as Industrial craft's MFSU, which loses all held power when picked up. <br />
<br />
Also I request a way to set server-wide list of blocks immune to the turtle.dig() functions, such as say personal safes (Industrial Craft again).<small><span class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:50.131.199.48|50.131.199.48]] ([[User talk:50.131.199.48|talk]] • [[Special:Contributions/50.131.199.48|contribs]]) </span></small><!-- Template:Unsigned --><br />
:As far as I know, there's no way to check the block type with the current API. Could be a feature in the future though, never know. {{User:Scarfacial/Signature|22:17 - 8 March 2012}}<br />
::Would be interesting to see if one could write a function for that. {{User:Banane9/Signature|22:43 - 9 March 2012}}<br />
:::i would see it too please. But i dont think that you can make that in a function<br />
:::[[User:Dude|Dude]] 22:13, 9 March 2012 (UTC)<br />
<br />
== turtle collect ? ==<br />
<br />
i understand that the turtle can drop items from its inventory with turtle.drop( [amount] )<br />
but is there a way to make the turtle collect items (like a player would do) around and store it in inventory ?<br />
(from what i understand right now the turtle collects items taken from a digged block ?<br />
thanks<br />
:Nope they don't collect items that are already dropped --[[User:Banane9|Banane9]] 12:22, 11 July 2012 (UTC)<br />
<br />
== treefarm ==<br />
<br />
i have write a big programm (120 lines) that destory the tree full (with the leaves) when the tree is grown. so the turtle can plant an new tree an beginn at the start. My problem: the programm dont work and i cant find the faults... <small><span class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:Dude|Dude]] ([[User talk:Dude|talk]] • [[Special:Contributions/Dude|contribs]]) </span></small><!-- Template:Unsigned --><br />
:Maybe because the leaves of the tree decay and that f*cks up the code? We cant help you without seeing your code ;) --[[User:Banane9|Banane9]] 12:22, 11 July 2012 (UTC)<br />
== turtles w/ industrialcraft ==<br />
my turtle can't seem to place pipes, what am I doing wrong?<br />
<br />
:First would be that there are no Pipes in IndustrialCraft [[User:Pinkishu|Pinkishu]] 12:35 - 11 July 2012 CEST<br />
::Owned by Pinkishu! :D --[[User:Banane9|Banane9]] 12:22, 11 July 2012 (UTC)</div>Banane9http://www.computercraft.info/wiki/index.php?title=Turtle.forward&diff=2087Turtle.forward2012-07-11T12:18:31Z<p>Banane9: forward chuck</p>
<hr />
<div>{{Function<br />
|name=turtle.forward<br />
|api=turtle<br />
|returns=[[boolean]] whether the turtle succeeded in moving forward<br />
|addon=ComputerCraft<br />
|desc=Attempts to move the turtle forward.<br />
|examples=<br />
{{Example<br />
|desc=Trys to move the turtle forward and outputs whether it worked or not.<br />
|code=if turtle.forward() then<br />
[[print]] ("Turtle moved forward.")<br />
else<br />
[[print]] ("Turtle didn't move forward.")<br />
end<br />
|output= Turtle moved forward. or Turtle didn't move forward.<br />
}}<br />
{{Example<br />
|desc=Trys to move the turtle forward x number of times. X is spezified by the user and if the turtle can't move forward it will break the block infront of it.<br />
|code=Arg = (...) -- gets the param from the user<br />
if Arg ~= nil then<br />
Arg = [[tonumber]] (Arg) -- make it a number<br />
a = 1<br />
while a <= Arg do<br />
if not turtle.forward() then<br />
[[turtle.dig]]()<br />
turtle.forward()<br />
end<br />
a = a + 1<br />
end<br />
else<br />
[[print]] ("Missing parameter.")<br />
end<br />
|output= Either the trutle moving the specified amount of times. or Missing parameter.<br />
}}<br />
}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=Wiki_Todo&diff=2055Wiki Todo2012-07-09T15:56:08Z<p>Banane9: </p>
<hr />
<div>=== '''This page lists where work is needed to be done on the wiki. If you would like to help, we ask that you please make an account and help wherever you can.''' ===<br />
<br />
''Page currently incomplete, but being worked on.''<br />
<br />
== API Pages (Highest priorities are to finish function/method pages for APIs) ==<br />
<!--<br />
// Finished<br />
*[[HTTP_(API)|HTTP]] (Needs formatting and function pages)<br />
--><br />
<!--<br />
// Finished / nothing wrong with it right now<br />
*[[OS_(API)|OS]] (I'll work on this one)<br />
--><br />
*[[Peripheral_(API)|Peripheral]] (Needs pages for functions)<br />
<!--<br />
// Finished / nothing wrong with it right now<br />
*[[Rednet_(API)|Rednet]] (Just minor formatting issues with the links; not urgent)<br />
--><br />
<!--<br />
//Done<br />
*[[Redstone_(API)|Redstone]] (Needs page for 1 function)<br />
--><br />
*[[Term_(API)|Term]] (Needs pages for 2 functions)<br />
*[[Textutils_(API)|Textutils]] (Needs function pages)<br />
*[[Vector_(API)|Vector]] (Needs link to page explaining or description explaining what a vector is and function pages)<br />
[[Category:Lists]]</div>Banane9http://www.computercraft.info/wiki/index.php?title=Talk:Calculator_Tutorial&diff=2052Talk:Calculator Tutorial2012-07-09T15:26:13Z<p>Banane9: </p>
<hr />
<div>Not exactly the most well-written script.<br />
--[[User:Onionnion|Onionnion]] 02:32, 6 May 2012 (UTC)<br />
<br />
<br />
When do you give the result to the user? <br />
--[[User:Chuck|Chuck]] 11:31, 9 July 2012<br />
<br />
<br />
Yea really not that well thought-through<br />
--[[User:Banane9|Banane9]] 15:26, 9 July 2012 (UTC)</div>Banane9http://www.computercraft.info/wiki/index.php?title=Redstone.getBundledOutput&diff=2049Redstone.getBundledOutput2012-07-08T17:22:27Z<p>Banane9: changed the content to the function template, anyone please review this - never used the function</p>
<hr />
<div>{{lowercase}}<br />
{{Function<br />
|name=redstone.getBundledOutput<br />
|args=[[string]] side<br />
|api=redstone<br />
|returns=[[int (type)|int]] the value of the colors that are activated on that side<br />
|addon=ComputerCraft<br />
|examples=<br />
{{Example<br />
|desc=Prints the value of the active colors on the back<br />
|code=[[print]] (redstone.getBundledOutput ("back"))<br />
|output=the value of the colors, for example 1 if only white is active.<br />
}}<br />
}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=Redstone.testBundledInput&diff=2048Redstone.testBundledInput2012-07-08T17:01:19Z<p>Banane9: fixed link</p>
<hr />
<div>{{lowercase}}<br />
{{Function<br />
|name=redstone.testBundledInput<br />
|args=[[string (type)|string]] side, [[int (type)|int]] color value<br />
|api=redstone<br />
|returns=[[boolean]] true if on, false if off<br />
|addon=ComputerCraft<br />
|examples=<br />
{{Example<br />
|desc=Checks whether the blue part of the back input is active<br />
|code=[[print]] (redstone.testBundledInput ("back", colors.blue))<br />
|output=true if the blue part of the back input is active, otherwise false<br />
}}<br />
}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=Redstone.testBundledInput&diff=2047Redstone.testBundledInput2012-07-08T17:00:38Z<p>Banane9: created the page, anyone please check - never used that function</p>
<hr />
<div>{{lowercase}}<br />
{{Function<br />
|name=redstone.testBundledInput<br />
|args=[[string (type)|string]] side, [[int (type)|int]] color value<br />
|api=redstone<br />
|returns=[[boolean (type)|boolean]] true if on, false if off<br />
|addon=ComputerCraft<br />
|examples=<br />
{{Example<br />
|desc=Checks whether the blue part of the back input is active<br />
|code=[[print]] (redstone.testBundledInput ("back", colors.blue))<br />
|output=true if the blue part of the back input is active, otherwise false<br />
}}<br />
}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=Colors.test&diff=2046Colors.test2012-07-08T16:55:35Z<p>Banane9: added a link</p>
<hr />
<div>{{lowercase}}<br />
{{Function<br />
|name=colors.test<br />
|args=[[int (type)|int]] colors, [[int (type)|int]] color<br />
|api=color<br />
|returns=[[boolean]] whether or not all elements of <var>color</var> are contained in the set <var>colors</var><br />
|addon=ComputerCraft<br />
|desc=Tests whether <var>color</var> is contained within <var>colors</var>; <var>color</var> may be a single color or may be a set of colors (in the latter case, <code>true</code> is returned only if <em>all</em> colors in <var>color</var> are contained in <var>colors</var>)<br />
|examples=<br />
{{Example<br />
|desc=Combine white, magenta, and light blue, then check if light blue is within the set<br />
|code=[[print]](colors.test(colors.combine(colors.white, colors.magenta, colours.lightBlue), colors.lightBlue))<br />
|output=true<br />
}}<br />
}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=Redstone.getBundledInput&diff=2045Redstone.getBundledInput2012-07-08T16:49:00Z<p>Banane9: added links</p>
<hr />
<div>{{lowercase}}<br />
{{Function<br />
|name=redstone.getBundledInput<br />
|args=[[string]] side<br />
|api=redstone<br />
|returns=[[colors (type)|colors]] the colours that are activated on that side<br />
|addon=ComputerCraft<br />
|examples=<br />
{{Example<br />
|desc=Checks whether the blue part of the back input is active<br />
|code=[[print]] ([[colors.test]] (redstone.getBundledInput("back"), colors.blue))<br />
|output=true if the blue part of the back input is active, otherwise false<br />
}}<br />
}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=Tonumber&diff=2027Tonumber2012-07-08T10:09:51Z<p>Banane9: created the page</p>
<hr />
<div>{{Function<br />
|name=tonumber<br />
|args=[[string (type)|string]] to be converted into a number (needs to be a number)<br />
|api=none<br />
|addon=ComputerCraft<br />
|desc=Converts a string into a number <br />
|examples=<br />
{{Example<br />
|desc=Converts the strings into numbers and adds the together. (It would be more intelligent to just save it as a number.)<br />
|code=number1 = "10"<br />
number2 = "5"<br />
print (number1, " + ", number2, " = ", tonumber (number1) + tonumber (number2))<br />
|output = 10 + 5 = 15<br />
|notes=*<br />
}}<br />
}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=Turtle.forward&diff=2026Turtle.forward2012-07-08T09:57:22Z<p>Banane9: "Created" the page again</p>
<hr />
<div>{{Function<br />
|name=turtle.forward<br />
|api=turtle<br />
|addon=ComputerCraft<br />
|desc=Attempts to move the turtle forward.<br />
|examples=<br />
{{Example<br />
|desc=Trys to move the turtle forward and outputs whether it worked or not.<br />
|code=if turtle.forward() then<br />
[[print]] ("Turtle moved forward.")<br />
else<br />
[[print]] ("Turtle didn't move forward.")<br />
end<br />
|output= Turtle moved forward. or Turtle didn't move forward.<br />
}}<br />
{{Example<br />
|desc=Trys to move the turtle forward x number of times. X is spezified by the user and if the turtle can't move forward it will break the block infront of it.<br />
|code=Arg = (...) -- gets the param from the user<br />
if Arg ~= nil then<br />
Arg = [[tonumber]] (Arg) -- make it a number<br />
a = 1<br />
while a <= Arg do<br />
if not turtle.forward() then<br />
[[turtle.dig]]()<br />
turtle.forward()<br />
end<br />
a = a + 1<br />
end<br />
else<br />
[[print]] ("Missing parameter.")<br />
end<br />
|output= Either the trutle moving the specified amount of times. or Missing parameter.<br />
}}<br />
}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=Char_(type)&diff=2025Char (type)2012-07-08T09:28:25Z<p>Banane9: </p>
<hr />
<div>'''Char''' (short for character) is a single letter. In Lua though its the same as a [[string (type)|string]]. A [[string (type)|string]] is technically a multiple of chars connected together.</div>Banane9http://www.computercraft.info/wiki/index.php?title=Char_(type)&diff=2024Char (type)2012-07-08T09:28:10Z<p>Banane9: Created the page</p>
<hr />
<div>'''Char''' (short for character) is a single letter. In Lua though its the same as a [[string (type)|string]]. A [[string (type|string]] is technically a multiple of chars connected together.</div>Banane9http://www.computercraft.info/wiki/index.php?title=Read&diff=2023Read2012-07-08T09:25:32Z<p>Banane9: Created the page</p>
<hr />
<div>{{Function<br />
|name=read<br />
|args= [[char (type)|char]] to replace userinput with<br />
|api=none<br />
|addon=ComputerCraft<br />
|desc=Lets you get input of the user.<br />
|examples=<br />
{{Example<br />
|desc=Prints what the user wrote.<br />
|code=[[print]] (read())<br />
|output=Whatever the user wrote.<br />
}}<br />
{{Example<br />
|desc=Ask for a Password and lets the user enter it. The letters are hidden by '*'.<br />
|code=password = "computercraft"<br />
[[print]] ("Enter Password")<br />
input = read ("*")<br />
if (input == password) then<br />
[[print]] ("Password is correct. Access granted.")<br />
else<br />
[[print]] ("Password is incorrect. Access denied.")<br />
end<br />
|output=Enter Password<br />
<nowiki>*******</nowiki><br />
Password is correct. Access granted. or Password is incorrect. Access denied.<br />
}}<br />
}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=Write&diff=2022Write2012-07-08T08:51:49Z<p>Banane9: created the page</p>
<hr />
<div>{{Function<br />
|name=write<br />
|args= [[string (type)|string]]<br />
|api=none<br />
|addon=ComputerCraft<br />
|desc=Lets you write the string on the terminal.<br />
|examples=<br />
{{Example<br />
|desc=Writes something.<br />
|code=write ("Hello ")<br />
write ("World!")<br />
|output=Hello World! (in one line)<br />
}}<br />
|notes=*Starts writing where the last write stopped as opposed to [[print|print()]] which always prints in a new line.<br />
*When used at the end of a program, the following prompt will be in the same line.<br />
}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=Print&diff=2020Print2012-07-08T08:42:41Z<p>Banane9: </p>
<hr />
<div>{{Function<br />
|name=print<br />
|args= [[string (type)|string]]<br />
|api=none<br />
|addon=ComputerCraft<br />
|desc=Lets you print the string on the terminal.<br />
|examples=<br />
{{Example<br />
|desc=Prints something.<br />
|code=print ("Hello World!")<br />
|output=Hello World!<br />
}}<br />
}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=Wiki_Todo&diff=1994Wiki Todo2012-07-07T20:14:36Z<p>Banane9: parallel done :)</p>
<hr />
<div>=== '''This page lists where work is needed to be done on the wiki. If you would like to help, we ask that you please make an account and help wherever you can.''' ===<br />
<br />
''Page currently incomplete, but being worked on.''<br />
<br />
== API Pages (Highest priorities are to finish function/method pages for APIs) ==<br />
<!--<br />
// Finished<br />
*[[HTTP_(API)|HTTP]] (Needs formatting and function pages)<br />
--><br />
<!--<br />
// Finished / nothing wrong with it right now<br />
*[[OS_(API)|OS]] (I'll work on this one)<br />
--><br />
*[[Peripheral_(API)|Peripheral]] (Needs pages for functions)<br />
<!--<br />
// Finished / nothing wrong with it right now<br />
*[[Rednet_(API)|Rednet]] (Just minor formatting issues with the links; not urgent)<br />
--><br />
*[[Redstone_(API)|Redstone]] (Needs pages for 3 functions)<br />
*[[Term_(API)|Term]] (Needs function pages)<br />
*[[Textutils_(API)|Textutils]] (Needs function pages)<br />
*[[Vector_(API)|Vector]] (Needs link to page explaining or description explaining what a vector is and function pages)<br />
[[Category:Lists]]</div>Banane9http://www.computercraft.info/wiki/index.php?title=Print&diff=1987Print2012-07-07T19:50:48Z<p>Banane9: </p>
<hr />
<div>{{Function<br />
|name=print<br />
|args= [[string (type)|string]]<br />
|api=lua<br />
|addon=ComputerCraft<br />
|desc=Lets you print the string on the terminal.<br />
|examples=<br />
{{Example<br />
|desc=Prints something.<br />
|code=print ("Hello World!")<br />
|output=Hello World!<br />
}}<br />
}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=Print&diff=1986Print2012-07-07T19:50:21Z<p>Banane9: </p>
<hr />
<div>{{Function<br />
|name=print<br />
|args= [[string (type)|string]]<br />
|api=part of lua<br />
|addon=ComputerCraft<br />
|desc=Lets you print the string on the terminal.<br />
|examples=<br />
{{Example<br />
|desc=Prints something.<br />
|code=print ("Hello World!")<br />
|output=Hello World!<br />
}}<br />
}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=Print&diff=1985Print2012-07-07T19:49:43Z<p>Banane9: Created page with "{{Function |name=print |args= string |addon=ComputerCraft |desc=Lets you print the string on the terminal. |examples= {{Example |desc=Prints something. |code..."</p>
<hr />
<div>{{Function<br />
|name=print<br />
|args= [[string (type)|string]]<br />
|addon=ComputerCraft<br />
|desc=Lets you print the string on the terminal.<br />
|examples=<br />
{{Example<br />
|desc=Prints something.<br />
|code=print ("Hello World!")<br />
|output=Hello World!<br />
}}<br />
}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=Parallel.waitForAll&diff=1984Parallel.waitForAll2012-07-07T19:44:46Z<p>Banane9: Created the page</p>
<hr />
<div>{{Function<br />
|name=parallel.waitForAll<br />
|args= function1, function2, so on<br />
|returns = ?<br />
|api=parallel<br />
|addon=ComputerCraft<br />
|desc=Lets you run multiple functions at the same time.<br />
|examples=<br />
{{Example<br />
|desc=Tells the computer to run function1 and function2 at the same time. Will broadcast what the User enters and prints what it receives over rednet. It will stop when it received a message and the usewr entered something.<br />
|code=function1 = [[function]]()<br />
[[print]] ([[rednet.receive]]())<br />
end<br />
function2 = [[function]]()<br />
[[rednet.broadcast]] ([[read]]())<br />
end<br />
parallel.waitForAll (function1, function2)<br />
|output=Prints what it received via rednet and broadcasts the message the user typed.<br />
}}<br />
}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=Parallel.waitForAny&diff=1983Parallel.waitForAny2012-07-07T19:26:51Z<p>Banane9: Created the Page</p>
<hr />
<div>{{Function<br />
|name=parallel.waitForAny<br />
|args= function1, function2, so on<br />
|returns = ?<br />
|api=parallel<br />
|addon=ComputerCraft<br />
|desc=Lets you run multiple functions at the same time.<br />
|examples=<br />
{{Example<br />
|desc=Tells the computer to run function1 and function2 at the same time. Will broadcast what the User enters and prints what it receives over rednet. Both will stop when either something is printed or the user entered something.<br />
|code=function1 = [[function]]()<br />
[[print]] ([[rednet.receive]]())<br />
end<br />
function2 = [[function]]()<br />
[[rednet.broadcast]] ([[read]]())<br />
end<br />
parallel.waitForAny (function1, function2)<br />
|output=Either it prints what it received via rednet, or it broadcasts the message the user typed.<br />
}}<br />
}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=Parallel_(API)&diff=1979Parallel (API)2012-07-07T16:03:52Z<p>Banane9: </p>
<hr />
<div>Parallel is an API which allows you to multitask.<br />
{| border="1" cellpadding="2" cellspacing="0"<br />
!style="background:#EEE" width="200px"|Method name<br />
!style="background:#EEE" width="*"|Description<br />
|-<br />
|[[parallel.waitForAny]]( function1, function2, so on)<br />
|Waits for any function to complete.<br />
|-<br />
|[[parallel.waitForAll]]( function1, function2, so on)<br />
|Waits for all of the functions to complete.<br />
|}<br />
[[Category:APIs]]</div>Banane9http://www.computercraft.info/wiki/index.php?title=File_talk:Program_in_computer.png&diff=956File talk:Program in computer.png2012-03-14T15:57:11Z<p>Banane9: </p>
<hr />
<div>This picture couldn't of been taken inside computercraft, as there is a terminal at the top, and it is in red, something computercraft doesn't support yet.<br />
:Thats the alternative OS Redworks -- {{User:Banane9}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=User:Banane9&diff=955User:Banane92012-03-14T15:54:42Z<p>Banane9: </p>
<hr />
<div><includeonly><span style="font-size:10px;">( [[User:Banane9|Banane9]] | [[User_talk:Banane9|Talk]] ) {{{1|}}}</span></includeonly></div>Banane9http://www.computercraft.info/wiki/index.php?title=Talk:Recipes&diff=954Talk:Recipes2012-03-14T15:54:16Z<p>Banane9: </p>
<hr />
<div>Just need that grid images now. -- {{User:Banane9}} 15:54, 14 March 2012 (UTC)</div>Banane9http://www.computercraft.info/wiki/index.php?title=User:Banane9&diff=953User:Banane92012-03-14T15:51:40Z<p>Banane9: </p>
<hr />
<div><span style="font-size:10px;">( [[User:Banane9|Banane9]] | [[User_talk:Banane9|Talk]] ) {{{1|}}}</span></div>Banane9http://www.computercraft.info/wiki/index.php?title=User:Banane9/Signature&diff=952User:Banane9/Signature2012-03-14T15:51:17Z<p>Banane9: </p>
<hr />
<div><includeonly><span style="font-size:10px;">( [[User:Banane9|Banane9]] | [[User_talk:Banane9|Talk]] ) {{{1|}}}</span></includeonly></div>Banane9http://www.computercraft.info/wiki/index.php?title=User:Banane9/Signature&diff=951User:Banane9/Signature2012-03-14T15:50:29Z<p>Banane9: </p>
<hr />
<div><span style="font-size:10px;">( [[User:Banane9|Banane9]] | [[User_talk:Banane9|Talk]] ) {{{1|}}}</span></div>Banane9http://www.computercraft.info/wiki/index.php?title=Talk:Recipes&diff=950Talk:Recipes2012-03-14T15:49:18Z<p>Banane9: </p>
<hr />
<div>Just need that grid images now. [[User:Banane9|Banane9]] 15:49, 14 March 2012 (UTC)</div>Banane9http://www.computercraft.info/wiki/index.php?title=User:Banane9&diff=949User:Banane92012-03-14T15:48:27Z<p>Banane9: Created page with "<includeonly><span style="font-size:10px;">( Banane9 | Talk ) {{{1|}}}</span></includeonly>"</p>
<hr />
<div><includeonly><span style="font-size:10px;">( [[User:Banane9|Banane9]] | [[User_talk:Banane9|Talk]] ) {{{1|}}}</span></includeonly></div>Banane9http://www.computercraft.info/wiki/index.php?title=Talk:Recipes&diff=948Talk:Recipes2012-03-14T15:46:20Z<p>Banane9: </p>
<hr />
<div>Just need that grid images now. [[User:Banane9|Banane9/Signature]] 15:46, 14 March 2012 (UTC)</div>Banane9http://www.computercraft.info/wiki/index.php?title=Talk:Recipes&diff=947Talk:Recipes2012-03-14T15:42:53Z<p>Banane9: Created page with "Just need that grid images now. ~~~"</p>
<hr />
<div>Just need that grid images now. [[User:Banane9|Banane9/Signature]]</div>Banane9http://www.computercraft.info/wiki/index.php?title=Recipes&diff=946Recipes2012-03-14T15:39:05Z<p>Banane9: </p>
<hr />
<div>The console:<br />
{{Crafting grid<br />
|A1=stone |B1=stone |C1=stone<br />
|A2=stone |B2=redstone |C2=stone<br />
|A3=stone |B3=glass pane |C3=stone<br />
|Output=console<br />
}}<br />
<br />
The modem:<br />
{{Crafting grid<br />
|A1=stone |B1=stone |C1=stone<br />
|A2=stone |B2=redstone torch |C2=stone<br />
|A3=stone |B3=stone |C3=stone<br />
|Output=modem<br />
}}<br />
<br />
The disk drive:<br />
{{Crafting grid<br />
|A1=stone |B1=stone |C1=stone<br />
|A2=stone |B2=redstone |C2=stone<br />
|A3=stone |B3=redstone |C3=stone<br />
|Output=disk drive<br />
}}<br />
<br />
The disk:<br />
{{Crafting grid<br />
|A1=redstone<br />
|A2=paper<br />
|Output=disk<br />
}}<br />
<br />
The turtle:<br />
{{Crafting grid<br />
|A1=iron |B1=iron |C1=iron<br />
|A2=iron |B2=console |C2=iron<br />
|A3=iron |B3=chest |C3=iron<br />
|Output=turtle<br />
}}<br />
<br />
The mining turtle:<br />
{{Crafting grid<br />
|A1=turtle |B1=diamond pickaxe<br />
|Output=mining turtle<br />
}}<br />
<br />
The wireless turtle:<br />
{{Crafting grid<br />
|A1=turtle |B1=modem<br />
|Output=wireless turtle<br />
}}<br />
<br />
The screen:<br />
{{Crafting grid<br />
|A1=stone |B1=stone |C1=stone<br />
|A2=stone |B2=glass pane |C2=stone<br />
|A3=stone |B3=stone |C3=stone<br />
|Output=screen<br />
}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=Talk:Turtle_(API)&diff=739Talk:Turtle (API)2012-03-09T21:47:06Z<p>Banane9: </p>
<hr />
<div>Is there a way to detect a block's type? Preferably without picking it up; it would be nice to be able to write a function to check the block about to be broken against a list of "Do not break" blocks, such as Industrial craft's MFSU, which loses all held power when picked up. <br />
<br />
Also I request a way to set server-wide list of blocks immune to the turtle.dig() functions, such as say personal safes (Industrial Craft again).<br />
:As far as I know, there's no way to check the block type with the current API. Could be a feature in the future though, never know. {{User:Scarfacial/Signature|22:17 - 8 March 2012}}<br />
::Would be interesting to see if one could write a function for that. {{User:Banane9/Signature|22:43 - 9 March 2012}}</div>Banane9http://www.computercraft.info/wiki/index.php?title=User:Banane9/Signature&diff=738User:Banane9/Signature2012-03-09T21:46:37Z<p>Banane9: Created page with "<includeonly><span style="font-size:10px;">( Banane9 | Talk ) {{{1|}}}</span></includeonly>"</p>
<hr />
<div><includeonly><span style="font-size:10px;">( [[User:Banane9|Banane9]] | [[User_talk:Banane9|Talk]] ) {{{1|}}}</span></includeonly></div>Banane9