Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------------------------------------------
- -- Fortress Wall Builder - Jacob Nelson --
- ------------------------------------------------------
- ---------------------------------------------------------------------
- ---------------------------------------------------------------------
- ---------------------------------------------------------------------
- ---------------- BEFORE RUNNING CODE LOOK AT THIS!!! ----------------
- ---------------------------------------------------------------------
- ---------------------------------------------------------------------
- ---------------------------------------------------------------------
- -- The program creates a fortress with desired width/depth;
- -- It does this by creating 2 different segments and combining them: https://i.imgur.com/naeR7cD.png
- -- Please use a chunk loader if you wish to run while you aren't at the site.
- -- Does not work in-between server restarts
- -- Steps for Setup --
- -- 1. Place material chests like this: http://i.imgur.com/g9cER97.png
- -- 2. Place turtle in front of the fuel chest facing forward
- local CurrentPosX = 0
- local CurrentPosY = 0
- local CurrentPosZ = 0
- local CurrentRotation = 0
- local MoveReturnXFirst = false
- local CurrentSubWidth = 1
- local CurrentSubLength = 1
- local TotalWidth = 10
- local TotalLength = 10
- function PrintErrorMessage()
- print("Something Bad Happened")
- print("CurrentPosX:")
- print(CurrentPosX)
- print("CurrentPosY:")
- print(CurrentPosY)
- print("CurrentPosZ:")
- print(CurrentPosZ)
- print("CurrentRotation:")
- print(CurrentRotation)
- print("Fuel Level:")
- print(turtle.getFuelLevel())
- turtle.select(16)
- turtle.refuel(64)
- end
- function MoveForwardPlus()
- -- Move Turtle Forward
- if turtle.forward() == false then
- turtle.select(12)
- if turtle.dig() == false then
- MoveForwardPlus()
- PrintErrorMessage()
- else
- turtle.forward()
- -- Update Current Position
- if (CurrentRotation % 360) == 0 then
- CurrentPosY = CurrentPosY + 1
- elseif (CurrentRotation % 360) == 90 then
- CurrentPosX = CurrentPosX + 1
- elseif (CurrentRotation % 360) == 180 then
- CurrentPosY = CurrentPosY - 1
- elseif (CurrentRotation % 360) == 270 then
- CurrentPosX = CurrentPosX - 1
- end
- end
- else
- -- Update Current Position
- if (CurrentRotation % 360) == 0 then
- CurrentPosY = CurrentPosY + 1
- elseif (CurrentRotation % 360) == 90 then
- CurrentPosX = CurrentPosX + 1
- elseif (CurrentRotation % 360) == 180 then
- CurrentPosY = CurrentPosY - 1
- elseif (CurrentRotation % 360) == 270 then
- CurrentPosX = CurrentPosX - 1
- end
- end
- end
- function MoveUpPlus()
- -- Move Turtle Up
- if turtle.up() == false then
- turtle.select(12)
- if turtle.digUp() == false then
- MoveUpPlus()
- PrintErrorMessage()
- else
- turtle.up()
- -- Update Current Position
- CurrentPosZ = CurrentPosZ + 1
- end
- else
- -- Update Current Position
- CurrentPosZ = CurrentPosZ + 1
- end
- end
- function MoveDownPlus()
- -- Move Turtle Down
- if turtle.down() == false then
- turtle.select(12)
- if turtle.digDown() == false then
- MoveDownPlus()
- PrintErrorMessage()
- else
- turtle.down()
- -- Update Current Position
- CurrentPosZ = CurrentPosZ - 1
- end
- else
- -- Update Current Position
- CurrentPosZ = CurrentPosZ - 1
- end
- end
- function TurnRightPlus()
- -- Turn Turtle Right
- if turtle.turnRight() == false then
- TurnRightPlus()
- PrintErrorMessage()
- end
- -- Update Current Rotation
- CurrentRotation = CurrentRotation + 90
- end
- function TurnLeftPlus()
- -- Turn Turtle Left
- if turtle.turnLeft() == false then
- TurnLeftPlus()
- PrintErrorMessage()
- end
- -- Update Current Rotation
- CurrentRotation = CurrentRotation - 90
- end
- function DigBack()
- -- Turn the turtle backwards
- TurnRightPlus()
- TurnRightPlus()
- turtle.select(12)
- if turtle.dig() == false then
- PrintErrorMessage()
- TurnLeftPlus()
- TurnLeftPlus()
- MoveBackPlus()
- else
- TurnLeftPlus()
- TurnLeftPlus()
- turtle.back()
- end
- end
- function MoveBackPlus()
- -- Move Turtle Back
- if turtle.back() == false then
- DigBack()
- end
- -- Update Current Position
- if (CurrentRotation % 360) == 0 then
- CurrentPosY = CurrentPosY - 1
- elseif (CurrentRotation % 360) == 90 then
- CurrentPosX = CurrentPosX - 1
- elseif (CurrentRotation % 360) == 180 then
- CurrentPosY = CurrentPosY + 1
- elseif (CurrentRotation % 360) == 270 then
- CurrentPosX = CurrentPosX + 1
- end
- end
- function SetCurrentRotation(Degrees)
- while (CurrentRotation % 360) ~= (Degrees % 360) do
- TurnRightPlus()
- end
- end
- function MoveToLocation(x, y, z)
- if (CurrentPosX - x ~= 0 or CurrentPosY - y ~= 0 or CurrentPosZ - z ~= 0) then
- local DistanceX = math.abs(CurrentPosX - x)
- local DistanceY = math.abs(CurrentPosY - y)
- -- Move up 8 extra blocks
- for i = 1, 8 do
- MoveUpPlus()
- end
- if DistanceX < DistanceY then
- MoveReturnXFirst = true;
- if (CurrentPosX - x) > 0 then
- SetCurrentRotation(270)
- elseif (CurrentPosX - x) < 0 then
- SetCurrentRotation(90)
- end
- while CurrentPosX ~= x do
- MoveForwardPlus()
- end
- if (CurrentPosY - y) > 0 then
- SetCurrentRotation(180)
- elseif (CurrentPosY - y) < 0 then
- SetCurrentRotation(0)
- end
- while CurrentPosY ~= y do
- MoveForwardPlus()
- end
- else
- MoveReturnXFirst = false;
- if (CurrentPosY - y) > 0 then
- SetCurrentRotation(180)
- elseif (CurrentPosY - y) < 0 then
- SetCurrentRotation(0)
- end
- while CurrentPosY ~= y do
- MoveForwardPlus()
- end
- if (CurrentPosX - x) > 0 then
- SetCurrentRotation(270)
- elseif (CurrentPosX - x) < 0 then
- SetCurrentRotation(90)
- end
- while CurrentPosX ~= x do
- MoveForwardPlus()
- end
- end
- -- Move down the 8 extra blocks
- for i = 1, 8 do
- MoveDownPlus()
- end
- if (CurrentPosZ - z) > 0 then
- while CurrentPosZ ~= z do
- MoveDownPlus()
- end
- elseif (CurrentPosZ - z) < 0 then
- while CurrentPosZ ~= z do
- MoveUpPlus()
- end
- end
- end
- end
- function MoveBackToLocation(x, y, z, Rotation)
- if (CurrentPosX - x ~= 0 or CurrentPosY - y ~= 0 or CurrentPosZ - z ~= 0) then
- if (CurrentPosZ - z) > 0 then
- while CurrentPosZ ~= z do
- MoveDownPlus()
- end
- elseif (CurrentPosZ - z) < 0 then
- while CurrentPosZ ~= z do
- MoveUpPlus()
- end
- end
- -- Move up 8 extra blocks
- for i = 1, 8 do
- MoveUpPlus()
- end
- if MoveReturnXFirst then
- if (CurrentPosX - x) > 0 then
- SetCurrentRotation(270)
- elseif (CurrentPosX - x) < 0 then
- SetCurrentRotation(90)
- end
- while CurrentPosX ~= x do
- MoveForwardPlus()
- end
- if (CurrentPosY - y) > 0 then
- SetCurrentRotation(180)
- elseif (CurrentPosY - y) < 0 then
- SetCurrentRotation(0)
- end
- while CurrentPosY ~= y do
- MoveForwardPlus()
- end
- else
- if (CurrentPosY - y) > 0 then
- SetCurrentRotation(180)
- elseif (CurrentPosY - y) < 0 then
- SetCurrentRotation(0)
- end
- while CurrentPosY ~= y do
- MoveForwardPlus()
- end
- if (CurrentPosX - x) > 0 then
- SetCurrentRotation(270)
- elseif (CurrentPosX - x) < 0 then
- SetCurrentRotation(90)
- end
- while CurrentPosX ~= x do
- MoveForwardPlus()
- end
- end
- -- Move down the 8 extra blocks
- for i = 1, 8 do
- MoveDownPlus()
- end
- end
- -- Set back to old rotation
- SetCurrentRotation(Rotation)
- end
- function CheckForRefuel()
- if turtle.getFuelLevel() <= (math.abs(CurrentPosY) + math.abs(CurrentPosX) + math.abs(CurrentPosZ) + 32) then
- OldPosX = CurrentPosX
- OldPosY = CurrentPosY
- OldPosZ = CurrentPosZ
- OldRotation = CurrentRotation
- -- Move back to fuel station
- MoveToLocation(0,0,0)
- turtle.select(16)
- SetCurrentRotation(180)
- -- wait for fuel
- while (turtle.getFuelLevel() <= math.abs(OldPosX) + math.abs(OldPosY) + math.abs(OldPosZ) + 240) do
- -- Refuel
- turtle.suck()
- turtle.refuel(64)
- end
- -- Go back to previous position
- MoveBackToLocation(OldPosX,OldPosY,OldPosZ,OldRotation)
- end
- end
- function CheckForEmptyFloorBlock()
- if turtle.getItemCount(1) == 0 then
- -- Move items in slot 2 to 1
- turtle.select(2)
- turtle.transferTo(1)
- if turtle.getItemCount(1) == 0 then
- OldPosX = CurrentPosX
- OldPosY = CurrentPosY
- OldPosZ = CurrentPosZ
- OldRotation = CurrentRotation
- -- Move back to fuel station
- MoveToLocation(1,0,0)
- SetCurrentRotation(180)
- turtle.select(1)
- turtle.suck()
- turtle.select(2)
- turtle.suck()
- turtle.select(1)
- -- wait for fuel
- while (turtle.getItemCount(1) == 0) do
- -- Refuel
- turtle.suck()
- end
- -- Go back to previous position
- MoveBackToLocation(OldPosX,OldPosY,OldPosZ,OldRotation)
- end
- end
- end
- function CheckForEmptyWallBlock()
- if turtle.getItemCount(3) == 0 then
- -- Move items in slot 4 to 3
- turtle.select(4)
- turtle.transferTo(3)
- if turtle.getItemCount(3) == 0 then
- OldPosX = CurrentPosX
- OldPosY = CurrentPosY
- OldPosZ = CurrentPosZ
- OldRotation = CurrentRotation
- -- Move back to fuel station
- MoveToLocation(2,0,0)
- SetCurrentRotation(180)
- turtle.select(3)
- turtle.suck()
- turtle.select(4)
- turtle.suck()
- turtle.select(3)
- -- wait for fuel
- while (turtle.getItemCount(3) == 0) do
- -- Refuel
- turtle.suck()
- end
- -- Go back to previous position
- MoveBackToLocation(OldPosX,OldPosY,OldPosZ,OldRotation)
- end
- end
- end
- function CheckForEmptyTopBlock()
- if turtle.getItemCount(5) == 0 then
- -- Move items in slot 8 to 7
- turtle.select(6)
- turtle.transferTo(5)
- if turtle.getItemCount(5) == 0 then
- OldPosX = CurrentPosX
- OldPosY = CurrentPosY
- OldPosZ = CurrentPosZ
- OldRotation = CurrentRotation
- -- Move back to fuel station
- MoveToLocation(3,0,0)
- SetCurrentRotation(180)
- turtle.select(5)
- turtle.suck()
- turtle.select(6)
- turtle.suck()
- turtle.select(5)
- -- wait for fuel
- while (turtle.getItemCount(5) == 0) do
- -- Refuel
- turtle.suck()
- end
- -- Go back to previous position
- MoveBackToLocation(OldPosX,OldPosY,OldPosZ,OldRotation)
- end
- end
- end
- function CheckForEmptyTorches()
- if turtle.getItemCount(7) == 0 then
- -- Move items in slot 11 to 10
- turtle.select(8)
- turtle.transferTo(7)
- if turtle.getItemCount(7) == 0 then
- OldPosX = CurrentPosX
- OldPosY = CurrentPosY
- OldPosZ = CurrentPosZ
- OldRotation = CurrentRotation
- -- Move back to fuel station
- MoveToLocation(4,0,0)
- SetCurrentRotation(180)
- turtle.select(7)
- turtle.suck()
- turtle.select(8)
- turtle.suck()
- turtle.select(7)
- -- wait for fuel
- while (turtle.getItemCount(7) == 0) do
- -- Refuel
- turtle.suck()
- end
- -- Go back to previous position
- MoveBackToLocation(OldPosX,OldPosY,OldPosZ,OldRotation)
- end
- end
- end
- function CheckForEmptyGlassPanes()
- if turtle.getItemCount(9) == 0 then
- -- Move items in slot 14 to 13
- turtle.select(10)
- turtle.transferTo(9)
- if turtle.getItemCount(9) == 0 then
- OldPosX = CurrentPosX
- OldPosY = CurrentPosY
- OldPosZ = CurrentPosZ
- OldRotation = CurrentRotation
- -- Move back to fuel station
- MoveToLocation(5,0,0)
- SetCurrentRotation(180)
- turtle.select(9)
- turtle.suck()
- turtle.select(10)
- turtle.suck()
- turtle.select(9)
- -- wait for fuel
- while (turtle.getItemCount(9) == 0) do
- -- Refuel
- turtle.suck()
- end
- -- Go back to previous position
- MoveBackToLocation(OldPosX,OldPosY,OldPosZ,OldRotation)
- end
- end
- end
- function CheckForEmptyJunkPickup()
- if turtle.getItemCount(11) == 64 then
- -- Move items in slot 11 to 12
- turtle.select(12)
- turtle.transferTo(11)
- if turtle.getItemCount(11) == 64 then
- OldPosX = CurrentPosX
- OldPosY = CurrentPosY
- OldPosZ = CurrentPosZ
- OldRotation = CurrentRotation
- -- Move back to fuel station
- MoveToLocation(6,0,0)
- SetCurrentRotation(180)
- turtle.select(11)
- turtle.drop(64)
- turtle.select(12)
- turtle.drop(64)
- turtle.select(11)
- -- Go back to previous position
- MoveBackToLocation(OldPosX,OldPosY,OldPosZ,OldRotation)
- end
- end
- end
- function CheckForEmptyPath()
- if turtle.getItemCount(13) == 0 then
- -- Move items in slot 14 to 13
- turtle.select(14)
- turtle.transferTo(13)
- if turtle.getItemCount(13) == 0 then
- OldPosX = CurrentPosX
- OldPosY = CurrentPosY
- OldPosZ = CurrentPosZ
- OldRotation = CurrentRotation
- -- Move back to fuel station
- MoveToLocation(7,0,0)
- SetCurrentRotation(180)
- turtle.select(13)
- turtle.suck()
- turtle.select(14)
- turtle.suck()
- turtle.select(13)
- -- wait for fuel
- while (turtle.getItemCount(13) == 0) do
- -- Refuel
- turtle.suck()
- end
- -- Go back to previous position
- MoveBackToLocation(OldPosX,OldPosY,OldPosZ,OldRotation)
- end
- end
- end
- function PlaceDownPlus(InventorySlot)
- turtle.select(InventorySlot)
- -- Place Block Down
- if turtle.placeDown() == false then
- turtle.select(11)
- if turtle.digDown() == false then
- PlaceDownPlus(InventorySlot)
- PrintErrorMessage()
- else
- turtle.select(InventorySlot)
- turtle.placeDown()
- end
- end
- end
- function PlaceUpPlus(InventorySlot)
- turtle.select(InventorySlot)
- -- Place Block Up
- if turtle.placeUp() == false then
- turtle.select(11)
- if turtle.digUp() == false then
- PlaceUpPlus(InventorySlot)
- PrintErrorMessage()
- else
- turtle.select(InventorySlot)
- turtle.placeUp()
- end
- end
- end
- function PlacePlus(InventorySlot)
- turtle.select(InventorySlot)
- -- Place Block Forward
- if turtle.place() == false then
- turtle.select(11)
- if turtle.dig() == false then
- PlacePlus(InventorySlot)
- PrintErrorMessage()
- else
- turtle.select(InventorySlot)
- turtle.place()
- end
- end
- end
- function CheckManualInputedFuel()
- turtle.select(16)
- turtle.refuel(64)
- end
- function CheckForEverything()
- CheckManualInputedFuel()
- CheckForRefuel()
- CheckForEmptyFloorBlock()
- CheckForEmptyWallBlock()
- CheckForEmptyTopBlock()
- CheckForEmptyTorches()
- CheckForEmptyGlassPanes()
- CheckForEmptyJunkPickup()
- CheckForEmptyPath()
- end
- function CreateCornerLayer1()
- for i = 1, 5 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(1)
- CheckForEverything()
- TurnRightPlus()
- MoveForwardPlus()
- TurnRightPlus()
- for i = 1, 6 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- CheckForEverything()
- TurnLeftPlus()
- MoveForwardPlus()
- TurnLeftPlus()
- CheckForEverything()
- MoveForwardPlus()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- for i = 1, 4 do
- CheckForEverything()
- PlaceDownPlus(13)
- MoveForwardPlus()
- end
- CheckForEverything()
- TurnRightPlus()
- MoveForwardPlus()
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- for i = 1, 3 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(13)
- MoveForwardPlus()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- CheckForEverything()
- TurnLeftPlus()
- MoveForwardPlus()
- TurnLeftPlus()
- CheckForEverything()
- MoveForwardPlus()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(13)
- MoveForwardPlus()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(1)
- CheckForEverything()
- TurnRightPlus()
- MoveForwardPlus()
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(13)
- MoveForwardPlus()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- end
- function CreateCornerLayer2()
- CheckForEverything()
- MoveUpPlus()
- CheckForEverything()
- MoveBackPlus()
- TurnRightPlus()
- -- Ready for building
- for i = 1, 5 do
- CheckForEverything()
- PlaceDownPlus(3)
- MoveForwardPlus()
- end
- TurnRightPlus()
- for i = 1, 5 do
- CheckForEverything()
- PlaceDownPlus(3)
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- TurnRightPlus()
- for i = 1, 4 do
- CheckForEverything()
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- TurnLeftPlus()
- MoveForwardPlus()
- PlaceDownPlus(3)
- end
- function CreateCornerLayer3()
- CheckForEverything()
- MoveUpPlus()
- PlaceDownPlus(3)
- TurnRightPlus()
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- TurnLeftPlus()
- for i = 1, 4 do
- CheckForEverything()
- MoveForwardPlus()
- end
- CheckForEverything()
- TurnLeftPlus()
- PlaceDownPlus(3)
- for i = 1, 4 do
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- end
- CheckForEverything()
- MoveForwardPlus()
- TurnLeftPlus()
- PlaceDownPlus(3)
- for i = 1, 5 do
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- end
- end
- function CreateCornerLayer4()
- CheckForEverything()
- MoveUpPlus()
- PlaceDownPlus(3)
- TurnRightPlus()
- TurnRightPlus()
- for i = 1, 3 do
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- end
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(7)
- CheckForEverything()
- MoveBackPlus()
- TurnLeftPlus()
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- TurnLeftPlus()
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(7)
- CheckForEverything()
- MoveBackPlus()
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(7)
- CheckForEverything()
- MoveBackPlus()
- TurnRightPlus()
- for i = 1, 2 do
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- end
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(7)
- CheckForEverything()
- MoveBackPlus()
- TurnLeftPlus()
- for i = 1, 3 do
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- end
- TurnRightPlus()
- for i = 1, 4 do
- CheckForEverything()
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveBackPlus()
- PlaceDownPlus(7)
- CheckForEverything()
- MoveForwardPlus()
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- TurnLeftPlus()
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(7)
- end
- function CreateCornerLayer5()
- CheckForEverything()
- MoveUpPlus()
- CheckForEverything()
- MoveBackPlus()
- CheckForEverything()
- MoveBackPlus()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- for i = 1, 3 do
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(5)
- end
- for i = 1, 2 do
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- end
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- TurnRightPlus()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(3)
- MoveForwardPlus()
- end
- for i = 1, 3 do
- CheckForEverything()
- PlaceDownPlus(5)
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- TurnLeftPlus()
- CheckForEverything()
- MoveForwardPlus()
- TurnLeftPlus()
- for i = 1, 5 do
- CheckForEverything()
- PlaceDownPlus(5)
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- TurnRightPlus()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(3)
- MoveForwardPlus()
- end
- for i = 1, 4 do
- CheckForEverything()
- PlaceDownPlus(5)
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(5)
- TurnLeftPlus()
- CheckForEverything()
- MoveForwardPlus()
- TurnLeftPlus()
- for i = 1, 5 do
- CheckForEverything()
- PlaceDownPlus(5)
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- for i = 1, 5 do
- CheckForEverything()
- PlaceDownPlus(3)
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- TurnLeftPlus()
- CheckForEverything()
- MoveForwardPlus()
- TurnLeftPlus()
- for i = 1, 4 do
- CheckForEverything()
- PlaceDownPlus(3)
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- end
- function CreateCornerLayer6()
- CheckForEverything()
- MoveUpPlus()
- TurnLeftPlus()
- for i = 1, 6 do
- CheckForEverything()
- PlaceDownPlus(3)
- MoveForwardPlus()
- end
- PlaceDownPlus(3)
- TurnLeftPlus()
- for i = 1, 6 do
- CheckForEverything()
- MoveForwardPlus()
- end
- PlaceDownPlus(3)
- TurnLeftPlus()
- for i = 1, 6 do
- CheckForEverything()
- MoveForwardPlus()
- end
- PlaceDownPlus(3)
- TurnLeftPlus()
- for i = 1, 5 do
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- end
- CheckForEverything()
- MoveForwardPlus()
- end
- function CreateCornerLayer7()
- CheckForEverything()
- TurnLeftPlus()
- MoveUpPlus()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(9)
- for i = 1, 2 do
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- end
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(7)
- TurnRightPlus()
- TurnRightPlus()
- for i = 1, 4 do
- CheckForEverything()
- MoveForwardPlus()
- end
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(9)
- for i = 1, 2 do
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- end
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(7)
- end
- function CreateCornerLayer8()
- CheckForEverything()
- TurnLeftPlus()
- TurnLeftPlus()
- MoveUpPlus()
- CheckForEverything()
- MoveForwardPlus()
- for i = 1, 3 do
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- end
- TurnLeftPlus()
- for i = 1, 2 do
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- end
- end
- function CreateCornerLayer9()
- CheckForEverything()
- TurnLeftPlus()
- TurnLeftPlus()
- MoveUpPlus()
- for i = 1, 2 do
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- end
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- end
- function CreateCornerLayer10()
- CheckForEverything()
- TurnLeftPlus()
- TurnLeftPlus()
- MoveUpPlus()
- CheckForEverything()
- MoveForwardPlus()
- PlaceDownPlus(3)
- end
- function CreateCornerLayer11()
- CheckForEverything()
- MoveUpPlus()
- PlaceDownPlus(7)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveDownPlus()
- CheckForEverything()
- MoveDownPlus()
- CheckForEverything()
- MoveDownPlus()
- CheckForEverything()
- MoveDownPlus()
- CheckForEverything()
- MoveDownPlus()
- CheckForEverything()
- MoveDownPlus()
- CheckForEverything()
- MoveDownPlus()
- CheckForEverything()
- MoveDownPlus()
- CheckForEverything()
- MoveDownPlus()
- CheckForEverything()
- MoveDownPlus()
- TurnLeftPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- TurnLeftPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- end
- function CreateCorner()
- CreateCornerLayer1()
- CreateCornerLayer2()
- CreateCornerLayer3()
- CreateCornerLayer4()
- CreateCornerLayer5()
- CreateCornerLayer6()
- CreateCornerLayer7()
- CreateCornerLayer8()
- CreateCornerLayer9()
- CreateCornerLayer10()
- CreateCornerLayer11()
- end
- function CreateLongPieceLayer1()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(13)
- MoveForwardPlus()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- CheckForEverything()
- TurnRightPlus()
- MoveForwardPlus()
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(13)
- MoveForwardPlus()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- CheckForEverything()
- TurnLeftPlus()
- MoveForwardPlus()
- TurnLeftPlus()
- CheckForEverything()
- MoveForwardPlus()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(13)
- MoveForwardPlus()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- CheckForEverything()
- TurnRightPlus()
- MoveForwardPlus()
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(13)
- MoveForwardPlus()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- CheckForEverything()
- TurnLeftPlus()
- MoveForwardPlus()
- TurnLeftPlus()
- CheckForEverything()
- MoveForwardPlus()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(13)
- MoveForwardPlus()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- CheckForEverything()
- TurnRightPlus()
- MoveForwardPlus()
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(13)
- MoveForwardPlus()
- for i = 1, 2 do
- CheckForEverything()
- PlaceDownPlus(1)
- MoveForwardPlus()
- end
- end
- function CreateLongPieceLayer2()
- CheckForEverything()
- MoveUpPlus()
- TurnRightPlus()
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- for i = 1, 4 do
- CheckForEverything()
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- TurnLeftPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnLeftPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- for i = 1, 4 do
- CheckForEverything()
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- TurnRightPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnRightPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- for i = 1, 4 do
- CheckForEverything()
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- TurnLeftPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnLeftPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- for i = 1, 4 do
- CheckForEverything()
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- TurnRightPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnRightPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- for i = 1, 4 do
- CheckForEverything()
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- TurnLeftPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnLeftPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- for i = 1, 4 do
- CheckForEverything()
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- end
- function CreateLongPieceLayer3()
- CheckForEverything()
- MoveUpPlus()
- TurnRightPlus()
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- for i = 1, 4 do
- CheckForEverything()
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- TurnRightPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnRightPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- for i = 1, 4 do
- CheckForEverything()
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- TurnLeftPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnLeftPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- for i = 1, 4 do
- CheckForEverything()
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- TurnRightPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnRightPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- for i = 1, 4 do
- CheckForEverything()
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- TurnLeftPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnLeftPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- for i = 1, 4 do
- CheckForEverything()
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- TurnRightPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnRightPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- for i = 1, 4 do
- CheckForEverything()
- MoveForwardPlus()
- end
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- end
- function CreateLongPieceLayer4()
- CheckForEverything()
- MoveUpPlus()
- TurnRightPlus()
- TurnRightPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveBackPlus()
- CheckForEverything()
- PlaceDownPlus(7)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(7)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveBackPlus()
- CheckForEverything()
- PlaceDownPlus(7)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(7)
- TurnLeftPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnLeftPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(9)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(9)
- TurnRightPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnRightPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- TurnLeftPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnLeftPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- TurnRightPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnRightPlus()
- CheckForEverything()
- PlaceDownPlus(9)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(9)
- TurnLeftPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnLeftPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- MoveBackPlus()
- CheckForEverything()
- PlaceDownPlus(7)
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(7)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- MoveBackPlus()
- CheckForEverything()
- PlaceDownPlus(7)
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(7)
- end
- function CreateLongPieceLayer5()
- CheckForEverything()
- MoveUpPlus()
- TurnRightPlus()
- TurnRightPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(5)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(5)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(5)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- TurnRightPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnRightPlus()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(5)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(5)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(5)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- TurnLeftPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnLeftPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(5)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(5)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(5)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- TurnRightPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnRightPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(5)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(5)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(5)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- TurnLeftPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnLeftPlus()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(5)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(5)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(5)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- MoveForwardPlus()
- CheckForEverything()
- TurnRightPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnRightPlus()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(5)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(5)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(5)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- end
- function CreateLongPieceLayer6()
- CheckForEverything()
- MoveUpPlus()
- TurnRightPlus()
- TurnRightPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- TurnLeftPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnLeftPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- TurnRightPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnRightPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- TurnLeftPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnLeftPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- TurnRightPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnRightPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- TurnLeftPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnLeftPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- end
- function CreateLongPieceLayer7()
- CheckForEverything()
- MoveUpPlus()
- TurnRightPlus()
- TurnRightPlus()
- CheckForEverything()
- PlaceDownPlus(7)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(7)
- TurnRightPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnRightPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- TurnLeftPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnLeftPlus()
- CheckForEverything()
- PlaceDownPlus(7)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(7)
- TurnRightPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnRightPlus()
- CheckForEverything()
- PlaceDownPlus(7)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(7)
- TurnLeftPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnLeftPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(3)
- TurnRightPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnRightPlus()
- CheckForEverything()
- PlaceDownPlus(7)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- PlaceDownPlus(7)
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveDownPlus()
- CheckForEverything()
- MoveDownPlus()
- CheckForEverything()
- MoveDownPlus()
- CheckForEverything()
- MoveDownPlus()
- CheckForEverything()
- MoveDownPlus()
- CheckForEverything()
- MoveDownPlus()
- TurnLeftPlus()
- MoveForwardPlus()
- CheckForEverything()
- TurnLeftPlus()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- end
- function CreateLongPiece()
- CreateLongPieceLayer1()
- CreateLongPieceLayer2()
- CreateLongPieceLayer3()
- CreateLongPieceLayer4()
- CreateLongPieceLayer5()
- CreateLongPieceLayer6()
- CreateLongPieceLayer7()
- end
- function MoveIntoCornerPosition()
- TurnRightPlus()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- TurnLeftPlus()
- TurnLeftPlus()
- end
- print("\nMake sure this turtle is placed in the bottom-left corner of the wall!\n")
- sleep(2)
- print("Ready to create some Walls?!?\n")
- sleep(1)
- print("The turtle will start two blocks out from here.\n")
- sleep(1)
- print("How many Sub-Sections Right is this wall? (6 blocks per sub-section)")
- Width = io.read()
- print("How many Sub-Sections Forward is this wall? (6 blocks per sub-section)")
- Length = io.read()
- TotalWidth = tonumber(Width)
- TotalLength = tonumber(Length)
- if TotalWidth < 2 then
- print("Not enough sub-sections Right.")
- elseif TotalLength < 2 then
- print("Not enough sub-sections Forward.")
- else
- -- Run program
- CheckForEverything()
- MoveForwardPlus()
- CheckForEverything()
- MoveForwardPlus()
- CurrentSubWidth = 0;
- CreateCorner()
- CurrentSubWidth = CurrentSubWidth + 1
- while (CurrentSubWidth ~= TotalWidth - 1) do
- CreateLongPiece()
- CurrentSubWidth = CurrentSubWidth + 1
- end
- MoveIntoCornerPosition()
- CurrentSubLength = 0;
- CreateCorner()
- CurrentSubLength = CurrentSubLength + 1
- while (CurrentSubLength ~= TotalLength - 1) do
- CreateLongPiece()
- CurrentSubLength = CurrentSubLength + 1
- end
- MoveIntoCornerPosition()
- CurrentSubWidth = 0;
- CreateCorner()
- CurrentSubWidth = CurrentSubWidth + 1
- while (CurrentSubWidth ~= TotalWidth - 1) do
- CreateLongPiece()
- CurrentSubWidth = CurrentSubWidth + 1
- end
- MoveIntoCornerPosition()
- CurrentSubLength = 0;
- CreateCorner()
- CurrentSubLength = CurrentSubLength + 1
- while (CurrentSubLength ~= TotalLength - 1) do
- CreateLongPiece()
- CurrentSubLength = CurrentSubLength + 1
- end
- MoveBackPlus()
- CheckForEverything()
- PlacePlus(3)
- print("Program Finished: Enjoy your new wall!")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement