forked from phblepyu/Summoners-War-Bot
/
mycode_hive.py
69 lines (63 loc) · 1.71 KB
/
mycode_hive.py
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
from api import API
from qpyou import QPYOU
from tools import rndDeviceId
import json
import random
my_email=''
my_hivelogin=''
my_password=''
# Leave empty if you don't know device id
device_id = ''
device = ''
try:
with open('config.json', 'r') as f:
data = json.load(f)
if data.get('device_id'):
device_id = data.get('device_id')
else:
device_id = str(random.randint(200000000, 300000000))
data.update({'device_id': device_id})
with open('config.json', 'w') as f:
f.write(json.dumps(data))
except FileNotFoundError:
with open('config.json', 'w') as f:
device_id = str(random.randint(200000000, 300000000))
data = {
'device_id': device_id
}
f.write(json.dumps(data))
uid,did,sessionkey,appId=QPYOU(device_id, device).hiveLogin(my_hivelogin,my_password)
a=API(uid,did,my_hivelogin,my_email,sessionkey,device=device,app_id=appId)
a.set_region('eu')
a.set_idfa(rndDeviceId())
a.getLocation()
a.getServerStatus()
a.getVersionInfo()
a.CheckLoginBlock()
a.login()
a.GetDailyQuests()
a.GetMiscReward()
a.GetMailList()
a.CheckDailyReward()
a.GetArenaLog()
a.CheckDarkPortalStatus()
a.GetCostumeCollectionList()
a.ReceiveDailyRewardSpecial()
a.receiveDailyRewardInactive()
a.GetFriendRequest()
a.getUnitUpgradeRewardInfo()
a.GetRTPvPInfo_v3()
a.GetChatServerInfo()
a.getRtpvpRejoinInfo()
a.GetEventTimeTable()
a.GetNoticeChat()
a.GetNoticeDungeon()
a.GetDungeonList()
a.GetInstanceList()
a.gettrialtowerupdateremained()
a.GetTrialTowerInfo_v2()
# add your things afterwards
#a.doMission(1,1,1)#garen forest outskirts
#a.doMission(1,2,1)#garen forest south
#a.doMission(1,3,1)#garen forest east
#a.doMission(1,4,1)#garen forest paths