@Aloeb83/

Rocket League Crate Calculator

Python

A calculator that determines the odds of getting certain items from Rocket League crates. Includes odds for painted and certified items.

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import math

r = [.55, .28, .12, .04, .01]
p = [.25, 1]
s = [.08, .15, .23, .31, .38, .46, .54, .62, .69, .77, .85, .92, 1]
c = [.25, 1]
t = [.07, .2, .2, .27, .27, 1]

rarity = {
  "Rare": r[0],
  "Very Rare": r[1],
  "Import": r[2],
  "Exotic": r[3],
  "Black Market": r[4],
}
  
rareness = input("Choose rarity: ")
rare = rarity[rareness]

is_it = {
  "Y": p[0],
  "N": p[1],
}
painted = input("Is this item painted? Y/N? ")
paint = is_it[painted]

color = {
  "1": s[0],
  "2": s[1],
  "3": s[2],
  "4": s[3],
  "5": s[4],
  "6": s[5],
  "7": s[6],
  "8": s[7],
  "9": s[8],
  "10": s[9],
  "11": s[10],
  "12": s[11],
  "13": s[12],
}

if paint == p[0]:
  specifics = input("Are you looking for any specific colors? How many? (Max:13) ")
  specific = color[specifics]
else: 
  specific = 1

certification = {
  "Y": c[0],
  "N": c[1],
}

item = input("Is the item certified? Y/N? ")
certified = certification[item]

skills = {
  "1": t[0],
  "2": t[1],
  "3": t[2],
  "4": t[3],
  "5": t[4],
  "Any": t[5],
}

if certified == c[0]:
  tiers = input("What type of certification? (For Tiers 1-5 enter that number, if any tier write Any) ")
  tier = skills[tiers]
else:
  tier = 1

quantity = int(input("How many items of matching rarity are in your crate? "))
final = (rare * paint * specific * certified * tier)/quantity

print("There is a " + str(round(final*100, 2)) + "% chance that you will get your desired item. On average, it'll take " + str(math.ceil(1/final)) + " keys to get the item you are looking for.")