From 1ee6e7f111d1f0b58d2176f1de529cc1b820f1a3 Mon Sep 17 00:00:00 2001 From: Pawel Orzech Date: Thu, 8 Aug 2019 11:23:23 +0100 Subject: [PATCH] work in progress regarding rank_up --- .gitignore | 3 ++- __pycache__/commands.cpython-37.pyc | Bin 118096 -> 118102 bytes commands.py | 18 +++++++++++------- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 95e103e..9564245 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ __pycache__ commands.spec physqlsimplecipher .vscode -.gitattributes \ No newline at end of file +.gitattributes +*.json \ No newline at end of file diff --git a/__pycache__/commands.cpython-37.pyc b/__pycache__/commands.cpython-37.pyc index 43932b1e64bafc679918c2ec4cc986f442fdbfbf..6bb4c2c20203d16983cda82f98cbae7bbc2cfd0d 100644 GIT binary patch delta 433 zcmWlTKWGzi9L4W*cezWGUecPP2`F(B3R=M}m=ZHoTL&8mC`G{`9Rvky0(D3#5_BuA zT*zS&i6|lpDfNebQN$t^T1EVWXyYWhh(y|eG=n&JzTqwJ!-w~N!T!8pN3xC+()@I{ zj-E;`FGXft?z&SFa~p2{U?EziVwQr1zOuPPtAbVvm(41E>ka#sR_IM=1t;Mzajg>Y zx&Bg5IZ)+4s|IUdu^##A3pqDhF9(A3+B?;JeZrut+ShX?11fzp<1nsf9!weRRh{Oz z$*4M{)(y_8gd7W4*LpOqnDREqNUGUqPi&s5!z*c%UFyo(%Mc@K^y4<2Rdw>y{$W}& z8>1c9Q;t-!bdmG>2oF$~a+cc$zh(CbuS}gjX^*jGF)812q;(ERGEdXMmAA(U8a$Ns z2|6Ku$l4^+2Ja+uh7%#H)bF49;|(>~?sbZUWx2>kn7A}Au@t4{ot|TwFVdRhgUMyN zUt>7Py!^aD#^9U`HrR;ZNMeyAw)HFK+rE2?HIj1mG512GWatGoi#xKi%5$AfslMi- L&K~dY8}k1E4$+eR delta 474 zcmXAkO-K}B7{}-T&g{-O`{_rum9Wr3JS?(EdJ&ge7PGdn1)&g%5Nq|4qyt+prZA^6 zw0M_Y6mf-anfCGGK9^YN1IndB*~%^!*g+_;_Mi}SaE6}K!=L~2G;~w3a7eNM>Hlu%MvW;u zjgU0vvOBe=%VHv${SJ4^CXcM}139zCiy&*jNE-a|@sN0)i^-^p>P$-U1T;w+?Q(5(a>13T2zg;j<93sCh8 zcHOu_+bMK1PfO6&$T@B<$Bj<+;;yVtIcckuzg|R`{$9Wjh9%nU!yg@6^zkY(GRo97 zgo`?csW6HLucyAwJ}EgM#ReUwjd4r`P|07LMh2hg+cee{nDjJ@n1)IEJ%5Te_7Yh)3RHfJ62nirQ^rk(V|n%gz57p6m}vk2 diff --git a/commands.py b/commands.py index a3825ba..e6061af 100644 --- a/commands.py +++ b/commands.py @@ -2015,17 +2015,21 @@ def rank_up(): else: url = 'http://ishin-production.aktsk.jp/user' 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)) - 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)) - 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)) - - + #################################################################### @@ -2657,8 +2661,8 @@ def user_command_executor(command): medal_calculator() elif command == 'ezaplus': complete_unfinished_zbattles_plus() - # elif command == 'rankup': - # rank_up() + elif command == 'rankup': + rank_up() elif command == 'lrpan': lr_pan() elif command == 'bossrush':