- ComputerCraft | Programmable Computers for Minecraft
- → Vliekkie's Content
Vliekkie's Content
There have been 17 items by Vliekkie (Search limited from 10-February 22)
#7149 Extremely Simple 3x3 ladder+tower builder
Posted by
Vliekkie
on 31 March 2012 - 05:32 PM
in
Turtle Programs
BUT.. how to get it to not place something if u leave a slot open?
bum bum bum buuuuum
#6939 Extremely Simple 3x3 ladder+tower builder
Posted by
Vliekkie
on 30 March 2012 - 05:35 PM
in
Turtle Programs
And as a bonus the layout of the slots looks exactly the same.. gewd 4 sempl mynds
AXA A=Anything.. even air if u want to save blocks or keep it simple
ALA L=Ladder
SAA S=Startpoint.. it faces north according to this program X= Any block that a ladder can hold on to..
Here's the code
term.clear()
term.setCursorPos(1,1)
print("This program builds a ladder on a flat 3x3 surface surounded by a shell in the following format at a height of ur choosing.")
print("Press any button to continue")
os.pullEvent(key)
term.clear()
term.setCursorPos(1,1)
print("use the following format and fill your slots. A,S = your own Block choice. X= Ladder suportable block L=ladder and S=startpoint")
term.setCursorPos(1,6)
print("AXA")
print("ALA")
print("SAA")
print("How high do you want to go?")
h=tonumber(read())
x=0
while x<h do
x=x+1
turtle.up()
if turtle.getItemCount(7)>0 then
turtle.select(7)
turtle.placeDown()
end
turtle.forward()
if turtle.getItemCount(4)>0 then
turtle.select(4)
turtle.placeDown()
end
turtle.forward()
if turtle.getItemCount(1)>0 then
turtle.select(1)
turtle.placeDown()
end
turtle.turnRight()
turtle.forward()
turtle.turnRight()
if turtle.getItemCount(2)>0 then
turtle.select(2)
turtle.placeDown()
end
turtle.forward()
turtle.forward()
if turtle.getItemCount(8)>0 then
turtle.select(8)
turtle.placeDown()
end
turtle.turnLeft()
turtle.turnLeft()
turtle.forward()
if turtle.getItemCount(5)>0 then
turtle.select(5)
turtle.placeDown()
end
turtle.turnLeft()
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
if turtle.getItemCount(9)>0 then
turtle.select(9)
turtle.placeDown()
end
turtle.forward()
if turtle.getItemCount(6)>0 then
turtle.select(6)
turtle.placeDown()
end
turtle.forward()
if turtle.getItemCount(3)>0 then
turtle.select(3)
turtle.placeDown()
end
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.turnLeft()
turtle.turnLeft()
end
turtle.back()
y=2
while y<h do
turtle.down()
endENJOY!!!
Plz gimme props if you use this.. AND if you think this could be easier.. plz .. critisism is DEMANDED.. lol jk.. it would still be nice though..
heres a pic

