work in progress regarding rank_up

This commit is contained in:
Pawel Orzech 2019-08-08 11:23:23 +01:00
parent f2a2406caf
commit 1ee6e7f111
3 changed files with 13 additions and 8 deletions

3
.gitignore vendored
View file

@ -13,4 +13,5 @@ __pycache__
commands.spec commands.spec
physqlsimplecipher physqlsimplecipher
.vscode .vscode
.gitattributes .gitattributes
*.json

Binary file not shown.

View file

@ -2015,17 +2015,21 @@ def rank_up():
else: else:
url = 'http://ishin-production.aktsk.jp/user' url = 'http://ishin-production.aktsk.jp/user'
r = requests.get(url, headers=headers) r = requests.get(url, headers=headers)
current_rank = r.json()['user']['rank'] current_rank = int(r.json()['user']['rank'])
print('Your current rank is: ' +str(current_rank)) print('Your current rank is: ' +str(current_rank))
goal_rank = int(input('What rank would you like to achieve? \n')) goal_rank = (input('What rank would you like to achieve? \n'))
print('Ok, farming till rank: ' +(goal_rank)) print('Ok, farming till rank: ' +(goal_rank))
levels_to_farm = (goal_rank) - (current_rank) # just for bugtracking
# with open('personal.json', 'w') as json_file:
# json.dump(r.json(), json_file)
levels_to_farm = int(goal_rank) - int(r.json()['user']['rank'])
print('Levels to farm: ' +str(levels_to_farm)) print('Levels to farm: ' +str(levels_to_farm))
#################################################################### ####################################################################
@ -2657,8 +2661,8 @@ def user_command_executor(command):
medal_calculator() medal_calculator()
elif command == 'ezaplus': elif command == 'ezaplus':
complete_unfinished_zbattles_plus() complete_unfinished_zbattles_plus()
# elif command == 'rankup': elif command == 'rankup':
# rank_up() rank_up()
elif command == 'lrpan': elif command == 'lrpan':
lr_pan() lr_pan()
elif command == 'bossrush': elif command == 'bossrush':