@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

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.527460136374909","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"aW1wb3J0IG1hdGgKCnIgPSBbLjU1LCAuMjgsIC4xMiwgLjA0LCAuMDFdCnAgPSBbLjI1LCAxXQpzID0gWy4wOCwgLjE1LCAuMjMsIC4zMSwgLjM4LCAuNDYsIC41NCwgLjYyLCAuNjksIC43NywgLjg1LCAuOTIsIDFdCmMgPSBbLjI1LCAxXQp0ID0gWy4wNywgLjIsIC4yLCAuMjcsIC4yNywgMV0KCnJhcml0eSA9IHsKICAiUmFyZSI6IHJbMF0sCiAgIlZlcnkgUmFyZSI6IHJbMV0sCiAgIkltcG9ydCI6IHJbMl0sCiAgIkV4b3RpYyI6IHJbM10sCiAgIkJsYWNrIE1hcmtldCI6IHJbNF0sCn0KICAKcmFyZW5lc3MgPSBpbnB1dCgiQ2hvb3NlIHJhcml0eTogIikKcmFyZSA9IHJhcml0eVtyYXJlbmVzc10KCmlzX2l0ID0gewogICJZIjogcFswXSwKICAiTiI6IHBbMV0sCn0KcGFpbnRlZCA9IGlucHV0KCJJcyB0aGlzIGl0ZW0gcGFpbnRlZD8gWS9OPyAiKQpwYWludCA9IGlzX2l0W3BhaW50ZWRdCgpjb2xvciA9IHsKICAiMSI6IHNbMF0sCiAgIjIiOiBzWzFdLAogICIzIjogc1syXSwKICAiNCI6IHNbM10sCiAgIjUiOiBzWzRdLAogICI2Ijogc1s1XSwKICAiNyI6IHNbNl0sCiAgIjgiOiBzWzddLAogICI5Ijogc1s4XSwKICAiMTAiOiBzWzldLAogICIxMSI6IHNbMTBdLAogICIxMiI6IHNbMTFdLAogICIxMyI6IHNbMTJdLAp9CgppZiBwYWludCA9PSBwWzBdOgogIHNwZWNpZmljcyA9IGlucHV0KCJBcmUgeW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Bsb29raW5nIGZvci4iKQ=="},"asBuffer":null},"loaded":true}}
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.")