Liebe Com.
Ich habe mich seit heute morgen um 1 Uhr damit beschäfting, meine Serverinfo so hinzubekommen, dass ich ein startus habe.
Ich habe schon den Serverinfogerator von Igor benutz, ging mit meiner selbt geschrieben, auch nicht.
Meine:
Code:
import os
import app
import locale
import debugInfo
import binascii
CHINA_PORT = 50000
f = open('channel3.inf','r')
channel3 = binascii.a2b_base64(f.readline())
def BuildServerList(orderList):
retMarkAddrDict = {}
retAuthAddrDict = {}
retRegion0 = {}
ridx = 1
for region, auth, mark, channels in orderList:
cidx = 1
channelDict = {}
for channel in channels:
key = ridx * 10 + cidx
channel["key"] = key
channelDict[cidx] = channel
cidx += 1
region["channel"] = channelDict
retRegion0[ridx] = region
retAuthAddrDict[ridx] = auth
ridx += 1
return retRegion0, retAuthAddrDict, retMarkAddrDict
app.ServerName = None
if locale.IsEUROPE():
info = {
'MARKADDR': {
20: {
'tcp_port': 13001, 'ip': channel3, 'symbol_path': '10', 'mark': '10.tga'
},
30: {
'tcp_port': 13000, 'ip': channel3, 'symbol_path': '20', 'mark': '20.tga'
}
},
'GAMEADDR': {
0: {
2: {
'name': "Test-Server",
'channel':
{
1: {
'state': '..', 'name': 'Test 1 ', 'key': 11, 'ip': channel3, 'tcp_port': 13001, 'udp_port': 13001
}
}
},
3: {
'name': "FinalKingDom2",
'channel':
{
1: {
'state': '..', 'name': 'World 1 ', 'key': 21, 'ip': channel3, 'tcp_port': 13000, 'udp_port': 13000
}
}
}
} }, 'NAME': { 0: 'GERMANY' }, 'AUTHADDR': { 0: {
2: {
'ip': channel3, 'port': 11003
},
3: {
'ip': channel3, 'port': 11002
}
} }
}
STATE_NONE = ".."
STATE_DICT = {
0 : "...",
1 : "NORM",
2 : "BUSY",
3 : "FULL"
}
REGION_NAME_DICT = info["NAME"]
REGION_AUTH_SERVER_DICT = info["AUTHADDR"]
REGION_DICT = info["GAMEADDR"]
MARKADDR_DICT = info["MARKADDR"]
Igor's
Code:
import locale
def BuildServerList(orderList):
retMarkAddrDict = {}
retAuthAddrDict = {}
retRegion0 = {}
ridx = 1
for region, auth, mark, channels in orderList:
cidx = 1
channelDict = {}
for channel in channels:
key = ridx * 10 + cidx
channel['key'] = key
channelDict[cidx] = channel
cidx += 1
region['channel'] = channelDict
retRegion0[ridx] = region
retAuthAddrDict[ridx] = auth
retMarkAddrDict[ridx*10] = mark
ridx += 1
return retRegion0, retAuthAddrDict, retMarkAddrDict
if locale.IsEUROPE():
STATE_NONE = "..."
STATE_DICT = {
0 : "....",
1 : "NORM",
2 : "BUSY",
3 : "FULL"
}
SERVER01_CHANNEL = [
{"name":"Channel 1 ","ip":"5.168.10.11","tcp_port":13001,"udp_port":13001,"state":STATE_NONE,},
]
SERVER02_CHANNEL =[
{"name":"Channel 1 ","ip":"5.168.10.11","tcp_port":13000,"udp_port":13000,"state":STATE_NONE,},
]
SERVER01_MARK = { "ip" : "5.168.10.11", "tcp_port" : 13001, "mark" : "10.tga", "symbol_path" : "10",}
SERVER02_MARK = { "ip" : "5.168.10.11", "tcp_port" : 13000, "mark" : "20.tga", "symbol_path" : "20",}
SERVER01_AUTH = { "ip":"5.168.10.11", "port":11003, } #Server 1
SERVER02_AUTH = { "ip":"5.168.10.11", "port":11002, } #Server 2
SERVER01 = { "name" : "Test-Server" }
SERVER02 = { "name" : "FinalKingDom2" }
TESTADDR = { "ip" : "210.123.10.153", "tcp_port" : 50000, "udp_port" : 50000, }
REGION0_ORDER_LIST = [
(SERVER01, SERVER01_AUTH, SERVER01_MARK, SERVER01_CHANNEL),
(SERVER02, SERVER02_AUTH, SERVER02_MARK, SERVER02_CHANNEL),
]
# BUILD
NEW_REGION0, NEW_REGION0_AUTH_SERVER_DICT, NEW_MARKADDR_DICT = BuildServerList(REGION0_ORDER_LIST)
# RESULT
NEW_REGION_NAME_DICT = {
0 : "GERMANY",
}
NEW_REGION_AUTH_SERVER_DICT = {
0 : NEW_REGION0_AUTH_SERVER_DICT,
}
NEW_REGION_DICT = {
0 : NEW_REGION0,
}
MARKADDR_DICT = NEW_MARKADDR_DICT
REGION_DICT = NEW_REGION_DICT
REGION_NAME_DICT = NEW_REGION_NAME_DICT
REGION_AUTH_SERVER_DICT = NEW_REGION_AUTH_SERVER_DICT
TESTADDR = { 'ip' : '210.123.10.153', 'tcp_port' : 50000, 'udp_port' : 50000, }
Code:
TESTADDR = { 'ip' : '210.123.10.153', 'tcp_port' : 50000, 'udp_port' : 50000, }
Also müsste der Status von einen Addrtestserver genommen werden.
Der normale china port ist ja 50000
Aber welchen habe ich ?
Oder wer kann mir eine funktionirende serverinfo kurz basteln ?
THX, im Vorraus an alle Leutz aus E*pvp





