-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreroll.py
More file actions
60 lines (44 loc) · 1.31 KB
/
reroll.py
File metadata and controls
60 lines (44 loc) · 1.31 KB
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
from endpoints import *
from main_functions import *
import os
"""
Script for rerolling for exquisites
"""
current_room = get_current_room()
cooldown(current_room)
if int(current_room['room_id']) != 495:
os.system('python fast_travel.py --room 495')
found_exq = False
while found_exq == False:
reroll_item = None
# Get an item
player_status = status()
cooldown(player_status)
if player_status['inventory']:
for item in player_status['inventory']:
if 'exquisite' not in item:
reroll_item = item
break
else:
print('You need an item to transmog')
break
if reroll_item == None:
print('No non-exquisite items available for reroll')
break
# Get player balance
balance_res = get_balance()
cooldown(balance_res)
balance = int(balance_res['messages'][0].split(' ')[5].rstrip('\.0'))
print('Balance: ', balance)
if balance > 0:
trans_res = transmogrify(reroll_item)
cooldown(trans_res)
if trans_res['errors']:
print(trans_res['errors'][0])
break
new_tier = trans_res['messages'][0].strip('!').split(' ')[-2]
print(trans_res['messages'][0])
if 'exquisite' == new_tier:
print('\nFOUND EXQUISITE ITEM\n')
print(new_item)
break