// ==UserScript==
// @name van.mz.playerAdvanced
// @namespace van
// @version 3.33
// @description Player display optimization 球员着色插件
// @author van
// @match https://www.managerzone.com/*
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_listValues
// @grant GM_deleteValue
// @grant GM_setClipboard
// @grant GM_xmlhttpRequest
// @connect www.budeng.win
// @require https://cdn.jsdelivr.net/pako/1.0.5/pako.min.js
// @require https://cdn.jsdelivr.net/gh/vanjoge/MZExtension/Scripts/base64js.min.js
// @downloadURL none
// ==/UserScript==
var gm_mzlanguage = {
zh: {
Name: "中文",
Save: "保存",
Setting: "设置",
Test: "测试",
SettingTitle: "点击可对语言和XML导出进行设置",
Language: "语言",
XmlMode: "战术导出模式",
XmlMode1: "顺序选择球员",
XmlMode2: "根据位置选择球员(需提交数据到后台)",
TacConf: "位置系数设置",
AutoRun: "自动着色",
AutoRun0: "仅打开页面时自动执行一次",
AutoRun1: "随系统刷新自动着色(如果浏览器变卡请关闭此选项)",
NotSureEx: "挂牌后属性可能有变动,不确定转会市场显示是否是真实属性,请自行甄别。
属性变动时间",
NotSure: "属性不确定",
ManualColorTitle: "点击可手动着色 快捷键:ALT + A",
ManualColor: "手动着色",
Jijing: "比赛集锦",
dongzuo: "球员动作",
Copyxml1: "复制主队战术",
Copyxml2: "复制客队战术",
CopyXmlMsg: "战术已复制到剪切板",
CopyXmlMsgError: "战术复制失败",
BA_NORMAL: "BA_NORMAL",
BA_WALL: "站人墙",
BA_HOLD: "抱着球",
BA_DOWN: "倒地",
BA_HOLD_THROWIN: "界外球准备",
BA_THROWIN: "界外球",
BA_LEFT_FOOT_SHOT_FWD: "射门/长传(L)",
BA_LEFT_FOOT_SHOT_BACK: "BA_LEFT_FOOT_SHOT_BACK",
BA_LEFT_FOOT_SHOT_RIGHT: "BA_LEFT_FOOT_SHOT_RIGHT",
BA_LEFT_FOOT_SHOT_LEFT: "BA_LEFT_FOOT_SHOT_LEFT",
BA_RIGHT_FOOT_SHOT_FWD: "射门/长传(R)",
BA_RIGHT_FOOT_SHOT_BACK: "BA_RIGHT_FOOT_SHOT_BACK",
BA_RIGHT_FOOT_SHOT_RIGHT: "BA_RIGHT_FOOT_SHOT_RIGHT",
BA_RIGHT_FOOT_SHOT_LEFT: "BA_RIGHT_FOOT_SHOT_LEFT",
BA_LEFT_FOOT_PASS_FWD: "短传(L)",
BA_LEFT_FOOT_PASS_BACK: "BA_LEFT_FOOT_PASS_BACK",
BA_LEFT_FOOT_PASS_RIGHT: "BA_LEFT_FOOT_PASS_RIGHT",
BA_LEFT_FOOT_PASS_LEFT: "BA_LEFT_FOOT_PASS_LEFT",
BA_RIGHT_FOOT_PASS_FWD: "短传(R)",
BA_RIGHT_FOOT_PASS_BACK: "BA_RIGHT_FOOT_PASS_BACK",
BA_RIGHT_FOOT_PASS_RIGHT: "BA_RIGHT_FOOT_PASS_RIGHT",
BA_RIGHT_FOOT_PASS_LEFT: "BA_RIGHT_FOOT_PASS_LEFT",
BA_PICK_UP_BALL: "捡起球",
BA_DROP_BALL: "放下球",
BA_HEADER: "争顶",
BA_TRIP: "丢失球权",
BA_CELEBRATE: "庆祝进球",
BA_GK_READY: "准备扑救",
BA_GK_ACRO_LEFT: "ACRO(L)",
BA_GK_ACRO_LEFT_HOLD: "ACRO_HOLD(L)",
BA_GK_ACRO_RIGHT: "ACRO(R)",
BA_GK_ACRO_RIGHT_HOLD: "ACRO_HOLD(R)",
BA_GK_SIDESTEP_LEFT: "移动(L)",
BA_GK_SIDESTEP_RIGHT: "移动(R)",
BA_GK_KICK: "BA_GK_KICK",
BA_GK_THROW_BALL: "BA_GK_THROW_BALL",
BA_GK_STRETCH_LEFT: "BA_GK_STRETCH_LEFT",
BA_GK_STRETCH_LEFT_HOLD: "BA_GK_STRETCH_LEFT_HOLD",
BA_GK_STRETCH_RIGHT: "BA_GK_STRETCH_RIGHT",
BA_GK_STRETCH_RIGHT_HOLD: "BA_GK_STRETCH_RIGHT_HOLD",
BA_BALL_OWNER: "控球",
BA_TACKLE: "上抢",
BA_SLIDING_TACKLE: "BA_SLIDING_TACKLE",
BA_SLIDING_TACKLE_STAND: "BA_SLIDING_TACKLE_STAND",
BA_MAX: "BA_MAX",
BA_MY_1001: "头球攻门(L)",
BA_MY_1002: "头球攻门(R)",
BA_MY_1003: "卸下球",
BA_MY_1011: "上抢(成功)",
BA_MY_1012: "上抢(失败)",
Unknown: "未知"
,
training_pos: "无教练",
training_camp: "进营",
training_coach: "有教练",
training_ycc: "调整",
training_itc: "强化",
training_neg: "掉球",
training_unit: "格",
training_unknown: "未知训练类型",
training_ball_day: "离下一次涨球训练天数",
training_part: "分段训练效率",
training_total: "进度",
training_avg: "平均",
training_now: "当前训练进度",
SkillsAnalysisTitle: "点击可手动着色和分析训练效率 快捷键:ALT + S",
SkillsAnalysis: "训练效率分析"
,
sug_T0: "首选:",
sug_T1: "次选:",
sug_T2: "可尝试:",
sug_T3: "默认:",
Pos9: "后卫",
Pos7: "门将",
Pos10: "边锋",
Pos5: "前锋",
Pos4: "中场",
Pos56: "中锋",
sug_Loser: "关键属性容易早死,尽早交换或开除。",
sug_PRI: "训练顺序:",
attrName1: "速度",
attrName2: "耐力",
attrName3: "意识",
attrName4: "传球",
attrName5: "射门",
attrName6: "头球",
attrName7: "守门",
attrName8: "控球",
attrName9: "抢断",
attrName10: "传中",
attrName11: "定位"
,
scoutReport: "球探报告"
}
,
en: {
Name: "English",
Save: "Save",
Setting: "Setting",
Test: "Test",
SettingTitle: "Click setting language",
Language: "Language",
XmlMode: "Tactical Export Model",
XmlMode1: "Sequential selection",
XmlMode2: "Choose by location(need submit data to server)",
TacConf: "Tactical Coefficient Setting",
AutoRun: "Auto Colorable",
AutoRun0: "By page loaded(Once)",
AutoRun1: "By MZ Refresh",
NotSureEx: "Skills may change after entering the transfer market.
Change time ",
NotSure: "Uncertain skill",
ManualColorTitle: "Click the Colorable Skill. Shortcut key : ALT + A",
ManualColor: "Colorable Skill",
Jijing: "Events",
dongzuo: "PlayerStatus",
Copyxml1: "CopyXML(home)",
Copyxml2: "CopyXML(away)",
CopyXmlMsg: "The tactic was copied to the Clipboard!",
CopyXmlMsgError: "Copy error!",
BA_NORMAL: "Normal",
BA_WALL: "Wall",
BA_HOLD: "Hold",
BA_DOWN: "Down",
BA_HOLD_THROWIN: "HoldThrowin",
BA_THROWIN: "Throwin",
BA_LEFT_FOOT_SHOT_FWD: "FootShot(L)",
BA_LEFT_FOOT_SHOT_BACK: "FootShotBack(L)",
BA_LEFT_FOOT_SHOT_RIGHT: "FootShotRight(L)",
BA_LEFT_FOOT_SHOT_LEFT: "FootShotLeft(L)",
BA_RIGHT_FOOT_SHOT_FWD: "FootShot(R)",
BA_RIGHT_FOOT_SHOT_BACK: "FootShotBack(R)",
BA_RIGHT_FOOT_SHOT_RIGHT: "FootShotRight(R)",
BA_RIGHT_FOOT_SHOT_LEFT: "FootShotLeft(R)",
BA_LEFT_FOOT_PASS_FWD: "FootPass(L)",
BA_LEFT_FOOT_PASS_BACK: "FootPassBack(L)",
BA_LEFT_FOOT_PASS_RIGHT: "FootPassRight(L)",
BA_LEFT_FOOT_PASS_LEFT: "FootPassLeft(L)",
BA_RIGHT_FOOT_PASS_FWD: "FootPass(R)",
BA_RIGHT_FOOT_PASS_BACK: "FootPassBack(R)",
BA_RIGHT_FOOT_PASS_RIGHT: "FootPassRight(R)",
BA_RIGHT_FOOT_PASS_LEFT: "FootPassLeft(R)",
BA_PICK_UP_BALL: "PickUpBall",
BA_DROP_BALL: "DropBall",
BA_HEADER: "Header",
BA_TRIP: "Trip",
BA_CELEBRATE: "Celebrate",
BA_GK_READY: "GkReady",
BA_GK_ACRO_LEFT: "GkAcroLeft",
BA_GK_ACRO_LEFT_HOLD: "GkAcroLeftHold",
BA_GK_ACRO_RIGHT: "GkAcroRight",
BA_GK_ACRO_RIGHT_HOLD: "GkAcroRightHold",
BA_GK_SIDESTEP_LEFT: "GkSidestepLeft",
BA_GK_SIDESTEP_RIGHT: "GkSidestepRight",
BA_GK_KICK: "GkKick",
BA_GK_THROW_BALL: "GkThrowBall",
BA_GK_STRETCH_LEFT: "GkStretchLeft",
BA_GK_STRETCH_LEFT_HOLD: "GkStretchLeftHold",
BA_GK_STRETCH_RIGHT: "GkStretchRight",
BA_GK_STRETCH_RIGHT_HOLD: "GkStretchRightHold",
BA_BALL_OWNER: "BallOwner",
BA_TACKLE: "Tackle",
BA_SLIDING_TACKLE: "SlidingTackle",
BA_SLIDING_TACKLE_STAND: "SlidingTackleStand",
BA_MAX: "Max",
BA_MY_1001: "HeadGoal(L)",
BA_MY_1002: "HeadGoal(R)",
BA_MY_1003: "StopTheBall",
BA_MY_1011: "Tackle(Success)",
BA_MY_1012: "Tackle(Fail)",
Unknown: "Unknown"
,
training_pos: "No coach",
training_camp: "CAMP",
training_coach: "Coach",
training_ycc: "Ycc",
training_itc: "Itc",
training_neg: "Neg",
training_unit: "↑",
training_unknown: "Unknown training",
training_ball_day: "Next ball days",
training_part: "Training efficiency",
training_total: "Total",
training_avg: "Avg",
training_now: "Now",
SkillsAnalysisTitle: "Colorable Skill and Analysis of Training Efficiency Shortcut key :ALT + S",
SkillsAnalysis: "Colorable By Graphs"
,
sug_T0: "First plan:",
sug_T1: "Second plan:",
sug_T2: "May try:",
sug_T3: "Default:",
Pos9: "CB",
Pos7: "GK",
Pos10: "WF",
Pos5: "ST",
Pos4: "MF",
Pos56: "CF",
sug_Loser: "Key skills too low.Exchange or dismiss as soon as possible.",
sug_PRI: "Training order:",
attrName1: "Speed",
attrName2: "Stamina",
attrName3: "Play Intelligence",
attrName4: "Passing",
attrName5: "Shooting",
attrName6: "Heading",
attrName7: "Keeping",
attrName8: "Ball Control",
attrName9: "Tackling",
attrName10: "Aerial Passing",
attrName11: "Set Plays"
,
scoutReport: "Scout Report"
}
,
es: {
Name: "Español",
Save: "Guardar",
Setting: "Ajustes",
Test: "Test",
SettingTitle: "Haga clic en configuración Idioma",
Language: "Idioma",
XmlMode: "Tactical Export Model",
XmlMode1: "Secuencia de selección",
XmlMode2: "Elegir por locación (necesita suministrar datos al servidor)",
TacConf: "Tactical Coefficient Setting",
AutoRun: "Auto Coloreable",
AutoRun0: "Por página cargada (sólo una vez)",
AutoRun1: "Por recargar MZ",
NotSureEx: "Las skills pueden cambiar después de ingresar al mercado.
Cambiar hora ",
NotSure: "Skill incierta",
ManualColorTitle: "Haga clic en la skill para colorear. Acceso directo: ALT + A",
ManualColor: "Color de la skill",
Jijing: "Eventos",
dongzuo: "PlayerStatus",
Copyxml1: "CopiarXML(local)",
Copyxml2: "CopiarXML(visitante)",
CopyXmlMsg: "La táctica fue copiada al portapapeles",
CopyXmlMsgError: "¡Error al copiar!",
BA_NORMAL: "Normal",
BA_WALL: "Wall",
BA_HOLD: "Hold",
BA_DOWN: "Down",
BA_HOLD_THROWIN: "HoldThrowin",
BA_THROWIN: "Throwin",
BA_LEFT_FOOT_SHOT_FWD: "FootShot(L)",
BA_LEFT_FOOT_SHOT_BACK: "FootShotBack(L)",
BA_LEFT_FOOT_SHOT_RIGHT: "FootShotRight(L)",
BA_LEFT_FOOT_SHOT_LEFT: "FootShotLeft(L)",
BA_RIGHT_FOOT_SHOT_FWD: "FootShot(R)",
BA_RIGHT_FOOT_SHOT_BACK: "FootShotBack(R)",
BA_RIGHT_FOOT_SHOT_RIGHT: "FootShotRight(R)",
BA_RIGHT_FOOT_SHOT_LEFT: "FootShotLeft(R)",
BA_LEFT_FOOT_PASS_FWD: "FootPass(L)",
BA_LEFT_FOOT_PASS_BACK: "FootPassBack(L)",
BA_LEFT_FOOT_PASS_RIGHT: "FootPassRight(L)",
BA_LEFT_FOOT_PASS_LEFT: "FootPassLeft(L)",
BA_RIGHT_FOOT_PASS_FWD: "FootPass(R)",
BA_RIGHT_FOOT_PASS_BACK: "FootPassBack(R)",
BA_RIGHT_FOOT_PASS_RIGHT: "FootPassRight(R)",
BA_RIGHT_FOOT_PASS_LEFT: "FootPassLeft(R)",
BA_PICK_UP_BALL: "Toma la pelota",
BA_DROP_BALL: "Tira la pelota al césped",
BA_HEADER: "Cabezazo",
BA_TRIP: "Trip",
BA_CELEBRATE: "Celebración",
BA_GK_READY: "Arquero preparado",
BA_GK_ACRO_LEFT: "GkAcroLeft",
BA_GK_ACRO_LEFT_HOLD: "GkAcroLeftHold",
BA_GK_ACRO_RIGHT: "GkAcroRight",
BA_GK_ACRO_RIGHT_HOLD: "GkAcroRightHold",
BA_GK_SIDESTEP_LEFT: "Arquero da un paso a la izquierda",
BA_GK_SIDESTEP_RIGHT: "Arquero da un paso a la derecha",
BA_GK_KICK: "Arquero da una patada",
BA_GK_THROW_BALL: "GkThrowBall",
BA_GK_STRETCH_LEFT: "GkStretchLeft",
BA_GK_STRETCH_LEFT_HOLD: "GkStretchLeftHold",
BA_GK_STRETCH_RIGHT: "GkStretchRight",
BA_GK_STRETCH_RIGHT_HOLD: "GkStretchRightHold",
BA_BALL_OWNER: "Con la pelota en los pies",
BA_TACKLE: "Entrada",
BA_SLIDING_TACKLE: "Barrida",
BA_SLIDING_TACKLE_STAND: "SlidingTackleStand",
BA_MAX: "Max",
BA_MY_1001: "HeadGoal(L)",
BA_MY_1002: "HeadGoal(R)",
BA_MY_1003: "Frena la pelota",
BA_MY_1011: "Entrada(acertada)",
BA_MY_1012: "Entrada(fallida)",
Unknown: "Desconocido"
,
training_pos: "Sin entrenador",
training_camp: "CAMP",
training_coach: "Coach",
training_ycc: "YCC",
training_itc: "ITC",
training_neg: "Neg",
training_unit: "↑",
training_unknown: "Entrenamiento desconocido",
training_ball_day: "Días para ganar una pelotita",
training_part: "Eficacia de entrenamiento",
training_total: "Total",
training_avg: "Avg",
training_now: "Ahora",
SkillsAnalysisTitle: "Skills y análisis de eficacia de entrenamiento coloreables al presionar: ALT + S",
SkillsAnalysis: "Coloreable por gráficos"
,
sug_T0: "Primera opción:",
sug_T1: "Segunda opción:",
sug_T2: "Podrías intentar:",
sug_T3: "Predeterminado:",
Pos9: "Centro defensor",
Pos7: "Arquero",
Pos10: "Delantero lateral",
Pos5: "Segundo delantero",
Pos4: "Centrocampista",
Pos56: "Miediocampista/Anchor",
sug_Loser: "Habilidades clave demasiado bajas. Intercambialo lo más antes posible.",
sug_PRI: "Orden de entrenamiento:",
attrName1: "Velocidad",
attrName2: "Resistencia",
attrName3: "Inteligencia",
attrName4: "Pases",
attrName5: "Remates",
attrName6: "Cabezazos",
attrName7: "Atajando",
attrName8: "Control de balón",
attrName9: "Entradas",
attrName10: "Pases Largos",
attrName11: "Balón Parado"
,
scoutReport: "REPORTE DE SCOUTEO"
}
,
br: {
Name: "Português",
Save: "Salvar",
Setting: "Configurações",
Test: "Teste",
SettingTitle: "Clique para configurar linguagem",
Language: "Linguagem",
XmlMode: "Exportar Modelo Tático",
XmlMode1: "Seleção Sequencial",
XmlMode2: "Escolha localização (precisa submeter dados ao servidor)",
TacConf: "Configuração de Coeficiente Tático",
AutoRun: "Auto Colorir",
AutoRun0: "Por página carregada(Uma vez)",
AutoRun1: "Recarregada do MZ",
NotSureEx: "Habilidades podem mudar depois de entrar no mercado de transferências.
Hora da mudança ",
NotSure: "Habilidade incerta",
ManualColorTitle: "Clique na habilidade colorida. Tecla de atalho: ALT + A",
ManualColor: "Habilidade colorida",
Jijing: "Eventos",
dongzuo: "Status do jogador",
Copyxml1: "Copiar XML(mandante)",
Copyxml2: "Copiar XML(visitante)",
CopyXmlMsg: "A tática foi copiada para a área de transferências!",
CopyXmlMsgError: "Erro na cópia!",
BA_NORMAL: "Normal",
BA_WALL: "Wall",
BA_HOLD: "Hold",
BA_DOWN: "Down",
BA_HOLD_THROWIN: "HoldThrowin",
BA_THROWIN: "Throwin",
BA_LEFT_FOOT_SHOT_FWD: "FootShot(L)",
BA_LEFT_FOOT_SHOT_BACK: "FootShotBack(L)",
BA_LEFT_FOOT_SHOT_RIGHT: "FootShotRight(L)",
BA_LEFT_FOOT_SHOT_LEFT: "FootShotLeft(L)",
BA_RIGHT_FOOT_SHOT_FWD: "FootShot(R)",
BA_RIGHT_FOOT_SHOT_BACK: "FootShotBack(R)",
BA_RIGHT_FOOT_SHOT_RIGHT: "FootShotRight(R)",
BA_RIGHT_FOOT_SHOT_LEFT: "FootShotLeft(R)",
BA_LEFT_FOOT_PASS_FWD: "FootPass(L)",
BA_LEFT_FOOT_PASS_BACK: "FootPassBack(L)",
BA_LEFT_FOOT_PASS_RIGHT: "FootPassRight(L)",
BA_LEFT_FOOT_PASS_LEFT: "FootPassLeft(L)",
BA_RIGHT_FOOT_PASS_FWD: "FootPass(R)",
BA_RIGHT_FOOT_PASS_BACK: "FootPassBack(R)",
BA_RIGHT_FOOT_PASS_RIGHT: "FootPassRight(R)",
BA_RIGHT_FOOT_PASS_LEFT: "FootPassLeft(R)",
BA_PICK_UP_BALL: "Pega a bola",
BA_DROP_BALL: "Deixa a bola",
BA_HEADER: "Cabeceio",
BA_TRIP: "Trip",
BA_CELEBRATE: "Celebração",
BA_GK_READY: "Goleiro pronto",
BA_GK_ACRO_LEFT: "GkAcroLeft",
BA_GK_ACRO_LEFT_HOLD: "GkAcroLeftHold",
BA_GK_ACRO_RIGHT: "GkAcroRight",
BA_GK_ACRO_RIGHT_HOLD: "GkAcroRightHold",
BA_GK_SIDESTEP_LEFT: "Goleiro dá passo à esquerda",
BA_GK_SIDESTEP_RIGHT: "Goleiro dá passo à direita",
BA_GK_KICK: "Goleiro chuta",
BA_GK_THROW_BALL: "GkThrowBall",
BA_GK_STRETCH_LEFT: "GkStretchLeft",
BA_GK_STRETCH_LEFT_HOLD: "GkStretchLeftHold",
BA_GK_STRETCH_RIGHT: "GkStretchRight",
BA_GK_STRETCH_RIGHT_HOLD: "GkStretchRightHold",
BA_BALL_OWNER: "Com a bola nos pés",
BA_TACKLE: "Desarme",
BA_SLIDING_TACKLE: "Carrinho",
BA_SLIDING_TACKLE_STAND: "SlidingTackleStand",
BA_MAX: "Max",
BA_MY_1001: "HeadGoal(L)",
BA_MY_1002: "HeadGoal(R)",
BA_MY_1003: "Pára a bola",
BA_MY_1011: "Desarme(Sucesso)",
BA_MY_1012: "Desarme(Falha)",
Unknown: "Desconhecido"
,
training_pos: "Sem treinador",
training_camp: "CAMP",
training_coach: "Coach",
training_ycc: "Ycc",
training_itc: "Itc",
training_neg: "Neg",
training_unit: "↑",
training_unknown: "Treinamento desconhecido",
training_ball_day: "Dias para ganhar bola",
training_part: "Eficiência de treinamento",
training_total: "Total",
training_avg: "Avg",
training_now: "Agora",
SkillsAnalysisTitle: "Tecla de atalho de Habilidades coloridas e Análise de Eficiência de treinamento: ALT + S",
SkillsAnalysis: "Colorir por gráficos"
,
sug_T0: "Primeira opção:",
sug_T1: "Segunda opção:",
sug_T2: "Pode tentar:",
sug_T3: "Padrão:",
Pos9: "Zagueiro central",
Pos7: "Goleiro",
Pos10: "Ponta",
Pos5: "Segundo atacante",
Pos4: "Meia Central",
Pos56: "Meio-campo/Volante",
sug_Loser: "Habilidades principais muito baixas. Troque ou dispense o mais breve possível.",
sug_PRI: "Ordem de treinamento:",
attrName1: "Velocidade",
attrName2: "Resistência",
attrName3: "Inteligência",
attrName4: "Passe Curto",
attrName5: "Chute",
attrName6: "Cabeceio",
attrName7: "Defesa a Gol",
attrName8: "Controle de Bola",
attrName9: "Desarme",
attrName10: "Passe Longo",
attrName11: "Bola Parada"
,
scoutReport: "Relatório de Observador"
}
};
var now_language = gm_mzlanguage.en;
var scoutLocList = { "9": { "Prop": { "1": 0, "2": 0, "9": 1, "10": 2, "8": 2, "3": 2, "4": 2, "6": 2 }, "Order": [1, 2, 9, 10, 8, 3, 4, 6], "CampKey": "9" }, "7": { "Prop": { "2": 0, "7": 1, "3": 1, "1": 1, "10": 2, "11": 2, "8": 2 }, "Order": [2, 7, 3, 1, 10, 11, 8], "CampKey": "7" }, "10": { "Prop": { "1": 0, "2": 0, "10": 1, "8": 1, "9": 2, "4": 2, "5": 2, "6": 2 }, "Order": [1, 2, 10, 8, 9, 4, 5, 6], "CampKey": "10" }, "5": { "Prop": { "1": 0, "2": 0, "5": 1, "8": 1, "6": 1, "3": 2, "4": 2, "10": 2, "9": 2 }, "Order": [1, 2, 5, 8, 6, 3, 4, 10, 9], "CampKey": "5" }, "4": { "Prop": { "1": 0, "2": 0, "4": 1, "8": 1, "3": 1, "10": 2, "9": 2, "5": 2, "6": 2 }, "Order": [1, 2, 4, 8, 3, 10, 9, 5, 6], "CampKey": "4" }, "5,6": { "Prop": { "2": 0, "1": 0, "5": 1, "6": 1, "8": 1, "3": 2, "4": 2, "10": 2, "9": 2 }, "Order": [2, 1, 5, 8, 6, 3, 4, 10, 9], "CampKey": "56" } };
var OKeys = ["9", "7", "10", "5", "4", "5,6"];
function CTable() {
//key value
this.data = {};
//keys
this.keys = new Array();
this.addData = function (key, value) {
if (this.data[key] == undefined) {
this.keys.push(key);
this.keys.sort(function (a, b) {
return a - b;
});
}
this.data[key] = value;
};
this.getVal = function (i) {
if (this.data[i] == undefined) {
//
} else {
return this.data[i];
}
};
this.GetX = function (i) {
let rv = this.getVal(i);
rv = Math.floor(rv * 214 / 1000) - 3;
return rv;
};
this.GetY = function (i) {
let rv = this.getVal(i);
rv = Math.floor(rv * 328 / 1000) - 1;
return rv;
};
}
function mzcamp() {
this.data = {};
this.name = null;
this.keys = new Array();
this.index = 0;
this.add = function (begin, end) {
if (end > begin + 2937600000) {
end = begin + 2937600000;
}
if (this.data[begin] == undefined) {
this.keys.push(begin);
this.keys.sort(function (a, b) {
return a - b;
});
}
this.data[begin] = {
begin: begin,
end: end
};
};
this.getItem = function (begin) {
return this.data[begin];
};
this.resetIndex = function () {
this.index = 0;
};
this.inYTC = function (x) {
while (this.index < this.keys.length) {
let item = this.data[this.keys[this.index]];
if (x < item.begin) {
return false;
} else if (x <= item.end) {
if (/\d/.test(item.name)) {
return false;
}
return true;
}
if (x > item.end) {
this.index++;
}
}
return false;
};
};
function playerTrainingBySkill() {
//涨球时间
this.ballDay = 0;
//训练统计
this.stat = new trainingStat();
//当前球数
this.skill = 0;
}
function trainingStat() {
//所有 不包含掉球
this.all = new trainingDay();
////普通训练 无教练
//this.pos = new trainingDay();
////强化营
//this.itc = new trainingDay();
////调整营
//this.ycc = new trainingDay();
////掉球
//this.neg = new trainingDay();
////理疗
//this.physio = new trainingDay();
////有教练
//this.coach = new trainingDay();
////训练营
//this.camp = new trainingDay();
//对某类型加1
this.add = function (type, tn) {
if (!this[type]) {
this[type] = new trainingDay();
}
this[type][tn] += 1;
};
this.getSum = function (canOver100) {
let ret = 0;
if (this.neg) {
ret = this.all.getSum() - this.neg.getSum();
} else {
ret = this.all.getSum();
}
if (!canOver100) {
if (ret >= 100) {
ret = 99.99;
}
}
return ret;
};
this.getAvg = function () {
//let ret = this.getSum() / (this.t1 * 1 + this.t2 * 1 + this.t3 * 1 + this.t4 * 1 + this.t5 * 1 + this.t6 * 1 + this.t7 * 1 + this.t8 * 1 + this.t9 * 1 + this.t10 * 1);
//ret = parseFloat(ret).toFixed(1);
//return ret;
return this.all.getAvg();
};
this.getTnText = function () {
let str = "";
if (this.pos) {
str += " " + now_language.training_pos + this.pos.getTnText();
}
if (this.camp) {
str += " " + now_language.training_camp + this.camp.getTnText();
}
if (this.coach) {
str += " " + now_language.training_coach + this.coach.getTnText();
}
if (this.ycc) {
str += " " + now_language.training_ycc + this.ycc.getTnText();
}
if (this.itc) {
str += " " + now_language.training_itc + this.itc.getTnText();
}
if (this.neg) {
str += " " + now_language.training_neg + this.neg.getTnText();
}
return str;
};
//this.getAvgAndText = function () {
// //let ret = this.getSum() / (this.t1 * 1 + this.t2 * 1 + this.t3 * 1 + this.t4 * 1 + this.t5 * 1 + this.t6 * 1 + this.t7 * 1 + this.t8 * 1 + this.t9 * 1 + this.t10 * 1);
// //ret = parseFloat(ret).toFixed(1);
// //return ret;
// let ret = this.getAvg();
// let str = "";
// if (ret <= 0.4) {
// str = "1格";
// }
// else if (ret > 0.4 && ret <= 1.1) {
// str = "2格";
// }
// else if (ret > 0.4 && ret <= 2.1) {
// str = "2格";
// }
// this.t1 * 0.4 * 1
// + this.t2 * 0.55 * 2
// + this.t3 * 0.7 * 3
// + this.t4 * 0.85 * 4
// + this.t5 * 1 * 5
// + this.t6 * 1.15 * 6
// + this.t7 * 1.3 * 7
// + this.t8 * 1.45 * 8
// + this.t9 * 1.6 * 9
// + this.t10 * 1.75 * 10;
//};
this.getDayByAvg = function (avg) {
let ret = (100 - this.getSum()) / avg;
ret = parseFloat(ret).toFixed(1);
return ret;
};
this.getDay = function () {
if (this.coach) {
return this.getDayByAvg(this.coach);
} else if (this.pos) {
return this.getDayByAvg(this.pos);
}
return undefined;
};
}
function trainingDay() {
this.t1 = 0;
this.t2 = 0;
this.t3 = 0;
this.t4 = 0;
this.t5 = 0;
this.t6 = 0;
this.t7 = 0;
this.t8 = 0;
this.t9 = 0;
this.t10 = 0;
this.getSum = function () {
let ret = this.t1 * 0.4 * 1 + this.t2 * 0.55 * 2 + this.t3 * 0.7 * 3 + this.t4 * 0.85 * 4 + this.t5 * 1 * 5 + this.t6 * 1.15 * 6 + this.t7 * 1.3 * 7 + this.t8 * 1.45 * 8 + this.t9 * 1.6 * 9 + this.t10 * 1.75 * 10;
ret = parseFloat(ret).toFixed(1);
return ret;
};
this.getAvg = function () {
let ret = this.getSum() / (this.t1 * 1 + this.t2 * 1 + this.t3 * 1 + this.t4 * 1 + this.t5 * 1 + this.t6 * 1 + this.t7 * 1 + this.t8 * 1 + this.t9 * 1 + this.t10 * 1);
ret = parseFloat(ret).toFixed(1);
return ret;
};
this.getTnText = function () {
let str = "";
if (this.t1 > 0) {
str += " 1" + now_language.training_unit + "(" + this.t1 + ")";
}
if (this.t2 > 0) {
str += " 2" + now_language.training_unit + "(" + this.t2 + ")";
}
if (this.t3 > 0) {
str += " 3" + now_language.training_unit + "(" + this.t3 + ")";
}
if (this.t4 > 0) {
str += " 4" + now_language.training_unit + "(" + this.t4 + ")";
}
if (this.t5 > 0) {
str += " 5" + now_language.training_unit + "(" + this.t5 + ")";
}
if (this.t6 > 0) {
str += " 6" + now_language.training_unit + "(" + this.t6 + ")";
}
if (this.t7 > 0) {
str += " 7" + now_language.training_unit + "(" + this.t7 + ")";
}
if (this.t8 > 0) {
str += " 8" + now_language.training_unit + "(" + this.t8 + ")";
}
if (this.t9 > 0) {
str += " 9" + now_language.training_unit + "(" + this.t9 + ")";
}
if (this.t10 > 0) {
str += " 10" + now_language.training_unit + "(" + this.t10 + ")";
}
return str;
};
}
var mzreg = {
img_val: /(\d+)\.gif/,
playerMax: /trainingField.players\s*=\s*({.+})/,
playerId: /player_id_(\d+)/,
bar_itc: /bar_itc_(\d+)/,
bar_ycc: /bar_ycc_(\d+)/,
bar_pos: /bar_pos_(\d+)/,
bar_neg: /bar_neg_(\d+)/,
trainingType: /&t=([^)]+)/,
data2d_url: /matchviewer\/media/,
shortlist_url: /\/?p=shortlist/,
ruok_url: /\/?p=team&tid=572357/
//data2d_url: /matchviewer\/getMatchFiles.php\?type=data&mid=\d+/
};
var mzImg = {
g: "data:image/gif;base64,R0lGODlhDAAKAJEDAP///8zM/wAA/////yH5BAEAAAMALAAAAAAMAAoAAAIk3CIpYZ0BABJtxvjMgojTIVwKpl0dCQbQJX3T+jpLNDXGlDUFADs=",
r: "data:image/gif;base64,R0lGODlhDAAKAJEDAP////8AAMyZmf///yH5BAEAAAMALAAAAAAMAAoAAAIk3BQZYp0CAAptxvjMgojTEVwKpl0dCQrQJX3T+jpLNDXGlDUFADs=",
b: "data:image/gif;base64,R0lGODlhDAAKAJEDAP///5mZmQAAAP///yH5BAEAAAMALAAAAAAMAAoAAAIk3CIpYZ0BABJtxvjMgojTIVwKpl0dCQbQJX3T+jpLNDXGlDUFADs=",
p: "data:image/gif;base64,R0lGODlhDAAKAJEDAP///5lm/5kzzP///yH5BAEAAAMALAAAAAAMAAoAAAIk3CIpYZ0BABJtxvjMgojTIVwKpl0dCQbQJX3T+jpLNDXGlDUFADs=",
x: "data:image/gif;base64,R0lGODlhBgAKAJEDAJnMZpmZmQAAAP///yH5BAEAAAMALAAAAAAGAAoAAAIRXCRhApAMgoPtVXXS2Lz73xUAOw=="
};
var pmax = {};
var isAjaxing = false;
var trainingInfo = {};
function clearCache(maxcount) {
let lists = GM_listValues();
let max = lists.length;
if (maxcount) {
max = maxcount;
} else if (lists.length > 100) {
max = 100;
}
for (let i = 0; i < lists.length; i++) {
let ts;
if (lists[i].startsWith("Dt_")) {
ts = GM_getValue(lists[i], -1);
let key = lists[i].substring(3);
if (ts != -1) {
let dt = new Date(ts);
let now = new Date();
if (now.getUTCFullYear() == dt.getUTCFullYear() && now.getUTCMonth() == dt.getUTCMonth() && now.getUTCDate() == dt.getUTCDate()) {
continue;
}
GM_deleteValue(lists[i]);
GM_deleteValue(key);
max--;
if (max <= 0) {
break;
}
}
}
}
}
function autoclearCache() {
let ts = GM_getValue("last_autoclear", 0);
let dt = new Date(ts);
let now = new Date();
if (now.getUTCFullYear() == dt.getUTCFullYear() && now.getUTCMonth() == dt.getUTCMonth() && (now.getUTCDate() - dt.getUTCDate()) < 3) {
return false;
} else {
clearCache(100);
GM_setValue("last_autoclear", now.getTime());
return true;
}
}
function myAjax(url, callback, cache_mode, Cjson) {
if (cache_mode == undefined) {
cache_mode = 2;
//0 不缓存每次都获取 1 缓存永不刷新 2 缓存每日刷新
}
if (cache_mode > 0) {
let b64 = getLocValue(url, cache_mode);
if (b64) {
let tdata;
if (b64.startsWith("H4sIAA")) {
if (Cjson) {
tdata = "9" + b64;
} else {
tdata = pako.ungzip(base64js.toByteArray(b64), { to: 'string' });
}
} else {
if (Cjson) {
tdata = "9" + base64js.fromByteArray(pako.gzip(b64));
} else {
tdata = b64;
}
}
if (callback(tdata, true)) {
clearCacheItem(url);
}
return;
}
}
$.ajax({
type: "GET",
url: url,
dataType: "html",
success: function (data) {
let b64 = base64js.fromByteArray(pako.gzip(data));
setLocValue(url, b64);
let ret = false;
if (Cjson) {
ret = callback("9" + b64, false);
} else {
ret = callback(data, false);
}
if (ret) {
clearCacheItem(url);
}
isAjaxing = false;
}
});
}
function getLocValue(key, cache_mode) {
if (cache_mode == 1) {
let b64 = GM_getValue(key, false);
if (b64) {
return b64;
}
return false;
} else {
let ts = GM_getValue("Dt_" + key, -1);
if (ts != -1) {
let dt = new Date(ts);
let now = new Date();
//let d = now.getTime() - dt.getTime();
if (now.getUTCFullYear() == dt.getUTCFullYear() && now.getUTCMonth() == dt.getUTCMonth() && now.getUTCDate() == dt.getUTCDate()) {
if (now.getUTCHours() >= 1 && now.getUTCHours() <= 22) {
//取缓存
} else if (now.getUTCHours() != dt.getUTCHours()) {
//每小时更新一次缓存
return false;
}
} else {
return false;
}
let b64 = GM_getValue(key, false);
if (b64) {
return b64;
}
return false;
} else {
return false;
}
}
}
function setLocValue(key, val) {
GM_setValue("Dt_" + key, new Date().getTime());
GM_setValue(key, val);
}
function clearCacheItem(key) {
GM_deleteValue("Dt_" + key);
GM_deleteValue(key);
}
function getMax(callback) {
myAjax(
"/?p=training",
function (data) {
let result = data.match(mzreg.playerMax);
if (result) {
pmax = JSON.parse(result[1]);
callback(pmax);
} else {
return true;
}
});
return false;
}
function setSrc(transfer, img, skill, maxed, skillBallDay, pid, k) {
img.skill = skill;
img.maxed = maxed;
if (skill > 0) {
let flag_exit = false;
if (transfer && skillBallDay) {
if (new Date().getTime() - skillBallDay < 345600000) {
getTrainingGraphsBySkill_id(pid, k, function (data) {
let result = data.match(new RegExp('{"x":' + skillBallDay + ',"y":(\\d+),[^}]*"marker"'));
if (result && result.length) {
$(img).parent().parent().find("td.skillval").html("(" + result[1] + ")");
setSrc(false, img, parseInt(result[1]), maxed, false, pid, k);
flag_exit = true;
return true;
} else {
return false;
}
});
//$(img).parent().find("span").remove();
//$(img).parent().append(" ");
}
}
if (flag_exit) {
return;
}
if (pid && trainingInfo[pid][k]) {
let extmp = $(img).parent().parent().find(".skill_exact2");
if (extmp.length > 0) {
extmp.remove();
}
let sum = 0;
if (trainingInfo[pid][k][skill]) {
sum = trainingInfo[pid][k][skill].stat.getSum();
}
$(img).parent().parent().append("
" + (flag ? str : "") + "