Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- TurtlePark deployer script
- do
- local slots =
- {
- ["wood"] = 1, ["stone"] = 2, ["redstone"] = 3, ["ironingot"] = 4,
- ["diamond"] = 5, ["glasspane"] = 6, ["chest1"] = 7, ["chest2"] = 8,
- ["fuel"] = 9, ["planks"] = 15, ["sticks"] = 16
- }
- local chestsNames =
- {
- "wood", "stone", "redstone",
- "ironingot", "diamond", "glasspane",
- "sticks", "planks", "fuel"
- }
- local chestsLocations =
- {
- ["wood"] = { 0, 0, 0 },
- ["stone"] = { 1, 0, 0 },
- ["redstone"] = { 2, 0, 0 },
- ["ironingot"] = { 0, 0, 1 },
- ["diamond"] = { 1, 0, 1 },
- ["glasspane"] = { 2, 0, 1 },
- ["sticks"] = { 0, 0, 2 },
- ["planks"] = { 1, 0, 2 } ,
- ["fuel"] = { 2, 0, 2 }
- }
- local recipes =
- {
- ["diskdrive"] =
- {
- required = 2,
- map =
- {
- [1] = "stone", [2] = "stone", [3] = "stone",
- [5] = "stone", [6] = "redstone", [7] = "stone",
- [9] = "stone", [10] = "redstone", [11] = "stone"
- }
- }
- }
- function waitForKeyPress()
- while true do
- print("Press E to do something.")
- local event, key = os.pullEvent("char") -- limit os.pullEvent to the 'key' event
- if key == keys.e then -- if the key pressed was 'e'
- print("You pressed E. Exiting program...")
- break
- end
- end
- end
- -- Craft an "item" from "recipes" table
- -- and put it to "outputSlot"
- function craftItem(item, outputSlot)
- for i = 1, 3 do
- for j = 1, 3 do
- --turtle.select(i + (j - 1) * j - 1)
- --recipes[item].map[i][j]
- end
- end
- end
- -- Deploy chest from 7-8 slots in
- -- 3x3 area
- function deployChests()
- while turtle.getFuelLevel() < 100 do
- turtle.select(9)
- turtle.refuel(1)
- end
- i = 1
- for l = 1, #chestsNames do
- location = chestsLocations[chestsNames[l]]
- moving.safeMove(location[1], location[2], location[3])
- turtle.select(7 + (i % 2))
- turtle.placeDown()
- turtle.select(slots[chestsNames[l]])
- turtle.dropDown()
- i = i + 1
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement