Skip to content

Instantly share code, notes, and snippets.

@shugen002
Created December 2, 2021 00:36
Show Gist options
  • Save shugen002/77100a70f9d5e474f4647f41d7b46e81 to your computer and use it in GitHub Desktop.
Save shugen002/77100a70f9d5e474f4647f41d7b46e81 to your computer and use it in GitHub Desktop.

公共服务器列表

http://l11-prod-list-hk-myth.dyhxgame.com/offical_list

let
    源 = Table.FromColumns({Lines.FromBinary(Web.Contents("http://l11-prod-list-hk-myth.dyhxgame.com/offical_list"), null, null, 65001)}),
    #"解析的 JSON" = Table.TransformColumns(源,{},Json.Document),
    Column1 = #"解析的 JSON"{0}[Column1],
    server_list = Table.FromRecords(Column1[server_list]),
    #"解析的 JSON1" = Table.TransformColumns(server_list,{{"info", Json.Document}}),
    #"展开的“info”" = Table.ExpandRecordColumn(#"解析的 JSON1", "info", {"cg_id", "city_id", "xc_id", "pl_limit", "u_passport", "s_lvl", "s_d_id", "ds_type", "pvp_type", "maxplayer", "online", "c_p_n", "major_ver", "minor_ver", "request_battle"}, {"cg_id", "city_id", "xc_id", "pl_limit", "u_passport", "s_lvl", "s_d_id", "ds_type", "pvp_type", "maxplayer", "online.1", "c_p_n", "major_ver", "minor_ver", "request_battle"})
in
    #"展开的“info”"

私人服务器列表

http://l11-prod-list-hk-myth.dyhxgame.com/private_list

let
    源 = Table.FromColumns({Lines.FromBinary(Web.Contents("http://l11-prod-list-hk-myth.dyhxgame.com/private_list"), null, null, 65001)}),
    #"解析的 JSON" = Table.TransformColumns(源,{},Json.Document),
    Column1 = #"解析的 JSON"{0}[Column1],
    server_list = Table.FromRecords(Column1[server_list]),
    #"解析的 JSON1" = Table.TransformColumns(server_list,{{"info", Json.Document}}),
    #"展开的“info”" = Table.ExpandRecordColumn(#"解析的 JSON1", "info", {"has_pwd", "map_name", "steamaddr", "host_data", "desc", "ds_type", "pvp_type", "maxplayer", "online", "c_p_n", "major_ver", "minor_ver"}, {"has_pwd", "map_name", "steamaddr", "host_data", "desc", "ds_type", "pvp_type", "maxplayer", "online.1", "c_p_n", "major_ver", "minor_ver"})
in
    #"展开的“info”"

注册服务器

希望能帮到有需要的人。

function tick(){
  axios.post("http://prod-private-list-myth.dyhxgame.com:8097/api/v1/register/update_info",
  {
    "server_name":"Fake Test Server",
    "server_id":100,
    "district_id":8888,
    "type":2,"addr":"127.0.0.1",
    "default_ip":"127.0.0.1",
    "watch_info":"{\"fps\":9.99374,\"obj_num\":979843,\"t_char\":19924,\"a_char\":0,\"t_stru\":825,\"a_stru\":0}","port":11888,"status":5,"info":"{\"has_pwd\":0,\"map_name\":\"LargeTerrain_Central_Main\",\"steamaddr\":\"\",\"host_data\":\"\",\"desc\":\"\",\"ds_type\":2,\"pvp_type\":1,\"maxplayer\":100,\"online\":9999999,\"c_p_n\":0,\"major_ver\":0,\"minor_ver\":13}",
    "owner_type":2
  }).then(e=>console.log(e.data))}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment