Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- close = "no"
- while (close == "no"):
- amount = int(input("How many Items? : "))
- stacks = [0,0]
- stacksize = ""
- stacksize = input("What is the Stack Size of the Item? (Leave empty for default 64) : ")
- if (str(stacksize) == ""):
- stacksize = 64
- stacksize = int(stacksize)
- rawstacks = amount / stacksize
- stacks[0] = math.floor(rawstacks)
- stacks[1] = math.fmod(amount,stacksize)
- print("Your amount of " + str(amount) + " equals to " + str(stacks[0]) + " Stacks and " + str(stacks[1]) + " Items!")
- if (stacks[0] > 27):
- chests = [0,0]
- rawchests = stacks[0] / 27
- chests[0] = math.floor(rawchests)
- chests[1] = math.fmod(stacks[0],27)
- print("That Equals to " + str(chests[0]) + " Chests, " + str(chests[1]) + " Stacks and " + str(stacks[1]) + " Items!")
- result = [chests[0],chests[1],stacks[1]]
- else :
- result = [stacks[0],stacks[1]]
- print(result)
- close = input("Press Return to close, or press any key before to input another value!")
- if (close == ""):
- close = "yes"
- else:
- close = "no"
Advertisement
RAW Paste Data
Copied
Advertisement