ok help me pls I am crying pls!!!
def mine():
global sapphire, ruby, emerald, topaz, diamond, aquamarine, amethyst, OMEGA_ORE, db,ome
OMEGA_ORE = db['OMEGA_ORE']
clear()
cursor.hide()
print(f'{bright}{purple}Mining...{white}{normal}')
sleep(1.2*float(db['Mining_speed']))
clear()
print('Printing out results...')
if db['Miners'] >=25:
dbug = True
else:
dbug = False
sleep(3)
clear()
printInMiddle('PRINTED FROM PRINTER.EXE.FILES')
print('')
sleep(0.2)
print('Settings: Receipt mode, Fast Mode.')
sleep(0.2)
print('Printer made from France.')
sleep(0.75)
print('----------------------------------------------')
print('FROM: MINING SIMULATOR MINING AGENCY')
sleep(0.1)
print('TO: MINING CO-OPERATION ')
sleep(2)
print('______________________________________________')
sleep(0.2)
print('| MINING_CO-OPERATION')
sleep(0.2)
print('|')
sleep(0.2)
print('| ALL RIGHTS RESERVED')
sleep(0.2)
print('|')
sleep(0.2)
print('| MINING_RESULT_PRINTING')
sleep(0.2)
print('|')
sleep(0.2)
print('| RESULT: ')
print('|')
sleep(1)
sap = sapphire
rub = ruby
eme = emerald
top = topaz
dia = diamond
aqua = aquamarine
ame = amethyst
ome = OMEGA_ORE
for i in range(db['Miners']+2):
if i == db['Miners']+1:
pass
else:
if dbug:
pass
else:
sleep(0.1)
Mining_1 = rand(1,db['Mining_yield'])
ore = random.choice(probability)
random_Chance = rand(1,100)
if random_Chance<=10:
Mining_1 = rand(1,db['Mining_yield'])
ore = random.choice(probability)
if i == 0:
Mining_1 = db["Level"]+Mining_1
print(f'|{bright} You Mined An Extra {blue}{Mining_1+db["Level"]}{white} {purple}{ore}{white}')
if ore == 'Sapphire':
sapphire+=Mining_1+db['Level']
elif ore == 'Ruby':
ruby+=Mining_1+db['Level']
elif ore == 'emerald':
emerald+=Mining_1+db['Level']
elif ore == 'topaz':
topaz+=Mining_1+db['Level']
elif ore == 'diamond':
diamond+=Mining_1+db['Level']
elif ore == 'aquamarine':
aquamarine+=Mining_1+db['Level']
elif ore == 'amethyst':
amethyst+=Mining_1+db['Level']
elif ore == 'OMEGA_ORE':
OMEGA_ORE+=Mining_1+db['Level']
else:
print(f'|{bright} Your Miners Mined An Extra {blue}{Mining_1}{white} {purple}{ore}{white}')
if ore == 'Sapphire':
sapphire+=Mining_1
elif ore == 'Ruby':
ruby+=Mining_1
elif ore == 'emerald':
emerald+=Mining_1
elif ore == 'topaz':
topaz+=Mining_1
elif ore == 'diamond':
diamond+=Mining_1
elif ore == 'aquamarine':
aquamarine+=Mining_1
elif ore == 'amethyst':
amethyst+=Mining_1
elif ore == 'OMEGA_ORE':
OMEGA_ORE+=Mining_1
ore = random.choice(probability)
random_Chance = rand(1,100)
if i == 0:
print(f'|{bright} You Mined {blue}{Mining_1+db["Level"]}{white} {purple}{ore}{white}')
if ore == 'Sapphire':
sapphire+=Mining_1+db["Level"]
elif ore == 'Ruby':
ruby+=Mining_1+db["Level"]
elif ore == 'emerald':
emerald+=Mining_1+db["Level"]
elif ore == 'topaz':
topaz+=Mining_1+db["Level"]
elif ore == 'diamond':
diamond+=Mining_1+db["Level"]
elif ore == 'aquamarine':
aquamarine+=Mining_1+db["Level"]
elif ore == 'amethyst':
amethyst+=Mining_1+db["Level"]
elif ore == 'OMEGA_ORE':
OMEGA_ORE+=Mining_1+db['Level']
if i == 0:
pass
else:
print(f'|{bright} Your Miners Mined {blue}{Mining_1}{white} {purple}{ore}{white}')
if ore == 'Sapphire':
sapphire+=Mining_1
elif ore == 'Ruby':
ruby+=Mining_1
elif ore == 'emerald':
emerald+=Mining_1
elif ore == 'topaz':
topaz+=Mining_1
elif ore == 'diamond':
diamond+=Mining_1
elif ore == 'aquamarine':
aquamarine+=Mining_1
elif ore == 'amethyst':
amethyst+=Mining_1
elif ore == 'OMEGA_ORE':
OMEGA_ORE+=Mining_1
# db['sell_Sapphire'] = 2.4
#db['sell_Ruby'] = 3.6
#db['sell_emerald'] = 4.4
#db['sell_diamond'] = 6.1
#db['sell_topaz'] = 7
#db['sell_aquamarine'] = 9.2
print('|');sleep(0.2)
print('|');sleep(0.2)
print('|');sleep(0.2)
print('|');sleep(0.2)
print('|');sleep(0.2)
#sap = sapphire
#rub = ruby
#eme = emerald
#top = topaz
#dia = diamond
#aqua = aquamarine
#ame = amethyst
sleep(2)
print('| Grand Total Mined:')
sleep(0.3)
print('|')
sleep(0.3)
print(f'| Sapphire: {sapphire-sap}')
sleep(0.3)
print(f'| Ruby: {ruby-rub}')
sleep(0.3)
print(f'| Emerald: {emerald-eme}')
sleep(0.3)
print(f'| Topaz: {topaz-top}')
sleep(0.3)
print(f'| Topaz: {diamond-dia}')
sleep(0.3)
print(f'| Aquamarine: {aquamarine-aqua}')
sleep(0.3)
print(f'| Amethyst: {amethyst-ame}')
sleep(0.3)
print(f'| OMEGA_ORE: {OMEGA_ORE-ome}')
sleep(0.3)
print('|');sleep(0.2)
print('|');sleep(0.2)
print('|');sleep(0.2)
print('______________________________________________')
sleep(1)
print('REMARKS: Thank you for playing Mining Simulator! Enjoy the rewards!')
print('\n')
cursor.show()
save()
enter_to_continue()
clear()
redo this code!!!
USE COLLECTION MODULE!!!
USE RANDOM MODULE
probability is defined
from probabilities import probability
pass
probability = [
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Sapphire',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'Ruby',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'emerald',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'diamond',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'topaz',
'aquamarine',
'aquamarine',
'aquamarine',
'aquamarine',
'aquamarine',
'aquamarine',
'aquamarine',
'aquamarine',
'aquamarine',
'aquamarine',
'aquamarine',
'aquamarine',
'aquamarine',
'aquamarine',
'aquamarine',
'amethyst',
'amethyst',
'amethyst',
'OMEGA_ORE',
]
use collections and random module to get this sample output
btw check if the db has more than 350 miners
if so, then get this output:
------------------------------
your miners mined x ore ( x and ore will be changed! )
this goes on for 100 times, then for the rest of the miners:
the rest of your x ( x will be changed ) miners mined \n
whatever ore
whatever ore and so on.