View difference between Paste ID: S5K1GvhA and 32FH1p2J
SHOW: | | - or go back to the newest paste.
1
--[[
2-
Auflistung Materialien:
2+
        Minecraft Turtle: Platform
3-
01 Fußboden innen:   40
3+
        2013 (c) psychedelixx
4-
02 Fußboden Veranda:  6
4+
        2013-12-15
5-
03 Treppen Veranda:   9
5+
6-
04 Sockel:           26
6+
        Builds a simple platform
7-
05 Wände Typ 1:      63
7+
8-
06 Wände Typ 2:      46
8+
9-
07 Fenster:          15
9+
10-
08 Türen:             1
10+
11-
09 Trittplatte:       1
11+
        - type "pastebin get S5K1GvhA platform"
12-
10 Craftingtable:     1
12+
13-
11 Truhen:            2
13+
14-
12 Fackeln:           4
14+
15-
13 Öfen:              5
15+
width = 2
16-
14 Dach:             64
16+
length = 2
17-
15 Dach:             48
17+
18-
16 Giebel:           10
18+
19
local args = { ... }
20-
http://pastebin.com/J4bcwtGy
20+
21
if #args == 1 then
22
    width  = tonumber(args[1])
23
    length = width
24-
        Minecraft Turtle: Simple House
24+
25-
        2013-12-13 (c) psychedelixx / thebiglebowski33
25+
26
if #args == 2 then
27-
        Builds a simple house
27+
    width  = tonumber(args[1])
28
    length = tonumber(args[2])
29
end
30
31
if width*length > 1024 then
32-
        - type "pastebin get J4bcwtGy house"
32+
    print("max size: 1024 (32*32)")
33
end
34
 
35-
--[[ --- Konstanten --- ]]--
35+
if turtle.getFuelLevel() < width * length then
36
    turtle.refuel()
37
end
38-
countList={}
38+
39-
keyFloorIn    = "1"
39+
if turtle.getFuelLevel() < width * length then
40-
keyFloorOut   = "2"
40+
    print("Amount of missing fuel: ", width * length - turtle.getFuelLevel())
41-
keyStairsOut  = "3"
41+
    print("Missing fuel in coal: ", (width * length - turtle.getFuelLevel())/80+1)
42-
keySocket     = "4"
42+
43-
keyWalls1     = "5"
43+
44-
keyWalls2     = "6"
44+
sumItems = 0
45-
keyWindows    = "7"
45+
for i=1, 16, 1 do
46-
keyDoors      = "8"
46+
    sumItems = sumItems + turtle.getItemCount(i)
47-
keyPressPlate = "9"
47+
end        
48-
keyCraftTable = "10"
48+
49-
keyChests     = "11"
49+
if sumItems < width*length then
50-
keyTorches    = "12"
50+
    print("Not enough Resources")
51-
keyFurnaces   = "13"
51+
else
52-
keyRoof1      = "14"
52+
    print("======== 2013 (c) psychedelixx ========")
53-
keyRoof2      = "15"
53+
    print("=========== Platform Builder ==========")
54-
keyGable      = "16"
54+
55
    turtle.up()
56-
countList[keyFloorIn]    = 40
56+
57-
countList[keyFloorOut]   = 6
57+
    slot = 1
58-
countList[keyStairsOut]  = 9
58+
59-
countList[keySocket]     = 26
59+
    for w=1, width, 1 do
60-
countList[keyWalls1]     = 63
60+
	for l=1, length, 1 do
61-
countList[keyWalls2]     = 46
61+
	    if turtle.getItemCount(slot) == 0 and slot < 16 then
62-
countList[keyWindows]    = 15
62+
	        slot = slot + 1
63-
countList[keyDoors]      = 1
63+
	    end
64-
countList[keyPressPlate] = 1
64+
            turtle.select(slot)
65-
countList[keyCraftTable] = 1
65+
66-
countList[keyChests]     = 2
66+
            turtle.digDown()
67-
countList[keyTorches]    = 4
67+
            turtle.placeDown()
68-
countList[keyFurnaces]   = 5
68+
	    if l < length then
69-
countList[keyRoof1]      = 64
69+
                turtle.dig()
70-
countList[keyRoof2]      = 48
70+
	        turtle.forward()
71-
countList[keyGable]      = 10
71+
	    end
72
	end
73
74-
for key, value in pairs(countList) do
74+
	if w < width then
75-
    print (key, " = " , value)
75+
            if dirCounter%2 == 1 then
76
    	        turtle.turnRight()
77-
]]--
77+
	        turtle.forward()
78
	        turtle.turnRight()
79
	    else
80
	        turtle.turnLeft()
81-
if #args < 1 then
81+
	        turtle.forward()
82-
        print("")
82+
	        turtle.turnLeft()
83
	    end
84-
--[[arg1 = tonumber(args[1])]]--
84+
85
            if dirCounter%2 == 1 then
86-
--[[ --- Item Check --- ]]--
86+
    	        turtle.turnRight()
87-
function enoughResources()
87+
	        turtle.turnRight()
88-
    for key, value in pairs(countList) do
88+
		for l=1, length-1, 1 do
89-
        if turtle.getItemCount(tonumber(key)) < value then
89+
	            turtle.forward()
90-
            return false
90+
91-
        end
91+
	    end
92-
    end
92+
	    turtle.turnRight()
93-
    return true
93+
94-
end  
94+
	    for w=1, width-1, 1 do
95
	        turtle.forward()
96-
function calcFuel(blueprint)
96+
97-
    return #blueprint*#blueprint[1]*#blueprint[1][1]
97+
	end
98
	dirCounter = dirCounter + 1
99
    end     
100-
function turn()
100+
end