Commit bba81356 authored by mercury233's avatar mercury233

update post score

parent b318253a
......@@ -20,8 +20,13 @@
"post_deck": "http://mycard.moe/ygopro/analytics/deck/text",
"hang_timeout": 90,
"arena_mode": {
"mode": "233",
"post_score": false,
"get_score": false
},
"arena_mode_bak": {
"mode": "entertain",
"post_score": "https://mycard.moe/ygopro/arena/index.php?c=trueskill",
"post_score": "https://mycard.moe/ygopro/arena/index.php?c=update",
"get_score": "https://mycard.moe/ygopro/arena/index.php?c=query&username="
},
"tournament_mode": {
......
......@@ -425,14 +425,14 @@ class Room
score_array.push { name: name, score: score }
log.info @start_time, score_array
request.post { url : settings.modules.arena_mode.post_score , form : {
accesskey: process.env.MYCARD_AUTH_KEY,
accesskey: process.env.MYCARD_SCORE_KEY,
usernameA: score_array[0].name,
usernameB: score_array[1].name,
userscoreA: score_array[0].score,
userscoreB: score_array[1].score,
start: @start_time,
end: moment().format(),
arena: settings.modules.arena_mode.mode
arena: if room.hostinfo.mode ==1 then 'athletic' else 'entertain' #settings.modules.arena_mode.mode
}}, (error, response, body)=>
if error
log.warn 'SCORE POST ERROR', error, response
......@@ -1074,7 +1074,7 @@ ygopro.stoc_follow 'JOIN_GAME', false, (buffer, info, client, server)->
log.warn 'LOAD SCORE ERROR', client.name, error, response, body
else
log.info 'LOAD SCORE', client.name, body
ygopro.stoc_send_chat(client, "积分系统测试中,您有#{body.exp}点经验,#{body.pt}点战斗力。正式上线前这些数据可能被重置。", ygopro.constants.COLORS.BABYBLUE)
ygopro.stoc_send_chat(client, "您有#{body.exp}点经验,排名第#{body.exp_rank}#{body.pt}点战斗力,排名第#{body.arena_rank}。正式上线前这些积分可能被重置。", ygopro.constants.COLORS.BABYBLUE)
return
if !room.recorder
......@@ -1336,7 +1336,7 @@ ygopro.stoc_follow 'DUEL_START', false, (buffer, info, client, server)->
log.warn 'DECK SAVE ERROR', err
if settings.modules.post_deck
request.post { url : settings.modules.post_deck , form : {
accesskey: process.env.MYCARD_AUTH_KEY,
accesskey: process.env.MYCARD_DECK_KEY,
deck: deck_text,
playername: client.name,
arena: if room.hostinfo.mode ==1 then 'athletic' else 'entertain'
......
......@@ -581,14 +581,14 @@
request.post({
url: settings.modules.arena_mode.post_score,
form: {
accesskey: process.env.MYCARD_AUTH_KEY,
accesskey: process.env.MYCARD_SCORE_KEY,
usernameA: score_array[0].name,
usernameB: score_array[1].name,
userscoreA: score_array[0].score,
userscoreB: score_array[1].score,
start: this.start_time,
end: moment().format(),
arena: settings.modules.arena_mode.mode
arena: room.hostinfo.mode === 1 ? 'athletic' : 'entertain'
}
}, (function(_this) {
return function(error, response, body) {
......@@ -1302,7 +1302,7 @@
log.warn('LOAD SCORE ERROR', client.name, error, response, body);
} else {
log.info('LOAD SCORE', client.name, body);
ygopro.stoc_send_chat(client, "积分系统测试中,您有" + body.exp + "点经验," + body.pt + "点战斗力。正式上线前这些数据可能被重置。", ygopro.constants.COLORS.BABYBLUE);
ygopro.stoc_send_chat(client, "您有" + body.exp + "点经验,排名第" + body.exp_rank + "" + body.pt + "点战斗力,排名第" + body.arena_rank + "。正式上线前这些积分可能被重置。", ygopro.constants.COLORS.BABYBLUE);
}
});
}
......@@ -1653,7 +1653,7 @@
request.post({
url: settings.modules.post_deck,
form: {
accesskey: process.env.MYCARD_AUTH_KEY,
accesskey: process.env.MYCARD_DECK_KEY,
deck: deck_text,
playername: client.name,
arena: room.hostinfo.mode === 1 ? 'athletic' : 'entertain'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment