summaryrefslogblamecommitdiff
path: root/jexptable.py
blob: d3f80f359343a9f7db969a782d767bebe3e09ed4 (plain) (tree)
1
2
3
4
5




                                                    

























                                                                  
#!/usr/bin/python
# This script file is meant to create EXP table
# It have some randomness (see the import)
# It starts at level 51 (and i is the according xp)
# It stops at level 999, or when MAX_INT is reached.
import random
i=386371
l=51
o=open("expgroup.db", "w")

mx=20000
b=False

while (l < mx):
    l+=1
    value=l/random.randint(1,5)
    #value=l+random.randint(1,5)
    bonus=random.randint(-2,12)
    fact=1+(1.0/value)
    i=int(i*fact)+bonus

    if (i >= pow(2,31)):
        if not b:
            print("Interruption at level %d: max int reached" % l)
            b=True
        i=pow(2,31)-1000+l
    o.write('%d,' % i)
    if l % 10 == 0:
        o.write('\n')

o.close()