Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[===================
- Made by: Nemo Eriksson
- Pastebin: y0REd03h
- ====================]]--
- -- Returns the coal needed to dig the specified area
- function calcCoalNeeded(xSize, ySize, zSize)
- local totalVolume = xSize * ySize * zSize
- local coalNeeded = math.ceil(totalVolume/80)
- return coalNeeded
- end
- -- Get user input and print how much coal needed
- local args = {...}
- print(calcCoalNeeded(args[1], args[2], args[3])) -- X Y Z
Advertisement
Add Comment
Please, Sign In to add comment