1
This commit is contained in:
parent
2257b1bff8
commit
8e3e149b1c
@ -2,4 +2,4 @@
|
||||
|
||||
cd ../tools/robot/virtualclient
|
||||
#python robot.py ws://192.168.100.21:7101 hao1069 hao1069 $1
|
||||
python robot.py "wss://game2001.kingsome.cn" hao1069 hao1069 $1
|
||||
python robot.py "wss://game2001-banshu.kingsome.cn" hao1069 hao1069 $1
|
||||
|
@ -30,6 +30,7 @@ def getSession(account_id):
|
||||
print(real_url)
|
||||
req = urllib.request.Request(real_url)
|
||||
data = urllib.request.urlopen(req).read()
|
||||
print(data)
|
||||
return json.loads(data.decode('utf-8'))['session_id']
|
||||
|
||||
def inputCommand(ws):
|
||||
@ -57,8 +58,8 @@ def getSMMsg(sm_msgid):
|
||||
|
||||
#g_remote_ip = "ws://127.0.0.1:" + sys.argv[1]
|
||||
g_remote_ip = sys.argv[1]
|
||||
g_account_id = '6000_1008_' + sys.argv[2]
|
||||
g_session_id = sys.argv[3]
|
||||
g_account_id = '6000_2001_' + sys.argv[2]
|
||||
g_session_id = getSession(g_account_id)
|
||||
g_server_id = sys.argv[4]
|
||||
g_seqid = 1000
|
||||
g_login_time = time.time()
|
||||
@ -132,6 +133,7 @@ def procSMUpdate(msg):
|
||||
print(full_obj)
|
||||
|
||||
def onUserPacket(ws, msgid, msgbody):
|
||||
print('onUserPacket')
|
||||
global g_login_time
|
||||
if time.time() - g_login_time > 30:
|
||||
sendCMMove(ws)
|
||||
|
Loading…
x
Reference in New Issue
Block a user