#6921 Platform Builder
Posted by
Vliekkie
on 30 March 2012 - 03:53 PM
in
Turtle Programs
term.clear()
term.setCursorPos(1,1)
print("how Long?")
a=tonumber(read())
term.setCursorPos(1,3)
term.clearLine()
print("how Wide?")
b=tonumber(read())
turtle.placeDown()
x=1
y=0
s=1
print("using slot " ..s)
while y<b do
y=y+1
while x<a do
x=x+1
turtle.forward()
turtle.placeDown()
if turtle.getItemCount(s)==0 then
s=s+1
print("now using slot " ..s)
turtle.select(s)
if turtle.getItemCount(tonumber(s))<2 then
print("Fill'er up Scotty!! and hit any button")
os.pullEvent(key)
end
end
end
x=1
if y~=b then
q=tonumber(y)
if q%2==1 then
turtle.turnRight()
turtle.forward()
turtle.placeDown()
turtle.turnRight()
elseif q%2==0 then
turtle.turnLeft()
turtle.forward()
turtle.placeDown()
turtle.turnLeft()
end
end
end
ry=1
rx=1
turtle.turnLeft()
turtle.turnLeft()
if b%2==1 then
turtle.turnRight()
while ry<b do --} } } }
turtle.forward() --{ { { {
ry=ry+1 --} } } }
end --{ { { {
end
turtle.turnLeft()
while rx<a do
turtle.forward()
rx=rx+1
end
term.clear()
term.setCursorPos(1,1)
print("done")#6919 Platform Builder
Posted by
Vliekkie
on 30 March 2012 - 03:31 PM
in
Turtle Programs
term.clear()
term.setCursorPos(1,1)
print("how Long?")
a=tonumber(read())
term.setCursorPos(1,3)
term.clearLine()
print("how Wide?")
b=tonumber(read())
turtle.placeDown()
x=1
y=0
s=1
print("using slot " ..s)
while y<b do
y=y+1
while x<a do
x=x+1
turtle.forward()
turtle.placeDown()
if turtle.getItemCount(s)==0 then
s=s+1
print("now using slot " ..s)
turtle.select(s)
end
end
x=1
if y~=b then
q=tonumber(y)
if q%2==1 then
turtle.turnRight()
turtle.forward()
turtle.placeDown()
turtle.turnRight()
elseif q%2==0 then
turtle.turnLeft()
turtle.forward()
turtle.placeDown()
turtle.turnLeft()
end
end
end
ry=1
rx=1
turtle.turnLeft()
turtle.turnLeft()
if b%2==1 then
turtle.turnRight()
while ry<b do --} } } }
turtle.forward() --{ { { {
ry=ry+1 --} } } }
end --{ { { {
end
turtle.turnLeft()
while rx<a do
turtle.forward()
rx=rx+1
end
term.clear()
term.setCursorPos(1,1)
print("done")#6912 Platform Builder
Posted by
Vliekkie
on 30 March 2012 - 02:52 PM
in
Turtle Programs
Seem'd that it built 1 block too long.. so i made x=0 into x=1 Should fix it..
AND it doesnt say when it switches slots :S
#6911 Platform Builder
Posted by
Vliekkie
on 30 March 2012 - 02:46 PM
in
Turtle Programs
I'll play around some more.. and see what i can come up with..
Dont put any money on it.. Also vandie.. sorry pics are a kite that wont fly..
Im on a VERY limited broadband cap.. and in SA that means DL as little as possible and UL even less
#6514 Platform Builder
Posted by
Vliekkie
on 27 March 2012 - 05:47 PM
in
Turtle Programs
Correct me where wrong
this has a WTFPL lisence
Check further down for new versions
term.clear()
term.setCursorPos(1,1)
print("how Long?")
a=tonumber(read())
term.setCursorPos(1,3)
term.clearLine()
print("how Wide?")
b=tonumber(read())
turtle.placeDown()
x=1
y=0
s=1
print("using slot " ..s)
while y<b do
y=y+1
while x<a do
x=x+1
turtle.forward()
turtle.placeDown()
if turtle.getItemCount(s)==0 then
s=s+1
print("now using slot " ..s)
turtle.select(s)
end
end
x=1
q=tonumber(y)
if q%2==1 then
turtle.turnRight()
turtle.forward()
turtle.placeDown()
turtle.turnRight()
elseif q%2==0 then
turtle.turnLeft()
turtle.forward()
turtle.placeDown()
turtle.turnLeft()
end
end
term.clear()
term.setCursorPos(1,1)
print("done")critsize me hard..
even on spelling.. punsishment learns a person..
EDIT: fixed a bug
EDIT2: New version Posted 30 march!
EDIT3: NEW NEW version Posted 15 minutes later on March 30!!!
#6513 (Question)Unable to get my platform program to work.
Posted by
Vliekkie
on 27 March 2012 - 05:28 PM
in
Ask a Pro
here it is dunno if it works yet
term.clear()
term.setCursorPos(1,1)
print("how wide?")
a=tonumber(read())
term.setCursorPos(1,3)
term.clearLine()
print("how long")
b=tonumber(read())
turtle.placeDown()
x=0
y=0
s=1
while y<b do
y=y+1
while x<a do
x=x+1
turtle.forward()
turtle.placeDown()
if turtle.getItemCount(tonumber(s))==0 then
s=s+1
turtle.selectSlot(tonumber(s))
end
end
x=0
q=tonumber(y)
if q%2==1 then
turtle.turnRight()
turtle.forward()
turtle.placeDown()
turtle.turnRight()
elseif q%2==0 then
turtle.turnLeft()
turtle.forward()
turtle.placeDown()
turtle.turnLeft()
end
end
term.clear()
term.setCursorPos(1,1)
print("done")works great.. i just needed to add a turtle.placeDown() after the turns.
Woot.. time to create a superflat over a survival
ok.. stoped at a empty slot..
figured out turtle.selectSlot(slotNum) us WRONG..
use turtle.select(slotNum)
#6510 (Question)Unable to get my platform program to work.
Posted by
Vliekkie
on 27 March 2012 - 05:15 PM
in
Ask a Pro
heres the new code
term.clear()
term.setCursorPos(1,1)
print("how wide?")
a=tonumber(read())
term.setCursorPos(1,3)
term.clearLine()
print("how long")
b=tonumber(read())
x=0
y=0
s=1
while y<b do
y=y+1
while x<a do
x=x+1
turtle.forward()
turtle.placeDown()
if turtle.getItemCount(s)==0 then
s=s+1
turtle.selectSlot(s)
else
end
x=0
q=tonumber(y)
if q%2==1 then
turtle.turnRight()
turtle.forward()
turtle.turnRight()
elseif q%2==0 then
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
else
break
end
end
end
term.clear()
term.setCursorPos(1,1)
print("done")i added a x=x+1 and fixed some errors but now it runs in circles
EDIT.. haha thx mystic.. mind checking the new one.. i have a feeling one of my ends are totally misplaced
#6493 (Question)Unable to get my platform program to work.
Posted by
Vliekkie
on 27 March 2012 - 04:04 PM
in
Ask a Pro
its not working.. can anyone take a peek and check if something is wrong?
term.clear()
term.setCursorPos(1,1)
print("Area?")
o=read()
o=b
a=tonumber(o)
b=tonumber(o)/2
x=0
y=0
s=1
while y<b do
y=y+1
while x<a do
turtle.forward()
turtle.placeDown()
if turtle.getSlotcount()==0 then
s=s+1
turtle.selectSlot("s")
else
end
q=bit.band(y, 1)
if q==("1") then
turtle.turnRight()
turtle.forward()
turtle.turnRight()
elseif q==("0") then
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
end
end #6492 (Question)Unable to get my platform program to work.
Posted by
Vliekkie
on 27 March 2012 - 04:04 PM
in
Ask a Pro
its not working.. can anyone take a peek and check if something is wrong?
term.clear()
term.setCursorPos(1,1)
print("Area?")
o=read()
o=b
a=tonumber(o)
b=tonumber(o)/2
x=0
y=0
s=1
while y<b do
y=y+1
while x<a do
turtle.forward()
turtle.placeDown()
if turtle.getSlotcount()==0 then
s=s+1
turtle.selectSlot("s")
else
end
q=bit.band(y, 1)
if q==("1") then
turtle.turnRight()
turtle.forward()
turtle.turnRight()
elseif q==("0") then
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
end
end
#6480 (QUESTION) even or odd numbers
Posted by
Vliekkie
on 27 March 2012 - 03:07 PM
in
Ask a Pro
Is there a way to make a If statement that will run one command when a variable is a odd and another command when the variable is a even
lets say ..
y=5
thenumber=tonumber(y)
if thenumber="odd" then
print("durp")
else if thenumber="even" then
print("not durp")
end
Plz pay no atention to spelling and the failure code up there..
I just want to know what I would use instead of "odd" and "even"
PS My english might be suckish...
Also.. how to I set something to be a spoiler.. i dont want anyone to read through the code if they already know what i mean..
hope there is something like this
- ComputerCraft | Programmable Computers for Minecraft
- → Vliekkie's Content


