Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Visota (0>): ")
- cona = tonumber(read())
- a = cona
- print("Dlina(vperod)(1>): ")
- back = tonumber(read())
- dlina = back
- print("Shirina (1>): ")
- shirina = tonumber(read())
- width = shirina
- print("Up/Down mod (u/d)")
- conUD= read()
- UD= conUD
- print("Left or Right? (l/r) or 'stop'")
- ConTurn = read()
- Turn = ConTurn
- print("gravel/sand control mod (y/n)")
- GControl = read()
- Control = GControl
- print("-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/")
- while width > 0 do
- if Turn == "stop" then
- break
- else
- while dlina > 0 do
- turtle.dig()
- if Control == "y" then
- sleep(0.4)
- while turtle.detect() do
- turtle.dig()
- end
- end
- turtle.forward()
- while a > 0 do
- if UD == "d" then
- turtle.digDown()
- turtle.down()
- a = a - 1
- else
- turtle.digUp()
- if Control == "y" then
- sleep(0.4)
- while turtle.detectUp() do
- turtle.digUp()
- end
- end
- turtle.up()
- a = a - 1
- end
- end
- a = cona
- while a > 0 do
- if UD == "d" then
- turtle.up()
- a = a - 1
- else
- turtle.down()
- a = a - 1
- end
- end
- a = cona
- dlina = dlina - 1
- end
- dlina = back
- while dlina > 0 do
- turtle.back()
- dlina = dlina - 1
- end
- dlina = back
- if Turn == "l" then
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- else
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- end
- end
- width = width - 1
- end
- width = shirina
- if Turn == "stop" then
- print("Work is suspended by the user.")
- elseif Turn == "l" then
- turtle.turnLeft()
- while width > 0 do
- turtle.back()
- width = width - 1
- end
- turtle.turnRight()
- else
- turtle.turnRight()
- while width > 0 do
- turtle.back()
- width = width - 1
- end
- turtle.turnLeft()
- end
- width = shirina
- if Turn == "stop" then
- print("-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/")
- else
- if cona == 0 and back ~= 0 and shirina ~= 0 then
- colvo = back * shirina
- elseif cona ~= 0 and back == 0 and shirina ~= 0 then
- colvo = cona * shirina
- elseif cona ~= 0 and back ~= 0 and shirina == 0 then
- colvo = cona * back
- elseif cona ~= 0 and back == 0 and shirina == 0 then
- colvo = cona
- elseif cona == 0 and back ~= 0 and shirina == 0 then
- colvo = back
- elseif cona == 0 and back == 0 and shirina ~= 0 then
- colvo = shirina
- else
- colvo = (cona + 1) * back * shirina
- end
- slots = 9
- collected = 0
- while slots > 0 do
- collected = collected + turtle.getItemCount(slots)
- slots = slots -1
- end
- filled = (collected/576) * 100
- KPD = (collected/colvo) *100
- print("distance: ", back)
- print("Total blocks checked: ", colvo)
- print("Total blocks collected: ",collected)
- print("Slots filled with: ", filled,"%")
- print("KPD: ", KPD,"%")
- slots = 9
- collected = 0
- end
Add Comment
Please, Sign In to add comment