Last active
April 14, 2016 06:55
-
-
Save gozen-bro3/8968301 to your computer and use it in GitHub Desktop.
ブラウザ三国志用便利機能色々ごった煮
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name 3gokushi-Beyond | |
// @namespace 3gokushi-hatt | |
// @description ブラウザ三国志用便利機能色々ごった煮 | |
// @include http://*.3gokushi.jp/* | |
// @include http://mixi.jp/run_appli.pl?id=6598 | |
// @include http://*.mixi-platform.com/* | |
// @author 原作者hatt,編集者romer,etc... | |
// @version 2.0.48ο(オミクロン)+盾兵 | |
// @grant GM_addStyle | |
// @grant GM_deleteValue | |
// @grant GM_getValue | |
// @grant GM_listValues | |
// @grant GM_log | |
// @grant GM_setValue | |
// @grant GM_xmlhttpRequest | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js | |
// ==/UserScript== | |
// | |
// ver3.00 2014.01.31 最適化開始 - 2014.03.08 各種ツールをマージ。多数のロジック修正及び、既存バグ、挙動不審な処理を修正。 | |
// 2014.03.08 コメントが処理速度に影響しているため、各スクリプト書き出しのコメントを整理 | |
//================================================ | |
// 定数宣言一式 | |
//================================================ | |
var OPT_TRADESTATUS = 0; //34."トレードステータス表示" | |
// マップツール | |
var VERSION_1 = "2.39.d4ex3"; | |
var LOCAL_STORAGE_1 = "bro3_map_tool"; | |
var RADIUS = 25; //半径(中域) | |
var RADIUS_L = 125; //半径(広域) | |
var CELL_SIZE_M = 14; //中域地図の1マスサイズ(px) | |
var CELL_SIZE_L = 3; //広域地図の1マスサイズ(px) | |
var FONT_SIZE = "10px"; //中域地図のマス内文字サイズ | |
var HI_POWER = 4; //高☆領地基準 | |
var HI_POPUL = 600; //高人口拠点基準 | |
var MAX_XY = 700; //座標絶対値最大 | |
var DELIMIT_1 = "#$%"; | |
var DELIMIT2_1 = "&?@"; | |
var NPC_ALLY = "-"; | |
var CHECK_TIME = 500; //bro3_mixi_iframeheigt_resize | |
var IDX_VILLAGE_NAME = 0; //地名 | |
var IDX_USER_NAME = 1; //君主名 | |
var IDX_POPULATION = 2; //人口 | |
var IDX_ALLIANCER = 3; //同盟名 | |
var IDX_POWER = 4; //戦力 | |
var IDX_WOOD = 5; //森 | |
var IDX_STONE = 6; //岩 | |
var IDX_IRON = 7; //鉄 | |
var IDX_RICE = 8; //穀 | |
var IDX_NPC_FLG = 9; //NPCフラグ | |
var IDX_TIME_BEFORE = 10; | |
var IDX_USER_BEFORE = 11; | |
var IDX_ALLY_BEFORE = 12; | |
var IDX_LAST_UPDATE = 13; | |
var IDX_CAPITAL_FLG = 14; //本拠地フラグ | |
var IDX_ALLY_PARENT = 0; //親同盟 | |
var IDX_ALLY_CHILDREN = 1; //子同盟リスト | |
var IDX_ALLY_MEMBERS = 2; //同盟員リスト | |
var IDX_USER_VILLAGES = 0; //拠点リスト | |
var IDX_USER_ALLY = 1; //所属同盟 | |
var MAP_MODE_S = ""; //狭域地図 | |
var MAP_MODE_M = "1"; //中域地図 | |
var MAP_MODE_L = "2"; //広域地図 | |
var INPUT_MODE_NAME = "1"; //名称 | |
var INPUT_MODE_COLOR = "2"; //色 | |
var USER_COLORS_DEF = new Array( | |
"#0000a0", "#a00000", "#00a000", "#808000", "#008080","#505050", "#505050", "#505050", "#505050", "#505050", | |
"#0000a0", "#a00000", "#00a000", "#808000", "#008080","#505050", "#505050", "#505050", "#505050", "#505050", | |
"#0000a0", "#a00000", "#00a000", "#808000", "#008080","#505050", "#505050", "#505050", "#505050", "#505050" | |
); | |
var ALLY_COLORS_DEF = new Array( | |
"#a0a0ff", "#ffa0a0", "#a0ffa0", "#ffff80", "#80ffff","#ff80ff", "#40c0ff", "#ffc040", "#c0ff40", "#b0b0b0", | |
"#a0a0ff", "#ffa0a0", "#a0ffa0", "#ffff80", "#80ffff","#ff80ff", "#40c0ff", "#ffc040", "#c0ff40", "#b0b0b0", | |
"#a0a0ff", "#ffa0a0", "#a0ffa0", "#ffff80", "#80ffff","#ff80ff", "#40c0ff", "#ffc040", "#c0ff40", "#b0b0b0" | |
); | |
var NPC_COLOR = "purple"; | |
var ETC_COLOR = "lightgrey"; | |
var MINPEI = [ | |
[1,"★" ,"森1 岩0 鉄0 穀0" , 5 , 0 , 0 , 0 , 0 , 0 , 0 ], | |
[1,"★" ,"森0 岩1 鉄0 穀0" , 5 , 0 , 0 , 0 , 0 , 0 , 0 ], | |
[1,"★" ,"森0 岩0 鉄1 穀0" , 5 , 0 , 0 , 0 , 0 , 0 , 0 ], | |
[1,"★" ,"森0 岩0 鉄0 穀1" , 5 , 0 , 0 , 0 , 0 , 0 , 0 ], | |
[1,"★★" ,"森3 岩0 鉄0 穀0" , 0 , 0.5 , 4 , 0.5 , 0 , 0 , 0 ], | |
[1,"★★" ,"森0 岩3 鉄0 穀0" , 0 , 4 , 0.5 , 0.5 , 0 , 0 , 0 ], | |
[1,"★★" ,"森0 岩0 鉄3 穀0" , 0 , 0.5 , 0.5 , 4 , 0 , 0 , 0 ], | |
[1,"★★★" ,"森1 岩1 鉄1 穀0" , 0 , 6 , 6 , 6 , 0 , 0 , 0 ], | |
[1,"★★★" ,"森0 岩0 鉄0 穀4" , 0 , 7.5 , 7.5 , 7.5 , 0 , 0 , 0 ], | |
[1,"★★★★" ,"森2 岩2 鉄2 穀0" , 0 , 12.5 , 12.5 , 12.5 , 0 , 0 , 0 ], | |
[1,"★★★★" ,"森0 岩0 鉄0 穀8" , 0 , 12.5 , 12.5 , 12.5 , 0 , 0 , 0 ], | |
[1,"★★★★" ,"森2 岩2 鉄2 穀2" , 0 , 11 , 11 , 11 , 0 , 0 , 0 ], | |
[1,"★★★★★" ,"森6 岩0 鉄0 穀0" , 0 , 10 , 40 , 10 , 0 , 0 , 0 ], | |
[1,"★★★★★" ,"森0 岩6 鉄0 穀0" , 0 , 40 , 10 , 10 , 0 , 0 , 0 ], | |
[1,"★★★★★" ,"森0 岩0 鉄6 穀0" , 0 , 10 , 10 , 40 , 0 , 0 , 0 ], | |
[1,"★★★★★★" ,"森10 岩0 鉄0 穀0", 0 , 75 , 15 , 15 , 0 , 0 , 0 ], | |
[1,"★★★★★★" ,"森0 岩10 鉄0 穀0", 0 , 15 , 75 , 15 , 0 , 0 , 0 ], | |
[1,"★★★★★★" ,"森0 岩0 鉄10 穀0", 0 , 15 , 15 , 75 , 0 , 0 , 0 ], | |
[1,"★★★★★★★" ,"森3 岩3 鉄3 穀0" , 0 , 0 , 0 , 0 , 50 , 50 , 50 ], | |
[1,"★★★★★★★★" ,"森4 岩4 鉄4 穀4" , 0 , 0 , 0 , 0 , 100 , 100 , 100 ], | |
[1,"★★★★★★★★★","森0 岩0 鉄0 穀18", 0 , 0 , 0 , 0 , 150 , 150 , 150 ] | |
, | |
[2,"★" ,"森1 岩0 鉄0 穀0", 5 , 0 , 0 , 0 , 0 , 0 , 0 ], | |
[2,"★" ,"森0 岩1 鉄0 穀0", 5 , 0 , 0 , 0 , 0 , 0 , 0 ], | |
[2,"★" ,"森0 岩0 鉄1 穀0", 5 , 0 , 0 , 0 , 0 , 0 , 0 ], | |
[2,"★" ,"森0 岩0 鉄0 穀1", 5 , 0 , 0 , 0 , 0 , 0 , 0 ], | |
[2,"★★" ,"森3 岩0 鉄0 穀0", 0 , 0.5 , 6 , 0.5 , 0 , 0 , 0 ], | |
[2,"★★" ,"森0 岩3 鉄0 穀0", 0 , 6 , 0.5 , 0.5 , 0 , 0 , 0 ], | |
[2,"★★" ,"森0 岩0 鉄3 穀0", 0 , 0.5 , 0.5 , 6 , 0 , 0 , 0 ], | |
[2,"★★★" ,"森1 岩1 鉄1 穀0", 0 , 7.5 , 7.5 , 7.5 , 0 , 0 , 0 ], | |
[2,"★★★" ,"森0 岩0 鉄0 穀4", 0 , 17 , 3 , 3 , 0 , 0 , 0 ], | |
[2,"★★★" ,"森0 岩0 鉄0 穀1", 0 , 3 , 17 , 3 , 0 , 0 , 0 ], | |
[2,"★★★★" ,"森2 岩2 鉄2 穀0", 0 , 14 , 14 , 14 , 0 , 0 , 0 ], | |
[2,"★★★★" ,"森2 岩2 鉄2 穀0", 0 , 5 , 5 , 35 , 0 , 0 , 0 ], | |
[2,"★★★★" ,"森0 岩0 鉄0 穀8", 0 , 15 , 15 , 15 , 0 , 0 , 0 ], | |
[2,"★★★★★" ,"森6 岩0 鉄0 穀0", 0 , 12.5 , 65 , 12.5 , 0 , 0 , 0 ], | |
[2,"★★★★★" ,"森0 岩6 鉄0 穀0", 0 , 65 , 12.5 , 12.5 , 0 , 0 , 0 ], | |
[2,"★★★★★" ,"森0 岩0 鉄6 穀0", 0 , 12.5 , 12.5 , 65 , 0 , 0 , 0 ], | |
[2,"★★★★★" ,"森0 岩0 鉄0 穀1", 0 , 30 , 30 , 30 , 0 , 0 , 0 ], | |
[2,"★★★★★★" ,"森2 岩2 鉄2 穀0", 0 , 0 , 0 , 0 , 27.5 , 27.5 , 27.5 ], | |
[2,"★★★★★★" ,"森10 岩0 鉄0 穀0", 0 , 0 , 0 , 0 , 12.5 , 60 , 12.5 ], | |
[2,"★★★★★★" ,"森0 岩10 鉄0 穀0", 0 , 0 , 0 , 0 , 60 , 12.5 , 12.5 ], | |
[2,"★★★★★★" ,"森0 岩0 鉄10 穀0", 0 , 0 , 0 , 0 , 12.5 , 12.5 , 60 ], | |
[2,"★★★★★★★" ,"森2 岩4 鉄4 穀0", 0 , 0 , 0 , 0 , 65 , 22.5 , 65 ], | |
[2,"★★★★★★★" ,"森0 岩0 鉄0 穀1", 0 , 0 , 0 , 0 , 65 , 65 , 22.5 ], | |
[2,"★★★★★★★" ,"森0 岩0 鉄0 穀12", 0 , 0 , 0 , 0 , 22.5 , 65 , 65 ], | |
[2,"★★★★★★★★" ,"森4 岩1 鉄2 穀0", 0 , 0 , 0 , 0 , 50 , 250 , 25 ], | |
[2,"★★★★★★★★" ,"森2 岩4 鉄1 穀0", 0 , 0 , 0 , 0 , 250 , 50 , 25 ], | |
[2,"★★★★★★★★" ,"森1 岩2 鉄4 穀0", 0 , 0 , 0 , 0 , 25 , 50 , 250 ], | |
[2,"★★★★★★★★★","森4 岩4 鉄4 穀4", 0 , 0 , 0 , 0 , 200 , 200 , 200 ], | |
[2,"★★★★★★★★★","森1 岩1 鉄1 穀2", 0 , 0 , 0 , 0 , 190 , 190 , 190 ], | |
[2,"★★★★★★★★★","森0 岩0 鉄0 穀18", 0 , 0 , 0 , 0 , 175 , 175 , 175 ] | |
, | |
[3,"★", "森1 岩0 鉄0 穀0", 5 , 0 , 0 , 0 , 0 , 0 , 0 ], | |
[3,"★", "森0 岩1 鉄0 穀0", 5 , 0 , 0 , 0 , 0 , 0 , 0 ], | |
[3,"★", "森0 岩0 鉄1 穀0", 5 , 0 , 0 , 0 , 0 , 0 , 0 ], | |
[3,"★", "森0 岩0 鉄0 穀1", 5 , 0 , 0 , 0 , 0 , 0 , 0 ], | |
[3,"★★", "森3 岩0 鉄0 穀0", 0 , 0.5 , 10 , 0.5 , 0 , 0 , 0 ], | |
[3,"★★", "森0 岩3 鉄0 穀0", 0 , 10 , 0.5 , 0.5 , 0 , 0 , 0 ], | |
[3,"★★", "森0 岩0 鉄3 穀0", 0 , 0.5 , 0.5 , 10 , 0 , 0 , 0 ], | |
[3,"★★★", "森1 岩1 鉄1 穀0", 0 , 9 , 9 , 9 , 0 , 0 , 0 ], | |
[3,"★★★", "森0 岩0 鉄0 穀4", 0 , 20 , 6 , 6 , 0 , 0 , 0 ], | |
[3,"★★★", "森0 岩0 鉄0 穀1", 0 , 7 , 22 , 7 , 0 , 0 , 0 ], | |
[3,"★★★★", "森2 岩2 鉄2 穀0", 0 , 16 , 16 , 16 , 0 , 0 , 0 ], | |
[3,"★★★★", "森2 岩2 鉄2 穀0", 0 , 7.5 , 7.5 , 35 , 0 , 0 , 0 ], | |
[3,"★★★★", "森0 岩0 鉄0 穀8", 0 , 19 , 19 , 19 , 0 , 0 , 0 ], | |
[3,"★★★★★", "森6 岩0 鉄0 穀0", 0 , 12.5 , 75 , 12.5 , 0 , 0 , 0 ], | |
[3,"★★★★★", "森0 岩6 鉄0 穀0", 0 , 75 , 12.5 , 12.5 , 0 , 0 , 0 ], | |
[3,"★★★★★", "森0 岩0 鉄6 穀0", 0 , 12.5 , 12.5 , 75 , 0 , 0 , 0 ], | |
[3,"★★★★★", "森0 岩0 鉄0 穀1", 0 , 32.5 , 32.5 , 32.5 , 0 , 0 , 0 ], | |
[3,"★★★★★", "森2 岩2 鉄1 穀0", 0 , 35 , 35 , 35 , 0 , 0 , 0 ], | |
[3,"★★★★★", "森1 岩1 鉄2 穀0", 0 , 37.5 , 37.5 , 37.5 , 0 , 0 , 0 ], | |
[3,"★★★★★★", "森10 岩0 鉄0 穀0", 0 , 0 , 0 , 0 , 20 , 90 , 20 ], | |
[3,"★★★★★★", "森0 岩10 鉄0 穀0", 0 , 0 , 0 , 0 , 90 , 20 , 20 ], | |
[3,"★★★★★★", "森0 岩0 鉄10 穀0", 0 , 0 , 0 , 0 , 20 , 20 , 90 ], | |
[3,"★★★★★★", "森2 岩2 鉄2 穀0", 0 , 0 , 0 , 0 , 40 , 40 , 40 ], | |
[3,"★★★★★★★", "森2 岩4 鉄4 穀0", 0 , 0 , 0 , 0 , 110 , 30 , 30 ], | |
[3,"★★★★★★★", "森0 岩0 鉄0 穀1", 0 , 0 , 0 , 0 , 110 , 110 , 30 ], | |
[3,"★★★★★★★", "森0 岩0 鉄0 穀12", 0 , 0 , 0 , 0 , 30 , 110 , 30 ], | |
[3,"★★★★★★★★", "森14 岩0 鉄0 穀0", 0 , 0 , 0 , 0 , 250 , 75 , 75 ], | |
[3,"★★★★★★★★", "森0 岩14 鉄0 穀0", 0 , 0 , 0 , 0 , 75 , 250 , 75 ], | |
[3,"★★★★★★★★", "森0 岩0 鉄14 穀0", 0 , 0 , 0 , 0 , 75 , 75 , 250 ], | |
[3,"★★★★★★★★", "森4 岩1 鉄2 穀0", 0 , 0 , 0 , 0 , 50 , 250 , 25 ], | |
[3,"★★★★★★★★", "森2 岩4 鉄1 穀0", 0 , 0 , 0 , 0 , 250 , 50 , 25 ], | |
[3,"★★★★★★★★", "森1 岩2 鉄4 穀0", 0 , 0 , 0 , 0 , 25 , 50 , 250 ], | |
[3,"★★★★★★★★★","森1 岩0 鉄0 穀0", 0 , 0 , 0 , 0 , 150 , 300 , 150 ], | |
[3,"★★★★★★★★★","森0 岩1 鉄0 穀0", 0 , 0 , 0 , 0 , 300 , 150 , 150 ], | |
[3,"★★★★★★★★★","森0 岩0 鉄1 穀0", 0 , 0 , 0 , 0 , 150 , 150 , 300 ], | |
[3,"★★★★★★★★★","森4 岩4 鉄4 穀4", 0 , 0 , 0 , 0 , 300 , 300 , 300 ], | |
[3,"★★★★★★★★★","森1 岩1 鉄1 穀2", 0 , 0 , 0 , 0 , 250 , 250 , 250 ], | |
[3,"★★★★★★★★★","森0 岩0 鉄0 穀18", 0 , 0 , 0 , 0 , 200 , 200 , 200 ] | |
, | |
[4,"★" ,"森1 岩0 鉄0 穀0" , 5 , 0 , 0 , 0 , 0, 0 , 0], | |
[4,"★" ,"森0 岩1 鉄0 穀0" , 5 , 0 , 0 , 0 , 0, 0 , 0], | |
[4,"★" ,"森0 岩0 鉄1 穀0" , 5 , 0 , 0 , 0 , 0, 0 , 0], | |
[4,"★" ,"森0 岩0 鉄0 穀1" , 5 , 0 , 0 , 0 , 0, 0 , 0], | |
[4,"★★" ,"森3 岩0 鉄0 穀0" , 0 , 1 , 12.5, 1 , 0, 0 , 0], | |
[4,"★★" ,"森0 岩3 鉄0 穀0" , 0 , 12.5, 1 , 1 , 0, 0 , 0], | |
[4,"★★" ,"森0 岩0 鉄3 穀0" , 0 , 1 , 1 , 12.5, 0, 0 , 0], | |
[4,"★★★" ,"森1 岩1 鉄1 穀0" , 0 , 15 , 15 , 15 , 0, 0 , 0], | |
[4,"★★★" ,"森0 岩0 鉄0 穀4" , 0 , 25 , 12 , 12 , 0, 0 , 0], | |
[4,"★★★" ,"森0 岩0 鉄0 穀1" , 0 , 13 , 25 , 13 , 0, 0 , 0], | |
[4,"★★★★" ,"森2 岩2 鉄2 穀0" , 0 , 33 , 33 , 33 , 0, 0 , 0], | |
[4,"★★★★" ,"森2 岩2 鉄2 穀0" , 0 , 30 , 30 , 45 , 0, 0 , 0], | |
[4,"★★★★" ,"森0 岩0 鉄0 穀8" , 0 , 36 , 36 , 36 , 0, 0 , 0], | |
[4,"★★★★★" ,"森6 岩0 鉄0 穀0" , 0 , 33 , 111 , 33 , 0, 0 , 0], | |
[4,"★★★★★" ,"森0 岩6 鉄0 穀0" , 0 ,111 , 33 , 33 , 0, 0 , 0], | |
[4,"★★★★★" ,"森0 岩0 鉄6 穀0" , 0 , 33 , 33 ,111 , 0, 0 , 0], | |
[4,"★★★★★" ,"森0 岩0 鉄0 穀1" , 0 , 55 , 55 , 55 , 0, 0 , 0], | |
[4,"★★★★★" ,"森2 岩2 鉄1 穀0" , 0 , 60 , 60 , 60 , 0, 0 , 0], | |
[4,"★★★★★" ,"森1 岩1 鉄2 穀0" , 0 , 70 , 70 , 70 , 0, 0 , 0], | |
[4,"★★★★★★" ,"森10 岩0 鉄0 穀0", 0 , 0 , 0 , 0 , 50, 180 , 50], | |
[4,"★★★★★★" ,"森0 岩10 鉄0 穀0", 0 , 0 , 0 , 0 ,180, 50 , 50], | |
[4,"★★★★★★" ,"森0 岩0 鉄10 穀0", 0 , 0 , 0 , 0 , 50, 50 ,180], | |
[4,"★★★★★★" ,"森2 岩2 鉄2 穀0" , 0 , 0 , 0 , 0 , 85, 85 , 85], | |
[4,"★★★★★★★" ,"森2 岩4 鉄4 穀0" , 0 , 0 , 0 , 0 ,220, 110 ,110], | |
[4,"★★★★★★★" ,"森0 岩0 鉄0 穀1" , 0 , 0 , 0 , 0 ,110, 110 ,220], | |
[4,"★★★★★★★" ,"森0 岩0 鉄0 穀12", 0 , 0 , 0 , 0 ,110, 220 ,110], | |
[4,"★★★★★★★★" ,"森14 岩0 鉄0 穀0", 0 , 0 , 0 , 0 ,175, 400 ,175], | |
[4,"★★★★★★★★" ,"森0 岩14 鉄0 穀0", 0 , 0 , 0 , 0 ,400, 175 ,175], | |
[4,"★★★★★★★★" ,"森0 岩0 鉄14 穀0", 0 , 0 , 0 , 0 ,175, 175 ,400], | |
[4,"★★★★★★★★" ,"森4 岩1 鉄2 穀0" , 0 , 0 , 0 , 0 ,200, 350 ,100], | |
[4,"★★★★★★★★" ,"森2 岩4 鉄1 穀0" , 0 , 0 , 0 , 0 ,350, 200 ,100], | |
[4,"★★★★★★★★" ,"森1 岩2 鉄4 穀0" , 0 , 0 , 0 , 0 ,100, 200 ,350], | |
[4,"★★★★★★★★★","森1 岩0 鉄0 穀0" , 0 , 0 , 0 , 0 ,400, 600 ,400], | |
[4,"★★★★★★★★★","森0 岩1 鉄0 穀0" , 0 , 0 , 0 , 0 ,600, 400 ,400], | |
[4,"★★★★★★★★★","森0 岩0 鉄1 穀0" , 0 , 0 , 0 , 0 ,400, 400 ,600], | |
[4,"★★★★★★★★★","森4 岩4 鉄4 穀4" , 0 , 0 , 0 , 0 ,450, 450 ,450], | |
[4,"★★★★★★★★★","森1 岩1 鉄1 穀2" , 0 , 0 , 0 , 0 ,400, 400 ,400], | |
[4,"★★★★★★★★★","森0 岩0 鉄0 穀18", 0 , 0 , 0 , 0 ,350, 350 ,350] | |
, | |
[5,"★" ,"森1 岩0 鉄0 穀0" , 6.5 , 0 , 0 , 0 , 0, 0 , 0], | |
[5,"★" ,"森0 岩1 鉄0 穀0" , 6.5 , 0 , 0 , 0 , 0, 0 , 0], | |
[5,"★" ,"森0 岩0 鉄1 穀0" , 6.5 , 0 , 0 , 0 , 0, 0 , 0], | |
[5,"★" ,"森0 岩0 鉄0 穀1" , 6.5 , 0 , 0 , 0 , 0, 0 , 0], | |
[5,"★★" ,"森0 岩0 鉄3 穀0" , 0 , 1.5 , 1.5 , 15.5 , 0, 0 , 0], | |
[5,"★★" ,"森0 岩3 鉄0 穀0" , 0 , 15.5 , 1.5 , 1.5 , 0, 0 , 0], | |
[5,"★★" ,"森3 岩0 鉄0 穀0" , 0 , 1.5 , 15.5 , 1.5 , 0, 0 , 0], | |
[5,"★★★" ,"森0 岩0 鉄0 穀1" , 0 , 20.5 , 20.5 , 20.5 , 0, 0 , 0], | |
[5,"★★★" ,"森0 岩0 鉄0 穀4" , 0 , 51 , 3 , 3 , 0, 0 , 0], | |
[5,"★★★" ,"森1 岩1 鉄1 穀0" , 0 , 19 , 19 , 19 , 0, 0 , 0], | |
[5,"★★★★" ,"森0 岩0 鉄0 穀8" , 0 , 7 , 110.5 , 7 , 0, 0 , 0], | |
[5,"★★★★" ,"森2 岩2 鉄2 穀0" , 0 , 41.5 , 41.5 , 41.5 , 0, 0 , 0], | |
[5,"★★★★" ,"森2 岩2 鉄2 穀2" , 0 , 43.5 , 43.5 , 43.5 , 0, 0 , 0], | |
[5,"★★★★★" ,"森0 岩0 鉄0 穀1" , 0 , 75.5 , 75.5 , 75.5 , 0, 0 , 0], | |
[5,"★★★★★" ,"森0 岩0 鉄6 穀0" , 0 , 41.5 , 41.5 , 139 , 0, 0 , 0], | |
[5,"★★★★★" ,"森0 岩6 鉄0 穀0" , 0 , 139 , 41.5 , 41.5 , 0, 0 , 0], | |
[5,"★★★★★" ,"森6 岩0 鉄0 穀0" , 0 , 41.5 , 139 , 41.5 , 0, 0 , 0], | |
[5,"★★★★★" ,"森1 岩1 鉄1 穀1" , 0 , 69 , 69 , 69 , 0, 0 , 0], | |
[5,"★★★★★★" ,"森0 岩0 鉄10 穀0" , 0 , 0 , 0 , 0 , 62.5, 62.5 , 225], | |
[5,"★★★★★★" ,"森0 岩10 鉄0 穀0" , 0 , 0 , 0 , 0 , 225, 62.5 , 62.5], | |
[5,"★★★★★★" ,"森10 岩0 鉄0 穀0" , 0 , 0 , 0 , 0 , 62.5, 225 , 62.5], | |
[5,"★★★★★★" ,"森2 岩2 鉄2 穀0" , 0 , 0 , 0 , 0 , 106, 106 , 106], | |
[5,"★★★★★★★" ,"森0 岩0 鉄0 穀1" , 0 , 0 , 0 , 0 , 183, 183 , 183], | |
[5,"★★★★★★★" ,"森0 岩0 鉄0 穀11" , 0 , 0 , 0 , 0 , 30.5, 30.5 , 489], | |
[5,"★★★★★★★" ,"森2 岩4 鉄4 穀0" , 0 , 0 , 0 , 0 , 220, 110 , 220], | |
[5,"★★★★★★★" ,"森4 岩2 鉄4 穀0" , 0 , 0 , 0 , 0 , 110, 220 , 220], | |
[5,"★★★★★★★" ,"森4 岩4 鉄2 穀0" , 0 , 0 , 0 , 0 , 220, 220 , 110], | |
[5,"★★★★★★★★" ,"森0 岩0 鉄0 穀1" , 0 , 0 , 0 , 0 , 547, 136.5 , 136.5], | |
[5,"★★★★★★★★" ,"森1 岩1 鉄1 穀4" , 0 , 0 , 0 , 0 , 118, 351 , 351], | |
[5,"★★★★★★★★" ,"森3 岩3 鉄4 穀0" , 0 , 0 , 0 , 0 , 246, 246 , 324], | |
[5,"★★★★★★★★" ,"森3 岩4 鉄3 穀0" , 0 , 0 , 0 , 0 , 324, 246 , 246], | |
[5,"★★★★★★★★" ,"森4 岩3 鉄3 穀0" , 0 , 0 , 0 , 0 , 246, 324 , 246], | |
[5,"★★★★★★★★★" ,"森0 岩0 鉄0 穀16" , 0 , 0 , 0 , 0 , 291.5, 291.5 , 1167], | |
[5,"★★★★★★★★★" ,"森1 岩1 鉄1 穀0" , 0 , 0 , 0 , 0 , 583, 583 , 583], | |
[5,"★★★★★★★★★" ,"森0 岩8 鉄8 穀0" , 0 , 0 , 0 , 0 , 750, 250 , 750], | |
[5,"★★★★★★★★★" ,"森8 岩0 鉄8 穀0" , 0 , 0 , 0 , 0 , 250, 750 , 750], | |
[5,"★★★★★★★★★" ,"森8 岩8 鉄0 穀0" , 0 , 0 , 0 , 0 , 750, 750 , 250] | |
, | |
[6,"★" ,"森2 岩0 鉄0 穀0" , 6.5 , 0 , 0 , 0 , 0, 0 , 0], | |
[6,"★" ,"森0 岩2 鉄0 穀0" , 6.5 , 0 , 0 , 0 , 0, 0 , 0], | |
[6,"★" ,"森0 岩0 鉄2 穀0" , 6.5 , 0 , 0 , 0 , 0, 0 , 0], | |
[6,"★" ,"森0 岩0 鉄0 穀2" , 6.5 , 0 , 0 , 0 , 0, 0 , 0], | |
[6,"★★" ,"森3 岩0 鉄0 穀0" , 0 , 1.5 , 15.5 , 1.5 , 0, 0 , 0], | |
[6,"★★" ,"森0 岩3 鉄0 穀0" , 0 , 15.5 , 1.5 , 1.5 , 0, 0 , 0], | |
[6,"★★" ,"森0 岩0 鉄3 穀0" , 0 , 1.5 , 1.5 , 15.5 , 0, 0 , 0], | |
[6,"★★★" ,"森0 岩0 鉄0 穀1" , 0 , 18.5 , 18.5 , 18.5 , 0, 0 , 0], | |
[6,"★★★" ,"森1 岩1 鉄1 穀0" , 0 , 19 , 19 , 19 , 0, 0 , 0], | |
[6,"★★★" ,"森1 岩1 鉄1 穀1" , 0 , 20.5 , 20.5 , 20.5 , 0, 0 , 0], | |
[6,"★★★★" ,"森2 岩2 鉄2 穀2" , 0 , 41.5 , 41.5 , 41.5 , 0, 0 , 0], | |
[6,"★★★★" ,"森0 岩0 鉄0 穀8" , 0 , 41.5 , 41.5 , 41.5 , 0, 0 , 0], | |
[6,"★★★★" ,"森1 岩1 鉄1 穀1" , 0 , 43.5 , 43.5 , 43.5 , 0, 0 , 0], | |
[6,"★★★★" ,"森2 岩2 鉄2 穀0" , 0 , 40.5 , 40.5 , 40.5 , 0, 0 , 0], | |
[6,"★★★★★" ,"森6 岩0 鉄0 穀0" , 0 , 41.5 , 139 , 41.5 , 0, 0 , 0], | |
[6,"★★★★★" ,"森0 岩6 鉄0 穀0" , 0 , 139 , 41.5 , 41.5 , 0, 0 , 0], | |
[6,"★★★★★" ,"森0 岩0 鉄6 穀0" , 0 , 41.5 , 41.5 , 139 , 0, 0 , 0], | |
[6,"★★★★★" ,"森1 岩1 鉄1 穀1" , 0 , 69 , 69 , 69 , 0, 0 , 0], | |
[6,"★★★★★" ,"森0 岩0 鉄0 穀1" , 0 , 75.5 , 75.5 , 75.5 , 0, 0 , 0], | |
[6,"★★★★★★" ,"森10 岩0 鉄0 穀0" , 0 , 0 , 0 , 0 , 62.5, 225 , 62.5], | |
[6,"★★★★★★" ,"森0 岩10 鉄0 穀0" , 0 , 0 , 0 , 0 , 225, 62.5 , 62.5], | |
[6,"★★★★★★" ,"森0 岩0 鉄10 穀0" , 0 , 0 , 0 , 0 , 62.5, 62.5 , 225], | |
[6,"★★★★★★" ,"森0 岩0 鉄0 穀0" , 0 , 0 , 0 , 0 , 106.5, 106.5 , 106.5], | |
[6,"★★★★★★★" ,"森2 岩4 鉄4 穀0" , 0 , 0 , 0 , 0 , 220, 110 , 220], | |
[6,"★★★★★★★" ,"森4 岩2 鉄4 穀0" , 0 , 0 , 0 , 0 , 110, 220 , 220], | |
[6,"★★★★★★★" ,"森4 岩4 鉄2 穀0" , 0 , 0 , 0 , 0 , 220, 220 , 110], | |
[6,"★★★★★★★" ,"森0 岩0 鉄0 穀12" , 0 , 0 , 0 , 0 , 183.5, 183.5 , 183.5], | |
[6,"★★★★★★★" ,"森0 岩0 鉄0 穀0" , 0 , 0 , 0 , 0 , 183.5, 183.5 , 183.5], | |
[6,"★★★★★★★★" ,"森5 岩4 鉄4 穀2" , 0 , 0 , 0 , 0 , 246, 324 , 246], | |
[6,"★★★★★★★★" ,"森4 岩5 鉄4 穀2" , 0 , 0 , 0 , 0 , 324, 246 , 246], | |
[6,"★★★★★★★★" ,"森4 岩4 鉄5 穀2" , 0 , 0 , 0 , 0 , 246, 246 , 324], | |
[6,"★★★★★★★★" ,"森0 岩0 鉄0 穀15" , 0 , 0 , 0 , 0 , 325, 325 , 325], | |
[6,"★★★★★★★★" ,"森0 岩0 鉄0 穀0" , 0 , 0 , 0 , 0 , 350, 350 , 350], | |
[6,"★★★★★★★★★" ,"森7 岩0 鉄0 穀4" , 0 , 0 , 0 , 0 , 425, 900 , 425], | |
[6,"★★★★★★★★★" ,"森0 岩7 鉄0 穀4" , 0 , 0 , 0 , 0 , 900, 425 , 425], | |
[6,"★★★★★★★★★" ,"森0 岩0 鉄7 穀4" , 0 , 0 , 0 , 0 , 425, 425 , 900], | |
[6,"★★★★★★★★★" ,"森3 岩3 鉄3 穀3" , 0 , 0 , 0 , 0 , 625, 625 , 625], | |
[6,"★★★★★★★★★" ,"森0 岩0 鉄0 穀0" , 0 , 0 , 0 , 0 , 665, 665 , 665] | |
]; | |
var SPEC = [ | |
[ 15, 10, 10, 10, 15], //剣兵 | |
[ 50, 40, 25, 55, 40], //槍兵 | |
[ 52, 58, 42, 26, 42], //弓兵 | |
[ 54, 28, 60, 44, 44], //騎兵 | |
[200,100, 63,137,100], //矛槍兵 | |
[208,145,105, 65,105], //弩兵 | |
[216, 70,150,110,110] //近衛騎兵 | |
]; | |
var CSV_RADIUS_S = 25; //半径S | |
var CSV_RADIUS_L = 100; //半径L | |
var CSV_RADIUS_LL = 600; //半径L | |
var USERS; //君主名 | |
var ALLYS; //同盟名 | |
var USER_COLORS; //君主色 | |
var ALLY_COLORS; //同盟色 | |
var CENTER_X; //中心X座標 | |
var CENTER_Y; //中心Y座標 | |
var MY_X = 0; //自拠点X座標 | |
var MY_Y = 0; //自拠点Y座標 | |
var BASE_TIME = ""; //基準時刻 | |
var MAP_MODE = MAP_MODE_S; //地図モード(狭域/中域/広域) | |
var INPUT_MODE = INPUT_MODE_NAME; //入力モード(名称/色) | |
var DISP_NPC_YET = false; //未攻略NPC表示フラグ | |
var DISP_NPC_FALLEN = false; //攻略済NPC表示フラグ | |
var DISP_PERIOD1 = true; //期数 | |
var DISP_PERIOD2 = false; //期数 | |
var DISP_PERIOD3 = false; //期数 | |
var DISP_PERIOD4 = false; //期数 | |
var DISP_PERIOD5 = false; //期数 | |
var DISP_PERIOD6 = false; //期数 | |
var DISP_COMPROMISE = 100; //妥協点 | |
var DISP_MATERIAL = false; //資源表示 | |
var MAP_WIDE = false; //プチワイド | |
var DISP_PICTURE = true; //マップアイコン表示 | |
var MATCH_FULL = false; //完全一致フラグ | |
var MAP_SCALE; //地図幅 | |
var LOADED_MAPS = new Array(); | |
var CELLS_CACHE = new Array(); | |
var ALLYS_CACHE = new Array(); | |
var USERS_CACHE = new Array(); | |
var ALLYS_INDEX = new Array(); | |
var USERS_INDEX = new Array(); | |
var GET_MAP_LIST = new Array(); | |
var GET_MAP_LIST_COUNTER; | |
var MAX_MAP_LIST; | |
var GET_MAP_SLEEP_TID; | |
var j$; | |
var ROUTE_ENABLE = false; | |
var CURSOR_ENABLE = false; | |
var MEMBER_ID_LIST = new Array(); | |
var MEMBER_ID_LIST_COUNTER; | |
var MEMBER_ID_MAX_COUNTER; | |
var MEMBER_INFO_TEXT; | |
var MEMBER_SLEEP_TID; | |
//マウスドラッグ用 | |
var MOUSE_DRAGGING_1 = false; | |
var MOUSE_DRAG_START_X; | |
var MOUSE_DRAG_START_Y; | |
var MAP_MATE_COLORS; | |
var MAP_MATE_COLORS_DEF = new Array( | |
"#00a000", //木のみ | |
"#a0a0a0", //石のみ | |
"#a060a0", //鉄のみ | |
"#f0f080", //糧のみ | |
"#ffc040", //複合 | |
"#404040" //取得済 | |
); | |
var MAP_MATE_NAMES; | |
var MAP_MATE_NAMES_DEF = new Array( | |
"木のみ", //木のみ | |
"石のみ", //石のみ | |
"鉄のみ", //鉄のみ | |
"糧のみ", //糧のみ | |
"複合", //複合 | |
"取得済" //取得済 | |
); | |
var MAP_COLOR_MODE; //マップ色モード | |
var MAP_WOOD_COLOR = 0; //木 | |
var MAP_STONE_COLOR = 1; //石 | |
var MAP_IRON_COLOR = 2; //鉄 | |
var MAP_RICE_COLOR = 3; //糧 | |
var MAP_MIX_COLOR = 4; //複合 | |
var MAP_OTHER_COLOR = 5; //他同盟 | |
var map_hostname; ////location.hostnameが付いたデータを削除する為、地図ツールのものは、"map_"+location.hostnameにして他に影響が出ないようにした。faraway111013 | |
var mapAllId = 'mapAll'; //mapツール四季対応?20120524 | |
if(document.getElementById("mapboxInner")) mapAllId = document.getElementById("mapboxInner").firstElementChild.id; | |
//faraway 2.タイマーのソース(bro3_timer.user.js) 変数部 開始 | |
//faraway 2.タイマーのソース(bro3_timer.user.js) 変数部 終了 | |
//faraway 3.同盟貢献チェッカーのソース(bro3_contrib_checker.user.js) 変数部 開始 | |
var VERSION_3 = "1.04"; | |
var LOCAL_STORAGE_3 = "bro3_contrib_checker"; | |
var DELIMIT_3 = "#$%"; | |
//インデックス | |
var IDX_RANK = 0; //ランク | |
var IDX_POINT = 1; //ポイント | |
var IDX_CONTRIB = 2; //寄付 | |
var IDX_VILLAGE = 3; //拠点 | |
//グローバル変数 | |
var CURRENT_TIME = generateDateString_3(new Date()); | |
var LAST_UPDATE = ""; | |
var ALLY_NAME = ""; | |
var SAVE_DATA = new Array(); | |
var SAVE_USERS = new Array(); | |
//faraway 3.同盟貢献チェッカーのソース(bro3_contrib_checker.user.js) 変数部 終了 | |
//faraway 4.発展チェッカーのソース(bro3_growth_checker.user.js) 変数部 開始 | |
var VERSION4 = "1.07"; | |
var LOCAL_STORAGE4 = "bro3_growth_checker"; | |
var DELIMIT_4 = "#$%"; | |
//faraway 4.発展チェッカーのソース(bro3_growth_checker.user.js) 変数部 終了 | |
//faraway 5.統計グラフ化ツールのソース(bro3_graph.user.js) 変数部 開始 | |
var VERSION_5 = "1.06"; | |
var LOCAL_STORAGE_5 = "bro3_graph"; | |
var DELIMIT_5 = "#$%"; | |
var DELIMIT2_5 = "&?@"; | |
var GRAPH_WIDTH = 745; | |
var GRAPH_HEIGHT = 500; | |
var GRAPH_PADDING = 8; | |
//色定義 | |
var ALLY_COLORS_5 = new Array("blue", "red", "green", "olive", "brown", | |
"purple", "black", "indigo", "deeppink", "darkcyan", | |
"dodgerblue", "lightcoral", "lawngreen", "yellow", "tomato", | |
"plum", "darkgray", "mediumpurple", "pink", "cyan"); | |
//保存データインデックス | |
var IDX_DATETIME = 0; //日時 | |
var IDX_POINT_5 = 1; //ポイント | |
var IDX_RANK_5 = 2; //ランク | |
var IDX_MEMBER = 3; //メンバー | |
//グローバル変数 | |
var TOOL_LOADED = false; | |
var ALLYS_5 = new Array(); //入力同盟名 | |
var CURRENT_ALLYS_5 = new Array(); | |
var ALLYS_INDEX_5 = new Array(); //同盟インデックス | |
//faraway 5.統計グラフ化ツールのソース(bro3_graph.user.js) 変数部 終了 | |
//faraway 6.同盟ログツールのソース() 変数部 開始 | |
var VERSION_6 = "1.07"; | |
var LOCAL_STORAGE_6 = "bro3_log_tool"; | |
var DELIMIT_6 = "#$%"; | |
var DELIMIT2_6 = "&?@"; | |
var DELIMIT3_6 = "{=]"; | |
//データインデックス | |
var IDX_SUBJECT = 0; //件名 | |
var IDX_DATE = 1; //ログ時刻 | |
var IDX_ACTOR = 2; //攻撃者、防御者 | |
var IDX_SOLDIER_COUNT = 3; //兵士数 | |
//var IDX_INFORMATION = 4; //情報 | |
var IDX2_ALLY_ID = 0; //同盟ID | |
var IDX2_ALLY_NAME = 1; //同盟名 | |
var IDX2_USER_ID = 2; //ユーザID | |
var IDX2_USER_NAME = 3; //ユーザ名 | |
var IDX2_VILLAGE_ID = 4; //拠点ID | |
var IDX2_VILLAGE_NAME = 5; //拠点名 | |
//グローバル変数 | |
var LOG_ID = getParameter_6("id"); | |
var LOG_DATA = new Array(); | |
//faraway 6.同盟ログツールのソース() 変数部 終了 | |
//faraway 7.NPC砦、領土情報検索ツールのソース(bro3_npc_castle_info2.user.js) 変数部 開始 | |
var DELIMIT1_7 = "#$%"; | |
var DELIMIT2_7 = "&?@"; | |
var OWNER_SPLITKEY = " "; | |
var VERSION_KEY = "vtX200"; | |
var VERSION_7 = "2.49k2"; | |
// データフラグ(初期値) | |
var FLAG1 = "1000000000"; | |
var FLAG2 = "0000000 0 0 000000000000"; | |
var FLAG3_1 = "010000情報を表示する1"; | |
var FLAG3_2 = "010000情報を表示する2"; | |
var FLAG3_3 = "010000情報を表示する3"; | |
var FLAG4 = ""; | |
// ブラウザ判別用 | |
var browserType; | |
// 新鯖判定用 | |
var add51_51mode = 0; | |
// スプレッドシート名 | |
var spreadsheet = ''; | |
// 共通関数 | |
var d_7 = document; | |
var $d = function(id) { return d_7.getElementById(id); }; | |
var $x_7 = function(xp,dc) { return d_7.evaluate(xp, dc||d_7, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; }; | |
var $e_7 = function(key) { return d_7.evaluate(key, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); }; | |
// 検索オプション(種別) | |
var FLAG1_NPC = 0; // NPC砦 | |
var FLAG1_LV1 = 1; // ☆1 | |
var FLAG1_LV2 = 2; // ☆2 | |
var FLAG1_LV3 = 3; // ☆3 | |
var FLAG1_LV4 = 4; // ☆4 | |
var FLAG1_LV5 = 5; // ☆5 | |
var FLAG1_LV6 = 6; // ☆6 | |
var FLAG1_LV7 = 7; // ☆7 | |
var FLAG1_LV8 = 8; // ☆8 | |
var FLAG1_LV9 = 9; // ☆9 | |
// 検索オプション(特殊1) | |
var FLAG2_EMPTY = 0; // 空き地検索 | |
var FLAG2_LAND = 1; // 領土検索 | |
var FLAG2_ANALYZE = 2; // 資源判別検索 | |
var FLAG2_RADER = 3; // レーダーの表示 | |
var FLAG2_OWNER = 4; // 本拠地一覧の表示 | |
var FLAG2_EMPTY_DRAW = 5; // 空き地を着色 | |
var FLAG2_EMPTY_DRAW_COLOR = 6; // 空き地の枠色 | |
var FLAG2_STRONG_AREANO = 7; // 強調表示領地リスト番号(3桁) | |
var FLAG2_STRONG_AREANO2 = 10; // 強調表示領地リスト番号(3桁) | |
var FLAG2_STRONG_AREANO3 = 13; // 強調表示領地リスト番号(3桁) | |
var FLAG2_MENU2 = 16; // メニュークローズドスイッチ2 | |
var FLAG2_MENU4 = 17; // メニュークローズドスイッチ4 | |
var FLAG2_HFUNC = 18; // | |
var FLAG2_SEARCH_LEVEL = 19; // ルート探索:探索レベル | |
var FLAG2_SKIP_RES = 20; // ルート探索:回避資源タイプ | |
var FLAG2_SKIP_USER = 21; // 個人領地を通過 | |
var FLAG2_SKIP_GROUP = 22; // グループ領地を通過 | |
var FLAG2_RANDOM_ROUTE = 23; // 可変ルート | |
var FLAG2_DIRECTION = 24; // 方位表示 | |
var FLAG2_NOEXEC51 = 26; // 51x51モードでツールを動かさない | |
// 検索オプション(個人/同盟検索) | |
var FLAG3_ENABLE = 0; // 有効/無効 | |
var FLAG3_USER = 1; // ユーザー検索 | |
var FLAG3_GROUP = 2; // 同盟検索 | |
var FLAG3_MATCH = 3; // 完全一致 | |
var FLAG3_FILL = 4; // 領土着色のみ | |
var FLAG3_COLOR = 5; // カラー番号 | |
var FLAG3_NAME = 6; // 個人、同盟名称 | |
// ルート自動構築用変数 | |
var AUTO_ROUTE_NONE = 0; | |
var AUTO_ROUTE_EDIT_FIRST = 1; | |
var AUTO_ROUTE_EDIT_LAST = 2; | |
var AUTO_ROUTE_EDIT_END = 3; | |
var autoroute = AUTO_ROUTE_NONE; | |
var autoroute_f = [0,0,""]; | |
var autoroute_l = [0,0,""]; | |
var autoroute_f2 = [0,0]; | |
var autoroute_path = new Array(); | |
var autoroute_maxpaths = 0; | |
// 個人/同盟検索結果表示色 | |
var cname = ["赤","紫","桃","橙","黄","緑","水","青","灰","白"]; | |
var cname_en = ["red","purple","pink","orange","yellow","green","cyan","blue","gray","white"]; | |
var season1 = [ | |
["なし", 0, 0, 0, 0, 0, " "], // 0 | |
["☆1( 1- 0- 0- 0) 1期~", 1, 0, 0, 0, 1, "A"], // 1 | |
["☆1( 0- 1- 0- 0) 1期~", 0, 1, 0, 0, 1, "B"], // 2 | |
["☆1( 0- 0- 1- 0) 1期~", 0, 0, 1, 0, 1, "C"], // 3 | |
["☆1( 0- 0- 0- 1) 1期~", 0, 0, 0, 1, 1, "D"], // 4 | |
["☆2( 3- 0- 0- 0) 1期~", 3, 0, 0, 0, 2, "E"], // 5 | |
["☆2( 0- 3- 0- 0) 1期~", 0, 3, 0, 0, 2, "F"], // 6 | |
["☆2( 0- 0- 3- 0) 1期~", 0, 0, 3, 0, 2, "G"], // 7 | |
["☆3( 1- 1- 1- 0) 1期~", 1, 1, 1, 0, 3, "H"], // 8 | |
["☆3( 0- 0- 0- 4) 1期~", 0, 0, 0, 4, 3, "I"], // 9 | |
["☆3( 0- 0- 0- 1) 2期~", 0, 0, 0, 1, 3, "J"], // 10 | |
["☆4( 2- 2- 2- 0) 1期~", 2, 2, 2, 0, 4, "K"], // 11 | |
["☆4( 2- 2- 2- 2) 1期 ", 2, 2, 2, 2, 4, "L"], // 12 | |
["☆4( 0- 0- 0- 8) 1期~", 0, 0, 0, 8, 4, "M"], // 13 | |
["☆5( 6- 0- 0- 0) 1期~", 6, 0, 0, 0, 5, "N"], // 14 | |
["☆5( 0- 6- 0- 0) 1期~", 0, 6, 0, 0, 5, "O"], // 15 | |
["☆5( 0- 0- 6- 0) 1期~", 0, 0, 6, 0, 5, "P"], // 16 | |
["☆5( 0- 0- 0- 1) 2期~", 0, 0, 0, 1, 5, "Q"], // 17 | |
["☆5( 2- 2- 1- 0) 3期~", 2, 2, 1, 0, 5, "R"], // 18 | |
["☆5( 1- 1- 2- 0) 3期~", 1, 1, 2, 0, 5, "S"], // 19 | |
["☆6(10- 0- 0- 0) 1期~",10, 0, 0, 0, 6, "T"], // 20 | |
["☆6( 0-10- 0- 0) 1期~", 0,10, 0, 0, 6, "U"], // 21 | |
["☆6( 0- 0-10- 0) 1期~", 0, 0,10, 0, 6, "V"], // 22 | |
["☆6( 2- 2- 2- 0) 2期~", 2, 2, 2, 0, 6, "W"], // 23 | |
["☆7( 3- 3- 3- 0) 1期 ", 3, 3, 3, 0, 7, "X"], // 24 | |
["☆7( 2- 4- 4- 0) 2期~", 2, 4, 4, 0, 7, "Y"], // 25 | |
["☆7( 0- 0- 0- 1) 2期~", 0, 0, 0, 1, 7, "Z"], // 26 | |
["☆7( 0- 0- 0-12) 2期~", 0, 0, 0,12, 7, "a"], // 27 | |
["☆8( 4- 4- 4- 4) 1期 ", 4, 4, 4, 4, 8, "b"], // 28 | |
["☆8( 4- 1- 2- 0) 2期~", 4, 1, 2, 0, 8, "c"], // 29 | |
["☆8( 2- 4- 1- 0) 2期~", 2, 4, 1, 0, 8, "d"], // 30 | |
["☆8( 1- 2- 4- 0) 2期~", 1, 2, 4, 0, 8, "e"], // 31 | |
["☆8(14- 0- 0- 0) 3期~",14, 0, 0, 0, 8, "f"], // 32 | |
["☆8( 0-14- 0- 0) 3期~", 0,14, 0, 0, 8, "g"], // 33 | |
["☆8( 0- 0-14- 0) 3期~", 0, 0,14, 0, 8, "h"], // 34 | |
["☆9( 0- 0- 0-18) 1期~", 0, 0, 0,18, 9, "i"], // 35 | |
["☆9( 1- 1- 1- 2) 2期~", 1, 1, 1, 2, 9, "j"], // 36 | |
["☆9( 4- 4- 4- 4) 2期~", 4, 4, 4, 4, 9, "k"], // 37 | |
["☆9( 1- 0- 0- 0) 3期~", 1, 0, 0, 0, 9, "l"], // 38 | |
["☆9( 0- 1- 0- 0) 3期~", 0, 1, 0, 0, 9, "m"], // 39 | |
["☆9( 0- 0- 1- 0) 3期~", 0, 0, 1, 0, 9, "n"], // 40 | |
["☆4( 2- 2- 2- 2) 10期~", 2, 2, 2, 2, 4, "o"], // 41 | |
["☆4( 2- 2- 2- 0) 10期~", 2, 2, 2, 0, 4, "p"], // 42 | |
["☆5( 1- 1- 1- 1) 10期~", 1, 1, 1, 1, 5, "q"], // 43 | |
["☆6( 2- 2- 2- 0) 10期~", 2, 2, 2, 0, 6, "r"], // 44 | |
["☆7( 4- 4- 2- 0) 10期~", 4, 4, 2, 0, 7, "s"], // 45 | |
["☆7( 4- 2- 4- 0) 10期~", 4, 2, 4, 0, 7, "t"], // 46 | |
["☆7( 0- 0- 0- 11) 10期~", 0, 0, 0, 11, 7, "u"], // 46 | |
["☆8( 0- 0- 0- 1) 10期~", 0, 0, 0, 1, 8, "v"], // 47 | |
["☆8( 1- 1- 1- 4) 10期~", 1, 1, 1, 4, 8, "w"], // 48 | |
["☆8( 4- 3- 3- 0) 10期~", 4, 3, 3, 0, 8, "x"], // 49 | |
["☆8( 3- 4- 3- 0) 10期~", 3, 4, 3, 0, 8, "y"], // 50 | |
["☆8( 3- 3- 4- 0) 10期~", 3, 3, 4, 0, 8, "z"], // 51 | |
["☆9( 0- 0- 0- 16) 10期~", 0, 0, 0, 16, 9, "α"], // 52 | |
["☆9( 8- 0- 8- 0) 10期~", 8, 0, 8, 0, 9, "β"], // 53 | |
["☆9( 0- 8- 8- 0) 10期~", 0, 8, 8, 0, 9, "γ"], // 54 | |
["☆9( 8- 8- 0- 0) 10期~", 8, 8, 0, 0, 9, "δ"], // 55 | |
["☆9( 1- 1- 1- 0) 10期~", 1, 1, 1, 0, 9, "ε"], // 56 | |
["☆1( 2- 0- 0- 0) 11期~", 2, 0, 0, 0, 1, "ζ"], // 57 | |
["☆1( 0- 2- 0- 0) 11期~", 0, 2, 0, 0, 1, "η"], // 58 | |
["☆1( 0- 0- 2- 0) 11期~", 0, 0, 2, 0, 1, "θ"], // 59 | |
["☆3( 1- 1- 1- 0) 11期~", 1, 1, 1, 0, 3, "ι"], // 60 | |
["☆6( 0- 0- 0- 0) 11期~", 0, 0, 0, 0, 6, "κ"], // 61 | |
["☆7( 0- 0- 0- 0) 11期~", 0, 0, 0, 0, 7, "λ"], // 62 | |
["☆8( 4- 4- 5- 2) 11期~", 4, 4, 5, 2, 8, "μ"], // 63 | |
["☆8( 4- 5- 4- 2) 11期~", 4, 5, 4, 2, 8, "ν"], // 64 | |
["☆8( 5- 4- 4- 2) 11期~", 5, 4, 4, 2, 8, "ξ"], // 65 | |
["☆8( 0- 0- 0- 15) 11期~", 0, 0, 0, 15, 8, "ο"], // 66 | |
["☆8( 0- 0- 0- 0) 11期~", 0, 0, 0, 0, 8, "π"], // 67 | |
["☆9( 3- 3- 3- 3) 11期~", 3, 3, 3, 3, 9, "ρ"] // 68 | |
]; | |
// ルート探索条件 | |
var croutename = ["☆1のみ","☆2以下","☆3以下","☆4以下","☆5以下","☆6以下","☆7以下","☆8以下","☆回避なし"]; | |
var croutelim = ["なし","★2森","★2岩","★2鉄"]; | |
var groupname = ["指定なし","No.1","No.2","No.3"]; | |
// 探索パターン(距離1) | |
var chkptn = [ [1,0], [0,1], [-1,0], [0,-1], [1,1], [1,-1], [-1,1], [-1,-1] ]; | |
var chkptn_r = [ | |
[ 1, 0], [ 0, 1], [-1, 0], [ 0,-1], // 01 | |
[ 1, 0], [ 0, 1], [ 0,-1], [-1, 0], // 02 | |
[ 1, 0], [-1, 0], [ 0, 1], [ 0,-1], // 03 | |
[ 1, 0], [-1, 0], [ 0,-1], [ 0, 1], // 04 | |
[ 1, 0], [ 0,-1], [-1, 0], [ 0, 1], // 05 | |
[ 1, 0], [ 0,-1], [ 0, 1], [-1, 0], // 06 | |
[ 0, 1], [ 1, 0], [-1, 0], [ 0,-1], // 07 | |
[ 0, 1], [ 1, 0], [ 0,-1], [-1, 0], // 08 | |
[ 0, 1], [-1, 0], [ 1, 0], [ 0,-1], // 09 | |
[ 0, 1], [-1, 0], [ 0,-1], [ 1, 0], // 10 | |
[ 0, 1], [ 0,-1], [-1, 0], [ 1, 0], // 11 | |
[ 0, 1], [ 0,-1], [ 1, 0], [-1, 0], // 12 | |
[-1, 0], [ 1, 0], [ 0, 1], [ 0,-1], // 13 | |
[-1, 0], [ 1, 0], [ 0,-1], [ 0, 1], // 14 | |
[-1, 0], [ 0, 1], [ 1, 0], [ 0,-1], // 15 | |
[-1, 0], [ 0, 1], [ 0,-1], [ 1, 0], // 16 | |
[-1, 0], [ 0,-1], [ 0, 1], [ 1, 0], // 17 | |
[-1, 0], [ 0,-1], [ 1, 0], [ 0, 1], // 18 | |
[ 0,-1], [ 1, 0], [ 0, 1], [-1, 0], // 19 | |
[ 0,-1], [ 1, 0], [-1, 0], [ 0, 1], // 20 | |
[ 0,-1], [ 0, 1], [ 1, 0], [-1, 0], // 21 | |
[ 0,-1], [ 0, 1], [-1, 0], [ 1, 0], // 22 | |
[ 0,-1], [-1, 0], [ 0, 1], [ 1, 0], // 23 | |
[ 0,-1], [-1, 0], [ 1, 0], [ 0, 1], // 24 | |
[ 1, 1], [ 1,-1], [-1, 1], [-1,-1], // 25 | |
[ 1, 1], [ 1,-1], [-1,-1], [-1, 1], // 26 | |
[ 1, 1], [-1, 1], [ 1,-1], [-1,-1], // 27 | |
[ 1, 1], [-1, 1], [-1,-1], [ 1,-1], // 28 | |
[ 1, 1], [-1,-1], [-1, 1], [ 1,-1], // 29 | |
[ 1, 1], [-1,-1], [ 1,-1], [-1, 1], // 30 | |
[ 1,-1], [ 1, 1], [-1, 1], [-1,-1], // 31 | |
[ 1,-1], [ 1, 1], [-1,-1], [-1, 1], // 32 | |
[ 1,-1], [-1, 1], [ 1, 1], [-1,-1], // 33 | |
[ 1,-1], [-1, 1], [-1,-1], [ 1, 1], // 34 | |
[ 1,-1], [-1,-1], [-1, 1], [ 1, 1], // 35 | |
[ 1,-1], [-1,-1], [ 1, 1], [-1, 1], // 36 | |
[-1, 1], [ 1, 1], [ 1,-1], [-1,-1], // 37 | |
[-1, 1], [ 1, 1], [-1,-1], [ 1,-1], // 38 | |
[-1, 1], [ 1,-1], [ 1, 1], [-1,-1], // 39 | |
[-1, 1], [ 1,-1], [-1,-1], [ 1, 1], // 40 | |
[-1, 1], [-1,-1], [ 1,-1], [ 1, 1], // 41 | |
[-1, 1], [-1,-1], [ 1, 1], [ 1,-1], // 42 | |
[-1,-1], [ 1, 1], [ 1,-1], [-1, 1], // 43 | |
[-1,-1], [ 1, 1], [-1, 1], [ 1,-1], // 44 | |
[-1,-1], [ 1,-1], [ 1, 1], [-1, 1], // 45 | |
[-1,-1], [ 1,-1], [-1, 1], [ 1, 1], // 46 | |
[-1,-1], [-1, 1], [ 1,-1], [ 1, 1], // 47 | |
[-1,-1], [-1, 1], [ 1, 1], [ 1,-1] // 48 | |
]; | |
// ルート探索条件(資源回避) | |
var cchkres = [ 0, 5, 6, 7 ]; | |
//--------------------------------// | |
// アイコン定義(パステルカラー) // | |
//--------------------------------// | |
var icon_c_7 = new Array(); | |
// 通常モード(11x11用) | |
icon_c_7[0] = new Array(); | |
icon_c_7[0][0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAAAk0lEQVR42u3VwQmAMAxA0WY'+ | |
'EwV0cwnkdwl0ER6heRKhnS/n5/5hLeIe0UWstmQrB8ATTE0xPMD3B9ATTE0xPMD3B9ATTE0xPMD3B9LqCI+Kz7N4faPC2v/vWJXK'+ | |
'Aj7OUeRIsWLBgwYIFC+4AfkoBbmdo8AgJpucN/w1O90r7D9PB7QwNHiHB9ATTE0xPMD3B9NKBL9LFOZj2H7EeAAAAAElFTkSuQmCC'; | |
icon_c_7[0][1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAAAtElEQVR42u3XOxKCMBgAYX6'+ | |
'OYMF4J8/AMb2UBUcwSkOR4CjMxOiyW+YB8yVVIqXUHakQDE8wPcH0BNMTTE8wPcH0BNMTTE8wPcH0BNMTTK8qOCLefvz5/0CB0+3'+ | |
'6en64QMH3qZzsT2Bw3nwAVHA+ttw4Ebx2AIIFCxYsWLBgwYIF7wTmYzm4mK98AE1fS8X6L9x4u/fw2vrzCAF/up5ww1v3/DX4FxN'+ | |
'MTzA9wfQE0xNM73DgBw8JYpiEhB6BAAAAAElFTkSuQmCC'; | |
icon_c_7[0][2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAAAr0lEQVR42u3VsRKDIBAAUa5'+ | |
'KnfxWvje/ZWorEgvrw4IZ2dut0fGBQPTeW6VCMDzB9ATTE0xPMD3B9ATTE0xPMD3B9ATTE0xPML2p4Ii4/PL/98TS4G//DI9/xps'+ | |
'B3tuWjn20FwecdUwIBpyNOf8ABHhkQgQLXghcbg+XPKVL3sPnCmbhwAcoCweeDRIs2D08D5yFOqWzUPfwaAjw1WeWBt8xwfQE0xN'+ | |
'MTzA9wfTKgX8OKmKYVBXGEwAAAABJRU5ErkJggg=='; | |
icon_c_7[0][3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAAAsElEQVR42u3VwQ2DMBAAQV8'+ | |
'HiGJoIvXSRIqJ0oEJD34ImwdSvLf7PhBjsIlaa8lUCIYnmJ5geoLpCaYnmJ5geoLpCaYnmJ5geoLpCab3KDgibt/89zwxNPhd1+7'+ | |
'5JV4M8Ld8mrNTmTngVvuCYMCtmeMLQIB7FkSw4IHA6fZwylPa//BJqDfcmkHt4Z4FESx4IHC6PZzylPY/fBECfPeaocH/mGB6guk'+ | |
'JpieYnmB66cAbnXhimOdx8jMAAAAASUVORK5CYII='; | |
icon_c_7[0][4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAAAqElEQVR42u3TMRKDIBQAUX5'+ | |
't53VyBM/rEbxOOmu0SQocgk0SXXY7+A7O0yFyzqmnQjA8wfQE0xNMTzA9wfQE0xNMTzA9wfQE0xNMTzC9r4Ij4nD4/r44O78leM7'+ | |
'Lez3F4wD+NL8t+JnWNKahCq7NBQsWLFjwr8FlaHAtJLgVCtwK9Ydbz6Du8JkPIliwYMGCrw5+1QW43EOD/5FgeoLpCaYnmJ5get2'+ | |
'BN8++qph3fIzUAAAAAElFTkSuQmCC'; | |
icon_c_7[0][5] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAAAsElEQVR42u3XMRKDIBBA0Wy'+ | |
'V2lzL8+ZasbYieoGsTAbRz/81Mr6CRaOU8hipEAxPMD3B9ATTE0xPMD3B9ATTE0xPMD3B9ATTE0yvKTgiqjff3iduDX4vx/efp2C'+ | |
'AP2u+9vWEgXdQFg68g7Jw4NYgwYI9w+3AWagpnYW6h7POPOPdv6XPHmpd/5Z6THHBgv8EZWtw4OGmtPfwjxDg2mduDb5igukJpie'+ | |
'YnmB6gukNB/4CHypimDIwJQkAAAAASUVORK5CYII='; | |
icon_c_7[0][6] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAAAsklEQVR42u3VsQ2DMBBA0Vy'+ | |
'djnUYIfNmhKyTjtqENhI6kDCG7/9r2+IVd0Qp5dFTIRieYHqC6QmmJ5ieYHqC6QmmJ5ieYHqC6QmmJ5heVXBE7H789z1xa/Dnvf3'+ | |
'98RUM8PTNzz4HGHgBZeHACygLB64NEizYGa4HzkJt6ayu/sNnznjzGT57qTXd0i22uGDBB4P/Q4PXQoKzUOCtIcB779wafMUE0xN'+ | |
'MTzA9wfQE0+sOPAO9jouYRH9pQgAAAABJRU5ErkJggg=='; | |
icon_c_7[0][7] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAAAo0lEQVR42u3QQQ5AMBQAUX9'+ | |
'lzbWc17VYWxUJiTQRLERMZ3btb5q+RkqpKqkQDE8wPcH0BNMTTE8wPcH0BNMTTE8wPcH0BNMTTO9VcEQ8vnx5T/wanPrx/vmugYC'+ | |
'H6fpwW8PAC+i0bY4Dr6C8fI4DH0FXc8G/Ae/rEsD5Hhp850MECxYsWLBgwYIFvwre1yWA8z00+IsE0xNMTzA9wfQE0ysOPAMbFYa'+ | |
'YImwD1wAAAABJRU5ErkJggg=='; | |
icon_c_7[0][8] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAAAqklEQVR42u3UwQmAMBAAQa8'+ | |
'F27Je27KFqOBDAiH6EMze7vcu4iAmSilTpkIwPMH0BNMTTE8wPcH0BNMTTE8wPcH0BNMTTE8wvU/BEfH64cf7xNDgsq7P95cFAt6'+ | |
'2/vI8w8AHqNk1x4FPUF09x4HvoN5csOABwHVocDMkuBcOnO4LZ/yHU97SgungOjS4GRLcCwV+uk8Avz0zNPiPCaYnmJ5geoLpCaa'+ | |
'XDrwDAUW0mKahbVUAAAAASUVORK5CYII='; | |
icon_c_7[0][9] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAAArUlEQVR42u3VQQ5AMBBAUXM'+ | |
'Ft3Qit3SFIrGQJgwLif7+v+0Qr1KilDL0VAiGJ5ieYHqC6QmmJ5ieYHqC6QmmJ5ieYHqC6Qmm9yk4Il7ffHueaBpcpun5/DxDwMu'+ | |
'SD48jDLyBLjvWceAdVFev48BnULYuWHAD4Do0+DIkOAsFziK94WwGdYafbIhgwQ2BuzvDXX6l/Q/fzRPAb69pGvzHBNMTTE8wPcH'+ | |
'0BNPrDrwCyACLmJpZR94AAAAASUVORK5CYII='; | |
// 通常モード(15x15用) | |
icon_c_7[1] = new Array(); | |
icon_c_7[1][0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMA/wD/AP83WBt9AAAAZklEQVR42u3TsQ2AMAxFQTw'+ | |
'VQzAvQzCVQaIJFVUUW7rXufm6IonM3DoVwMDAwMDAwJUCBgYGBv4ZjPgMPvtRHnxe7+axBzAwMDDwAvB4lwfPDrjdk2j56dqBx7s'+ | |
'8eHbAwMDAwGu7ARPd2ak7UfORAAAAAElFTkSuQmCC'; | |
icon_c_7[1][1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMA/wD/AP83WBt9AAAAdUlEQVR42u3VywmAMBAFQLc'+ | |
'Jm7Jem7KJ6MWDXzwkMeK847I8hhDYSCl1X0oAAwMDAwMDtxRgYGBg4JOSiMuSpT+aBKdpPM77AbjIl1jxzYL3eGBgYGDguuC7w7G'+ | |
'ZZ8AXPc2bnUyv/V/wk71mwDUDDAwMDPxuZukM7anou6r5AAAAAElFTkSuQmCC'; | |
icon_c_7[1][2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMA/wD/AP83WBt9AAAAfElEQVR42u3TsQ2AMAxEUW4'+ | |
'E5mJe5mIEAwUdjiIFwVn8a2M5z5KtiJgqRYABAwYMGDBgpwAGDBgw4JsmUleT4y/ZgLdYmzWzFsBD4OztGsQK3BoE8C9XouTRlQW'+ | |
'fsCy24CdggFvgLJYrkcX26MqAe+pswG8GMGDAgAF/mx0rnO2pIl/VqAAAAABJRU5ErkJggg=='; | |
icon_c_7[1][3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMA/wD/AP83WBt9AAAAeElEQVR42u3TQQqAMAxEUed'+ | |
'SXqLn9RJeKrrpzoaCoBP6Z5uQvkCqiNgqRYABAwYMGDBgpwAGDBgw4Ich0tSQ+y3ZgM840p5dDfAr8KjWF7ECZ4sAXvIkSn66cuB'+ | |
'RzfIkskUAL3kSJT9dOfBMnw34ywAGDBgw4H9zASZ+7amio7DkAAAAAElFTkSuQmCC'; | |
icon_c_7[1][4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMA/wD/AP83WBt9AAAAc0lEQVR42u3Syw2AIBAFQLc'+ | |
'uS7BeS7AuNJ4gQS/+1mTeCZbkZSBEKWX4UwIYGBgYGBg4U4CBgYGBOyURTcnWGWfzFOC5LPt6irEB9+bAwMA3g+ukBx8F+Cr46Cz'+ | |
'llzi7CDAw8Mvgep8e/MgjAAMDAwN/mhV9vBe4d0lEIAAAAABJRU5ErkJggg=='; | |
icon_c_7[1][5] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMA/wD/AP83WBt9AAAAfklEQVR42u3VsRGAMAxDUTQ'+ | |
'CczEvczGCgR7nUiQgH19tcs4rrIsiYqkUAQYMGDBgwICdAhgwYMCAH4ZIXUOut2QD3o/2nG0V4CHgG5bFFjwCBrgFzmK5EllsS1c'+ | |
'GnJ2N3u2pX/OMMv4TXG4lSpauHLjnng34zQAGDBgw4G9zAiuc7ankdBvGAAAAAElFTkSuQmCC'; | |
icon_c_7[1][6] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMA/wD/AP83WBt9AAAAfElEQVR42u3TwQ2AMAhGYf+'+ | |
'5HMF5HcG5UK9GmialCsl754Z+B5CZLZUSYMCAAQMGDDhTgAEDBgz4ZYjUNeT6S2nAx96es24CHAK+YV5pwREwwC2wV8qV8Ep7dOX'+ | |
'Az5WI3u2pRzfjGAGXWwkvwKPgnndpwF8GGDBgwID/7QRyWgG4ei4f7wAAAABJRU5ErkJggg=='; | |
icon_c_7[1][7] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMA/wD/AP83WBt9AAAAcklEQVR42u3QwQmAMAwFUDO'+ | |
'CczmvczlC1YPQgxYRpRHevyWE5LVRShn+lAAGBgYGBgbOFGBgYGDgkyURt5ZstyINuMxLe2YagV8B77A6dT8t+IBd9YGfgOs6Pbj'+ | |
'1EGBgYGDgvuC6Tg/+5BOAgYGBgbtmBbpmAriV8cm1AAAAAElFTkSuQmCC'; | |
icon_c_7[1][8] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMA/wD/AP83WBt9AAAAeUlEQVR42u3TQQrAIAxE0eZ'+ | |
'8ntfzpe2ikEVTBMVO4M8yDPEtjLn7USkGGDBgwIABA1YKYMCAAQN+WWI2tOR6y2TA3vt3pzXAS8A3LCbOZcEPLJsDngXHyIPTDuB'+ | |
'F4HJfouTRlQPHyIPTDuBJ8EhPBrwzgAEDBgz435zr1xW4O4eh7gAAAABJRU5ErkJggg=='; | |
icon_c_7[1][9] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMA/wD/AP83WBt9AAAAeklEQVR42u3TQQqAMAxEUXP'+ | |
'cnqjHjboQsjClUNEJ/lmmIX2F1Nx9qxQDDBgwYMCAASsFMGDAgAHfDDGbGnLcZTJgb23c0zvgR8AnLCbWZcEXLKsDXgXHyIPTHsC'+ | |
'L4OxMciVGDwH8y5Uo+enKgWf6ZMBvBjBgwIABf5sd0goBuPzg7coAAAAASUVORK5CYII='; | |
// 通常モード(20x20用) | |
icon_c_7[2] = new Array(); | |
icon_c_7[2][0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMA/wD/AP83WBt9AAAAT0lEQVR42u3SsQkAIAxEUW8'+ | |
'qh3Beh3CqaKOdXeAU/q/SGB5BRURxJxAgQIAAAQKEAyHpPF57ZEP0EaVVgQDxFmLPNkRW/1+CP5EdCBAgbk0OjJy/yRhvJQAAAAB'+ | |
'JRU5ErkJggg=='; | |
icon_c_7[2][1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMA/wD/AP83WBt9AAAAZklEQVR42u3UQQrAIAxE0c4'+ | |
'leqme10v1EqmrFKxuJCRd/NlFUB4DRmZ2VEcgQIAAAQIEiEyEpM+l/o7SEXa3dz6vGoQ30DEliLERECB+gZj9Dp83MCF7ws83Gwn'+ | |
'bmOlNRAcECBCrPPueqb9NtTxIAAAAAElFTkSuQmCC'; | |
icon_c_7[2][2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMA/wD/AP83WBt9AAAAZklEQVR42u3TsQ2AMAxEUW4'+ | |
'E5mJe5mIEAwWNkRsUnRH8Ky0leTklioipOwIBAgQIECBAOBGSykXHfrIhtlhv81mLF5FnJ8qKqJr5XxOveRPXzXNaEE8O/V4TOe2'+ | |
'/w97E6IAAAaLKDpSiqb9xGAVvAAAAAElFTkSuQmCC'; | |
icon_c_7[2][3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMA/wD/AP83WBt9AAAAYElEQVR42u3SsQnAMAxE0dx'+ | |
'SWSLzZoksJceFmxiRwiAZ9K8U2DyOk5kd2REIECBAgAABIhIhyX30/qcwxGP3dD91xSK+t44KRXjN1GuCTfw1U6+JbTcxkraJ1YA'+ | |
'AAcJLA7hvqb+ZTBceAAAAAElFTkSuQmCC'; | |
icon_c_7[2][4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMA/wD/AP83WBt9AAAAX0lEQVR42u3QQQpAIQhF0d6'+ | |
'6WkLrbQl/XdakCKFRoH9w30gF4ajMrGRHIECAAAECBIhIhKS9NPfl+zBEt6801Y04exBpiJU0hE84ws/CP3H7DIjfIFadhng+AgQ'+ | |
'IEJcMJijFv15TAzAAAAAASUVORK5CYII='; | |
icon_c_7[2][5] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMA/wD/AP83WBt9AAAAaUlEQVR42mP8//8/w0ADxlF'+ | |
'HjDpi1BGjjhh1xKgjRh1BT0cwMjLi1AQ0j5Fujtj6HlOftyAj/R0BsnTAQ4Jcnw+/kEAHdE8T6GKURA9VyglK08jQDYlBmyZgYMD'+ | |
'SBKVg1BGjjhh1BC4AAJSiqb+NvhCCAAAAAElFTkSuQmCC'; | |
icon_c_7[2][6] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMA/wD/AP83WBt9AAAAZUlEQVR42u3SwRGAIAxEUbc'+ | |
'uS6BeS7CuqFecXITZjMzfKxN4JFFEbNURCBAgQIAAAcKJkJQW3ffJhjiPd93e5Ec8j5Z34uvP1+tEn/KdGBnPlJ0Y3ZH/d6KPHZG'+ | |
'd2RCzAwIEiCwXx8e2v9yP3/EAAAAASUVORK5CYII='; | |
icon_c_7[2][7] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMA/wD/AP83WBt9AAAAZUlEQVR42u3QsQ3AIAxEUW4'+ | |
'E5sq8zJURHJAIRSIrBZKd4rvCSODnk5mV7BIIECBAgAABIhIhyX3U/1MYwtr5vj9qPGIMXQnMPgUxhj77MMRKIAvxlQwIEL9B3Oc'+ | |
'0xPYSIECAcOoCT+K3v5E4knUAAAAASUVORK5CYII='; | |
icon_c_7[2][8] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMA/wD/AP83WBt9AAAAbElEQVR42u3QsQ3AIAwEQH4'+ | |
'ECqZiXqZKwQgmkZIUsdxF74J3Z1vg08PMSnZBCCGEEEIIIYRgIgCEj87/QEPYGH7eOx9xHX0TuPsUxDFnabXmItKTcPNtk3iOfvv'+ | |
'9knBzNiLa0RB/lxBCCBHVArM9wr9FTulDAAAAAElFTkSuQmCC'; | |
icon_c_7[2][9] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMA/wD/AP83WBt9AAAAb0lEQVR42u3SQQrAIBADQPM'+ | |
'ED32kL/KRPfiEbQvFQ2VPhaTQ5OaCOoRFRBR1YIQRRhhhhBFGMBEA0kvne6AhorV13jsfcX06G7jPEsQ+Rtlq1SLkTSxzNuI5oze'+ | |
'RNfO/Jj67E7MR1U68jRFGGJHlADoQtb8fdhutAAAAAElFTkSuQmCC'; | |
//--------------------------// | |
// アイコン定義(資源表示) // | |
//--------------------------// | |
var icon_cs = new Array(); | |
// 資源モード(11x11用) 資源アイコン=numx5+maxtype、0=平均,1=木,2=石,3=鉄,4=糧 | |
icon_cs[0] = new Array(); | |
icon_cs[0][1*5+0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAlUlEQVR42u3XwQ2AIBAAQa8'+ | |
'zSqcz5WlQY9Sgsuw+CQbmeBk552mkQjA8wfQE0xNMTzA9wfQE0xNMTzA9wfQE0xNMTzC9puCU0ny2p5wfKHDp+PAIwYJ7A9'+ | |
'dr6wHgwHsDECxYsGDBggULFiz4JrBeq8F1rQfw6d/S5jIvvLhgwQ/BV7/pGvzHBNMTTE8wPcH0BNMbDrwA2HoUTHu/QmkAA'+ | |
'AAASUVORK5CYII='; | |
icon_cs[0][1*5+1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAjUlEQVR42u3XQQqAIBBA0eZ'+ | |
'mHt2bVcuYoiiQ9Pv/UoTxzc6otS4zFYLhCaYnmJ5geoLpCaYnmJ5geoLpCaYnmJ5geoLpNQWXUtanO/v8YIHvyCFY8Hjg3P'+ | |
'GEBr5cgGDBggULFixYsGDBH4G5BM61XsC/v6XTawQL7h/8sqHBPSaYnmB6gukJpieY3nTgDQ4o7j0786IyAAAAAElFTkSuQ'+ | |
'mCC'; | |
icon_cs[0][1*5+2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAkUlEQVR42u3XQQ6AIAwAQfs'+ | |
'zns7P0KOpRqOGKOvumYROORG11ulPhWB4gukJpieYnmB6gukJpieYnmB6gukJpieYnmB6XcGllHZ2Zrk/WOB2YI4QLHg4cG'+ | |
'69ABp4dwGCBQsWLFiwYMGCBd8E5hI413sB7/6WNtP0f3HBgp+CLzY0+IsJpieYnmB6gukJpvc78AxgUQFM5g3eGQAAAABJR'+ | |
'U5ErkJggg=='; | |
icon_cs[0][1*5+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAnUlEQVR42u3Xyw2AIBAAUem'+ | |
'MAizEkizEAugMPRrUGDX4GWeOBANvORlSSs2fCoLhCaYnmJ5geoLpCaYnmJ5geoLpCaYnmJ5geoLpVQXHGPPenun8gALnod'+ | |
's+vO0FC/4auFybDwAHXhuAYMGCBQsWLFiwYMEngeVaCS6rPYBH/5YWl7nhxQULvgg++s2nwW9MMD3B9ATTE0xPML3fgUeQA'+ | |
'xRM1lP3xgAAAABJRU5ErkJggg=='; | |
icon_cs[0][1*5+4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAl0lEQVR42u3XwQ2AIBTAUNm'+ | |
'M0RiNzdCjQY1Rg0ppjwQD73My5JynkQqC4QmmJ5ieYHqC6QmmJ5ieYHqC6QmmJ5ieYHqC6TUFxxjL2Z7l/IACl5KODw9JsO'+ | |
'DewPXaegA48N4ABAsWLFiwYMGCBQu+CazXanBd6wF8+re0ucwLLy5Y8EPw1W+6Bv8xwfQE0xNMTzA9wfSGA88f7hRMF9xrQ'+ | |
'AAAAABJRU5ErkJggg=='; | |
icon_cs[0][2*5+0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAlUlEQVR42u3Uuw3AIAwA0Xg'+ | |
'zRmezfLp0QIGEz3c1SH5IOHrvV6VCMDzB9ATTE0xPMD3B9ATTE0xPMD3B9ATTE0xPML2t4NbavXrnnSdSg9/mh4kQLPh08O'+ | |
'jM/0HSg2ceRLDgROByf7jklhZcCfyBRuHAu0GCBfuH94GHw9C2tGAiePVOavCJCaYnmJ5geoLpCaZXDvwAidoUTLsKuaAAA'+ | |
'AAASUVORK5CYII='; | |
icon_cs[0][2*5+1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAjklEQVR42u3UsQ3AIAwAwXg'+ | |
'zRmezJCUdUCDh938Nkg/JRO/9qVQIhieYnmB6gukJpieYnmB6gukJpieYnmB6gukJpncU3Fp7d+/880Ru8A45BAu+HzxrPJ'+ | |
'EdvPQgggXnAZfb4Zq/tOBK4AUKDnwaJFiwO3wQPJ1GsOD7wZulBt+YYHqC6QmmJ5ieYHrlwB9gme49lH1iwQAAAABJRU5Er'+ | |
'kJggg=='; | |
icon_cs[0][2*5+2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAlklEQVR42u3UsQ3AIAwAwXg'+ | |
'zRmM0NiNJlw4okML7v7fEWTLRWrsyFYLhCaYnmJ5geoLpCaYnmJ5geoLpCaYnmJ5geoLpbQWXUvrqzPOeOBpc+7y5RggW/H'+ | |
'fwEPlZyPHgmYUIFnwQON0Np/ylBWcCv6BROPBukGDB3vA+8CjcLy2YCF6dORr8xwTTE0xPMD3B9ATTSwe+AYnPFExJ/c4ZA'+ | |
'AAAAElFTkSuQmCC'; | |
icon_cs[0][2*5+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAnUlEQVR42u3UwQ2AIBAAQem'+ | |
'MAizEkizEAugM9ecPeZDA3u4bkhsSLpVStkglwfAE0xNMTzA9wfQE0xNMTzA9wfQE0xNMTzA9wfSGgnPOtffOM09aGlyv4/'+ | |
'8w+ylY8Ozg1pnvgywP/vMgggUvBA73h0NuacGRwC+oFQ48GiRYsH94HLg5DG1LCyaCe+8sDZ4xwfQE0xNMTzA9wfTCgW/CN'+ | |
'BRMgcyHLgAAAABJRU5ErkJggg=='; | |
icon_cs[0][2*5+4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAmElEQVR42u3UsQ3AIAwAwXg'+ | |
'zRmM0NiNJlw4okML7vwbJh4SjtXZlKgTDE0xPMD3B9ATTE0xPMD3B9ATTE0xPMD3B9ATT2woupfTVO888cTS49zo/TFTBgv'+ | |
'8OHp35Psjx4JkHESz4IHC6P5xySwvOBH5Bo3Dg3SDBgv3D+8DDYWhbWjARvHrnaPAfE0xPMD3B9ATTE0wvHfgGic8UTHYe2'+ | |
'DgAAAAASUVORK5CYII='; | |
icon_cs[0][3*5+0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAk0lEQVR42u3UsQ3AIAwAwXg'+ | |
'zRmezhJIOKCLh938NEmfJRO/9qVQIhieYnmB6gukJpieYnmB6gukJpieYnmB6gukJpvcruLX2nt4Z74nU4NH+YyIEC74dvD'+ | |
'ozDyQ9eGcgggUnApfb4ZK/tGA6eHUGtcM7AxEsOBG43A6X/KUF08Gnd1KDb0wwPcH0BNMTTE8wvXLgDymtFEw2w8zzAAAAA'+ | |
'ElFTkSuQmCC'; | |
icon_cs[0][3*5+1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAj0lEQVR42u3UsQ3AIAwAwXg'+ | |
'zRvdmScp0QBEJv/9rkDgkOzLz6lQIhieYnmB6gukJpieYnmB6gukJpieYnmB6gukJpvcreIxx79553xO1wTvkECz4fPCs74'+ | |
'nq4KUPESy4DrjdDPfc0oLp4FmkGV76EMGC64DbzXDPLS2YDt6sNPjEBNMTTE8wPcH0BNNrB34AQHvuPb+XPdMAAAAASUVOR'+ | |
'K5CYII='; | |
icon_cs[0][3*5+2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAlUlEQVR42u3UsQ3AIAwAwXg'+ | |
'zRmM0NiMp0wFFpPj931viLJkYY1yVCsHwBNMTTE8wPcH0BNMTTE8wPcH0BNMTTE8wPcH0PgW31ubpzPOeSA3uc9/cIwQL/j'+ | |
't4iXwtJD14ZyGCBScCl7vhkr+0YDp4iSTd8M5CBAtOBC53wyV/acF08OlMavAfE0xPMD3B9ATTE0yvHPgGKaIUTJnXjs4AA'+ | |
'AAASUVORK5CYII='; | |
icon_cs[0][3*5+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAnElEQVR42u3UwQ2AIBAAQem'+ | |
'MAizEkizEAugMffoDHybc3u4bEuaSo7TWtkwVwfAE0xNMTzA9wfQE0xNMTzA9wfQE0xNMTzA9wfR+Bdda+9c7z3tKaHC/jv'+ | |
'nH7KdgwauDR2feAwkPnhmIYMGBwOl2OOUvLZgOHp1B7fDMQAQLDgROt8Mpf2nBdPDXO6HBKyaYnmB6gukJpieYXjrwDWIHF'+ | |
'Ez77vfEAAAAAElFTkSuQmCC'; | |
icon_cs[0][3*5+4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAlklEQVR42u3UsQ3AIAwAwXg'+ | |
'zRmM0NiMp0wFFpPj9X4PEWTIxxrgqFYLhCaYnmJ5geoLpCaYnmJ5geoLpCaYnmJ5geoLpfQpurc3TO897IjV4zr7/mOiCBf'+ | |
'8dvDrzHkh68M5ABAtOBC63wyV/acF08OoMaod3BiJYcCJwuR0u+UsLpoNP76QG/zHB9ATTE0xPMD3B9MqBbymiFExqxYjtA'+ | |
'AAAAElFTkSuQmCC'; | |
icon_cs[0][4*5+0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAjUlEQVR42u3TQQqAIBBA0eZ'+ | |
'mHn1uVu4Cg3Qj2ff/5SjoE4zMPHYqBMMTTE8wPcH0BNMTTE8wPcH0BNMTTE8wPcH0BNObCi6lnO2snhej678E1+7DIh7gt3'+ | |
'XBggULFix4MrgNDe5eRrDg9cG9Pag/PPIgggULFixY8ELgdoYGf5FgeoLpCaYnmJ5getuBL0erTEz9e/DyAAAAAElFTkSuQ'+ | |
'mCC'; | |
icon_cs[0][4*5+1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAiklEQVR42u3TQQ6AIAwAQfs'+ | |
'znt6fqUeDRrgQcdk90kMZEiIzt5UKwfAE0xNMTzA9wfQE0xNMTzA9wfQE0xNMTzA9wfSGgkspe3127ove+T/BV1I8gF/mgg'+ | |
'ULFixY8GDwLTS4eRvBgucHtyL94a4HESxYsGDBgicCV6HBXySYnmB6gukJpieY3nLgA5z/FkyE00qIAAAAAElFTkSuQmCC'; | |
icon_cs[0][4*5+2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAj0lEQVR42u3TsQ3AIAwAwXg'+ | |
'zRmM0NiPpIhEp0KCE57+0C+uQiFLKsVMhGJ5geoLpCaYnmJ5geoLpCaYnmJ5geoLpCaYnmN5UcEqptrPrXozulwTneptyxA'+ | |
'P8thcsWLBgwYIng9vQ4F6CBS8A7iJJf3jkQQQLFixYsOAfgdsZGvxFgukJpieYnmB6gultBz4Bd0BMTAjR+bMAAAAASUVOR'+ | |
'K5CYII='; | |
icon_cs[0][4*5+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAlUlEQVR42u3T0QmAIBgA4dz'+ | |
'MARqkkRqkAdzMegsM0hfJzrvHX0E/wZBSWmYqCIYnmJ5geoLpCaYnmJ5geoLpCaYnmJ5geoLpCabXFRxjzOXsOi+0rv8SnI'+ | |
'/tPmzdH+C3dcGCBQsWLLgzuAwNrl5GsODxwbU9qD/c8iCCBQsWLFjwQOByhgZ/kWB6gukJpieYnmB604FP1MVMTN7QRIwAA'+ | |
'AAASUVORK5CYII='; | |
icon_cs[0][4*5+4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAkElEQVR42u3TQQqAIBQA0f7'+ | |
'NPJpH82bWLjBIN5KNM8uvoE8wSinHToVgeILpCaYnmJ5geoLpCaYnmJ5geoLpCaYnmJ5gelPBKaXazq7zYnT9l+Ba831Y5A'+ | |
'f4bV2wYMGCBQueDG5Dg7uXESx4fXBvD+oPjzyIYMGCBQsWvBC4naHBXySYnmB6gukJpieY3nbgE3dATEzrDQwkAAAAAElFT'+ | |
'kSuQmCC'; | |
icon_cs[0][5*5+0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAl0lEQVR42u3X0Q2AIAwAUbs'+ | |
'Zo7OZ4gSVGESOu29I+j5oQtRaj50KwfAE0xNMTzA9wfQE0xNMTzA9wfQE0xNMTzA9wfSGgkspZ++dNk8sDW49HyZCsOCVwD'+ | |
'coCwceDRIs2Dc8DpwOQ9vSgong7MzXS23qb2nGFhcs+CUoO4MDb7elBdPBvXeWBv8xwfQE0xNMTzA9wfS2A1+J2hRM1ehdo'+ | |
'wAAAABJRU5ErkJggg=='; | |
icon_cs[0][5*5+1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAkUlEQVR42u3XwQ3AIAzAwGY'+ | |
'zRmezthsEVFHA2H+k3CORiFrrdVIhGJ5geoLpCaYnmJ5geoLpCaYnmJ5geoLpCaYnmN5QcCnl7n3zzhN7g3vIIVjwXuAGCg'+ | |
'48GiRYsDs8EJxOI1jw+uCsn4/a1N/SjCsuWPBXUBYOfNyVFkwHd7Y1eMUE0xNMTzA9wfQE0zsO/ABgme49CLjCJwAAAABJR'+ | |
'U5ErkJggg=='; | |
icon_cs[0][5*5+2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAmUlEQVR42u3XwQ2AIBAAQa8'+ | |
'zSqM0OkOtAIlBZNl9cwnz4BKilHLsVAiGJ5ieYHqC6QmmJ5ieYHqC6QmmJ5ieYHqC6QmmNxScUqq9M9d9Ymlwrs/NOUKw4J'+ | |
'XAN6gVDjwaJFiwb3gcuBVuSwsmgpvIj5fa1N/SjC0uWPBLUOsMDrzdlhZMB/fOLA3+Y4LpCaYnmJ5geoLpbQc+AYnPFEzE1'+ | |
'4m/AAAAAElFTkSuQmCC'; | |
icon_cs[0][5*5+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAoElEQVR42u3XwQ2AIBAAQem'+ | |
'MAizEkizEAugMtQIkBpFl9w3JzYNLCCmlZaaCYHiC6QmmJ5ieYHqC6QmmJ5ieYHqC6QmmJ5ieYHpNwTHGXHvnmicMDc7H9n'+ | |
'yYdRcseCTwDSqFA7cGCRbsG24HLg5D29KCieDSma+XWtffUo8tLljwS1DpDA483ZYWTAfX3hka/McE0xNMTzA9wfQE05sOf'+ | |
'ALCNBRMX0ydFAAAAABJRU5ErkJggg=='; | |
icon_cs[0][5*5+4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAmklEQVR42u3XwQ2AIBAAQa8'+ | |
'zSqM0OkOtAIlBZNl9Q3Lz4BKilHLsVAiGJ5ieYHqC6QmmJ5ieYHqC6QmmJ5ieYHqC6QmmNxScUqq9d655Ymlwrfn5MJEFC1'+ | |
'4JfINa4cCjQYIF+4bHgZvD0La0YCK4debrpTb1tzRjiwsW/BLUOoMDb7elBdPBvXeWBv8xwfQE0xNMTzA9wfS2A5+JzxRME'+ | |
'AzzLgAAAABJRU5ErkJggg=='; | |
icon_cs[0][6*5+0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAmElEQVR42u3USwrAIAwA0eZ'+ | |
'mHt2b9bMtBSvUquPMPpC3SCLnvK1UCIYnmJ5geoLpCaYnmJ5geoLpCaYnmJ5geoLpCabXFJxS2mtnzn1iavDZ+2UiBAueCX'+ | |
'yBSuHArUGCBXvD7cDFZWhfWjAd/HTDfz+1rl+6xxcXLPhj8D00uLiMYMHjg2tnpgaPmGB6gukJpieYnmB6y4EP4pIvTGm1u'+ | |
'xgAAAAASUVORK5CYII='; | |
icon_cs[0][6*5+1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAkklEQVR42u3UwQ2AIBAFUbc'+ | |
'zSqcz9a4Jkoiw48ydZN+BH7XW7U+FYHiC6QmmJ5ieYHqC6QmmJ5ieYHqC6QmmJ5ieYHpDwaWUvffNeU/kBveQQ7DgXOAHFB'+ | |
'x4NEiwYP/wQHDzGsGCc4HvKB+P2tSVnrHiggW/DL6EBjevESx4fXBnqcErJpieYHqC6QmmJ5je78AHpYj/Pb/nAgQAAAAAS'+ | |
'UVORK5CYII='; | |
icon_cs[0][6*5+2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAmElEQVR42u3UwQ2AIBAFUbc'+ | |
'zSrM0OkO9GhMkEZFx5k7CO+yPnPPyp0IwPMH0BNMTTE8wPcH0BNMTTE8wPcH0BNMTTE8wva7glFJpfbP/J6YGr+W+eY0QLH'+ | |
'gm8AGqhQP3BgkW7A33A9fCrbRgOvjqht8etaErPWLFBQt+GHwODa4lWPAE4NY3U4O/mGB6gukJpieYnmB6vwNvxMMvTPaPW'+ | |
'gkAAAAASUVORK5CYII='; | |
icon_cs[0][6*5+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAoUlEQVR42u3UwQ2AIBAAQem'+ | |
'MAizEkizEAugM9WtMkERU1t3/JTePu5BSGv5UEAxPMD3B9ATTE0xPMD3B9ATTE0xPMD3B9ATTE0yvKTjGmGtntn1C1+C8TN'+ | |
'eXGWfBgnsC76BSOHBrkGDB3nA7cHEZ2pcWTAef3fDTT+3VL/3GFxcs+GbwMTS4uIxgwd8H1850Df5igukJpieYnmB6gun9D'+ | |
'rwC5fQvTLXT0wUAAAAASUVORK5CYII='; | |
icon_cs[0][6*5+4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAm0lEQVR42u3UwQ2AIBAAQem'+ | |
'M0iiNzlC/xgRNRGDZ/V9y87gLOedtpYJgeILpCaYnmJ5geoLpCaYnmJ5geoLpCaYnmJ5gek3BMcbydubYJ0wNLiU9XyYkwY'+ | |
'JnAp+gWjhwa5Bgwd5wO3B1GdqXFkwH393w30+t65fu8cUFC/4YfA0Nri4jWPD44LczU4NHTDA9wfQE0xNMTzC95cA7xMMvT'+ | |
'AZFCVEAAAAASUVORK5CYII='; | |
icon_cs[0][7*5+0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAi0lEQVR42u3QQQ6AIAwAQfs'+ | |
'zns7PFG+mFzHRIMvusQ1Jh6i1bisVguEJpieYnmB6gukJpieYnmB6gukJpieYnmB6gul9Ci6l7E/ftHtianCr/5gIwYJnAp'+ | |
'+gXN7jwFfQ3V6w4B+C8wwN7vkQwYIFCxYsWLBgwYJfAucZGjwiwfQE0xNMTzA9wfSWAx+C9zBMSwINdQAAAABJRU5ErkJgg'+ | |
'g=='; | |
icon_cs[0][7*5+1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAiElEQVR42u3QQQoCQQwAQed'+ | |
'n+/T5mXqUQdAFRbe3+hoCqYw55+VMDeB4wPWA6wHXA64HXA+4HnA94HrA9YDrAdcDrvdV8LZt170793vGscF7yAMY+FjgZ5'+ | |
'RlngM/gl7NgYH/EbyUBr/1EGBgYGBgYGBgYOAPgZfS4F8EXA+4HnA94HrA9U4HvgEAzwJMTQ8xdQAAAABJRU5ErkJggg=='; | |
icon_cs[0][7*5+2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAj0lEQVR42u3QwQ2AIBAAQa8'+ | |
'zSqM0OkP9GXyIiUZZdp93uYQhSinLTIVgeILpCaYnmJ5geoLpCaYnmJ5geoLpCaYnmJ5geq+CU0r17s32nhganGu/OUcIFj'+ | |
'wSeAedkM0eBz6CrvaCBf8Q3M7Q4J4PESxYsGDBggULFiz4IXA7Q4O/SDA9wfQE0xNMTzC96cArylwwTDdvw7kAAAAASUVOR'+ | |
'K5CYII='; | |
icon_cs[0][7*5+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAlElEQVR42u3QwQ2AIBAAQem'+ | |
'MAizEkizEAugM9WfuIyYaZd193oXkhlRKGf5UEgxPMD3B9ATTE0xPMD3B9ATTE0xPMD3B9ATTE0zvUXDOuV59s92TugbXZW'+ | |
'o/ZpwFC+4JvINicY8DH0Fne8GCPwiOMzS45UMECxYsWLBgwYIFC74JHGdo8BsJpieYnmB6gukJpvc78Ao6gDBMdmmtLQAAA'+ | |
'ABJRU5ErkJggg=='; | |
icon_cs[0][7*5+4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAj0lEQVR42u3QQQ6AIAwAQfs'+ | |
'znsbT+BnqzfSiJhpl2T22IekQrbVlpkIwPMH0BNMTTE8wPcH0BNMTTE8wPcH0BNMTTE8wvVfBpZR+9812TwwN7r1ePyaqYM'+ | |
'EjgXdQLu9x4CPobC9Y8A/BeYYGX/kQwYIFCxYsWLBgwYIfAucZGvxFgukJpieYnmB6gulNB14BylwwTGWlvYsAAAAASUVOR'+ | |
'K5CYII='; | |
icon_cs[0][8*5+0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAlElEQVR42u3UMQ6AIAxAUXs'+ | |
'zjs7NFDfTBRlM7Of/tWnSN0D03o+dCsHwBNMTTE8wPcH0BNMTTE8wPcH0BNMTTE8wPcH0PgW31s7VnXFPlAaP3h8TIVhwJf'+ | |
'ANyuU5DvwEzeaCBRcA59Dg6TGCBdcCb/eGt/ylBdPBOTR4eoxgwf8Hr+6UBv8xwfQE0xNMTzA9wfS2A18/EUpM+T3ECwAAA'+ | |
'ABJRU5ErkJggg=='; | |
icon_cs[0][8*5+1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAkUlEQVR42u3UQQrAIAwAweZ'+ | |
'nPt2ftT2WWhAPBbPZvQYhc4jRez8qFYLhCaYnmJ5geoLpCaYnmJ5geoLpCaYnmJ5geoLp/QpurZ2rb+59Ijd4hRyCBecCf1'+ | |
'Fecxz4CZrNBQtOAB5Cg6fbCBacC1zuhiv+0oLp4CE0eLqNYMH7gxdLDd4xwfQE0xNMTzA9wfTKgS/Z2RBMhMulowAAAABJR'+ | |
'U5ErkJggg=='; | |
icon_cs[0][8*5+2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAlklEQVR42u3UMQ6AIAxAUXs'+ | |
'zjsbRuBnqZnBABxP7+X9tmvQNEK21baVCMDzB9ATTE0xPMD3B9ATTE0xPMD3B9ATTE0xPML1PwaWU/nbnuCdSg2t/bq4Rgg'+ | |
'VnAp+gG3KY48BX0GwuWHAC8BgaPEuw4GTg5d7wkr+0YDp4DA2eJVhwAvDbndTgPyaYnmB6gukJpieY3nLgHQN+Skx8H7aUA'+ | |
'AAAAElFTkSuQmCC'; | |
icon_cs[0][8*5+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAnUlEQVR42u3UsQ2AIBBAUdm'+ | |
'MARzEkRzEAdgMtTM0SGHiff5vL5fcKyCVUpaZSoLhCaYnmJ5geoLpCaYnmJ5geoLpCaYnmJ5geoLpfQrOOdfRneueFBpcj+'+ | |
'39MesuWHAk8A1qa+c48BPUmwsWHADchgZ3jxEsOBZ4ujc85S8tmA5uQ4O7xwgW/H/w6E5o8B8TTE8wPcH0BNMTTG868AkNe'+ | |
'0pMh0pxewAAAABJRU5ErkJggg=='; | |
icon_cs[0][8*5+4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAmElEQVR42u3UsQ3AIAwAwXg'+ | |
'zRmM0NiNJF9GQFJHw899alnwFRGvt2KkQDE8wPcH0BNMTTE8wPcH0BNMTTE8wPcH0BNMTTO9XcCmlf9257onU4N7r+2OiCh'+ | |
'acCXyDxsY5DvwEzeaCBScAj6HB02MEC84F3u4Nb/lLC6aDx9Dg6TGCBa8P/rqTGrxigukJpieYnmB6gultBz4BA35KTLWU9'+ | |
'PYAAAAASUVORK5CYII='; | |
icon_cs[0][9*5+0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAl0lEQVR42u3UMQrAIBAAwdz'+ | |
'PfLo/S0wXbNQi4K27rQo3gkat9TqpEAxPMD3B9ATTE0xPMD3B9ATTE0xPMD3B9ATTE0zvV3Ap5V490+aJ1ODW/DARggVnAr'+ | |
'+gvn4dB/6CRuuCBScA96HBw2EEC94fPNqDesMzFyJYcCLwcW/4yF9aMB28eiY1eMcE0xNMTzA9wfQE0zsO/ADmSi9MIHSI4'+ | |
'QAAAABJRU5ErkJggg=='; | |
icon_cs[0][9*5+1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAk0lEQVR42u3UQQqAMAwAQfO'+ | |
'zPr0/U4+iQu1BaDa711DIFNrovW+VCsHwBNMTTE8wPcH0BNMTTE8wPcH0BNMTTE8wPcH0fgW31vbZM+c+kRs8Qw7BgnOB3y'+ | |
'i3OQ58BY3mggUnAD9Cg4fbCBa8PngU6Q1/uhDBgvOAy73hmr+0YDp4stTgFRNMTzA9wfQE0xNMrxz4AJTq/z0yW/JGAAAAA'+ | |
'ElFTkSuQmCC'; | |
icon_cs[0][9*5+2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAmUlEQVR42u3UwQ2AIBAAQa8'+ | |
'zSqM0OkP9GXygDxNv2f1eLmFIIFpr20qFYHiC6QmmJ5ieYHqC6QmmJ5ieYHqC6QmmJ5ieYHqfgksp/e3OcZ5IDa79ublGCB'+ | |
'acCXyCbshhjgNfQbO5YMEJwGNo8CzBghOAp0jSG35yIYIFJwIv94aX/KUF08Fvd1KD/5hgeoLpCaYnmJ5gesuBd8h7L0wW+'+ | |
'lIAAAAAAElFTkSuQmCC'; | |
icon_cs[0][9*5+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAn0lEQVR42u3UsQ2AIBQAUdm'+ | |
'MARzEkRzEAdgMtTM0aGHCP+5aIPmPBFIpZZmpJBieYHqC6QmmJ5ieYHqC6QmmJ5ieYHqC6QmmJ5jer+Ccc/165ponhQbXY3'+ | |
's/zLoLFhwJfIPa2nUc+AnqrQsWHADchgZ3hxEseHxwbw/qDb+5EMGCA4Gne8NT/tKC6eCvZ0KDR0wwPcH0BNMTTE8wvenAJ'+ | |
'+msL0y6tO6WAAAAAElFTkSuQmCC'; | |
icon_cs[0][9*5+4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAAAmUlEQVR42u3UQQ7AEBQA0bq'+ | |
'Zozmam2m7a2ywaOKPmS2S/ySkWut1UkkwPMH0BNMTTE8wPcH0BNMTTE8wPcH0BNMTTE8wvV/BOee2euaZJ4UGt1bmh0lFsO'+ | |
'BI4BfU16/jwF/QaF2w4ADgPjR4OIxgwfuDR3tQb3jmQgQLDgQ+7g0f+UsLpoNXz4QG75hgeoLpCaYnmJ5geseBb8h7L0w+v'+ | |
'THoAAAAAElFTkSuQmCC'; | |
// 資源モード(15x15用) 資源アイコン=numx5+maxtype、0=平均,1=木,2=石,3=鉄,4=糧 | |
icon_cs[1] = new Array(); | |
icon_cs[1][1*5+0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAcElEQVR42u3VQQqAIBBA0eZ'+ | |
'mHt2bVZugkqKFmtH7W2V8iGDknKcvFcDAwMDAwMAjBQwMDAxcllKar9bW+TEkeK0cHgHc5Els+GHBZzwwMDAwcF/w3cexrwa+6dd'+ | |
'8OKjSbf8X/GTfMOCeAQMDAwO/2wIfHc0tF6Ao+gAAAABJRU5ErkJggg=='; | |
icon_cs[1][1*5+1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAbUlEQVR42u3VSwqAMAxAQXO'+ | |
'zHr03UzeC4gdBWyPM25VCOotCotY6/KkABgYGBgYGzhQwMDAw8L5Synh2N8+PnOAjcgA3+hLLKSt4hwcGBgYG7gq+Whzr3sC3Xc2'+ | |
'bl4Afgm+UBtwzYGBgYOBvmwBLN7EtlGYAfwAAAABJRU5ErkJggg=='; | |
icon_cs[1][1*5+2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAdElEQVR42u3VWwqAIBBG4f6'+ | |
'dzdJc2uzMegksKXzwMtE5r4p8ijBy9+1LCTBgwIABAwYcKcCAAQMGXGdm+WntOF8hwSnX5iQBHvIlTnxY8B0PGDBgwIDngt8GR1k'+ | |
'P/NDRfLlEp9f+L7hlXxjwzAADBgwY8Np2w8bNLSTtNCoAAAAASUVORK5CYII='; | |
icon_cs[1][1*5+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAeUlEQVR42u3VwQ2AIAxAUbt'+ | |
'ZB3AQRnIQB+hm6IVEJRAOgDX+f4WUF0KCmNnypQQwYMCAAQMG7CnAgAEDBpynqrG0ds4Xl+C4h3z4ugEe8iQS3i34iQcMGDBgwHP'+ | |
'BtY/jWg/80K/5dlCn2/4vuGWfG/DMAAMGDBjwux18ns0tIgW66QAAAABJRU5ErkJggg=='; | |
icon_cs[1][1*5+4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAdElEQVR42u3VwQnAIAxA0Wa'+ | |
'zjOZo2SztpdBWFA9qI/5/VeJDBMXMjpUSwIABAwYMGHCkAAMGDBhwnqp6ae2aLyHB7ikfLgnwkCdx48OCv3jAgAEDBjwXXPs4nvX'+ | |
'AD/2aXwd1uu19wS37woBnBhgwYMCA/+0Ew8bNLZ5CNl8AAAAASUVORK5CYII='; | |
icon_cs[1][2*5+0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAeElEQVR42u3TQQqAMAwFUXO'+ | |
'zHD0307pwJQkFpf7gzLaFvEJjEbF1ygADBgwYMGDASgEGDBgw4Hvuvs/cG7NMBjyqB5kBfgTOzq6HSIGrhwD+5ZdouXRtwScsSxb'+ | |
'8BgxwBc6S/BLpINWlawOeuScDXhlgwIABA/62A+GmzS3ethXLAAAAAElFTkSuQmCC'; | |
icon_cs[1][2*5+1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAcklEQVR42u3TQQqAMAwFUXO'+ | |
'zHD03UzeuJLFQqT84s20hr5BaRGydMsCAAQMGDBiwUoABAwYM+J677yP3zlmmA34iG+BJcNZ1ogQuHwL4jyvR89O1BRckWfAbMMA'+ | |
'VOEtzJdJJgCfBA8mAVwYYMGDAgL/tAN5QsS3Hn0obAAAAAElFTkSuQmCC'; | |
icon_cs[1][2*5+2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAeUlEQVR42u3TQQqAMAwFUXO'+ | |
'zHq1Hy82qgjtJKFj0B2fWgb5Aau6+VcoAAwYMGDBgwEoBBgwYMOB7rbUxM3e8ZTLgPnJzNwP8CBxCr0WkwNkigH95EiU/XVnwCYu'+ | |
'SBa+AAc7AUZInESX76cqAZ+ZkwG8GGDBgwIC/bQdips0tH26T/AAAAABJRU5ErkJggg=='; | |
icon_cs[1][2*5+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAgUlEQVR42u3TwQmAMAyFYbN'+ | |
'ZB3AQR3IQB8hmVQ+eJKVQ0Rf83zWBfIHE3H3KFAMMGDBgwIABKwUwYMCAAd9TSqk9fccskwHXbWkPmlfAQ+Codi0iBW4tAviXJ5H'+ | |
'y6dKCT1gUWfATMMAtcBTJkwgHqT5dGnBPnwz4zQAGDBgw4G+zA/+XzS0d0zlPAAAAAElFTkSuQmCC'; | |
icon_cs[1][2*5+4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAe0lEQVR42u3TQQqAQAiF4by'+ | |
'ZR5ujzc2sFq3CYaChnvS/rYKfoNZ73yrFAAMGDBgwYMBKAQwYMGDA97h7zPQds0wGHNHGg6wBfgTOatciUuDRIoB/eRIln64s+IR'+ | |
'lkQWvgAEegbNInkQ6SPXpyoBn+mTAbwYwYMCAAX+bHWKmzS1nKtu5AAAAAElFTkSuQmCC'; | |
icon_cs[1][3*5+0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAc0lEQVR42u3TQQrAMAhE0c7'+ | |
'NPLo3a7PpqkQChdYhf7YKPkGVmYdTBBgwYMCAAQPuFMCAAQMG/ExEnCt9Y5bagEfqQRLgV+BZ7V6kFbhaBPCWJ2H5dHbgWa3lSVS'+ | |
'LAN7yJCyfzg680tcG/GUAAwYMGPC/uQABl80tBU2T5gAAAABJRU5ErkJggg=='; | |
icon_cs[1][3*5+1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAb0lEQVR42u3TSwqAMAxFUbO'+ | |
'zLD07s04cST8g6Hv03mkLPYUkqupwKgADBgwYMGDASgEGDBgw4GeZea7cu94KHfCMHIBfgnvdJ0rg4UcA7zgSnktnB+6lOBLDjwD'+ | |
'ecSQ8l84OvJAM+MsAAwYMGPC/Nb5BsS3x8PePAAAAAElFTkSuQmCC'; | |
icon_cs[1][3*5+2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAdUlEQVR42u3TQQrAMAhE0c7'+ | |
'NPFqO5s3SLrorkUAgVfJnLfgGVO5+VYoAAwYMGDBgwJkCGDBgwIC/MbM+M/fsUhpw67G5SYCXwEPoWyQVOCoC+MiTKPl05cBDaMa'+ | |
'TiIoAPvIkSj5dOfDMXBrwzgAGDBgw4H9zA4KIzS3tcmqGAAAAAElFTkSuQmCC'; | |
icon_cs[1][3*5+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAe0lEQVR42u3TwQ2AQAhEUem'+ | |
'MAizEkizEAuhs9eLJLNnERJnsnyskPBKwiFiUYoABAwYMGDDgSgEMGDBgwM+4exvpu2ZZGXA7tnzQugN+Be7V7kVKgbNFAE95EpJ'+ | |
'PJwfu1UqeRLYI4ClPQvLp5MAjfWXAXwYwYMCAAf+bEx+IzS1VU+imAAAAAElFTkSuQmCC'; | |
icon_cs[1][3*5+4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAdUlEQVR42u3TwQnAQAhE0di'+ | |
'ZpW1pdmZyySmsLAQSh/1zVfAJahFxKMUAAwYMGDBgwJ0CGDBgwICfcfdc6btmWRtw5qgH2QD8Cjyr3Yu0AleLAN7yJCSfTg48q7U'+ | |
'8iWoRwFuehOTTyYFX+tqAvwxgwIABA/43J4KIzS0CSt/VAAAAAElFTkSuQmCC'; | |
icon_cs[1][4*5+0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAbklEQVR42u3STQqAIBCA0eZ'+ | |
'mHt2bVdDGKN30N8H7dqOgTzBqrdOfCmBgYGBgYOBMAQMDAwMfK6XM7byeGaP1FOC17cCIHfhsHRgY+GZwW3pw9yLgi+DeXsovMXo'+ | |
'IMDDwy+B2Tg9+ImBgYGDgb1sA/ib3LQPIUJEAAAAASUVORK5CYII='; | |
icon_cs[1][4*5+1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAa0lEQVR42u3SOw6AIBBAQfd'+ | |
'mHJ2bqY0JfrDxtybzOrZYhoSotQ5/KoCBgYGBgYEzBQwMDAy8r5Qytud5Z5zNc4AXWmzAB3NgYOCbwavSg7s3AV8E98r4JU4fAgw'+ | |
'M/DK4KT34iYCBgYGBv20Chk3PLe+CwM4AAAAASUVORK5CYII='; | |
icon_cs[1][4*5+2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAb0lEQVR42u3Suw2AMAxAQbx'+ | |
'ZRsto2QyQaIL4NPyMdK+zC+siJVprw58KYGBgYGBg4EwBAwMDA28rpYz9PN+Ms30KcB0XW41Ygff2wMDAN4P70oOPAr4KPoRm/BJ'+ | |
'nDwEGBn4Z3M/pwU8EDAwMDPxtE5b29y0Pk3TFAAAAAElFTkSuQmCC'; | |
icon_cs[1][4*5+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAeElEQVR42u3S2w2AMAiFYdm'+ | |
'MARzEkRzEAdismviCse2Lt2Pynzcgga9JLSKGP8UAAwYMGDBgwEoBDBgwYMDnuHvJ9bbTen0JcFmmfeE4H8C1PmDAgG8G58iDm4c'+ | |
'AXwS3ZpJfovcQwIABvwzOtTz4iQAGDBgw4G+zAkaG9y0dD7avAAAAAElFTkSuQmCC'; | |
icon_cs[1][4*5+4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAcklEQVR42u3SSw6AMAhFUdk'+ | |
'ZS+vS2BmaOMFoO6mfZ3LfDEjgNKlFxPKnGGDAgAEDBgxYKYABAwYM+Bx3z1pvO23UlwBntn2htQP4qg8YMOCbwTXy4O4hwJPg3kz'+ | |
'yS4weAhgw4JfBtZYHPxHAgAEDBvxtVpb29y2C4cBQAAAAAElFTkSuQmCC'; | |
icon_cs[1][5*5+0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAeklEQVR42u3VQQ6AMAgFUbk'+ | |
'ZR+dmWteGpguqnziztQlvAdEi4uiUAQYMGDBgwICVAgwYMGDAz9z9XHk3ZpkMeDQfZAa4BHzDsmTBFTDAM3CW5Eqkg1SPrg04+1a'+ | |
'921t/zTuO8Z/gdivR8ujagVfeyYDfDDBgwIABf9sF4abNLSYGVjoAAAAASUVORK5CYII='; | |
icon_cs[1][5*5+1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAdElEQVR42u3VQQ6AMAgFUbk'+ | |
'ZR+dm6t5Qm0j1E2fWTXgLSC0itk4ZYMCAAQMGDFgpwIABAwZ8zd33mXfnLNMB35ENcBF4QJIFV8AAj8BZmiuRTgL8EJxVvNtLv+Y'+ | |
'Vx/hPcLuV6Hl07cATyYDfDDBgwIABf9sB3lCxLVLpt90AAAAASUVORK5CYII='; | |
icon_cs[1][5*5+2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAe0lEQVR42u3VsQ2AMAwFUbx'+ | |
'ZRsto3ixAjRylcOBb3NWW8gpbMXc/KmWAAQMGDBgwYKUAAwYMGPCz1tpYmbveMhlwH3NzNwOcAr5hUbLgDBjgGThKciWiZI+uDDi'+ | |
'EJu/21q95xzH+E1xuJUoeXTnwypwM+M0AAwYMGPC3nWKmzS0E9l6yAAAAAElFTkSuQmCC'; | |
icon_cs[1][5*5+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAg0lEQVR42u3VwQ2AMAiFYdm'+ | |
'MARzEkRzEAdis6tnQ9EAV4v+uJXnfAVIxs6VSBDBgwIABAwacKYABAwYM+BlVbSNzV5ekAbdj6xetO+AQ8A3zkhYcAQPcA3tJuRJ'+ | |
'uUdajKwP23qJ3e+rXPOMY/wkutxIlj64ceGQuDfjNAAYMGDDgb3MC/5fNLb8y6t8AAAAASUVORK5CYII='; | |
icon_cs[1][5*5+4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAfUlEQVR42u3VsQ3AMAhE0bA'+ | |
'Zo3k0NiNJHWG5wAko/1oj3StAFjM7OkUAAwYMGDBgwJUCGDBgwICfUVVfmbu6pAzYfcyLZABOAd+wKGXBGTDAM3CUkisRFlU9ujb'+ | |
'g6C17t7d+zTuO8Z/gdivR8ujagVfmyoDfDGDAgAED/jYnYqbNLYkZqNwAAAAASUVORK5CYII='; | |
icon_cs[1][6*5+0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAeUlEQVR42u3TQQqAMAxEUXO'+ | |
'zHD0307pVUgq2dQJ/1oF5i4lFxFEpBhgwYMCAAQNWCmDAgAEDfsfdz5G71mUy4JZ+kRngKeAblkUWPAMGuAfOIjmJtEj16cqBn5O'+ | |
'Yve2lT7fiGQGXm0RaBPgjeOROBrwzgAEDBgz431x6k+EtfzKUgQAAAABJRU5ErkJggg=='; | |
icon_cs[1][6*5+1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAc0lEQVR42u3TQQ6AMAgFUbk'+ | |
'ZR+dm6tqG2kRqf5OZNQlvARYRx04ZYMCAAQMGDFgpwIABAwbc5u7nyNy9y3TAb2QDXATukGTBFTDAPXCW5kmkmwAXgZ+k4tue+nQ'+ | |
'znhHwfieRbgL8ETyQDPjPAAMGDBjw2i6O670tWxpfNAAAAABJRU5ErkJggg=='; | |
icon_cs[1][6*5+2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAeklEQVR42u3TQQrAMAgF0Xo'+ | |
'zj5ajebM03bYYAjWtwsw6kLf4ipkdlRLAgAEDBgwYcKYAAwYMGPAzVe0r78Zfkgbc+tzcRACHgC+YV1pwBAzwDOyVchJeaY+uHPg'+ | |
'+iehtbz26HccIuNwkvAC/Ba+8SwP+MsCAAQMG/G8n66ThLbHfc4gAAAAASUVORK5CYII='; | |
icon_cs[1][6*5+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAgklEQVR42u3TsQ2AMAxEUbx'+ | |
'ZBmAQRmIQBvBmAVqQo0hxwJb+1ZbuFWdR1SVTBDBgwIABAwYcKYABAwYM+J1SSu25u7okDLgeW7to3QG7gG+YlbBgDxjgFthKyEm'+ | |
'YRVGfLh34OQnvbU99uhnPCDjdJMwiwIPgnrsw4C8DGDBgwID/zQl8ROEtn9QurAAAAABJRU5ErkJggg=='; | |
icon_cs[1][6*5+4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAfElEQVR42u3TQQ6AMAhEUbk'+ | |
'ZR+vRuBnWrYamia1C8mdNMm8xiJkdlSKAAQMGDBgw4EwBDBgwYMDPqKrP3PUuSQN2b+MiaYCXgC9YlLTgFTDAI3CUlJMIi7I+XTn'+ | |
'wfRKrt7316XY8I+BykwiLAL8Ez9ylAX8ZwIABAwb8b07rpOEtyB1X7gAAAABJRU5ErkJggg=='; | |
icon_cs[1][7*5+0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAbElEQVR42u3PQQqAMAwAQfO'+ | |
'zPr0/03oQCmIRURph9pZQyDRqrcufCmBgYGBgYOBMAQMDAwOfK6Wsd961W5EG3BofigB+BbzD+vp9WvABu9oDPwH3c3rw6CPAwMD'+ | |
'AwHPB/Zwe/EXAwMDAwHPbAOzQ4i1TWPn9AAAAAElFTkSuQmCC'; | |
icon_cs[1][7*5+1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAaElEQVR42u3PSwqAMAxAQXO'+ | |
'zHr03UzdCUfxQlEaYtwyBTKLWOv2pAAYGBgYGBs4UMDAwMPCxUsr8ZG+9FXnAd+QAfgm8JzXztOANdjYH7gI3pQdfPgIMDAwMPBb'+ | |
'clB78RcDAwMDAY1sAAg3ALcjMbwcAAAAASUVORK5CYII='; | |
icon_cs[1][7*5+2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAb0lEQVR42u3PSwqAMAxAQXO'+ | |
'zHq1H6838LISKKCKKEebtEgKdRmtt+FMBDAwMDAwMnClgYGBg4H2llPHK3fxWpAHX8dxcI4AfAS+wDbTbpwWvsKM98B1wP6cHn30'+ | |
'EGBgYGPhbcD+nB78RMDAwMPC3TZGI4i3pDQcRAAAAAElFTkSuQmCC'; | |
icon_cs[1][7*5+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAdUlEQVR42u3P0QmAMAxFUbN'+ | |
'ZBnAQR3IQB8hmVT+EgLQUUfqEe/8SCjm1iJj+lAEGDBgwYMCAlQIMGDBgwPfcvfS8O26ZDLhsS/vQvAJ+BXzCcnkvC75gtT3gJ+A'+ | |
'8y4NbHwEMGDBgwGPBeZYHfxFgwIABAx7bDkpg4i0pOh40AAAAAElFTkSuQmCC'; | |
icon_cs[1][7*5+4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAcElEQVR42u3PQQqAMAwFUXO'+ | |
'zHK1Hy82iLgqBYhFR+oWZXUIhrxYR258ywIABAwYMGLBSgAEDBgx4zN3zzrvjlsmAM9v8kDXAr4BPWK3uZcEddrUH/ARcZ3nw7CO'+ | |
'AAQMGDHgtuM7y4C8CDBgwYMBr2wGRiOItrdAIwQAAAABJRU5ErkJggg=='; | |
icon_cs[1][8*5+0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAeElEQVR42u3TQQrAIAwF0eZ'+ | |
'mObo3a+2iECgpgmJ/YGYZAnkLtdbaUSkDDBgwYMCAASsFGDBgwIDfufs5stdvmQy4933IDPAS8A2Lxbks+IFlc8Cz4Jg8OD0EeBG'+ | |
'43JMo+enKgWPy4PQQ4EnwyJ4MeGeAAQMGDPjfLjA/9S1MyTcCAAAAAElFTkSuQmCC'; | |
icon_cs[1][8*5+1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAdUlEQVR42u3TQQqAMAwFUXO'+ | |
'zHD03UzcFqwQLLfoDM8tQyFukFhFbpQwwYMCAAQMGrBRgwIABA37m7vvIu3OX6YDfyAZ4EfhOusxlwQ2WzQHPgrvkwekmwIvA5U6'+ | |
'i4qcrB+6SB6ebAE+CB5IBfxlgwIABA/63A+pWyS14ueRCAAAAAElFTkSuQmCC'; | |
icon_cs[1][8*5+2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAeklEQVR42u3TwQnAMAhA0bq'+ | |
'Zo2U0N0vbQ8FSLIGEVuH/owi+QyJmtlVKAAMGDBgwYMCZAgwYMGDAz1S1j+wdtyQNuPV3cxMBvAR8wm5QN08LvmDRHPAs2JceHAV'+ | |
'4Fbjckyj56cqBfenBUYBnwSN7acBfBhgwYMCA/20HkXD1LRQVSWwAAAAASUVORK5CYII='; | |
icon_cs[1][8*5+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAgElEQVR42u3TwQmAMAxAUbN'+ | |
'ZB3AQR3IQB8hmVQ9CQFIKLZrA/8cQyDu0oqpLpgQwYMCAAQMGHCnAgAEDBvyulFJ79q5bEgZcj619aN0BTwHfMJudhwU/MG8OeBR'+ | |
'sCw92DwGeBE73JFJ+unRgW3iwewjwILhnLwz4ywADBgwY8L+dFbD1LRqhjQUAAAAASUVORK5CYII='; | |
icon_cs[1][8*5+4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAe0lEQVR42u3TwQnAMAhA0bp'+ | |
'ZRstobmbTQ0EolkBCq/D/UQTfIRFVPSolgAEDBgwYMOBMAQYMGDDgZ601m9kbtyQN2Ky/H5IOeAv4gvn8PC34hkVzwKtgX3pweAj'+ | |
'wJnC5J1Hy05UD+9KDw0OAF8Eze2nAXwYYMGDAgP/tBJFw9S1tw2xPAAAAAElFTkSuQmCC'; | |
icon_cs[1][9*5+0] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAeUlEQVR42u3T0QqAIAxG4fZ'+ | |
'me/S9WdlFMIiJYNQvnXOpwj5BLSK2lTLAgAEDBgwYsFKAAQMGDPieu+8j59oskwG3+oPMAD8CPmG5vC4LvmDVOuBZcE4eXA4CPAm'+ | |
'u9iSfRO8igH/5JJb8dMuBR87JgN8MMGDAgAF/2wGXUuEtUV5r+QAAAABJRU5ErkJggg=='; | |
icon_cs[1][9*5+1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAdUlEQVR42u3TSwqAMAxFUbO'+ | |
'zLD07UycFP0QLFX3Be4ehkFNoLSKmShlgwIABAwYMWCnAgAEDBnzO3eeec+su0wHfkQ3wQ+AjaTOXBTdYNgc8Ct4lD043AR4EZyk'+ | |
'+icuLAP7jk6j56cqBO5IBvxlgwIABA/62BTnKvS2FydqPAAAAAElFTkSuQmCC'; | |
icon_cs[1][9*5+2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAe0lEQVR42u3TUQqAIAyA4Xa'+ | |
'zHc2j7WZmD4ERE8Gojf7/cQz8BBUz2zIlgAEDBgwYMOBIAQYMGDDge6paZ/baWRIGXOrYXEQAPwI+YBdoNw8LPmHeHPAquC882Av'+ | |
'wKtiFRnwSo4sA/uWTSPnp0oFn9sKA3wwwYMCAAX/bDghy4S0NHYLTAAAAAElFTkSuQmCC'; | |
icon_cs[1][9*5+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAgklEQVR42u3T0QmAMAxFUbN'+ | |
'ZB3AQR3IQB8hmVT+EgKQUKprgfZ9pIKeQiKpOmSKAAQMGDBgw4EgBDBgwYMD3lFJqT98xS8KA67a0B80r4EfAJ8zG1sOCL5hXBzw'+ | |
'KtgkPdgcBHgR7byFXovURwL9ciZRHlw7c0xcG/GYAAwYMGPC32QGZA+EtmbdcHQAAAABJRU5ErkJggg=='; | |
icon_cs[1][9*5+4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAwADAAMCNeLu6AAAAfElEQVR42u3TYQqAMAiG4bz'+ | |
'ZjrajeTOrH4EQjsGilN7vpxN8BiqqulWKAAYMGDBgwIAzBTBgwIAB39Nas5m+Y5akAZv18SDpgB8BnzAfX08LvmBRHfAq2Cc9OBw'+ | |
'EeBEcvaVcidFHAP9yJUoeXTnwTF8a8JsBDBgwYMDfZgcIcuEtoElkPAAAAABJRU5ErkJggg=='; | |
// 資源モード(20x20用) 資源アイコン=numx5+maxtype、0=平均,1=木,2=石,3=鉄,4=糧 | |
icon_cs[2] = new Array(); | |
icon_cs[2][1*5+0] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAY0lEQVR42u3UQQrAIAxE0c7'+'NcvTczOrCCtJuJCRd/FkFF8MjYOTuV3UEAgQIECBAgMhEmFnb33qP0hE9q0SqQcx5YEoQ+0ZAgPgF4u13zJxgQu7EU3a4kbCLmb6'+'J6IAAAeIrN59NkWIunq91AAAAAElFTkSuQmCC'; | |
icon_cs[2][1*5+1] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAW0lEQVR42u3UPQoAIAhA4by'+'ZR/dm1VJEP0uENrw3NshHoGJmKToBAQIECBAgQHgiVDXPb3WO+CNGhkQhWjkIsfwICBA/IHbb0brBvLkTfZo34pAb4nUgQIA4VQC'+'K6n9iLPGhRQAAAABJRU5ErkJggg=='; | |
icon_cs[2][1*5+2] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAZElEQVR42u3UsQnAMAxE0dx'+'mGs2jaTPHTRwwSWOE5OJfqUI8DiS5+1UdgQABAgQIECAyEWbW19nYo3RE66+jSTWICRiYEsTaCAgQRyC+ruPJDibkT0zQZiNhHzO'+'9ieiAAAHiLzeBiZFig1ditAAAAABJRU5ErkJggg=='; | |
icon_cs[2][1*5+3] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAa0lEQVR42mM8cOAAw0ADxlF'+'HjDpi1BGjjhh1xKgjRh1BT0c4ODj8RxcDmsNId0f835KBMMRnxsA4AsYGOWZAHIEeIqOOGHXEoHAEttwBA+Q4hirlBNwwMkOEaiU'+'m3UOC2mDUEaOOGHUELgAAalWRYnBbnpoAAAAASUVORK5CYII='; | |
icon_cs[2][1*5+4] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAZklEQVR42u3UMQrAMAiF4Xo'+'zj5ajeTObDkkgtEsQ7fC/STI8PoQoZnZVR0CAAAECBAgQmQhV9f2t90g6wr2tEmk1iDE/mBLEvhEQIH6BePsdIyeYkDsxyw43EnY'+'x0zcRHRAgQHzlBoGJkWLJBgLoAAAAAElFTkSuQmCC'; | |
icon_cs[2][2*5+0] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAY0lEQVR42u3TQQ6AIAxEUed'+'mPXpvprhwA+nGmKnRP0tIymMCysytOwIBAgQIECBAOBERsVd7Y55siJF1mORFzGsnyoqomvlfE695E9fN57Qg7hz6vSaWYd2/w97'+'E0wEBAkSVA3S9kWKCsbfvAAAAAElFTkSuQmCC'; | |
icon_cs[2][2*5+1] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAX0lEQVR42u3TMQ7AIAxDUXK'+'zHD03owxMtFmqyqnge0UKDytYRLTqGAgQIECAAAFCiXD3np2NeaZDPDFMjVjTxYi0meOa+M9OzJevKUG8uXTDJm7Tqn+HuomvAwI'+'EiCwXUIp/Ymb+9bEAAAAASUVORK5CYII='; | |
icon_cs[2][2*5+2] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAZElEQVR42u3TsQ3AIAxE0Xg'+'zj8Zo3ozQ0IDcRNE5Cv9aJHg+GYuIqzoGAgQIECBAgFAi3L1nZ+M+kyFa3x3NTIvYAAMlRWTNnNfEZ3ZiTr6mBPHk0f81sab8d8i'+'beDsgQIDIcgNLEZFiCgyLIAAAAABJRU5ErkJggg=='; | |
icon_cs[2][2*5+3] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAaklEQVR42mM8cOAAw0ADxlF'+'HjDpi1BGjjhh1xKgjRh1BT0c4ODj8xyUHNI+Rbo74vyUD0zCfGfR1BLoYyFF0dQSukBl5ITFo0gTM5+hgQBxBjqXDLyQwDBvo3EH'+'3kKA2GHXEqCNGHYELAAAqlZFi3saeqgAAAABJRU5ErkJggg=='; | |
icon_cs[2][2*5+4] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAZklEQVR42u3TQQ6AIAxEUXu'+'zHo2j9WZVF24g3RgzNfpnCUl5TMAiYuuOgQABAgQIECCUCHfPau+YZzJE5liH2dAi5rUTJUVUzfyvide8ievmc1oQdw79XhPLsO7'+'fIW/i6YAAAaLKDksRkWKG9Ya5AAAAAElFTkSuQmCC'; | |
icon_cs[2][3*5+0] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAXElEQVR42u3SMQrAMAxD0ep'+'mPrpv1jpDlhbToWAX/DUmYB5CcvejOwIBAgQIECBAVCLM7Mz+4p7KEJHnMakWcX9bqFJE1sy8JtjEWzPzmvjtJnbaNvE1IECAyHI'+'BpK6RYl9LCAMAAAAASUVORK5CYII='; | |
icon_cs[2][3*5+1] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAVklEQVR42u3SQQoAIAhE0by'+'ZR/dm1qJVJC0CC/yzFeQxjJhZex0BAQIECBAgQGQiVNWj2/gneYgdQ7IRazwZETZTrgk2cWymXBP/bmLm2SZuAwIEiCgd4Ht/Yrv'+'KAqcAAAAASUVORK5CYII='; | |
icon_cs[2][3*5+2] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAW0lEQVR42u3SwQkAIAxDUbN'+'ZR3O0bqZePEnxIFTBn2uhPELk7uV2BAIECBAgQIDIRJhZi27jn9IQta2OKuUiFsBApSKiZv5rgk3smvmviWc3MXNtE6cBAQJElA5'+'7ApFiRFWLtwAAAABJRU5ErkJggg=='; | |
icon_cs[2][3*5+3] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAYklEQVR42mM8cOAAw0ADxlF'+'HjDpi1BGjjhh1xKgjRh1BT0c4ODj8xyUHNI+Rbo74vyUD0zCfGfR1BLoYyFF0dQSukBl5ITGaJgiFzMgLiUGbJmBgwNIEpWDUEaO'+'OGHUELgAAWoaRYiCZ5rMAAAAASUVORK5CYII='; | |
icon_cs[2][3*5+4] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAXklEQVR42u3SwQkAIQxEUdN'+'ZSrO0dBbXgxcleBDign+OCuExjJhZuR0BAQIECBAgQGQiVNWjv++epCHc63pMai5ifuuoVETUzHtNsIldM+818dtNjFzbxGlAgAA'+'RpQF7ApFiMvaBuAAAAABJRU5ErkJggg=='; | |
icon_cs[2][4*5+0] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAXElEQVR42u3QMQoAMQhE0cz'+'NPLo326RxWVxSBTTFn0oF5aHcfXRHIECAAAECBIhKhJk9Ua995b4MsTIkvYhvD6INEWlD/I5VI/Ks/BO7z4C4BhF1G+I0IECA2GU'+'C6EytYrGFo7AAAAAASUVORK5CYII='; | |
icon_cs[2][4*5+1] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAWUlEQVR42u3QuwkAIAwAUbN'+'ZRs9mfkBFFCshsbirTKE+ImaWohMQIECAAAEChCdCVfM41/uyz36I9q0siGUGEYaYhSGO17wRe96buG4GxDeIXhjiNRAgQNwqxFe'+'TYj3sYrkAAAAASUVORK5CYII='; | |
icon_cs[2][4*5+2] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAXUlEQVR42u3QsQ3AMAgFUf/'+'NGM2jsRlxQxQ5chUJUtxVUCA9IXcf3QkECBAgQIAAUYkws8h53WvfyxAzYkzpRjx3EG2IrA2xV454Aao/cfoMiN8gcm5DfA0ECBC'+'nLsaQrWJ9VW51AAAAAElFTkSuQmCC'; | |
icon_cs[2][4*5+3] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAZElEQVR42u3QwQnAMAiF4bi'+'ZA3SQjpRBMoCbpb1YQkJOBc3hfycVlA/FzEp2BAQIECBAgAARiVDV7vW7L3MfhujtLnLVDzH2INIQnjTEciwaMc/CP7H7DIhjEF6'+ 'nIf4GBAgQuzysRK1i9wi3TwAAAABJRU5ErkJggg=='; | |
icon_cs[2][4*5+4] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAX0lEQVR42u3QQQrAMAhE0cz'+'NPFqO5s1sNpaSklVBu/izUkF5KHcf3REIECBAgAABohJhZpH12tfelyEi5pDmjXj2INoQmTbE61g1Yp+Vf+L0GRC/QWTdhvgaECB'+'AnHIBxpCtYuyMGqIAAAAASUVORK5CYII='; | |
icon_cs[2][5*5+0] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAZklEQVR42u3UQQ6AIAxEUed'+'mPXpvprBgI2FjTavkzxKS8igNcvejOgIBAgQIECBAZCLM7FzttXpKQ7TMxaR8RD+0vBNPb75fJ6Zi2TNxX4s8zyv/RHRG/tuJz87'+'ESNlMRAMCBIhVLnS9kWLX0mNCAAAAAElFTkSuQmCC'; | |
icon_cs[2][5*5+1] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAYklEQVR42u3UMQ6AMAiFYbk'+'ZR+dm1qGTwiINWPO/tQl8oQQxs6M7AgIECBAgQICoRKjqGb1d9aQO4TGkA+G0a0G8afrDSTyqVSPuSXzPkjuR3ZF9J/HdnZhp24l'+'sQIAAEWUAUIp/YqQ2dZgAAAAASUVORK5CYII='; | |
icon_cs[2][5*5+2] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAZ0lEQVR42u3UQQ6AIAxEUed'+'mPRpH681QF24kbCxp1fzZksCjTJC7b9URCBAgQIAAASITYWZ9tnbspzRE66OjSfmI89DySTy9+f8mcU96JwZA4HmW/BPRjnx3Eq/'+'txJWyTkQDAgSIWXZLEZFijFARfgAAAABJRU5ErkJggg=='; | |
icon_cs[2][5*5+3] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAa0lEQVR42mM8cOAAw0ADxlF'+'HjDpi1BGjjhh1xKgjRh1BT0c4ODj8xyUHNI+Rbo74vyUD0zCfGfR3BMjSAQ8Jcn0+/EICwzB6pwl0MUqihyrlBKVpZOiGxKBNEzA'+'wYGmCUjDqiFFHjDoCFwAAKpWRYmXSg6cAAAAASUVORK5CYII='; | |
icon_cs[2][5*5+4] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAaUlEQVR42u3UwQ3AIAiF4bI'+'Zozkam9F66KXGSzFQm5+jJviJL4qZHdUlIECAAAECBIhMhKr6bO/qJ2kI9zY2k5aP6IeWT+Ltzf83iaFZdiaea5HnWfJPRDOy7yQ'+'+m4m7yjIRLRAgQMzqBEsRkWIkLNQMAAAAAElFTkSuQmCC'; | |
icon_cs[2][6*5+0] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAYklEQVR42u3SQQ7AIAhE0c7'+'NODo3s3ZN2KiB2PzZmoxPRO7+dEcgQIAAAQIEiEqEmY3sbPapDDETy6R6xHdp+yRWX/6/SYSy7p3Y+Z4jO7G7I/dPIpRVI7KzMsT'+'pgAABIssLxLaeYonH1EMAAAAASUVORK5CYII='; | |
icon_cs[2][6*5+1] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAXUlEQVR42u3SQQoAIAhE0by'+'ZR/dm1b7cZCjIn22gDxsxs1EdAQECBAgQIEBkIlR1em97nuQhbgypQFzWlSBelja8xDGtuhOB7/nSiWhHGlzimJaNcJKG+B0QIEB'+'4WbCshmKHCHCHAAAAAElFTkSuQmCC'; | |
icon_cs[2][6*5+2] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAZElEQVR42u3SsQ3AIAxE0dx'+'mHo3RvBlJWpAbQLYS/WstweOw3P2qjkCAAAECBAgQmQgz69HsOU9piNZnR5PyEe+l5U2svvx/TYwp34md7zmyE7s78v0mxqQjolk'+'a4nRAgAAR5QaVFp5ijCfncwAAAABJRU5ErkJggg=='; | |
icon_cs[2][6*5+3] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAaklEQVR42u3SwQ2AMAiFYdm'+'MATqIIzmIA7BZW8+Ei20gmp8ryetXQMzsqC4BAQIECBAgQGQiVLVHvZknaYh+nz6sXfmI59HySbz9+f8m4cKqb2JlPVtuYvVGvj8'+'JF5aNiHppiN0FAgSIqAZv9p5ioP+/PgAAAABJRU5ErkJggg=='; | |
icon_cs[2][6*5+4] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAZElEQVR42u3SwQ3AIAiF4bI'+'Zozkam9F6JlzUQGx+riTPT0DM7OkuAQECBAgQIEBUIlTVs96XJ2UI9xHDZNQj5qPtk1j9+f8mEcK6b2JnPUduYvdG7p9ECKtGZL0'+'yxOkCAQJEVi+VFp5iLKeXWwAAAABJRU5ErkJggg=='; | |
icon_cs[2][7*5+0] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAXUlEQVR42u3QOwpAMQhE0cz'+'OXLo7y6eweSGkCOgr7lSKoAfl7q06AgECBAgQIEBkIsysn2Zzn9IQM/syKR+xjkaiL0Gso98+DRF1GeL2GRAgfoOIugzxGhAgQJw'+'yAPJWn2IjBc54AAAAAElFTkSuQmCC'; | |
icon_cs[2][7*5+1] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAWUlEQVR42u3QQQrAMAgF0Xo'+'zj+7NTAtZhBDpouDvYmYXhPjQIuJSZyBAgAABAgSIToS7ZzW7/7M+xIlhCsS6LoWIZ+n+7kPMZIi3y4AA8R/ETIb4GggQIKoGHjG'+'JYo5H38oAAAAASUVORK5CYII='; | |
icon_cs[2][7*5+2] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAYUlEQVR42u3QQQrAMAhE0c7'+'NPJpH82ZpA0kWLaGLgnbxZ6UI+lARcVRHIECAAAECBIhMhJm13ezapzSEt6fDpXxEP7oAoy9B9KP3Pg0x6zLE22dAgPgNYtZliK8'+'BAQLELifUkp9ig73MeAAAAABJRU5ErkJggg=='; | |
icon_cs[2][7*5+3] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAZUlEQVR42u3QwQ3AIAiFYdm'+'MATqII3UQB2AzqwcuNaaHJuDhfycICXxBzKxkR0CAAAECBAgQkQhV7bvZ2CdhiN7quuy64xHzqMf7FMQ8+u7DEF6nIb4+AwLEMQi'+'v0xB/AwIEiF0evV6fYsSFq0UAAAAASUVORK5CYII='; | |
icon_cs[2][7*5+4] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAX0lEQVR42u3QsQ1AIQhF0c9'+'mjOZobMbXgkZjLEzA4r4KQgIniJl91REQIECAAAECRCZCVX036/skDeHe1mXS8hHjaCT6EsQ4OvdpiKjLEKfPgADxDCLqMsRtQIA'+'AscsP1JKfYis6xqsAAAAASUVORK5CYII='; | |
icon_cs[2][8*5+0] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAXElEQVR42u3SSwoAIAhF0d7'+'OXLo76zNoUjgLC7pvJoIeRLl7uR2BAAECBAgQIDIRZlajXp+nNETPPkzKR4ylM7O+ghhL1/q/S2zDvr0EP/HMT0S9NMTpgAABIko'+'DSkSrYnFTAAcAAAAASUVORK5CYII='; | |
icon_cs[2][8*5+1] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAV0lEQVR42u3SSwoAIAhF0dy'+'ZS3dnfWZROQsNum8mgh5EMbOSHQEBAgQIECBARCJUtXq9Pk/iECeGZCDmdTURMZau9YeX2KZ9ewl+4pmfcBKGuB0QIEB4aS2vjWJ'+'vZJCyAAAAAElFTkSuQmCC'; | |
icon_cs[2][8*5+2] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAYElEQVR42u3SywkAMQhF0bz'+'OLC2l2Vk+MMwig7vBBHLfTgQ9iHL3sjsCAQIECBAgQGQizKxFvTFPaYjavo4q5SPm0hfw1FsQc+la33eJNfdegp845ieiXhri74A'+'AASJKBxSwq2IYDnFEAAAAAElFTkSuQmCC'; | |
icon_cs[2][8*5+3] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAZElEQVR42mM8cOAAw0ADxlF'+'HjDpi1BGjjhh1xKgjRh1BT0c4ODj8xyUHNI+Rbo74vyUD0zCfGfR3BMhSGIDxB8QRIEvR+SMvJDAMG7EhMZomBk2awCVHN0dQG4w'+'6YtQRo47ABQDq3atiDvm6UQAAAABJRU5ErkJggg=='; | |
icon_cs[2][8*5+4] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAXklEQVR42u3SwQkAIAiF4dz'+'M0RrNzawOXQpvYUH/u4mgH6KYWbkdAQECBAgQIEBkIlTVo16fJ2kI97oPk5qPGEtnZn0FMZau9X+X2IZ9ewl+4pmfiHppiNMBAQJ'+'ElAYUsKtiWowuVgAAAABJRU5ErkJggg=='; | |
icon_cs[2][9*5+0] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAY0lEQVR42u3SMQoAMQhE0Z2'+'beXRvtpsUNglWCxrIn84E9CHK3Z/uCAQIECBAgABRiTCzN/sb/VSGGNmbSfWIOTQSdQtiDl3r+zaxNatGrG/lm8g2c98mjr2JSNt'+'N/A0IECCyfPo8nmL6cykyAAAAAElFTkSuQmCC'; | |
icon_cs[2][9*5+1] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAYElEQVR42u3SQQpAIQhF0dy'+'ZS3dn1YcGUTkK9EP3zSLQw0Mxs5IdAQECBAgQIEBEIlS1en99nsQhTgzJQMzraiLiW7q+H2ximxaNWBPdhNvMc0389yZG0m7iNiB'+'AgPDSAM1+hmI8ahF6AAAAAElFTkSuQmCC'; | |
icon_cs[2][9*5+2] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAZ0lEQVR42u3SQQrAIAxE0c7'+'NcjSPlpvZCm0XSlaFpOCfXRDMY4jc/aiOQIAAAQIECBCZCDPr0dv1n9IQra+OJuUjxtIXcM8liLF0nvdrYk46YgFkNxE1s18Tv72'+'JJ2U38TUgQICIcgLKnJ5is58jWwAAAABJRU5ErkJggg=='; | |
icon_cs[2][9*5+3] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAbElEQVR42mM8cOAAw0ADxlF'+'HjDpi1BGjjhh1xKgjRh1BT0c4ODj8xyUHNI+Rbo74vyUD0zCfGfR3BMhSGIDxB8QRIEvR+SMvJDAMo7cj0MXoHhK4QmbkhcSgTRM'+'wMGBpglIw6ohRR4w6AhcAAKV8nmLgq80LAAAAAElFTkSuQmCC'; | |
icon_cs[2][9*5+4] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAwADAAMCNeLu6AAAAZklEQVR42u3SsQkAMQiF4XM'+'zR8tobuZdCpsEqwMN5H+dCeiHKGb2dEdAgAABAgQIEJUIVfXs7+snZQj3sTeTUY+YQyNRtyDm0LW+bxNbs2rE+la+iWwz923i2Ju'+'ItN3E34AAASLLC8qcnmLjUKubAAAAAElFTkSuQmCC'; | |
//------------------------// | |
// アイコン定義(領土枠) // | |
//------------------------// | |
var icon_2 = new Array(); | |
// 赤 | |
icon_2[1] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAADHElEQVR42u3Yy0sqURwH8J8LmUF'+'62M1eZlEUlQUS9C+0CSJoJ0URtGwXtQgqWkRFi3YtWgQ9KGpTBEGb9sGFGz2wh1EQiDY42ROxbtdzzwxMjGUzjo6mp/MFQRd65jP'+ | |
'n55zzOwaEEPykGCiY8FAw6aFg0kPBpIeCSQ8Fkx4KJj0UTHoomPRQMOmhYNJDwaSHgklPysAupxMxOTnAZmWJn0PPzxB8eADH+rq'+'BKLBvYAAx2dkQNhiAu7qChoUFEeju7UW/KivByLIQur8Hz/ExNG1tJR2fNDA/MoKY4mJ4ub2NgH6MBGfy8uDl5gauj46SCtcdzI+'+ | |
'NIaagQBWqCPf74frwEJo2N3WH6wbmBgeRqaJCM1QRfncHnv19aNzY0A2eMJgfGkKMzZYw9Cu4CVdLkOPA63Lp8oCLG8yPjyNxFnS'+'GfgWXZpw7OYGG1dW4x9IMThVUDe4/Pwf78rLmsWMGByYmkDE3N+VQJfjfpyfgcKlrgauCA1NTyIjX0e+GqsH5iwuomZ9XvbYvwek'+ | |
'KVYWfnUGNwrV+Anv6+1FuVVXaQ5XgD5eXYJuZiXrdEeCDlhZU1doqvs/u68sI6Mc8zc6KoMvtbWjc2flkiAD/aW9HNc3NGQ0Ozs2'+'hf29v4N7djbpTi17Swo4Jb+j9uDTsi4sZAXf19KCi0lIwlZdDAC9ZMZW0PIHhYcSWlYm7nHSGy6GevT3FB5YiWIgw2ya89rK460k'+ | |
'3uARl8vPBhzssNWhMYClu/OOWujqQlqnvhL9DzWZ4CQTAMjmp6To0bS1Pu7pQkd0OLL6rqZ5x+YwKfbNlejquceNqHlwdHajE4QA'+'Wr3nJhsv/o8JYltHRhMZJqD10dXejkvr6pMDl0BBuFnxCl7S09H3toTxHnZ3Iiktd6l0TgUfMqN8P3tNTcKyspM8BwCd4bS2YLBY'+ | |
'I8rwm+DsUv4TvevFaqic0KWApB04nsuFSjwX+/jCyWsUVwINLt3FtLXMO8eT53daGrNXVYCoshPDrawRcgkI4DCF8U7jHR2hKwRl'+'1yg/izTabCDcyDJkH8ekWCiY9FEx6KJj0/AeTN4OnIxo69wAAAABJRU5ErkJggg=='; | |
// 紫 | |
icon_2[2] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAAC9klEQVR42u3YwWvTUBwH8F8PkS61'+'7dZ1ltKOrTKKMkTF/QHC8CAexIOCpY7pUHcWb6IH0YMePMpkoGPWCRMPHmSniSKCh4llo9uoY7WYWSOx2nVmSh3PJOONtmuTpk1r'+ | |
'+nzfU3p4ffnwey95+VkQQvA/xULBhIeCSQ8Fkx4KJj0UTHoomPRQMOmhYNJDwaSHgkkPBZMeCiY9FEx6GgYeD8VQi5MBtoVVfovr'+'ImQzIpybOGAhCjx1OYVaHIxyzS3zEB7rVYCTF+PI0+mCHVYG1iR4Yv4zXHh6qO74uoFfXBWQwydhvuYKoMXBcJubgdWVHCzNJ+sK'+ | |
'Nxz88rqAdu7ShqrB5bEf5pJw/onxcMPA8tLt6GF1Q9XgPwWp4rMcDE0at89rBk9fEZCzU39FK4U7PSz8SImwvMgZ8oCrGvzqhoDw'+'8jMSWg6OK56c52Fgovq5dIMbBdWEL0rwiP65Kwa/viUo79FGQ9Xg65kcJOb0wTXBZoFqwVPLaTh1L6h5b2XBZoVqwbmFNJweKw/f'+ | |
'Bn5+iUOeoN30UDU4H8/CsTv+kvddAB45GkV9xwPKdd+wsymgxZkZySigmWcJGJ7a/horAI+efIcO9vc0NTg6KqI/Gzl4P71U8qRW'+'ckm7u+zKfvi0xMOZ8eZY0pHBGPL6PNDezcKKtI8rWtL5kU9Q8mD5lGNmeD504Q2n+sBSBcuRq21rtUKr13xwDLW1M5CY5TWhFYFx'+ | |
'Hg/GkX+vC/Br6l/CMZRtY0D8noP+m25d96HraDkejqHAPg/YXY2veH5Fs19ycOS2PmhV4C14SILvbww8f4/Kcx2+Vh20JjDOw4EY'+'6u6tDzwfmk2L8DFmzH8b0gB4EI6i3Xv8W9+utcDzoRl+8zv4bMREDYBieCDoB4ebhVVBHxxD23ybYxNxY6F1AePcD21WvBI4huKu'+ | |
'iVGdjYaCce6eeIu6AhLcY4WN31AAx1A5WeEXfFvjYehRE7dpi4Mb8R1elwK32hgyG/FmCwWTHgomPRRMev4CvwB/p45NdckAAAAA'+'SUVORK5CYII='; | |
// 桃 | |
icon_2[3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAAC0ElEQVR42u3Yv4vTYBgH8KfDCzFS'+'q7FSjgbO01KVIhT6Jzg5iINbOeQWF0dxEx1EERwcXW455DgdFAcHJ0fhloMql7uzlDsK4WogVOphOMjw+iS9hKY/kqZNavr6fqcU'+ | |
'mjzvh+fNm+RNUUrhf0qKgxkPB7MeDmY9HMx6OJj1cDDr4WDWw8Gsh4NZDwezHg5mPRzMejiY9cwMrFQVStIExNOi/dv4Y4DRMaD8'+'rpxiCtx62KLkDLGPtX0NSmslG1i/V6fSogREIDb8cPsQKh8rseNjA+uPdUoWCJi66YH2x4VL+N+WCc3tZqzwyMH6U4Rmg6G+cDy3'+ | |
'+Q3hH6KHRwa2pq54SQwN9YW3TVBrKpTfR3efTw3WH2FH8+E7Oi5czIlgtAxQd9RIFriJwfozhErRQ0fBnY5rO1hrY/JaocGzggbC'+'97D2evjaY4P1FwjNzB7qC+/gWJRw8EBwUqBB8PZ+G4qrxcCxjQQnFRoI/4HwtdHwAbD6QKXpQjrxUD/4UeMI5Ffy0HF7wLWbNbp0'+ | |
'a8k+ztzPzAW0P53XHRt08OkAyp8HH2Me8NadLVq4UZhrsLFqUNM0ofGlMfRNbfiUXkx3V8AGTuk38zGllRWF5vI5EC+K0N5tjzel'+'e2O9QVknW285SYb3QtWvqu+C5Qu2YnVbOCuAuJA8uAMl5wlo37VA6FhgJ/UVXAGv4AroPKb+IdyFnsOx/DIh+zwbahyhXi2VZSxW'+ | |
'wumTnX3Heztq/kToy3DQicBu8SoWvz4beO89atXKPpkMOhXYHcxdHMy1eOAeqI7X3o3m2pFsANSWa1S+KrvfrtPAPVANv4P38Dt4'+'PUEbAAPwotztuB4O7kLz3XPVerTQWMAuvHrS8THg7mJ0smtid3Qjvq3bWLdpN29vUvmyDMIFAcAED9yBWjnWj0H7rUHl7Rxv0/bH'+ | |
'2YiX8pINJ6cImxvxSQsHsx4OZj0czHr+AkmHfqeuNr+eAAAAAElFTkSuQmCC'; | |
// 橙 | |
icon_2[4] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAADCklEQVR42u3YS2gTQRgH8K+Hhbhp'+'mppEtyGptjSEShADBY9ePIgn8SBCCVq86E0UFTQ04KOKFRRvilBEasFHD55E0IsgiCCUhlSNaSVla41sHyHpqsQyzi5myaZJNpvs'+ | |
'xmSc/2lz2Mz8Mo/MfG0IIfif0kbBhIeCSQ8Fkx4KJj0UTHoomPRQMOmhYNJDwaSHgkkPBZMeCiY9FEx6GgaOXRtEjNUObPsm+bOY'+'/QHiWhqC5yfaiAIvjp3B0A75OTU/B4Gz92Vg/PZx5PB0A8NYQMyk4evnGRi4OGk63jSwMDGMGKcHcqvfVdDiKHCbC3JLC5D8ZC7c'+ | |
'cLDw6BJiOrdqQivC8bvJeBQGhp8YDjcMLE1d1uPTDa0IzwjAz0xDMPLYMHjdYGE8jJgt3XVDy8HZTg7EpUXg5z4assHVDBaeXkH5'+'6WcktBw8P+IpvLkF6oDrBjcKqgnHIx44N6677arBwuR1xLTbGw6tCM+mITUb1QXXBDcLVAu+zM+B/+Rdzb6VBTcrVBM+/wH8p8r3'+ | |
'dQOYHzuNbB5/00MrwTMLcfAeu1my3yrwVHg/6t1zQH627zvREtDipF/ckUFfXj+D4MjzDQYV+P3lQ8i3e29Lg8WX91BufR0S716V'+'PKmVntJd2/HWj3fAZALvgA9aAh67MYQ4twfYrh55HVc1pQsjnaCkl6VTTjPDC6F89E3FDasiWIo02hZrJ7BOd9PB81Cmw4n/i6c1'+ | |
'oVWB84nfGkKObTtA+Zv6h3AFatuMl90KuEIjuvqh62gZGw0hrm8nsHZHw0e8cERzK9/AdXS0pnZrujxI5RrOv6sh8MI1KrXlOhyp'+'q526roex0SN4xAOmwFXQ9DJepzFDvtuQAsDU1RDy+vuVu2s9cBV0NQV8HN+DL+i/FZkKVsH7/MA6XCAuC7rgCpTzyO/ys3FDoaaA'+ | |
'FfjIIPL6+quCK5vR36oJn8AjGjavdGtqmfZt5CDy9vSCxc4B/P6lguehUn6m8Y+ymoWB8MPWLdMWJ1+Id3BuGc5YrGQW4pstFEx6'+'KJj0UDDp+QNsoH+nzzrb+wAAAABJRU5ErkJggg=='; | |
// 黄 | |
icon_2[5] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAAC0ElEQVR42u3Yv2sTYRgH8DfDwXkS'+'o+fJURKo1RCVIBT6Jzg5iINbKdLFxVHcRAdRBAdHly4iog6KQ4dOjkKXwileW4/QUjgaD14isRgKN7w+7zXn5dLeXe5Xenl9vxBI'+ | |
'IMn7fvK875v3fUuEEPQ/pcTBjIeDWQ8Hsx4OZj0czHo4mPVwMOvhYNbDwayHg1kPB7MeDmY9HMx6xgbW9XkiCGUkSSed173eH3h0'+'0ezs+xJT4Hb7PkBPOc8taws1m68coGHcIbI8jQRBdOC7u9/R3Nyn3PG5gTF+CNApZNvYBx2OB5fhvW20s5MvPHMwxo8BqkRCw+EY'+ | |
'4F8B/jFzeGZgOnQl6UJsaDi8g0xTg3n+ITN4ajDGD6Ci1dTQILgkqTDH2wBfz2SBSwzG+Alxh1+W0CC4W3HLWoe23iZuKzZ4XNBo'+'+Ca0/SZ22yODMX4G0MrYoeHwLvRFjwWPBBcFGgXvdLZQo7EU2bdAcFGh0fAfAA/u6yGwad4j5XK98NAw+N5eC9VqL47stw+sadfJ'+ | |
'zMwN53mlcncioMPpdl86oO3tZfgbWzlk8IHX1m6Rev3aRIN7vSVi2zZqtT4fuVMLGNLT/RWwBUP69UTAdX2RqGoVNirnYR5vjDak'+'B0N3UPTDdJdTZPgg1DS/hC5YoWAaWm1RPA1fNlU4uAsVhLPQr2+R0JHAbgxjEVbAS8j7mzo+uAc9A335hRTlaax+xNpa6voCNNaE'+ | |
'iitjr/hgRW37J0CfJ2o30eGBXteo6tWxwAfnKG1LUR6laifV8VDXb0NnruQC90PpNNrI5LszuQDQtAVSq13+d3ZNA/dDLVg4N2ED'+'Ef9UlCvYD2/0Kx5vcfOgVeezpmlkCs0F7MHn+xWPhnuL0cGtyUFFkx/wjwXsZnX1JsAvIlE8B69sH9yF0uzv0x/lN2wF303uNe1w'+ | |
'3It4Wa46cEE4weZFfNHCwayHg1kPB7Oev0iHfqc0GjUZAAAAAElFTkSuQmCC'; | |
// 緑 | |
icon_2[6] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAADHUlEQVR42u3YzUsiYRzA8Z8HmUEy'+'c9UytTCKSgMJ+he6BBF0k6IIOnaLOgQVHaKWDt06dAh6oahLEQRdugcLG2WMZWEQSDU4mb0g2rY9mwMTY6Xjy4zps8/Xix70mQ/P'+ | |
'ODPPo0IIwf+UioAxj4Bxj4Bxj4Bxj4Bxj4Bxj4Bxj4Bxj4Bxj4Bxj4Bxj4Bxj4BxL29gN+NGpVQplNAl/Oen6BPcR+5hw7Whwgo8'+'dD2EtJQWVK8quGAvYLFpkQf2n/Wjmh81QKtpCEfDcBw4hu2WbcXxioHHuDFkpsxwG7tNgH5MgOspPdzEbsBz6VEULjt4gptAJsok'+ | |
'CU0FD8aCcHR5BFstW7LDZQMPs8PIrrFnDE0Fv4vdwUHgADabN2WD5wwe4UaQjbLlDE0GN2lMwEZYYK4YWS5wWYMnuUkUnwW5ocng'+'wox7WS+sNa1lPVbG4HxBpeC+oA9WHCsZj502eCo0hXRqXd6hqeCPfx6BYZmM4JLgn6GfSKvWfjtUCn7OncNC/YLksSUFFypUCn7K'+ | |
'ncJiffJj/QQeDAyiWl1twUNTwf33fpi1zX553AngtsM21F7bzr8f0A4UBfRjc49zPGjHvwO7zbufDAngzt+dqLW+tajB85F59PL3'+'BfbO9r58UvvylLbr7BCOhcEf9MOSY6ko4H1MH7JWWKFaUw2+kC+9U1rcaGgUVdFV/FNOIcPF0P3AfsoLVkpwvPhs6zQ6MNPmgoML'+ | |
'UANlAM+1RxKaFvj9x8/6UKOxEYTb1HfCBWgZVQahWAimjdMZHUdGj5Y9Jz3IUeEAA23I+4yLZzS+bp4xzmQ1blaLhy6mC7kqXaCn'+'9YrDxf/R+FjjxvGcxslpedjL9CJnpVMRuBh6F31bJV17Yblp+fuWh+K6Pd3IYXG8r11zgYuhwUgQTq5OYNW1WjgbAB/hDZYGMGqM'+ | |
'wEW4jOAC1Kqx8t/1XflkhSoCFnIfupHT5kwLLkAtlIW/A3gDXlhvXi+eTTxxHb86UJ2lDso15fD8+pwAF6Cvby8uysED+wAbLcrv'+'Ued9I95WZuPhlJrCcyO+0CJg3CNg3CNg3PsHkzeDpwDP1hMAAAAASUVORK5CYII='; | |
// 水 | |
icon_2[7] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAACw0lEQVR42u3YvWuTQRwH8MtQiJU0'+'Gh8JJYG2GqIShEL/BCcH6dCtFHFxcRQ30UEUwcHRpUuQUh0Uhw6dHIUuhViatobQUgiNgYdILIZChvN74bnwJKbPW54nefLzvhBI'+ | |
'SHJ3n9xrLsI5Z/9TIgpMPApMPQpMPQpMPQpMPQpMPQpMPQpMPQpMPQpMPQpMPQpMPQpMPUMDLxeLPDYxwS5OTrZf/2k2WQOPj/Pz'+'EVLgJ9UqnwJU5LBWY/lcrg18WCrxmUSCRfGegO+enLAvCwuB4wMDP9N1Pg2M3mp1QXsj4Ql8torP7h4fBwr3HfwCUM0B1Aouvvsd'+ | |
'8M8BwH0Di6F7DfPTLdQKXkdZhUqFffJxng8MfooeTXnoUafwJH7EKub4HuB+LHCewS8BTQQAPQ8ue3wPda0PUJdr8LCgdvAD1L3m'+'oW7H4NeAxkcAtYI30JaiS7gtOCxQO/hhvc5Ws1nbtp0LDivUDv4D8LwF/B/w40qFZ2Kx0EOt4OXTU/Y2ne7b7i7w3UKB35ubaz9/'+ | |
'FI+PBbQ37xqNNmjj6Iht9tnGusBL29v8TiYz1uDVZpO3MDq/lst9T2p9h/QMhrSYD2UM6fdjMqQf4N9YKplkszio7GMeOxrS5ogT'+'1Kxxygkz3Az9htNY3malttyWRG9fikbZdAjhEnoFi9SOWFwdbEm24E7hWAFvYAWU29Qo4RJ6GW35hba80jRX7XB1tFxBZTlUpo2g'+ | |
'x809+hPQNy6hnsAy4rrm9pDg5jkq6nruEToQWOY+GnMrILgZqqPsfZ/K9uUCYAUHlpvpdOe/6yBwM7SGsg6w8q6F6QKgF54FXDN6'+'xQ1cQlPGd0s+QwMByywbPe4E3oEaO4Do0fUAr24DvaZd3Nri1wG/ir28hddmuISK6Gdn7Dfe+zDO17S9kRfxKeznAn7BuI8mdxEf'+ | |
'tigw9Sgw9Sgw9fwFSod+p8kgrB8AAAAASUVORK5CYII='; | |
// 青 | |
icon_2[8] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAADGElEQVR42u3YzUsiYRwH8J+HGJFM'+'27R11cIwKluIhf0XugQRdJOiCDp2izoEFR2iokO3Dh2CXijyUgRBl+7BwkYvaGkYBFINTloZom3rszPGs6tWjqPjS88+35Mexuf5'+ | |
'zPP4vPwUCCH4n6KgYMJDwaSHgkkPBZMeCiY9FEx6KJj0UDDpoWDSQ8Gkh4JJDwWTHgomPQUD2+1OVFHBQHm5Mv798TEC9/dhcDha'+'FESBh4aukVrNgEIRg4sLFpaWvsaB/f0eVFf3CZTKMri7i8DJiQ+2t7/nHZ838NgYhwwGBm5vo0nQ1GB4ZSUDNzdROD6+zCtcdvDE'+ | |
'BIf0enFoOrjfH4Wjo0vY2pIfLht4eJhFFotKMjQdPBiMwsGBDzY3v8kGzxk8MsIhs1n6iGYK1+tVwLJhcDqvZFngsgZPTnJIGAW5'+'oe/B8Yi7XCysr2fflmRwoaBicLfbD6urNsltZwyemgogjaas4NB08FDoFz/VWUlwUfDMTIDfR4sPFYOfn3OwuNgg2rd3waUKFYOf'+ | |
'nXF8X9+HvwIPDvqQ1aopeWg6uNd7D3Nz5jf7nQRuaztE7e3W+OeBAfWHgKZmfj4UB+3seGF39/X+nQTu7PyJWlsbPjR4YSGMnp9/'+'w96e582T2ptT2mLR8Af6KD81/LC8LH3pL0b6+pzIZPoMtbUqfssKZDalEzM6GkA1Ncr4KaeU4YnQ/X1f2gUrLViIMNoajQoMhtKD'+ | |
'Y2hVFcPfsK5FoRmB//24BzU16QBvU8WEY6hWy0AgEIXpaZ2kfkg6Wvb0nCKbTXirhR/xxBEV7s2zs9KgWYFxurqcqKXlC7/n5R+e'+'+B8V2hofzw6aExint9eJmpvzA0+EBoMR/pZ0DSsruR+CZCkAdHcf81Pd+Pfumgs8Eer3h+H09ArW1uQr9Mla4hHgjY1G0OlUwHHS'+ | |
'4BhqMr0863bLC80LGMduP+SnujkjOIYajS93bJfLBxsb8pV0CgLG6ej4gerrjVBdrYKnp1gSHENjMeBfSgQeHlhwOD5wmTY1uBBv'+'NmvjcIYpI7MQX2qhYNJDwaSHgknPH5M3g6dZBhoEAAAAAElFTkSuQmCC'; | |
// 灰 | |
icon_2[9] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMATgBOAE5iBS3kAAAC0UlEQVR42u3YzYtxURwH8GMzFsbL'+'mExmZDGG8j/YzF9gJWU1pjRS9jJNapDYK5mmhJpJ+SNsZm8hiWgaa3kpK+k8z+/Uma4ZXJd7PZznfDdYcM7H79zzpnK73eh/ioqD'+ | |
'GQ8Hsx4OZj0czHo4mPVwMOvhYNbDwayHg1kPB7MeDmY9HMx6OJj17A3s9/vx6ekp0mg05PN0OkWTyQSVSiUVU+BoNIop8uvrC728'+'vBBgKBTCVqsVqdVqAm+1WqhSqSiOVwz8/PyMz8/P0Wg0WoD+DIXrdDo0GAxQs9lUFC47OJFI4LOzM1HoOvhwOCTw9/d32eGygR8f'+ | |
'H/HV1ZVk6Do4DPVGo4He3t5kg+8MjsVi+OLiYmfoKjiMFhjq7XZblglua3AqlcJQBbmhq+C04p1OBxUKha3bkgzeF1QM3uv10Ovr'+'q+S2Nwan02myju4bug4OazlUXApcFJzJZMg6+q+hYvDPz0+Uy+VE+7YSfKhQMTgM9Xw+v7Kvv8CRSIT8wKFD18H7/T4UbGm/F8Ae'+ | |
'jwff3t6S9+Fw+CigP5PNZjG81mo1VK1WfxkWwD6fD7tcrqMG/32O8Xw+Rx8fH0t3akuHtMViIVP/MQ3ph4cHfHl5icxmM5nANhrS'+'wsDmH3ZQsMs5ZLgQWq/X105Ya8EQqLZWq0Vw6jk0OIUaDAZytBSDbgSmCQaD2GazoUNYpigUZuPxeIzi8bikfkjaWgYCAWy325Fe'+ | |
'r997xYUVhbaTyeRW7W51eLi/v8dOp/P70K4kXPiMQltPT087tbPT8RAq7nA4FIELofSUtM1hQVYwDVQc4PTsugtcCIWbj12Pg4qA'+'hfCbmxsCh85KgVMoLIXw3W63KytUETDN3d3dd8XF4BRqMpnICgAVLRaLx3OJJ4zX68XX19fIaDSi2Wy2AKdQjDGBwh9TLpeP95r2'+ | |
'Z+hFPDybAD85OWHzIv7QwsGsh4NZDweznj82FQczpHgBCQAAAABJRU5ErkJggg=='; | |
// 白 | |
icon_2[10] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAAAAAAP9DpOgcAAABjklEQVR42u3YwVKEMAwG4AQEWQ+i'+'XPD9n04OurIXkF2I68WxslAoLZSY/wbDTPsNkLZBAIL/FBQw8wiYewTMPQLmHgFzj4C5R8DcI2DuETD3CJh7BMw9AuYeAXPPamCq'+ | |
'aoIkUW9WFeDDAVmBidQBEAFv3YfjETB7do53Bh6C6p5zDbcOngrVwssS8Cm1DrcGNoVq4acTYPpoDb4YbAuqhVsqcMZgV1AtvGkA'+'72PjsWaD14Jq4W0LeBfOHnsyeCuobbgW7AtUC584t0Gwr9Cl8B54L1AdfGjeCpheC4I83xV0EF4UgC95z6CCP0qCNOUBHtipjX/S'+ | |
'1wsMcBdwo096j/C5NWd0WepVQI/gpsV10sbDJ/jSVWTW1pIuLUEYbgK3tVwaHR7osyGI41XgtvcFi46H1HYEQeAE3vuNug4wDLY7'+'HiqTa84EUWQF3oOez4Bx5E8DwBbcNdQJ+Gfyf1uyI/AetK4BD8l+mngK5u2dIMtuwl21cDYFK/jfb/2q/S63LBvxvkXA3CNg7hEw'+ | |
'93wB6xoXENO1jwwAAAAASUVORK5CYII='; | |
//--------------------------// | |
// アイコン定義(強調表示) // | |
//--------------------------// | |
var icon_3 = new Array(); | |
// 強調1 | |
// 20x20用 | |
icon_3[0*3+1] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAAACAAACPkxwRAAAAdklEQVR42u3TSw6AMAgEUDhZuZl6'+ | |
'MzgZ/kLCwqiLisYMmyZddF4mlGmk14eBAAIIIIAAAgggvohQUW+tkZmRqHApIsK3h5do9/3+CtMV4YM7H0StGJ64BhFNRAtxljaR'+'28iIsxYeQeSlvLuc//2iQAABBBC9ZwYR9EOiDD/NxgAAAABJRU5ErkJggg=='; | |
// 15x15用 | |
icon_3[0*3+2] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAAACAAACPkxwRAAAAiklEQVR42u3SUQqAIBBF0ZmV6c6q'+ | |
'nenKpgwqiQqEkgnu/RL88PBQZZRfpYABAwYMGDBgTwEGDBgwYMCAXdUdnGKyEILknCWmqC7BG3J/dGGaHfct+C5gG8z0gVPwOqkf'+'8LbwFalg3S18h27FdgOfsesXqM6uFy4VYH12t/CbAQYMGDBgwIBdBfjrZqEuUy3an0BpAAAAAElFTkSuQmCC'; | |
// 11x11用 | |
icon_3[0*3+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAAACAAACPkxwRAAAAx0lEQVR42u3WQQ6CMBQAUXoyuJl6'+'s3Kyqo0kDQlKoMafcWbFgkVf+ktJw3X4q5JgeILpCaYnmJ5geoLpCaYnmJ5geoLpCaYnmJ5geoLpCaYnmJ7gSOUpl3Ec6/M8z8OU'+ | |
'p4QGl0sp6UUs5bHYW+KCl91twT12ORS4HeG6uBXtiV46ig8Fbkf447sHRzwUeD3G77CIHd6DPnuWBf+6Pef4zBUVGtx+letiO9zJ'+'4cBbf1e9/rrCgb+dYHqC6QmmJ5ieYHqC6QmmdwcvYXo94A2nDgAAAABJRU5ErkJggg=='; | |
// 強調2 | |
// 20x20用 | |
icon_3[1*3+1] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAAACAAACPkxwRAAAAd0lEQVR42u3TUQqAIAwG4O1k7mbW'+ | |
'zbaTrbAMI6gebEX8e1EU3MfPZBro9WIggAACCCCAAAKILyJU1FNKZGYkKhyKqM2Xl0ciz2V7hemK8Oxemh8v5mOOQWxJ1BTWNTSJ'+'XRoN4iyFRxDtUN4dzv9+USCAAAKI3jUBGfRDouKLt9UAAAAASUVORK5CYII='; | |
// 15x15用 | |
icon_3[1*3+2] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAAACAAACPkxwRAAAAjElEQVR42u3TWwqAIBCF4XFlujNr'+ | |
'Z7qy6UYmlA9CyQT/eRpR8OOgTib5VRxgwIABAwYM2FIAAwYMGDBgwKYyHJxCUu+95JwlpOBMgk/kdessorEse/BDwBpVd2T7wLrt'+'7IBLw0/oFWuu4Sa6EzsMfMNu77eabTcsxyerZ3MNvxnAgAEDBgwYsKkA/joLvS5TLdt3R4cAAAAASUVORK5CYII='; | |
// 11x11用 | |
icon_3[1*3+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAAACAAACPkxwRAAAAx0lEQVR42u3WQQ6CMBQA0fZkcDPl'+'ZvRklUgwEKMSivFnnFlB0gUv/QVyuqa/KguGJ5ieYHqC6QmmJ5ieYHqC6QmmJ5ieYHqC6QmmJ5ieYHqC6QmO1NiPteu6+3UpJfVj'+ | |
'n9Hgeqk15WG5mS4zF/zY3RX4jF0OBV6P8Px0w3bBhF46ig8F3ozw58WHRjwU+GmM32ARO7wL3XiWBf+6Xee44RMVG7x6K89P2/5N'+'Dgd+9Xd11l9XOPC3E0xPMD3B9ATTE0xPMD3B9G5/YXo9rrEx/QAAAABJRU5ErkJggg=='; | |
// 強調3 | |
// 20x20用 | |
icon_3[2*3+1] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACEAAAAhCAYAAABX5MJvAAAABnRSTlMAAACAAACPkxwRAAAAZUlEQVR42u3T0QmAMAyE4ctkzWbq'+ | |
'Zulk9UkQodWHWov8t0A+jotp1ecxECBAgAABAgSIGRHhUVJy5RzycBuKOI5fc4fpiiiLSvXQpjGIKZqotdFq4RXEeZRPx/nfFwUB'+'AgSI3tkBiLM1ovVcm2YAAAAASUVORK5CYII='; | |
// 15x15用 | |
icon_3[2*3+2] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAABnRSTlMAAACAAACPkxwRAAAAh0lEQVR42u3TQQqAMAxE0eRk7c3U'+ | |
'm7UniwtRK+pC0DLCn1UChT4G4jbar+KAAQMGDBgwYKUABgwYMGDAgKXSHVxyiZSS1Votl+yS4BXZfmsW2/YE3wUcQ8SCvH1hPrkO'+'eG/4yhR6Dd+jn2G7gc/YOMziDS9H1s5yDb8ZwIABAwYMGLBUAH+dGT7ETS0BGxpnAAAAAElFTkSuQmCC'; | |
// 11x11用 | |
icon_3[2*3+3] = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAAACAAACPkxwRAAAAw0lEQVR42u3W0Q6CIBhAYXgyebPq'+'zeTJaLXKrLkc2vp3OucKpxd+AwY5HdNflQXDE0xPMD3B9ATTE0xPMD3B9ATTE0xPMD3B9ATTE0xPMD3B9ARHaixjG4bhOq61pjKW'+ | |
'jAa3Q2uXX7w9pXzKXPA0uxN4j1kOBX5ewvffm9ceo158KPB8CX/8umuJhwK/L+NlLGKG16G37WXBv27dPu4/ooKD28vb7WdyOPDS'+'7WqvW1c48LcTTE8wPcH0BNMTTE8wPcH0zgGkcD3U7OevAAAAAElFTkSuQmCC'; | |
//--------------------------// | |
// ルート構築モードアイコン // | |
//--------------------------// | |
// 正常アイコン | |
var ricon = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAADOElEQVR42u3Yy2sTQRwH8F+U1XZD'+ '39EQE2krJbREsZCzB6mI9SIevJQi/g3iTfQgetCDd29Fag6KB73Ug8WDCF4KoZIHobSNpGlW10ht3baGMs4snbBNNtlHZiUd53va'+ | |
'3XYfn8zuPH4+hBD8T/EJMOcRYN4jwLxHgHmPAPMeAeY9Asx7BJj3CDDvEWDeI8C8R4B5jwDznn8Gnkq9Rz3SceiUZX1/W9NgQ9uG'+ 'xPhlH1fgO+tJ1C11VPdP7m9/q+zAEUDQIR3D8C1IF4vwOj7pOd4z8D01jcKSrMNolpU1GAme0reXlCKcCYb1bQIPSJ2wVtEgnc97'+ | |
'CmcOfqBmEWnFWuhMbMJ3KzWPjGB6rBZOzv2SX4FXHsCZgcmrOyL3mkLpvhnY+LdauFrZhsXCKrwcZwdvGXxXTaHTkr8p1A64ETwo'+ 'd8O6tgnZwlcmHZxr8EM1g+jrZwV1Am4Epy2exvdIxC65hjsGu4G6AVvBs0oJZmMXHcNtgx/jzqinQWdk92ZuwM3gG6RzU9YdwS3B'+ | |
'LKAswFbw5fJ3eBa9YHm9hmCWUJZgK3gGw2eawOvAtwsLKNo1UAdlFSOYVWrhuc0f8DQSN0UfAE8m59C14bED/0A6iMMQAjXmzUoG'+ '5kzG7wPgGwtzaGJkrO5i7Y42Yo9KEuxVKjC/lDGdqZm+0oNdffh7+FM9dlhe6V3YgyE828uUS/ZeaWPIDIqcTGY5Rng7dloU+qmw'+ | |
'3LTDagomIa3d2+GHkNzFBM56WCLQATySLJJr2RiSLMHVm+Q+orH+E9AuEw8C7cPP8hM/y6NAzNGP5mhqOZ36gM4FQ9DvssVbnVrS'+ 'Fi3hTvRJ4Kyrz8HV4oGUa84HI47hbhcP9Bsl97ofGG1pxdTS8vAmfqgYfii7cKfLQwot42un8DWft9DJMQHTTCffodHIYHXt2ghu'+ | |
'twBAoYr2C6+D8zA7fqV9CgC18GhkCAKyH1Ttdx3cqsRDoGH8o5Fzc4VVplBPwDRTeoubw82KeARKqyZZDE14APUUTHP981s0HAlD'+ 'EI/lu/vHjGVaAiVRd3ZgS1HgRfzq4S3T1oYW4kN4PF/CLe3X69EcFuLbLQLMewSY9wgw7/kLaIwBtgdcB2UAAAAASUVORK5CYII='; | |
// エラーアイコン | |
var ricon_e = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAADRUlEQVR42u3YT2jTUBwH8F+dgS12'+'znVlYa46N2pRq1jYXfAiePLgQRhDPHhRFGRuoIgiovhnOg8qOygiOobiyZPgRRAEDwpDF1drqXZUt4ysOqbVUcfzvbYpaZs2Tfo6'+ | |
'u+f7XrakS8pn7+Xl/X4OhBD8T3FwMOPhYNbDwayHg1kPB7MeDmY9HMx6OJj1cDDr4WDWw8Gsh4NZDwezniUDyz39SGhqBLFBTB0n'+'fiUgMfcdAqPXHUyBp/oHkbDamT0WWltSP5MzswArVoJQL2D4D/ganIDux7eqjq8aWD19AwntUhqWiRKZBMnblf49HAGpa336AwJ3'+ | |
'N0HyiwLRYLCqcOpg9dwwIqOYD/Xfu+iQD5xEenD2XD4cXxuVZeh+dJM6nBqYTF3R22EI1Y6NwDmf5cPVOYiNT0Dg4RA1eMVg9RSe'+'uuukktBywMXgouSCxNQMxIIhKgucbbB6/jbSpp8Z1Aq4GFwbceX9B/CPXrUNtwy2A7UDNoXjVd0/Yn2qlw1WL9/F71GnLWgl4JJw'+ | |
'/DpT3o1bgpuCaUBpgM3g8c+T4Bs+a3q/omCaUJpgU/jER/CVuG8BONY3iBp9ha8XWtGDqd0zDz4fioJnaMAQnQMe230Qde7ZlfMH'+'ZIFYDiFQfT49eQaBp3cK0DngN/uOIO/OHQU3q3W0HivU1UFycRHCz18Y7tSMp3RHG34e5rPnls2UXvgD4oa1+DmOlDel9SE7KHIx'+ | |
'2eXo4TW5aGWgsZevSy5YJcEkZLTr1zhBbGulAqf+WsJQoaUZlLeyKbQssJYQ/hLX5o1QMxsPAm1uhOS3eXBfOGrpn2Zpayn39iFp'+'21YQXU22RrzirWVmRJPTKrivHLP1ONgqHki7Rtq+xTLcdvGQeUbJd7nPHKqoYqqoPJT3n0CS31c23HJ5qEHjuFiQQ+C/f+nflYf6'+ | |
'jPUOIM8mX7Z2LQYvuwGgQZV4ug4eGaydBkAB3NcFohvD1XgB3LTFQ6DtralrY6EIVWhVwFl4z3E84l5DuGETjyxGma5JLBiGwOi1'+'5dPE0+fV3sPI09EJ9VILRi2kzuW0aTGU5Lc6C0riJ3Q/oD+iSwrWR2vEu/AmRglHQVjVwGYjvtbCwayHg1kPB7Oev9FP96eURC+L'+ | |
'AAAAAElFTkSuQmCC'; | |
// 起点アイコン | |
var ricon_f = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAADo0lEQVR42u3Yy08TQRwH8F/VVWjD'+'u9JgawBDCKQaSTiTYjBGvBgPXggx+i8YbwYPRg968O5JYpCDxoNe8CCRhph4ISGYPkIIUFMeiysGwQJWMs5smGa7O93ubrumjvO9'+ | |
'bFu62/3wm52XByEE/1M8Asx5BJj3CDDvEWDeI8C8R4B5jwDzHgHmPQLMewSY9wgw7xFg3iPAvOevgYdi71GddAKqvV71/W4mA1uZ'+'XRjvueThCnxnbRbVSlW5982Hrzeye3AEEFRJxzF8B+Krq/C6d9B1vGvgESWOgpJXhdEsyivQETilvl6QV+FMIKi+JnC/VA0r2QzE'+ | |
'UylX4WUH31eSiFRRDx0ND3huxiaRFkw/08PJuZ9TS/DKBXjZwKTpdnjrDdBbyjFL5z/z/zZUXMnuwlx6GV72lA9eMviuEkOnJR+z'+'otFoVL14pL/f9BrRqSn1GIlEDBUPeGthLbMNyfSXsnRwjsEPlASizU8PVREWsSw0ObKaOql4HP/GePiiY7htcDFoDoDBeixF0bD+'+ | |
'TsE0heBJeR3Gwhdswy2DH+HOqK5AZ8T6vh5MsdPhZvXYF9swoFlgM/gW6dzkNVvwomC7UDMw6Zi0vTSrQysELgZf3PwKTzv7isIL'+'gp1CzcAktMJ0WLJWF+vwBIaPmsAN4NvpGdRZ02SA2g2pXrFnWBtSfafRw+e3v8GTUC8TnQcenJ1AV9u7875AOggnYT2jhaKvvpMQ'+ | |
'qDZvlhIwwRi/88DXZybQQEe34WKVjtZij0oSHGSzMLmQYM7UmE26taYBPw+/cp85adI0ZjMtVpN30rRpk96HA2jDs73E5rq1Jq0N'+'mUGRk8ksRwsvtaOhvbTdYYl1LT30Y3rRtMMyBZOQatdX+aDFW2MbTmda2rCGJbtgPbQJjyRzpMe3MCQVBed+ZH4adTeehEqZeBBo'+ | |
'A76X7/heHvrDtlqcranlcOwDOhdogUYLFXdjakkruo470cf+s44eLUeLB7Jdcz4QMoWXc/FAn1HyW/f8XSWtmEpaHt7ANxXGN1UI'+'XurykEI38bVj+JrPS+gwywKmGZ59h7pCrbm1qxbuZAOAQuXMD7wOTsFYz+XK2QDQwztDbeD3+kDJ/MyDW9niIdAg/qeRc+fTy2WF'+ | |
'ugKmGVIrzoazNvEIlO6aJDF03AWoq2Caa5/eovZQEAJ4LN8//Ey7TUugJMreHuzIMrzovfLvbtPqQzfiW/B4voAr7VP3oznciK+0'+'CDDvEWDeI8C85w/zOie2NTYv+QAAAABJRU5ErkJggg=='; | |
// 終点アイコン | |
var ricon_l = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMA/wD/AP83WBt9AAADeklEQVR42u3YzUsUYRwH8N9WU7qL'+'75uL7YYWIsoWCZ5lDSOyS3ToIhL1L0S3qEPUoQ7dOyVhHooOdbFDkiJBF0GMfUFE3VhfxibDtFXb5On5DT7D7uy4OzM7I+vT8z3N'+ | |
'Djszz2eeZ543DyEE/qd4BJjzCDDvEWDeI8C8R4B5jwDzHgHmPQLMewSY9wgw7xFg3iPAvEeAec+BgfujH0mNdAIqvV7191Y6Devp'+'LRjuvOzhCnx3eYpUSxXa78a949XMNhwBAhXScQrfhNjSErzt6nMd7xr4vhIjQcmrwljm5EVoDZxSj2flJTgbCKrHCPdLlbCYSUMs'+ | |
'mXQV7jj4oZIgWIt66GC413MrOkqyweycHo7Xfk3OwxsX4I6Bsem2ems1aCQq27rPeDigwZXMFkynFuB1p3PwksH3lCg5LfnyavS2'+'cgwiPT3WsGNj8ML/N6epB7zVsJzegETqmyMdnG3wIyVOWPPLhmIzVQs/Pk7sgCORiHq9UVPHGo/RZwyHL9mGWwYXg2qF14ERYyYM'+ | |
'zLIfPCGvwFD4omW4afAT2hnV7NMZGf3fCIzNVd9pmS2oEXwdOzd52RK8KNgq1C1wMfjc2nd43tZd9H77gu1C3QYXg8cpfLAAPA98'+'JzVJ2qoa8qBWo++lzXzD+ELsRA+f2fgBz0JdhugccN/UCLl2piPnD9hB2El3dNXSsIQvZCLcaOtZGIRm5918HEYMxu8c8I3JEdLb'+ | |
'2pF3MzvogwRnY49KEuxmMjA6GzecqRk26eaqOvo9/NHOHZYmvQO70EJne/G1FXNNOjs4g8KLcZaTDS/HTotBP6fmCnZYBcEYrO3a'+'Ch80eassww9iWEJoAx1JpvFeJoakomDtITMTpKP+JJTLxAOhdbQsP2lZHvvDll6apanlQPQTOR9ognoTNe7G1JLV6ArtRJ/6z9n6'+ | |
'HGwtHnC75kIgVBDu5OKBfaP4rAf+9pJWTCUtD2/SQoVpoYzgTiwPGXSN3jtK7/myhE7OETDLwNQH0h5q1taumFI2ABhUTv+i6+Ak'+'DHVeKZ8NAD28LdQCfq8PlPRv7bzZLR6EBulLw2tnUguOQl0Bs/SrNW4MN9rEQyjbNUlQ6LALUFfBLNe/vCdnQkEI0LF8Z+9c9jYt'+ | |
'QjHK9jZsyjK86rp6eLdp9WEb8U10PJ+lNe1T96M53Igvtwgw7xFg3iPAvOcfcDIRtt/m9fAAAAAASUVORK5CYII='; | |
var atk_icon = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABnRSTlMAwADAAMCNeLu6AAABIUlEQVR42u3Yaw6EIAwE4OVkXh1P'+'xsZNTBpSHiZthdmZn0giH2BFU875809JBIOHYPQQjB6C0UMweghGD8HoIRg9BKOHYPQQjB6C0UMwegj2zHEcRWs/zzPBgW9sqmil'+ | |
'xKJDwalButAEEwwM1oqb1YQsWbTk5BRBt0C7grWV0iDNwQme1bZ3A0tsMtiMW4C17dtb4XpF7zbLd3UIWOJ6bb2+yxetGXALeuHq'+'5395cI3WkBrUbTAR4Bv9u9HLUFdwq0JrRSsSaw7uQUftWx0tZ6D1NZlIuBm4B21NxBvPtfkKywFrBWs0GbKPB9r9aKlhW19GHmfn'+ | |
'EPAs9mnfpcGzgCd9twCPAK2PjG3BI0D0r1v3k5Y3YAnwyiEYPQSjh2D0fAED+WdMDlMwAwAAAABJRU5ErkJggg=='; | |
//----------------------// | |
// レーダー描画アイコン // | |
//----------------------// | |
var icon_m = new Array(); | |
// red | |
icon_m[0] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAABGdBTUEAALGPC/xhBQAAABhJREFUGFdj/M+ABP7/ZwDyEYgY'+'/n8UAAB2YibbE1hiFgAAAABJRU5ErkJggg=='; | |
// green | |
icon_m[1] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAABGdBTUEAALGPC/xhBQAAAB1JREFUGFdjZGhggIP/9f8ZQHwY'+'+v+fMB+oBhkAAG1dIOdybdeqAAAAAElFTkSuQmCC'; | |
// orange | |
icon_m[2] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAABGdBTUEAALGPC/xhBQAAABxJREFUGFdj/N/gwAAH9fsZgHwE'+'+v+fMP8/CgAA8fEv28S8Pq0AAAAASUVORK5CYII='; | |
// yellow | |
icon_m[3] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAABGdBTUEAALGPC/xhBQAAABhJREFUGFdj/P+fAQn8ZwDykRAx'+'/P/IAABygjLPOSZPYAAAAABJRU5ErkJggg=='; | |
// black | |
icon_m[4] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAABGdBTUEAALGPC/xhBQAAABdJREFUGFdjYEAC////R+YyEMMH'+'qkEGAG3+GuaurV/rAAAAAElFTkSuQmCC'; | |
// blank | |
icon_m[5] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAABGdBTUEAALGPC/xhBQAAAB9JREFUGFdjPHDgAAMM2NvbMwD5'+'cPD//3+CfKAaZAAA6go158lfhdYAAAAASUVORK5CYII='; | |
// purple | |
icon_m[6] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAABGdBTUEAALGPC/xhBQAAAB1JREFUGFdjbGD4zwAD9UAmkA9H'+'////J8gHqkEGAGOJLNsJpCpLAAAAAElFTkSuQmCC'; | |
// blue | |
icon_m[7] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAABGdBTUEAALGPC/xhBQAAAB1JREFUGFdjZGD4zwAD/8FMIAFF'+'/8EC+PlANcgAAF56JttM3K+FAAAAAElFTkSuQmCC'; | |
// aqua | |
icon_m[8] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAABGdBTUEAALGPC/xhBQAAABxJREFUGFdjZPj/nwEGwCwgH4b+'+'g+QI8IFqkAEAWpoyz55hZGAAAAAASUVORK5CYII='; | |
// wall | |
icon_m[9] = 'data:image/png;base64,'+'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAABGdBTUEAALGPC/xhBQAAAB5JREFUGFdjbGhoYICB+vp6BiAf'+'Dv7//0+QD1SDDABreyznkufwCAAAAABJRU5ErkJggg=='; | |
var root_icon = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAAAAlwSFlz'+'AAALEwAACxMBAJqcGAAAAMFJREFUaN7t17ENg0AMQFGbDSgoWSTrkLFgnSxCSZERLkVQJCKR'+ | |
'QGKfbOm/igKJ+xR3ZxEAAAAAAAAAAAAAAJCf1vhIKeV2aDGql7TB75HLPD0f7tfti+0oIiJd'+'P1SJV8/Q3chP2nETbx2uHrHLPJ2L/BJuGa0hYx2jNWysU7SGjnWIbizW4xq7bnqvDfBPjWRh'+ | |
'9EPzBK/ndYjgrh/MFnTkbGaX5hzmplXxLn02PNNd+qdpaWdiSjMtRZ+HAQAAqnkAv9l3FuVV'+'5wsAAAAASUVORK5CYII='; | |
// 兵士構成 | |
var solname = ["剣","槍","弓","騎","矛","弩","近","斥","斥騎","衝","投","武"]; | |
//faraway 7.NPC砦、領土情報検索ツールのソース(bro3_npc_castle_info2.user.js) 変数部 終了 | |
//faraway 11.書簡送信アシスタントのソース(bro3_Send_Mail_Supporter.user.js) 変数部 開始 | |
//グローバル変数 | |
var VERSION_11 = "0.4.1β"; //バージョン情報 | |
var INTERVAL=1000; //負荷対策 回線速度によっては正常動作しない時があります。その際は数値を増やしてください。1秒=1000 | |
var HOST = location.hostname; //アクセスURLホスト | |
var PGNAME = "_MailSendSuppoter_"; //グリモン領域への保存時のPGの名前 | |
var DELIMIT_11 = "#$%"; | |
var DELIMIT2_11 = "&?@"; | |
var SENDTFLG_NEW = 0; //新規作成画面 | |
var SENDTFLG_PRE = 1; //確認画面 | |
var SENDTFLG_END = 2; //送信履歴画面 | |
var SENDTFLG_CON = 3; //新規作成画面連続送信中 | |
var ADDRESSCNT = 36; //アドレス帳のカウント(ソース変更必須) | |
var d_11 = document; | |
//faraway 11.書簡送信アシスタントのソース(bro3_Send_Mail_Supporter.user.js) 変数部 終了 | |
//faraway のソース() 変数部 開始 | |
//faraway のソース() 変数部 終了 | |
//faraway 12.書簡同報リンク変数のソース() 変数部 開始 | |
var num_12 = 6; // 設定する個数 faraway110606 num->num_12 | |
//faraway 12.書簡同報リンク変数のソース() 変数部 終了 | |
//faraway 13.書簡保存&検索ツールのソース() 変数部 開始 | |
//////////////////////////////////////////////////////// | |
// 変数定義 | |
//////////////////////////////////////////////////////// | |
var d_13 = document; | |
var $_13 = unsafeWindow.jQuery; | |
var $xp = function (xp, dc) { return d_13.evaluate(xp, dc, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); } | |
var $xp1 = function (xp, dc) { return d_13.evaluate(xp, dc, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; } | |
var location_inboxURL = "/message/inbox.php"; | |
var location_outboxURL = "/message/outbox.php"; | |
var uneiLimitTxt = "ブラウザ三国志運営チーム"; | |
var pageUnit = 12; | |
var worldKey = location.hostname; | |
var hrefArray = []; // [[書簡ID, URL]] | |
// 以下、GM変数 | |
var syokanIdArray = []; // キャッシュ済みの書簡IDの配列 | |
var soushinsyaArray = {}; // {ID: soushinsya} | |
var atesakiArray = {}; // {ID: atesaki} | |
var kenmeiArray = {}; // {ID: kenmei} | |
var nichijiArray = {}; // {ID: nichiji} | |
var opValues = {}; // {autoCash: true/false, uneiLimit: true/false} | |
//faraway 13.書簡保存&検索ツールのソース() 変数部 終了 | |
//faraway 14.トレード検索条件記憶のソース() 変数部 開始 | |
//faraway 12.と重複の為 | |
var num_14 = 200; // 設定する個数 faraway110606復活 111012 num->num_14 | |
//faraway 14.トレード検索条件記憶のソース() 変数部 終了 | |
//faraway のソース(17.bro3_Auto_Bilder_nokin_custom) 変数部 開始 | |
var credit = "nottisan with nokin + ceri + kiri"; | |
var nxTime = 30000; | |
var tidMain; | |
var tidMain2; | |
//寄付用 | |
var OPT_RISE_KIFU_MAX = 10000; //寄付を開始する糧の量 | |
var OPT_RISE_KIFU = 1000; //寄付をする糧の量 | |
//市場用 | |
var OPT_RISE_MAX = 30000; //市場変換開始する糧の量 | |
var OPT_TO_WOOD = 10000; //木に変換する糧 | |
var OPT_TO_STONE = 10000; //石に変換する糧 | |
var OPT_TO_IRON = 10000; //鉄に変換する糧 | |
var WOOD = 101; //木の内部コード | |
var STONE = 102; //石の内部コード | |
var IRON = 103; //鉄の内部コード | |
var RICE = 104; //糧の内部コード | |
var OPT_TO_CODE = new Array(); | |
OPT_TO_CODE["wood"] = 101; | |
OPT_TO_CODE["stone"] = 102; | |
OPT_TO_CODE["iron"] = 103; | |
//新規作成用 | |
var OPT_KATEMURA = 0; //自動糧村化オプション | |
var OPT_TORIDE = 0; //自動砦化オプション | |
var OPT_SOUKO_MAX = 1; //倉庫の最大数 | |
//内政用 by nottisan | |
var OPT_DOME = 1; | |
//グローバル変数 | |
var VERSION_17 = "1.5.17β"; //バージョン情報 | |
var INTERVAL_17=1000; //負荷対策 回線速度によっては正常動作しない時があります。その際は数値を増やしてください。1秒=1000 | |
var HOST_17 = location.hostname; //アクセスURLホスト | |
var PGNAME_17 = "Auto_Bilder"; //グリモン領域への保存時のPGの名前 | |
var TIMEOUT_URL ="/false/login_sessionout.php"; //タイムアウト時のURLの一部 | |
var g_MD_17=""; | |
var SENDTFLG_TIMEOUT = 0; //タイムアウト画面 | |
var SENDTFLG_LOGIN_MENU = 1; //ログイン画面 | |
var SENDTFLG_LOGIN = 2; //ログイン中 | |
//faraway110523同じ宣言があるためコメントアウト var d = document; | |
// 保存データデリミタ | |
var DELIMIT1_17 = "#$%"; | |
var DELIMIT2_17 = "&?@"; | |
var DELIMIT3_17 = "{=]"; | |
var DELIMIT4_17 = "|-/"; | |
//保存データインデックス(拠点) | |
var IDX_XY_17 = 0; //座標 | |
var IDX_BASE_NAME_17 = 1; //拠点名 | |
var IDX_URL_17 = 2; //拠点URL | |
var IDX_ACTIONS_17 = 3; //実行中作業 | |
var IDX_BASE_ID = 11; //拠点名 | |
//保存データインデックス(実行中作業) | |
var IDX2_STATUS_17 = 0; //ステータス | |
var IDX2_TIME_17 = 1; //完了時刻 | |
var IDX2_TYPE_17 = 2; //種別 C:都市画面、D:内政スキル、Fxy:施設座標 | |
var IDX2_ALERTED_17 = 3; //通知済フラグ | |
var OPT_CHKBOX_AVC = 1; | |
var OPT_CHKBOX_AVC11 = 1; | |
var OPT_CHKBOX_W = 0; | |
var OPT_CHKBOX_S = 0; | |
var OPT_CHKBOX_I = 0; | |
var OPT_CHKBOX_R = 0; | |
var OPT_CHKBOX = [0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; //ac.42 | |
var OPT_CHKBOXLV = [15,15,15,15,15,20,10,10,10,10,15,15,15,15,15,10,10,10,10,10,20,20,20,10]; //ac.42 | |
var OPT_MAX_LV = "2"; | |
var OPT_FUC_NAME = ["拠点","伐採所","石切り場","製鉄所","畑","倉庫", | |
"銅雀台","鍛冶場","防具工場","練兵所","兵舎","弓兵舎", | |
"厩舎","宿舎","兵器工房","市場","訓練所","水車","工場", | |
"研究所","大宿舎","遠征訓練所","見張り台","修行所"]; | |
var OPT_FNID = new Array(); | |
OPT_FNID["拠点"] = 0; | |
OPT_FNID["伐採所"] = 1; | |
OPT_FNID["石切り場"] = 2; | |
OPT_FNID["製鉄所"] = 3; | |
OPT_FNID["畑"] = 4; | |
OPT_FNID["倉庫"] = 5; | |
OPT_FNID["銅雀台"] = 6; | |
OPT_FNID["鍛冶場"] = 7; | |
OPT_FNID["防具工場"] = 8; | |
OPT_FNID["練兵所"] = 9; | |
OPT_FNID["兵舎"] = 10; | |
OPT_FNID["弓兵舎"] = 11; | |
OPT_FNID["厩舎"] = 12; | |
OPT_FNID["宿舎"] = 13; | |
OPT_FNID["兵器工房"] = 14; | |
OPT_FNID["市場"] = 15; | |
OPT_FNID["訓練所"] = 16; | |
OPT_FNID["水車"] = 17; | |
OPT_FNID["工場"] = 18; | |
OPT_FNID["研究所"] = 19; | |
OPT_FNID["大宿舎"] = 20; | |
OPT_FNID["遠征訓練所"] = 21; | |
OPT_FNID["見張り台"] = 22; | |
OPT_FNID["修行所"] = 23; | |
//市場変換処理用 | |
var OPT_ICHIBA = 0; | |
var OPT_ICHIBA_PA = 0; | |
var OPT_ICHIBA_PATS = ["平均的に変換","一括変換","自動割当"]; | |
//自動寄付用 | |
var OPT_KIFU = 0; | |
var d_17 = document; | |
var $_17 = function(id) { return d_17.getElementById(id); }; | |
var $x_17 = function(xp,dc) { return d_17.evaluate(xp, dc||d_17, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; }; | |
var $a_17 = function(xp,dc) { var r = d_17.evaluate(xp, dc||d_17, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); var a=[]; for(var i=0; i<r.snapshotLength; i++){ a.push(r.snapshotItem(i)); } return a; }; | |
var $e_17 = function(e,t,f) { if (!e) return; e.addEventListener(t, f, false); }; | |
//LvUPリンク | |
var LVUPLINK = "http://SITE/facility/build.php?x=urlX&y=urlY&village_id=viID#ptop"; | |
var URL_SITE = "SITE"; | |
var URL_X = "urlX"; | |
var URL_Y = "urlY"; | |
var URL_viID = "viID"; | |
//新規作成リンク | |
var CREATELINK = "http://SITE/facility/build.php?ssid=ssid_val&x=urlX&y=urlY&village_id=viID#ptop";//2012.4.24 VerUp対応 ひろひろひろ | |
var URL_SSID ="ssid_val";//SSID ;//2012.4.24 VerUp対応 ひろひろひろ | |
var URL_fID = "fID"; //建物のID | |
var HATAKE = 215; | |
var SOUKO = 233; | |
var SUZUME = 216; | |
var VillageData = new Array(); | |
var OPT_VILLAGE_17 = new Array(); | |
var isMixi_17 = true; | |
//faraway 17.bro3_Auto_Bilder_nokin_customのソース(bro3_Auto_Bilder_nokin_custom) 変数部 終了========================================== | |
//faraway 18.全体マップ移動距離カスタムツールのソース(bro3_change_move_size.user.js) 変数部 開始========================================== | |
var DELIMIT1_18 = "#$%"; | |
var DELIMIT2_18 = "&?@"; | |
var VERSION_KEY_18 = "vtA101"; | |
var VERSION_18 = "1.10"; | |
var BASE = " 0 0"; | |
// 共通関数 | |
var d_18 = document; | |
var $_18 = function(id) { return d_18.getElementById(id); }; | |
var $x_18 = function(xp,dc) { return d_18.evaluate(xp, dc||d_18, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; }; | |
var $e_18 = function(key) { return d_18.evaluate(key, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); }; | |
//faraway 18.全体マップ移動距離カスタムツールのソース(bro3_change_move_size.user.js) 変数部 終了========================================== | |
//faraway 19.都市画面内政武将表示ツール(βバージョン)のソース(bro3_display_adm_info.user.js) 変数部 開始========================================== | |
var DELIMIT1_19 = "#$%"; | |
var DELIMIT2_19 = "&?@"; | |
var VERSION_KEY_19 = "vtB100"; | |
// 共通関数 | |
var d_19 = document; | |
var $_19 = function(id) { return d_19.getElementById(id); }; | |
var $x_19 = function(xp,dc) { return d_19.evaluate(xp, dc||d_19, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; }; | |
var $e_19 = function(key) { return d_19.evaluate(key, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); }; | |
// ゲージアイコン | |
var gage_icon = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAAFUAAAAGCAYAAACy79IDAAAABnRSTlMA/gD8AP5/ebwCAAAGK0lEQVR42i2V6W9cZxWHn7vNvtgz'+'k/HEcbwkTt04i9NQUpxiXCelAtSkKoIIFCGEEEJIIL7xib+C70iUIESjEKqiBtGUtGRtCU7iOIkbN3HiLa6XsWe9M3fu3PtyZsJ8'+ | |
'u++cdznP+Z3f0fymT+s3cXtUpcwOdAMsBaoOWgNCEQhYGpqr4W4pTB06MzqmxNTlu1GU720aqU7Z6CjW5nwsiRnYY5IIQX5Fsfi5'+'x84dBvtHDCw0bnzYpCx73zxhkZN9qwsely669G43+PbxEEruvXGtwfJ8k7GvhemTs+obcPnDKpGAzuirUYygxvy0w+M7dQZ2BxkY'+ | |
'loc6Gnc/LuLZHgdHUxKjU15y+PKBTTIdIDsYA8mj8qSKs+6Q2BnHigfxKy7Fp0V8pdHZE0U3NQqrNTa2aqSSQVIJC+V6PFixcTwY'+'kbMMTXKtNJkuN+kWPnubZdTZf2stltoP755SV+qfcDx6DL0psIRNC5ze+teWgKaAjWpYhsS70NhUBOWQZFrDlJBaXlEXsJmsgE0b'+ | |
'uBXFymOPsCS/50WdiCS2Nu+z9Mhj77BBX6+BLufc/rSJLfvGxyx2ZnWeLSoufeTQv8PkmxMhfFdx47LL6pLLq0fD5Potams+n31i'+'Ew/rfOUVgShvWpxusDhbp39XiO6BkABVPL5VbRd4YL9ACxvYq3LOvTLJjADanZA8FKXZEkqAxHoTGBELr9KgsFhGE6CpXFQSV2yu'+ | |
'19ksOqQTATpjJs2Gz0NZ85RiOGlJ/j5rdZ87ZZce2Tc8+THOkXGRzWVU2owR0yIYUsVWwgEBGwgIXE/DKyp0TyfZqbXXVU1RE/VF'+'IjpdPQJbCrE57+GWoX+3QUZgV9cVC/cV6Q44cMgiKaqau9/k0ZTP2LjFviFdCqjx7u8bokrFL38WIR01mZp0uPC+w1dHgrx9Mkxl'+ | |
'S+PC+SrF1SYnTsbJ9VgsCMSr/7Dp7w8wOhZB8w3uXauwOFXnyLEO0rmW8nxuvrcpHaNx+PWMKEQnP2OTv1ci0x8TsEm8kkd5ehNN'+'4McGOjDkfnerzsoXBcLxANu6w+D5LCxVWRWwfZkQWQHrVD2urFQxNY3X0iIrX3Gv5DJZ9jgk7T1SLjyHKvwwpJ11absW1KDVanmx'+ | |
'AZG6tyVr4hAdaZ1gC6oosbqsiMc0tvdJOwucdVGhW4LBIYOsqK78TPFEAOYkn5GXpcphjYe3msxOerz+RoCR/Ua7Vd/5nSNQFL/5'+'VYRs3OL61Trvn3MYHw1x6u0w5TycPVOlvOFx6vtxuvsCPBbwl85XGBoKMTYRkwR0bl2sMH/bZuxbKTI9otaCx/W/bBAQ9bzyZlcb'+ | |
'6tqdChtTRXKDSVIvCNRCk8KtTQzHJzbUiSlqdfI2yzNbRDuCdO2QTvAUc09KrAjUwWyYroRJTazio4WqsNB4IyOQRLWThQb/kSKN'+'Sh0ORcXgvnf3u+rc+nlEeHKB3oYZkAKYkqxfEkWJkuKdOiF5IHWFLcCioecqDUhKpQWf6oaib5dJ93YdW+zhyX+bJGI6R0ZFpWId'+ | |
'c3d8Zm42mThuMbzXRJcWvXDOxRZf/fHpEC/2msxMeZz5Q5WX9wX5yY9iuLbP2T/VWJh1Of2DOAMHgmx94fG3P5bIiUK+czIpVdeY'+'+meVz2/aYgdRBvfHaBRg8gNRoMyElyZSBAVE4aHD0yubZPsjdL+UaVvD+rU11FaT9IFtGNLejQ2btQeb6GJb3Xs62gpcmi/xbM2m'+ | |
'Nxchlwzg2C7XBagvIL+eDRJUPo/EQv6Vdzggg+io5OP89tcilP8PKv2irhIBrV1dq7VQaU0inVhcERJf1EVZzqoMIRHZNhkowpXq'+'l+Kna0oAC+Tu57Dmp5tymc6+wyaZhNYeXDOfeQzuMhg/ZhGUQvz9TIONZZ+f/yLMrpzB4kOPP5+p84LA/elp8TNR/wfv1Zi96/LW'+ | |
'iSgHDweprvj89Z0yUXnjybeSWFGDmas1bl8qM3wwyqHRuLxX48q7eZyixzdEoYGoLoWo8/RGgXRXiN7DnQLUoHC/iC1w0kMCPRUV'+'i3PIT6/TlJSze5KYgdYcqLC8UqYrE6Y70xqeHp/OlSi7Pq9tD4sVCnRR6OV8g37T4+junajrT9uD6n8kQMHfz+X6+wAAAABJRU5E'+ | |
'rkJggg=='; | |
// デッキアイコン | |
var icon_m_19 = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAAFUAAAAXCAIAAAD1B5RqAAAEdElEQVR42mNkYGDwN83KLorn5uNkGDHg66fvU/sWbjw9jdHHOL2y'+'KZsJCJgZSTWFkZFkLYMB/P///9/f///+/euon8a4fclxPkHuIeoTSgDQ/58/fGM8vOnifzCghR2nD1/xDLN58/zDQHsWC2CEgEMb'+ | |
'L/z+9YdsU54/fs3Byc7Jxf77N8gQdg42IPn183dRSUE7f4NF3dviSr1mNa1X0ZKj3MX8QjzGTur71pylVhCwsrEwHtxw/uf3X//+'+'kRn/7lHmeGTP7L3x+vn7d68/iogLUu5cBXVJdWO5bYuOMbMwU8X/nNzsjAfWn/vx7RfZ6f/FkzcSMiIQ9s8fv/78/gthA5OAmJQQ'+ | |
'VVwJBzpmyjKqoncvPb1y+i7EImAq+/blB9kGcvFwgPz//etPGuV/PACYKPQt1B7ffYlHDTAEgQkevzlfP/44tPk8Rf4HBuF/ctM/'+'Gd5++fytpp6SgoaUlpnC8om7+AV5IFL2/kbHtl9CLoy+f/tp72f06sl7aHDICIpI8b959vHo9ouQ+H/76oOMgjjZjgE2eRj3rz0L'+ | |
'9P/fv//I0O+baEOMss3zj8DZTkEmQHLfujPAgjOtLvDi4TuP7rwAity6+qC4JwaYtq+dvY/LnF8/fwdnON48++jWpUdUiQxQxQ/0'+'/+eP38hL/9IKYpw87HAuDz+nnDooNoBOZGFlhkQRsI599vA1XA0wSVt4aAPrBQFhXudgU25+jk3zDjOA2yT+yXbAyujD28+4rAMm'+ | |
'DaD/r516cOfKY+r4XwDmf2BjgComAv0AJDfOPYRfDdAPty8/unP9kYomtF7UMVVW1pMG1pTi0sJ4gtvEWQOY/g9uOgcMX2BdCwxE'+'YKJ4/+YTea4FZj1Q++/xvRdAUyj3PC8/N7C2f3Tz5ebF+Pyva6p6+fRtNMHsllAgObVmNVzk589fRd3RxNiLrIskAGyVgPx/7+Zj'+ | |
'qvg/Jt8bWD4B0/C5Y9dI0hgQ76SgJYGm8cvnbxk1oECBlH/sHKzsnGzA+g/IXjtjP1zZ4/vPyXawhp4S47bFx25ffQisuin0vKWT'+'gY2vHpDRXbiIJI3ekXbAigBYjU1rWIVfJTDB57VHkGEFLqBrosa4deHRaxfvUuJ/I0ste39DLl4OBnDM3Lh8jxhdMvIS6noKwLKQ'+ | |
'AVyHt+TO4uHlxq+FiYmxcnISkNGaPZcq/ge6nBFYOV05d+vHj5/kGRGW4gGMPQgbWOydP0lUynfytgD2DiBsYGWxfOY2Iq1rmJUB'+'ItNmUMX/ZjZ6jMDq58Kp6z++k+l/eSVpGw/DMwev3bxKVLRDgJCIALBf+PDW83PHr337+p14jallIWKyAtXJk7m4qDBaY+lgyAiM'+ | |
'tLPHr3z/Rn4regABpNpmYmIiQy+w72vjbALy/8XTN96+eT/QfqE34OXjNrPRZ5zXvglY+V2+cINaTaAhAZiZmbV0VTk42RmtVULL'+'q/Ie3X1+/y7JjeoPHz4OtEdI8DCczcvLo6gsJ6Mo3tk+CTTsZ6EUlJQQKyTKP9COHAAAAMC58cqqWOdsAAAAAElFTkSuQmCC'; | |
// データ保持変数 | |
var servertime; | |
var servertime_t; | |
var vname = new Array(); | |
var fname = new Array(); | |
var rare = new Array(); | |
var gage = new Array(); | |
var skill = new Array(); | |
var limit = new Array(); | |
//faraway 19.都市画面内政武将表示ツール(βバージョン)のソース(bro3_display_adm_info.user.js) 変数部 終了========================================== | |
// ブショーダス履歴用 | |
var d_24 = document; | |
var $d_24 = function(id) { return d_24.getElementById(id); }; | |
var $x_24 = function(xp,dc) { return d_24.evaluate(xp, dc||d_24, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; }; | |
var $e_24 = function(key) { return d_24.evaluate(key, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); }; | |
var VERSION_KEY_24 = "vtn200"; | |
var VERSION_24 = "1.20"; | |
var urlpath; | |
var maxpage; | |
var putText_24 = ""; | |
var card; | |
var t_rare_count = {}; // ランク別カード数 | |
var g_rare_count = {}; // ランク別カード数 | |
var s_rare_count = {}; // ランク別カード数 | |
var l_rare_count = {}; // ランク別カード数 | |
var sp_rare_count = {}; // ランク別カード数 | |
var sho_rare_count = {}; // ランク別カード数 | |
var tai_rare_count = {}; // ランク別カード数 | |
var stp_rare_count = {}; // ランク別カード数 | |
var itm_rare_count = {}; // ランク別カード数 | |
var xg_rare_count = {}; // ランク別カード数 | |
var xs_rare_count = {}; // ランク別カード数 | |
var total_cards = 0; // 総カード数 | |
var g_total_cards = 0; // 総カード数 | |
var sp_total_cards = 0; // 総カード数 | |
var s_total_cards = 0; // 総カード数 | |
var l_total_cards = 0; // 総カード数 | |
var sho_total_cards = 0; // 総カード数 | |
var tai_total_cards = 0; // 総カード数 | |
var stp_total_cards = 0; // 総カード数 | |
var itm_total_cards = 0; // 総カード数 | |
var g_ex_cards = 0; | |
var s_ex_cards = 0; | |
var srup_text = ""; | |
// | |
//faraway 29.トレード収入計算のソース(bro3_calc_trade_income.user.js) 変数部 開始========================================== | |
//グローバル変数 | |
var VERSION_29 = "0.01"; //バージョン情報 | |
var HOST_29 = location.hostname; //アクセスURLホスト | |
var d_29 = document; | |
var $d_29 = function(id) { return d_29.getElementById(id); }; | |
var $x_29 = function(xp,dc) { return d_29.evaluate(xp, dc||d_29, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; }; | |
var $a_29 = function(xp,dc) { var r = d_29.evaluate(xp, dc||d_29, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); var a=[]; for(var i=0; i<r.snapshotLength; i++){ a.push(r.snapshotItem(i)); } return a; }; | |
var $e_29 = function(e,t,f) { if (!e) return; e.addEventListener(t, f, false); }; | |
var $v_29 = function(key) { return d_29.evaluate(key, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); }; | |
//faraway 29.トレード収入計算のソース(bro3_calc_trade_income.user.js) 変数部 終了========================================== | |
//faraway 31.自動巡回のソース(bro3_auto_map_move.user.js) 変数部 開始========================================== | |
//グローバル変数 | |
var VERSION_31 = "0.5β"; //バージョン情報 | |
//faraway未使用のようなので削除var MAX_XY = 600; //座標絶対値最大 | |
var CENTER_X_31; //中心X座標 | |
var CENTER_Y_31; //中心Y座標 | |
var MOVE_CNT=20; //移動量 | |
var MAPSIZE=3; //移動時の強制MAPサイズ変更 1=11x11 2=15x15 3=20x20 | |
var INTERVAL_31=2000; //負荷対策 回線速度によっては正常動作しない時があります。その際は数値を増やしてください。1秒=1000 | |
//faraway 31.自動巡回のソース(bro3_auto_map_move.user.js) 変数部 終了========================================== | |
//faraway .のソース(.user.js) 変数部 開始========================================== | |
//faraway .のソース(.user.js) 変数部 終了========================================== | |
//faraway beyond本体開始 ======================================================================== | |
( function(){ | |
//20120625 | |
if(location.hostname.match("mixi-platform.com")){ | |
//ブラ三以外は終了 | |
if(!location.pathname.match("/gadgets/ifr")) return; | |
if(decodeURIComponent(location.search).match(/&app_id=[^&]+&/)!="&app_id=6598&") return; | |
} | |
//20120915 mixiホームリンク追加→20130418削除 | |
if(location.href=="http://mixi.jp/run_appli.pl?id=6598") { | |
GM_addStyle(".appliAdArea01 { display:none !important;}"); | |
//bro3_mixi_iframeheigt_resizeの組み込み1 | |
window.addEventListener("message",function( event ) { | |
if(!event.origin.match(/http:\/\/m\d+\.3gokushi\.jp/)) return; | |
var iframe = document.getElementById('app_content_6598'); | |
if(iframe == null) return; | |
var data = JSON.parse(event.data); | |
if(data.command != 'resize') return; | |
iframe.style.height = data.height + 'px'; | |
},false); | |
} | |
//bro3_mixi_iframeheigt_resizeの組み込み2 | |
if(location.href.match(/m\d+\.3gokushi\.jp/)){ // フレームチェック | |
if(window.parent != window){ // フレームで無かったら何もしない | |
var height = 0; | |
setInterval(function() { | |
var target = window.parent.postMessage ? window.parent : undefined; | |
if(height == document.body.offsetHeight) return; | |
height = document.body.offsetHeight; | |
if(typeof target != 'undefined') { | |
var send = {"command": "resize","height" : height,}; | |
target.postMessage(JSON.stringify(send),'http://mixi.jp'); | |
} | |
},CHECK_TIME); | |
} | |
} | |
if(document.getElementById("beyond_basepanel") ) return ; | |
var VERSION_NAME = "ブラウザ三国志Beyond Ver2.0.48ν by hasekun" + " 統合版"; //ac.45 | |
var IMG_DIR = "/20100510-01/img/"; | |
if( location.pathname == "/map.php" ) {GM_addStyle("a.map-basing { display:none !important;}");} | |
cut_main(); | |
cut_main1(); | |
/////////////////////////////////////////////// | |
//Chrome用GM_関数 | |
// @copyright 2009, James Campos | |
// @license cc-by-3.0; http://creativecommons.org/licenses/by/3.0/ | |
if ((typeof GM_getValue == 'undefined') || (GM_getValue('a', 'b') == undefined)) { | |
GM_addStyle = function(css) { | |
var style = document.createElement('style');style.textContent = css;document.getElementsByTagName('head')[0].appendChild(style); | |
}; | |
GM_deleteValue = function(name) { | |
localStorage.removeItem(name); | |
}; | |
GM_getValue = function(name, defaultValue) { | |
var value = localStorage.getItem(name); | |
if (!value) return defaultValue; | |
var type = value[0]; | |
value = value.substring(1); | |
switch (type) { | |
case 'b': | |
return value == 'true'; | |
case 'n': | |
return Number(value); | |
default: | |
return value; | |
} | |
}; | |
GM_log = function(message) { | |
if (window.opera) {opera.postError(message);return;} | |
console.log(message); | |
}; | |
GM_setValue = function(name, value) {value = (typeof value)[0] + value;localStorage.setItem(name, value);}; | |
} | |
/////////////////////////////////////////////// | |
/////////////////////////////////////////////// | |
//配列のindexOf対策 | |
if (!Array.prototype.indexOf){ | |
Array.prototype.indexOf = function(elt /*, from*/){ | |
var len = this.length; | |
var from = Number(arguments[1]) || 0; | |
from = (from < 0) ? Math.ceil(from): Math.floor(from); | |
if (from < 0)from += len; | |
for (; from < len; from++){ if (from in this && this[from] === elt) return from;} | |
return -1; | |
}; | |
} | |
var d = document; | |
var $ = function(id) { return d.getElementById(id); }; | |
var $x = function(xp,dc) { return d.evaluate(xp, dc||d, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; }; | |
var $a = function(xp,dc) { var r = d.evaluate(xp, dc||d, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); var a=[]; for(var i=0; i<r.snapshotLength; i++){ a.push(r.snapshotItem(i)); } return a; }; | |
var $e = function(dc,e,f) { if (!dc) return; dc.addEventListener(e, f, false); }; | |
var isNarrow = location.host.match(/^[m|y]\d+\./i) ? true : false; | |
var MAP_X_MIN = -600; | |
var MAP_X_MAX = 600; | |
var MAP_Y_MIN = -600; | |
var MAP_Y_MAX = 600; | |
var OPT_HISTANALYSIS = 0; //24."武将ダス履歴抽出分析 Ver1.09" | |
var OPT_QUESTASSIST = 0; //25."クエスト補助" | |
var OPT_TRADEINCOME = 1; //29."トレード収入計算" | |
var OPT_RESERVATION = 0; //30."出兵予約" | |
var OPT_AUTOROUND = 0; //31."自動巡回" | |
var OPT_REPORTLOG = 0; //32."報告書・同盟ログCSV出力" | |
var OPT_URL_CHANGE = 1; //URLリンク変更スクリプト(bro3_url_change) | |
var OPT_URL_CHANGE_REV_RES=1; //URLリンク変更スクリプト(bro3_url_changeの掲示板逆順表示) | |
var OPT_ATK_CALC = 1; //スキル込計算スクリプト(bro3_atk_calc) | |
var OPT_MAPTOOL = 0; | |
var OPT_TIMER = 0; | |
var OPT_ALLIANCE = 0; | |
var OPT_DEVELOPMENT = 0; | |
var OPT_STATISTICS = 0; | |
var OPT_ALLIANCELOG = 0; | |
var OPT_NPCFORT = 0; | |
var OPT_RIGHTCLICK = 0; | |
var OPT_ALLIANCELEVEL = 0; | |
var OPT_MISTAKEPREVENTION = 0; | |
var OPT_LETTERTRANSMISSION = 0; | |
var OPT_LETTERBROADCAST = 0; | |
var OPT_LETTERPRESERVATION = 0; | |
var OPT_TRADINGRETRIEVAL = 0; | |
var OPT_TRADINGAFTER = 0; | |
var OPT_NAVIGATIONADDITION = 0; | |
var OPT_BRO3AUTO = 0; | |
var OPT_CHANGE_MOVE_SIZE = 0; | |
var OPT_DISPLAY_ADM_INFO = 0; | |
var OPT_MASS_SHOKAN_TOOL = 0; | |
var OPT_DECK_TOOL = 0; | |
var OPT_CALCN_1KI = 0; | |
var OPT_AFTER_DAY = 0; //ダミー | |
//faraway 110407 end | |
var OPT_B3NEWS =1; | |
var OPT_VILLAGE = 1; | |
var OPT_BASELINK = 1; | |
var OPT_MAPLINK = 1; | |
var OPT_XYLINK = 1; | |
var OPT_XYLINK_NK = 1; | |
var OPT_LARGEICON = 0; | |
var OPT_TTBL = 1; | |
var OPT_MEMO = 1; | |
var OPT_DETAILS = 1; | |
var OPT_DETAILS_UP = 1; | |
var OPT_DECK = 1; | |
var OPT_DECK_SET = 1; | |
var OPT_CTIME_B = 1; | |
var OPT_CTIME_U = 1; | |
var OPT_ALLY = 1; | |
var OPT_ALLY_IS = 1; | |
var OPT_ALLY_XY = 1; | |
var OPT_ALLY_CSV = 1; | |
var OPT_RES_T = 1; | |
var OPT_RES_TIME = 1; | |
var OPT_REMOVELIST = 1; | |
var OPT_MAPLIST = 0; | |
var OPT_TTDISTANCE = 1; | |
var OPT_TTDISTANCE_ITEMS = new Array(); | |
var OPT_MEMO_FONT_SIZE = "9"; | |
var OPT_MEMO_WIDTH = "21"; | |
var OPT_MEMO_HEIGHT = "5"; | |
var OPT_MEMO_COUNT = "1"; | |
var OPT_MAPLINK_FONT_SIZE = "9"; | |
var OPT_USER_STAR = 1; | |
var OPT_USER_LEVEL = 1; | |
var OPT_MAPCENTER = 1; | |
var OPT_TBREST = 1; | |
var OPT_DELMSG = 1; | |
var OPT_TSENDTIME = 1; | |
var OPT_SMALLBTN = 0; | |
var OPT_ATTACKMAP = 1; | |
var OPT_CARD_CMB = 1; | |
var OPT_PIKA_YOROZU = 1; | |
var OPT_PIKA_HPREST = 1; | |
var OPT_PIKA_MAPHELP = 1; | |
var OPT_PIKA_TRDHELP = 1; | |
var OPT_PIKA_BLINKBLD = 1; | |
var OPT_SUZAN_SEISAN = 1; | |
var OPT_CASTLE_AID = 1; | |
var OPT_NEXT_MEISEI = 1; | |
if (isNarrow) { | |
var OPT_VILLAGE_LIST_BOX = 1; | |
} | |
var g_MD; | |
var g_MX; | |
var g_MY; | |
var BASE_X = -9999; | |
var BASE_Y = -9999; | |
var USER_ID = ""; | |
var ALLY_ID = ""; | |
var RES_NOW = []; | |
var RES_MAX = []; | |
var RES_GROW = []; | |
var RES_GROW_W = []; | |
var RES_GROW_B = []; | |
var PRE_LOAD_NODES = {}; | |
var URL_PARAM = {}; | |
var Pika_elementQueue = []; | |
var VILLAGES_INFO= {}; | |
var SID = ''; | |
var OPT_STYLE = 1; | |
var DISP_RANK = 1; | |
var OPT_ILLUST_CHANGE = 0; // 某ゲームのイラストに置き換えるアホツール | |
var OPT_UR_CHANGE = 0; // 見た目を全部URに置き換えるアホツール | |
var OPT_SR_CHANGE = 0; // 見た目を全部SRに置き換えるアホツール | |
var OPT_PR_CHANGE = 0; // 見た目を全部PRに置き換えるアホツール | |
var OPT_HR_CHANGE = 0; // 見た目を全部HRに置き換えるアホツール | |
var OPT_AR_CHANGE = 0; // 見た目を全部URに置き換えるアホツール | |
var OPT_BR_CHANGE = 0; // 見た目を全部SRに置き換えるアホツール | |
var OPT_SENSEI_CHANGE = 0; // "水鏡先生"を"袁術先生"に変更に置き換えるアホツール | |
loadOptions();////20120625 | |
if( !initPanel() ) return; | |
initUrlParams(); | |
initStyle(); | |
initPreLoadNode(); | |
initResources(); | |
getMyInfo(); | |
initImages(); | |
disp_Options(); | |
initVillages(); | |
initCastleSend(); | |
if (isNarrow) initNarrow(); | |
if ( isNarrow && OPT_VILLAGE_LIST_BOX ) disp_villageListBox(); | |
if( OPT_STYLE ) cut_main2(); | |
if( DISP_RANK ) GM_addStyle("#social {display:none !important;}");//スタイル変更にチェックが入っていなくても動作するようにここでコールfaraway110525 | |
if( OPT_VILLAGE ) disp_village(); | |
if( OPT_BASELINK ) disp_baseLink(); | |
if( OPT_MAPLINK ) disp_mapLink(); | |
if( OPT_MEMO ) disp_memo(); | |
if( OPT_ALLY ) disp_AllianceInfo();//XYリンク加工前に呼ぶ | |
if( OPT_XYLINK ) disp_XYLink(); | |
if( OPT_TTBL ) disp_TTable(); | |
if( OPT_NAVIGATIONADDITION ) disp_navigationaddition(); //faraway110530 disp_Details()があると報告書でリンク表示しないため、呼び出し位置変更 | |
if( OPT_DETAILS ) disp_Details(); | |
if( OPT_DECK ) disp_Deck(); | |
if( OPT_CTIME_B ) disp_CompleteTimeBuild(); | |
if( OPT_CTIME_U ) disp_CompleteTimeUnit(); | |
if( OPT_RES_T ) disp_ResourcesTotal(); | |
if( OPT_REMOVELIST) disp_RemoveList(); | |
if( OPT_USER_STAR) disp_UserStar(); | |
if( OPT_USER_LEVEL) disp_UserLevel(); | |
if( OPT_MAPCENTER) disp_MapCenter(); | |
if( OPT_TBREST) disp_ToubatsuRestTime(); | |
if( OPT_TSENDTIME) disp_TSendTime(); | |
if( OPT_SMALLBTN) disp_SmallButton(); | |
if( OPT_ATTACKMAP) disp_AttackMap(); | |
if( OPT_PIKA_YOROZU ) disp_PikaYorozu(); | |
if( OPT_PIKA_HPREST ) disp_PikaHPRestTime(); | |
if( OPT_PIKA_TRDHELP ) Pika_installTradeHelper(); | |
if( OPT_SUZAN_SEISAN ) disp_SuzanSeisan(); | |
if ( OPT_CASTLE_AID ) disp_castleAidLink(); | |
if ( OPT_ILLUST_CHANGE ) disp_illustChange(); // 某ゲームのイラストに置き換えるアホツール | |
if ( OPT_UR_CHANGE ) disp_URChange(); // 見た目を全部URに置き換えるアホツール | |
if ( OPT_SR_CHANGE ) disp_SRChange(); // 見た目を全部SRに置き換えるアホツール | |
if ( OPT_PR_CHANGE ) disp_PRChange(); // 見た目を全部PRに置き換えるアホツール | |
if ( OPT_HR_CHANGE ) disp_HRChange(); // 見た目を全部HRに置き換えるアホツール | |
if ( OPT_AR_CHANGE ) disp_ARChange(); // 見た目を全部URに置き換えるアホツール | |
if ( OPT_BR_CHANGE ) disp_BRChange(); // 見た目を全部SRに置き換えるアホツール | |
if ( OPT_SENSEI_CHANGE ) disp_SENSEIChange(); // "水鏡先生"を"袁術先生"に変更に置き換えるアホツール | |
if( OPT_URL_CHANGE ) bro3_url_change(); //URLリンク変更スクリプト | |
if( OPT_TTDISTANCE) disp_ToolTipsDistance(); | |
if( OPT_MAPTOOL ) disp_maptool(); | |
if( OPT_MISTAKEPREVENTION ) disp_mistakeprevention(); | |
if( OPT_TRADINGRETRIEVAL ) disp_tradingretrieval(); | |
if( OPT_TRADINGAFTER ) disp_tradingafter(); | |
if( OPT_NPCFORT ) disp_npcfort(); | |
if( OPT_RIGHTCLICK ) disp_rightclick();//NPCを使用すると発生の為、位置を下にしたfaraway110528 | |
if( OPT_RES_TIME ) disp_ResourcesTime();//NPCを使用すると全体地図で資源時間の表示位置がずれて見えない為、位置を下にしたfaraway110620 | |
if ( OPT_NEXT_MEISEI ) disp_nextFameTimer();//faraway110620 | |
if( OPT_MAPLIST) disp_MapList();//faraway110425 | |
if( OPT_CHANGE_MOVE_SIZE ) disp_change_move_size(); | |
if( OPT_DISPLAY_ADM_INFO ) disp_display_adm_info(); | |
if( OPT_ALLIANCE ) disp_alliance(); | |
if( OPT_DEVELOPMENT ) disp_development(); | |
if( OPT_STATISTICS ) disp_statistics(); | |
if( OPT_ALLIANCELOG ) disp_alliancelog(); | |
if( OPT_MASS_SHOKAN_TOOL ) disp_mass_shokan_tool(); | |
if( OPT_LETTERTRANSMISSION ) disp_lettertransmission(); | |
if( OPT_LETTERBROADCAST ) disp_letterbroadcast(); | |
if( OPT_LETTERPRESERVATION ) disp_letterpreservation(); | |
if( OPT_BRO3AUTO ) disp_bro3auto(); | |
if( OPT_DECK_TOOL ) disp_deck_tool(); | |
if( OPT_ALLIANCELEVEL ) disp_alliancelevel(); | |
if( OPT_CALCN_1KI ) disp_calcn(); | |
if( OPT_BUSHODAS_LITE ) disp_bushodas_lite(); | |
if( OPT_QUEST_COLLECT ) disp_quest_collect(); | |
if( OPT_ITEM_COLLECT ) disp_item_collect(); | |
if( OPT_TERRITORY_REMOVE ) disp_territory_remove(); | |
if( OPT_PIKA_MAPHELP ) Pika_installMapXYHelper();//NPCを使用すると座標移動しない為、位置を下にしたfaraway110530 | |
if( OPT_BRO3_ETCS ) disp_bro3_etcs(); | |
if( OPT_TERRITORY_NAME_CHANGE ) disp_territory_name_change(); | |
if( OPT_SHOWTIME ) disp_showtime(); | |
if( OPT_QUEST_ALL ) disp_quest_all(); | |
if( OPT_ATK_CALC ) bro3_atk_calc(); //スキル込計算スクリプト | |
if( OPT_GOUSEI_SKILL ) disp_gousei_skill(); | |
if( OPT_FAVORITE_TRADE ) disp_favorite_trade(); | |
if( OPT_ROUTE_VIEW ) disp_route_view(); | |
if( OPT_51CENTER_OFF ) map51_guide_off(); | |
if( OPT_BRO3_DASU ) disp_bro3_dasu(); | |
if( OPT_BRO3_MISC ) disp_bro3_misc(); | |
if( OPT_HISTANALYSIS ) HistAnalysis(); //24."武将ダス履歴抽出分析 Ver1.09" | |
if( OPT_QUESTASSIST ) QuestAssist(); //25."クエスト補助" | |
if( OPT_TRADEINCOME ) TradeIncome(); //29."トレード収入計算" | |
if( OPT_RESERVATION ) Reservation(); //30."出兵予約" | |
if( OPT_AUTOROUND ) AutoRound(); //31."自動巡回" | |
if( OPT_REPORTLOG ) ReportLog(); //32."報告書・同盟ログCSV出力" | |
if( OPT_TRADESTATUS ) TradeStatus(); //34."トレードステータス表示" | |
if( OPT_URL_CHANGE_REV_RES ) bro3_url_change_reverse_res_view(); //掲示板逆順表示 | |
// 設定なしで無条件実行するメソッド群 | |
hiro_recvhp(); //HP回復予測表示 | |
label_colorise(); //ラベル着色 | |
csortSideBox(); | |
crenumberSideBox(); | |
Pika_blinkElements(); | |
////////////////////// | |
//イメージ初期化 | |
////////////////////// | |
var img_mura, img_map, img_naisei, img_ken, img_hanma, img_user, img_mail; | |
function initImages(){ | |
if( !OPT_LARGEICON ) { | |
img_mura = 'data:image/gif;base64,'+'R0lGODlhCgAKAKIAAAAAAP/M/7Jlf2YAAMaAoLpxjceAoQAAACH5BAQUAP8ALAAAAAAKAAoAAAMd'+'CBDcumE0CeOcI2vJMunYYICgZDalwEFcQSkooyQAOw=='; | |
img_map = 'data:image/gif;base64,'+'R0lGODlhCgAKAJEAAAAAAP//zAAAmSAgGiH5BAQUAP8ALAAAAAAKAAoAAAIaBIJplz0hRItISojx'+'tbXuDn3ZFDANMhhnCRQAOw=='; | |
img_naisei = 'data:image/gif;base64,'+'R0lGODlhCgAKALMAAAAAAMPS5HWOi5kAZktYU7yw0BogILmjyMz//8LP4r641MXb6QAAAAAAAAAA'+'AAAAACH5BAQUAP8ALAAAAAAKAAoAAAQnEBiEBkUGgGsvqUMockgxKBWnDMewdKA1UkNwJTBMU9vl'+ | |
'CxofDxABADs='; | |
img_ken = 'data:image/gif;base64,'+'R0lGODlhCgAKALMAAAAAALS0tE48PP///42NjTMzM+Li4nx8fBgAACYPD5mZmQkJCUZGRru7u+jo'+'6AAAACH5BAQUAP8ALAAAAAAKAAoAAAQkECBAq5C1qrEyIMPQUAMZllRwhtlinB4De+ExBFniFKQ3'+ | |
'+YAIADs='; | |
img_hanma = 'data:image/gif;base64,'+'R0lGODlhCgAKAOYAAP////7+/v39/fz8/Pv7+/r6+vn5+fj4+Pb29vX19fLy8vHx8fDw8O/v7+/u'+ | |
'7u3t7ezs7Obm5uLi4tra2tbW1tTU1NPT09LR0cjIyLq6ura0tLKysrCwsKmoqI+JiWxsbGdmZlVV'+'VUpKSkhFRUFBQUJBQT8/Py4uLiwsLCgoKCQkJCMjIyIhISoaGhsbGxkZGRkYGBYWFhoWFhkVFRMT'+ | |
'EyQODhQSEiILCw4ODgsLCwoKCgkJCQcGBgkGBgYGBhgAABYAAAQEBAMDAwEBAQAAAAEAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+ | |
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5'+ | |
'BAQUAP8ALAAAAAAKAAoAAAdcgEQ3HiAoDwILJjRAMh0XDAgBCRkqRTYpAwCaBxE+REGZmgAFQUND'+'oqI7OEM+C5oEsAsnLzkWChAYHxINFCQ8LBUcISIlGxMPNT46LisxMSMaDkQ/RERC1zMtPYEAOw=='; | |
img_mail = 'data:image/gif;base64,'+'R0lGODlhCgAKAMQAAP///5mZmSoaGhoWFhkVFRMTEyQODiILCwsLCwYGBgcGBgkGBhgAABYAAAMD'+ | |
'AwEBAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAQU'+'AP8ALAAAAAAKAAoAAAUvIHREZBkVzWCuQQC8QEsGkRvXz3PL7pO8tNorgoAZARHFERYxLIcRBmTq'+ | |
'iBAEixAAOw=='; | |
img_user = 'data:image/gif;base64,'+'R0lGODlhCgAKANUAADMAAPr3s+vhKdKwHr6DEal3EPPvPYJCA+XUI/HsLPbwUcejG9m+Mvn3M9m8'+ | |
'IP//tfj4NvXxMe/oK///M969IfLuMbR4EdzFL86wHv//O+XXKf//u//3tY5JBPj0Ue3iLvTwQu3l'+'L9fCIda3IKp4ENnDL+DHIv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+ | |
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAUUACcALAAAAAAKAAoAAAZTwNMp'+'oEgkFAHhEASpVCCgZMAgEFVCDomBCBkBNBqACFJsaAqfD0nTSAhMkYaz7RAoLJhMJJIZEBQbJQcL'+ | |
'EhIjHRcbJw8XFgQEFgwPShseCAiAQkEAOw=='; | |
}else{ | |
img_mura = 'data:image/gif;base64,'+'R0lGODlhDgAOAOYAAAAAAP///+Hz/gid8Ame8gmg8gmb7wmc7wqe8gqg8gqb7wqc7wug8gud7wyh'+ | |
'8gyd7w2i8w2g8g2d7w2d7g6e8A6d7w6e7w6c7g6d7hCg8g+d7w+e7w+d7hWg7hag7huP0RyQ0h2Q'+'0h+V1iWq8yaq8yiq9Cis9AorPSms9QoqPCqs9Syu9QsrPS6v9S6t9C+t9DGv9TGw9TOw9Taw9EW3'+ | |
'9ke39ki49mbE+IXQ+YbQ+aLb+qPb+6Pc+8Ln/MTo/ODz/uL0/guh8g+j8xGj8iCa1yit9Cmt9Cuu'+'9C6v9DOx9TSz9Ue59ki59km69sLo/MTp/ODz/f///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+ | |
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5'+ | |
'BAEAAFEALAAAAAAOAA4AAAeXgCkfHBZDK0IQLQ4LFx8pIB4WQUw4Kig5NggKHSAcGBVHPDcoKDc7'+'JQYTHBwXD0hAP7GxJQcYGBwNCU0/Ab0BPzUIEhwPCUtOvr49NQQVB0Y8yck6JBUVDEy80sARGxgD'+ | |
'RdrJUCMUhAVL4r4/NBkbFSbI0r09LxoWJurJAi4bIElPgAgcKNDHjBAsiCiJwZAhjIcyRJwIBAA7'; | |
img_map = 'data:image/gif;base64,'+'R0lGODlhDgAOAMQAAKmLAeHXp76oQP38+My7arSaIe/pz9jKi8SvUeffuK6SEdTFf7mhMci0XPTw'+ | |
'39zPl+Tbr8OuTcq4ZN7SnOniv72mPf///8++ccm3YdTFgP///wAAAAAAAAAAAAAAAAAAACH5BAEA'+'ABoALAAAAAAOAA4AAAVCoAaMZDmKZqqu5EIRVUUqWEkJl6XvkL2POkCmNPkBgpdS8gi0AA6lnfOX'+ | |
'qDWlOoegN0IMKCRBgRGxsgwPAyuFWmtCADs='; | |
img_naisei = 'data:image/gif;base64,'+'R0lGODlhDgAOAOYAAAAAAP///zEwMTAvMC8uLy4tLiwrLCsqKzw7PH9+fysrLImKiSkpKCgoJyYm'+ | |
'JTk5OE5OTdvb2dfX1Xp6eXd3dnV1dGZmZWJiYebm5eLi4d7e3dra2dfX1tTU09PT0tHR0M/Pzs7O'+ 'zc3NzMTEw8PDwsDAv7e3tqOjopKSkff29eLh4NnY19PS0dHQz83My8rJyMfGxcPCwcLBwMC/vr++'+ | |
'vSkoKCYlJSUkJCsqKjQzM0xLS9DOzsnHx3t6enV0dHRzc1taWuTj4+Hg4N/e3t3c3Nva2tbV1dXU'+ '1NTT09LR0dHQ0NDPz8/OzsvKysnIyMjHx8HAwMC/v6Cfn9zc3MnJycXFxb+/v729vZ+fn5aWloWF'+ | |
'hXNzc3FxcWpqalxcXFpaWlZWVlBQUE5OTkdHR0BAQDo6Ojg4ODc3NzExMTAwMC8vLy4uLi0tLSws'+ 'LCsrKygoKCcnJyYmJiUlJSQkJCMjIyIiIiAgIB8fHx4eHv///wAAAAAAAAAAAAAAAAAAAAAAACH5'+ | |
'BAEAAHkALAAAAAAOAA4AAAewgAKCA4SFhGkDggJuYAkUFT9cPhByBYpzCykYGRpFQhN4bIptZEVE'+ 'RkkfPA9yBopqa1hEK0cfKDUNboppcBcvJCUzX3UMB4psZh8RIU1LVmhxxoJtZR4bHS0gUDkOOKNn'+ | |
'IFMsTEpXaTYKrzdeIUQcJF93b66CdBYnWls9WFJidziJCAApEkTEmC5JXEDRYSfRABMqkLCAUeVJ'+ 'DCdZ7BAYgGCIBBY7QlAZIYNGlDBsAgEAOw=='; | |
img_ken = 'data:image/gif;base64,'+'R0lGODlhDgAOAMQAAP9MH/9lP/9AEP9ZMP9/X/+Zf/+yn/+lj//Zz//y7/9zUP+AYP+/r/+Lbv/P'+ | |
'w//q5f+fh//s5/9jPP+NcP/l3//Mv/////8zAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEA'+'ABgALAAAAAAOAA4AAAVCIHaNZDmKZqkYqVlZQEsORCBX1YLIhWVRstHB9wheDC8LApiC+HwES+og'+ | |
'uAAsCcNAcUMIfJVUVEoKpyjMUZWEMmJCADs='; | |
img_hanma = 'data:image/gif;base64,'+'R0lGODlhDgAOALMAAAAAAP///8zMzL+/v5mZmWZmZjIyMiYmJgwMDP///wAAAAAAAAAAAAAAAAAA'+ | |
'AAAAACH5BAEAAAkALAAAAAAOAA4AAARF0Eg5yLxTEFE1lkIYCEGBEUMoBqyQqSQ7WlQ4mLFnDKPO'+'tyYeifYLEUc3AylkkrR6I+Qr2krRJISWqnlBFQId7kdgEhsiADs='; | |
img_mail = 'data:image/gif;base64,'+'R0lGODlhDgAOANUAAP////n6+u3t7ezs7Ojo6Kurq6ampqWkpKCgoJ6enpaWloeHh4SEhHV1dWhn'+ | |
'Z2dmZioqKiodHR8eHh0cHBsaGiEUFBYTExMTExMSEh4NDRwKChsJCRoICAoKCgcHBwkGBhIDAwUF'+'BQUGBhMAAAYEBBIAAAMDAxEAAAICAgQCAgEBAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+ | |
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAQUAP8ALAAAAAAOAA4AAAZxwNVm'+'s1qxjkiW53I6FZ/Qoud0GACu2OvgUOQmrNhBYnU4Ah4URVZBcQBUKsBhglkIBAvM5PCOAwwTEwwM'+ | |
'EhIGVyohVwQIEEUQCARXLB1YAQUNDQUBWJRZn50ioKAsGaOfKxqnWSkpIyNQJiskFhEVH0EAOw=='; | |
img_user = 'data:image/gif;base64,'+'R0lGODlhDgAOAPcAAP7+v/3+vf39vf3+ofz6vvz9ofz5u/v8ofn2nv//O/3/Ofn3av76Nfn2af36'+ | |
'Nf75Nfj6Nvj5Nvj4N/n1U/fzaff4N/f4NPf4Lvfzavf1TPj0Tff3Lvb1NPX0NPb1LfXzNPXwTvXw'+'VPXwTfXyNPXyM/XuUPTyNPTyM/TxNPTwPPTwMvTwMfTvPfTvPPPxM/PwMPPwLvPvPfPvMvPwM/Pu'+ | |
'MvPuMPPuLfLtPfLuNfLuM/LuMvLuLvPtMfLtNfLtM/LtMfLtMPHtMvHsM/HsMfLsLfLsMPLsMfHp'+'LPDqKvHqLPDoLu7oLu/nLO3jK/HgNergK+rgKevfK+reKereKuvaM+bWJ+TRJOfOJOTOI+TJLN/K'+ | |
'IuHCIN3AK9/BH+G/IN6/K+C+H92+IN++INq9Ida1H9W0J9ayHNWxHM+xH8uqHc2kGs2jGs+iF8ug'+'GNGeGNCeGMmdF8WRE8SPFcSOFL+FFLt9ELp9EL59EKt0DKRyDKFwC6NpC4hdC4pVCoZQCpNFAJVE'+ | |
'AHtGCIVBB4A5AHk3BnozADQbAjQOADQOASkQAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+ | |
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+ | |
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+ | |
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAUUAIoALAAAAAAOAA4A'+'AAjGABUJJEABBxEiPSgQEMgQQYgUOiLqaBECQcMbMC5wGDLEgoUdNywaAAEDChgsLlyECbPEhggD'+ | |
'GFhsEJOIDwMGgQxd8RADAw4cEbYg8uPAQZ9DXSCgQHHwwxM3Z0iQMPNmygggQJJYiaKiq9euVbQc'+'EdKmjZIKJowYMSGhSRw4PhZ8GYQmQQcZeBWQAcRlgQANegilkVKjBpMxgvBkCKDogJM8he6sWTPn'+ | |
'zx4qBRgemJBFTp06dMqUGMBQIIAFOZAgCdIAAMOAADs='; | |
} | |
} | |
////////////////////// | |
//スタイル初期化 | |
////////////////////// | |
function initStyle() | |
{ | |
GM_addStyle("span.beyond_panel_ctlbox {width:35px; height:14px; display:block; position:absolute; right:-5px; top:-4px; }" + | |
"span.beyond_panel_ctlbox img {width:8px;height:9px; float:right; }" + | |
"div#beyond_basepanel img{vertical-align:middle; margin:1px 1px 1px 0px; padding-left:2px}" + | |
"#beyond_basepanel fieldset{border:groove 1px black; margin:1px; padding:1px;}" | |
); | |
} | |
////////////////////// | |
//リソース変数初期化 | |
////////////////////// | |
function initResources() | |
{ | |
var nowNodes = PRE_LOAD_NODES['nowResources']; | |
var names = ['wood','stone','iron','rice']; | |
for (var i=0; i <names.length;i++) { | |
var name = names[i]; | |
RES_NOW[name] = parseInt( nowNodes[name].innerHTML, 10 ); | |
RES_MAX[name] = parseInt( $(name+'_max').innerHTML, 10 ); | |
RES_GROW[name] = parseInt( $('output_'+name).innerHTML, 10 ); | |
} | |
var spns = $a('(id("sidebar") | id("status_left")//p[@class="status_bottom"])//span[@class="increase" or @class="resource"]'); | |
for(var i=0 ; i<spns.length ; i++) { | |
var str = spns[i].previousSibling.nodeValue.match(/(木|石|鉄|糧)\s+(-?\d+)/); | |
if( str ) { | |
var name = ""; | |
switch( str[1] ) { | |
case "木": | |
name = 'wood'; | |
break; | |
case "石": | |
name = 'stone'; | |
break; | |
case "鉄": | |
name = 'iron'; | |
break; | |
case "糧": | |
name = 'rice'; | |
break; | |
} | |
RES_GROW_W[name] = parseInt(str[2], 10); | |
RES_GROW_B[name] = parseInt(spns[i].innerHTML, 10); | |
} | |
} | |
//名声 | |
RES_NOW["fame"] = 0; | |
RES_MAX["fame"] = 0; | |
var fameText = $x('id("status_left")/img[contains(@src,"ico_fame.gif")]').nextSibling; | |
if( fameText ) { | |
var tmp = fameText.nodeValue.match(/\s*(\d+)\s*\/\s*(\d+)/); | |
RES_NOW["fame"] = parseInt(tmp[1],10); | |
RES_MAX["fame"] = parseInt(tmp[2],10); | |
} | |
} | |
////////////////////// | |
//ベースパネル初期化 | |
////////////////////// | |
function initPanel() | |
{ | |
var panelBox = $("sidebar"); | |
if (isNarrow) { | |
var panelBoxWrapper = $x('id("wrapper")'); | |
if (!panelBoxWrapper) return false; | |
panelBox = d.createElement("div"); | |
panelBox.id = "sidebar"; | |
panelBox.style.width = "auto"; | |
panelBox.style.cssFloat = "left"; | |
panelBox.style.marginTop = "10px"; | |
panelBoxWrapper.appendChild(panelBox); | |
} | |
if( !panelBox ) return false; | |
var basepanel = d.createElement("div"); | |
basepanel.id = "beyond_basepanel"; | |
var fixpanel = d.createElement("div"); | |
fixpanel.id = "beyond_fixpanel"; | |
var floatpanel = d.createElement("div"); | |
floatpanel.id = "beyond_floatpanel"; | |
var tmppanel = d.createElement("div"); | |
tmppanel.id = "beyond_tmp"; | |
tmppanel.style.display = "none"; | |
basepanel.appendChild(fixpanel); | |
basepanel.appendChild(floatpanel); | |
basepanel.appendChild(tmppanel); | |
panelBox.appendChild(basepanel); | |
return true; | |
} | |
////////////////////// | |
//オプション処理 | |
////////////////////// | |
function disp_Options() | |
{ | |
if( !location.pathname.match(/^(\/user\/|\/bbs\/personal_)/) ) return; | |
if( location.pathname.match(/ranking\.php/) ) return; | |
var ul = $("statMenu"); | |
if( !ul ) return; | |
var cl = d.createElement("a"); | |
cl.href = "javascript:void(0);"; | |
cl.innerHTML = "Beyond"; //faraway120119 | |
$e(cl, "click", function() {openOptions();}); | |
var li = d.createElement("li"); | |
li.appendChild(cl); | |
li.className = "last"; | |
ul.appendChild(li); | |
var lst = $x("//li[@class=\"last\"]"); | |
if( lst ) { | |
lst.className = ""; | |
} | |
} | |
function loadOptions() | |
{ | |
OPT_REPORTLOG = cloadData( "OPT_REPORTLOG" , 1 ); //"報告書・同盟ログCSV出力" | |
OPT_AUTOROUND = cloadData( "OPT_AUTOROUND" , 1 ); //"自動巡回" | |
OPT_RESERVATION = cloadData( "OPT_RESERVATION" , 1 ); //"出兵予約" | |
OPT_TRADESTATUS = cloadData( "OPT_TRADESTATUS" , 0 ); //"トレードステータス表示" | |
OPT_TRADEINCOME = cloadData( "OPT_TRADEINCOME" , 1 ); //"トレード収入計算" | |
OPT_HISTANALYSIS = cloadData( "OPT_HISTANALYSIS" , 1 ); //"武将ダス履歴抽出分析 Ver1.09" | |
OPT_QUESTASSIST = cloadData( "OPT_QUESTASSIST" , 1 ); //"クエスト補助" | |
OPT_URL_CHANGE = cloadData( "OPT_URL_CHANGE" , 1 ); //URLリンク変更スクリプト | |
OPT_URL_CHANGE_REV_RES = cloadData( "OPT_URL_CHANGE_REV_RES" , 1 ); //掲示板逆順表示 | |
OPT_ATK_CALC = cloadData( "OPT_ATK_CALC" , 1 ); //スキル込計算スクリプト | |
OPT_MAPTOOL = cloadData( "OPT_MAPTOOL", 1 ); | |
OPT_TIMER = cloadData( "OPT_TIMER", 0 ); | |
OPT_ALLIANCE = cloadData( "OPT_ALLIANCE", 1 ); | |
OPT_DEVELOPMENT = cloadData( "OPT_DEVELOPMENT", 1 ); | |
OPT_STATISTICS = cloadData( "OPT_STATISTICS", 1 ); | |
OPT_ALLIANCELOG = cloadData( "OPT_ALLIANCELOG", 1 ); | |
OPT_NPCFORT = cloadData( "OPT_NPCFORT", 1 ); | |
OPT_RIGHTCLICK = cloadData( "OPT_RIGHTCLICK", 1 ); | |
OPT_ALLIANCELEVEL = cloadData( "OPT_ALLIANCELEVEL", 0 ); | |
OPT_MISTAKEPREVENTION = cloadData( "OPT_MISTAKEPREVENTION", 1 ); | |
OPT_LETTERTRANSMISSION = cloadData( "OPT_LETTERTRANSMISSION", 1); | |
OPT_LETTERBROADCAST = cloadData( "OPT_LETTERBROADCAST", 1 ); | |
OPT_LETTERPRESERVATION = cloadData( "OPT_LETTERPRESERVATION", 1 ); | |
OPT_TRADINGRETRIEVAL = cloadData( "OPT_TRADINGRETRIEVAL", 1 ); | |
OPT_TRADINGAFTER = cloadData( "OPT_TRADINGAFTER", 1 ); | |
OPT_NAVIGATIONADDITION = cloadData( "OPT_NAVIGATIONADDITION", 1 ); | |
OPT_BRO3AUTO = cloadData( "OPT_BRO3AUTO", 1 ); | |
OPT_CHANGE_MOVE_SIZE = cloadData( "OPT_CHANGE_MOVE_SIZE", 1 ); | |
OPT_DISPLAY_ADM_INFO = cloadData( "OPT_DISPLAY_ADM_INFO", 1 ); | |
OPT_MASS_SHOKAN_TOOL = cloadData( "OPT_MASS_SHOKAN_TOOL", 1 ); | |
OPT_DECK_TOOL = cloadData( "OPT_DECK_TOOL", 1 ); | |
OPT_CALCN_1KI = cloadData( "OPT_CALCN_1KI", 1 ); | |
OPT_BUSHODAS_LITE = cloadData( "OPT_BUSHODAS_LITE", 1 ); | |
OPT_QUEST_COLLECT = cloadData( "OPT_QUEST_COLLECT", 1 ); | |
OPT_ITEM_COLLECT = cloadData( "OPT_ITEM_COLLECT", 1 ); | |
OPT_TERRITORY_REMOVE = cloadData( "OPT_TERRITORY_REMOVE", 1 ); | |
OPT_B3NEWS = cloadData( "OPT_B3NEWS", 1 ); | |
OPT_VILLAGE = cloadData( "OPT_VILLAGE", 1 ); | |
OPT_BASELINK = cloadData( "OPT_BASELINK", 1 ); | |
OPT_MAPLINK = cloadData( "OPT_MAPLINK", 1 ); | |
OPT_XYLINK = cloadData( "OPT_XYLINK", 1 ); | |
OPT_XYLINK_NK = cloadData( "OPT_XYLINK_NK", 1 ); | |
OPT_LARGEICON = cloadData( "OPT_LARGEICON", 0 ); | |
OPT_TTBL = cloadData( "OPT_TTBL", 1 ); | |
OPT_MEMO = cloadData( "OPT_MEMO", 1 ); | |
OPT_MEMO_FONT_SIZE = cloadData( "OPT_MEMO_FONT_SIZE", "9" ); | |
OPT_MEMO_WIDTH = cloadData( "OPT_MEMO_WIDTH", "21" ); | |
OPT_MEMO_HEIGHT = cloadData( "OPT_MEMO_HEIGHT", "5" ); | |
OPT_MEMO_COUNT = cloadData( "OPT_MEMO_COUNT", "1" ); | |
OPT_MAPLINK_FONT_SIZE = cloadData( "OPT_MAPLINK_FONT_SIZE", "9" ); | |
OPT_DETAILS = cloadData( "OPT_DETAILS", 1 ); | |
OPT_DETAILS_UP = cloadData( "OPT_DETAILS_UP", 1 ); | |
OPT_DECK_SET = cloadData( "OPT_DECK_SET", 1 ); | |
OPT_CTIME_B = cloadData( "OPT_CTIME_B", 1 ); | |
OPT_CTIME_U = cloadData( "OPT_CTIME_U", 1 ); | |
OPT_ALLY = cloadData( "OPT_ALLY", 1 ); | |
OPT_ALLY_IS = cloadData( "OPT_ALLY_IS", 1 ); | |
OPT_ALLY_XY = cloadData( "OPT_ALLY_XY", 1 ); | |
OPT_ALLY_CSV = cloadData( "OPT_ALLY_CSV", 1 ); | |
OPT_RES_T = cloadData( "OPT_RES_T", 1 ); | |
OPT_RES_TIME = cloadData( "OPT_RES_TIME", 1 ); | |
OPT_REMOVELIST = cloadData( "OPT_REMOVELIST", 1 ); | |
OPT_MAPLIST = cloadData( "OPT_MAPLIST", 0 ); | |
OPT_TTDISTANCE = cloadData( "OPT_DISTANCE", 1 ); | |
OPT_TTDISTANCE_ITEMS = cloadData("OPT_DISTANCE_ITEMS", "[\"剣兵(6)\", \"槍兵(7)\", \"弓兵(5)\", \"騎兵(12)\", \"衝車(3)\", \"矛槍(10)\", \"弩兵(9)\", \"近衛(15)\", \"投石(6)\", \"斥騎(20)\"]", true, true); | |
OPT_USER_STAR = cloadData( "OPT_USER_STAR", 1 ); | |
OPT_USER_LEVEL = cloadData( "OPT_USER_LEVEL", 1 ); | |
OPT_MAPCENTER = cloadData( "OPT_MAPCENTER", 1 ); | |
OPT_TBREST = cloadData( "OPT_TBREST", 1 ); | |
OPT_TSENDTIME = cloadData( "OPT_TSENDTIME", 1 ); | |
OPT_SMALLBTN = cloadData( "OPT_SMALLBTN", 0 ); | |
OPT_ATTACKMAP = cloadData( "OPT_ATTACKMAP", 1 ); | |
OPT_PIKA_YOROZU = cloadData( "OPT_PIKA_YOROZU", 1 ); | |
OPT_PIKA_HPREST = cloadData( "OPT_PIKA_HPREST", 1 ); | |
OPT_PIKA_MAPHELP = cloadData( "OPT_PIKA_MAPHELP", 1 ); | |
OPT_PIKA_TRDHELP = cloadData( "OPT_PIKA_TRDHELP", 1 ); | |
OPT_PIKA_BLINKBLD = cloadData( "OPT_PIKA_BLINKBLD", 1 ); | |
OPT_SUZAN_SEISAN = cloadData( "OPT_SUZAN_SEISAN", 1 ); | |
OPT_CASTLE_AID = cloadData( "OPT_CASTLE_AID", 1 ); | |
OPT_NEXT_MEISEI = cloadData( "OPT_NEXT_MEISEI", 1 ); | |
if (isNarrow) { | |
OPT_VILLAGE_LIST_BOX = cloadData( "OPT_VILLAGE_LIST_BOX", 0 ); | |
} | |
OPT_BRO3_ETCS = cloadData( "OPT_BRO3_ETCS", 1 ); | |
OPT_BRO3_DASU = cloadData( "OPT_BRO3_DASU", 1); | |
OPT_BRO3_MISC = cloadData( "OPT_BRO3_MISC", 1); | |
OPT_TERRITORY_NAME_CHANGE = cloadData( "OPT_TERRITORY_NAME_CHANGE", 1 ); | |
OPT_SHOWTIME = cloadData( "OPT_SHOWTIME", 1 ); | |
OPT_QUEST_ALL = cloadData( "OPT_QUEST_ALL", 1 ); | |
OPT_FAVORITE_TRADE = cloadData( "OPT_FAVORITE_TRADE", 1 ); | |
OPT_ROUTE_VIEW = cloadData( "OPT_ROUTE_VIEW", 1 ); | |
OPT_51CENTER_OFF = cloadData( "OPT_51CENTER_OFF", 0 ); | |
OPT_GOUSEI_SKILL = cloadData( "OPT_GOUSEI_SKILL", 0 ); | |
OPT_STYLE = cloadData( "OPT_STYLE",1); | |
DISP_RANK = cloadData( "DISP_RANK",1); | |
OPT_ILLUST_CHANGE = cloadData( "OPT_ILLUST_CHANGE", 1 ); // 某ゲームのイラストに置き換えるアホツール //ac.42.a | |
OPT_UR_CHANGE = cloadData( "OPT_UR_CHANGE", 0 ); // 見た目を全部URに置き換えるアホツール | |
OPT_SR_CHANGE = cloadData( "OPT_SR_CHANGE", 1 ); // 見た目を全部SRに置き換えるアホツール //ac.42.a | |
OPT_PR_CHANGE = cloadData( "OPT_PR_CHANGE", 0 ); // 見た目を全部PRに置き換えるアホツール | |
OPT_HR_CHANGE = cloadData( "OPT_HR_CHANGE", 0 ); // 見た目を全部HRに置き換えるアホツール | |
OPT_AR_CHANGE = cloadData( "OPT_AR_CHANGE", 0 ); // 見た目を全部URに置き換えるアホツール | |
OPT_BR_CHANGE = cloadData( "OPT_BR_CHANGE", 0 ); // 見た目を全部SRに置き換えるアホツール | |
OPT_SENSEI_CHANGE = cloadData( "OPT_SENSEI_CHANGE", 1 ); // "水鏡先生"を"袁術先生"に変更に置き換えるアホツール | |
} | |
function saveOptions() | |
{ | |
OPT_REPORTLOG = cgetCheckBoxValue("OPT_REPORTLOG"); //"報告書・同盟ログCSV出力" | |
OPT_AUTOROUND = cgetCheckBoxValue("OPT_AUTOROUND"); //"自動巡回" | |
OPT_RESERVATION = cgetCheckBoxValue("OPT_RESERVATION"); //"出兵予約" | |
OPT_TRADESTATUS = cgetCheckBoxValue("OPT_TRADESTATUS"); //"トレードステータス表示" | |
OPT_TRADEINCOME = cgetCheckBoxValue("OPT_TRADEINCOME"); //"トレード収入計算" | |
OPT_HISTANALYSIS = cgetCheckBoxValue("OPT_HISTANALYSIS"); //"武将ダス履歴抽出分析 Ver1.09" | |
OPT_QUESTASSIST = cgetCheckBoxValue("OPT_QUESTASSIST"); //"クエスト補助" | |
OPT_URL_CHANGE = cgetCheckBoxValue( "OPT_URL_CHANGE"); //URLリンク変更スクリプト | |
OPT_URL_CHANGE_REV_RES = cgetCheckBoxValue( "OPT_URL_CHANGE_REV_RES"); //URLリンク変更スクリプト | |
OPT_ATK_CALC = cgetCheckBoxValue( "OPT_ATK_CALC" ); //スキル込計算スクリプト | |
OPT_MAPTOOL = cgetCheckBoxValue("OPT_MAPTOOL"); | |
OPT_TIMER = cgetCheckBoxValue("OPT_TIMER"); | |
OPT_ALLIANCE = cgetCheckBoxValue("OPT_ALLIANCE"); | |
OPT_DEVELOPMENT = cgetCheckBoxValue("OPT_DEVELOPMENT"); | |
OPT_STATISTICS = cgetCheckBoxValue("OPT_STATISTICS"); | |
OPT_ALLIANCELOG = cgetCheckBoxValue("OPT_ALLIANCELOG"); | |
OPT_NPCFORT = cgetCheckBoxValue("OPT_NPCFORT"); | |
OPT_RIGHTCLICK = cgetCheckBoxValue("OPT_RIGHTCLICK"); | |
OPT_ALLIANCELEVEL = cgetCheckBoxValue("OPT_ALLIANCELEVEL"); | |
OPT_MISTAKEPREVENTION = cgetCheckBoxValue("OPT_MISTAKEPREVENTION"); | |
OPT_LETTERTRANSMISSION = cgetCheckBoxValue("OPT_LETTERTRANSMISSION"); | |
OPT_LETTERBROADCAST = cgetCheckBoxValue("OPT_LETTERBROADCAST"); | |
OPT_LETTERPRESERVATION = cgetCheckBoxValue("OPT_LETTERPRESERVATION"); | |
OPT_TRADINGRETRIEVAL = cgetCheckBoxValue("OPT_TRADINGRETRIEVAL"); | |
OPT_TRADINGAFTER = cgetCheckBoxValue("OPT_TRADINGAFTER"); | |
OPT_NAVIGATIONADDITION = cgetCheckBoxValue("OPT_NAVIGATIONADDITION"); | |
OPT_BRO3AUTO = cgetCheckBoxValue("OPT_BRO3AUTO"); | |
OPT_CHANGE_MOVE_SIZE = cgetCheckBoxValue("OPT_CHANGE_MOVE_SIZE"); | |
OPT_DISPLAY_ADM_INFO = cgetCheckBoxValue("OPT_DISPLAY_ADM_INFO"); | |
OPT_MASS_SHOKAN_TOOL = cgetCheckBoxValue("OPT_MASS_SHOKAN_TOOL"); | |
OPT_DECK_TOOL = cgetCheckBoxValue("OPT_DECK_TOOL"); | |
OPT_CALCN_1KI = cgetCheckBoxValue("OPT_CALCN_1KI"); | |
OPT_BUSHODAS_LITE = cgetCheckBoxValue("OPT_BUSHODAS_LITE"); | |
OPT_QUEST_COLLECT = cgetCheckBoxValue("OPT_QUEST_COLLECT"); | |
OPT_ITEM_COLLECT = cgetCheckBoxValue("OPT_ITEM_COLLECT"); | |
OPT_TERRITORY_REMOVE = cgetCheckBoxValue("OPT_TERRITORY_REMOVE"); | |
OPT_B3NEWS = cgetCheckBoxValue("OPT_B3NEWS"); | |
OPT_VILLAGE = cgetCheckBoxValue("OPT_VILLAGE"); | |
OPT_BASELINK = cgetCheckBoxValue("OPT_BASELINK"); | |
OPT_MAPLINK = cgetCheckBoxValue("OPT_MAPLINK"); | |
OPT_XYLINK = cgetCheckBoxValue("OPT_XYLINK"); | |
OPT_XYLINK_NK = cgetCheckBoxValue("OPT_XYLINK_NK"); | |
OPT_LARGEICON = cgetCheckBoxValue("OPT_LARGEICON"); | |
OPT_TTBL = cgetCheckBoxValue("OPT_TTBL"); | |
OPT_MEMO = cgetCheckBoxValue("OPT_MEMO"); | |
OPT_MEMO_FONT_SIZE = cgetTextBoxValue("OPT_MEMO_FONT_SIZE"); | |
OPT_MEMO_WIDTH = cgetTextBoxValue("OPT_MEMO_WIDTH"); | |
OPT_MEMO_HEIGHT = cgetTextBoxValue("OPT_MEMO_HEIGHT"); | |
OPT_MEMO_COUNT = cgetTextBoxValue("OPT_MEMO_COUNT"); | |
OPT_MAPLINK_FONT_SIZE = cgetTextBoxValue("OPT_MAPLINK_FONT_SIZE"); | |
OPT_DETAILS = cgetCheckBoxValue("OPT_DETAILS"); | |
OPT_DETAILS_UP = cgetCheckBoxValue("OPT_DETAILS_UP"); | |
OPT_DECK_SET = cgetCheckBoxValue("OPT_DECK_SET"); | |
OPT_CTIME_B = cgetCheckBoxValue("OPT_CTIME_B"); | |
OPT_CTIME_U = cgetCheckBoxValue("OPT_CTIME_U"); | |
OPT_ALLY = cgetCheckBoxValue("OPT_ALLY"); | |
OPT_ALLY_IS = cgetCheckBoxValue("OPT_ALLY_IS"); | |
OPT_ALLY_XY = cgetCheckBoxValue("OPT_ALLY_XY"); | |
OPT_ALLY_CSV = cgetCheckBoxValue("OPT_ALLY_CSV"); | |
OPT_RES_T = cgetCheckBoxValue("OPT_RES_T"); | |
OPT_RES_TIME = cgetCheckBoxValue("OPT_RES_TIME"); | |
OPT_REMOVELIST = cgetCheckBoxValue("OPT_REMOVELIST"); | |
OPT_MAPLIST = cgetCheckBoxValue("OPT_MAPLIST"); | |
OPT_TTDISTANCE = cgetCheckBoxValue("OPT_DISTANCE"); | |
OPT_TTDISTANCE_ITEMS = getDistanceBox(10); | |
OPT_USER_STAR = cgetCheckBoxValue("OPT_USER_STAR"); | |
OPT_USER_LEVEL = cgetCheckBoxValue("OPT_USER_LEVEL"); | |
OPT_MAPCENTER = cgetCheckBoxValue("OPT_MAPCENTER"); | |
OPT_TBREST = cgetCheckBoxValue("OPT_TBREST"); | |
OPT_TSENDTIME = cgetCheckBoxValue("OPT_TSENDTIME"); | |
OPT_SMALLBTN = cgetCheckBoxValue("OPT_SMALLBTN"); | |
OPT_ATTACKMAP = cgetCheckBoxValue("OPT_ATTACKMAP"); | |
OPT_PIKA_YOROZU = cgetCheckBoxValue("OPT_PIKA_YOROZU"); | |
OPT_PIKA_HPREST = cgetCheckBoxValue("OPT_PIKA_HPREST"); | |
OPT_PIKA_MAPHELP = cgetCheckBoxValue("OPT_PIKA_MAPHELP"); | |
OPT_PIKA_TRDHELP = cgetCheckBoxValue("OPT_PIKA_TRDHELP"); | |
OPT_PIKA_BLINKBLD = cgetCheckBoxValue("OPT_PIKA_BLINKBLD"); | |
OPT_SUZAN_SEISAN = cgetCheckBoxValue("OPT_SUZAN_SEISAN"); | |
OPT_CASTLE_AID = cgetCheckBoxValue("OPT_CASTLE_AID"); | |
OPT_NEXT_MEISEI = cgetCheckBoxValue("OPT_NEXT_MEISEI"); | |
if (isNarrow) { | |
OPT_VILLAGE_LIST_BOX = cgetCheckBoxValue( "OPT_VILLAGE_LIST_BOX"); | |
} | |
OPT_BRO3_ETCS = cgetCheckBoxValue("OPT_BRO3_ETCS"); | |
OPT_BRO3_DASU = cgetCheckBoxValue("OPT_BRO3_DASU"); | |
OPT_BRO3_MISC = cgetCheckBoxValue("OPT_BRO3_MISC"); | |
OPT_TERRITORY_NAME_CHANGE = cgetCheckBoxValue("OPT_TERRITORY_NAME_CHANGE"); | |
OPT_SHOWTIME = cgetCheckBoxValue("OPT_SHOWTIME"); | |
OPT_QUEST_ALL = cgetCheckBoxValue("OPT_QUEST_ALL"); | |
OPT_FAVORITE_TRADE = cgetCheckBoxValue("OPT_FAVORITE_TRADE"); | |
OPT_ROUTE_VIEW = cgetCheckBoxValue("OPT_ROUTE_VIEW"); | |
OPT_51CENTER_OFF = cgetCheckBoxValue("OPT_51CENTER_OFF"); | |
OPT_GOUSEI_SKILL = cgetCheckBoxValue("OPT_GOUSEI_SKILL"); | |
OPT_STYLE = cgetCheckBoxValue("OPT_STYLE"); | |
DISP_RANK = cgetCheckBoxValue("DISP_RANK"); | |
OPT_ILLUST_CHANGE = cgetCheckBoxValue("OPT_ILLUST_CHANGE"); // 某ゲームのイラストに置き換えるアホツール | |
OPT_UR_CHANGE = cgetCheckBoxValue("OPT_UR_CHANGE"); // 見た目を全部URに置き換えるアホツール | |
OPT_SR_CHANGE = cgetCheckBoxValue("OPT_SR_CHANGE"); // 見た目を全部SRに置き換えるアホツール | |
OPT_PR_CHANGE = cgetCheckBoxValue("OPT_PR_CHANGE"); // 見た目を全部PRに置き換えるアホツール | |
OPT_HR_CHANGE = cgetCheckBoxValue("OPT_HR_CHANGE"); // 見た目を全部HRに置き換えるアホツール | |
OPT_AR_CHANGE = cgetCheckBoxValue("OPT_AR_CHANGE"); // 見た目を全部URに置き換えるアホツール | |
OPT_BR_CHANGE = cgetCheckBoxValue("OPT_BR_CHANGE"); // 見た目を全部SRに置き換えるアホツール | |
OPT_SENSEI_CHANGE = cgetCheckBoxValue("OPT_SENSEI_CHANGE"); // 見た目を全部SRに置き換えるアホツール | |
csaveData("OPT_REPORTLOG", OPT_REPORTLOG ); //"報告書・同盟ログCSV出力" | |
csaveData("OPT_AUTOROUND", OPT_AUTOROUND ); //"自動巡回" | |
csaveData("OPT_RESERVATION", OPT_RESERVATION ); //"出兵予約" | |
csaveData("OPT_TRADESTATUS", OPT_TRADESTATUS ); //"トレードステータス表示" | |
csaveData("OPT_TRADEINCOME", OPT_TRADEINCOME ); //"トレード収入計算" | |
csaveData("OPT_HISTANALYSIS", OPT_HISTANALYSIS ); //"武将ダス履歴抽出分析 Ver1.09" | |
csaveData("OPT_QUESTASSIST", OPT_QUESTASSIST ); //"クエスト補助" | |
csaveData("OPT_URL_CHANGE", OPT_URL_CHANGE); //URLリンク変更スクリプト | |
csaveData("OPT_URL_CHANGE_REV_RES", OPT_URL_CHANGE_REV_RES); //URLリンク変更スクリプト | |
csaveData("OPT_ATK_CALC", OPT_ATK_CALC ); //スキル込計算スクリプト | |
csaveData( "OPT_MAPTOOL", OPT_MAPTOOL ); | |
csaveData( "OPT_TIMER", OPT_TIMER ); | |
csaveData( "OPT_ALLIANCE", OPT_ALLIANCE ); | |
csaveData( "OPT_DEVELOPMENT", OPT_DEVELOPMENT ); | |
csaveData( "OPT_STATISTICS", OPT_STATISTICS ); | |
csaveData( "OPT_ALLIANCELOG", OPT_ALLIANCELOG ); | |
csaveData( "OPT_NPCFORT", OPT_NPCFORT ); | |
csaveData( "OPT_RIGHTCLICK", OPT_RIGHTCLICK ); | |
csaveData( "OPT_ALLIANCELEVEL", OPT_ALLIANCELEVEL ); | |
csaveData( "OPT_MISTAKEPREVENTION", OPT_MISTAKEPREVENTION ); | |
csaveData( "OPT_LETTERTRANSMISSION", OPT_LETTERTRANSMISSION ); | |
csaveData( "OPT_LETTERBROADCAST", OPT_LETTERBROADCAST ); | |
csaveData( "OPT_LETTERPRESERVATION", OPT_LETTERPRESERVATION ); | |
csaveData( "OPT_TRADINGRETRIEVAL", OPT_TRADINGRETRIEVAL ); | |
csaveData( "OPT_TRADINGAFTER", OPT_TRADINGAFTER ); | |
csaveData( "OPT_NAVIGATIONADDITION", OPT_NAVIGATIONADDITION ); | |
csaveData( "OPT_BRO3AUTO", OPT_BRO3AUTO ); | |
csaveData( "OPT_CHANGE_MOVE_SIZE", OPT_CHANGE_MOVE_SIZE ); | |
csaveData( "OPT_DISPLAY_ADM_INFO", OPT_DISPLAY_ADM_INFO ); | |
csaveData( "OPT_MASS_SHOKAN_TOOL", OPT_MASS_SHOKAN_TOOL ); | |
csaveData( "OPT_DECK_TOOL", OPT_DECK_TOOL ); | |
csaveData( "OPT_CALCN_1KI", OPT_CALCN_1KI ); | |
csaveData( "OPT_BUSHODAS_LITE", OPT_BUSHODAS_LITE ); | |
csaveData( "OPT_QUEST_COLLECT", OPT_QUEST_COLLECT ); | |
csaveData( "OPT_ITEM_COLLECT", OPT_ITEM_COLLECT ); | |
csaveData( "OPT_TERRITORY_REMOVE", OPT_TERRITORY_REMOVE ); | |
csaveData( "OPT_B3NEWS", OPT_B3NEWS ); | |
csaveData( "OPT_VILLAGE", OPT_VILLAGE ); | |
csaveData( "OPT_BASELINK", OPT_BASELINK ); | |
csaveData( "OPT_MAPLINK", OPT_MAPLINK ); | |
csaveData( "OPT_XYLINK", OPT_XYLINK ); | |
csaveData( "OPT_XYLINK_NK", OPT_XYLINK_NK ); | |
csaveData( "OPT_LARGEICON", OPT_LARGEICON ); | |
csaveData( "OPT_TTBL", OPT_TTBL ); | |
csaveData( "OPT_MEMO", OPT_MEMO ); | |
csaveData( "OPT_MEMO_FONT_SIZE", OPT_MEMO_FONT_SIZE ); | |
csaveData( "OPT_MEMO_WIDTH", OPT_MEMO_WIDTH ); | |
csaveData( "OPT_MEMO_HEIGHT", OPT_MEMO_HEIGHT ); | |
csaveData( "OPT_MEMO_COUNT", OPT_MEMO_COUNT ); | |
csaveData( "OPT_MAPLINK_FONT_SIZE", OPT_MAPLINK_FONT_SIZE ); | |
csaveData( "OPT_DETAILS", OPT_DETAILS ); | |
csaveData( "OPT_DETAILS_UP", OPT_DETAILS_UP ); | |
csaveData( "OPT_DECK_SET", OPT_DECK_SET ); | |
csaveData( "OPT_CTIME_B", OPT_CTIME_B ); | |
csaveData( "OPT_CTIME_U", OPT_CTIME_U ); | |
csaveData( "OPT_ALLY", OPT_ALLY ); | |
csaveData( "OPT_ALLY_IS", OPT_ALLY_IS ); | |
csaveData( "OPT_ALLY_XY", OPT_ALLY_XY ); | |
csaveData( "OPT_ALLY_CSV", OPT_ALLY_CSV ); | |
csaveData( "OPT_RES_T", OPT_RES_T ); | |
csaveData( "OPT_RES_TIME", OPT_RES_TIME ); | |
csaveData( "OPT_REMOVELIST", OPT_REMOVELIST ); | |
csaveData( "OPT_MAPLIST", OPT_MAPLIST ); | |
csaveData( "OPT_DISTANCE", OPT_TTDISTANCE ); | |
csaveData( "OPT_DISTANCE_ITEMS", OPT_TTDISTANCE_ITEMS, true, true ); | |
csaveData( "OPT_USER_STAR", OPT_USER_STAR ); | |
csaveData( "OPT_USER_LEVEL", OPT_USER_LEVEL ); | |
csaveData( "OPT_MAPCENTER", OPT_MAPCENTER ); | |
csaveData( "OPT_TBREST", OPT_TBREST ); | |
csaveData( "OPT_TSENDTIME", OPT_TSENDTIME ); | |
csaveData( "OPT_SMALLBTN", OPT_SMALLBTN ); | |
csaveData( "OPT_ATTACKMAP", OPT_ATTACKMAP ); | |
csaveData( "OPT_PIKA_YOROZU", OPT_PIKA_YOROZU ); | |
csaveData( "OPT_PIKA_HPREST", OPT_PIKA_HPREST ); | |
csaveData( "OPT_PIKA_MAPHELP", OPT_PIKA_MAPHELP ); | |
csaveData( "OPT_PIKA_TRDHELP", OPT_PIKA_TRDHELP ); | |
csaveData( "OPT_PIKA_BLINKBLD", OPT_PIKA_BLINKBLD ); | |
csaveData( "OPT_SUZAN_SEISAN", OPT_SUZAN_SEISAN ); | |
csaveData( "OPT_CASTLE_AID", OPT_CASTLE_AID ); | |
csaveData( "OPT_NEXT_MEISEI", OPT_NEXT_MEISEI ); | |
if (isNarrow) { | |
csaveData( "OPT_VILLAGE_LIST_BOX", OPT_VILLAGE_LIST_BOX ); | |
} | |
csaveData( "OPT_BRO3_ETCS", OPT_BRO3_ETCS ); | |
csaveData( "OPT_BRO3_DASU", OPT_BRO3_DASU ); | |
csaveData( "OPT_BRO3_MISC", OPT_BRO3_MISC ); | |
csaveData( "OPT_TERRITORY_NAME_CHANGE", OPT_TERRITORY_NAME_CHANGE ); | |
csaveData( "OPT_SHOWTIME", OPT_SHOWTIME ); | |
csaveData( "OPT_QUEST_ALL", OPT_QUEST_ALL ); | |
csaveData( "OPT_FAVORITE_TRADE", OPT_FAVORITE_TRADE ); | |
csaveData( "OPT_ROUTE_VIEW", OPT_ROUTE_VIEW ); | |
csaveData( "OPT_51CENTER_OFF", OPT_51CENTER_OFF ); | |
csaveData( "OPT_GOUSEI_SKILL", OPT_GOUSEI_SKILL ); | |
csaveData( "OPT_STYLE", OPT_STYLE ); | |
csaveData( "DISP_RANK", DISP_RANK ); | |
csaveData( "OPT_ILLUST_CHANGE", OPT_ILLUST_CHANGE ); // 某ゲームのイラストに置き換えるアホツール | |
csaveData( "OPT_UR_CHANGE", OPT_UR_CHANGE ); // 見た目を全部URに置き換えるアホツール | |
csaveData( "OPT_SR_CHANGE", OPT_SR_CHANGE ); // 見た目を全部SRに置き換えるアホツール | |
csaveData( "OPT_PR_CHANGE", OPT_PR_CHANGE ); // 見た目を全部PRに置き換えるアホツール | |
csaveData( "OPT_HR_CHANGE", OPT_HR_CHANGE ); // 見た目を全部HRに置き換えるアホツール | |
csaveData( "OPT_AR_CHANGE", OPT_AR_CHANGE ); // 見た目を全部URに置き換えるアホツール | |
csaveData( "OPT_BR_CHANGE", OPT_BR_CHANGE ); // 見た目を全部SRに置き換えるアホツール | |
csaveData( "OPT_SENSEI_CHANGE", OPT_SENSEI_CHANGE ); // 見た目を全部SRに置き換えるアホツール | |
alert("設定を保存しました"); | |
deleteOptionsHtml(); | |
} | |
function getMyInfo() | |
{ | |
if( (location.pathname == "/user/" ) && !URL_PARAM.user_id ) { | |
var uid=0, aid=0; | |
var uidtd = $x("//table[@class=\"commonTables\"]//tr[2]//td[3]"); | |
if( uidtd ) { | |
uid = uidtd.innerHTML.match(/\/bbs\/personal_topic_view\.php\?user_id\=(\d+)/); | |
} | |
var aidtd = $x("//table[@class=\"commonTables\"]//tr[4]//td[5]"); | |
if( aidtd ) { | |
aid = d.body.innerHTML.match(/\/alliance\/info\.php\?id\=(\d+)/); | |
} | |
if( uid && aid ) { | |
csaveData( "user_id", uid[1], true ); | |
csaveData( "ally_id", aid[1], true ); | |
} | |
} | |
USER_ID = cloadData( "user_id", "", true ); | |
ALLY_ID = cloadData( "ally_id", "", true ); | |
} | |
function resetMapLink() { | |
if( !confirm("登録済みリンクを全て削除します。\nよろしいですか?") ) return; | |
var maplinks = cloadData( "links", 0, true ); | |
for(i=0 ; i<maplinks ; i++) { | |
cdelData( "link" + i, true ); | |
} | |
cdelData( "links", true); | |
resetMapLinks(); | |
} | |
function resetUserXY() { | |
if( !confirm("同盟員一覧の座標情報を全て削除します。\nよろしいですか?") ) return; | |
cresetUserXY(); | |
} | |
function resetUserStar() { | |
if( !confirm("君主の★情報と自領地のLevel情報を全て削除します。\nよろしいですか?") ) return; | |
cresetUserStar(); | |
cdelData("MyLevelList",true); | |
} | |
function openOptions() { | |
deleteOptionsHtml(); | |
addOptionsHtml(); | |
} | |
function deleteOptionsHtml() { | |
var elem = $("beyond_OptionsWindow"); | |
if (!elem ) return; | |
$("beyond_floatpanel").removeChild(elem); | |
} | |
function addOptionsHtml() { | |
var oc = d.createElement("div"); | |
oc.id = "beyond_OptionsWindow"; | |
oc.style.position = "absolute"; | |
oc.style.backgroundColor = "#999"; | |
oc.style.border = "outset 2px #ccc"; | |
oc.style.fontSize = "12px"; | |
oc.style.padding = "15px"; | |
oc.style.zIndex = 8000; | |
var x = cloadData("config_window_x", 10); | |
var y = cloadData("config_window_y", 80); | |
if(x < 0) x = 0; | |
if(y < 0) y = 0; | |
x=x-25;// メニュー表示位置を左に寄せて、移動時間表示の表示1~10の欄が折り返さないようにしたfaraway110513 | |
oc.style.left = x + "px"; | |
oc.style.top = y + "px"; | |
$e(oc, "mousedown", function(event){ | |
if( event.target != $("beyond_OptionsWindow")) {return false;} | |
g_MD="beyond_OptionsWindow"; | |
g_MX=event.pageX-parseInt(this.style.left,10);g_MY=event.pageY-parseInt(this.style.top,10); | |
event.preventDefault();}); | |
$e(d, "mousemove", function(event){ | |
if(g_MD != "beyond_OptionsWindow") return true; | |
var oc = $("beyond_OptionsWindow"); | |
if( !oc ) return true; | |
var x = event.pageX - g_MX;var y = event.pageY - g_MY; | |
oc.style.left = x + "px";oc.style.top = y + "px"; | |
csaveData("config_window_x", x);csaveData("config_window_y", y); | |
}); | |
$e(d, "mouseup", function(event){g_MD="";}); | |
var tx = d.createElement("div"); | |
var ah = d.createElement("a"); | |
ah.href = "http://www1.ocn.ne.jp/~hatt/3gkb/"; | |
tx.title = ah.href; | |
ah.target = "_blank"; | |
ah.appendChild(d.createTextNode(VERSION_NAME)); | |
tx.appendChild(ah); | |
tx.style.padding = "4px"; | |
tx.style.fontSize = "10px"; | |
tx.style.color = "steelblue"; | |
oc.appendChild(tx); | |
$("beyond_floatpanel").appendChild(oc); | |
var tbl = d.createElement("table"); tbl.style.border ="0px"; | |
var tr = d.createElement("tr"); | |
var td1 = d.createElement("td");td1.style.padding = "15px";td1.style.verticalAlign = "top"; | |
var td2 = d.createElement("td");td2.style.padding = "15px";td2.style.verticalAlign = "top"; | |
var td3 = d.createElement("td");td3.style.padding = "15px";td3.style.verticalAlign = "top"; | |
var td4 = d.createElement("td");td4.style.padding = "15px";td4.style.verticalAlign = "top"; | |
tr.appendChild(td1);tr.appendChild(td2);tr.appendChild(td3);tr.appendChild(td4); | |
tbl.appendChild(tr); | |
oc.appendChild(tbl); | |
//設定項目 | |
ccreateCheckBox(td1, "OPT_SMALLBTN", OPT_SMALLBTN, "小さいボタン","右上の4つのボタンを小さくします。状況も1行にします。",0); | |
ccreateCheckBox(td1, "OPT_LARGEICON", OPT_LARGEICON, "大きめアイコン","拠点リンク・領地リンクなどのアイコンを14x14サイズにします(アイコン提供:ゆう@てらおとめん様)",0); | |
ccreateCheckBox(td1, "OPT_PIKA_BLINKBLD", OPT_PIKA_BLINKBLD, "都市画面改善","建設中を点滅させます",0); | |
ccreateCheckBox(td1, "OPT_VILLAGE", OPT_VILLAGE, "建築表示機能","村の表示で資源不足で建築不可能な場合、LV表示を黄色にします",0); | |
ccreateCheckBox(td1, "OPT_BASELINK", OPT_BASELINK, "拠点リンク機能","城や村のリンクにマップ・内政などのリンクを追加します",0); | |
ccreateCheckBox(td1, "OPT_XYLINK", OPT_XYLINK, "座標リンク機能","掲示板などの(xx,yy)にリンク機能を追加します",0); | |
ccreateCheckBox(td1, "OPT_XYLINK_NK", OPT_XYLINK_NK, "両端のカッコ無視","xx,yyだけでもリンクします。1,000などの数字もリンクになってしまいます",20); | |
ccreateCheckBox(td1, "OPT_TTBL", OPT_TTBL, "兵力整形機能","掲示板に貼り付けた兵力一覧を整形します",0); | |
ccreateCheckBox(td1, "OPT_DETAILS", OPT_DETAILS, "ログ合計表示機能","同盟ログの兵力+援軍の合計を表示します",0); | |
ccreateCheckBox(td1, "OPT_DETAILS_UP", OPT_DETAILS_UP, "合計を上に出す","合計表示を、下じゃなくて上に出します",20); | |
ccreateCheckBox(td1, "OPT_DECK_SET", OPT_DECK_SET, "デッキセット先自動選択","初期表示のセット先拠点を現在選択中の拠点にします",0); | |
ccreateCheckBox(td1, "OPT_CTIME_B", OPT_CTIME_B, "完了時刻の表示(建物)","建築作成時に完了予定日時を表示します。",0); | |
ccreateCheckBox(td1, "OPT_CTIME_U", OPT_CTIME_U, "完了時刻の表示(ユニット)","ユニット作成時に完了予定日時を表示します。",0); | |
ccreateCheckBox(td1, "OPT_RES_T", OPT_RES_T, "資源生産合計表示","資源生産量の合計を表示します",0); | |
ccreateCheckBox(td1, "OPT_RES_TIME", OPT_RES_TIME, "資源時間の表示","資源の残り時間を表示します",0); | |
ccreateCheckBox(td1, "OPT_REMOVELIST", OPT_REMOVELIST, "破棄中の領地表示","破棄中の領地一覧を表示し、マップにマークを付けます",0); | |
ccreateCheckBox(td1, "OPT_SUZAN_SEISAN", OPT_SUZAN_SEISAN, "拠点生産量表示","拠点の生産量を表示します",0); | |
ccreateCheckBox(td1, "OPT_ALLY", OPT_ALLY, "同盟表示改善","同盟員一覧の表示改善",0); | |
ccreateCheckBox(td1, "OPT_ALLY_IS", OPT_ALLY_IS, "同盟表示のソート","同盟員一覧の並べ替えを追加します",15); | |
ccreateCheckBox(td1, "OPT_ALLY_XY", OPT_ALLY_XY, "同盟員座標表示","同盟員一覧に本居城の座標を追加します",15); | |
ccreateCheckBox(td1, "OPT_ALLY_CSV", OPT_ALLY_CSV, "同盟員情報CSV","同盟員一覧の詳細をCSV表示します。",15); | |
ccreateCheckBox(td1, "OPT_ALLIANCE", OPT_ALLIANCE, "同盟貢献チェッカー","寄付の確認等動きがわかります",0); //110929 | |
ccreateCheckBox(td1, "OPT_DEVELOPMENT", OPT_DEVELOPMENT, "発展チェッカー","放置者発見用",0); //110929 | |
ccreateCheckBox(td1, "OPT_RIGHTCLICK", OPT_RIGHTCLICK, "右クリック拡張","全体地図&都市画面で右クリック拡張されます",0);//faraway110929 | |
ccreateCheckBox(td1, "OPT_B3NEWS", OPT_B3NEWS, "ブラ三ニュース配置変更","ブラ三ニュースを配置変更します",1);//ひろひろひろ120804 | |
ccreateCheckBox(td1, "OPT_TERRITORY_REMOVE", OPT_TERRITORY_REMOVE, "領地一覧からの領地破棄",0); | |
ccreateCheckBox(td1, "OPT_TERRITORY_NAME_CHANGE", OPT_TERRITORY_NAME_CHANGE, "領地画面から領地名変更",0); | |
ccreateCheckBox(td1, "OPT_SHOWTIME", OPT_SHOWTIME, "援軍・敵襲・出撃・帰還時間を表示",0); | |
ccreateCheckBox(td2, "OPT_DISTANCE", OPT_TTDISTANCE, "移動時間表示","全ての[兵を送る]リンクのToolTipsを移動時間の目安表示に変更します",0); | |
//faraway 110504 strat 移動時間表示の文字化け対応 | |
var work_0 = OPT_TTDISTANCE_ITEMS; | |
try { | |
work_0 = work_0.replace("[", "", "g"); | |
work_0 = work_0.replace("]", "", "g"); | |
work_0 = work_0.replace(" ", "", "g"); | |
work_0 = work_0.replace("\\", "", "g"); | |
work_0 = work_0.replace("\"", "", "g"); | |
work_0 = work_0.split(","); | |
}catch(e) { | |
} | |
createDistanceBox(td2, work_0, 10); | |
//faraway 110504 end | |
ccreateCheckBox(td2, "OPT_MEMO", OPT_MEMO, "メモ機能","メモ機能",0); | |
ccreateTextBox(td2, "OPT_MEMO_FONT_SIZE", OPT_MEMO_FONT_SIZE, "フォントサイズ","メモのフォントサイズを指定します。デフォルト=10",5,20); | |
ccreateTextBox(td2, "OPT_MEMO_WIDTH", OPT_MEMO_WIDTH, "メモ幅","メモの幅を指定します。デフォルト=20",5,20); | |
ccreateTextBox(td2, "OPT_MEMO_HEIGHT", OPT_MEMO_HEIGHT, "メモ高","メモの高さを指定します。デフォルト=5",5,20); | |
ccreateTextBox(td2, "OPT_MEMO_COUNT", OPT_MEMO_COUNT, "メモ数(1~5)","メモ欄の数を指定します。デフォルト=1",5,20); | |
ccreateCheckBox(td2, "OPT_MAPLINK", OPT_MAPLINK, "領地リンク機能","領地や敵地・NPC砦等へのリンク",0); | |
ccreateTextBox(td2, "OPT_MAPLINK_FONT_SIZE", OPT_MAPLINK_FONT_SIZE, "フォントサイズ","領地リンクのフォントサイズを指定します。デフォルト=10", 5, 20); | |
ccreateCheckBox(td2, "OPT_STYLE", OPT_STYLE, "スタイル変更","スタイルを旧スタイルに近い形に変更します",0); | |
ccreateCheckBox(td2, "DISP_RANK", DISP_RANK, "ランキングの非表示","チェックするとランキングが消える",0); | |
ccreateCheckBox(td2, "OPT_ALLIANCELOG", OPT_ALLIANCELOG, "同盟ログ","新しい同盟ログに修正が入ります",0);//110929 | |
ccreateCheckBox(td2, "OPT_REPORTLOG", OPT_REPORTLOG, "報告書・同盟ログCSV出力","一時保管等",0); //110929 | |
ccreateCheckBox(td2, "OPT_BRO3_ETCS", OPT_BRO3_ETCS, "いろいろスクリプト(etcsより抜粋)",0); | |
ccreateCheckBox(td2, "OPT_FAVORITE_TRADE", OPT_FAVORITE_TRADE, "トレードサポート(favoritetrade)",0); | |
ccreateCheckBox(td2, "OPT_BRO3_DASU", OPT_BRO3_DASU, "カード表示拡張と自動ブショーダス",0); | |
ccreateCheckBox(td2, "OPT_BRO3_MISC", OPT_BRO3_MISC, "bro3_misc",0); | |
ccreateCheckBox(td3, "OPT_USER_STAR", OPT_USER_STAR, "君主★情報表示","プロフィール画面に領地の★表示を追加します",0); | |
ccreateCheckBox(td3, "OPT_USER_LEVEL", OPT_USER_LEVEL, "領地レベル表示","プロフィール画面に領地のレベル表示を追加します",0); | |
ccreateCheckBox(td3, "OPT_TBREST", OPT_TBREST, "討伐ゲージ回復時間予測機能","武将の討伐ゲージが300 or 500になる時間を表示します",0); | |
ccreateCheckBox(td3, "OPT_TSENDTIME", OPT_TSENDTIME, "出発時刻計算","出兵画面で、到着希望時間から出発時刻を計算します",0); | |
ccreateCheckBox(td3, "OPT_ATTACKMAP", OPT_ATTACKMAP, "出兵表示機能","マップ上に、現在出兵中の目印を付けます",0); | |
ccreateCheckBox(td3, "OPT_PIKA_YOROZU", OPT_PIKA_YOROZU, "ヨロズダス引き忘れ防止機能","ヨロズダスがリセットされたら通知してくれます",0); | |
ccreateCheckBox(td3, "OPT_PIKA_HPREST", OPT_PIKA_HPREST, "武将の回復時間予測機能","武将のHPが100になる時間を表示します",0); | |
ccreateCheckBox(td3, "OPT_CASTLE_AID", OPT_CASTLE_AID, "拠点援軍ボタン機能","城や村のリンクの横に援軍ボタンを表示します",0); | |
ccreateCheckBox(td3, "OPT_NEXT_MEISEI", OPT_NEXT_MEISEI, "名声獲得タイマー機能","次の名声値獲得までの時間を表示します",0); | |
if (isNarrow) { | |
ccreateCheckBox(td3, "OPT_VILLAGE_LIST_BOX", OPT_VILLAGE_LIST_BOX, "都市リスト表示機能","都市のタブ以外でも都市のリストを表示できるようにします",0); | |
} | |
ccreateCheckBox(td3, "OPT_MAPLIST", OPT_MAPLIST, "マップの地形一覧","マップ上の拠点・領地リストを表示します",0); | |
ccreateCheckBox(td3, "OPT_MAPCENTER", OPT_MAPCENTER, "マップ中央表示","マップ中央に目印を表示し、中央座標を表示します",0); | |
ccreateCheckBox(td3, "OPT_PIKA_MAPHELP", OPT_PIKA_MAPHELP, "マップ画面検索改善","X座標のところに999,999等を入れてもジャンプしてくれます",0); | |
ccreateCheckBox(td3, "OPT_NPCFORT", OPT_NPCFORT, "NPC砦、領土情報検索ver2.49","高機能地図です",0); | |
ccreateCheckBox(td3, "OPT_CHANGE_MOVE_SIZE", OPT_CHANGE_MOVE_SIZE, "マップ移動距離カスタムver1.10","全体地図の移動距離が変わります",0); | |
ccreateCheckBox(td3, "OPT_DISPLAY_ADM_INFO", OPT_DISPLAY_ADM_INFO, "内政武将表示ver1.09","内政武将が都市画面に出ます",0); | |
ccreateCheckBox(td3, "OPT_MAPTOOL", OPT_MAPTOOL, "map_tool_Ver.2.39.d4ex2","map_tool地図",0); | |
ccreateCheckBox(td3, "OPT_AUTOROUND", OPT_AUTOROUND, "自動巡回","Auto_Map_Move Ver0.5β。やりすぎると重いです",0); //faraway110929 | |
ccreateCheckBox(td3, "OPT_RESERVATION", OPT_RESERVATION, "出兵予約","単発予約です。ログアウト注意~",0); //faraway110929 | |
ccreateCheckBox(td3, "OPT_STATISTICS", OPT_STATISTICS, "統計グラフ化","統計グラフ化",0); //faraway110929 | |
ccreateCheckBox(td3, "OPT_MISTAKEPREVENTION", OPT_MISTAKEPREVENTION, "ミス防止補助","斥候騎兵誤生産対策&単騎出兵対策",0); | |
ccreateCheckBox(td3, "OPT_QUESTASSIST", OPT_QUESTASSIST, "クエスト補助","クエストの報酬説明",0); | |
ccreateCheckBox(td3, "OPT_URL_CHANGE_REV_RES", OPT_URL_CHANGE_REV_RES, "掲示板逆順表示", "掲示板の最新書き込みを一番上に表示します",0); | |
ccreateCheckBox(td3, "OPT_URL_CHANGE", OPT_URL_CHANGE, "URLリンク変更スクリプト", "URLリンク変更スクリプト bro3_url_change",1); | |
ccreateCheckBox(td3, "OPT_ATK_CALC", OPT_ATK_CALC, "スキル込計算スクリプト","スキル込計算スクリプト bro3_atk_calc",1); | |
ccreateCheckBox(td3, "OPT_ROUTE_VIEW", OPT_ROUTE_VIEW, "ルート表示",0); | |
ccreateCheckBox(td3, "OPT_51CENTER_OFF", OPT_51CENTER_OFF, "51x51の中央ガイド消去",0); | |
ccreateCheckBox(td4, "OPT_MASS_SHOKAN_TOOL", OPT_MASS_SHOKAN_TOOL, "書簡を複数に送付(最大○○人)","受取側は個別書簡になります",0); | |
ccreateCheckBox(td4, "OPT_LETTERTRANSMISSION", OPT_LETTERTRANSMISSION, "書簡送信アシスタント","書簡送信先が登録できます",0); | |
ccreateCheckBox(td4, "OPT_LETTERBROADCAST", OPT_LETTERBROADCAST, "書簡同報リンク","書簡同報リンク",0); | |
ccreateCheckBox(td4, "OPT_LETTERPRESERVATION", OPT_LETTERPRESERVATION, "書簡保存&検索","保存&検索できるようになります",0); | |
ccreateCheckBox(td4, "OPT_PIKA_TRDHELP", OPT_PIKA_TRDHELP, "トレード画面入力改善","4桁数字を入力するとカードNoとして検索します",0);//faraway110929 | |
ccreateCheckBox(td4, "OPT_TRADINGRETRIEVAL", OPT_TRADINGRETRIEVAL, "トレード検索条件記憶","トレード検索条件記憶できます",0); | |
ccreateCheckBox(td4, "OPT_TRADINGAFTER", OPT_TRADINGAFTER, "運営書簡開封/削除","運営書簡を選んだり、まとめて開封します",0); | |
ccreateCheckBox(td4, "OPT_TRADESTATUS", OPT_TRADESTATUS, "トレードステータス表示","ステ振りが表示されます。",0); | |
ccreateCheckBox(td4, "OPT_TRADEINCOME", OPT_TRADEINCOME, "トレード収入計算","収入の手取りを計算します",0); | |
ccreateCheckBox(td4, "OPT_BRO3AUTO", OPT_BRO3AUTO, "Auto_Bilder","建築&内政発動&寄付&糧変換をします",0); | |
ccreateCheckBox(td4, "OPT_DECK_TOOL", OPT_DECK_TOOL, "武将カード分類ツール","デッキ画面で分類できます",0); | |
ccreateCheckBox(td4, "OPT_HISTANALYSIS", OPT_HISTANALYSIS, "武将ダス履歴抽出分析 Ver1.09","自分の引き自慢にお使いくださいw",0); | |
ccreateCheckBox(td4, "OPT_NAVIGATIONADDITION", OPT_NAVIGATIONADDITION, "ナビゲーションにロールオーバーリンク追加","ナビゲーションにロールオーバーリンク追",0); | |
ccreateCheckBox(td4, "OPT_CALCN_1KI", OPT_CALCN_1KI, "討伐・空き地 民兵出現 推定機","討伐・空き地 民兵出現 推定機",0); | |
ccreateCheckBox(td4, "OPT_BUSHODAS_LITE", OPT_BUSHODAS_LITE, "ブショーダスライトを引く画面一番上表示",0); | |
ccreateCheckBox(td4, "OPT_QUEST_COLLECT", OPT_QUEST_COLLECT, "クエスト報酬自動取得",0); | |
ccreateCheckBox(td4, "OPT_ITEM_COLLECT", OPT_ITEM_COLLECT, "アイテム自動取得",0); | |
ccreateCheckBox(td4, "OPT_QUEST_ALL", OPT_QUEST_ALL, "クエストの項目を全部表示",0); | |
ccreateCheckBox(td4, "OPT_GOUSEI_SKILL", OPT_GOUSEI_SKILL, "トレード右クリックで合成スキル表示",0); | |
var fs = d.createElement("fieldset"); | |
var lg = d.createElement("legend"); | |
lg.appendChild(d.createTextNode(" 【 お 遊 び 】 ネタなツールたち ") ); | |
fs.appendChild(lg); | |
td4.appendChild(fs); | |
ccreateCheckBox(fs, "OPT_ILLUST_CHANGE", OPT_ILLUST_CHANGE, "イラスト置き換え機能","某ゲームのイラストに置き換えます。",0); | |
ccreateCheckBox(fs, "OPT_UR_CHANGE", OPT_UR_CHANGE, "見た目を全部URに置き換え機能","CだろうがUCだろうがRだろうがSRだろうが、すべてのカードの見た目をURと同じ仕様にします。",0); | |
ccreateCheckBox(fs, "OPT_SR_CHANGE", OPT_SR_CHANGE, "見た目を全部SRに置き換え機能","CだろうがUCだろうがRだろうが、すべてのカードの見た目をSRと同じ仕様にします。",0); | |
ccreateCheckBox(fs, "OPT_SENSEI_CHANGE", OPT_SENSEI_CHANGE, "やっぱり袁術先生","水鏡先生を袁術先生に変更に置き換えます",0); | |
ccreateCheckBox(fs, "OPT_PR_CHANGE", OPT_PR_CHANGE, "見た目を全部PR(MC☆あくしず)","CだろうがUCだろうがRだろうがSRだろうが、すべてのカードの見た目をMC☆あくしずのPRと同じ仕様にします。",0); | |
ccreateCheckBox(fs, "OPT_HR_CHANGE", OPT_HR_CHANGE, "見た目を全部HR(MC☆あくしず)","CだろうがUCだろうがRだろうがSRだろうが、すべてのカードの見た目をMC☆あくしずのHRと同じ仕様にします。",0); | |
ccreateCheckBox(fs, "OPT_AR_CHANGE", OPT_AR_CHANGE, "見た目を全部UR(MC☆あくしず)","CだろうがUCだろうがRだろうがSRだろうが、すべてのカードの見た目をMC☆あくしずのURと同じ仕様にします。",0); | |
ccreateCheckBox(fs, "OPT_BR_CHANGE", OPT_BR_CHANGE, "見た目を全部SR(MC☆あくしず)","CだろうがUCだろうがRだろうがSRだろうが、すべてのカードの見た目をMC☆あくしずのSRと同じ仕様にします。",0); | |
ccreateButton(oc, "保存", "設定内容を保存します", function() {saveOptions();}); | |
ccreateButton(oc, "閉じる", "設定内容を保存せず閉じます", function() {deleteOptionsHtml();}); | |
ccreateButton(oc, "領地リンクのクリア", "領地・君主リンクの内容を初期化します", function() {resetMapLink();}); | |
ccreateButton(oc, "同盟員座標のクリア", "同盟員座標を全て初期化します", function() {resetUserXY();}); | |
ccreateButton(oc, "★/Level情報のクリア", "君主の★情報と自領地のLevel情報を全て初期化します", function() {resetUserStar();}); | |
ccreateButton(oc, "領地リンクの直接編集", "領地リンクをテキストで自由に変更できます", function(event) {mapLinkList(event);}); | |
} | |
function createDistanceBox(container, items, num) | |
{ | |
var sels = ["その他", "無し", "剣兵(6)", | |
"槍兵(7)", "弓兵(5)", "騎兵(12)", "斥候(9)", "衝車(3)", | |
"矛槍(10)", "弩兵(9)", "近衛(15)", "斥騎(20)", "投石(6)"]; | |
var sp0 = " ";//表示1~表示10の位置合わせ by faraway | |
for(var i=0 ; i<num ; i++ ) { | |
var src = ""; | |
if( sels.indexOf(items[i]) != -1 ) src = items[i]; | |
if(i>8) sp0="";//表示1~表示10の位置合わせ by faraway | |
var cb = ccreateComboBox(container, "OPT_DISTANCE_CB" + i , sels, src, "表示" + (i+1) + sp0, (i+1) + "行目の表示", 20 );//表示1~表示10の位置合わせ by faraway | |
var tb = d.createElement("input"); | |
tb.type = "text"; | |
tb.id = "OPT_DISTANCE_TX" + i; | |
tb.title = "例) 「超早い馬(50)」など、半角カッコの中に速度を入れて下さい"; | |
if( src == "" ) { | |
tb.value = items[i]; | |
}else{ | |
tb.disabled ="disabled"; | |
} | |
tb.size = 12; | |
cb.parentNode.appendChild(d.createTextNode(" ")); | |
cb.parentNode.appendChild(tb); | |
(function(no) { | |
$e(cb, "change", function() { | |
var cb = $("OPT_DISTANCE_CB" + no); | |
var tb = $("OPT_DISTANCE_TX" + no); | |
if( !cb || !tb ) return; | |
if( cb.value == sels[0] ) { | |
tb.disabled =""; | |
}else{ | |
tb.disabled ="disabled"; | |
} | |
}); | |
})(i); | |
} | |
} | |
function bro3_url_change(){ | |
/*======================================================= | |
初期処理 | |
=========================================================*/ | |
//現在表示URL | |
NowUrl = URLGet(); | |
//現在表示フォルダ | |
NowFolder = FolderGet(); | |
/*======================================================= | |
URL文字変更処理 | |
=========================================================*/ | |
wk1 = document.getElementById("commentList"); | |
src1 = wk1.innerHTML; | |
wk1.innerHTML = UrlToLink(src1); | |
if (NowUrl == "detail.php" && NowFolder == "message") { | |
//書簡ページの場合 | |
wk2 = document.getElementById("gray02Wrapper"); | |
src2 = wk2.innerHTML; | |
r1 = document.getElementsByClassName("notice"); | |
r2 = src2.indexOf("出品したカードが落札されました"); | |
if (r1.length > 0 && r1[0].innerHTML == "ブラウザ三国志運営チーム" && r2 > -1) { | |
} else { | |
wk2.innerHTML = UrlToLink(src2); | |
} | |
} else if (NowUrl == "res_view.php" || NowUrl == "personal_res_view.php") { | |
//掲示板関連 | |
if (CommentCHK() != "comment") { | |
wk2 = document.getElementsByClassName("commonTables"); | |
src2 = wk2[0].innerHTML; | |
wk2[0].innerHTML = UrlToLink(src2); | |
} | |
} else if (NowUrl == "chat_view.php") { | |
wk2 = document.getElementsByClassName("hitokoto"); | |
wk3 = document.getElementsByClassName("hitokoto"); | |
for (cnt = 0; cnt <= wk2.length; cnt++) { | |
src2 = wk2[cnt].innerHTML; | |
wk3[cnt].innerHTML = UrlToLink(src2); | |
} | |
} else if (NowUrl == "info.php") { | |
//同盟TOPページの場合 | |
wk2 = document.getElementsByClassName("commonTables"); | |
src2 = wk2[0].innerHTML; | |
wk2[0].innerHTML = UrlToLink(src2); | |
} else if (NowUrl == "") { | |
//プロフィール画面 | |
wk2 = document.getElementsByClassName("show_comment_cell"); | |
if( wk2.length != 0 ){ | |
// 2014/01/26 getElementByClassNameが失敗した時にスクリプトがとまるバグ対応 | |
src2 = wk2[1].innerHTML; | |
wk2[1].innerHTML = UrlToLink(src2); | |
src2 = wk2[2].innerHTML; | |
wk2[2].innerHTML = UrlToLink(src2); | |
} | |
} | |
/*------------+---------------------------------------------------------+ | |
* URL文字→リンク文字に変更 | | |
*------------+---------------------------------------------------------*/ | |
function UrlToLink(html) { | |
var html1 = html; | |
var re1 = /(http(s)?:\/\/[-_.!~*\'()a-zA-Z0-9;\/\?:\@\&=+\$,%#]+)/gi; | |
var re2 = /(http(s?):\/\/gyazo.com\/[-_.!~*\'()a-zA-Z0-9;\/?:\@&\=+\$,%#]+)/gi; | |
var re4 = /(http(s)?:\/\/[-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+(jpg|jpeg|gif|png|bmp))/gi; | |
var re5 = /(https:\/\/docs.google.com\/spreadsheet\/[-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/gi; | |
var text = html.match(re1); | |
if (text) { | |
text = unique(text); | |
for (i = 0; i < text.length; i++) { | |
var re3 = new RegExp(text[i].replace(/\&/gi, '\\&').replace(/\?/gi, '\\?'), "gi"); | |
if (text[i].match(re4)) { | |
html1 = html1.replace(text[i], "<a href=\""+text[i]+"\" target=\"_blank\"><img src=\""+text[i]+"\" width=\"200px\" /></a>"); | |
} else if (text[i].match(re2)) { | |
//Gyazoの場合 | |
html1 = html1.replace(re3, "<a href=\""+text[i]+"\" target=\"_blank\"><img src=\""+text[i]+".png\" width=\"200px\" /></a>"); | |
} else if (text[i].match(re5)) { | |
html1 = html1.replace(text[i], "<a href=\""+text[i]+"\" target=\"_blank\">"+text[i]+"</a>"); | |
} else if (text[i].match(re1)) { | |
//普通URLの場合(s無し) | |
html1 = html1.replace(re3, "<a href=\""+text[i]+"\" target=\"_blank\">"+text[i]+"</a>"); | |
} | |
} | |
} | |
return html1; | |
} | |
/*------------+---------------------------------------------------------+ | |
* 現在フォルダ名取得用 | | |
*------------+---------------------------------------------------------*/ | |
function FolderGet() { | |
wkurl = location.href; | |
var arr = wkurl.split("/"); | |
wkurl = arr[arr.length-2]; | |
return wkurl; | |
} | |
/*------------+---------------------------------------------------------+ | |
* 現在ファイル名取得用 | | |
*------------+---------------------------------------------------------*/ | |
function URLGet() { | |
wkurl = location.href; | |
var arr = wkurl.split("/"); | |
wkurl = arr[arr.length-1]; | |
arr = wkurl.split("#"); | |
wkurl = arr[0]; | |
arr = wkurl.split("?"); | |
wkurl = arr[0]; | |
return wkurl; | |
} | |
/*------------+---------------------------------------------------------+ | |
* コメント入力時かどうかのチェック | | |
*------------+---------------------------------------------------------*/ | |
function CommentCHK() { | |
wkurl = location.href; | |
var arr = wkurl.split("/"); | |
wkurl = arr[arr.length-1]; | |
arr = wkurl.split("#"); | |
wkurl = arr[1]; | |
return wkurl; | |
} | |
/*------------+---------------------------------------------------------+ | |
* 配列の重複削除処理 | | |
*------------+---------------------------------------------------------*/ | |
function unique(array) { | |
var storage = {}; | |
var uniqueArray = []; | |
var i,value; | |
for ( i=0; i<array.length; i++) { | |
value = array[i]; | |
if (!(value in storage)) { | |
storage[value] = true; | |
uniqueArray.push(value); | |
} | |
} | |
return uniqueArray; | |
} | |
} | |
function bro3_url_change_reverse_res_view(){ | |
NowUrl = URLGet(); | |
//----------------------------------------------- | |
// 逆順表示(一言掲示板は対象外) | |
//----------------------------------------------- | |
if (NowUrl == "res_view.php" || NowUrl == "personal_res_view.php") { | |
// それぞれの投稿部分 | |
var ttl2 = document.getElementsByClassName('ttl2'); | |
var ttl4 = document.getElementsByClassName('ttl4'); | |
var s = ttl2[0].parentNode; // 先頭の場所 | |
var max_idx = ttl2.length - 1; // ttl2とttl4の配列長さは同じ | |
// 最後の場所へinsertする | |
for(var i = 0; i < ttl2.length - 1; i++) { // 最後の一回はやらない | |
s.parentNode.insertBefore(ttl2[max_idx].parentNode,s); | |
s.parentNode.insertBefore(ttl4[max_idx].parentNode,s); | |
} | |
var tbl = document.getElementsByClassName("commonTables"); | |
var tr = tbl[0].getElementsByTagName("tr"); | |
var html1 = tbl[0].getElementsByTagName("tr")[tr.length - 3].innerHTML; | |
var html2 = tbl[0].getElementsByTagName("tr")[tr.length - 2].innerHTML; | |
var html3 = tbl[0].getElementsByTagName("tr")[tr.length - 1].innerHTML; | |
tbl[0].deleteRow(tbl[0].rows.length - 3); | |
tbl[0].deleteRow(tbl[0].rows.length - 2); | |
tbl[0].deleteRow(tbl[0].rows.length - 1); | |
var row1 = tbl[0].insertRow(4); | |
var row2 = tbl[0].insertRow(5); | |
var row3 = tbl[0].insertRow(6); | |
row1.innerHTML = html1; | |
row2.innerHTML = html2; | |
row3.innerHTML = html3; | |
} | |
function URLGet() { | |
wkurl = location.href; | |
var arr = wkurl.split("/"); | |
wkurl = arr[arr.length-1]; | |
arr = wkurl.split("#"); | |
wkurl = arr[0]; | |
arr = wkurl.split("?"); | |
wkurl = arr[0]; | |
return wkurl; | |
} | |
} | |
function getDistanceBox(num) | |
{ | |
var ret = new Array(); | |
for(var i=0 ; i<num ; i++ ) { | |
var cb = $("OPT_DISTANCE_CB" + i); | |
var tb = $("OPT_DISTANCE_TX" + i); | |
if( !cb || !tb ) return null; | |
if( cb.value == "その他" ) { | |
ret.push( tb.value ); | |
}else if( cb.value == "無し" ) { | |
ret.push(""); | |
}else { | |
ret.push( cb.value ); | |
} | |
} | |
return ret; | |
} | |
////////////////////// | |
//建築表示処理 | |
////////////////////// | |
function disp_village() { | |
if( location.pathname != "/village.php" ) { | |
return ; | |
} | |
var costs = getCostTables(); | |
var img_lv = new Array(); | |
img_lv[0] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWAMQAAKiTADs9BK+dAN7aALGjAMO2QernwPT038CzLOvmANfQgfn577OjDeLbnsjE'+'AOXkrrCtALurPsS7FvDtztXOau/qANXRAMf/If/6CLy4ACAgIL+sAGFyB7WdAP///////yH5BAEA'+ | |
'AB8ALAAAAAAXABYAAAW24PdxZGmepShyWOu+sMutcV3PXKXvSTL8v8Rux9FwLMikxSGhGAwUhxJZ'+'5GSu2Azk4el6FJBspropmwmIxUFS6DLMZTJ8Q5gcBPiGpzCXwxFfAhsCCh4IfUZzG20NAI4GBwSI'+ | |
'HIoMXRQRXAWScH5whV0LBYKTHaanHQARChQMAKinVbCnjo6zpkUjt7uxGhorKBy3Jb4qH77IvrDJ'+'xcbOIqgBAc/UxqfS1dkfptja1R3d3tXT2iEAOw=='; | |
img_lv[1] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWAMQAAEBCAP//IbKcAP7+6mZ5AMjEAPnnRKiTANXRAO3YALy4AP/6CP/zgb+sAO/q'+'ACAgIP/6Et7aAP7xV9C2AP///7WdANXRAPLVB6+sALqhAP/7JevmAK2YAP/mAd7aAP///yH5BAEA'+ | |
'AB8ALAAAAAAXABYAAAWh4PcRZGmepSgSQeu+sEusS23fOD4TTu/7keDm5yM8CJakMlnwaCCFpdJI'+'UFivCgxiQJFgsFdqY0xuCBKMrqBMFrPHgo763XC/OXIJh25n47t7b31lHAaAfEd0DRwSh4JHFZGS'+ | |
'kRwTFxkck5JUmpMHnwKdFUYjoqabDw8rKASiJakqH6mzqZq0sLG5IpMAALq/sZK9wMQfkcPFwBXI'+'ycC+xSEAOw=='; | |
img_lv[2] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWANUAAEBCAPz4Lr+vALKcAGZ5AP/5wP//Ie/qAKeSAP/zlenkAP////7xa7y4AP/n'+'F//6CP7+6t7aACAgIL+sAPXTBf/zgf/8TdXRAP7zq7WdAKyaAP381v3rQ+XHAMjEAOvmAMKtAPrn'+ | |
'Bf36VuzXAP/n5//8c/7yl////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACcALAAAAAAXABYAAAbDwNOJ'+ | |
'QCwaj0WhkGBoOp9QJ2H5qFqvWOyUcOh6u5Fw+PPtEiSEi3p98ShKGIzFw1afCY28viFa+P0BGnsN'+'dxOGhwMVDCMaDgscA4eGhZKGAxqYCRsgkZKUlRkaAhUQjBmVn5IaIQUFIwgIp55olRMaDAsQFXEY'+ | |
'Gqi0lRoFubwmnYd3GcrLGhQdsNADy8rJ08qY0tbTZ0Pa3tZnEktIBN5FEuJK6Ovo1uzoSvHy0wAA'+'8vf3y/X4/ErK+/36ZQAYsJ+9gEEAADs='; | |
img_lv[3] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWANUAAEBCAPXZMcjEAKyaAP7+6mZ5AP//If32lu/qANfBAKeSALy4AP/5wP/8Tfnh'+'BP/6CLWdACAgIN7aAL+sAP/5rP3rQ/TXHP/////8Yf381uzXANXRALGjAL2rAPflWuvmAPzpLunk'+ | |
'AP7xa//WQvzkAv36Vv/0l//nF////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACgALAAAAAAXABYAAAbEQBSq'+ | |
'QCwaj0WhsGBoOp9QZ2H5qFqvWOy0gOh6u5Jw+PPtFiKFjXq9EYQaJgpGwFafC4u8nlO6+P0gHHp5'+'dxOGhxwmIhoDJxcVHIeGhZKGHBwJFRkUAwOVlJWdFH8MHZ9olRMcIA4dChp+DqcFlRwkFweuFRcE'+ | |
'ppJ3EMHCEAx/FxmMwxDAyhAKAR4eFgoKzczNnZ3NwWdD29/CZxFLSAXbRRHjSuns6crt6Ury88MA'+'APP4+ML2+f1Kwfz8+YMQUKC/ewKDAAA7'; | |
img_lv[4] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWANUAAEBCAP/8TbWdALqhAKiTAP381mZ5AP//If32gurlAO/qAL+vAP/6CLy4AP/5'+'wP///7+sAOHdANTBAP/7JSAgINXRAP74q7CtAP7xa/LVB7GjAP756sjEAP7xV6yaAOvmAMKtAP//'+ | |
'/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACEALAAAAAAXABYAAAa/wFDI'+ | |
'QCwaj0Wh0HBoOp9Qp2HJqFqvWOzUoOh6v4pI5ANWGCiGinq95nACEw5bfTY07vj7JVF4dC55d3UQ'+'hIUQGgkbGH4ahoSDjhogDg4ejI4QkIYeGBsSBH4eHgKGmoSIDxsOD6yXhaaHCw4WGAgPFh0Lja9o'+ | |
'Ar6/AqIeGX4EBMACdcjABAMZA8fIysu/xtHSFEPU279n2UNIBtRFFN9C5ejlyOnlSu7vwAAA7/T0'+'v/L1+Uq++Pr6Av386ZvnLwgAOw=='; | |
img_lv[5] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWANUAAEBCAPXZMbWdAL+pAKeSAP/5wGZ5AP//If/zgb+vAPz3AP/6CP///+/qAPfl'+'WrKcAP/5rL+sAN7aACAgIPXTBdXRALy4AKyaAP/7OP/8YdXRAP381v/6EMjEAP/sLOvmANK/APnn'+ | |
'RP7xa/vuWcKtAP/mAf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACYALAAAAAAXABYAAAbGQJPJ'+ | |
'QCwaj0Wh0HBoOp9Qp2G5qFqvWOzU0Oh6u5Kw+PNtGCaGinpd6Sg4HExG0WFXzgaLfm/RMP4MEBoX'+'fBZ4EYiJDx4MJRePFwKJiIeTEQ8iDB4IEAgkD5aVkxcQDAUjpRAXoWiWERcJHgSzf6uToomkGyAE'+ | |
'IYG2iXgCw8QCBYCmAw/FAsLMAgQBDg4Us8vFzs+QF9fMZ0PP4d4TE0tIBuFF5Eom5O7kzO/r7PRC'+'xQAA9frsxPj7/yaG+QO4T8BAgvvyAQwCADs='; | |
img_lv[6] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWANUAAEBCAPzlQsjEAKypAP7+6mZ5AP//If/6CP/9iNfTAKeSANfBALy4AP/5rP7x'+'a/nhBLWdAL+sAP///yAgIP/5wN7aAO/qAOXHANK/APflWv/zgbKcANXRAP381r+vAPTXHPz3AP37'+ | |
'luvmAP/mA66eAP/n572fAP/WQv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACgALAAAAAAXABYAAAa/QBSq'+ | |
'QCwaj0WhsGBoOp9QZ2F5qFqvWOy0YOl6vZWw6OstTAqctDotACESgrXaXGDY7wyShxAa4PF0EYKD'+'ESQhBAskioSCgYwbIxIaDg0aCxuMjoSGEhIUHRINJJlnjIWeDwoenaOEmoMkBAQYCgESIa2DdBC8'+ | |
'vRC2nZ4eJL4Qu8UQChcZGR8KChvFx8jPz9HIZkPI29ITE0tIBdtF3koo3ujexenl5u5CvgAA7/Tm'+'vfL1+Si8+Pr1EP381ZunLwgAOw=='; | |
img_lv[7] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWANUAAEBCAPvkLb2rALGjAP/+wGZ5AP//Ie/qAP/8daiTANC2AP///7y4AP7xV/LV'+'B+HdAP/5rP/6CL+sACAgINXRAP756vz3ALWdAK+sAP/6Ev3xlvrtRcjEAPrpbOvmAL2fAKyaAP/s'+ | |
'LP/mAf/dvda4AMKtAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACYALAAAAAAXABYAAAbAQJOp'+ | |
'QCwaj0WhsGBoOp9QZ2EZqVqvWOy0cOh6D4+HxxP2fLuFSYHCbnMsCA4nk+G02+kCY8/HQBYEC4IQ'+'GHx7eRKJigN/DSIhCw0DiomIlBKMCyAgEBUlk5SWlAMhGwkikSAXl6KjAwMaCwqgoWqXiiACgKq3'+ | |
'rZQgAQsdILcSeRfIycgJCg4CCcrJx9HJCdbUyGlD2NzSExNLSAXYRd9KJt/p39Hq5ufvQsoAAPD1'+'58nz9vomyPn79hf8/bNHb18QADs='; | |
img_lv[8] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWANUAAEBCAPXZMbWdANbSAKiTAP381mZ5AP32lv//IeznAL+vAPv4bf/////+wN7a'+'AP/6CLy4APflWtXRAL+sACAgIPnhBP/5rP3xgv/8Ta+dAP7+6u/qAPTXHLGjAP/7OsjEAL2fAOvm'+ | |
'AP/uV//dvcGuAP/n5//mAf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACcALAAAAAAXABYAAAbNwNPJ'+ | |
'QCwaj0Wh0IBoOp9Qp2H5qFqvWOzUsOl6u46wOPTdGCgGiXot+XgOlgNm8GFLzgaIft+5MBYRDQwa'+'CR17EHgTiosZDAwJJg0FIhmLiomWExkLjgwWJBmVlpiWGQkaGo4WCh2ZpIodChoNChUFDBeii6+a'+ | |
'FX8EBJwHupdoAsfIGYINggUJGcjHeNHIBAERERwKBNQC090CwOLgZ0Pg58hnFEtIBuREFOtK8fTx'+'1PXxSvr70QAA+wABIvMXsKCSYwQNGhSQUKHBfwqDAAA7'; | |
img_lv[9] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWANUAAEBCAPXZRbWdANXRAKiTAP7+6mZ5AP//If/5rNC2AL2oAP/6CP3xgv381vTX'+'HLy4AN7aAL+sAO/qAP///yAgINXRAK+sAPvuWezXALGjAP/8Tf3xlsjEAOvmAKyaAP/n597aAMGu'+ | |
'ANa4AP/8Yf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACQALAAAAAAXABYAAAbAQBLJ'+ | |
'QCwaj0Wh0HBoOp9Qp2G5qFqvWOzUIOl6u5CwuPOVGCiGinpd4YA0CMQIxGFXzoaHfm8ZNBoIBRMI'+'Fnt6eBGJihkIDR4eGBMTGYqJiJURGRMNIY+blJWXlYybgRMMoIqiiwoXCBuCA6mWaJiJjx4Opx62'+ | |
'eAK/wL8eCgUFCRnBv77JvwQJAQ4EzALL0wTX09QUQ9nd2ttDSAbTRRTgQubp5snq5krv8MEAAPD1'+'9cDz9vpKv/n7+wL8/dtH718QADs='; | |
img_lv[10] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWANUAAEBCAP/7OsjEALCtAP7+6mZ5AO3YAP37lv//If/6CKiTAP77a7WdAN7aAP/5'+'wPLVB/flWr+sAO/qALGjANXRAP/6EiAgIP////z2rsKtANXRAP/8Tf/zgby4AL+vAP381vnnROvm'+ | |
'AK+dAP/mAfvjGd7aAPXZRdC2AP7xV//n572fANfBAP/7Jf///wAAAAAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAC0ALAAAAAAXABYAAAbhwFar'+ | |
'QCwaj0WhsIBoOp9QZ2GZqFqvWOy0IOlKGuCQOAQuh7wFS0HDFpRYFUG7tMFgAnJ2utDpDCgEFygD'+'fQMHF4gXC4QdexEREwYcghOQBgQfKyOIGY+OjxObKJUTDh8iqJMjnmqPkKKVBoIiESIoFwasBa6h'+ | |
'lBGbHArCGB+VEZ+1IL4eiCAPhyPGewzUtrOot4gEJCLUDNPUCicPHgrhDxAm5d7fauzC5t7w8d5p'+'Q+z4+fUWFktIBfqK8FPSgp9BfvgODiTIUAg7AAAaSiToDeLEiy2oWcQ4kcFGjhMjYgwCADs='; | |
img_lv[11] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWAMQAAEBCAP/7JdXRALKcAP7+6mZ5AP//IdC2AKiTAO/qAP7xV7y4APLVB7qhAP/z'+'gf/6CCAgIPnnRL+sAP///97aANXRAO3YAK+sAP/6ErWdAMjEAOvmAK2YAP/mAd7aAP///yH5BAEA'+ | |
'AB8ALAAAAAAXABYAAAW54PcVZGmepSgWRuu+sFusT23fOD4XSd9TwI0vAaQIewVIQcAUaDwBjKb5'+'jE6ZycJie6kQJooL1wsWb7OS9MDiAA/UbHdagp4POnI1XvFO19McexxzgWCDfkpzEoUKh4uCc3+L'+ | |
'EYaElI2RiYQKlYCcmIgFGaMZHAcMDRykpqiqo1mkowizA7GzCLWvECOxvb6kSbsjKKK+JRDCIsjL'+'yL3MyCrR0rEAANLX16TV2Nwqo9vd3Rng4d3W4SEAOw=='; | |
img_lv[12] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWANUAAEBCAPz4Lr+vAK+sAP/5wGZ5AP//Ie/qAP/zgenkAKeSAP///7WdAP/nF/7z'+'q97aAP7xV7y4AP7+6vLVB9XRAP/6CCAgIL+sAP7xa7KcAP3rQ//zldXRAPrnBf381sjEAOvmAOXH'+ | |
'AN7aAPnnRL2fAP/n5//8TdC2AKyaAO3YAP/mAf/8c//7Jf7yl//6EsKtAP///wAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAADAALAAAAAAXABYAAAbfQBis'+ | |
'QCwaj0WhsGBoOp9QZ2FZqVqvWOy0cOgeHmCQGAQug7wFS4HC/ohYrk87sXI4THJ2uhCJDDgSCxAD'+'fhALh4cBhBF7FxcZKQiCGY8IGCkoDQsajheNjhkqk6AopRseL52fFygdgiiODCgCCBKYqmqdra+O'+ | |
'rQQEKQoKuAW6I7woGAsSCHYOxAzRKIYQKLIEy84tGdx70bInEwLWKBMhwujcGd7fpSjq6t/yaUPy'+'9vffaRZLSAX4RRb2KQlIMKC9ggGVKFwoDwCAhRAhfnMYsaKSaBQtWmSQUaPFhxqDAAA7'; | |
img_lv[13] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWANUAAEBCAPzpLsjEAK+sAP7+6mZ5AO3YAP7xa///If/6CKeSAP/5rN7aALWdAP/6'+'EvflWr+sANXRAP/5wO/qACAgILGjAP32lv////LVB/3rQ/XZMdXRANC2AP381r2rALy4AP/zgfTX'+ | |
'HP7xV//8TenkAOvmAP/7Jf/mAdfBAP/WQqyaAP/8Yb2fAP/0l97aAP/nF////wAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAADAALAAAAAAXABYAAAblQBis'+ | |
'QCwaj0WhsIBoOp9QZ2GZqFqvWOy0MOlOGOCSuAQul7wFSmHDFrhMDkGbNGotVnJ2uvD5DCIEFyID'+'fiIXh4cBhB97EBAVBiCCFY8tBwYqLxcZlBCNjhUnk6AVKBkdCyoqjp+PoiKdqguIEh6sao6ugqsV'+ | |
'ASceCgaHJ7cFuSoZuxCiFsDJBLaeag3UKoYiKtQSiBcdBtQNe+AqHBge2Q0KGg8PIQoK4OLjquAN'+'qvT1aUP1/P3xFBSWICngrwhAJTAAKgTIb+FBhBCF1AMAIKJFhOAoXtwIg5pGjhcbfAR5sSLHIAA7'; | |
img_lv[14] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWANUAAEBCAPnnRL+vALCtAP381mZ5AP//Ie/qAP7xa9C2AKiTAP74q7WdAN7aAP/7'+'JfLVB////7y4ANXRAP/6CCAgIL+sAOrlAP/zgf7xV7GjAP/5wNXRAP7+6v/6EsjEAKyaAOvmAL2f'+ | |
'AN7aAP/8Tf/mAf/n58KtAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACcALAAAAAAXABYAAAbZwNOp'+ | |
'QCwaj0WhsGBoOp9QZ2E5qVqvWOy0cOgeGmCQ1xv2FigFidojcnQ86rVn5ICrz4VIZLDhQDADensW'+'BH+BengVFRkWF38ZiowcCI+KFYmRJJUZJhoaH5WKmIuaGB8VHwgcCQp/H6eXaJYZpacWEBwaELt/'+ | |
'orKKHwF/ChUCGgsIjgsYAr4FDNAfGK7Rrw/DCtB40AwKCQ8C2dwKAuDiDNvjCufq7GdD3PHy82cU'+'S0jP9EQU9kr8//zkAeSnpKDBeAAAGFy4kFtChhCVQHsYMSIDihUjKqwYBAA7'; | |
img_lv[15] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWANUAAEBCAPXZMb+vAK+sAP/5wGZ5AP//If7xa+vmANC2AKeSAP/6Ev///7WdAPfl'+'Wv/5rL2fAP/6CPLVB7y4AP/7JSAgIL+sAN7aAO3YAP381tXRANXRAPnnRLKcAPfyAP/zgcjEAP7x'+ | |
'V//sLP7+6v/mAayaAP/8Yd7aAP/7OPz3AMKtAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACsALAAAAAAXABYAAAbowNWq'+ | |
'QCwaj0WhsGBoOp9QZ2EZqVqvWOy0gOgiLmDvF0z2FiqFjRp0oixA69RigTKl4JtzYTIZaEYMIQN9'+'GgyGDA8agxN6FhYdGB+BHY8iDCQlmSUNjo2OHSSTjwcMIh8PHyqUFp4WJaEhJa4PDAQhtA+yrGiO'+ | |
'rrCyJQIiCsSGuq0lHIHADxkJCsq5nWgN1SUhy9UEh7UCHd961Q0lCRICmw0KAQ4OEsTfHeHimvDf'+'xAod4g1nQ/r+/+LOVFiCpADAIhUGKknIMKG/hgmVSJyoDwCAiRgxirOYsaOSahw9emwQUqTHiyKD'+ | |
'AAA7'; | |
img_lv[16] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWANUAAEBCAPzlQsjEAKypAP7+6mZ5AP//IdfBAP/zgf/6CKeSAP/5rLWdAO/qAP/m'+'A7+sAN7aAP////LVB/flWrKcACAgINXRAP/5wNC2AOXHALy4AP37lr+vANXRAPTXHP7xa/381uvm'+ | |
'APz3AP/7Ja6eAP7xV72fAP/mAf/n5//9jN7aAP/WQv/6Eu3YAP///wAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAC4ALAAAAAAXABYAAAblQJer'+ | |
'QCwaj0WhsGBoOp9QZ2GZqFqvWOy00Og2IOCQ9xseFyoFi1qgGrEEaotAlFLB4+eCRkPqECIlA3sk'+'HAQbgnt7eQ8PFC0IgBSMJBsEBySYjA+LkyeRjQ4RCB8LCAeSm2iaJJ4lJA+UEREXIBELr6kFq62v'+ | |
'JLMnChyyuJywAYC9BAQYCscbxGgM0iQlyNLHsrMcJNJ50gwKGBIcCtIKGRMTHgoKFO7e3+zt7hTy'+'7d8MZ0P4/P3fZxWWICngr0iFgEoOKjzIb+FBJRAj4gMAIKJFi98oXtyoRJpGjhwZfATJsSLIIAA7'; | |
img_lv[17] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWANUAAEBCAPvkLb2rAK+sAP/+wP//IWZ5ANC2AP/zge/qAKiTALy4AP////7xV/LV'+'B97aALWdAP/7JdXRAP7+6v/5rP/6CCAgIL+sAPrpbO3YAP/6ErGjAPrtRdXRAMjEAOvmAKyaAN7a'+ | |
'AMKtAP3xlv/8df/mAb2fAP/sLNa4AP/dvf/n5/z3AP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACwALAAAAAAXABYAAAbeQBbL'+ | |
'QCwaj0Wh0FBoOp9Qp2FZqVqvWOzUkOgmHuCPOPwJew0Wg2TtCUU0HolnRfJ4NPC1BG1YLAYdEwwN'+'A38UDAQMihSFC3wXFxsZCIMbkYcNJSeVkI+QGyWcG4cgIBQTIpYXnpGhDZYbJxwKriCQq2m3oJyR'+ | |
'GxsjDB2quAa3IByDtpAgAojKnWkQ0iANydIQIAEMGCDXEHzXCgcOAgrh4+Xe4OEK5t7t7tdoQ971'+'9vIWFktIBvdF+UpY5BuYrx5BgAETCvEGAIDChwGvNYRIkYW0iRUhQsCYEaLDikEAADs='; | |
img_lv[18] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWANUAAEBCAPnnRMjEAK+sAP381mZ5AOznAP32lv//If/6CKiTAPTXHLWdAN7aAPv4'+'bf/////+wL+sAO/qAPLVByAgILGjANXRAP/zgf/5rPXZMfflWv7+6tC2AL+vALy4ANXRAP/mAevm'+ | |
'AP/7Ov/7Jf7xV//8Tf/6Er2fAP/n58GuAK+dAP/dvd7aAP///wAAAAAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAC0ALAAAAAAXABYAAAbowFar'+ | |
'QCwaj0WhsIBoOp9QZ2GZqFqvWOy0IOlKGuCQOAQuN8YFSsHCFrBGJkFbdMAcSiy5JV3weAYfGw8k'+'A38XDw4kEA8bBoV8EREVBockFZIPDwYgEASWkZCRFSCDlxUOmQ8YKSqREaGSpJ+TG4KqHZevaq6j'+ | |
'pREdGxAdIAQPF7mwKgG+EYgKCqgHrboFDNYqJIMq24sQiwQGFdZ81gwKHBMdCtYKGRoaC+rl5OXP'+'6/X29+MUQ+X+/wDT8BuCpFpAIhQGCknIMOG/hgmVSJzoDwCAiRgxlrOYsaMSaxw9emQQUqTHiyKD'+ | |
'AAA7'; | |
img_lv[19] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWANUAAEBCAPnnRLqhAK+sAP381v//IWZ5AOvmAP/zgdXRAKiTAPTXHP///7WdAP/6'+'CO3YAP/5rPfyAN7aALy4AP/6EtXRAL+sACAgIP/8Tf7+6rGjANC2APLVB8jEAP7xV//7Jf3xlqya'+ | |
'AMGuAP/n597aAPXZRf/8Yda4AP/mAb2fAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACoALAAAAAAXABYAAAbeQJXK'+ | |
'QCwaj0Wh0FBoOp9Qp2HpqFqvWOzUcOgeJGDvF0z2Gi6GirpD+lA6axIGAjGR4JWzYTIZJDIMHgN9'+'CQQEEIAQgxN6FhYaDwiBGo8QBCEhDwwMlBaNjhook48MBCKYpZ2fj6IelBoQpYgMCKpojqyjGiIe'+ | |
'ECCACbYGDcQhAYEhxZgLtMnEesQNIR7I0SECGRkbGtHQxAobHAIK0eAlC+TdaNENCu7s7e/sZ0Pw'+'9vdnF0tIw/ZFF/qUABwIEB5BgEoSKmQHAIDChw+jNYRIUQmxiRUrNsCYsaLDjEEAADs='; | |
img_lv[20] = 'data:image/gif;base64,'+ | |
'R0lGODlhFwAWANUAAEBCAPXZRcjEAKypAP381mZ5AOXHAP37lv//If/6CKShAP/nF/77a////97a'+'ALWdAP/5wNXRAPXTBfz2ru/qACAgIP/zgb+sAPz4LrGjAP7+6vflWt7aALy4AL2rAP/8Tf/mAevm'+ | |
'AMGuANfBAP3rQ6yaAOnkAKeSAOzXAP/n5/vuWc/LAP7yl//8c/v2C72fAP/WQv/7OsaqAP///wAA'+'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAADMALAAAAAAXABYAAAb0wNms'+ | |
'QCwaj0WhsIBoOp9QZ2GZqFqvWOy0QOlSHGBwaBwWjwuVQmQtMLUmk49gJeB84DHBGl3odDIqDYKC'+'GAMDB4MNDAMdfBcXGRYMKCULDSQlKBoEIyCCIheOjxklpSwEIiUQBKUlFg0goWmPFw8lHhYaKCco'+ | |
'DSolFyWBKLIFtBkgEBC7J54WrROsxaMMDRoWcBMeggESiLHFD7YQ1tkswoMaCxkZD3ziJRIGJ/T0'+'7BIbAR4n4u5p/aX6CWxVQiCaIQITKuyHpsISJAUWFqngUAnFixQTYqSopKNHgQAAeBw5sl9IkiiV'+ | |
'iDuZMuUDli1TimwZBAA7'; | |
Pika_prepareForDisplayBuildStatus();//Lv0表示 | |
var xybld_a = new Array(); | |
var allbld = $a("//li/span[@class=\"buildStatus\" and contains(text(),\"建設\")]/a"); | |
for(var idx=0 ; idx<allbld.length ; idx++) { | |
var tmp = allbld[idx].href.match(/x=([\-0-9]+).*y=([\-0-9]+)/); | |
if( tmp != null ) { | |
xybld_a.push(tmp); | |
} | |
} | |
allbld = $a("//li[contains(text(), \"削除中\")]/span[@class=\"buildStatus\"]/a"); | |
var xybld_d = new Array(); | |
for(var idx=0 ; idx<allbld.length ; idx++) { | |
var tmp = allbld[idx].href.match(/x=([\-0-9]+).*y=([\-0-9]+)/); | |
if( tmp != null ) { | |
xybld_d.push(tmp); | |
} | |
} | |
var allarea = $a("//area"); | |
for(var idx=0 ; idx < allarea.length ; idx++) { | |
var title = allarea[idx].getAttribute("title").match(/^(.*) LV\.([0-9]+)$/); | |
if( !title ) { | |
title = [allarea[idx].getAttribute("title"), allarea[idx].getAttribute("title"), 0]; | |
} | |
if( costs[title[1]] ) { | |
if(costs[title[1]][title[2]]) { | |
var xy = allarea[idx].getAttribute("href").match(/^.*(?:\?|&)x=([\-0-9]+)&y=([\-0-9]+)+(?:&[^=]+=[^&]+)*.*$/); | |
var level = parseInt(title[2],10); | |
var blding = 0; | |
var dlting = 0; | |
console.log(xy); | |
for ( var xxx=0 ; xxx < xybld_a.length ; xxx++){ | |
if( xy[1] == xybld_a[xxx][1] && xy[2] == xybld_a[xxx][2] ) { | |
level ++ ; | |
blding += 2; | |
} | |
} | |
for ( var xxx=0 ; xxx < xybld_d.length ; xxx++){ | |
if( xy[1] == xybld_d[xxx][1] && xy[2] == xybld_d[xxx][2] ) { | |
dlting ++; | |
} | |
} | |
try { | |
if( costs[title[1]].length <= level || // maxinum level reached | |
RES_NOW.wood < costs[title[1]][level][0] || | |
RES_NOW.stone< costs[title[1]][level][1] || | |
RES_NOW.iron < costs[title[1]][level][2] || | |
RES_NOW.rice < costs[title[1]][level][3] ) { | |
//lvを黄色に | |
var thisimg = getLevelImageHTML(xy[1], xy[2], "mapicon"); | |
if( thisimg ) { | |
thisimg.src = img_lv[parseInt(title[2],10)]; | |
} | |
} | |
}catch(e) { | |
GM_log("catched"); | |
} | |
if( (blding || dlting) && !OPT_PIKA_BLINKBLD ) { | |
//建築中 | |
var thisimg = getLevelImageHTML(xy[1], xy[2], "mapicon"); | |
if( thisimg ) { | |
thisimg.style.outlineColor = (blding) ? "red" : "blue"; | |
thisimg.style.outlineStyle = "dotted"; | |
thisimg.style.outlineWidth = "2px"; | |
} | |
} | |
} | |
} | |
} | |
if( OPT_PIKA_BLINKBLD) Pika_displayBuildStatus(); | |
function getLevelImageHTML(x, y, cls) { | |
var xdom = ""; | |
var no = (101 + parseInt(x,10) * 7 + parseInt(y,10)).toString().substr(-2); | |
xdom = "//img[@class=\"" + cls + no + "\"]"; | |
return $x(xdom, $("maps") ); | |
} | |
} | |
////////////////////// | |
//メモ処理 | |
////////////////////// | |
function disp_memo() | |
{ | |
var icon_memo = 'data:image/gif;base64,'+ | |
'R0lGODlhEQAPAKIAAP///+np6dXV1VpaWlhYWEVFRURERDMzMyH5BAQUAP8ALAAAAAARAA8AAAM7'+ | |
'eLrcXGTIOYo7RITNAyEWMwRAaQIj0YynOaAr2aKwKLfvEM+0bvO53Sz4G9YWEMrEcCziLknlwHCp'+ | |
'NhIAOw=='; | |
var cnt = parseInt(OPT_MEMO_COUNT, 10); | |
if( isNaN(""+cnt) || cnt < 1 ) cnt = 1; | |
if( cnt > 5 ) cnt = 5; | |
for(var i=0 ; i<cnt ; i++){ createMemoTab(i); } | |
function createMemoTab(no) | |
{ | |
if( !no ) no = ""; | |
var title = "メモ"; | |
if( no ) title += (no +1 ); | |
var elms = ccreateSideBox("beyond_sidebox_memo" + no, icon_memo, title); | |
var ta = d.createElement("textarea"); | |
ta.id = "beyond_memobox" + no; | |
ta.rows = OPT_MEMO_HEIGHT; | |
ta.cols = OPT_MEMO_WIDTH; | |
if (isNarrow) { | |
ta.rows = OPT_MEMO_HEIGHT - 1; | |
ta.cols = OPT_MEMO_WIDTH - 4; | |
} | |
ta.style.fontSize= OPT_MEMO_FONT_SIZE + "px"; | |
ta.value= cloadData( "memo" + no, "", true ); | |
elms.sideBoxInner.appendChild(ta); | |
var sv = d.createElement("a"); | |
sv.href = "javascript:void(0);"; | |
sv.innerHTML = "保存"; | |
$e(sv, "click", function() { | |
var memoBox = $("beyond_memobox" + no); | |
if( memoBox ) {csaveData( "memo" + no, memoBox.value, true );alert("保存しました");} | |
}); | |
var dv = d.createElement("div"); | |
dv.appendChild(sv); | |
elms.sideBoxInner.appendChild(dv); | |
} | |
} | |
////////////////////// | |
//拠点リンク機能 | |
////////////////////// | |
function disp_baseLink() | |
{ | |
var elm = $x('id("lodgment")/div[@class="floatInner"] | //div[@class="sideBoxInner basename"] | //div[@class="floatInner clearfix"]'); | |
if( !elm ) return; | |
var bases = $a("//li/child::*", elm); | |
for( var idx=0 ; idx < bases.length ; idx++) { | |
addBaseLink(bases[idx]); | |
} | |
function addBaseLink(elem) { | |
var thistitle = elem.title; | |
if( !thistitle ) return; | |
var xy = thistitle.match(/^.*\(([\-0-9]+)\,([\-0-9]+)+\)$/); | |
if( !xy ) return; | |
var a_m, a_v, a_n; | |
var a_m_img = d.createElement("img"); | |
a_m_img.style.paddingLeft = "3px"; | |
a_m_img.style.paddingTop = "3px"; | |
a_m_img.src = img_map; | |
var a_v_img = d.createElement("img"); | |
a_v_img.style.paddingLeft = "3px"; | |
a_v_img.style.paddingTop = "3px"; | |
a_v_img.src = img_mura; | |
var a_n_img = d.createElement("img"); | |
a_n_img.style.paddingLeft = "3px"; | |
a_n_img.style.paddingTop = "3px"; | |
a_n_img.src = img_naisei; | |
a_m = d.createElement("a"); | |
a_m.href = caddSessionId("/map.php?x=" + xy[1] + "&y=" + xy[2]); | |
a_m.title = "マップ(" + xy[1] + "," + xy[2] + ")" ; | |
a_m.appendChild(a_m_img); | |
a_v = d.createElement("a"); | |
a_v.title = "表示"; | |
a_v.appendChild(a_v_img); | |
a_n = d.createElement("a"); | |
a_n.title = "内政"; | |
a_n.appendChild(a_n_img); | |
if( elem.href ) { | |
var id = elem.href.match(/^.*\?village_id=([0-9]+).*$/); | |
if( id ) { | |
a_v.href = caddSessionId("/village_change.php?village_id=" + id[1] + "&from=menu&page=/village.php#ptop"); | |
a_n.href = caddSessionId("/village_change.php?village_id=" + id[1] + "&from=menu&page=/card/domestic_setting.php#ptop"); | |
} | |
} else { | |
a_v.href = caddSessionId("/village.php#ptop"); | |
a_n.href = caddSessionId("/card/domestic_setting.php#ptop"); | |
} | |
var spn = d.createElement("span"); | |
spn.style.noWrap = true; | |
spn.appendChild(a_v); | |
spn.appendChild(a_m); | |
spn.appendChild(a_n); | |
elem.parentNode.insertBefore(spn, elem.nextSibling); | |
} | |
} | |
////////////////////// | |
//領地リンク機能 | |
////////////////////// | |
function disp_mapLink() | |
{ | |
//暫定的にsplit("\n")で3なら領地リンク、4なら君主リンクに | |
if( location.pathname == "/land.php" ) { | |
var div = $("tMenu"); | |
if( div ) { | |
var lnk = d.createElement("a"); | |
lnk.href = "javascript:void(0);"; | |
lnk.innerHTML = "領地リンクの追加"; | |
div.appendChild(lnk); | |
$e(lnk, "click", function() {saveMapLink();}); | |
} | |
}else if( location.pathname == "/user/" ) { | |
var table = $x("//table[@class=\"commonTables\"]"); | |
if( table ) { | |
var lnk = d.createElement("a"); | |
lnk.href = "javascript:void(0);"; | |
lnk.innerHTML = "君主リンクの追加"; | |
$e(lnk, "click", function() {saveMapLink();}); | |
table.parentNode.insertBefore(lnk, table.nextSibling); | |
} | |
} | |
var icon_map = 'data:image/gif;base64,'+ | |
'R0lGODlhEQAPALMAANO3SayTQ3drPFxQsFNTUUA3uTMzMxoamBgYnxsNxg0G8ggC9AAA/wAAAAAA'+ | |
'AAAAACH5BAQUAP8ALAAAAAARAA8AAARL0MhJq50InVsT+wknIctnIhZZmmZYIWy8CAFATLGpADwQ'+ | |
'TCuGYljo9W4Gz2dnNP4MMNOgaQRKqT3BJJFACLC9C1bLqfWeIpqATIkAADs='; | |
var elms = ccreateSideBox("beyond_sidebox_xylink", icon_map, "領地/君主リンク"); | |
elms.sideBoxInner.id = "beyond_sidebox_xylink_inner"; | |
resetMapLinks(); | |
} | |
function saveMapLink( ) | |
{ | |
if( location.pathname == "/land.php" ) { | |
var allDivs, thisDiv; | |
var v_name = ""; | |
var basename = $x("//span[@class=\"basename\"]"); | |
var xy = location.search.match(/^\?x=([\-0-9]+)\&y=([\-0-9]+)+$/); | |
if( basename ) { | |
v_name = basename.innerHTML; | |
if( v_name =="空き地" ) { | |
v_name += xy[1] + "," + xy[2]; | |
} | |
} | |
v_name = prompt("名前を入力してください", v_name); | |
if( !v_name ) return; | |
var maplinks = cloadData( "links", 0, true ); | |
var value = v_name + "\n" + xy[1] + "\n" + xy[2]; | |
csaveData( "link" + maplinks , value, true ); | |
maplinks++; | |
csaveData( "links" , maplinks, true ); | |
resetMapLinks(); | |
}else if( location.pathname == "/user/" ) { | |
var user_id = URL_PARAM.user_id; | |
var tmp = d.body.innerHTML.match(/<td>君主<\/td>[^<]*?<td>(.+)<\/td>/); | |
if( !tmp ) return; | |
var user_name = tmp[1]; | |
var comment = ""; | |
disp_name = prompt("名前を入力してください", user_name); | |
if( !disp_name ) return; | |
comment = prompt("コメントを入力してください", comment); | |
var maplinks = cloadData( "links", 0, true ); | |
var value = user_id + "\n" + user_name + "\n" + disp_name + "\n" + comment; | |
csaveData( "link" + maplinks , value, true ); | |
maplinks++; | |
csaveData( "links" , maplinks, true ); | |
resetMapLinks(); | |
} | |
} | |
function configMapLinkClose() | |
{ | |
var elem = $("beyond_mapLinkWindow"); | |
if( !elem ) return; | |
$("beyond_floatpanel").removeChild(elem); | |
} | |
function configMapLink(n, evt) | |
{ | |
var tmp = cloadData( "link" + n , "", true ); | |
if( !tmp ) return ; | |
configMapLinkClose(); | |
data = tmp.split("\n"); | |
var lw = d.createElement("div"); | |
lw.id = "beyond_mapLinkWindow"; | |
lw.style.position = "absolute"; | |
if( data.length == 3 ) { | |
lw.style.backgroundColor = "thistle"; | |
lw.style.border = "outset 2px thistle"; | |
}else if( data.length == 4 ) { | |
lw.style.backgroundColor = "lightgreen"; | |
lw.style.border = "outset 2px lightgreen"; | |
} | |
lw.style.fontSize = "10px"; | |
lw.style.padding = "10px"; | |
lw.style.zIndex = 1000; | |
lw.style.left = evt.pageX - 76 + "px";//faraway 20110420(176->76) | |
lw.style.top = evt.pageY - 111 + "px"; | |
if( data.length == 3 ) { | |
ccreateTextBox(lw, "LINK_TITLE", data[0], "名称","名称",20, 0); | |
ccreateTextBox(lw, "LINK_X", data[1], "X座標","X座標",10, 0); | |
ccreateTextBox(lw, "LINK_Y", data[2], "Y座標","Y座標",10, 0); | |
}else if( data.length == 4 ) { | |
var dv = d.createElement("div"); | |
dv.innerHTML = "id=" + data[0] + " " + data[1] + "<br>"; | |
lw.appendChild(dv); | |
ccreateTextBox(lw, "LINK_TITLE", data[2], "表示名","表示名",20, 0); | |
ccreateTextBox(lw, "LINK_COMMENT", data[3], "コメント","コメント",20, 0); | |
} | |
//設定ボタン | |
ccreateButton(lw, "保存", "内容を保存します", function() { | |
var v = ""; | |
if( data.length == 3 ) { | |
v = cgetTextBoxValue("LINK_TITLE") + "\n" | |
+ cgetTextBoxValue("LINK_X") + "\n" | |
+ cgetTextBoxValue("LINK_Y"); | |
}else if( data.length == 4 ) { | |
v = data[0] + "\n" + data[1] + "\n" | |
+ cgetTextBoxValue("LINK_TITLE") + "\n" | |
+ cgetTextBoxValue("LINK_COMMENT"); | |
} | |
csaveData( "link" + n , v, true ); | |
configMapLinkClose(); | |
resetMapLinks(); | |
}); | |
//削除 | |
ccreateButton(lw, "削除", "削除", function() { | |
if(!confirm("削除してよろしいですか?") ) return false; | |
var maplinks = cloadData( "links", 0, true ); | |
for(var i = n+1 ; i < maplinks ; i++) { | |
var tmp = cloadData( "link" + i, "", true ); | |
csaveData( "link" + (i-1), tmp, true ); | |
} | |
csaveData( 'links' , maplinks-1, true ); | |
configMapLinkClose(); | |
resetMapLinks(); | |
}); | |
//上に移動 | |
if( n != 0 ) { | |
ccreateButton(lw, "▲", "上に移動", function() { | |
var tmp = cloadData( "link" + (n-1), "", true ); | |
csaveData( "link" + (n-1), cloadData( "link" + n, "", true ), true ); | |
csaveData( "link" + n, tmp, true ); | |
configMapLinkClose(); | |
resetMapLinks(); | |
}); | |
} | |
//下に移動 | |
var maplinks = cloadData( "links", 0, true ); | |
if( n + 1 < maplinks ) { | |
ccreateButton(lw, "▼", "下に移動", function() { | |
var tmp = cloadData( "link" + (n+1), "", true ); | |
csaveData( "link" + (n+1), cloadData( "link" + n, "", true ), true ); | |
csaveData( "link" + n, tmp, true ); | |
configMapLinkClose(); | |
resetMapLinks(); | |
}); | |
} | |
//閉じる | |
ccreateButton(lw, "閉じる", "閉じる", function() {configMapLinkClose();}); | |
$("beyond_floatpanel").appendChild(lw); | |
} | |
function resetMapLinks() | |
{ | |
var ul = $("beyond_sidebox_xylink_ul"); | |
if( ul ) { | |
ul.parentNode.removeChild(ul); | |
} | |
ul = d.createElement("ul"); | |
ul.id = "beyond_sidebox_xylink_ul"; | |
var maplinks = cloadData( "links", 0, true ); | |
for(var i=0 ; i<maplinks ; i++) { | |
var tmp = cloadData( "link" + i , "", true ); | |
if( tmp != "" ) { | |
var li = d.createElement("li"); | |
var data = tmp.split("\n"); | |
if( data.length == 3 ) { | |
//領地リンク | |
var link1 = d.createElement("a"); | |
link1.href = caddSessionId("/land.php?x=" + data[1] + "&y=" + data[2] + "#ptop"); | |
link1.title = "表示(" + data[1] + "," + data[2] + ")"; | |
link1.innerHTML = data[0]; | |
link1.style.fontSize = OPT_MAPLINK_FONT_SIZE + "px"; | |
var link2 = d.createElement("a"); | |
link2.href = caddSessionId("/map.php?x=" + data[1] + "&y=" + data[2] + "#ptop"); | |
link2.title="マップ(" + data[1] + "," + data[2] + ")"; | |
var a_m_img = d.createElement("img"); | |
a_m_img.src = img_map; | |
link2.appendChild(a_m_img); | |
var m = ""; | |
var dist = cgetDistanceFromBase(data[1], data[2]); | |
if( dist != -1 ) { | |
m =" 距離[" + dist.toFixed(2) + "]"; | |
} | |
var link3 = d.createElement("a"); | |
link3.href = caddSessionId("/facility/castle_send_troop.php?x=" + data[1] + "&y=" + data[2] + "#ptop"); | |
link3.title = "兵を送る(" + data[1] + "," + data[2] + ")" + m; | |
var a_s_img = d.createElement("img"); | |
a_s_img.src = img_ken; | |
link3.appendChild(a_s_img); | |
var link4 = d.createElement("a"); | |
link4.href="javascript:void(0)"; | |
link4.title="設定"; | |
var a_d_img = d.createElement("img"); | |
a_d_img.src = img_hanma; | |
link4.appendChild(a_d_img); | |
(function(n){ | |
$e(link4, "click", function(event){configMapLink(n,event);}); | |
})(i); | |
li.appendChild(link1); | |
li.appendChild(link2); | |
li.appendChild(link3); | |
li.appendChild(link4); | |
ul.appendChild(li); | |
}else if( data.length == 4 ) { | |
//君主リンク | |
var img = d.createElement("img"); | |
img.src = img_user; | |
li.appendChild(img); | |
var link1 = d.createElement("a"); | |
link1.href = caddSessionId("/user/?user_id=" + data[0] + "#ptop"); | |
link1.title = data[3]; | |
link1.innerHTML = data[2]; | |
link1.style.fontSize = OPT_MAPLINK_FONT_SIZE + "px"; | |
var link2 = d.createElement("a"); | |
link2.href=caddSessionId("/message/new.php?user_id=" + data[0] + "#ptop"); | |
link2.title="[" + data[1] + "]宛に書簡を送る"; | |
var a_m_img = d.createElement("img"); | |
a_m_img.src = img_mail; | |
link2.appendChild(a_m_img); | |
var link3 = d.createElement("a"); | |
link3.href="javascript:void(0)"; | |
link3.title="設定"; | |
var a_d_img = d.createElement("img"); | |
a_d_img.src = img_hanma; | |
link3.appendChild(a_d_img); | |
(function(n){ | |
$e(link3, "click", function(event){configMapLink(n,event);}); | |
})(i); | |
li.appendChild(link1); | |
li.appendChild(link2); | |
li.appendChild(link3); | |
ul.appendChild(li); | |
} | |
} | |
} | |
$("beyond_sidebox_xylink_inner").appendChild(ul); | |
} | |
////////////////////// | |
//領地リンクの読み込み・保存機能 | |
////////////////////// | |
function mapLinkList(evt) | |
{ | |
if( $("beyond_SaveMapLinkWindow") ) return; | |
var mc = d.createElement("div"); | |
mc.id = "beyond_SaveMapLinkWindow"; | |
mc.style.position = "absolute"; | |
mc.style.backgroundColor = "blueviolet"; | |
mc.style.border = "outset 2px blueviolet"; | |
mc.style.fontSize = "12px"; | |
mc.style.padding = "15px"; | |
mc.style.zIndex = 8100+1; | |
mc.style.left = evt.pageX - 250 + "px"; | |
mc.style.top = evt.pageY - 220 + "px"; | |
var ta = d.createElement("textarea"); | |
ta.id = "beyond_SaveMapLinkWindow_text"; | |
ta.rows = 10; | |
ta.cols = 40; | |
var txt = ""; | |
var maplinks = cloadData( "links", 0, true ); | |
for(var i=0 ; i<maplinks ; i++) { | |
var tmp = cloadData( "link" + i , "", true ); | |
if( tmp ) { | |
txt += tmp.replace(/\n/g, "\t" ) + "\n"; | |
} | |
} | |
ta.value = txt; | |
mc.appendChild(ta); | |
$e(ta, "keydown", function(event) { | |
//TAB入力 | |
var kC = event.keyCode ? event.keyCode : event.charCode ? event.charCode : event.which; | |
if (kC == 9 && !event.shiftKey && !event.ctrlKey && !event.altKey) | |
{ | |
var oS = this.scrollTop; | |
var sS = this.selectionStart; | |
var sE = this.selectionEnd; | |
this.value = this.value.substring(0, sS) + "\t" + this.value.substr(sE); | |
this.setSelectionRange(sS + 1, sS + 1); | |
this.focus(); | |
this.scrollTop = oS; | |
if (event.preventDefault) | |
{ | |
event.preventDefault(); | |
} | |
return false; | |
} | |
return true; | |
} ); | |
var sv = d.createElement("a"); | |
sv.href = "javascript:void(0);"; | |
sv.innerHTML = "保存"; | |
$e(sv, "click", function() { | |
if( confirm("上書き保存します。よろしいですか?") == false) return; | |
var ta = $("beyond_SaveMapLinkWindow_text"); | |
if( ta ) { | |
var lines = ta.value.split("\n"); | |
var saveLines = new Array(); | |
for( var i=0 ; i<lines.length ; i++) { | |
if( lines[i] == "" ) continue; | |
var dat = lines[i].split("\t"); | |
if( dat.length != 3 && dat.length != 4 ) { | |
alert("解析エラーです。処理を中断します。\n( " + lines[i] + " )" ); | |
return; | |
} | |
//チェック | |
if( dat.length == 3 ) { | |
if( !dat[1].match(/[\-0-9]+/g) || !dat[2].match(/[\-0-9]+/g) ) { | |
alert("解析エラーです。処理を中断します。\n( " + lines[i] + " )" ); | |
return; | |
} | |
}else if ( dat.length == 4 ) { | |
if( dat[3] == "" && dat[1].match(/[\-0-9]+/g) && dat[2].match(/[\-0-9]+/g) ) { | |
dat.pop(); | |
}else if( !dat[0].match(/[\-0-9]+/g) ) { | |
alert("解析エラーです。処理を中断します。\n( " + lines[i] + " )" ); | |
return; | |
} | |
}else{ | |
alert("解析エラーです。処理を中断します。\n( " + lines[i] + " )" ); | |
return; | |
} | |
var linedata = ""; | |
for( var j=0 ; j<dat.length ; j++ ){ | |
dat[j] = dat[j].replace(/(^\s+)|(\s+$)/g, ""); | |
if( linedata != "" ) { | |
linedata += "\n"; | |
} | |
linedata += dat[j]; | |
} | |
saveLines.push(linedata); | |
} | |
//削除 | |
var maplinks = cloadData( "links", 0, true ); | |
for(i=0 ; i<maplinks ; i++) { | |
cdelData( "link" + i, true ); | |
} | |
//追加 | |
for(var i=0 ; i<saveLines.length ; i++ ) { | |
csaveData( "link" + i , saveLines[i], true ); | |
} | |
csaveData( "links" , saveLines.length, true ); | |
alert("上書き保存しました"); | |
resetMapLinks(); | |
} | |
}); | |
var cl = d.createElement("a"); | |
cl.href = "javascript:void(0);"; | |
cl.innerHTML = "閉じる"; | |
$e(cl, "click", function() { | |
var mc = $("beyond_SaveMapLinkWindow"); | |
if( mc ) { | |
mc.parentNode.removeChild(mc); | |
} | |
}); | |
var dv = d.createElement("div"); | |
dv.appendChild(sv); | |
dv.appendChild(d.createTextNode(" ") ); | |
dv.appendChild(cl); | |
mc.appendChild(dv); | |
$("beyond_floatpanel").appendChild(mc); | |
} | |
////////////////////// | |
//座標リンク処理 | |
////////////////////// | |
function disp_XYLink() | |
{ | |
var flg_profile_xy = false; | |
var flg_include_a = false; | |
//1行コメント | |
var comment = $a("//*[@id=\"commentList\"]//tr/td[2]"); | |
for(var i=0 ; i< comment.length ; i++) { | |
setXYLink( comment[i] ); | |
} | |
//各エレメント | |
var targetPath = new Array(); | |
if( location.pathname == "/alliance/chat_view.php" ) { | |
targetPath.push('//div[@class="hitokotoList2"]/p[@class="hitokoto"]'); //ac.40 | |
} | |
if( location.pathname == "/alliance/info.php" ) { | |
targetPath.push( "//tr[th[contains(text(),\"コメント\")]]/td" ); | |
} | |
if( location.pathname == "/message/detail.php" ) { | |
targetPath.push( "//tr[th[contains(text(),\"件名\")]]/td" ); | |
targetPath.push( "//tr[th[contains(text(),\"本文\")]]/td" ); | |
} | |
if( location.pathname == "/bbs/res_view.php" || | |
location.pathname == "/bbs/personal_res_view.php" ) { | |
targetPath.push( "//th[@class=\"mainTtl\"]/div[@class=\"threadTtl\"]" ); | |
targetPath.push( "//td[@class=\"contents\"]" ); | |
targetPath.push( "//table[@class=\"commonTables\"]//tr[2]/td[1]" ); | |
} | |
//プロフィール画面 | |
if( location.pathname == "/user/" ) { | |
targetPath.push( "//table[@class=\"commonTables\"]//tr[position()>12]/td[2]" ); | |
flg_profile_xy = true; | |
} | |
// | |
for(var i=0 ; i< targetPath.length ; i++) { | |
var elms = $a(targetPath[i]); | |
for(var j=0 ; j<elms.length ; j++) { | |
setXYLink(elms[j]); | |
} | |
} | |
function setXYLink(elm) { | |
var tmpHTML = elm.innerHTML; | |
var reg = /[\(|(|【]([\-0-90-9]+)( *[,&、・,] *)([\-0-90-9]+)[\)|)|】]/g; | |
if(OPT_XYLINK_NK || flg_profile_xy ) { | |
reg = /([\-0-90-9]+)( *[\,&、・,] *)([\-0-90-9]+)/g; | |
} | |
var elm_child_a = null; | |
if( flg_include_a ) { | |
elm_child_a = $x("descendant::a", elm); | |
} | |
tmpHTML = tmpHTML.replace(reg, XYLinkReg ); | |
elm.innerHTML = tmpHTML; | |
function XYLinkReg() { | |
var img_send = IMG_DIR + "report/icon_go.gif"; | |
var img_mp = IMG_DIR + "report/icon_scout.gif"; | |
var m = ""; | |
var dist = cgetDistanceFromBase(arguments[2], arguments[4]); | |
if( dist != -1 ) { | |
m = " 距離[" + dist.toFixed(2) + "]"; | |
} | |
var x = toHankaku(arguments[1]); | |
var y = toHankaku(arguments[3]); | |
var disp = x + arguments[2] + y; | |
if( !OPT_XYLINK_NK && !flg_profile_xy) disp = "(" + disp + ")"; | |
var txt = '<a href="'+caddSessionId('/land.php?x=' + x + '&y=' + y + '#ptop')+'" title="表示" style="display:inline;">' + disp + '</a>'; | |
txt += '<a href="'+caddSessionId('/map.php?x=' + x + '&y=' + y + '#ptop')+'" title="マップ' + x + ',' + y + '" style="display:inline;"><img src="' + img_mp + '" style="width:14px; height:14px; vertical-align:middle;"></a>'; | |
txt += '<a href="'+caddSessionId('/facility/castle_send_troop.php?x=' + x + '&y=' + y + '#ptop')+'" title="兵を送る' + x + ',' + y + m + '" style="display:inline;"><img src="' + img_send + '" style="width:14px; height:14px; vertical-align:middle;"></a>'; | |
//Aの入れ子は連結し直してみる | |
if( elm_child_a ) { | |
txt = '</a>' + txt + '<a href="' + elm_child_a.href + '">'; | |
} | |
return txt; | |
function toHankaku(str) { | |
return str.replace(/[0-9]/g, function(str){return String.fromCharCode(str.charCodeAt(0)-65248);}); | |
} | |
} | |
} | |
} | |
////////////////////// | |
//兵力整形 | |
////////////////////// | |
function disp_TTable() | |
{ | |
if( location.pathname == "/message/inbox.php" || | |
location.pathname == "/message/outbox.php" || | |
location.pathname == "/message/new.php" || | |
location.pathname == "/bbs/topic_view.php" || | |
location.pathname == "/facility/unit_status.php" || | |
location.pathname == "/facility/castle_send_troop.php") { | |
return ; | |
} | |
//■仮対処 | |
var ta = $a("//textarea"); | |
for(var i=0 ; i<ta.length ; i++) { | |
if( ta[i].innerHTML != "" ) return; | |
} | |
var targetPath = [ | |
"//div[@id='commentList']", | |
"//table[@class='commonTables']", | |
"//p[@class='hitokoto']" | |
]; | |
for(var i=0 ; i<targetPath.length ; i++) { | |
var elms = $a(targetPath[i]); | |
for(var j=0 ; j<elms.length ; j++) { | |
setTTable(elms[j]); | |
} | |
} | |
function setTTable(elm) { | |
var tmpHTML = elm.innerHTML; | |
var reg = /剣兵\s+盾兵\s+槍兵\s+弓兵\s+騎兵\s+衝車\s+斥候.*(\n兵士\s+|\n)(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+).*(\n死傷\s+|\n)(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+).*\n.*大剣兵\s+重盾兵\s+矛槍兵\s+弩兵\s+近衛騎兵\s+投石機\s+斥候騎兵\s+武将.*(\n兵士\s+|\n)(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+).*(\n死傷\s+|\n)(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/g; | |
tmpHTML = tmpHTML.replace(reg, | |
function() { | |
var txt = "<table class='tables'><tr><th class='solClass2'> </th>" + | |
"<th class='solClass2'>剣兵</th><th class='solClass2'>盾兵</th><th class='solClass2'>槍兵</th><th class='solClass2'>弓兵</th>" + | |
"<th class='solClass2'>騎兵</th><th class='solClass2'>衝車</th><th class='solClass2'>斥候</th><th class='solClass2'> </th>" + | |
"</tr><tr><th class='solClass2'>兵士</th>"; | |
for(var i = 2 ; i<= 8 ; i++) { | |
txt += "<td>" + arguments[i] + "</td>"; | |
} | |
txt += "<td> </td>"; | |
txt += "</tr><tr><th class='solClass2'>死傷</th>"; | |
for(var i = 10 ; i<= 16 ; i++) { | |
txt += "<td>" + arguments[i] + "</td>"; | |
} | |
txt += "<td> </td>"; | |
txt += "</tr>"; | |
// txt += "</tr></table>"; | |
txt += "<tr><th class='solClass2'> </th>" + | |
"<th class='solClass2'>大剣兵</th><th class='solClass2'>重盾兵</th><th class='solClass2'>矛槍兵</th><th class='solClass2'>弩兵</th>" + | |
"<th class='solClass2'>近衛騎兵</th><th class='solClass2'>投石機</th><th class='solClass2'>斥候騎兵</th><th class='solClass2'>武将</th>"+ | |
"</tr><tr><th class='solClass2'>兵士</th>"; | |
for(var i = 18 ; i<= 25 ; i++) { | |
txt += "<td>" + arguments[i] + "</td>"; | |
} | |
txt += "</tr><tr><th class='solClass2'>死傷</th>"; | |
for(var i = 27 ; i<= 34 ; i++) { | |
txt += "<td>" + arguments[i] + "</td>"; | |
} | |
txt += "</tr></table>"; | |
return txt; | |
} ); | |
reg = /剣兵\s+盾兵\s+槍兵\s+弓兵\s+騎兵\s+衝車\s+斥候.*(\n兵士\s+|\n)(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+).*\n.*大剣兵\s+重盾兵\s+矛槍兵\s+弩兵\s+近衛騎兵\s+投石機\s+斥候騎兵\s+武将.*(\n兵士\s+|\n)(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/g; | |
tmpHTML = tmpHTML.replace(reg , | |
function() { | |
var txt = "<table class='tables'><tr><th class='solClass2'> </th>" + | |
"<th class='solClass2'>剣兵</th><th class='solClass2'>盾兵</th><th class='solClass2'>槍兵</th><th class='solClass2'>弓兵</th>" + | |
"<th class='solClass2'>騎兵</th><th class='solClass2'>衝車</th><th class='solClass2'>斥候</th><th class='solClass2'> </th>" + | |
"</tr><tr><th class='solClass2'>兵士</th>"; | |
for(var i = 2 ; i<= 8 ; i++) { | |
txt += "<td>" + arguments[i] + "</td>"; | |
} | |
txt += "<td> </td>"; | |
txt += "</tr>"; | |
// txt += "</tr></table>"; | |
txt += "<tr><th class='solClass2'> </th>" + | |
"<th class='solClass2'>大剣兵</th><th class='solClass2'>重盾兵</th><th class='solClass2'>矛槍兵</th><th class='solClass2'>弩兵</th>" + | |
"<th class='solClass2'>近衛騎兵</th><th class='solClass2'>投石機</th><th class='solClass2'>斥候騎兵</th><th class='solClass2'>武将</th>"+ | |
"</tr><tr><th class='solClass2'>兵士</th>"; | |
for(var i = 10 ; i<= 17 ; i++) { | |
txt += "<td>" + arguments[i] + "</td>"; | |
} | |
txt += "</tr></table>"; | |
return txt; | |
} ); | |
elm.innerHTML = tmpHTML; | |
} | |
} | |
////////////////////// | |
//兵力合計 | |
////////////////////// | |
function disp_Details() | |
{ | |
if( location.pathname != "/alliance/detail.php" && location.pathname != "/report/detail.php") return ; | |
var tmp_x7 = document.evaluate('//div[@id="gray02Wrapper"]/table[@class="tables"]//tr[2]/td[1]',document,null,XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | |
if((tmp_x7.innerHTML.indexOf("ブショーデュエルで"))>0) return; //デュエルの結果ならおしまい。 | |
if((tmp_x7.innerHTML.indexOf("【拠点消滅】"))>0) return; //拠点消滅ならおしまい。 | |
if((tmp_x7.innerHTML.indexOf("【砦占領】"))>0) return; //砦占領ならおしまい。 | |
if((tmp_x7.innerHTML.indexOf("へ援軍が到着しました"))>0) return; //援軍ならおしまい。 | |
if((tmp_x7.innerHTML.indexOf("盟主に任命されました"))>0) return; | |
if((tmp_x7.innerHTML.indexOf("盟主補佐に任命されました"))>0) return; | |
if((tmp_x7.innerHTML.indexOf("軍師に任命されました"))>0) return; | |
if((tmp_x7.innerHTML.indexOf("大督に任命されました"))>0) return; | |
if((tmp_x7.innerHTML.indexOf("盟主に解任されました"))>0) return; | |
if((tmp_x7.innerHTML.indexOf("盟主補佐を解任されました"))>0) return; | |
if((tmp_x7.innerHTML.indexOf("盟主軍師を解任されました"))>0) return; | |
if((tmp_x7.innerHTML.indexOf("外交官を解任されました"))>0) return; | |
if((tmp_x7.innerHTML.indexOf("大督を解任されました"))>0) return; | |
if(tmp_x7.innerHTML.match(/【勢力情報】.*が.*の城を破壊しました/)) return; | |
var troops = [[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], | |
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]] ; | |
var tbls = $a("//table[@class=\"tables\"][@summary=\"防御者\"]"); | |
for(var i=0 ; i<tbls.length ; i++) { | |
var trs = $a("descendant::tr", tbls[i]); | |
if( trs.length >=7 ) { | |
for(var j=0; j < 2 ; j++) { | |
var tds = $a("descendant::td", trs[j+2]); | |
if(tds.length != 8) continue; | |
for(var k=0; k<7 ; k++) { | |
troops[j][k] += parseInt(tds[k].innerHTML,10); | |
} | |
} | |
for(var j=0; j < 2 ; j++) { | |
var tds = $a("descendant::td", trs[j+5]); | |
if(tds.length != 8) continue; | |
for(var k=0; k<8 ; k++) { | |
troops[j][k+7] += parseInt(tds[k].innerHTML,10); | |
} | |
} | |
} | |
} | |
var tbl = d.createElement("table"); | |
tbl.className = "tables"; | |
var tr = d.createElement("tr"); | |
var th = d.createElement("th"); | |
th.className = "attacker"; | |
th.appendChild(d.createTextNode("防御合計")); | |
tr.appendChild(th); | |
th = d.createElement("th"); | |
th.className = "attackerBase"; | |
th.setAttribute("colspan","8"); | |
tr.appendChild(th); | |
tbl.appendChild(tr); | |
var tr = d.createElement("tr"); | |
var thtxt = ["剣兵","盾兵","槍兵","弓兵","騎兵","衝車","斥候","大剣兵","重盾兵","矛槍兵","弩兵","近衛騎兵","投石機","斥候騎兵","武将" ]; | |
var th = d.createElement("th"); | |
th.className = "blank"; | |
tr.appendChild(th); | |
for(var i=0; i<7 ; i++){ | |
th = d.createElement("th"); | |
th.className = "solClass2"; | |
th.appendChild(d.createTextNode(thtxt[i])); | |
tr.appendChild(th); | |
} | |
th = d.createElement("th"); | |
th.className = "solClass2"; | |
th.appendChild(d.createTextNode(" ")); | |
tr.appendChild(th); | |
tbl.appendChild(tr); | |
var hd =["兵士","死傷"]; | |
for(var i=0 ; i<2 ; i++) { | |
var tr = d.createElement("tr"); | |
var th = d.createElement("th"); | |
th.className = "blank"; | |
th.appendChild(d.createTextNode(hd[i])); | |
tr.appendChild(th); | |
for(var j=0; j<7 ; j++){ | |
var td = d.createElement("td"); | |
td.appendChild(d.createTextNode(troops[i][j])); | |
tr.appendChild(td); | |
} | |
var td = d.createElement("td"); | |
td.appendChild(d.createTextNode(" ")); | |
tr.appendChild(td); | |
tbl.appendChild(tr); | |
} | |
tr = d.createElement("tr"); | |
th = d.createElement("th"); | |
th.className = "blank"; | |
tr.appendChild(th); | |
for(var i=7; i<15 ; i++){ | |
th = d.createElement("th"); | |
th.className = "solClass2"; | |
th.appendChild(d.createTextNode(thtxt[i])); | |
tr.appendChild(th); | |
} | |
tbl.appendChild(tr); | |
var hd =["兵士","死傷"]; | |
for(var i=0 ; i<2 ; i++) { | |
var tr = d.createElement("tr"); | |
var th = d.createElement("th"); | |
th.className = "blank"; | |
th.appendChild(d.createTextNode(hd[i])); | |
tr.appendChild(th); | |
for(var j=7; j<15 ; j++){ | |
var td = d.createElement("td"); | |
td.appendChild(d.createTextNode(troops[i][j])); | |
tr.appendChild(td); | |
} | |
tbl.appendChild(tr); | |
} | |
tbls[0].parentNode.insertBefore(tbl, tbls[0]); | |
} | |
////////////////////// | |
//デッキ | |
////////////////////// | |
function disp_Deck() | |
{ | |
if( location.pathname != "/card/deck.php" ) return ; | |
if( OPT_DECK_SET ) dispDeckSet(); | |
function dispDeckSet() { | |
var nam = cgetCurrentBaseName(); | |
var sels = $a("//select",d); | |
for(var i=0 ; i<sels.length ; i++) { | |
if( !sels[i].id.match(/selected_village_/) ) continue; | |
var opts = $a("descendant::option",sels[i]); | |
for(var j=0 ; j<opts.length ; j++) { | |
if(opts[j].innerHTML == nam ) { | |
opts[j].selected = true; | |
} | |
} | |
} | |
} | |
} | |
////////////////////// | |
//完了時刻の表示(建物) | |
////////////////////// | |
function disp_CompleteTimeBuild() | |
{ | |
var lastTime = cgetNow(); | |
var villageId = cgetCurrentVillageId(); | |
if( location.pathname == "/village.php" ) { | |
//最終建築時間の保存 | |
var spans = $a('id("actionLog")//li//span[@class="buildStatus" and (contains(text(),"建設中") or contains(text(),"建設準備中"))]/../span[@class="buildClock"]'); | |
if (!spans || spans.length == 0) { | |
cdelData("lastBuildTime"+villageId,true); | |
return; | |
} | |
var saveDate = new Date(caddDate(lastTime, spans[spans.length - 1].innerHTML.replace(/^[\s| ]*|[\s| ]*$/,"")).replace(/-/g,"/")); | |
saveDate.setMinutes(saveDate.getMinutes() + 1); | |
csaveData( "lastBuildTime"+villageId, saveDate.toString(), true); | |
return; | |
} | |
var reg = /\/facility\/facility.php|\/facility\/select_facility.php|\/facility\/castle.php/; | |
if(!location.pathname.match(reg) || d.referrer.match(reg)) { | |
return; | |
} | |
var spans = new Array(); | |
var tds = $a('id("gray02Wrapper")//th[contains(text(),"所要時間")]//..//td[@class="contents"]'); | |
for(var i=0 ; i<tds.length ; i++){ | |
var td = tds[i]; | |
var th = $x('.//th[contains(text(),"建設に必要な食糧消費量") or contains(text(),"建設に必要な資材")]', td.parentNode.parentNode); | |
if (th) { | |
var span = d.createElement("span"); | |
td.appendChild(span); | |
spans.push(span); | |
} | |
} | |
if (!spans.length) return; | |
lastTime = new Date(cloadData( "lastBuildTime"+villageId, lastTime.toString(), true)); | |
timerfunc(); | |
function timerfunc() { | |
var now = cgetNow(); | |
if (lastTime < now) { | |
lastTime = now; | |
} | |
for(var i = 0 ; i<spans.length ; i++){ | |
var span = spans[i]; | |
var ctime = caddDate(lastTime, span.parentNode.firstChild.nodeValue); | |
if( ctime ) { | |
span.innerHTML = " (" + ctime + "完了)"; | |
} | |
} | |
setTimeout(timerfunc,1000); | |
} | |
} | |
////////////////////// | |
//完了時刻の表示(ユニット) | |
////////////////////// | |
function disp_CompleteTimeUnit() | |
{ | |
if( location.pathname == "/facility/facility.php" ) { | |
//ユニット作成の最終時刻の保存 | |
var lastTd = $x('id("gray02Wrapper")/table[@class="commonTables"][2]//tr[last()]/td'); | |
if( !lastTd ) { | |
cdelData("lastUnitTime",true); | |
return; | |
} | |
csaveData( "lastUnitTime", new Date(lastTd.innerHTML.replace(/^[\s|\n|\r|\t]*|[\s|\n|\r|\t]*$/,"").replace(/-/g,"/")).toString(), true); | |
return; | |
} | |
if( location.pathname != "/facility/unit_confirm.php" ) { | |
return; | |
} | |
var td = $x('//table[@class="commonTables" and @summary="object"]//th[contains(text(),"作成するまでに必要な時間")]/../td'); | |
if (!td) {alert("ret");return;} | |
var span = d.createElement("span"); | |
td.appendChild(span); | |
var lastTime = new Date(cloadData( "lastUnitTime", null, true )); | |
timerfunc(); | |
function timerfunc() { | |
var now = cgetNow(); | |
if (lastTime < now) { | |
lastTime = now; | |
} | |
var ctime = caddDate(lastTime, span.parentNode.firstChild.nodeValue.replace(/^\s+|\s+$/g, "")); | |
if( ctime ) { | |
span.innerHTML = " (" + ctime + "完了)"; | |
} | |
setTimeout( timerfunc, 1000); | |
} | |
} | |
////////////////////// | |
//同盟表示の改善 | |
////////////////////// | |
function disp_AllianceInfo() | |
{ | |
if( OPT_ALLY_XY ) allianceXY(); | |
if( OPT_ALLY_IS ) allianceSort(); | |
if( OPT_ALLY_CSV ) allianceCSV(); | |
//同盟表示のソート | |
function allianceSort() | |
{ | |
if( location.pathname != "/alliance/info.php" ) return; | |
var sort_kind, sort_order; | |
var sort_list = ["num", "str", "num", "num", "num", "str", "str"]; | |
for(var i=0 ; i<8 ; i++) { | |
var th = $x("//table[@summary=\"ランキング\"]//tr[2]//th[" + (i+1) + "]"); | |
if( th ) { | |
sort_kind = sort_list[i]; | |
if( th.id == "beyond_ally_xy" ) sort_kind = "xy"; | |
th.appendChild(d.createElement("br")); | |
var a = d.createElement("a"); | |
a.href = "javascript:void(0)"; | |
(function(n, k){ | |
$e(a, "click", function(){row_sort(n, k, "asc"); } ); | |
})(i+1, sort_kind); | |
var img = d.createElement("img"); | |
img.src= IMG_DIR + "trade/icon_up.gif"; | |
img.alt = "昇順に並べ替え"; | |
img.title = img.alt; | |
a.appendChild(img); | |
th.appendChild(a); | |
th.appendChild(d.createTextNode(" ")); | |
a = d.createElement("a"); | |
a.href = "javascript:void(0)"; | |
(function(n, k){ | |
$e(a, "click", function(){row_sort(n, k, "dsc"); } ); | |
})(i+1, sort_kind); | |
img = d.createElement("img"); | |
img.src= IMG_DIR + "trade/icon_down.gif"; | |
img.alt = "降順に並べ替え"; | |
img.title = img.alt; | |
a.appendChild(img); | |
th.appendChild(a); | |
} | |
} | |
function row_sort(col, kind, order) { | |
var tbl = $x("//table[@summary=\"ランキング\"]"); | |
var trs = $a("descendant::tr[position()>2]", tbl); | |
sort_kind = kind; | |
sort_order = order; | |
var strs = new Array(); | |
if( col == 2 || kind == "xy" ) { | |
//名前 or座標はaの下 | |
for(var i=0; i<trs.length ; i++) { | |
var td = $x("descendant::td[" + col + "]", trs[i]); | |
var a = $x("descendant::a", td); | |
if( a ) strs.push({"node":trs[i], "value":a.innerHTML}); | |
else strs.push({"node":trs[i], "value":""}); | |
} | |
} else { | |
for(var i=0; i<trs.length ; i++) { | |
var td = $x("descendant::td[" + col + "]", trs[i]); | |
strs.push({"node":trs[i], "value":td.innerHTML}); | |
} | |
} | |
strs.sort(row_cmp); | |
for(var i=0 ; i<trs.length ; i++) { | |
strs[i].node.parentNode.removeChild(strs[i].node); | |
tbl.appendChild(strs[i].node); | |
} | |
} | |
function row_cmp(a, b) | |
{ | |
var ret = 0; | |
if( sort_kind == "num" ){ | |
ret = parseInt(a.value, 10) - parseInt(b.value, 10); | |
}else if (sort_kind == "xy") { | |
//座標 | |
if( !a.value && !b.value ) ret = 0; | |
else if( !a.value ) ret = 1; | |
else if( !b.value ) ret = -1; | |
else { | |
var a_xy = a.value.split(","); | |
var b_xy = b.value.split(","); | |
ret = ( Math.pow(parseInt(a_xy[0], 10), 2) + Math.pow(parseInt(a_xy[1], 10), 2) ) - | |
( Math.pow(parseInt(b_xy[0], 10), 2) + Math.pow(parseInt(b_xy[1], 10), 2) ); | |
} | |
}else { | |
if( a.value == b.value ) { | |
ret = 0; | |
} else if( a.value > b.value ) { | |
ret = 1; | |
}else { | |
ret = -1; | |
} | |
} | |
if( sort_order == "dsc") { | |
ret = 0 - ret; | |
} | |
return ret; | |
} | |
} | |
//同盟員座標表示 | |
function allianceXY() | |
{ | |
//座標の収集 | |
if( location.pathname =="/user/" ) { | |
if( USER_ID || URLPARAM.user_id ) { | |
var uid, aid; | |
if( URL_PARAM.user_id ) uid = URL_PARAM.user_id; | |
else uid = USER_ID; | |
var allytd = $x("//table[@class=\"commonTables\"]//tr[3]//td[4]"); | |
if( !allytd ) return; | |
var aids = allytd.innerHTML.match(/\/alliance\/info\.php\?id\=(\d+)/); | |
if( !aids ) return; | |
aid = aids[1]; | |
var table = $x("//table[@class=\"commonTables\"]"); | |
if( table ) { | |
var xy = getXYfromUserHTML(table.innerHTML); | |
if( xy ) { | |
csetUserXY(aid, uid, xy.x, xy.y); | |
} | |
} | |
} | |
} | |
//表示 | |
if( location.pathname == "/alliance/info.php" ) { | |
if( ALLY_ID || URL_PARAM.id ) { | |
var aid; | |
if( URL_PARAM.id ) aid = URL_PARAM.id; | |
else aid = ALLY_ID; | |
var head1 = $x("//table[@summary=\"ランキング\"]//tr[1]//th[@class=\"ttl\"]"); | |
if( head1 ) { | |
head1.setAttribute("colspan", parseInt(head1.getAttribute("colspan"),10) + 1 + ""); | |
} | |
var head2 = $x("//table[@summary=\"ランキング\"]//tr[2]"); | |
if( head2 ) { | |
var th = d.createElement("th"); | |
th.className = "all"; | |
th.style.width = "110px"; | |
th.id = "beyond_ally_xy"; | |
th.innerHTML = "座標"; | |
var lnk = d.createElement("a"); | |
lnk.href = "javascript:void(0)"; | |
lnk.innerHTML ="(GET)";//faraway110518ここが同盟の場所 | |
lnk.style.fontSize = "9px"; | |
var running = false; | |
$e(lnk, "click", function() { | |
if( running ) return ; | |
if( confirm("同盟員の情報を一気に取得するためサーバに負荷をかけます。\n何度も実行するとDOS攻撃と同じなので、実行には注意して下さい") == false ) return; | |
running = true; | |
var trs = $a("//table[@summary=\"ランキング\"]//tr[position()>2]"); | |
var now_num = 0; | |
var all_num = trs.length; | |
window.setTimeout(timerFunc, 0); | |
function timerFunc() | |
{ | |
var idtd = $x("descendant::td[2]",trs[now_num]); | |
if( !idtd ) { | |
alert("ページフォーマットが変わったみたい"); | |
return ; | |
} | |
var ids = idtd.innerHTML.match(/\/user\/\?user_id\=(\d+)/); | |
if( !ids ) { | |
alert("ページフォーマットが変わったみたい"); | |
return ; | |
} | |
var tmp = $("beyond_xylink_" + ids[1] ); | |
if( tmp.innerHTML != " " ) { | |
now_num ++; | |
if( now_num < all_num ) { | |
window.setTimeout(timerFunc, 0); | |
}else{ | |
running = false; | |
alert("全ての座標を取得しました"); | |
} | |
return ; | |
} | |
cajaxRequest("/user/?user_id=" + ids[1], "GET", "", function(req) { | |
var xytd = $("beyond_xylink_" + ids[1] ); | |
if(xytd) { | |
var xy = getXYfromUserHTML(req.responseText); | |
if( xy ) { | |
csetUserXY(aid, ids[1], xy.x, xy.y); | |
xytd.innerHTML = cgetXYHtml(xy.x, xy.y ); | |
} | |
} | |
now_num ++; | |
if( now_num < all_num ) { | |
window.setTimeout(timerFunc, 0); | |
}else{ | |
running = false; | |
alert("全ての座標を取得しました"); | |
} | |
}); | |
} | |
}); | |
th.appendChild(lnk); | |
head2.appendChild(th); | |
} | |
var trs = $a("//table[@summary=\"ランキング\"]//tr[position()>2]"); | |
var xylists = cloadData( "allyXYList" + aid, "[]", true, true ); | |
//ハッシュに書き換え | |
var xylist = new Array(); | |
for(var i=0 ; i<xylists.length ; i++) { | |
xylist["id" + xylists[i].id ] = {"x":xylists[i].x, "y":xylists[i].y}; | |
if( xylist["id" + xylists[i].id].x == null ) xylist["id" + xylists[i].id].x = 0; | |
if( xylist["id" + xylists[i].id].y == null ) xylist["id" + xylists[i].id].y = 0; | |
} | |
for(var i=0; i<trs.length ; i++) { | |
var idtd = $x("descendant::td[2]",trs[i]); | |
if( !idtd ) continue; | |
var ids = idtd.innerHTML.match(/\/user\/\?user_id\=(\d+)/); | |
if( !ids ) continue; | |
var td = d.createElement("td"); | |
td.id = "beyond_xylink_" + ids[1]; | |
if( xylist["id" + ids[1] ] ) { | |
td.innerHTML = cgetXYHtml(xylist["id" + ids[1] ].x, xylist["id" + ids[1] ].y); | |
}else{ | |
td.innerHTML =" "; | |
} | |
trs[i].appendChild(td); | |
var yaku = $x("descendant::td[7]",trs[i]); | |
if( yaku.innerHTML.match(/盟主補佐/) ) { | |
//盟主補佐がぎりぎり2行になるので後ろの空白カット | |
yaku.innerHTML = yaku.innerHTML.replace(/[ \t\r\n]+$/g, ""); | |
} | |
} | |
} | |
} | |
} | |
function getXYfromUserHTML(html) | |
{ | |
var xy = html.match(/<\/a>\n\(本拠地\)\t+<\/td>[^<]*<td[^>]*>([\-0-9]+),([\-0-9]+)<\/td>/); | |
if( xy ) { | |
return {"x":parseInt(xy[1],10),"y":parseInt(xy[2],10)}; | |
} | |
return null; | |
} | |
function getDatafromUserHTML(html) | |
{ | |
var ret = []; | |
var tmp = html.match(/<td[^>]*>ランク<\/td>[^<]*<td[^>]*>([0-9]+)<\/td>/); | |
if( !tmp ) return null; | |
ret["all_rank"] = parseInt(tmp[1] ,10); | |
tmp = html.match(/<td[^>]*>総合<\/td>[^<]*<td[^>]*>([0-9]+)<\/td>/); | |
if( !tmp ) return null; | |
ret["all_point"] = parseInt(tmp[1] ,10); | |
tmp = html.match(/<td[^>]*>総人口<\/td>[^<]*<td[^>]*>([0-9]+)<\/td>/); | |
if( !tmp ) return null; | |
ret["jinko"] = parseInt(tmp[1] ,10); | |
tmp = html.match(/<td[^>]*>攻撃<\/td>[^<]*<td[^>]*>([0-9]+)<\/td>/); | |
if( !tmp ) return null; | |
ret["attack"] = parseInt(tmp[1] ,10); | |
tmp = html.match(/<td[^>]*>防御<\/td>[^<]*<td[^>]*>([0-9]+)<\/td>/); | |
if( !tmp ) return null; | |
ret["defence"] = parseInt(tmp[1] ,10); | |
tmp = html.match(/<td[^>]*>撃破スコア<\/td>[^<]*<td[^>]*>([0-9]+)<\/td>/); | |
if( !tmp ) return null; | |
ret["attack_score"] = parseInt(tmp[1] ,10); | |
tmp = html.match(/<td[^>]*>防衛スコア<\/td>[^<]*<td[^>]*>([0-9]+)<\/td>/); | |
if( !tmp ) return null; | |
ret["defence_score"] = parseInt(tmp[1] ,10); | |
tmp = html.match(/<\/a>\n\(本拠地\)\t+<\/td>[^<]*<td[^>]*>([\-0-9]+),([\-0-9]+)<\/td>/); | |
if ( !tmp ) return null; | |
ret["x"] = parseInt(tmp[1],10); | |
ret["y"] = parseInt(tmp[2],10); | |
return ret; | |
} | |
function getXYListfromUserHTML(html) | |
{ | |
var ret = new Array(); | |
var tmp = html.match(/<td[^>]*>君主<\/td>[^<]*<td[^>]*>([^<\s]+)/); | |
if( !tmp ) return null; | |
var user_name = tmp[1]; | |
tmp = html.match(/<td[^>]*>同盟<\/td>[^<]*<td[^>]*><a href="[^"]*">([^<]+)<\/a><\/td>/); | |
if( !tmp ) return; | |
var ally_name = tmp[1]; | |
var pos; | |
var reg = /<a href="\.\.\/(?:land|village_change)\.php[^"]*">\s*([^<\s]+)\s*<\/a>[^<]*<\/td>[^<]*<td[^>]*>([\-0-9]+),([\-0-9]+)<\/td>[^<]*<td[^>]*>([0-9]+| )<\/td>/; | |
var honkyo = 1; | |
while((pos = html.search(reg) ) != -1 ) { | |
html = html.substr(pos); | |
var dat = html.match(reg); | |
if( !dat ) break; | |
if( dat[4] == " " ) dat[4] = ""; | |
ret.push({"user_name":user_name, "ally_name":ally_name, "area_name":dat[1].replace(/(^\s+|\s+$)/g, ""), "x":dat[2], "y":dat[3], "jinko":dat[4], "honkyo":honkyo}); | |
honkyo=""; | |
html = html.substr(dat[0].length); | |
} | |
return ret; | |
} | |
function allianceCSV() | |
{ | |
if( location.pathname != "/alliance/info.php" ) return; | |
var aid; | |
if( URL_PARAM.id ) aid = URL_PARAM.id; | |
else aid = ALLY_ID; | |
//CSV出力用 | |
var tbl = $x("//table[@summary=\"ランキング\"]"); | |
if( !tbl ) return; | |
var lnk = d.createElement("a"); | |
lnk.href = "javascript:void(0)"; | |
lnk.innerHTML ="同盟員詳細情報csv"; | |
tbl.parentNode.insertBefore(lnk, tbl.nextSibling); | |
$e(lnk, "click", function() { | |
if( $("beyond_csvWindow") ) return; | |
if( confirm("同盟員の情報を一気に取得するためサーバに負荷をかけます。\n何度も実行するとDOS攻撃と同じなので、実行には注意して下さい") == false ) return; | |
//窓作成 | |
var elm_xy = cgetElementXY( this ); | |
var yy = elm_xy.y - 420; | |
if( yy < 0 ) yy = 0; | |
createCSVWindow(10, yy); | |
var trs = $a("//table[@summary=\"ランキング\"]//tr[position()>2]"); | |
var elm_msg = $("beyond_csvWindow_message"); | |
if( !elm_msg ) return; | |
var elm_csv = $("beyond_csvWindow_csv"); | |
if( !elm_csv ) return; | |
var now_num = 0; | |
var all_num = trs.length; | |
if( all_num == 0 ) return; | |
var csv_txt = "同盟内ランク\tuser_id\t名前\t同盟内point\t寄付\t拠点\t全体ランク\t全体point\t人口\t攻撃\t防御\t撃破スコア\t防御スコア\t本拠X座標\t本拠Y座標\n"; | |
window.setTimeout(timerFunc ,0 ); | |
function timerFunc() | |
{ | |
if( !$("beyond_csvWindow") ) return; | |
var tds = $a("descendant::td",trs[now_num]); | |
if( tds.length < 5 ) { | |
alert("ページフォーマットが変わったみたい"); | |
return ; | |
} | |
var ids = tds[1].innerHTML.match(/\/user\/\?user_id\=(\d+).*\">(.+)<\/a>/); | |
if( !ids ) { | |
alert("ページフォーマットが変わったみたい"); | |
return ; | |
} | |
var uid = parseInt(ids[1], 10); | |
cajaxRequest("/user/?user_id=" + uid, "GET", "", function(req) { | |
var dt = getDatafromUserHTML(req.responseText); | |
if( dt ) { | |
csv_txt += parseInt(tds[0].innerHTML, 10) + "\t"; | |
csv_txt += uid + "\t"; | |
csv_txt += ids[2] + "\t"; | |
csv_txt += parseInt(tds[2].innerHTML, 10) + "\t"; | |
csv_txt += parseInt(tds[3].innerHTML, 10) + "\t"; | |
csv_txt += parseInt(tds[4].innerHTML, 10) + "\t"; | |
csv_txt += dt.all_rank + "\t"; | |
csv_txt += dt.all_point + "\t"; | |
csv_txt += dt.jinko + "\t"; | |
csv_txt += dt.attack + "\t"; | |
csv_txt += dt.defence + "\t"; | |
csv_txt += dt.attack_score + "\t"; | |
csv_txt += dt.defence_score + "\t"; | |
csv_txt += dt.x + "\t"; | |
csv_txt += dt.y + "\n"; | |
var xytd = $("beyond_xylink_" + uid ); | |
if(xytd) { | |
csetUserXY(aid, uid, dt.x, dt.y); | |
xytd.innerHTML = cgetXYHtml(dt.x, dt.y ); | |
} | |
now_num ++; | |
elm_msg.innerHTML = "取得中... ( " + now_num + " / " + all_num + " )"; | |
if( now_num < all_num ) { | |
window.setTimeout(timerFunc, 0); | |
}else{ | |
elm_msg.innerHTML += ".. 完了しました。CTRL + A → CTRL + Cでコピーし、Excelなどに貼りつけてください"; | |
elm_csv.value = csv_txt; | |
elm_csv.focus(); | |
} | |
} else { | |
alert("user_id="+uid+"の取得に失敗しました" ); | |
now_num ++; | |
elm_msg.innerHTML = "取得中... ( " + now_num + " / " + all_num + " )"; | |
if( now_num < all_num ) { | |
window.setTimeout(timerFunc, 0); | |
}else{ | |
elm_msg.innerHTML += ".. 完了しました。CTRL + A → CTRL + Cでコピーし、Excelなどに貼りつけてください"; | |
elm_csv.value = csv_txt; | |
elm_csv.focus(); | |
} | |
} | |
}, function(req){ | |
alert("サーバからエラーが返りましたよ" ); | |
}); | |
} | |
}); | |
var lnk2 = d.createElement("a"); | |
lnk2.href = "javascript:void(0)"; | |
lnk2.innerHTML ="同盟員全領地座標csv"; | |
tbl.parentNode.insertBefore(lnk2, lnk.nextSibling); | |
tbl.parentNode.insertBefore(d.createTextNode(" "), lnk2); | |
$e(lnk2, "click", function() { | |
if( $("beyond_csvWindow") ) return; | |
if( confirm("同盟員の情報を一気に取得するためサーバに負荷をかけます。\n何度も実行するとDOS攻撃と同じなので、実行には注意して下さい") == false ) return; | |
if( navigator.userAgent.toLowerCase().indexOf('chrome') == -1 ) { | |
if( confirm("終盤の巨大同盟だと、CTRL+AやCTRL+Cの操作で10分くらい掛かります。\nChromeだとそんなに時間掛からないみたいです。続けますか?") == false ) return; | |
} | |
//窓作成 | |
var elm_xy = cgetElementXY( this ); | |
var yy = elm_xy.y - 420; | |
if( yy < 0 ) yy = 0; | |
createCSVWindow(10, yy); | |
var trs = $a("//table[@summary=\"ランキング\"]//tr[position()>2]"); | |
var elm_msg = $("beyond_csvWindow_message"); | |
if( !elm_msg ) return; | |
var elm_csv = $("beyond_csvWindow_csv"); | |
if( !elm_csv ) return; | |
var now_num = 0; | |
var all_num = trs.length; | |
if( all_num == 0 ) return; | |
var csv_txt = "同盟\t君主\t領地名\tX\tY\t人口\t本拠\n"; | |
window.setTimeout(timerFunc ,0 ); | |
function timerFunc() | |
{ | |
if( !$("beyond_csvWindow") ) return; | |
var tds = $a("descendant::td",trs[now_num]); | |
if( tds.length < 5 ) { | |
alert("ページフォーマットが変わったみたい"); | |
return ; | |
} | |
var ids = tds[1].innerHTML.match(/\/user\/\?user_id\=(\d+).*\">(.+)<\/a>/); | |
if( !ids ) { | |
alert("ページフォーマットが変わったみたい"); | |
return ; | |
} | |
var uid = parseInt(ids[1], 10); | |
cajaxRequest("/user/?user_id=" + uid, "GET", "", function(req) { | |
var dt = getXYListfromUserHTML(req.responseText); | |
if( dt ) { | |
for(var i=0 ; i<dt.length ; i++) { | |
csv_txt += dt[i].ally_name + "\t"; | |
csv_txt += dt[i].user_name + "\t"; | |
csv_txt += dt[i].area_name + "\t"; | |
csv_txt += dt[i].x + "\t"; | |
csv_txt += dt[i].y + "\t"; | |
csv_txt += dt[i].jinko + "\t"; | |
csv_txt += dt[i].honkyo + "\n"; | |
} | |
now_num ++; | |
elm_msg.innerHTML = "取得中... ( " + now_num + " / " + all_num + " )"; | |
if( now_num < all_num ) { | |
window.setTimeout(timerFunc, 0); | |
}else{ | |
elm_msg.innerHTML += ".. 完了しました。CTRL + A → CTRL + Cでコピーし、Excelなどに貼りつけてください"; | |
elm_csv.value = csv_txt; | |
elm_csv.focus(); | |
} | |
} else { | |
alert("取得に失敗しました" ); | |
} | |
}, function(req){ | |
alert("サーバからエラーが返りましたよ" ); | |
}); | |
} | |
}); | |
function createCSVWindow(x, y) | |
{ | |
var cc = $("beyond_csvWindow"); | |
if( cc ) cc.parentNode.removeChild(cc); | |
cc = d.createElement("div"); | |
cc.id = "beyond_csvWindow"; | |
cc.style.left = x + "px"; | |
cc.style.top = y + "px"; | |
cc.style.position = "absolute"; | |
cc.style.backgroundColor = "lightgray"; | |
cc.style.border = "outset 2px lightgray"; | |
cc.style.fontSize = "12px"; | |
cc.style.padding = "15px"; | |
cc.style.zIndex = 1000; | |
cc.style.padding = "10px"; | |
var dv = d.createElement("div"); | |
dv.id = "beyond_csvWindow_message"; | |
cc.appendChild(dv); | |
var tx = d.createElement("textarea"); | |
tx.id = "beyond_csvWindow_csv"; | |
tx.rows = 25; | |
tx.cols = 140; | |
tx.style.overflow = "scroll"; | |
cc.appendChild(tx); | |
cc.appendChild(d.createElement("br") ); | |
ccreateButton(cc, "閉じる", "", function(){ | |
var cc = $("beyond_csvWindow"); | |
if( cc ) cc.parentNode.removeChild(cc); | |
}); | |
$("beyond_floatpanel").appendChild(cc); | |
} | |
} | |
} | |
////////////////////// | |
//資源の合計 | |
////////////////////// | |
function disp_ResourcesTotal(){ | |
var white_all = RES_GROW_W.wood + RES_GROW_W.stone + RES_GROW_W.iron + RES_GROW_W.rice; | |
var blue_all = RES_GROW_B.wood + RES_GROW_B.stone + RES_GROW_B.iron + RES_GROW_B.rice; | |
var all_all = RES_GROW.wood + RES_GROW.stone + RES_GROW.iron + RES_GROW.rice; | |
var box = $x('id("sidebar")//span[@class="increase" or @class="resource"]/../.. | id("status_left")//p[@class="status_bottom"]'); | |
if( !box ) return; | |
var txt = d.createTextNode("合計 " + white_all); | |
var sp = d.createElement("span"); | |
sp.className = "increase"; | |
sp.appendChild(d.createTextNode(" +" + blue_all) ); | |
var item = txt; | |
var addSpDoc = box; | |
if (!isNarrow) { | |
item = d.createElement("li"); | |
item.appendChild(txt); | |
item.title = "総合計 " + all_all; | |
addSpDoc = item; | |
} | |
box.appendChild(item); | |
addSpDoc.appendChild(sp); | |
} | |
////////////////////// | |
//建設/破棄一覧 | |
////////////////////// | |
function disp_RemoveList(){ | |
var img_x = 'data:image/gif;base64,'+ | |
'R0lGODlhPAA8AIAAAP/MM////yH5BAUUAAEALAAAAAA8ADwAAAJ4jI+py+0Po5y02ouz3rz7D4bi'+'SJbmiabqyrbuC8fyTNf2jef6zvf+DQgGJwCV8PgQro7IRXPJLCqerGjCCmMaotIsVzv7KmtiHNd8'+ | |
'tpVp4nEsDX6lt+7W/EBNfRl1PZY/ZPTXEOjXR1iIcuiQ+OP4CBkpOUlZWVMAADs='; | |
var img_m = 'data:image/gif;base64,'+ | |
'R0lGODlhPAA8AIAAAP/MM////yH5BAUUAAEALAAAAAA8ADwAAAKpjI+py+0Po5y02ouz3rz7D4bi'+'SJbmiabqyrbuC8fyTNf2jef6zvc5AAwKacJiMTZcJFnLRvP0dAZT0wOQcQ1UTVkrAPs1dElbcVjR'+ | |
'LYuuxmGbfV7D31q6+jM2582JvSdvhBZXRxYHR4gAOIh3luWIqFj4lWYYNnbHKJhoWckVqdToB/Kp'+'yQd1uVjHmSrnmNq24saqOlsSpVd7+nbbspvrAxwsPExcbBxQAAA7'; | |
var img_t = 'data:image/gif;base64,'+ | |
'R0lGODlhPAA8AIAAAP/MM////yH5BAUUAAEALAAAAAA8ADwAAAKnjI+py+0Po5y02ouz3rz7D4bi'+'SJbmiabqyrbuC8fyTNf2jef6zvc5AAwKacJiMTZcJFnLAxDRPA2fTkAiSgpWoVaFVto1JI1ccDhA'+ | |
'FR+rZ1Hamka3y9m3XBu/5j9x8j265/HW5EfnFhYIkcgxaOTYNydI9UjJVrL39bDYkfn3yBUJ0kh5'+'tikJh6qEaHraRYrKyof32qmCpRZbR0tU6eP7CxwsPEz8UAAAOw=='; | |
var img_lup = 'data:image/gif;base64,'+ | |
'R0lGODlhPAA8AIAAAP/MM////yH5BAUUAAEALAAAAAA8ADwAAAKfjI+py+0Po5y02ouz3rz7D4bi'+'SJbmiabqyrbuC8fyTNf2jef6zvc9APgBg7rhMGc03o7AwJH2bDqlsef0YH1Rr1iiaqsAJ8SfbNi7'+ | |
'MJfRafaZRK7EOVtw867kiups/DTq5mFlF+SHFyjoRXiVpDcCOFYo2YW4ZqAkyaRYuZZZ+Of3l5IH'+'QYpiyoA6qnbJ+pUEO7cS6+pje4ubq7vLi1AAADs='; | |
if( location.pathname == "/land.php" && URL_PARAM.x && URL_PARAM.y ) { | |
var rmtime = d.body.innerHTML.match(/(現在領地を破棄中です|現在村を建設中です|現在砦を建設中です)[^\d]*\n(\d+-\d+-\d+ \d+:\d+:\d+)/ ); | |
if( rmtime ) { | |
if( rmtime[1] == "現在領地を破棄中です" ) { | |
addTerritoryList(rmtime[2], 0, URL_PARAM.x, URL_PARAM.y ); | |
}else if( rmtime[1] == "現在村を建設中です" ) { | |
addTerritoryList(rmtime[2], 3, URL_PARAM.x, URL_PARAM.y ); | |
}else if( rmtime[1] == "現在砦を建設中です" ) { | |
addTerritoryList(rmtime[2], 4, URL_PARAM.x, URL_PARAM.y ); | |
} | |
}else{ | |
rmtime = d.body.innerHTML.match(/現在領地をレベルアップ中です[^\d]*\n(\d+-\d+-\d+ \d+:\d+:\d+)に完了します。/ ); | |
if( rmtime ) { | |
addTerritoryList(rmtime[1], 5, URL_PARAM.x, URL_PARAM.y ); | |
}else { | |
delTerritoryList(0, URL_PARAM.x, URL_PARAM.y); | |
} | |
} | |
} | |
if( location.pathname == "/facility/castle.php" ) { | |
var xy = cgetCurrentBaseXY(); | |
var rmtime = d.body.innerHTML.match(/(村を削除中です。|砦を削除中です。)[^\d]*(\d+-\d+-\d+ \d+:\d+:\d+)に完了します。/); | |
if( rmtime ) { | |
if( rmtime[1] == "村を削除中です。" ) { | |
addTerritoryList(rmtime[2], 1, xy.x, xy.y ); | |
}else if( rmtime[1] == "砦を削除中です。" ) { | |
addTerritoryList(rmtime[2], 2, xy.x, xy.y ); | |
} | |
}else{ | |
delTerritoryList(1,xy.x, xy.y); | |
} | |
} | |
if( location.pathname == "/map.php" ) { | |
//地図に表示 | |
var type = 1; | |
//地図51×51対応 | |
if( $x("//div[@id=\"change-map-scale\"]/ul/li[@class=\"sort15 now\"]") ) type=2; | |
else if( $x("//div[@id=\"change-map-scale\"]/ul/li[@class=\"sort21 now\"]") ) type=5; | |
else if( $x("//div[@id=\"change-map-scale\"]/ul/li[@class=\"sort51 now\"]") ) type=4; | |
var lists = cloadData("RemoveList", "[]", true, true); | |
lists = checkList(lists); //時間を過ぎたものを削除 | |
if( lists.length ) { | |
var cx = parseInt(URL_PARAM.x,10); | |
var cy = parseInt(URL_PARAM.y,10); | |
if( cx > MAP_X_MAX ) cx = MAP_X_MAX; | |
if( cx < MAP_X_MIN ) cx = MAP_X_MIN; | |
if( cy > MAP_Y_MAX ) cy = MAP_Y_MAX; | |
if( cy < MAP_Y_MIN ) cy = MAP_Y_MIN; | |
var map = $x("//div[@id=\"mapsAll\"]"); | |
for(var i=0 ; i<lists.length ; i++) { | |
var no = cgetMapNofromXY(lists[i].x, lists[i].y, cx, cy, type ); | |
if( !no ) continue; | |
var img_src; | |
if( lists[i].kind == 3) img_src = img_m; | |
else if(lists[i].kind == 4 ) img_src = img_t; | |
else if(lists[i].kind == 5 ) img_src = img_lup; | |
else img_src = img_x; | |
var img = document.createElement("img"); | |
img.className = "mapAll" + no; | |
img.src = img_src; | |
map.appendChild(img); | |
} | |
} | |
} | |
//パネルに表示 | |
var icon_rl = 'data:image/gif;base64,'+ | |
'R0lGODlhEQAPALMAAAD/ANO3SQbOKKyTQxqvSjKgYAivNwCZAHdrPBVwFVNTUS1NLTMzMwAAAAAA'+'AAAAACH5BAQUAP8ALAAAAAARAA8AAARKkMlJq50npzuXAKDALYsBnoBhHWgrVmyLIkOgSIl8Bnww'+ | |
'TDpCr3djfHbD4Y9hOhWSQ8kC9YTyEFKBwICw9i5WLKfWW3IYNISYEgEAOw=='; | |
var elms = ccreateSideBox("beyond_sidebox_removelist", icon_rl, "建設/破棄リスト"); | |
var lists = cloadData("RemoveList", "[]", true, true); | |
lists = checkList(lists); //時間を過ぎたものを削除 | |
if( lists.length == 0 ) return; | |
var ul = d.createElement("ul"); | |
for(var i=0 ; i<lists.length ; i++) { | |
var li = d.createElement("li"); | |
//アイコン | |
var title = ""; | |
switch(lists[i].kind){ | |
case 0: title = "領地破棄"; break; | |
case 1: title = "村破棄"; break; | |
case 2: title = "砦破棄"; break; | |
case 3: title = "村作成"; break; | |
case 4: title = "砦作成"; break; | |
case 5: title = "レベルアップ"; break; | |
} | |
var icon = ""; | |
if( lists[i].kind == 1 || lists[i].kind == 3 ) { //村破棄or村作成 | |
icon = IMG_DIR + "panel/village_b_l.png"; | |
}else if( lists[i].kind == 2 || lists[i].kind == 4 ) { //砦破棄or砦作成 | |
icon = IMG_DIR + "panel/fort_b_l.png"; | |
}else{ | |
icon = IMG_DIR + "panel/territory_b_s.png"; | |
} | |
var addHtml = '<img src="' + icon + '" style="width:20px; height:20px;" title="' + title + '">'; | |
var sizestyle = ""; | |
if( lists[i].kind == 0 || lists[i].kind == 1 || lists[i].kind == 2 ) { //領地破棄or村破棄or砦破棄 | |
addHtml += '<img src ="' + img_x + '" style="position:relative; left:-20px; width:20px; height:20px;" title="' + title + '">'; | |
sizestyle = ' style="position:relative; left:-20px;"'; | |
} | |
if( lists[i].kind == 5 ) { //領地LvUp | |
addHtml += '<img src ="' + img_lup + '" style="position:relative; left:-20px; width:20px; height:20px;" title="' + title + '">'; | |
sizestyle = ' style="position:relative; left:-20px;"'; | |
} | |
addHtml += '<a href="'+caddSessionId('/land.php?x=' + lists[i].x + '&y=' + lists[i].y +'#ptop')+'" title="表示"'+ sizestyle + '>' + lists[i].time.substr(-8) + '</a>'; | |
addHtml += '<a href="'+caddSessionId('/map.php?x=' + lists[i].x + '&y=' + lists[i].y +'#ptop')+'" title="マップ(' + lists[i].x + ',' + lists[i].y + ')"' + sizestyle + '>'; | |
addHtml += '<img src="' + img_map + '" style="padding-left:2px;"></a>'; | |
li.innerHTML = addHtml; | |
ul.appendChild(li); | |
} | |
elms.sideBoxInner.appendChild(ul); | |
function checkList(lists){ | |
var dt = new Date(); | |
var ntime = dt.getFullYear() + "-" + | |
(dt.getMonth()+101).toString().substr(-2) + "-" + | |
(dt.getDate()+100).toString().substr(-2) + " " + | |
(dt.getHours()+100).toString().substr(-2) + ":" + | |
(dt.getMinutes()+100).toString().substr(-2) + ":" + | |
(dt.getSeconds()+100).toString().substr(-2); | |
var str1 = ""; | |
var str2 = ""; | |
var str3 = ""; | |
var str4 = ""; | |
for(var i=0 ; i<lists.length ; i++) { | |
if( lists[i].time < ntime ) { | |
if ( lists[i].kind == 1 || lists[i].kind == 2 ) { | |
str2 += "(" + lists[i].x + "," + lists[i].y + ")\n"; | |
}else if ( lists[i].kind == 3 || lists[i].kind == 4 ) { | |
str3 += "(" + lists[i].x + "," + lists[i].y + ")\n"; | |
}else if ( lists[i].kind == 5 ) { | |
//LevelUp完了 | |
str4 += "(" + lists[i].x + "," + lists[i].y + ")\n"; | |
csetMyLevel(lists[i].x, lists[i].y, -1); | |
}else { | |
str1 += "(" + lists[i].x + "," + lists[i].y + ")\n"; | |
} | |
lists.splice(i,1); | |
i--; | |
} | |
} | |
if( str1 || str2 || str3 || str4 ) { | |
var msg = ""; | |
if( str1) msg += "以下の領地が破棄されました\n" + str1; | |
if( str2) msg += "以下の拠点が破棄されました\n" + str2; | |
if( str3) msg += "以下の拠点が作成されました\n" + str3; | |
if( str4) msg += "以下の拠点がレベルアップしました\n" + str4; | |
csaveData( "RemoveList", lists, true, true ); | |
// alert(msg); | |
} | |
return lists; | |
} | |
} | |
function disp_ResourcesTime(){ | |
var flag_cost = false; | |
if( location.pathname == "/facility/facility.php" || | |
location.pathname == "/facility/select_facility.php" || | |
location.pathname == "/facility/castle.php" || | |
location.pathname == "/facility/unit_confirm.php") { | |
flag_cost = true; | |
} | |
var names = ["wood", "stone", "iron", "rice"]; | |
var resources = { | |
wood : { base : null,timer : null}, | |
stone : { base : null,timer : null}, | |
iron : { base : null,timer : null}, | |
rice : { base : null,timer : null}, | |
fame : { base : null,timer : null} | |
}; | |
//status_leftとstatus_rightの幅を変更 | |
var stat_left = $("status_left"); | |
var stat_right = $("status_right"); | |
if( stat_left && stat_right ) { | |
stat_left.style.width = "725px"; //670 + 55 | |
stat_right.style.width = "200px"; //255 - 55 | |
} | |
for(var i = 0; i < names.length;i++) { | |
var name = names[i]; | |
var base = $(name); | |
var dv = d.createElement("div"); | |
dv.id = "beyond_restime_" + name; | |
dv.style.top = (base.offsetTop + 12) + "px"; | |
dv.style.left = base.offsetLeft + "px"; | |
dv.style.position = "absolute"; | |
base.parentNode.appendChild( dv ); | |
resources[name].base = base; | |
resources[name].timer = dv; | |
} | |
//名声 | |
var villageCount = 0; | |
for (var key in VILLAGES_INFO) { | |
villageCount++; | |
} | |
var bldtbl = [17, 35, 54, 80, 112, 150, 195, 248, 310, 999]; | |
var addTop = 12; | |
if (OPT_NEXT_MEISEI) { | |
addTop = -12; | |
} | |
for( var i=0 ; i < bldtbl.length ; i++ ){ | |
if( RES_MAX.fame < bldtbl[i] ) { | |
var base = $x('id("status_left")/img[@title="名声"]'); | |
if( base ) { | |
var dv = d.createElement("div"); | |
var elm_xy = cgetElementXY("base"); //改良 | |
dv.id = "beyond_restime_meisei"; | |
dv.style.top = (base.offsetTop + addTop) + "px"; | |
dv.style.left = (base.offsetLeft + 10) + "px"; | |
if( location.pathname == "/map.php") dv.style.left = (base.offsetLeft - 64) + "px"; //faraway110620 | |
if( location.pathname == "/user/ranking.php"){ //faraway110620 | |
if(base.offsetLeft >= 552){ //faraway110620 | |
dv.style.left = (base.offsetLeft - 64) + "px"; //faraway110620 | |
} //faraway110620 | |
} | |
dv.style.position = "absolute"; | |
dv.style.color="lightgreen"; | |
if( bldtbl[i] != 999 ) { | |
dv.innerHTML = "次拠点:" + bldtbl[i]; | |
if(OPT_NEXT_MEISEI){ //名声獲得タイマー機能使用時 faraway110620 | |
dv.style.top = "-7px"; //位置ずれるため固定 faraway110620 | |
}else{ | |
dv.style.top = "17px"; //位置ずれるため固定 faraway110620 | |
} | |
} | |
if( villageCount < i + 1 ) { | |
dv.innerHTML += "(+" + (i + 1 - villageCount ) + ")"; | |
} | |
base.parentNode.appendChild( dv ); | |
resources.fame.base = base; | |
resources.fame.timer = dv; | |
} | |
break; | |
} | |
} | |
if( flag_cost ) { | |
var facilityResources = new Array(); | |
var tds = $a('//td[@class="cost"]'); | |
for(var i=0 ; i<tds.length ; i++) { | |
var td = tds[i]; | |
var spn = $a('./span[contains(concat(" ", normalize-space(@class), " "), " normal ") or contains(concat(" ", normalize-space(@class), " "), " max90 ")]', td); | |
if( spn.length != 4 ) continue; | |
var addObj = new Object(); | |
for(var j=0 ; j < names.length ; j++ ) { | |
var name = names[j]; | |
var base = spn[j]; | |
var dv = d.createElement("div"); | |
dv.id = "beyond_restime_" + i + "_" + name; | |
var elem_xy = cgetElementXY(base); | |
dv.style.top = (elem_xy.y + 9) + "px"; | |
dv.style.left = (elem_xy.x - 18 )+ "px"; | |
dv.style.fontSize = "9px"; | |
dv.style.position = "absolute"; | |
td.appendChild( dv ); | |
addObj[name] = {base : base , timer : dv}; | |
} | |
facilityResources.push(addObj); | |
} | |
} | |
function ResourcesTimer(){ | |
var posleft =new Array("28px","150px","272px","398px");//位置ずれるため固値を設定faraway110601 //faraway110616 | |
cupdateCurrentResources(); | |
//各資源 | |
for(var i=0 ; i<names.length ; i++) { | |
var name = names[i]; | |
var base = resources[name].base; | |
var dv = resources[name].timer; | |
if( dv && base ){ | |
var tim; | |
if( RES_GROW[ name ] == 0 ) { | |
tim = "XX:XX:XX"; | |
}else if( RES_GROW[ name ] > 0 ){ | |
tim = getTime(RES_MAX[ name ] - RES_NOW[ name ], RES_GROW[ name ]); | |
}else{ | |
tim = "-" + getTime(RES_NOW[ name ], 0 - RES_GROW[ name ]); | |
} | |
if( tim == "00:00:00" || tim.substr(0,1) == "-" ) dv.style.color="red"; | |
else if( parseInt(tim.substr(0,2), 10) < 1 ) dv.style.color="orange"; | |
else dv.style.color="lightgreen"; | |
dv.innerHTML = "(" + tim + ")"; | |
dv.style.top = (base.offsetTop + 12) + "px"; | |
dv.style.left = base.offsetLeft + "px"; | |
} | |
} | |
//名声 | |
var base = resources.fame.base; | |
var dv = resources.fame.timer; | |
if( base && dv) { | |
dv.style.top = (base.offsetTop + addTop) + "px"; | |
dv.style.left = (base.offsetLeft + 10) + "px"; | |
} | |
if( flag_cost ) { | |
for(var i=0 ; i < facilityResources.length ; i++) { | |
var facilityObj = facilityResources[i]; | |
for(var j=0 ; j<names.length ; j++ ) { | |
var name = names[j]; | |
var base = facilityObj[name].base; | |
var dv = facilityObj[name].timer; | |
var needed = parseInt(base.innerHTML,10); | |
if( needed > RES_MAX[ name ] ) { | |
dv.style.color="red"; | |
dv.innerHTML = "倉庫不足"; | |
}else if( needed > RES_NOW[ name ] ) { | |
var tim = getTime(needed - RES_NOW[ name ], RES_GROW[ name ]); | |
dv.style.color="orange"; | |
dv.innerHTML = "(" + tim + ")"; | |
}else{ | |
dv.style.color="lightgreen"; | |
dv.innerHTML = "残" + (RES_NOW[ name ] - needed); | |
} | |
var elem_xy = cgetElementXY(base); | |
dv.style.top = (elem_xy.y + 9) + "px"; | |
dv.style.left = (elem_xy.x - 18 )+ "px"; | |
} | |
} | |
} | |
window.setTimeout( ResourcesTimer, 1000); | |
} | |
ResourcesTimer(); | |
function getTime(res, grow ){ | |
var tmp = res * 3600 / grow; | |
var h = Math.floor(tmp / 3600); | |
var m = Math.floor((tmp - h*3600 ) / 60 ); | |
var s = Math.floor(tmp - h*3600 - m*60 ); | |
var tim = h + ":" + | |
(m+100).toString().substr(-2) + ":" + | |
(s+100).toString().substr(-2); | |
return tim; | |
} | |
} | |
////////////////////// | |
//地形一覧 | |
////////////////////// | |
function disp_MapList(){ | |
if( location.pathname != "/map.php" ) return; | |
var map_type = 1; | |
//地図51×51対応 | |
if( $x("//div[@id=\"change-map-scale\"]/ul/li[@class=\"sort15 now\"]") ) map_type=2; | |
else if( $x("//div[@id=\"change-map-scale\"]/ul/li[@class=\"sort21 now\"]") ) map_type=5; | |
else if( $x("//div[@id=\"change-map-scale\"]/ul/li[@class=\"sort51 now\"]") ) map_type=4; | |
var base = $("mapbox"); | |
var div =d.createElement("div"); | |
div.id = "beyond_maplist"; | |
div.align = "center"; | |
div.appendChild(d.createElement("br")); | |
var tmp_t = d.createElement("table"); | |
var tmp_r = d.createElement("tr"); | |
var tmp_d1 = d.createElement("td"); | |
ccreateCheckBox(tmp_d1, "beyond_maplist_kyoten", "1", "拠点","拠点を含めます" ,0); var tmp_d2 = d.createElement("td"); | |
ccreateCheckBox(tmp_d2, "beyond_maplist_ryouchi", "1", "領地","領地を含めます" ,0); var tmp_d3 = d.createElement("td"); | |
ccreateCheckBox(tmp_d3, "beyond_maplist_akichi", "1", "空き地","空き地を含めます",0); var tmp_d4 = d.createElement("td"); | |
var a = d.createElement("a");a.href = "javascript:void(0)";a.style.color = "black";a.appendChild(d.createTextNode("<地形一覧表示>")); | |
tmp_d4.appendChild(a); | |
tmp_r.appendChild(tmp_d1);tmp_r.appendChild(tmp_d2);tmp_r.appendChild(tmp_d3);tmp_r.appendChild(tmp_d4);tmp_t.appendChild(tmp_r); | |
div.appendChild(tmp_t);base.appendChild(div); | |
var sheet = d.styleSheets[d.styleSheets.length-1]; | |
sheet.insertRule("table#beyond_maplist_table {border:2px solid black; border-collapse:collapse;}", sheet.cssRules.length); | |
sheet.insertRule("table#beyond_maplist_table th {background:lightgray; padding: 5px; text-align:center; border:1px solid black;}", sheet.cssRules.length); | |
sheet.insertRule("table#beyond_maplist_table td {padding: 2px; border:1px solid black;}", sheet.cssRules.length); | |
$e(a, "click", function() { | |
var flag_akichi = cgetCheckBoxValue("beyond_maplist_akichi"); | |
var flag_ryouchi = cgetCheckBoxValue("beyond_maplist_ryouchi"); | |
var flag_kyoten = cgetCheckBoxValue("beyond_maplist_kyoten"); | |
var area = $a("//map[@id=\"mapOverlayMap\"]//area"); | |
var lists = new Array(); | |
for(var i=0; i<area.length ; i++) { | |
var dat = area[i].getAttribute("onmouseover"); | |
dat = dat.replace(/^.*rewrite/, "getTRData"); | |
dat = dat.replace(/\); .*$/, ");"); | |
var trdata; | |
eval("trdata = " + dat); | |
if( trdata ) { | |
lists.push(trdata); | |
} | |
} | |
lists.sort( function(a,b){ | |
if(a.ally == "" && b.ally != "") return 1; | |
else if(a.ally != "" && b.ally == "") return -1; | |
if(a.ally > b.ally) return 1; | |
else if(a.ally < b.ally) return -1; | |
else{ | |
if( a.user_name > b.user_name) return 1; | |
else if(a.user_name < b.user_name) return -1; | |
else{ | |
if( a.kyoten_kind > b.kyoten_kind ) return -1; | |
else if( a.kyoten_kind < b.kyoten_kind ) return 1; | |
else { | |
if( parseInt(a.jinko,10) > parseInt(b.jinko,10) ) return -1; | |
else if( parseInt(a.jinko,10) < parseInt(b.jinko,10) ) return 1; | |
else { | |
if( parseFloat(a.kyori) > parseFloat(b.kyori) ) return 1; | |
else if( parseFloat(a.kyori) < parseFloat(b.kyori) ) return -1; | |
else { | |
if( a.name > b.name ) return 1; | |
else if( a.name < b.name ) return -1; | |
else return 0; | |
} | |
} | |
} | |
} | |
} | |
return 0; | |
}); | |
var tbl = initTable(); | |
for(var i=0 ; i<lists.length ; i++) { | |
var tr = d.createElement("tr"); | |
var td; | |
td = d.createElement("td"); | |
td.innerHTML = lists[i].ally; | |
tr.appendChild(td); | |
td = d.createElement("td"); | |
td.innerHTML = lists[i].user_name; | |
tr.appendChild(td); | |
td = d.createElement("td"); | |
if( lists[i].kyoten_img ) td.innerHTML = "<img src=\"" + lists[i].kyoten_img + "\" style=\"width:30px; height:30px;\" />"; | |
tr.appendChild(td); | |
td = d.createElement("td"); | |
td.style.display = "none"; | |
td.innerHTML = lists[i].kyoten_kind; | |
tr.appendChild(td); | |
td = d.createElement("td"); | |
td.innerHTML = lists[i].jinko; | |
tr.appendChild(td); | |
td = d.createElement("td"); | |
td.innerHTML = lists[i].name; | |
tr.appendChild(td); | |
td = d.createElement("td"); | |
var xy = lists[i].xy.match(/\(([\-0-9]+),([\-0-9]+)\)/); | |
if( xy ) td.innerHTML = cgetXYHtml(xy[1], xy[2]); | |
else td.innerHTML = lists[i].xy; | |
tr.appendChild(td); | |
td = d.createElement("td"); | |
td.innerHTML = lists[i].kyori; | |
tr.appendChild(td); | |
td = d.createElement("td"); | |
if( lists[i].npc ) td.style.color = "red"; | |
td.innerHTML = lists[i].star; | |
tr.appendChild(td); | |
tbl.appendChild(tr); | |
} | |
if( OPT_TTDISTANCE) disp_ToolTipsDistance();//試し | |
function getTRData(name, user_name, jinko, xy, ally, star, kyori, wood, stone, iron, rice, npc) | |
{ | |
if( !flag_akichi && ally == "" ) return null; | |
if( jinko == "-") jinko = ""; | |
var kyoten_img = ""; | |
var kyoten_kind = 0; | |
if( jinko || npc) { | |
var tmp = xy.match(/\(([\-0-9]+),([\-0-9]+)\)/); | |
if( tmp ) { | |
var cx = parseInt(URL_PARAM.x,10); | |
var cy = parseInt(URL_PARAM.y,10); | |
if( cx > MAP_X_MAX ) cx = MAP_X_MAX; | |
if( cx < MAP_X_MIN ) cx = MAP_X_MIN; | |
if( cy > MAP_Y_MAX ) cy = MAP_Y_MAX; | |
if( cy < MAP_Y_MIN ) cy = MAP_Y_MIN; | |
var no = cgetMapNofromXY(parseInt(tmp[1], 10), parseInt(tmp[2], 10), cx, cy, map_type); | |
if( no ) { | |
var img = $x("//div[@id=\"mapsAll\"]//img[@class=\"mapAll" + no + "\"]"); | |
if( img ) { | |
kyoten_img = img.getAttribute("src"); | |
if( npc ) kyoten_kind = 4; | |
else if( kyoten_img.match(/village/) ) kyoten_kind = 1; | |
else if( kyoten_img.match(/fort/) ) kyoten_kind = 2; | |
else if( kyoten_img.match(/capital/) ) kyoten_kind = 3; | |
} | |
} | |
} | |
} | |
if( !flag_ryouchi && ally != "" && kyoten_kind == 0 ) return null; | |
if( !flag_kyoten && ally != "" && kyoten_kind != 0 ) return null; | |
return {"kyoten_kind":kyoten_kind, "kyoten_img":kyoten_img, | |
"jinko":jinko , "ally":ally, "user_name":user_name, | |
"name":name, "xy":xy, "kyori":kyori, "star":star, "npc":npc}; | |
} | |
var sort_kind, sort_order; | |
function row_sort(col, kind, order) { | |
var tbl = $("beyond_maplist_table"); | |
var trs = $a("descendant::tr[position()>1]",tbl); | |
sort_kind = kind; | |
sort_order = order; | |
var strs = new Array(); | |
if( kind == "xy" ) { | |
//座標はaの下 | |
for(var i=0; i<trs.length ; i++) { | |
var td = $x("descendant::td[" + col + "]", trs[i]); | |
var a = $x("descendant::a", td); | |
if( a ) strs.push({"node":trs[i], "value":a.innerHTML}); | |
else strs.push({"node":trs[i], "value":""}); | |
} | |
} else { | |
for(var i=0; i<trs.length ; i++) { | |
var td = $x("descendant::td[" + col + "]", trs[i]); | |
if(td.style.color=="red") { | |
strs.push({"node":trs[i], "value":"★★★★★★★★★★" + td.innerHTML});//NPC砦だけ特別に | |
}else{ | |
strs.push({"node":trs[i], "value":td.innerHTML}); | |
} | |
} | |
} | |
strs.sort( function(a,b) { | |
var ret = 0; | |
if( sort_kind == "num" ){ | |
if( a.value == "" && b.value == "" ) return 0; | |
else if( a.value == "" ) return 1; | |
else if( b.value == "" ) return -1; | |
else ret = parseInt(a.value, 10) - parseInt(b.value, 10); | |
}else if( sort_kind == "kyo" ){ | |
if( parseInt(a.value, 10) == 0 && parseInt(b.value, 10) == 0) return 0; | |
else if( parseInt(a.value, 10) == 0 ) return 1; | |
else if( parseInt(b.value, 10) == 0 ) return -1; | |
else ret = parseInt(a.value, 10) - parseInt(b.value, 10); | |
}else if( sort_kind == "float" ){ | |
ret = parseFloat(a.value, 10) - parseFloat(b.value, 10); | |
}else if (sort_kind == "xy") { | |
//座標 | |
if( !a.value && !b.value ) ret = 0; | |
else if( !a.value ) ret = 1; | |
else if( !b.value ) ret = -1; | |
else { | |
var a_xy = a.value.split(","); | |
var b_xy = b.value.split(","); | |
ret = ( Math.pow(parseInt(a_xy[0], 10), 2) + Math.pow(parseInt(a_xy[1], 10), 2) ) - | |
( Math.pow(parseInt(b_xy[0], 10), 2) + Math.pow(parseInt(b_xy[1], 10), 2) ); | |
} | |
}else { | |
if( a.value == b.value ) { | |
ret = 0; | |
}else if( a.value == "" ) { | |
return 1; | |
}else if( b.value == "" ) { | |
return -1; | |
}else if( a.value > b.value ) { | |
ret = 1; | |
}else { | |
ret = -1; | |
} | |
} | |
if( sort_order == "dsc") { | |
ret = 0 - ret; | |
} | |
return ret; | |
}); | |
tbl = initTable(); | |
for(var i=0 ; i<trs.length ; i++) { | |
tbl.appendChild(strs[i].node); | |
} | |
} | |
function appendSortButton(col, sortcol, kind ) | |
{ | |
var tbl = $("beyond_maplist_table"); | |
var th = $x("descendant::tr[1]//th[" + col + "]", tbl); | |
if( !th ) return; | |
th.appendChild(d.createElement("br")); | |
var a = d.createElement("a"); | |
a.href = "javascript:void(0);"; | |
var img = d.createElement("img"); | |
img.src= IMG_DIR + "trade/icon_up.gif"; | |
img.alt = "昇順に並べ替え"; | |
img.title = img.alt; | |
a.appendChild(img); | |
th.appendChild(a); | |
(function(n, k){ | |
$e(a, "click", function(){row_sort(n, k, "asc"); } ); | |
})(sortcol, kind); | |
th.appendChild(d.createTextNode(" ")); | |
a = d.createElement("a"); | |
a.href = "javascript:void(0)"; | |
img = d.createElement("img"); | |
img.src= IMG_DIR + "trade/icon_down.gif"; | |
img.alt = "降順に並べ替え"; | |
img.title = img.alt; | |
a.appendChild(img); | |
th.appendChild(a); | |
(function(n, k){ | |
$e(a, "click", function(){row_sort(n, k, "dsc"); } ); | |
})(sortcol, kind); | |
} | |
function initTable(){ | |
var dv = $("beyond_maplist"); | |
var tbl = $("beyond_maplist_table"); | |
if( tbl ) { | |
tbl.parentNode.removeChild(tbl); | |
}else{ | |
var a = d.createElement("a"); | |
a.href = "#ptop"; | |
a.style.color="black"; | |
a.appendChild(d.createTextNode("▲トップに戻る")); | |
a.id = "beyond_maplist_table_gotop"; | |
dv.appendChild(a); | |
} | |
tbl = d.createElement("table"); | |
tbl.id = "beyond_maplist_table"; | |
tbl.innerHTML = "<tr>" + | |
"<th>同盟</th><th>君主</th><th>拠点</th><th style=\"display:none;\">拠点Kind</th>" + | |
"<th>人口</th><th>領地名</th><th>座標</th><th>距離</th><th>戦力</th>" + | |
"</tr>"; | |
dv.insertBefore(tbl, $("beyond_maplist_table_gotop")); | |
appendSortButton(1, 1, "str" ); | |
appendSortButton(2, 2, "str" ); | |
appendSortButton(3, 4, "kyo" ); | |
appendSortButton(5, 5, "num" ); | |
appendSortButton(7, 7, "xy" ); | |
appendSortButton(8, 8, "float" ); | |
appendSortButton(9, 9, "str" ); | |
return tbl; | |
} | |
}); | |
} | |
////////////////////// | |
//距離/時間表示(ToolTips) | |
////////////////////// | |
function disp_ToolTipsDistance() | |
{ | |
if( location.pathname == "/village.php" ) { | |
saveTrainingLevel(); | |
} | |
var links = $a('//a[(contains(@href,"castle_send_troop.php")) and not(contains(@href,"TB_inline"))]'); | |
if (!links.length) { | |
return; | |
} | |
var TL = 0; | |
var ETL = 0; | |
var vid = cgetCurrentVillageId(); | |
var lists = cloadData("TrainingLevels", "[]", true, true); | |
for (var i = 0;i < lists.length;i++) { | |
if (lists[i].id == vid) { | |
TL = parseInt(lists[i].level,10); | |
ETL = parseInt(lists[i].elevel,10); | |
break; | |
} | |
} | |
if (isNaN(""+TL)) { | |
TL = 0; | |
} | |
if (isNaN(""+ETL)) { | |
ETL = 0; | |
} | |
var reg = /x=(-?\d+)&y=(-?\d+)/; | |
for(var i=0 ; i<links.length ; i++) { | |
if(!reg.test(links[i].href)) continue; | |
links[i].alt = ""; | |
links[i].title = ""; | |
$e(links[i], "mouseover", function (event) { | |
var xy = this.href.match(reg); | |
var distance = cgetDistanceFromBase(xy[1], xy[2] ); | |
showToolTips(event, distance, TL, ETL); | |
}); | |
$e(links[i], "mouseout", function () { hideToolTips(); } ); | |
} | |
function showToolTips( evt, distance, trainingLevel , eTrainingLevel){ | |
hideToolTips(); | |
var sp = 0.05 * trainingLevel + 1+ (eTrainingLevel*0.001*distance); | |
var tw = d.createElement("div"); | |
tw.id = "beyond_ToolTipsWindow"; | |
tw.style.position = "absolute"; | |
tw.style.backgroundColor = "lightyellow"; | |
tw.style.border = "outset 2px lightyellow"; | |
tw.style.fontSize = "10px"; | |
tw.style.padding = "10px"; | |
tw.style.zIndex = 1000001; | |
var xxx = evt.pageX + 5; | |
if( xxx > 700 ) xxx -=175; | |
tw.style.left = xxx + "px"; | |
tw.style.top = (evt.pageY +5-200) + "px"; | |
var dv = d.createElement("div"); | |
dv.innerHTML = "時間の目安 遠征訓練所Lv."+eTrainingLevel+" (+"+(eTrainingLevel*0.1*distance).toFixed(3)+"%)<br>距離 [" + distance.toFixed(2) + "] 訓練所Lv." + trainingLevel + " (+" + (TL*5) + "%)" ; | |
tw.appendChild(dv); | |
var tbl = d.createElement("table"); | |
tbl.style.border = "2px solid black"; | |
tbl.style.borderCollapse = "collapse"; | |
tbl.style.width = "100%"; | |
var now = cgetNow(); | |
for(var i=0 ; i<OPT_TTDISTANCE_ITEMS.length ; i++){ | |
var tmp = OPT_TTDISTANCE_ITEMS[i].match(/.*\((-?[0-9]+([\.]{1}[0-9]+)?)\)/); | |
if( !tmp ) continue; | |
var speed = parseFloat(tmp[1]); | |
if( speed < 0 ) continue; | |
var tr = d.createElement("tr"); | |
var td = d.createElement("td"); | |
td.style.border = "1px solid black"; | |
td.style.textAlign = "left"; | |
td.appendChild(d.createTextNode( OPT_TTDISTANCE_ITEMS[i] )); | |
tr.appendChild(td); | |
var timeText = getTime(speed * sp, distance); | |
td = d.createElement("td"); | |
td.style.border = "1px solid black"; | |
td.style.textAlign = "right"; | |
td.appendChild(d.createTextNode(timeText)); | |
tr.appendChild(td); | |
var dayText = caddDate(now, timeText); | |
dayText = dayText.substring(5, dayText.length - 3).replace("-", "/"); | |
td = d.createElement("td"); | |
td.style.border = "1px solid black"; | |
td.style.textAlign = "right"; | |
td.appendChild(d.createTextNode(dayText)); | |
tr.appendChild(td); | |
tbl.appendChild(tr); | |
} | |
tw.appendChild(tbl); | |
$("beyond_floatpanel").appendChild(tw); | |
function getTime(speed, dist){ | |
var tmp = dist * 3600 / speed; | |
var h = Math.floor(tmp / 3600); | |
var m = Math.floor((tmp - h*3600 ) / 60 ); | |
var s = Math.floor(tmp - h*3600 - m*60 ); | |
var tim = h + ":" + | |
(m+100).toString().substr(-2) + ":" + | |
(s+100).toString().substr(-2); | |
return tim; | |
} | |
} | |
function hideToolTips(){ | |
var tw = $("beyond_ToolTipsWindow"); | |
if( tw ){ | |
tw.parentNode.removeChild(tw); | |
} | |
} | |
function saveTrainingLevel(){ | |
var vil_id = cgetCurrentVillageId(); | |
if( !vil_id ) return; | |
var basename = cgetCurrentBaseName(); | |
if( !basename ) return; | |
var level = 0; | |
var elevel = 0; | |
var map = $a('//area[contains(@alt, "訓練所 LV")]'); | |
if(0 < map.length) { | |
for (var i = 0;i < map.length;i++) { | |
var lv = map[i].alt.match(/((?:遠征)?訓練所) LV.([0-9]+)/); | |
if(lv[1] == "訓練所") { | |
level = parseInt(lv[2],10); | |
} | |
else if (lv[1] == "遠征訓練所") { | |
elevel = parseInt(lv[2],10); | |
} | |
} | |
} | |
var lists = cloadData("TrainingLevels", "[]", true, true); | |
var newLists = new Array(); | |
var isNewItem = true; | |
for (var i = 0;i < lists.length;i++) { | |
if (chasVillageId(lists[i].id)) { | |
var data = lists[i]; | |
if (data.id == vil_id) { | |
data.basename = basename; | |
data.level = level; | |
data.elevel = elevel; | |
isNewItem = false; | |
} | |
newLists.push({id:data.id,basename:data.basename,level:data.level,elevel:data.elevel}); | |
} | |
if (newLists.length == 10) { | |
break; | |
} | |
} | |
if (isNewItem) { | |
newLists.push({id:vil_id,basename:basename,level:level,elevel:elevel}); | |
} | |
csaveData( "TrainingLevels", newLists, true, true ); | |
} | |
} | |
////////////////////// | |
//同盟/君主表示(ToolTips) | |
////////////////////// | |
function disp_ToolTipsAllyPerson(){ | |
var links = $a('//a[(contains(@href,"village_change.php") or contains(@href,"land.php")) and not(contains(@href,"TB_inline") or contains(@href,"from"))]'); | |
if (links.length == 0) return; | |
var selfVillages =cgetVillageIds(); | |
for(var i=0 ; i<links.length ; i++) { | |
if(links[i].href.match(/village_change\.php/)) { | |
var tmp = links[i].href.match(/village_id=([0-9]+)/); | |
if( tmp && selfVillages[tmp[1]]) { | |
continue; | |
} | |
} | |
links[i].alt = ""; | |
links[i].title = ""; | |
$e(links[i], "mouseover", function(event){ showToolTips(event, this.href); } ); | |
$e(links[i], "mouseout", function(){ hideToolTips(); } ); | |
} | |
function showToolTips( evt, url ) | |
{ | |
hideToolTips(); | |
var tw = d.createElement("div"); | |
tw.id = "beyond_ToolTipsWindow"; | |
tw.style.position = "absolute"; | |
tw.style.backgroundColor = "lightyellow"; | |
tw.style.border = "outset 2px lightyellow"; | |
tw.style.fontSize = "10px"; | |
tw.style.padding = "10px"; | |
tw.style.zIndex = 1000001; | |
var xxx = evt.pageX + 5; | |
if( xxx > 700 ) xxx -=50; | |
tw.style.left = xxx + "px"; | |
tw.style.top = (evt.pageY +5) + "px"; | |
var dv = d.createElement("div"); | |
dv.id = "beyond_ToolTipsWindow_base"; | |
dv.appendChild(d.createTextNode("領地 : ...")); | |
tw.appendChild( dv ); | |
dv = d.createElement("div"); | |
dv.id = "beyond_ToolTipsWindow_ally"; | |
dv.appendChild(d.createTextNode("同盟 : ...")); | |
tw.appendChild( dv ); | |
dv = d.createElement("div"); | |
dv.id = "beyond_ToolTipsWindow_user"; | |
dv.appendChild(d.createTextNode("君主 : ...")); | |
tw.appendChild( dv ); | |
$("beyond_floatpanel").appendChild(tw); | |
cajaxRequest(url, "GET", "", function(req){ | |
var tw = $("beyond_ToolTipsWindow"); | |
if( !tw ) return ; | |
var dom = d.createElement("html"); | |
dom.innerHTML = req.responseText; | |
if (navigator.userAgent.toLowerCase().indexOf('chrome') != -1) { | |
$("beyond_tmp").appendChild(dom); | |
} | |
var dt = getDatafromLandElm(dom); | |
if (navigator.userAgent.toLowerCase().indexOf('chrome') != -1) { | |
$("beyond_tmp").removeChild(dom); | |
} | |
if( !dt ) return ; | |
if( $("beyond_ToolTipsWindow_base") ) { | |
$("beyond_ToolTipsWindow_base").innerHTML = "領地 : " + dt.base + "(" + dt.x + "," + dt.y + ")"; | |
$("beyond_ToolTipsWindow_ally").innerHTML = "同盟 : " + dt.ally; | |
$("beyond_ToolTipsWindow_user").innerHTML = "君主 : " + dt.user; | |
} | |
}, function(req){ | |
//alert("サーバからエラーが返りましたよ" ); | |
}); | |
} | |
function hideToolTips() | |
{ | |
var tw = $("beyond_ToolTipsWindow"); | |
if( tw ){ | |
tw.parentNode.removeChild(tw); | |
} | |
} | |
function getDatafromLandElm(dom){ | |
var ret = new Array(); | |
var nam = $x('.//span[@class="basename"]', dom); | |
if( !nam ) return null; | |
ret["base"] = nam.innerHTML; | |
var xy = $x('.//span[@class="xy"]', dom); | |
if( !xy ) return null; | |
xy = xy.innerHTML.match(/([\-0-9]+),([\-0-9]+)/); | |
if( !xy ) return null; | |
ret["x"] = parseInt(xy[1], 10); | |
ret["y"] = parseInt(xy[2], 10); | |
var a = $a('.//div[@class="status"]//a', dom); | |
if( a.length < 2 ) { | |
ret["user"] = ""; | |
ret["ally"] = ""; | |
}else{ | |
ret["user"] = a[0].innerHTML; | |
ret["ally"] = a[1].innerHTML; | |
} | |
return ret; | |
} | |
} | |
////////////////////// | |
//プロフィール画面星表示 | |
////////////////////// | |
function disp_UserStar(){ | |
if( location.pathname == "/user/" ) { | |
showProfile(); | |
} | |
function showProfile(){ | |
//君主名取得 | |
var uname_td = $x("//table[@class=\"commonTables\"]//tr[2]/td[2]"); | |
if( !uname_td ) return; | |
var uname = uname_td.textContent; | |
var uid = USER_ID; | |
if( URL_PARAM.user_id ) uid = URL_PARAM.user_id; | |
//table★欄追加 | |
cappendColumnForProfile("★", "beyond_star" ); | |
//内容初期設定 | |
lists = cloadData( "UserStarList" + uid, "[]", true, true ); | |
for( var i=0 ; i<lists.length ; i++){ | |
var td = $("beyond_star_" + lists[i].x + "_" + lists[i].y); | |
if( td && td.innerHTML == "" ) { | |
if( lists[i].npc ) { | |
td.innerHTML = "★" + lists[i].star; | |
td.style.color = "red"; | |
}else{ | |
td.innerHTML = "★" + lists[i].star + " (" + lists[i].wood + "," + lists[i].stone + "," + lists[i].iron + "," + lists[i].rice + ")"; | |
} | |
td.style.opacity = lists[i].star * 0.05 + 0.5; | |
} | |
} | |
//タイトルにGETを追加 | |
var th = $("beyond_star_title"); | |
if( th ) { | |
var lnk = d.createElement("a"); | |
lnk.href = "javascript:void(0)"; | |
lnk.innerHTML ="(GET)"; | |
lnk.style.fontSize = "9px"; | |
var running = false; | |
$e(lnk, "click", function() { | |
if( running ) return ; | |
if( confirm("☆情報を一気に取得するためサーバに負荷をかけます。\n何度も実行するとDOS攻撃と同じなので、実行には注意して下さい") == false ) return; | |
running = true; | |
window.setTimeout(timerFunc, 0); | |
function timerFunc(){ | |
var tds = $a("//td[contains(@id, \"beyond_star_\")]"); | |
var targettd = ""; | |
var targetid = ""; | |
for( var i=0 ; i< tds.length ; i++) { | |
if( tds[i].innerHTML == "" ) { | |
targettd = tds[i]; | |
targetid = tds[i].id; | |
break; | |
} | |
} | |
if( !targetid ) { | |
alert("全ての☆情報を取得しました"); | |
running = false; | |
return; | |
} | |
var xy = targetid.match(/beyond_star_([\-0-9]+)_([\-0-9]+)/); | |
if( !xy ) { | |
GM_log("err"); | |
return ; | |
} | |
cajaxRequest("/map.php?x=" + xy[1] + "&y=" + xy[2], "GET", "", function(req) { | |
var dom = d.createElement("html"); | |
dom.innerHTML = req.responseText; | |
if (navigator.userAgent.toLowerCase().indexOf('chrome') != -1) { | |
$("beyond_tmp").appendChild(dom); | |
} | |
var area = $a("//map[@id=\"mapOverlayMap\"]//area", dom); | |
for(var i=0 ; i<area.length ; i++){ | |
var dat = area[i].getAttribute("onmouseover"); | |
dat = dat.replace(/^.*rewrite/, "setStar"); | |
dat = dat.replace(/\); .*$/, ");"); | |
//evalの中ではGM_set/getValueが出来ないので、変数を一旦外に出す形に | |
eval("dat = " + dat); | |
if( !dat ) continue; | |
var td = $("beyond_star_" + dat.x + "_" + dat.y); | |
if( !td ) { GM_log("td null err?:" + dat.x + "," + dat.y); return;}; | |
if( td.innerHTML) continue; | |
csetUserStar( uid, dat.x, dat.y, dat.star.length, dat.wood, dat.stone, dat.iron, dat.rice, dat.npc ); | |
if( dat.npc ) { | |
td.innerHTML = "★" + dat.star.length; | |
td.style.color = "red"; | |
}else{ | |
td.innerHTML = "★" + dat.star.length + " (" + dat.wood + "," + dat.stone + "," + dat.iron + "," + dat.rice + ")"; | |
} | |
td.style.opacity = dat.star.length * 0.05 + 0.5; | |
} | |
if (navigator.userAgent.toLowerCase().indexOf('chrome') != -1) { | |
$("beyond_tmp").removeChild(dom); | |
} | |
window.setTimeout(timerFunc, 0); | |
}); | |
} | |
}); | |
th.appendChild(lnk); | |
} | |
function setStar(name, user_name, jinko, xy, ally, star, kyori, wood, stone, iron, rice, npc){ | |
if( uname == user_name) { | |
var tmp = xy.match(/\(([\-0-9]+),([\-0-9]+)\)/); | |
if( tmp ) { | |
var x = tmp[1]; | |
var y = tmp[2]; | |
return {"user_name":user_name, "x":x, "y":y, "star":star, "wood":wood, "stone":stone, "iron":iron, "rice":rice, "npc":npc}; | |
} | |
} | |
return null; | |
} | |
} | |
} | |
////////////////////// | |
//プロフィール画面Level表示 | |
////////////////////// | |
function disp_UserLevel(){ | |
if( location.pathname == "/user/" ) { | |
if( !URL_PARAM.user_id || USER_ID == URL_PARAM.user_id ) { | |
showProfile(); | |
} | |
} | |
if( location.pathname == "/land.php" || location.pathname == "/village.php" ) { | |
//保存 | |
var spnxy = $x("//span[@class=\"xy\"]"); | |
if( !spnxy ){ | |
return; | |
} | |
var xy = spnxy.innerHTML.match(/\(([\-0-9]+),([\-0-9]+)\)/); | |
if( !xy ) { | |
return; | |
} | |
var tmp = spnxy.innerHTML.match(/レベル(\d+)/); | |
if( tmp ) { | |
// GM_log("add:" + xy[1] + "," + xy[2]); | |
csetMyLevel(xy[1], xy[2], tmp[1] ); | |
}else { | |
// GM_log("del:" + xy[1] + "," + xy[2]); | |
cdelMyLevel(xy[1], xy[2]); | |
} | |
} | |
function showProfile(){ | |
//tableLevel欄追加 | |
cappendColumnForProfile("Level", "beyond_level" ); | |
//内容初期設定 | |
lists = cloadData( "MyLevelList", "[]", true, true ); | |
for( var i=0 ; i<lists.length ; i++){ | |
var td = $("beyond_level_" + lists[i].x + "_" + lists[i].y); | |
if( td ) { | |
td.innerHTML = lists[i].level; | |
} | |
} | |
updateLevelUp(); | |
updateLevelUpLink(); | |
//タイトルにGETを追加 | |
var th = $("beyond_level_title"); | |
if( th ) { | |
var lnk = d.createElement("a"); | |
lnk.href = "javascript:void(0)"; | |
lnk.innerHTML ="(GET)"; | |
lnk.style.fontSize = "9px"; | |
var running = false; | |
$e(lnk, "click", function() { | |
if( running ) return ; | |
if( confirm("Level情報を一気に取得するためサーバに負荷をかけます。\n何度も実行するとDOS攻撃と同じなので、実行には注意して下さい") == false ) return; | |
running = true; | |
window.setTimeout(timerFunc, 0); | |
function timerFunc(){ | |
var tds = $a("//td[contains(@id, \"beyond_level_\")]"); | |
var targettd = ""; | |
var targetid = ""; | |
for( var i=0 ; i< tds.length ; i++) { | |
if( tds[i].innerHTML == "" ) { | |
targettd = tds[i]; | |
targetid = tds[i].id; | |
break; | |
} | |
} | |
if( !targetid ) { | |
updateLevelUp(); | |
updateLevelUpLink(); | |
running = false; | |
alert("全てのレベル情報を取得しました"); | |
return; | |
} | |
var xy = targetid.match(/beyond_level_([\-0-9]+)_([\-0-9]+)/); | |
if( !xy ) { | |
GM_log("err"); | |
return ; | |
} | |
cajaxRequest("/land.php?x=" + xy[1] + "&y=" + xy[2], "GET", "", function(req) { | |
var dom = d.createElement("html"); | |
dom.innerHTML = req.responseText; | |
if (navigator.userAgent.toLowerCase().indexOf('chrome') != -1) { | |
$("beyond_tmp").appendChild(dom); | |
} | |
var spnxy = $x("//span[@class=\"xy\"]", dom); | |
if( !spnxy ){ | |
GM_log("span class=xy err"); | |
return; | |
} | |
var xy = spnxy.innerHTML.match(/\(([\-0-9]+),([\-0-9]+)\)/); | |
if( !xy ) { | |
GM_log("xy match err"); | |
return; | |
} | |
var level = 0; | |
var tmp = spnxy.innerHTML.match(/レベル(\d+)/); | |
if( tmp ) { | |
level = tmp[1]; | |
} | |
var td = $("beyond_level_" + xy[1] + "_" + xy[2]); | |
if( !td ) { GM_log("td null err?:" + xy[1] + "," + xy[2]); return;}; | |
if( !td.innerHTML ) { | |
csetMyLevel(xy[1], xy[2], level); | |
td.innerHTML = level; | |
} | |
if (navigator.userAgent.toLowerCase().indexOf('chrome') != -1) { | |
$("beyond_tmp").removeChild(dom); | |
} | |
window.setTimeout(timerFunc, 0); | |
}); | |
} | |
}); | |
th.appendChild(lnk); | |
} | |
function updateLevelUp(){ | |
//建設/破棄リストから | |
var lists = cloadData("RemoveList", "[]", true, true); | |
for(var i=0 ; i<lists.length ; i++) { | |
if( lists[i].kind != 5 ) continue; | |
var td = $("beyond_level_" + lists[i].x + "_" + lists[i].y); | |
if( !td ) continue; | |
//GM_log("td:" + td.innerHTML); | |
var level = parseInt(td.innerHTML,10); | |
if( isNaN( ""+level ) ) continue; | |
td.innerHTML = level + " (+)"; | |
} | |
} | |
function updateLevelUpLink(){ | |
var img_lvup = 'data:image/gif;base64,'+ | |
'R0lGODlhFQAVAJEAAIaT6////////wAAACH5BAUUAAIALAAAAAAVABUAAAJDlICpi3YM14u0WhVY'+ | |
'Rjn4zWlJx4HgiJrooqohm67A+c727GLpp8MhXZORRD4b8NYzQj4k5pDF2/CQl6pVclU4sgBDAQA7'; | |
var tds = $a("//td[contains(@id, \"beyond_level_\")]"); | |
for( var i=0 ; i<tds.length ; i++){ | |
if( "" + parseInt(tds[i].innerHTML,10) == tds[i].innerHTML ) { | |
var lv = parseInt(tds[i].innerHTML,10); | |
if( lv < 1 || lv > 4 ) continue; | |
var mtbl = [2, 2, 2, 4]; | |
var meisei = mtbl[lv - 1]; | |
if( RES_NOW.fame >= meisei ) { | |
var xy = tds[i].id.match(/beyond_level_([\-0-9]+)_([\-0-9]+)/); | |
if( xy ) { | |
var lnk = '<a href="'+caddSessionId('/territory_proc.php?x=' + xy[1] + '&y=' + xy[2] + '&mode=lvup')+'" title="レベルアップ" onclick="'; | |
lnk += "return confirm('名声" + meisei + "を消費し、領地をレベルアップしますか?');"; | |
lnk += '"><img src="' + img_lvup + '" style="width:14px; height:14px; vertical-align:middle;"></a>'; | |
tds[i].innerHTML += lnk; | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
////////////////////// | |
//マップ中央表示 | |
////////////////////// | |
function disp_MapCenter() | |
{ | |
if(location.pathname != "/map.php" && location.pathname != "/big_map.php"){ | |
return; | |
} | |
var cx = parseInt(URL_PARAM.x, 10); | |
var cy = parseInt(URL_PARAM.y, 10); | |
if(isNaN(""+cx)){ | |
cx = 0; | |
} | |
if(isNaN(""+cy)){ | |
cy = 0; | |
} | |
if(cx > MAP_X_MAX){ | |
cx = MAP_X_MAX; | |
} | |
if(cx < MAP_X_MIN){ | |
cx = MAP_X_MIN; | |
} | |
if(cy > MAP_Y_MAX){ | |
cy = MAP_Y_MAX; | |
} | |
if(cy < MAP_Y_MIN){ | |
cy = MAP_Y_MIN; | |
} | |
var dv = d.createElement("div"); | |
dv.style.fontSize= "10px"; | |
dv.appendChild(d.createTextNode("中央:( " + cx + " , " + cy + " )")); | |
$("map-xy-search").appendChild(dv); | |
} | |
////////////////////// | |
//討伐ゲージ回復時間表示 | |
////////////////////// | |
function disp_ToubatsuRestTime() | |
{ | |
if(location.pathname != "/card/deck.php") return ; | |
ToubatsuRecoveryEstimates(); | |
function ToubatsuRecoveryEstimates() | |
{ | |
var now = cgetNow(); | |
//デッキ | |
var decks = $a("//div[@id=\"cardListDeck\"]//div[@class=\"control\"]"); | |
for( var i=0; i<decks.length ; i++ ){ | |
var stat = $x("descendant::dl/dd[3]", decks[i]); | |
if( !stat ) continue; | |
if( stat.textContent == "内政セット済" ) continue; | |
var tb = $x("descendant::dl/dd[1]/div[1]", decks[i]); | |
if( !tb ) continue; | |
tb = 500 - parseInt( tb.textContent, 10 ); | |
if( tb != 0 ) { | |
var timeText = getTime( tb ); | |
var dayText = caddDate(now, timeText); | |
var txt = "500まで" + timeText + "後 (" + dayText + "完了)"; | |
$x("descendant::dl/dt[1]", decks[i]).title = txt; | |
$x("descendant::dl/dd[1]", decks[i]).title = txt; | |
} | |
} | |
//ファイル(カード表示) | |
var files = $a("//div[@id=\"cardFileList\"]//div[@class=\"control\"]"); | |
for( var i=0; i<files.length ; i++ ){ | |
var tb = $x("descendant::dl/dd[1]/div[1]", files[i]); | |
if( !tb ) continue; | |
tb = 300 - parseInt( tb.textContent, 10 ); | |
if( tb != 0 ) { | |
var timeText = getTime( tb ); | |
var dayText = caddDate(now, timeText); | |
var txt = "300まで" + timeText + "後 (" + dayText + "完了)"; | |
$x("descendant::dl/dt[1]", files[i]).title = txt; | |
$x("descendant::dl/dd[1]", files[i]).title = txt; | |
} | |
} | |
//ファイル(x枚表示) | |
var files = $a("//table[@class=\"statusParameter1\"]//tr[7]"); | |
for( var i=0; i<files.length ; i++ ){ | |
var tb = $x("descendant::td[1]", files[i]); | |
if( !tb ) continue; | |
tb = 300 - parseInt( tb.textContent, 10 ); | |
if( tb != 0 ) { | |
var timeText = getTime( tb ); | |
var dayText = caddDate(now, timeText); | |
var txt = "300まで" + timeText + "後 (" + dayText + "完了)"; | |
$x("descendant::th[1]", files[i]).title = txt; | |
$x("descendant::td[1]", files[i]).title = txt; | |
} | |
} | |
window.setTimeout(function() { ToubatsuRecoveryEstimates(); }, 60*1000); | |
} | |
function getTime(toubatsu) | |
{ | |
var tmp = toubatsu * 216; | |
var h = Math.floor(tmp / 3600); | |
var m = Math.floor((tmp - h*3600 ) / 60 ); | |
var s = Math.floor(tmp - h*3600 - m*60 ); | |
var tim = h + ":" + | |
(m+100).toString().substr(-2) + ":" + | |
(s+100).toString().substr(-2); | |
return tim; | |
} | |
} | |
////////////////////// | |
//出発時刻計算 | |
////////////////////// | |
function disp_TSendTime() | |
{ | |
if( location.pathname != "/facility/castle_send_troop.php" ) return; | |
var td = $x('//table[@class="fighting_about"]//tr[1]/td[1]'); | |
if( !td ) return ; | |
var tim = td.textContent.match(/到着まで[:|:][\s| ]*(\d+):(\d+):(\d+)[\s| ]*到達時間/); | |
if( !tim ) return; | |
var area_up_timer = $("area_up_timer0"); | |
if( !area_up_timer ) return; | |
var day = area_up_timer.textContent.match(/(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/); | |
if( !day ) return; | |
//ベース作成 | |
var div = d.createElement("div"); | |
div.style.margin = "5px"; | |
div.appendChild(d.createTextNode("到着時刻:")); | |
createText(div, "beyond_send_y", day[1]); | |
div.appendChild(d.createTextNode("-")); | |
createText(div, "beyond_send_m", day[2]); | |
div.appendChild(d.createTextNode("-")); | |
createText(div, "beyond_send_d", day[3]); | |
div.appendChild(d.createTextNode(" ")); | |
createText(div, "beyond_send_h", ""); | |
div.appendChild(d.createTextNode(":")); | |
createText(div, "beyond_send_mi", ""); | |
div.appendChild(d.createTextNode(":")); | |
createText(div, "beyond_send_s", ""); | |
div.appendChild(d.createTextNode(" ")); | |
var btn = d.createElement("input"); | |
btn.type = "button"; | |
btn.id = "beyond_send_button"; | |
btn.value = "出発時刻計算"; | |
div.appendChild(btn); | |
div.appendChild(d.createElement("br")); | |
div.appendChild(d.createTextNode("出発時刻:")); | |
var spn = d.createElement("span"); | |
spn.id = "beyond_send_time"; | |
div.appendChild(spn); | |
td.appendChild(div); | |
$e(btn, "click", function() { | |
if( $("beyond_send_y").value == "" ) $("beyond_send_y").value = "0"; | |
if( $("beyond_send_m").value == "" ) $("beyond_send_m").value = "0"; | |
if( $("beyond_send_d").value == "" ) $("beyond_send_d").value = "0"; | |
if( $("beyond_send_h").value == "" ) $("beyond_send_h").value = "0"; | |
if( $("beyond_send_mi").value == "" ) $("beyond_send_mi").value = "0"; | |
if( $("beyond_send_s").value == "" ) $("beyond_send_s").value = "0"; | |
var y = $("beyond_send_y").value; | |
var m = $("beyond_send_m").value; | |
var d = $("beyond_send_d").value; | |
var h = $("beyond_send_h").value; | |
var mi =$("beyond_send_mi").value; | |
var s = $("beyond_send_s").value; | |
y = parseInt(y, 10); | |
m = parseInt(m, 10); | |
d = parseInt(d, 10); | |
h = parseInt(h, 10); | |
mi =parseInt(mi, 10); | |
s = parseInt(s, 10); | |
if( isNaN(""+y) || isNaN(""+m) || isNaN(""+d) || isNaN(""+h) || isNaN(""+mi) || isNaN(""+s) ) { | |
alert("数字で入力して下さい"); | |
return; | |
} | |
var dt = new Date(y, m - 1, d, h - parseInt(tim[1],10) , mi - parseInt(tim[2],10), s - parseInt(tim[3],10) ); | |
$("beyond_send_time").innerHTML = | |
dt.getFullYear() + "-" + (dt.getMonth()+1) + "-" + dt.getDate() + " " + | |
(dt.getHours()+100).toString().substr(-2) + ":" + | |
(dt.getMinutes()+100).toString().substr(-2) + ":" + | |
(dt.getSeconds()+100).toString().substr(-2); | |
} ); | |
function createText(container, id, def) | |
{ | |
var tb = d.createElement("input"); | |
tb.type = "text"; | |
tb.value = def; | |
tb.id = id; | |
tb.size = 3; | |
container.appendChild(tb); | |
} | |
} | |
////////////////////// | |
//小さいボタン | |
////////////////////// | |
function disp_SmallButton() | |
{ | |
//ボタンの表示部分の設定 | |
var btnConfs = { | |
hbtn_event : {width : 20,start : -4}, //開催中イベント | |
btn_buycp : {width : 23,start : -7}, //CP購入 | |
btn_getbusho : {width : 21,start : -2}, //ブショーダス | |
hbtn_reward_vendor : {width : 24,start : -2}, //ヨロズダス | |
btn_itemshop : {width : 21,start : -5}, //アイテムショップ | |
btn_bushoduel : {width : 27,start : -1}, //デュエル | |
btn_invitefriend : {width : 27,start : -9}, //?? | |
btn_busyobook : {width : 20,start : -6} //武将図鑑 | |
}; | |
var btnImages = $a('(id("sidebar")/ul/li | id("btn_area_box"))//img'); | |
for (var i =0; i < btnImages.length;i++) { | |
var btnImage = btnImages[i]; | |
for (var key in btnConfs) { | |
if (btnImage.src.indexOf(key) < 0) { | |
continue; | |
} | |
var btnConf = btnConfs[key]; | |
var btn = btnImage.parentNode; | |
var btnHeight = 22; | |
if (isNarrow) btnHeight = 25; | |
btnImage.style.display = "none"; | |
btn.style.width = btnConf.width+"px"; | |
btn.style.height = btnHeight+"px"; | |
btn.style.marginLeft = "2px"; | |
btn.style.marginBottom = "2px"; | |
btn.style.background = 'url("'+btnImage.src+'") no-repeat '+btnConf.start+'px 0px'; | |
btn.style.display = "block"; | |
var floatNode = btn; | |
if (!isNarrow) floatNode = btn.parentNode; | |
floatNode.style.cssFloat = "left"; | |
if (i == 0) { | |
btn.style.marginLeft = "0px"; | |
} | |
} | |
} | |
if (!isNarrow) cgetElementSibling(floatNode.parentNode,0).style.clear = "both"; | |
//状況の縮小 | |
var tr = $x('//table[@class="situationTable"]//tr[1]'); | |
var tds = $a('//table[@class="situationTable"]//tr[2]//img[not(contains(@src,"sit_blank"))]/ancestor::td'); | |
if( tr && tds ) { | |
for( var i=0; i< tds.length ; i++) { | |
tr.appendChild(tds[i]); | |
} | |
cgetElementSibling(tr,0).style.display = "none"; | |
var imgs = $a(".//img", tr); | |
for( var i=0; i< imgs.length ; i++) { | |
imgs[i].style.width = "20px"; | |
imgs[i].style.height = "20px"; | |
if( !imgs[i].src.match(/(_no\.gif)$/) ) { | |
Pika_elementQueue.push(imgs[i]); | |
} | |
} | |
} | |
//拠点・生産・簡易出兵先の伸縮 | |
var targetNames = ["base","production","easydeploy"]; | |
var targets = { | |
base : { | |
img : '(id("lodgment") | id("sidebar"))//img[contains(@src,"icon_base")]', | |
inner : 'ancestor::div[contains(@class,"Head")]/following-sibling::div[contains(@class,"Inner")]' | |
}, | |
production : { | |
img : 'id("sidebar")//img[contains(@src,"icon_production")]', | |
inner : 'ancestor::div[contains(@class,"Head")]/following-sibling::div[contains(@class,"Inner")]' | |
}, | |
easydeploy : { | |
img : '(//div[@class="footer_box"] | id("sidebar"))//img[contains(@src,"icon_easydeploy")]', | |
inner : 'ancestor::div[contains(@class,"Head")]/following-sibling::div[contains(@class,"Inner")] | id("map_bookmark")' | |
} | |
}; | |
for(var i = 0;i < targetNames.length;i++) { | |
if (isNarrow && targetNames[i] == 'base' && location.pathname.search(/^\/(village|map|land)\.php/) < 0) { | |
continue; | |
} | |
var target = targets[targetNames[i]]; | |
var base_img = $x(target.img); | |
if( !base_img ) continue; | |
var base_inner = $x(target.inner, base_img); | |
if( !base_inner ) continue; | |
var oc = cloadData( "sidebox_oc" + i , "", true); | |
if( oc ) { | |
base_inner.style.display = "none"; | |
base_img.style.opacity = 0.3; | |
} | |
(function(inner, no) { | |
$e(base_img, "click", function(e) { | |
var ocs = ""; | |
if( inner.style.display == "none" ){ | |
inner.style.display = ""; | |
this.style.opacity = 1; | |
}else{ | |
inner.style.display = "none"; | |
this.style.opacity = 0.3; | |
ocs = "1"; | |
} | |
csaveData( "sidebox_oc" + no , ocs, true); | |
}); | |
})(base_inner, i); | |
} | |
} | |
////////////////////// | |
//出兵マップ表示 | |
////////////////////// | |
function disp_AttackMap() | |
{ | |
var img_atk = 'data:image/gif;base64,'+ | |
'R0lGODlhPAA8AIAAAP/M/////yH5BAUUAAEALAAAAAA8ADwAAAJ7jI+py+0Po5y02ouz3rz7D4bi'+ | |
'SJbmiabqyrbuC8fyTNf2jef6zvc8AATsgsEckYg7Fm9KoPE4XCakMCeDqmpCoSxt0yBsWQNj6bgb'+ | |
'dmJl6jUN+RSe3+V59ayMYZdwevjQd/c3ZbfiRlaYlXiYcsglFugjOUlZaXmJWVEAADs='; | |
var img_mov = 'data:image/gif;base64,'+ | |
'R0lGODlhPAA8AIAAADP//////yH5BAUUAAEALAAAAAA8ADwAAAJ7jI+py+0Po5y02ouz3rz7D4bi'+ | |
'SJbmiabqyrbuC8fyTNf2jef6zvc8AATsgsEckYg7Fm9KoPE4XCakMCeDqmpCoSxt0yBsWQNj6bgb'+ | |
'dmJl6jUN+RSe3+V59ayMYZdwevjQd/c3ZbfiRlaYlXiYcsglFugjOUlZaXmJWVEAADs='; | |
if( location.pathname == "/facility/unit_status.php" ) { | |
var tds = $a("//table[@summary=\"出撃中の兵士\" or @summary=\"移動中の兵士\"]/tbody/tr[position()>1]/td[1]"); | |
for(var i=0; i<tds.length ; i+=3) { | |
//0:場所 1:時間 2:兵種 | |
var xy = tds[i+0].innerHTML.match(/[\(|(](-?\d+),(-?\d+)[)|\)]$/); | |
if( !xy ) continue; | |
var tim = tds[i+1].innerHTML.match(/(\d+\-\d+\-\d+ \d+:\d+:\d+)/); | |
if( !tim ) continue; | |
var kind = 0; | |
if( tds[i].parentNode.parentNode.parentNode.getAttribute("summary") == "移動中の兵士" ) | |
kind = 1; | |
addList(tim[1], parseInt(xy[1],10), parseInt(xy[2],10), kind ); | |
var a = $x("descendant::div/a[contains(text(), \"キャンセルする\")]", tds[i+1]); | |
if( a ) { | |
(function(tim, x, y) { | |
$e(a, "click", function(){ | |
var lists = cloadData("AttackList", "[]", true, true); | |
for(var i=0 ; i<lists.length ; i++) { | |
if( lists[i].x == x && lists[i].y == y && lists[i].time == tim ) { | |
lists.splice(i,1); | |
csaveData( "AttackList", lists, true, true ); | |
break; | |
} | |
} | |
} ); | |
})(tim[1], parseInt(xy[1],10), parseInt(xy[2],10)); | |
} | |
} | |
return; | |
} | |
var lists = cloadData("AttackList", "[]", true, true); | |
lists = checkList(lists); //時間を過ぎたものを削除 | |
if( location.pathname == "/map.php" ) { | |
//地図に表示 | |
var type = 1; | |
if( $x("//div[@id=\"change-map-scale\"]/ul/li[@class=\"sort15 now\"]") ) type=2; | |
else if( $x("//div[@id=\"change-map-scale\"]/ul/li[@class=\"sort21 now\"]") ) type=5; | |
if( lists.length ) { | |
var cx = parseInt(URL_PARAM.x,10); | |
var cy = parseInt(URL_PARAM.y,10); | |
if( cx > MAP_X_MAX ) cx = MAP_X_MAX; | |
if( cx < MAP_X_MIN ) cx = MAP_X_MIN; | |
if( cy > MAP_Y_MAX ) cy = MAP_Y_MAX; | |
if( cy < MAP_Y_MIN ) cy = MAP_Y_MIN; | |
var map = $x("//div[@id=\"mapsAll\"]"); | |
for(var i=0 ; i<lists.length ; i++) { | |
var no = cgetMapNofromXY(lists[i].x, lists[i].y, cx, cy, type ); | |
if( !no ) continue; | |
var img = document.createElement("img"); | |
img.className = "mapAll" + no; | |
if( lists[i].kind == 1 ) { | |
img.src = img_mov; | |
}else{ | |
img.src = img_atk; | |
} | |
img.title = lists[i].time; | |
map.appendChild(img); | |
var area = $x("//map[@id=\"mapOverlayMap\"]/area[contains(@href, \"?x=" + lists[i].x + "&y=" + lists[i].y + "\")]"); | |
if( area ){ | |
area.title += " 到着予定:" + lists[i].time; | |
area.alt += " 到着予定:" + lists[i].time; | |
} | |
} | |
} | |
} | |
function addList(tim, x, y, kind) | |
{ | |
var lists = cloadData("AttackList", "[]", true, true); | |
var i; | |
for(i=0 ; i<lists.length ; i++) { | |
if(lists[i].x == x && lists[i].y == y ) { | |
if( lists[i].time < tim ) { | |
lists[i].time = tim; | |
lists[i].kind = kind; | |
break; | |
}else{ | |
return; | |
} | |
} | |
} | |
if( i == lists.length ) { | |
lists.push({"x":x, "y":y, "time":tim, "kind":kind } ); | |
} | |
csaveData( "AttackList", lists, true, true ); | |
} | |
function checkList(lists) | |
{ | |
var dt = new Date(); | |
var ntime = dt.getFullYear() + "-" + | |
(dt.getMonth()+101).toString().substr(-2) + "-" + | |
(dt.getDate()+100).toString().substr(-2) + " " + | |
(dt.getHours()+100).toString().substr(-2) + ":" + | |
(dt.getMinutes()+100).toString().substr(-2) + ":" + | |
(dt.getSeconds()+100).toString().substr(-2); | |
var deleted = false; | |
for(var i=0 ; i<lists.length ; i++) { | |
if( lists[i].time < ntime ) { | |
lists.splice(i,1); | |
i--; | |
deleted = true; | |
} | |
} | |
if( deleted ) { | |
if( lists.length ) { | |
csaveData( "AttackList", lists, true, true ); | |
} else { | |
cdelData("AttackList", true ); | |
} | |
} | |
return lists; | |
} | |
} | |
////////////////////// | |
//同一カード合成ボタン | |
////////////////////// | |
function disp_CardCombine() | |
{ | |
if( location.pathname != "/union/result_lv.php" && | |
location.pathname != "/union/result_learn.php" && | |
location.pathname != "/union/result_remove.php") { | |
return; | |
} | |
var ins = $a("//div[@class=\"back\"]")[1]; | |
var skill2 = $x("//div[@class=\"skill2\"]"); | |
var skill3 = $x("//div[@class=\"skill3\"]"); | |
var div1 = d.createElement("div"); | |
div1.className = "cardColmn"; | |
div1.align = "center"; | |
var div2 = d.createElement("div"); | |
div2.className = "control"; | |
div1.appendChild(div2); | |
var a = d.createElement("a"); | |
a.href = caddSessionId("lvup.php?cid=" + URL_PARAM.cid); | |
a.title = "スキルLvを上げる"; | |
a.className = "skillLvUp"; | |
a.appendChild(d.createTextNode("スキルLvを上げる")); | |
div2.appendChild(a); | |
if( !skill3 ) { | |
a = d.createElement("a"); | |
a.href = caddSessionId("learn.php?cid=" + URL_PARAM.cid); | |
a.title = "新しいスキルを習得する"; | |
a.className = "skillLearn"; | |
a.appendChild(d.createTextNode("新しいスキルを習得する")); | |
div2.appendChild(a); | |
} | |
if( skill2 ) { | |
a = d.createElement("a"); | |
a.href = caddSessionId("remove.php?cid=" + URL_PARAM.cid); | |
a.title = "スキルを削除する"; | |
a.className = "skillDelete"; | |
a.appendChild(d.createTextNode("スキルを削除する")); | |
div2.appendChild(a); | |
} | |
ins.parentNode.insertBefore(div1, ins.nextSibling); | |
} | |
////////////////////// | |
//ヨロズダス表示 | |
////////////////////// | |
function disp_PikaYorozu() | |
{ | |
//ヨロズダス画面から残回数確認? | |
if( location.pathname == "/reward_vendor/reward_vendor.php" ) { | |
Pika_updateYorozudasState(); | |
} | |
//ヨロズダス結果画面から残回数確認? | |
if( location.pathname == "/reward_vendor/reward_vendor_result.php") { | |
Pika_updateYorozudasState2(); | |
} | |
Pika_displayYorozudasState(); | |
} | |
////////////////////// | |
//HP回復時間表示 | |
////////////////////// | |
function disp_PikaHPRestTime() | |
{ | |
if(location.pathname != "/card/deck.php") return ; | |
Pika_displayRecoveryEstimates(); | |
} | |
////////////////////// | |
//拠点生産量表示 | |
////////////////////// | |
function disp_SuzanSeisan() | |
{ | |
var icon = IMG_DIR + "common/sidebar/icon_production.gif"; | |
var elms = ccreateSideBox("beyond_sidebox_suzanseisan", icon, "拠点生産"); | |
if(location.pathname == "/village.php") { | |
Suzan_Seisan(elms.sideBoxInner); | |
} | |
} | |
///////////////////////////////////////////////////////////////////////////// | |
//common functions | |
///////////////////////////////////////////////////////////////////////////// | |
function cgetCurrentBaseName() | |
{ | |
var xy = cgetCurrentBaseXY(); | |
return VILLAGES_INFO[(xy.x+"_"+xy.y).replace(/-/g,"m")].basename; | |
} | |
function cgetCurrentBaseXY() | |
{ | |
var nowLoc = $x('id("gnavi")//a[contains(@href,"map.php")]'); | |
if (!nowLoc) nowLoc = $x('id("gNav")//a[contains(@href,"map.php")]'); | |
if (!nowLoc) return null; | |
var xy = nowLoc.href.match(/x=([\-0-9]+)&y=([\-0-9]+)/i); | |
if( xy ) { | |
return {'x':parseInt(xy[1], 10), 'y':parseInt(xy[2], 10)}; | |
} | |
} | |
function cgetDistanceFromBase(x, y) | |
{ | |
if( BASE_X == -9999 ) { | |
var xy = cgetCurrentBaseXY(); | |
if( xy ) { | |
BASE_X = xy.x; | |
BASE_Y = xy.y; | |
} | |
} | |
if( BASE_X != -9999 ) { | |
var a = parseInt(x, 10); | |
var b = parseInt(y, 10); | |
return Math.sqrt(Math.pow(BASE_X - a, 2) + Math.pow(BASE_Y - b, 2)); | |
} | |
return -1; | |
} | |
function cupdateCurrentResources() | |
{ | |
var nowNodes = PRE_LOAD_NODES['nowResources']; | |
RES_NOW["wood"] = parseInt( nowNodes["wood"].innerHTML, 10 ); | |
RES_NOW["stone"] = parseInt( nowNodes["stone"].innerHTML, 10 ); | |
RES_NOW["iron"] = parseInt( nowNodes["iron"].innerHTML, 10 ); | |
RES_NOW["rice"] = parseInt( nowNodes["rice"].innerHTML, 10 ); | |
} | |
function cgetNow() | |
{ | |
var stimeText = PRE_LOAD_NODES['serverTime'].innerHTML; | |
var now = new Date(); | |
var nowTimeAry = stimeText.replace(/^\s*|\s*$/,'').split(":"); | |
now.setHours(parseInt(nowTimeAry[0],10),parseInt(nowTimeAry[1],10),parseInt(nowTimeAry[2],10)); | |
return now; | |
} | |
function caddDate(baseDate, timetxt) | |
{ | |
var tim = timetxt.match(/^(\d+):(\d+):(\d+)/); | |
if( !tim ) return ""; | |
var dt = new Date(baseDate.getFullYear(), | |
baseDate.getMonth(), | |
baseDate.getDate(), | |
baseDate.getHours() + parseInt(tim[1],10), | |
baseDate.getMinutes() + parseInt(tim[2],10), | |
baseDate.getSeconds() + parseInt(tim[3],10) ); | |
return dt.getFullYear() + "-" + (dt.getMonth()+1) + "-" + dt.getDate() + " " + | |
(dt.getHours()+100).toString().substr(-2) + ":" + | |
(dt.getMinutes()+100).toString().substr(-2) + ":" + | |
(dt.getSeconds()+100).toString().substr(-2); | |
} | |
//状態保存用のクッキー | |
function csetCookie(key, data) | |
{ | |
sday = new Date(); | |
sday.setTime(sday.getTime() + (120 * 1000 * 60 * 60 * 24)); | |
d.cookie = key + "=" + escape(data) + ";expires=" + sday.toGMTString() + "; path=/"; | |
} | |
function cgetCookie(key) | |
{ | |
var data = ""; | |
var start = d.cookie.indexOf(key + "="); | |
if (start != -1){ | |
var end = d.cookie.indexOf(";", start); | |
data = unescape(d.cookie.substring(start + key.length + 1, end)); | |
} | |
return data; | |
} | |
function cdelCookie(key) | |
{ | |
d.cookie = key + "=;expires=Thu,01-Jan-70 00:00:01 GMT; path=/"; | |
} | |
function csetUserXY(aid, uid, x, y) | |
{ | |
var allylists = cloadData( "allyXYAllyList", "[]", true, true ); | |
if( allylists.indexOf(aid) == -1 ) { | |
allylists.push(aid); | |
csaveData( "allyXYAllyList", allylists, true, true ); | |
} | |
var lists = cloadData( "allyXYList" + aid, "[]", true, true ); | |
for(var i=0 ; i<lists.length ; i++) { | |
if( lists[i].id == uid ) { | |
return; | |
} | |
} | |
lists.push({"id":uid, "x":x, "y":y}); | |
csaveData( "allyXYList" + aid, lists, true, true ); | |
} | |
function cdeleteUserXY(aid) | |
{ | |
var allylists = cloadData( "allyXYAllyList", "[]", true, true ); | |
var idx = allylists.indexOf(aid); | |
if( idx != -1 ) { | |
allylists.splice(idx,1); | |
csaveData( "allyXYAllyList", allylists, true, true ); | |
} | |
cdelData( "allyXYList" + aid, true ); | |
} | |
function cresetUserXY() | |
{ | |
var allylists = cloadData( "allyXYAllyList", "[]", true, true ); | |
for(var i=0 ; i<allylists.length ; i++) { | |
cdelData( "allyXYList" + allylists[i], true ); | |
} | |
cdelData( "allyXYAllyList", true ); | |
} | |
function cgetXYHtml(x,y) | |
{ | |
var img_send = IMG_DIR + "report/icon_go.gif"; | |
var img_mp = IMG_DIR + "report/icon_scout.gif"; | |
var m = ""; | |
var dist = cgetDistanceFromBase(x, y); | |
if( dist != -1 ) { | |
m = " 距離[" + dist.toFixed(2) + "]"; | |
} | |
var txt = ''; | |
txt += '<a href="'+caddSessionId('/land.php?x=' + x + '&y=' + y + '#ptop')+'" title="表示" style="color:#0099cc; text-decoration: none;" onmouseover="'; | |
txt += "this.style.textDecoration='underline';"+'" onmouseout="'+"this.style.textDecoration='none';"+'">' + x + ',' + y + '</a>'; | |
txt += '<a href="'+caddSessionId('/map.php?x=' + x + '&y=' + y + '#ptop')+'" title="マップ' + x + ',' + y + '"><img src="' + img_mp + '" style="width:12px; height:12px; vertical-align:middle;"></a>'; | |
txt += '<a href="'+caddSessionId('/facility/castle_send_troop.php?x=' + x + '&y=' + y + '#ptop')+'" title="兵を送る' + x + ',' + y + m + '">'; | |
txt += '<img src="' + img_send + '" style="width:12px; height:12px; vertical-align:middle;"></a>'; | |
return txt; | |
} | |
function cajaxRequest(url, method, param, func_success, func_fail){ | |
var req = new XMLHttpRequest(); | |
req.onreadystatechange = function() { | |
if (req.readyState == 4 && req.status == 200){ | |
func_success(req); | |
} | |
else if (req.readyState == 4 && req.status != 200){ | |
func_fail(req); | |
} | |
}; | |
if (SID) { | |
var sdata = method.toLowerCase() == 'get' ? url : param; | |
if (sdata.search(/(\?|&)SSID=[^&]+&?/i) < 0) { | |
if (method.toLowerCase() == 'get') { | |
url += (0 <= url.indexOf('?')) ? '&' : '?'; | |
url += SID; | |
} | |
else { | |
if (typeof param != 'string') param = ''; | |
if (0 < param.length) param += '&'; | |
param += SID; | |
} | |
} | |
} | |
req.open(method, url, true); | |
if (method == 'POST'){ | |
req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); | |
} | |
req.send(param); | |
} | |
function str2csvstr(str) { | |
var csvstr; | |
csvstr = str.replace(/^[\s ]+|[\s ]+$/g, ""); | |
csvstr = csvstr.replace(/\"/g, "\"\""); | |
if (csvstr.indexOf(",") != -1) { | |
csvstr = "\"" + csvstr + "\""; | |
} | |
return csvstr; | |
} | |
function cgetElementXY(elm) { | |
if( !elm ) return null; | |
var xx = 0; | |
var yy = 0; | |
while(elm){ | |
xx += elm.offsetLeft; | |
yy += elm.offsetTop; | |
elm = elm.offsetParent; | |
} | |
return {"x":xx, "y":yy}; | |
} | |
// 2014/02/21 21x21マップ対応 | |
function cgetMapNofromXY(x, y, base_x, base_y, type) | |
{ | |
if( isNaN(""+base_x) ) base_x = 0; | |
if( isNaN(""+base_y) ) base_y = 0; | |
var sc = 11; | |
var hosei = 0; | |
if( type == 2 ) { | |
sc = 15; | |
} else if( type == 5 ) { | |
sc = 21; | |
hosei = 1; | |
} | |
var hw = Math.floor( (sc - 1) / 2 ); | |
var no = ""; | |
if( x >= base_x - hw && x <= base_x - hw + sc - 1 && | |
y >= base_y - hw - hosei && y <= base_y - hw + sc - 1 - hosei ) { | |
no = (x - base_x + hw) * sc + (base_y + hw - y ) + 1; | |
if( no < 10 ) no = "0" + no; | |
else no = "" + no; | |
} | |
return no; | |
} | |
function ccreateCheckBox(container, id, def, text, title, left ) | |
{ | |
left += 2; | |
var dv = d.createElement("div"); | |
dv.style.padding = "2px"; | |
dv.style.paddingLeft= left + "px"; | |
dv.title = title; | |
var cb = d.createElement("input"); | |
cb.type = "checkbox"; | |
cb.id = id; | |
cb.value = 1; | |
if( def ) cb.checked = true; | |
var lb = d.createElement("label"); | |
lb.htmlFor = id; | |
var tx = d.createTextNode(text); | |
lb.appendChild( tx ); | |
dv.appendChild(cb); | |
dv.appendChild(lb); | |
container.appendChild(dv); | |
return cb; | |
} | |
function ccreateTextBox(container, id, def, text, title, size, left ) | |
{ | |
left += 2; | |
var dv = d.createElement("div"); | |
dv.style.padding = "2px"; | |
dv.style.paddingLeft= left + "px"; | |
dv.title = title; | |
var tb = d.createElement("input"); | |
tb.type = "text"; | |
tb.id = id; | |
tb.value = def; | |
tb.size = size; | |
var tx = d.createTextNode(text); | |
tx.title = title; | |
dv.appendChild(tx); | |
dv.appendChild(tb); | |
container.appendChild(dv); | |
return tb; | |
} | |
function ccreateComboBox(container, id, sels, def, text, title, left ) | |
{ | |
left += 2; | |
var dv = d.createElement("div"); | |
dv.style.padding = "2px"; | |
dv.style.paddingLeft= left + "px"; | |
dv.title = title; | |
var sel = d.createElement("select"); | |
sel.id = id; | |
for(var i=0; i<sels.length; i++){ | |
var opt = d.createElement("option"); | |
opt.value = sels[i]; | |
opt.appendChild(d.createTextNode(sels[i])); | |
sel.appendChild(opt); | |
} | |
if( def ) sel.value = def; | |
var tx = d.createTextNode(text); | |
tx.title = title; | |
dv.appendChild(tx); | |
dv.appendChild(sel); | |
container.appendChild(dv); | |
return sel; | |
} | |
function ccreateButton(container, text, title, func) | |
{ | |
var btn = d.createElement("input"); | |
btn.style.padding = "1px"; | |
btn.type = "button"; | |
btn.value = text; | |
btn.title = title; | |
container.appendChild(d.createTextNode(" ")); | |
container.appendChild(btn); | |
container.appendChild(d.createTextNode(" ")); | |
$e(btn, "click", func); | |
return btn; | |
} | |
function cgetCheckBoxValue(id) | |
{ | |
var c = $(id); | |
if( !c ) return 0; | |
if( !c.checked ) return 0; | |
return 1; | |
} | |
function cgetTextBoxValue(id) | |
{ | |
var c = $(id); | |
if( !c ) return ""; | |
return c.value; | |
} | |
function ccreateSideBox(id, img, title) //faraway110523 メモ機能や領地リンクが1つだとCPを購入する辺り(右上)に重なって表示される | |
{ | |
var icon_box = 'data:image/gif;base64,'+ | |
'R0lGODlhCwALAJEAAP///zMzM////wAAACH5BAUUAAIALAAAAAALAAsAAAIVjI8Gy6z5AoAyplkh'+ | |
'xteiTW1NQyUFADs='; | |
var conf = cloadData( id + "conf" , '{"float":false, "open":true, "x":"", "y":"", "pos":99 }', true, true ); | |
var elm_box = d.createElement("div"); | |
elm_box.id = id; | |
elm_box.className = "sideBox"; | |
var elm_boxHead = d.createElement("div"); | |
elm_boxHead.className = "sideBoxHead"; | |
elm_box.appendChild(elm_boxHead); | |
if (isNarrow) { | |
elm_box.style.cssFloat = "left"; | |
elm_box.style.marginLeft = "10px"; | |
} | |
var elm_h3 = d.createElement("h3"); | |
var elm_strong = d.createElement("strong"); | |
var elm_img = d.createElement("img"); | |
elm_img.src = img; | |
elm_strong.appendChild(elm_img); | |
elm_strong.appendChild(d.createTextNode(title)); | |
var elm_span=d.createElement("span"); | |
elm_span.className = "beyond_panel_ctlbox"; | |
var elm_img_up = d.createElement("img"); | |
elm_img_up.src= IMG_DIR + "trade/icon_up.gif"; | |
elm_img_up.title = "パネルを上に"; | |
elm_img_up.id = id + "up"; | |
var elm_img_down = d.createElement("img"); | |
elm_img_down.src= IMG_DIR + "trade/icon_down.gif"; | |
elm_img_down.title = "パネルを下に"; | |
elm_img_down.id = id + "down"; | |
var elm_img_box = d.createElement("img"); | |
elm_img_box.src= icon_box; | |
elm_img_box.title = "フローティング/ドッキングの切り替え"; | |
elm_span.appendChild(elm_img_up); | |
elm_span.appendChild(elm_img_box); | |
elm_span.appendChild(elm_img_down); | |
elm_strong.appendChild(elm_span); | |
elm_h3.appendChild(elm_strong); | |
elm_boxHead.appendChild(elm_h3); | |
var elm_boxInner = d.createElement("div"); | |
elm_boxInner.className = "sideBoxInner"; | |
if( !conf.open ) { | |
elm_boxInner.style.display = "none"; | |
elm_img.style.opacity = 0.3; | |
} | |
elm_box.appendChild(elm_boxInner); | |
$e(elm_img, "click", function(){ | |
var sidebox = $(id); | |
var op = false; | |
if( !sidebox ) return; | |
var inner = $x('.//div[contains(@class,"sideBoxInner")]', sidebox); | |
if( !inner ) return; | |
if( inner.style.display == "none" ){ | |
inner.style.display = ""; | |
this.style.opacity = 1; | |
op = true; | |
}else{ | |
inner.style.display = "none"; | |
this.style.opacity = 0.3; | |
} | |
var conf = cloadData( id + "conf" , '{"float":false, "open":true, "x":"", "y":"", "pos":99 }', true, true ); | |
conf.open = op; | |
csaveData( id + "conf", conf, true, true ); | |
} ); | |
$e(elm_img_up, "click", function(){ | |
var sidebox = $(id); | |
if( sidebox.parentNode.id != "beyond_fixpanel" ) return; | |
var target = sidebox.previousSibling; | |
if( !target ) return; | |
sidebox.parentNode.removeChild(sidebox); | |
target.parentNode.insertBefore(sidebox, target); | |
crenumberSideBox(); | |
}); | |
$e(elm_img_down, "click", function(){ | |
var sidebox = $(id); | |
if( sidebox.parentNode.id != "beyond_fixpanel" ) return; | |
var target = sidebox.nextSibling; | |
if( !target ) return; | |
sidebox.parentNode.removeChild(sidebox); | |
target.parentNode.insertBefore(sidebox, target.nextSibling); | |
crenumberSideBox(); | |
}); | |
$e(elm_img_box, "click", function(){ | |
var sidebox = $(id); | |
if( !sidebox ) return; | |
var conf = cloadData( id + "conf" , '{"float":false, "open":true, "x":"", "y":"", "pos":99 }', true, true ); | |
if( sidebox.parentNode.id == "beyond_fixpanel" ) { | |
if( isNaN(""+conf.x) || conf.x == "" || isNaN(""+conf.y) || conf.y == "" ) { | |
var xy = cgetElementXY(sidebox); | |
conf.x = xy.x; | |
conf.y = xy.y; | |
} | |
var cx = d.body.clientWidth; | |
var cy = d.body.clientHeight; | |
var eW = elm_box.clientWidth; | |
var eH = elm_box.clientHeight; | |
elm_box.style.left = conf.x + "px"; | |
elm_box.style.top = conf.y + "px"; | |
if ((conf.x + eW) <= 0) { | |
elm_box.style.left = "0px"; | |
} | |
else if (cx <= conf.x ) { | |
elm_box.style.left = (cx - eW) + "px"; | |
} | |
if ((conf.y + eH) <= 0) { | |
elm_box.style.top = "0px"; | |
} | |
else if (cy <= conf.y) { | |
elm_box.style.top = (cy - eH) + "px"; | |
} | |
sidebox.parentNode.removeChild(sidebox); | |
$("beyond_floatpanel").appendChild(sidebox); | |
sidebox.style.position = "absolute"; | |
sidebox.style.top = conf.y + "px"; | |
sidebox.style.left = conf.x + "px"; | |
sidebox.style.zIndex = 1000; | |
conf.float = true; | |
$(id + "up").style.display = "none"; | |
$(id + "down").style.display = "none"; | |
}else { | |
sidebox.parentNode.removeChild(sidebox); | |
$("beyond_fixpanel").appendChild(sidebox); | |
sidebox.style.position = ""; | |
sidebox.style.top = ""; | |
sidebox.style.left = ""; | |
sidebox.style.backgroundColor = ""; | |
sidebox.style.border = ""; | |
sidebox.style.zIndex = ""; | |
conf.float = false; | |
$(id + "up").style.display = ""; | |
$(id + "down").style.display = ""; | |
csortSideBox(); | |
} | |
csaveData( id + "conf", conf, true, true ); | |
SetPositionBox(id, title, elm_box, 1); //faraway110526 | |
} ); | |
var movedNode = null; | |
var currentZIndex = 0; | |
$e(elm_boxHead, "mousedown", function(event){ | |
movedNode = $(id); | |
if( movedNode.parentNode.id != "beyond_floatpanel" ) return true; | |
g_MD = id; | |
g_MX = event.pageX-parseInt(movedNode.style.left,10); | |
g_MY = event.pageY-parseInt(movedNode.style.top,10); | |
currentZIndex = document.defaultView.getComputedStyle(movedNode, '').zIndex; | |
movedNode.style.zIndex = 9999; | |
if (navigator.userAgent.toLowerCase().indexOf('chrome') == -1) { | |
event.preventDefault(); | |
} | |
conf = cloadData( id + "conf" , '{"float":false, "open":true, "x":"", "y":"", "pos":99 }', true, true ); | |
}); | |
$e(d, "mousemove", function(event){ | |
if(g_MD != id) return true; | |
if( movedNode.parentNode.id != "beyond_floatpanel" ) return true; | |
var x = event.pageX - g_MX; | |
var y = event.pageY - g_MY; | |
movedNode.style.left = x + "px"; | |
movedNode.style.top = y + "px"; | |
conf.x = x; | |
conf.y = y; | |
}); | |
$e(d, "mouseup", function(event){ | |
if(g_MD != id) return true; | |
g_MD = ""; | |
movedNode.style.zIndex = currentZIndex; | |
movedNode = null; | |
csaveData( id + "conf", conf, true, true ); | |
}); | |
if( conf.float && !(isNaN(""+conf.x) || isNaN(""+conf.y))) { | |
elm_box.style.position = "absolute"; | |
elm_box.style.zIndex = 1000; | |
elm_img_up.style.display = "none"; | |
elm_img_down.style.display = "none"; | |
$("beyond_floatpanel").appendChild(elm_box); | |
var cx = d.body.clientWidth; | |
var cy = d.body.clientHeight; | |
var eW = elm_box.clientWidth; | |
var eH = elm_box.clientHeight; | |
elm_box.style.left = conf.x + "px"; | |
elm_box.style.top = conf.y + "px"; | |
if ((conf.x + eW) <= 0) { | |
elm_box.style.left = "0px"; | |
} | |
else if (cx <= conf.x ) { | |
elm_box.style.left = (cx - eW) + "px"; | |
} | |
if ((conf.y + eH) <= 0) { | |
elm_box.style.top = "0px"; | |
} | |
else if (cy <= conf.y) { | |
elm_box.style.top = (cy - eH) + "px"; | |
} | |
} else { | |
SetPositionBox(id, title, elm_box, 0); //faraway110525 | |
$("beyond_fixpanel").appendChild(elm_box); | |
} | |
return {"sideBox":elm_box, "sideBoxHead":elm_boxHead, "sideBoxInner":elm_boxInner }; | |
} | |
function SetPositionBox(id, title, elm_box, dat) //faraway110525 | |
{ | |
var ccnt = 0 - dat; | |
if(OPT_STYLE == 0) return; //スタイル変更 | |
if(OPT_MEMO == 1){ //メモ機能 | |
ccnt = OPT_MEMO_COUNT; | |
if(OPT_MEMO_COUNT == 1){ //メモ数(1~5)" | |
} | |
} | |
if(OPT_MAPLINK == 1){ //領地リンク機能 | |
ccnt++; | |
} | |
if(OPT_REMOVELIST == 1){ //破棄中の領地表示(領地レベル表示) | |
ccnt++; | |
} | |
if( OPT_SUZAN_SEISAN == 1){ //拠点生産量表示 | |
ccnt++; | |
} | |
if( ccnt <= 1){ | |
if(id == "beyond_sidebox_villageListBox"){//拠点 | |
elm_box.style.position = "absolute"; | |
elm_box.style.top = "311px"; | |
elm_box.style.left = "761px"; | |
elm_box.style.zIndex = 1000; | |
} | |
} | |
if( ccnt <= 1){ | |
if(OPT_MEMO == 1){ //メモ機能" | |
if(id.match("beyond_sidebox_memo")){ //メモ | |
SetPositionBoxSub(elm_box); | |
} | |
} | |
if(OPT_MAPLINK == 1){ //領地リンク機能" | |
if(id == "beyond_sidebox_xylink"){ //領地/君主リンク | |
SetPositionBoxSub(elm_box); | |
} | |
} | |
if(OPT_REMOVELIST ==1){//破棄中の領地表示(領地レベル表示) | |
if(id == "beyond_sidebox_removelist"){ //建設/破棄リスト | |
SetPositionBoxSub(elm_box); | |
} | |
} | |
if( OPT_SUZAN_SEISAN == 1){ //拠点生産量表示 | |
if(id == "beyond_sidebox_suzanseisan"){ //拠点生産 | |
SetPositionBoxSub(elm_box); | |
} | |
} | |
} | |
} | |
function SetPositionBoxSub(elm_box){ //faraway110525 | |
elm_box.style.position = "absolute"; | |
elm_box.style.top = "411px"; | |
elm_box.style.left = "761px"; | |
elm_box.style.zIndex = 1000; | |
} | |
function csortSideBox() | |
{ | |
var sideboxes = $a("//div[@id=\"beyond_fixpanel\"]/div[@class=\"sideBox\"]"); | |
var srt = new Array(); | |
for(var i=0 ; i<sideboxes.length ; i++) { | |
var pos = 0; | |
var conf = cloadData( sideboxes[i].id + "conf" , '{"float":false, "open":true, "x":"", "y":"", "pos":99 }', true, true ); | |
pos = conf.pos; | |
srt.push({"node":sideboxes[i], "pos":pos}); | |
} | |
srt.sort( function(a,b) {return a.pos - b.pos;}); | |
for(var i=0 ; i<srt.length ; i++){ | |
srt[i].node.parentNode.removeChild(srt[i].node); | |
} | |
var fixpanel = $("beyond_fixpanel"); | |
for(var i=0 ; i<srt.length ; i++){ | |
fixpanel.appendChild(srt[i].node); | |
} | |
} | |
function crenumberSideBox() | |
{ | |
var sideboxes = $a("//div[@id=\"beyond_fixpanel\"]/div[@class=\"sideBox\"]"); | |
for(var i=0 ; i<sideboxes.length ; i++) { | |
var conf = cloadData( sideboxes[i].id + "conf" , '{"float":false, "open":true, "x":"", "y":"", "pos":99 }', true, true ); | |
conf.pos = i; | |
csaveData( sideboxes[i].id + "conf", conf, true, true ); | |
} | |
} | |
function cappendColumnForProfile(title, id) | |
{ | |
var tds = $a('//table[@class="commonTables"]//th[contains(text(),"座標")]/../preceding-sibling::tr/*[contains("tdTDthTH",name())][last()]'); | |
for(var i=0 ; i<tds.length ; i++) { | |
tds[i].colSpan++; | |
} | |
var tr = $x('//table[@class="commonTables"]//th[contains(text(),"座標")]/..'); | |
var th = d.createElement("th"); | |
th.className = "ttl4"; | |
th.id = id + "_title"; | |
th.appendChild( d.createTextNode( title ) ); | |
tr.appendChild( th ); | |
var trs = $a('//table[@class="commonTables"]//th[contains(text(),"座標")]/../following-sibling::tr'); | |
for(var i=0 ; i<trs.length ; i++) { | |
var xytd = trs[i].childNodes[3]; | |
if( !xytd ) continue; | |
var xy = xytd.innerHTML.match(/([\-0-9]+),([\-0-9]+)/); | |
if( !xy ) continue; | |
var td = d.createElement("td"); | |
td.id = id + "_" + xy[1] + "_" + xy[2]; | |
trs[i].appendChild(td); | |
var pstd = trs[i].childNodes[5]; | |
if( !pstd ) continue; | |
if( pstd.innerHTML != " " ) { | |
td.textContent = "-"; | |
} | |
} | |
} | |
function csetUserStar(uid, x, y, star, wood, stone, iron, rice, npc) | |
{ | |
var userlists = cloadData( "UserStarUserList", "[]", true, true ); | |
if( userlists.indexOf(uid) == -1 ) { | |
userlists.push(uid); | |
csaveData( "UserStarUserList", userlists, true, true ); | |
} | |
var lists = cloadData( "UserStarList" + uid, "[]", true, true ); | |
for(var i=0 ; i<lists.length ; i++) { | |
if( lists[i].x == x && lists[i].y == y ) { | |
return; | |
} | |
} | |
lists.push({"star":star, "x":x, "y":y, "wood":wood, "stone":stone, "iron":iron, "rice":rice, "npc":npc }); | |
csaveData( "UserStarList" + uid, lists, true, true ); | |
} | |
function cresetUserStar() | |
{ | |
var userlists = cloadData( "UserStarUserList", "[]", true, true ); | |
for(var i=0 ; i<userlists.length ; i++) { | |
cdelData( "UserStarList" + userlists[i], true ); | |
} | |
cdelData( "UserStarUserList", true ); | |
} | |
function csetMyLevel(x, y, level) | |
{ | |
var lists = cloadData( "MyLevelList", "[]", true, true ); | |
var ins = true; | |
for(var i=0 ; i<lists.length ; i++) { | |
if( lists[i].x == x && lists[i].y == y ) { | |
if( level == -1 ) { | |
lists[i].level++; | |
}else{ | |
lists[i].level = level; | |
} | |
ins = false; | |
break; | |
} | |
} | |
if( ins && level != -1) { | |
lists.push({"x":x, "y":y, "level":level}); | |
} | |
csaveData( "MyLevelList", lists, true, true ); | |
} | |
function cdelMyLevel(x, y) | |
{ | |
var lists = cloadData( "MyLevelList", "[]", true, true ); | |
for(var i=0 ; i<lists.length ; i++) { | |
if( lists[i].x == x && lists[i].y == y ) { | |
lists.splice(i,1); | |
csaveData( "MyLevelList", lists, true, true ); | |
break; | |
} | |
} | |
} | |
function cdelData(key, local ) | |
{ | |
if( local ) key = location.hostname + key; | |
GM_deleteValue( key ); | |
} | |
////////////////////////////////////////////////////////////////// | |
//プレゼンツbyピカチュウ関数群 | |
//http://shigematsu.org/ | |
//↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ | |
////////////////////////////////////////////////////////////////// | |
function Pika_blinkElements() | |
{ | |
// Drift-free blinking routine | |
var opacity = Math.round((new Date() % 1000) / 1000); | |
for (var i = 0; i < Pika_elementQueue.length; ++i) { | |
Pika_elementQueue[i].style.opacity = opacity; | |
} | |
window.setTimeout(function() { Pika_blinkElements(); }, 500); | |
} | |
function Pika_updateYorozudasState() { | |
var x = $a('//div[@class="sysMes"]/strong'); | |
if( x.length < 3 ) return; | |
var nextUpdate = new Date(x[2].textContent.replace(/-/g, '/')).getTime(); | |
var info = { | |
current: +x[0].textContent, | |
nextUpdate: nextUpdate, | |
confirm: nextUpdate - (24 * 60 * 60) | |
}; | |
csaveData('yorozudas_state', info, true, true); | |
Pika_displayYorozudasState(); | |
} | |
function Pika_updateYorozudasState2() { //result用を追加 | |
var x = $a('//div[@class="sysMes2"]/strong'); | |
if( x.length < 1 ) return; | |
var nextUpdate = new Date(x[1].textContent.replace(/-/g, '/')).getTime(); | |
var info = { | |
current: +x[0].textContent, | |
nextUpdate: nextUpdate, | |
confirm: nextUpdate - (24 * 60 * 60) | |
}; | |
csaveData('yorozudas_state', info, true, true); | |
Pika_displayYorozudasState(); | |
} | |
function Pika_displayYorozudasState() { | |
var xpath = '(id("sidebar")/ul/li | id("btn_area_box"))/a[contains(@href, "/reward_vendor/reward_vendor.php")]/img';//20121011 ひろひろひろ | |
if (OPT_SMALLBTN) { | |
xpath += '/..'; | |
} | |
var img_yorozu = $x(xpath); | |
var info = cloadData('yorozudas_state', '{}', true, true); | |
var now = new Date().getTime(); | |
if (info.nextUpdate < now) { | |
Pika_elementQueue.push(img_yorozu); | |
} else { | |
if (info.current <= 0) { | |
img_yorozu.style.opacity = 0.5; | |
} else { | |
if (info.confirm > 0 | |
&& info.confirm < now) { | |
if (confirm('ヨロズダスが引けますが、まだ引いていません。\n後でまた通知しますか?')) { | |
var delta = (info.nextUpdate - now) / 3600; | |
if (delta < 4) { | |
info.confirm += 1 * 60 * 60; // 1 hour later | |
} else if (delta < 8) { | |
info.confirm += 2 * 60 * 60; // 2 hours later | |
} else { | |
info.confirm += 4 * 60 * 60; | |
} | |
} else { | |
info.confirm = 0; | |
} | |
csaveData('yorozudas_state', info, true, true); | |
} | |
} | |
} | |
} | |
function Pika_displayRecoveryEstimates() { | |
var | |
candidates = $a('//*[@id="deck_file"]//*[div[@class="setPlace false"]]'); | |
for (var i = 0; i < candidates.length; ++i) { | |
var level = + $x('*//*[starts-with(@class,"level_")]', candidates[i]).innerHTML; | |
var hp = + candidates[i].getElementsByClassName('status_hp') | |
[0].textContent.toString().split(/[\/]/)[0]; | |
if (hp >= 100) continue; | |
var hours = (level <= 5) ? Math.pow(2, level - 2) * (100 - hp) / 100 : | |
(level <= 10) ? 4 * (level - 3) * (100 - hp) / 100 : | |
(level <= 200) ? (level + 20) * (100 - hp) / 100: | |
220 * (100 - hp) / 100; | |
var msg = Pika_formatEstimate(hours, false) + 'にHP全回復'; | |
candidates[i].getElementsByClassName('setPlace false')[0].innerHTML = msg; | |
} | |
candidates = $a('//*[@id="deck_file"]//*[div[@class="control"]/dl/dd[contains(text(),"治療中")]]'); | |
for (var i = 0; i < candidates.length; ++i) { | |
var level = + $x('*//*[starts-with(@class,"level_")]', candidates[i]).innerHTML; | |
var hp = + candidates[i].getElementsByClassName('status_hp') | |
[0].textContent.toString().split(/[\/]/)[0]; | |
if (hp >= 100) continue; | |
var hours = (level <= 5) ? Math.pow(2, level - 2) * (100 - hp) / 100 : | |
(level <= 10) ? 4 * (level - 3) * (100 - hp) / 100 : | |
(level <= 200) ? (level + 20) * (100 - hp) / 100: | |
220 * (100 - hp) / 100; | |
var msg = Pika_formatEstimate(hours, false) + '<br>にHP全回復'; | |
candidates[i].getElementsByTagName('dd')[2].innerHTML = msg; | |
candidates[i].getElementsByTagName('dd')[2].style.fontSize = "10px"; | |
candidates[i].getElementsByTagName('dd')[2].style.margin = "0px"; | |
} | |
window.setTimeout(function() { Pika_displayRecoveryEstimates(); }, 60*1000); | |
} | |
function Pika_formatEstimate(hours, displaySecs) { | |
var msg = ''; | |
var now = new Date(); | |
var xday = new Date(now.getTime() + hours * 60 * 60 * 1000); | |
var days = Math.floor(hours / 24); | |
var delta = Math.floor( | |
( | |
new Date(xday.getYear(), xday.getMonth(), xday.getDate()) - | |
new Date(now .getYear(), now .getMonth(), now .getDate()) | |
) | |
/ (24 * 60 * 60 * 1000)); | |
if (delta == 0) msg = ''; | |
else if (delta == 1) msg = '明日'; | |
else if (delta == 2) msg = '明後日'; | |
else msg = delta + '日後'; | |
msg += xday.getHours() + '時'; | |
msg += xday.getMinutes() + '分 '; | |
if (days == 0) { | |
var seconds = Math.floor((hours * 3600) % 60); | |
var minutes = Math.floor((hours * 60) % 60); | |
hours = Math.floor(hours); | |
if (hours == 0) { | |
if (displaySecs) { | |
msg += '(' + minutes + '分' + seconds + '秒後) '; | |
} | |
else { | |
msg += '(' + minutes + '分後) '; | |
} | |
} | |
else { | |
msg += '(' + hours+ '時間' + minutes +'分後) '; | |
} | |
} | |
return msg; | |
} | |
//------------------------------------------------- | |
// マップ画面検索改善 | |
//------------------------------------------------- | |
function Pika_installMapXYHelper() { | |
if( location.pathname != '/map.php' && location.pathname != '/big_map.php'){ | |
return; | |
} | |
// 初期値入力された値けす(2014/02/21) | |
j$ = unsafeWindow.jQuery; | |
j$("#map-xy-search").each(function(){ | |
j$("input[@type=text]",this).attr("value",""); | |
}); | |
var btn = $x('//div[@id="map-xy-search"]//input[@type="text"]'); | |
if( !btn ){ | |
return; | |
} | |
btn.addEventListener('click', | |
function() { | |
var xpath = '//div[@id="map-xy-search"]//input[@type="text"]'; | |
var xy = $a(xpath); | |
var x = xy[0].value.toString(); | |
if (x.match(/(-?\d+)[ .,&、](?:y=)?(-?\d+)/)) { | |
xy[0].value = RegExp.$1; | |
xy[1].value = RegExp.$2; | |
} | |
}, false); | |
} | |
//------------------------------------------------- | |
// 51x51マップ中央ガイド削除 | |
//------------------------------------------------- | |
function map51_guide_off() { | |
if(location.pathname != '/big_map.php'){ | |
return; | |
} | |
j$ = unsafeWindow.jQuery; | |
j$("#map51-content a[class*=guide]").remove(); | |
} | |
//------------------------------------------------- | |
// トレード画面入力改善 | |
//------------------------------------------------- | |
function Pika_installTradeHelper() { | |
if( location.pathname != '/card/trade.php' ){ | |
return; | |
} | |
$('button') | |
.addEventListener('click', | |
function() { | |
var element = $x('//div[@class="formSearch"]/select'); | |
var index = element.selectedIndex; | |
if (index == 0 || index == 3) { | |
if ($('k').value.toString().match(/[1-4]\d{3}/)) { | |
element.selectedIndex = 2; | |
} | |
} | |
}, false); | |
} | |
function Pika_prepareForDisplayBuildStatus() | |
{ | |
var maps = $('maps'); | |
var xpath = 'img[contains(@src, "/img_lv0.gif")]/@class'; | |
var nodes = $a(xpath, maps); | |
for (var i = 0; i < nodes.length; ++i) { | |
var index = nodes[i].value.toString().substr(-2); | |
var xpath = 'img[@class="map' + index +'" and contains(@src, "/facility_10")]'; | |
var isResourceProducingLot = $a(xpath, maps).length; | |
if (!isResourceProducingLot) { | |
$x('//img[@class="mapicon'+index+'"]').src = | |
'data:image/gif;base64,'+ | |
'R0lGODlhFwAWAMQfADp1MxYsFzp7NEGdQTp7Nm2bac7dzebu5l6TWkWmRZ69nPL2'+ | |
'8kWAQLXNszuNO7/UvzV7NWqVZU6PTNrm2Y20i0apRj+WP1LOc0y7TDmDOSAgID+G'+ | |
'OShRLz9+N////////yH5BAEAAB8ALAAAAAAXABYAAAW74PdxZGmepShyV+u+sMut'+ | |
'WG3fOD5zVe8niYFQmPD5OBqOZcm0OCQUg4HiaC6RnIx2m4E8PGCPAsLNYDfoNAGx'+ | |
'OEgKYEYafZ5vCJODYN/wFOx1cwhiAhsCCh4IgEl2G3ANAJEGBwSLWWUMYBQRXwUE'+ | |
'XARYHaOkh2ELBQKkpKKrowARChQMAK6jrbaRkba3GiO8wKwaviMoHLwlwyofw83D'+ | |
'rs7Ky9MiqwEB1NnLpNfa3h+j3d/aHeLj2tjfIQA7'; | |
} | |
} | |
} | |
function Pika_displayBuildStatus() { | |
var xpath = 'id("actionLog")//li/span[@class="buildStatus" and contains(.,"建設")]/a'; | |
var nodes = $a(xpath); | |
var facilities = {}; | |
for (var i = 0; i < nodes.length; ++i) { | |
nodes[i].href.match(/x=(\d+)&y=(\d+)/); | |
var x = parseInt(RegExp.$1,10); | |
var y = parseInt(RegExp.$2,10); | |
var index = (101 + x * 7 + y).toString().substr(-2); | |
facilities[index] = index; | |
} | |
for (var index in facilities) { | |
Pika_elementQueue.push(document.getElementsByClassName('map'+index)[0]); | |
Pika_elementQueue.push(document.getElementsByClassName('mapicon'+index)[0]); | |
} | |
var deleting = $x('//*[@id="actionLog"]/ul/li[contains(text(), "削除中")]/span[@class="buildStatus"]/a'); | |
if (deleting && deleting.href.match(/x=(\d+)&y=(\d+)/)) { | |
var x = +RegExp.$1; | |
var y = +RegExp.$2; | |
var index = (101 + x * 7 + y).toString().substr(-2); | |
document.getElementsByClassName('map'+index)[0] | |
.style.opacity = 0.5; | |
document.getElementsByClassName('mapicon'+index)[0] | |
.style.opacity = 0.5; | |
} | |
} | |
////////////////////////////////////////////////////////////////// | |
//↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ | |
//プレゼンツbyピカチュウ関数群 | |
////////////////////////////////////////////////////////////////// | |
////////////////////////////////////////////////////////////////// | |
//プレゼンツbysu-zan関数群 | |
//http://shigematsu.org/ | |
//↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ | |
////////////////////////////////////////////////////////////////// | |
function Suzan_Seisan(inner) | |
{ | |
var yieldList = { | |
other : [0,6,14,25,50,80,117,162,214,272,335,404,476,550,626,702], | |
rice : [0,6,18,36,72,114,167,231,305,388,479,577,680,786,894,1003] | |
}; | |
var yieldExtends = [ | |
{ | |
name : '水車', | |
facility : { | |
match : '畑', | |
data : [0,0.03,0.06,0.09,0.12,0.15,0.18,0.21,0.24,0.27,0.3] | |
}, | |
resource : { | |
match : '穀物', | |
data : [0,40,60,80,110,140,180,220,270,350,450] | |
} | |
}, | |
{ | |
name : '工場', | |
facility : { | |
match : '伐採所石切り場製鉄所', | |
data : [0,0.03,0.05,0.08,0.1,0.13,0.15,0.18,0.2,0.23,0.25] | |
}, | |
resource : { | |
match : '森林岩山鉄鉱山', | |
data : [0,55,65,75,95,115,145,185,235,300,380] | |
} | |
} | |
]; | |
var seisan = { w:0, s:0, i:0, r:0 }; | |
for (var i = 0; i < 2;i++) { | |
var yieldExtend = yieldExtends[i]; | |
var yieldExtendArea = $x('//area[starts-with(@alt,"'+yieldExtend.name+'")]'); | |
if (!yieldExtendArea) { | |
continue; | |
} | |
var yieldExtendAreaInfo = cgetFacilityInfoFromArea(yieldExtendArea); | |
var yieldExtendResource = yieldExtend.resource.data[yieldExtendAreaInfo.lv]; | |
var yieldExtendFacility = yieldExtend.facility.data[yieldExtendAreaInfo.lv]; | |
var squreaAreas = cgetSquareElementFromArea(yieldExtendArea); | |
for (var key in squreaAreas) { | |
if (!squreaAreas[key]) { | |
continue; | |
} | |
var squreaArea = squreaAreas[key]; | |
var squreaAreaInfo = cgetFacilityInfoFromArea(squreaArea); | |
var dataKey = nameToDataKey(squreaAreaInfo.name); | |
if (0 <= yieldExtend.resource.match.indexOf(squreaAreaInfo.name)) { | |
seisan[dataKey] += yieldExtendResource; | |
} | |
else if (0 <= yieldExtend.facility.match.indexOf(squreaAreaInfo.name)) { | |
seisan[dataKey] += Math.ceil(yieldExtendFacility * yieldList[getYieldKeyFromDataKey(dataKey)][squreaAreaInfo.lv]); | |
} | |
} | |
} | |
var areas = $a('//area[contains(@alt,"畑") or contains(@alt,"穀") or contains(@alt,"伐") or contains(@alt,"森") or contains(@alt,"石") or contains(@alt,"岩") or contains(@alt,"製") or contains(@alt,"鉱")]'); | |
for(var i=0; i<areas.length; i++){ | |
var areaInfo = cgetFacilityInfoFromArea(areas[i]); | |
var dataKey = nameToDataKey(areaInfo.name); | |
switch(areaInfo.name){ | |
case '森林': | |
case '岩山': | |
case '鉄鉱山': | |
case '穀物': | |
seisan[dataKey] += 10; | |
break; | |
case '伐採所': | |
case '石切り場': | |
case '製鉄所': | |
case '畑': | |
var yieldKey = getYieldKeyFromDataKey(dataKey); | |
seisan[dataKey] += yieldList[yieldKey][areaInfo.lv]; | |
break; | |
} | |
} | |
var text = '<ul>'; | |
text += '<li><img align="middle" alt="木" src="' + IMG_DIR + 'common/ico_wood2.gif"> 木 ' + seisan.w + '</li>'; | |
text += '<li><img align="middle" alt="石" src="' + IMG_DIR + 'common/ico_stone2.gif"> 石 ' + seisan.s + '</li>'; | |
text += '<li><img align="middle" alt="鉄" src="' + IMG_DIR + 'common/ico_iron2.gif"> 鉄 ' + seisan.i + '</li>'; | |
text += '<li><img align="middle" alt="糧" src="' + IMG_DIR + 'common/ico_lice2.gif"> 糧 ' + seisan.r + '</li>'; | |
text += '<li> 合計 ' + (seisan.w+seisan.s+seisan.i+seisan.r) +'</li></ul>'; | |
inner.innerHTML = text; | |
function getYieldKeyFromDataKey(dataKey) { | |
var ret = 'other'; | |
if (dataKey == 'r') { | |
ret = 'rice'; | |
} | |
return ret; | |
} | |
function nameToDataKey(name) { | |
switch(name){ | |
case '森林': | |
case '伐採所': | |
return "w"; | |
case '岩山': | |
case '石切り場': | |
return "s"; | |
case '鉄鉱山': | |
case '製鉄所': | |
return "i"; | |
case '穀物': | |
case '畑': | |
return "r"; | |
} | |
} | |
} | |
////////////////////////////////////////////////////////////////// | |
//↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ | |
//プレゼンツbysu-zan関数群 | |
////////////////////////////////////////////////////////////////// | |
function disp_castleAidLink() | |
{ | |
var bases = $a('(id("lodgment")/div[@class="floatInner"] | //div[@class="floatInner clearfix"] | //div[@class="sideBoxInner basename"])//li/*[@title]'); | |
if( !bases ) return; | |
for( var i=0 ; i < bases.length ; i++) { | |
var elem = bases[i]; | |
var thistitle = elem.title; | |
if( !thistitle ) continue; | |
var xy = thistitle.match(/\((-?\d+),(-?\d+)\)$/); | |
if( !xy ) continue; | |
var a_k_img = d.createElement("img"); | |
a_k_img.style.paddingLeft = "3px"; | |
a_k_img.style.paddingTop = "3px"; | |
a_k_img.src = img_ken; | |
var a_k = d.createElement("a"); | |
a_k.title = "援軍"; | |
a_k.appendChild(a_k_img); | |
if( elem.href ) { | |
a_k.href = caddSessionId("/facility/castle_send_troop.php?x="+xy[1]+"&y="+xy[2]+"&radio_move_type=301"); | |
a_k.style.visibility = 'visible'; | |
} else { | |
a_k.style.visibility = 'hidden'; | |
} | |
var spn = cgetElementSibling(elem,0); | |
if (!spn) { | |
spn = d.createElement("span"); | |
elem.parentNode.appendChild(spn); | |
} | |
spn.appendChild(a_k); | |
} | |
} | |
function disp_nextFameTimer() { | |
var nextDate = new Date(cloadData("NextFameTime",null,true,true)); | |
var preCheckTime = new Date(cloadData("NextFamePreCheckTime",null,true,true)); | |
nextDate = loadNextDate(); | |
var seps = $a('id("status_left")/span[@class="sep"]'); | |
for (var i = 0; i < seps.length;i++) { | |
seps[i].innerHTML = seps[i].innerHTML.replace(/^([\s|\u3000]*)|([\s|\u3000]*)$/g,""); | |
} | |
var img = $x('id("status_left")/img[@title="名声"]'); | |
var fameTimer = document.createElement('DIV'); | |
fameTimer.setAttribute("id","Beyond_nextFameTimer"); | |
fameTimer.appendChild(createTimerText(getTimeDiffNow(nextDate))); | |
fameTimer.style.color = 'lightgreen'; | |
fameTimer.style.position = 'absolute'; | |
fameTimer.style.top = (img.offsetTop + 12) + "px"; | |
fameTimer.style.left = (img.offsetLeft + 10) + "px"; | |
img.parentNode.appendChild(fameTimer); | |
var timerId = setInterval(function(){ | |
fameTimer.style.top = (img.offsetTop + 12) + "px"; | |
fameTimer.style.left = (img.offsetLeft + 10) + "px"; | |
fameTimer.replaceChild(createTimerText(getTimeDiffNow(loadNextDate())), fameTimer.firstChild); | |
},1000); | |
function createTimerText(date) { | |
return document.createTextNode("("+date.toLocaleTimeString().replace(/^0?/,"")+")"); | |
} | |
function getTimeDiffNow(date) { | |
var now = cgetNow(); | |
var oldDate = now, newDate = date; | |
if (date.getTime() < now.getTime()) { | |
return new Date(1970,1,1,0,0,0); | |
} | |
return new Date(1970,1,1,0,0,0,newDate.getTime() - oldDate.getTime()); | |
} | |
var nextFameDateCheckErrorCount = 0; | |
var nextFameRefreshCount = 0; | |
function loadNextDate() { | |
var nowDate = new Date(); | |
var isNextFameDateOver = false; | |
if (nextDate.getTime() < nowDate.getTime()) { | |
isNextFameDateOver = true; | |
} | |
var isPreCheckDateOver = false; | |
if (preCheckTime.getTime() < (nowDate.getTime() - 1800000)) { | |
isPreCheckDateOver = true; | |
} | |
if (5 < nextFameDateCheckErrorCount) { | |
if (isNextFameDateOver) { | |
clearInterval(timerId); | |
} | |
return nextDate; | |
} | |
if ((isPreCheckDateOver || isNextFameDateOver) && nextFameRefreshCount === 0) { | |
nextFameTimeRefresher(); | |
} | |
return nextDate; | |
function nextFameTimeRefresher() { | |
cajaxRequest("/facility/castle.php" , "GET", "", function(req) { | |
var dom = d.createElement("html"); | |
dom.innerHTML = req.responseText; | |
var nextFameNode = $x('.//div[@id="gray02Wrapper"]/table[contains(concat(" ",normalize-space(@class)," ")," commonTables ") and @summary="object"]//td[contains(concat(" ",normalize-space(@class)," ")," center ") and not(@colspan)]/div[not(@class)]',dom); | |
if (!nextFameNode) { | |
nextFameDateCheckErrorCount++; | |
return; | |
} | |
var matches = null; | |
if (!(matches = nextFameNode.innerHTML.match(/\d+-\d+-\d+\s\d+:\d+/))) { | |
nextFameDateCheckErrorCount++; | |
return; | |
} | |
var tmpDate = new Date(matches[0].replace(/-/g,"/")+":00"); | |
if (isPreCheckDateOver == false && nextDate.getTime() == tmpDate.getTime()) { | |
if (12 <= nextFameRefreshCount) { | |
clearInterval(timerId); | |
} | |
else { | |
nextFameRefreshCount++; | |
setTimeout(nextFameRefresher,5000); | |
} | |
return; | |
} | |
else if (!(nextDate.getTime() == tmpDate.getTime())) { | |
nextDate = tmpDate; | |
if (cloadData("NextFameTime",null,true,true)) { | |
var fameText = $x('id("status_left")//img[@title="名声"]').nextSibling; | |
matches = fameText.nodeValue.match(/(\d+)[^\d]*(\d+)/); | |
fameText.nodeValue = fameText.nodeValue.replace(/\d+[^\d]*\d+/,(parseInt(matches[1],10)+1) + " / " + (parseInt(matches[2],10)+1)); | |
} | |
csaveData("NextFameTime",nextDate.toString(),true,true); | |
} | |
nextFameRefreshCount = 0; | |
preCheckTime = new Date(); | |
csaveData("NextFamePreCheckTime",preCheckTime.toString(),true,true); | |
}, | |
function() { | |
nextFameDateCheckErrorCount++; | |
}); | |
} | |
} | |
} | |
function disp_villageListBox() { | |
if (0 <= location.pathname.search(/^\/(village|map|land)\.php/)) { | |
return; | |
} | |
var isOpen = cloadData('sidebox_oc0', false,true) ? false : true; | |
var sidBoxId = 'beyond_sidebox_villageListBox'; | |
var conf = cloadData( sidBoxId+'conf' , "null", true, true ); | |
if (!OPT_SMALLBTN) { | |
isOpen = (conf == null) ? true : conf.open; | |
} | |
if (conf != null && typeof conf == 'object') { | |
conf.open = isOpen; | |
csaveData(sidBoxId+'conf',conf,true,true); | |
} | |
var box = ccreateSideBox(sidBoxId,IMG_DIR+'common/sidebar/icon_base.gif',"拠点"); | |
box.sideBoxInner.className += " basename"; | |
var ul = d.createElement("ul"); | |
box.sideBoxInner.appendChild(ul); | |
var boxImage = $x('.//img[contains(@src,"icon_base")]', box.sideBoxHead); | |
$e(boxImage,'click',function(){ | |
var saveData = isOpen ? "1" : ""; | |
isOpen = !isOpen; | |
csaveData('sidebox_oc0', saveData,true); | |
}); | |
var cvid = cgetCurrentVillageId(); | |
for (var key in VILLAGES_INFO) { | |
var village = VILLAGES_INFO[key]; | |
var li = d.createElement("li"); | |
li.style.paddingBottom = "0px"; | |
ul.appendChild(li); | |
var item; | |
if (village.vid == cvid) { | |
li.className = "on"; | |
item = d.createElement("span"); | |
} | |
else { | |
item = d.createElement("a"); | |
item.href = caddSessionId('/village_change.php?village_id='+village.vid+'&from=menu&page=' + encodeURIComponent(location.pathname + location.search)); | |
} | |
li.appendChild(item); | |
item.title = village.basename + " ("+village.x+","+village.y+")"; | |
item.appendChild(d.createTextNode(village.basename)); | |
} | |
} | |
// 初期化拡張 | |
function initVillages() { | |
// ---- mixi鯖 51×51 に対応 ---- | |
if (0 <= location.pathname.search(/^\/(village|land)\.php/)) | |
{ _villageInit(); return; } | |
else if (location.pathname == "/user/" && $("statMenu")) { | |
_profileInit(); | |
return; | |
} | |
VILLAGES_INFO = cloadData("villagesInfo","{}",true,true); | |
function _villageInit() { | |
var villages = $a('(id("lodgment")/div[@class="floatInner"] | //div[@class="sideBoxInner basename"])//li/*[@title]'); | |
var compList = new Object(); | |
var reg = new RegExp(/^([^ ]+) \((-?\d+),(-?\d+)\)$/); | |
var matches = null; | |
var noVids = new Array(); | |
for (var i=0;i < villages.length;i++) { | |
var village = villages[i]; | |
var addObj = new Object(); | |
if ((matches = village.title.match(reg))) { | |
addObj.basename = matches[1]; | |
addObj.x = parseInt(matches[2],10); | |
addObj.y = parseInt(matches[3],10); | |
} | |
if (typeof village.href == 'string' && (matches = village.href.match(/village_id=(\d+)/))) { | |
addObj.vid = parseInt(matches[1],10); | |
} | |
else { | |
var viDoc = $x('//input[@name="village_id"]'); | |
if (viDoc) { | |
addObj.vid = parseInt(viDoc.value,10); | |
} | |
else { | |
noVids.push(addObj); | |
} | |
} | |
compList[(addObj.x+"_"+addObj.y).replace(/-/g,"m")] = addObj; | |
} | |
_compData(compList); | |
if (0 < noVids.length) { | |
cajaxRequest("/user/" , "GET", "", function(req) { | |
var dom = d.createElement("html"); | |
dom.innerHTML = req.responseText; | |
for (var i = 0;i < noVids.length;i++) { | |
var td = $x('.//td[text()="'+noVids[i].x+","+noVids[i].y+'"]',dom); | |
var linkTd = cgetElementSibling(td,1); | |
var link = $x('.//a',linkTd); | |
if ((matches = link.href.match(/village_id=(\d+)/))) { | |
VILLAGES_INFO[(noVids[i].x+"_"+noVids[i].y).replace(/-/g,"m")].vid = parseInt(matches[1],10); | |
} | |
} | |
csaveData("villagesInfo",VILLAGES_INFO,true,true); | |
}); | |
} | |
} | |
function _profileInit() { | |
var compList = new Object(); | |
var matches = null; | |
var villageLinks = $a('//table[contains(concat(" ", normalize-space(@class), " "), " commonTables ")]//th[contains(text(), "座標")]/../following-sibling::tr[position() <= 10]/td[position()=3 and 1 <= normalize-space(text())]/..//a'); | |
for (var i = 0;i < villageLinks.length;i++) { | |
var villageLink = villageLinks[i]; | |
var addObj = new Object(); | |
var loc = cgetElementSibling(villageLink.parentNode,0); | |
if ((matches = loc.innerHTML.match(/(-?\d+),(-?\d+)/))) { | |
addObj.x = parseInt(matches[1],10); | |
addObj.y = parseInt(matches[2],10); | |
} | |
if ((matches = villageLink.href.match(/village_id=(\d+)/))) { | |
addObj.vid = parseInt(matches[1],10); | |
} | |
addObj.basename = villageLink.innerHTML.replace(/^\s*|\s*$/g,""); | |
compList[(addObj.x+"_"+addObj.y).replace(/-/g,"m")] = addObj; | |
} | |
_compData(compList); | |
} | |
function _compData(compList) { | |
var nowVillageList = cloadData("villagesInfo","{}",true,true); | |
for (var key in compList) { | |
VILLAGES_INFO[key] = compList[key]; | |
if (typeof nowVillageList[key] == 'object') { | |
VILLAGES_INFO[key] = nowVillageList[key]; | |
if (typeof VILLAGES_INFO[key].vid != 'number' && typeof compList[key].vid == 'number') { | |
VILLAGES_INFO[key].vid = compList[key].vid; | |
} | |
VILLAGES_INFO[key].basename = compList[key].basename; | |
} | |
} | |
csaveData("villagesInfo",VILLAGES_INFO,true,true); | |
} | |
} | |
function initCastleSend() { | |
if( location.pathname != '/facility/castle_send_troop.php' || location.search.indexOf("radio_move_type") < 0) return; | |
var radioMoveType = location.search.match(/radio_move_type=(\d+)/)[1]; | |
var ary = $a('//input[@name="radio_move_type"]'); | |
var elem; | |
for (var i = 0; i < ary.length;i++) { | |
elem = ary[i]; | |
if (elem.value == radioMoveType) { | |
elem.checked = "checked"; | |
} | |
else { | |
elem.checked = ""; | |
} | |
} | |
} | |
function initNarrow() { | |
if (0 <= location.pathname.search(/^\/(village|map|land)\.php/)) { | |
$x('id("lodgment")/div[@class="floatHead"]//a').href = 'javascript:void(0);'; | |
} | |
GM_addStyle(".footer_box { height:auto !important;}"); | |
} | |
function initPreLoadNode() { | |
PRE_LOAD_NODES['nowResources'] = {wood:$('wood'),stone:$('stone'),iron:$('iron'),rice:$('rice')}; | |
PRE_LOAD_NODES['serverTime'] = $('server_time_disp'); | |
} | |
function initUrlParams() { | |
var matches = location.search.match(/(?:\?|&)?([^=]+)(?:=([^&]+))?/g); | |
if (matches) { | |
var param; | |
var key; | |
var data; | |
for(var i = 0 ; i < matches.length ; i++) { | |
param = matches[i].match(/(?:\?|&)?([^=]+)(?:=([^&]+))?/); | |
key = param[1]; | |
data = param[2]; | |
URL_PARAM[key] = ''; | |
if( param.length == 3 && typeof data == 'string') { | |
URL_PARAM[key] = decodeURIComponent(data); | |
// session id | |
if (key.toLowerCase() == 'ssid') { | |
SID = key + '=' +data; | |
} | |
} | |
} | |
} | |
} | |
// 同盟レベルの表示を改善 START ********************************************************************************* | |
if( location.pathname == "/alliance/level.php" ) { | |
cl=document.getElementsByClassName('contents'); | |
np=parseInt(cl[4].innerHTML)-parseInt(cl[2].innerHTML); | |
once = Math.round(np/parseInt(cl[1].innerHTML)); | |
function kugiri(np,once) { | |
var num = new String(np,once).replace(/,/g, ""); | |
while(num != (num = num.replace(/^(-?\d+)(\d{3})/, "$1.$2"))); | |
return num; | |
} | |
cl[1].innerHTML+=' <span style="color:red; white-space:nowrap;">(空き枠:'+(parseInt(cl[3].innerHTML)-parseInt(cl[1].innerHTML))+')</span>'; | |
cl[2].innerHTML+=' <br><span style=" font-size:12px; color:red; white-space:nowrap;">(次まで:'+(kugiri(np))+'/1人あたり:'+(kugiri(once))+')</span>'; | |
cl[3].innerHTML+=' <span style="color:red; white-space:nowrap;">(次で+'+(parseInt(cl[5].innerHTML)-parseInt(cl[3].innerHTML))+')</span>'; | |
}else if( location.pathname == "/alliance/info.php" ) { | |
cl=document.getElementsByClassName('contents'); | |
np1 = parseInt(cl[8].innerHTML.match(/[^\/]+$/)); | |
np2 = parseInt(cl[8].innerHTML.match(/^[^\/]+/)); | |
nl1 = parseInt(cl[7].innerHTML.match(/[^\/]+$/)); | |
nl2 = parseInt(cl[7].innerHTML.match(/^[^\/]+/)); | |
nd = parseInt(cl[9].innerHTML); | |
cl[7].innerHTML+= '<span style="color:black;"> (空き:</span>'+ | |
'<span style="color:red;">'+(nl1-nl2)+'</span>'+ | |
'<span style="color:black;">)</span>' | |
cl[8].innerHTML+= '<br /><span style="color:black;">次まで:</span>' + | |
'<span style="color:red;">'+(np1-np2)+'</span><br />' + | |
'<span style="color:black;">1人あたり:</span>' + | |
'<span style="color:red;">'+(parseInt((np1-np2)/nl2))+'</span>'; | |
cl[9].innerHTML+= '<span style="color:black;"> (</span>'+ | |
'<span style="color:red;">+'+(nd-nl1)+'</span>'+ | |
'<span style="color:black;">)</span>'; | |
cl[9].innerHTML+= '<br /><span style="color:black;"> 次LV空き枠合計:</span></td>'+ | |
'<span style="color:red;">'+(nd-nl1+nl1-nl2)+'</span>'; | |
} | |
// 同盟レベルの表示を改善 END ************************************************************************************************************ | |
//---------------------------------------------------------------- | |
// イラスト置換 refactoring | |
//---------------------------------------------------------------- | |
//start | |
function disp_illustChange() { | |
var LH3 = "http://lh3.ggpht.com/"; | |
var LH4 = "http://lh4.ggpht.com/"; | |
var LH5 = "http://lh5.ggpht.com/"; | |
var LH6 = "http://lh6.ggpht.com/"; | |
var A8 = "AAAAAAAA"; | |
var illust = { | |
"1001" : {big : LH4 + "-Ij0lTA4Xp4k/TUBV1zosOaI/" + A8 + "Aww/4fAT9WsnvKg/1001_R", small : LH4 + "-1bFGHg9lH9M/TMOUZsPKcEI/" + A8 + "AkQ/jHHy_0_pdXk/mini1001_R"}, | |
"1002" : {big : LH5 + "-7To95mWg9pY/TUBV2VA3OOI/" + A8 + "Aw0/Es5QRxubEF4/1002_SR", small : LH6 + "-Wq519rEwwag/TMOUZ3ezkhI/" + A8 + "AkU/Dl2VPTslxZ8/mini1002_SR"}, | |
"1003" : {big : LH5 + "-FAxU_xk8NxQ/TUBV3HYgLpI/" + A8 + "Aw4/45fpffEcEsE/1003_SR", small : LH4 + "-EmwHZsLr2bU/TMOUaI_87xI/" + A8 + "AkY/ERHTfMemMDw/mini1003_SR"}, | |
"1004" : {big : LH4 + "-4BVrJ4muA4Q/TUBV3lmJ5dI/" + A8 + "Aw8/SbHUT_9-IiE/1004_SR", small : LH4 + "-2MxAe7gy2fY/TMOUaobSVkI/" + A8 + "Akc/WK3r5V6e1a4/mini1004_SR"}, | |
"1005" : {big : LH6 + "-KTVKIONza_0/TUBV4NFVgBI/" + A8 + "AxA/UDDtua4qu00/1005_R", small : LH3 + "-FWP8p2Jd-Tc/TMOUa4eszrI/" + A8 + "Akg/BCYpHwgiJ0o/mini1005_R"}, | |
"1006" : {big : LH5 + "-7hXoZoevUUs/TUBV49jBVvI/" + A8 + "AxE/aTSxDMPO0nY/1006_SR", small : LH3 + "--ph1yo4dSWQ/TMOUbRg6uYI/" + A8 + "Akk/5xHzRYvOotk/mini1006_SR"}, | |
"1007" : {big : LH5 + "-XytgCa7FtRw/TUBV5RqnSKI/" + A8 + "AxM/KgTDTeCwL4I/1007_UC", small : LH6 + "-mMquGOfyOf4/TMOUbxQnr5I/" + A8 + "Ako/wgRqt4D9mQY/mini1007_UC"}, | |
"1008" : {big : LH4 + "-4gN6C98LEZA/TUBV59Y0OFI/" + A8 + "AxQ/U50SNc55Gtk/1008_R", small : LH5 + "-x1x3KAJ3FcI/TMOUcAsJrWI/" + A8 + "Aks/tEKEoWF1KAA/mini1008_R"}, | |
"1009" : {big : LH3 + "-hxxmdsa5PsQ/TUBV6SVtCaI/" + A8 + "AxU/_TUf5mx-AMk/1009_UC", small : LH5 + "-d71B00kfRa0/TMOUcikXd4I/" + A8 + "Akw/IakzCXkJ4Ys/mini1009_UC"}, | |
"1010" : {big : LH5 + "-jUmeaBZAOic/TUBV7OcYKHI/" + A8 + "AxY/uuGVkyJ7XI0/1010_UC", small : LH6 + "-seZxrV0A92w/TMOUdNnmgKI/" + A8 + "Ak0/qgwQN9MUmkk/mini1010_UC"}, | |
"1011" : {big : LH5 + "-ymF9mcme2Cc/TUBV7s-CSYI/" + A8 + "Axc/KS5938NOqN0/1011_R", small : LH6 + "-GQST_X2ZCgs/TMOUdi88fSI/" + A8 + "Ak4/j-S_U8RWow4/mini1011_R"}, | |
"1012" : {big : LH5 + "-j0lcRLwgwgs/TUBV8AhUjrI/" + A8 + "Axg/kZ9E1TFexso/1012_UC", small : LH3 + "-x0LdhfqBuA8/TMOUd73E8WI/" + A8 + "Ak8/OOX7GzdlO1g/mini1012_UC"}, | |
"1013" : {big : LH6 + "-P0t1Oz3epDo/TUBV8ja__MI/" + A8 + "Axk/8-b2x9ayzEY/1013_C", small : LH4 + "-6qSNhvMhAow/TMOUeTyzoSI/" + A8 + "AlA/bLQ3KATshJo/mini1013_C"}, | |
"1015" : {big : LH5 + "-pnEbE-P5qvI/TMOTrKz9fJI/" + A8 + "Ae8/wLBIf5OQm20/1015_UC", small : LH3 + "-AQLrvHJr9GY/TMOUegz9BnI/" + A8 + "AlE/HADVf2zTm3E/mini1015_UC"}, | |
"1016" : {big : LH4 + "-C0XXlaK_zyQ/TXmhd-TPHOI/" + A8 + "A9s/X2WoEz_1fJw/1016_R", small : LH3 + "-arJyGRs9gU4/TXmheuR7O9I/" + A8 + "A90/moRy7E9Di78/mini1016_R"}, | |
"1019" : {big : LH5 + "-i9ZIDce_ycc/TMOTsDMJByI/" + A8 + "AfE/dFvndpvHCJI/1019_UC", small : LH6 + "-HC2h-nT62pI/TMOUfR1VSEI/" + A8 + "AlM/Q_-1AHC3asY/mini1019_UC"}, | |
"1020" : {big : LH4 + "-P4_tdFzeEQ4/TMOTsrs6YII/" + A8 + "AfI/GPQ0jSRWpYs/1020_C", small : LH6 + "-JVsYM-hSWck/TMOUf15XzzI/" + A8 + "AlQ/sUBi9Vsrtag/mini1020_C"}, | |
"1031" : {big : LH5 + "-kTK2fTh5t3s/TMOTtQaU9_I/" + A8 + "AfM/ueVtf09OXMQ/1031_UC", small : LH6 + "-iuz6R2_Jc_Y/TMOUgUSpuxI/" + A8 + "AlU/NBfpcqMiDhk/mini1031_UC"}, | |
"1032" : {big : LH6 + "-joDtpvKfvUQ/TMOTtgYMJJI/" + A8 + "AfQ/kEjvcYI1tLs/1032_C", small : LH4 + "-29ltBq6JZYA/TMOUghWGsKI/" + A8 + "AlY/8HTQR3MYfK4/mini1032_C"}, | |
"1035" : {big : LH6 + "-sTnmNCZ6Zq4/TMO7r-NLwTI/" + A8 + "Aqk/bGyoZl1-F-A/1035_SR", small : LH5 + "-Qetv-BSBv7g/TMO7t9xSPTI/" + A8 + "Aq0/ldDfuTe1hX4/mini1035_SR"}, | |
"1037" : {big : LH5 + "-_LysnA8AD1M/TMOTuYz4nEI/" + A8 + "AfU/XZRCTSsL4EI/1037_SR", small : LH3 + "-i9JGmNPgtf0/TMOUhE23ECI/" + A8 + "Alc/9c1BTxJ1r8I/mini1037_SR"}, | |
"1038" : {big : LH4 + "-vcNo4WPk580/TMOTuxMdFrI/" + A8 + "AfY/po6JMoU70WE/1038_R", small : LH6 + "-z2qIJP3LdTA/TMOUhU5dlJI/" + A8 + "Alg/SF1u6fMnHcg/mini1038_R"}, | |
"1039" : {big : LH5 + "-x6Zfn6fPMaY/TMOTvWispQI/" + A8 + "Afc/vxm1FUSf0b0/1039_UC", small : LH4 + "-yTHR9rFC5bs/TMOUh0Gph6I/" + A8 + "Alk/5MRCHimn4Pc/mini1039_UC"}, | |
"1040" : {big : LH3 + "-XdLOFTeg0UM/TMOTwDfzjrI/" + A8 + "Afg/Wgcq4RArJOA/1040_C", small : LH3 + "-CDSLPPQ9KaE/TMOUiEzn-yI/" + A8 + "Alo/vykY9aJt7Qw/mini1040_C"}, | |
"1042" : {big : LH5 + "-yEZ6oIyka4U/TMOTwgtvNOI/" + A8 + "Afk/7eHt87setkI/1042_R", small : LH4 + "-DNuGvIcQ7tA/TMOUinPWvMI/" + A8 + "Als/kidl63B0i78/mini1042_R"}, | |
"1043" : {big : LH6 + "-Hyvr4L0y8xM/TMOTxNZmVNI/" + A8 + "Afo/HuyqLlJdsUM/1043_R", small : LH6 + "-_3OwbdGjfws/TMOUjEXybwI/" + A8 + "Alw/NucBRUwVyvI/mini1043_R"}, | |
"1046" : {big : LH4 + "-9ADLIIwUfy4/TMOTx7Dh-oI/" + A8 + "Afs/TtkfFXXPmm0/1046_UR", small : LH5 + "-WYdNCXnhGwo/TMOUjWkoo-I/" + A8 + "Al0/T5PgkqOXCos/mini1046_UR"}, | |
"1047" : {big : LH6 + "-Pfzk9chkn-8/TMOTyb7RgFI/" + A8 + "Afw/E_6FRKdzAo4/1047_UR", small : LH5 + "-XKwE-rBeLgY/TMOUj5JSL-I/" + A8 + "Al4/HILfg4C6GeA/mini1047_UR"}, | |
"1048" : {big : LH5 + "-yLH1ubhBAmQ/TMOTy6P-Z-I/" + A8 + "Af0/k9LKOJxlkNU/1048_UR", small : LH3 + "-mJedALDh1Eg/TMOUkMID6MI/" + A8 + "Al8/ElXwRwijJIg/mini1048_UR"}, | |
"1049" : {big : LH6 + "-Ozu2k_4k-3g/TMOTzXAtIpI/" + A8 + "Af4/Lr-6YksXeCY/1049_UR", small : LH5 + "-tYmt8G5NuP0/TMOUkhNbjtI/" + A8 + "AmA/sHejRl3Gpn0/mini1049_UR"}, | |
"1050" : {big : LH6 + "-Ve1EuCVg9g4/TMO7sR0NHCI/" + A8 + "Aqo/BapswH84iug/1050_UR", small : LH3 + "-BD30lBn8R-4/TMO7uB87YDI/" + A8 + "Aq4/7cB8ExBONnI/mini1050_UR"}, | |
"1051" : {big : LH6 + "-ZJkSTNQkwOc/TMOTzmEUYlI/" + A8 + "Af8/v0zNznVU6iY/1051_UR", small : LH5 + "-a9BqjIghX2w/TMOUk5_-HgI/" + A8 + "AmE/49hoSiRha8o/mini1051_UR"}, | |
"1052" : {big : LH6 + "-AIyfNgKwvSM/TMOT0ZPd5wI/" + A8 + "AgA/Xsj-poch0H8/1052_SR", small : LH4 + "-mICsYm40uqc/TMOUldgnLoI/" + A8 + "AmI/Rpe_2kr8nlg/mini1052_SR"}, | |
"1056" : {big : LH5 + "-I6iE28vzAuw/TMOT04LC2hI/" + A8 + "AgE/kONmpCjPqK4/1056_R", small : LH4 + "-7fyzGny5hnw/TMOUlvKe_9I/" + A8 + "AmM/7v0CBAIYAM8/mini1056_R"}, | |
"1057" : {big : LH3 + "-QqMV9R6KkCo/TMOT1mHFRSI/" + A8 + "AgI/srSzJ3woTAU/1057_SR", small : LH3 + "-Yidb5ZXLEqQ/TMOUmK_HvII/" + A8 + "AmQ/X-1b-aPDGUI/mini1057_SR"}, | |
"1059" : {big : LH3 + "-5oj3UHm9OgU/TMclNDonneI/" + A8 + "ArM/hiivHEaRwFI/1059_C", small : LH4 + "-92l3Dp4rNAY/TMclPnbOkgI/" + A8 + "Aro/eK3kQmm9JtM/mini1059_C"}, | |
"1060" : {big : LH4 + "-p3RvF88jWbM/TMclNXrDMgI/" + A8 + "ArQ/HjVam6tgx8A/1060_R", small : LH3 + "-5B4FX8gh-qQ/TMclQKmrAcI/" + A8 + "Ars/okqCC0Jj-Vs/mini1060_R"}, | |
"1062" : {big : LH4 + "-dCQ-zWogBLo/TSE1EyPHYPI/" + A8 + "AvI/1JhvKTaL10c/1062_UR", small : LH6 + "-XNEXTBWQfIk/TSE1GzL1lfI/" + A8 + "AvY/wxjub4Ty2_A/mini1062_UR"}, | |
"1063" : {big : LH3 + "-6vMEzjYOfgw/TPTMrGGWDKI/" + A8 + "AuU/DcTY2UY3Ps0/1063_UC", small : LH6 + "-LCs3a2qMsfE/TPTMuPE1raI/" + A8 + "Auk/kknMyC3JCJ8/mini1063_UC"}, | |
"1066" : {big : LH5 + "-uUaOqiqWFS4/TPTMrqeil9I/" + A8 + "AuY/oi7rDL4WO4w/1066_SR", small : LH4 + "-gvtlma0k56c/TPTMulgZL2I/" + A8 + "Auo/WYGa-9VpqKw/mini1066_SR"}, | |
"1070" : {big : LH6 + "-KjTZiRtjmDQ/TXmheA_EmGI/" + A8 + "A9w/pHLxjchY3b8/1070_UC", small : LH3 + "-mtsQKJSPQR8/TXmhfHP1C3I/" + A8 + "A94/yb7iVnAwCXo/mini1070_UC"}, | |
"1072" : {big : LH5 + "-nJ33oAZ084Y/TZCCfaLzAoI/" + A8 + "BDA/M3BuIlhUA7I/1072_R", small : LH4 + "-FOSbgWfttIc/TZCCi8kcvzI/" + A8 + "BDg/yrHkI3wTWN8/mini1072_R"}, | |
"1073" : {big : LH5 + "--WCoLqUI93o/TZCCf6RtwXI/" + A8 + "BDE/lTGLf_C6qy4/1073_R", small : LH6 + "-Kx3w80aQ_WE/TZCCjDjlqbI/" + A8 + "BDk/ic-3MnNz-So/mini1073_R"}, | |
"1074" : {big : LH3 + "-SdJ6l9_1PiQ/TbbblCkoo_I/" + A8 + "BEo/qd6-FHBea98/1074_SR", small : LH6 + "-OESwEl-h4GQ/TbbbmmcVKHI/" + A8 + "BE4/Gwu8S428Hw0/mini1074_SR"}, | |
"1075" : {big : LH5 + "-h6tXGT9NfwU/Tdp21CIGcDI/" + A8 + "BFM/hshCGB7CiOc/1075_UR", small : LH3 + "-3DNvOljY5zY/Tdp22MPAMmI/" + A8 + "BFY/bNNxOQtYD-g/mini1075_UR"}, | |
"1078" : {big : LH6 + "-M3HC9hO3x4M/Tdp21RrmRRI/" + A8 + "BFQ/u6QYw7fnAaM/1078_UC", small : LH4 + "-bBBkkw_CWuI/Tdp22cLAnLI/" + A8 + "BFc/XbOmJKlCVd8/mini1078_UC"}, | |
"1079" : {big : LH6 + "-1p7zy2KtkZ0/TgB9-3SKDhI/" + A8 + "BGE/YX-mzMj_o48/1079_UR", small : LH5 + "-cPbWuVsascw/TgB9_v-2g-I/" + A8 + "BGM/amkXy3a3YdM/mini1079_UR"}, | |
"1083" : {big : LH4 + "-ur00WLogMBo/Ti4pAqXfBfI/" + A8 + "BJo/Ev18aYqyang/1083_UR", small : LH3 + "-XjuSkLHkHD8/Ti4pCEgEJ9I/" + A8 + "BJ4/rziGfUDV9hc/mini1083_UR"}, | |
"1086" : {big : LH6 + "-RWVeZG3-F34/ToAEBd_46gI/" + A8 + "BTU/hTvjmwRcZfQ/1086_UR", small : LH4 + "-sb1FEfS32MA/ToAEChI9YjI/" + A8 + "BTg/fKfGjL_4sV0/mini1086_UR"}, | |
"1089" : {big : LH6 + "-qILVjgVFc8U/Tp70KeQ-C_I/" + A8 + "BV0/glQ-pDpKp-o/1089_R", small : LH5 + "-sPwoqVPfjOU/Tp70N0u_fFI/" + A8 + "BW4/FVootTTwUb8/mini1089_R"}, | |
"1090" : {big : LH3 + "-3rF8Q0TzDj8/Tp70K-lhCNI/" + A8 + "BV8/Iqp5joQ7qrI/1090_UC", small : LH4 + "-g2jh9_v-264/Tp70ODMVZHI/" + A8 + "BXE/IPEqs1ZZCqA/mini1090_UC"}, | |
"1091" : {big : LH5 + "-pz73rlVQGeQ/Tp70LN9WziI/" + A8 + "BWE/VcWjrJwTZ38/1091_UC", small : LH6 + "-MJ5wlVHQNO0/Tp70OScqt1I/" + A8 + "BXM/u4TgYp6ntWQ/mini1091_UC"}, | |
"1092" : {big : LH6 + "-9KhpXVo7n_8/Tqbwbqmh6uI/" + A8 + "BYQ/OjNPvJ9bcFc/1092_UR", small : LH4 + "-eNqccGzVkrY/Tqbwdsr3nWI/" + A8 + "BYk/NAdU_-hgHHg/mini1092_UR"}, | |
"1094" : {big : LH6 + "-n1t0fKRX2P4/Tw7YUoRR6TI/" + A8 + "Bas/H9GH9tL3QIs/1094_SR", small : LH6 + "-YwEXjEXRoEw/Tw7YX7rQ2QI/" + A8 + "BbQ/rcsTUVGSw90/mini1094_SR"}, | |
"1095" : {big : LH4 + "-KFY2xa1L1Us/Tw7YVAGFtVI/" + A8 + "Baw/vmCRwYEV1dY/1095_UR", small : LH5 + "-9z3AtFXub1Q/Tw7YYXDFTDI/" + A8 + "BbY/BmNGFXmooW8/mini1095_UR"}, | |
"1098" : {big : LH3 + "-Bpt9TpWFEwc/T7lk_3E-_eI/" + A8 + "ATw/bH9Vhep_a38/1098_UR", small : LH6 + "-KaLG3rd51jg/T7nYNhmqlaI/" + A8 + "Abo/ioeFNCTGwIY/mini1098_UR"}, | |
"1099" : {big : LH6 + "-55vUExL9Dic/T7lk_8k5zXI/" + A8 + "ATs/zSet_ni90u0/1099_SR", small : LH5 + "-kWijVzZrFjU/T7nYNvvV3OI/" + A8 + "Abw/shUi7GP4itU/mini1099_SR"}, | |
"1101" : {big : LH6 + "-rxTn02zU-Ek/T7pHmXQKDcI/" + A8 + "A3c/NmRt5gj-lFc/1101_UC", small : LH6 + "-sGI_OanukFc/T7nYNsnuN9I/" + A8 + "Abg/reKsyTI8-s0/mini1101_UC"}, | |
"1106" : {big : LH3 + "-nzBZEeXSix8/T7nX52TqejI/" + A8 + "Aa0/oXIMyh6Cj_I/1106_UR", small : LH3 + "-qbUvkj6Wlh0/T7nYOJTNXSI/" + A8 + "Abk/lTfcxaFZTLk/mini1106_UR"}, | |
"1107" : {big : LH6 + "-fHtEXRPXEYU/UAzqXg7fKZI/" + A8 + "BBU/xOZRGxqic3o/1107_R_2", small : LH4 + "--DhlU3XBlEQ/UAzrLTcu3oI/" + A8 + "BCI/3uewGwFp2Vg/mini1107_R_2"}, | |
"1109" : {big : LH3 + "-Mki41QA4URA/UTlC4uyjMhI/" + A8 + "BqA/WkYzMf5sTTg/1119_SR_1", small : LH4 + "-qRaGL7eGVXM/UTlGUc5lFsI/" + A8 + "BuQ/B_09KgqAhKU/mini1119_SR_1"}, | |
"1110" : {big : LH6 + "-Vp_hdjjV6f0/UID3T0cqNqI/" + A8 + "BRY/64e08qdB4lg/1110_UR_1", small : LH3 + "-IJbby9yGXHA/UID3rRTVoWI/" + A8 + "BSQ/i8DG9xJy57I/mini1110_UR_1"}, | |
"1116" : {big : LH3 + "-MxHzUCY4KJo/UPYv9g769AI/" + A8 + "BYw/bzNd-ZuN9DA/1116_R_1", small : LH5 + "-l2M9ECsPe4A/UPYwl2JjJQI/" + A8 + "BaM/kC0AsnzOI74/mini1116_R_1"}, | |
"1119" : {big : LH3 + "-Mki41QA4URA/UTlC4uyjMhI/" + A8 + "BqA/WkYzMf5sTTg/1119_SR_1", small : LH4 + "-qRaGL7eGVXM/UTlGUc5lFsI/" + A8 + "BuQ/B_09KgqAhKU/mini1119_SR_1"}, | |
"1125" : {big : LH6 + "-DwPzqNaeir4/UWIWUxtM20I/" + A8 + "Bwk/gDAVOvo42P8/1125_UR", small : LH5 + "-iV6bbzTflsM/UWIXZEzSOII/" + A8 + "ByI/1tWAkEQeJCE/mini1125_UR"}, | |
"1127" : {big : LH4 + "-rfjE350wx80/UWIWU8iqPlI/" + A8 + "Bwo/0_PWNJ6ZBe0/1127_R", small : LH4 + "-5LfubqzBfAk/UWIXZEHNe6I/" + A8 + "Bx0/lWTa288EgQc/mini1127_R"}, | |
"1132" : {big : LH4 + "-ZWxZteO3vUM/Ums3sYrHQuI/" + A8 + "B1g/0w-iAUw-27g/1132_UR", small : LH6 + "-ScGNJDLxPrY/Ums4F8MbWdI/" + A8 + "B2c/k1xzZNQfD-A/mini1132_UR"}, | |
"2001" : {big : LH6 + "-mFNChWHZN5w/TMOT2OaGcGI/" + A8 + "AgM/96bjcFAf8GU/2001_SR", small : LH4 + "-2z1BNsqW3vM/TMOUmtgqiuI/" + A8 + "AmU/huw20LZX_Ho/mini2001_SR"}, | |
"2003" : {big : LH4 + "-aJb6-iJgPU8/TMOT2nAuPJI/" + A8 + "AgQ/pDmeyKCvlaM/2003_R", small : LH4 + "-SU2hN6fkAmc/TMOUm9CVPnI/" + A8 + "AmY/_prrfywzROY/mini2003_R"}, | |
"2004" : {big : LH5 + "-dUqSWW1f5C8/TMOT3MuFcHI/" + A8 + "AgU/C6VFdlUn8nI/2004_R", small : LH4 + "--Pu5aAe54FU/TMOUnSnr2DI/" + A8 + "Amc/78qiAf61ekM/mini2004_R"}, | |
"2005" : {big : LH3 + "-BbOHdFgAuZg/TMOT3sv1ZOI/" + A8 + "AgY/DAMujnu0iEY/2005_SR", small : LH3 + "-NxbtoOOLFgA/TMOUn9BwM_I/" + A8 + "Amg/yQLWSnSQ40g/mini2005_SR"}, | |
"2007" : {big : LH4 + "-3wmFy0zRR3s/TMOT4Y531RI/" + A8 + "Agc/DQrApnmoNy8/2007_R", small : LH3 + "-NfOJm9RiaFU/TMOUoWHegRI/" + A8 + "Amk/xuFDr-w8JEw/mini2007_R"}, | |
"2008" : {big : LH6 + "-YuobBvmtPBw/TMOT42VrEBI/" + A8 + "Agg/AwWfKfHxPGw/2008_UC", small : LH5 + "-KkoKQX6BuZk/TMOUouqjPvI/" + A8 + "Amo/kxPg7x5zDec/mini2008_UC"}, | |
"2009" : {big : LH4 + "-9c_qs-mCi24/TMOT5Xq38AI/" + A8 + "Agk/kZkETA6q_dg/2009_UC", small : LH3 + "-s7Kzb96fIVc/TMOUpQy-fzI/" + A8 + "Ams/BrJmeuLBDGU/mini2009_UC"}, | |
"2010" : {big : LH3 + "-1fx-DP0ixs4/TMOT51qgBYI/" + A8 + "Ago/d9hn0-ScZOw/2010_UC", small : LH3 + "-RulkOxjas18/TMOUpq99ynI/" + A8 + "Amw/95YkbrE3oeo/mini2010_UC"}, | |
"2011" : {big : LH5 + "-ICLrnqBYZiU/TMOT6WTolYI/" + A8 + "Ags/Epowju_lPyM/2011_C", small : LH5 + "-G1bkLcbesCw/TMOUp0Rys5I/" + A8 + "Am0/CTVnqWzjhHY/mini2011_C"}, | |
"2012" : {big : LH3 + "-2QvSiWsB9wE/TMOT7KUH9DI/" + A8 + "Agw/yTcWyE2uxcU/2012_UC", small : LH6 + "-0YAU-Wiu8Z0/TMOUqGAOsyI/" + A8 + "Am4/tINSbt_krZE/mini2012_UC"}, | |
"2013" : {big : LH4 + "-OcxmcZsZBMg/TMOT7kK2vLI/" + A8 + "Ag0/uLoTXOaqNZU/2013_R", small : LH3 + "-GEZbI2yMDrA/TMOUqrh59rI/" + A8 + "Am8/he25q8Olsag/mini2013_R"}, | |
"2017" : {big : LH6 + "-ciNP0vsNR6Y/TMOT8F2aAYI/" + A8 + "Ag4/ZIWeQkKpgPc/2017_UC", small : LH5 + "-LuF9W3ynNuM/TMOUqzVycEI/" + A8 + "AnA/yU-M5DxaTtk/mini2017_UC"}, | |
"2018" : {big : LH4 + "-yWyqlZmCNZI/TMOT8UOr3XI/" + A8 + "Ag8/D-iT8UeAapg/2018_C", small : LH3 + "-deZjufkQvzA/TMOUrU4KK3I/" + A8 + "AnE/X6k9Szl4pL8/mini2018_C"}, | |
"2035" : {big : LH4 + "-E8DEk7IKY34/TMOT9JeQVZI/" + A8 + "AhA/pjetyDv48mc/2035_UC", small : LH3 + "-JpAGlbhGM0k/TMOUrkrR1rI/" + A8 + "AnI/bnGjiBNJmrw/mini2035_UC"}, | |
"2036" : {big : LH5 + "-nIsIf5TnP44/TMOT9phLIpI/" + A8 + "AhE/ITOgStd0bvo/2036_C", small : LH6 + "-FBeyK_NDFdU/TMOUsOIihAI/" + A8 + "AnM/tiYzc_0F_cg/mini2036_C"}, | |
"2039" : {big : LH5 + "-3UTlS6ayRdc/TMOT-Qe0zJI/" + A8 + "AhI/dZIdg0bm2AA/2039_R", small : LH4 + "-BlXDwQouX00/TMOUsR2HNPI/" + A8 + "AnQ/7Fi8FYQ5aTY/mini2039_R"}, | |
"2040" : {big : LH6 + "-DOVW-NPRIuo/TMOT-z_rl_I/" + A8 + "AhM/ufNcVPPgGPk/2040_R", small : LH5 + "-Yo1fPACUPyU/TMOUs00ameI/" + A8 + "AnU/KbdA01d8ZDw/mini2040_R"}, | |
"2041" : {big : LH4 + "-UOC8xlAHpps/TMOT_YdDjDI/" + A8 + "AhQ/lRfUBZJSa5A/2041_UC", small : LH3 + "-9kQgZpCvt-E/TMOUtddSUBI/" + A8 + "AnY/RcRoK5EO6Dg/mini2041_UC"}, | |
"2042" : {big : LH3 + "-y0vWdFVHkfc/TMOUADKHm7I/" + A8 + "AhU/ubihZ0Qq94s/2042_SR", small : LH4 + "-kuiXSzLJlT4/TMOUtpBa67I/" + A8 + "Anc/4yptNL_pvUM/mini2042_SR"}, | |
"2043" : {big : LH4 + "-ndKY7_xxNOI/TMOUAg3SXII/" + A8 + "AhY/kCKCwFgXHqk/2043_R", small : LH6 + "-d5ui_92CTGs/TMOUtz1XQtI/" + A8 + "Ang/XwkWnoljfHE/mini2043_R"}, | |
"2044" : {big : LH4 + "-56ZErU7Zn2Y/TMOUBNGIRPI/" + A8 + "Ahc/BJ_rES56N1A/2044_R", small : LH3 + "-ypUXsiC07hc/TMOUuTzakeI/" + A8 + "Ank/KwLjTBh-ZZ8/mini2044_R"}, | |
"2049" : {big : LH4 + "-kbUk4h2zHy4/TMOUBpCurLI/" + A8 + "Ahg/A84tksA8kWI/2049_R", small : LH6 + "-V-5MeoEY-xw/TMOUuynbhvI/" + A8 + "Ano/IWfzMKRGkO0/mini2049_R"}, | |
"2050" : {big : LH4 + "-fNwXKaxg0AQ/TMOUCF5IT3I/" + A8 + "Ahk/WK07kc3NgnQ/2050_UC", small : LH5 + "-fb3LEAc4gys/TMOUveh4NWI/" + A8 + "Ans/jKivIXUAgAQ/mini2050_UC"}, | |
"2051" : {big : LH6 + "-W3MGYYZyEqs/TMOUC1fPBMI/" + A8 + "Aho/9O9X0F84j18/2051_UR", small : LH6 + "-cBAxCatdleM/TMOUvqeQUFI/" + A8 + "Anw/v4jkqFVbH7k/mini2051_UR"}, | |
"2052" : {big : LH5 + "-geKglraFHU4/TMOUDXAsq-I/" + A8 + "Ahs/CseltgUGAF8/2052_UR", small : LH5 + "-f7jcdxbC1M4/TMOUvy-GhEI/" + A8 + "An0/_9fFKuXCK2M/mini2052_UR"}, | |
"2058" : {big : LH6 + "-EKFwSX0BDa8/TMOUDzN_u0I/" + A8 + "Ahw/qLz_SgwtsM0/2058_UR", small : LH3 + "-tauTrc2mP7U/TMOUwMBPK4I/" + A8 + "An4/gH8gV7HHRZE/mini2058_UR"}, | |
"2060" : {big : LH4 + "-gPnfLio8P6U/TMOUEUoTQhI/" + A8 + "Ah0/mYEDb6h-K7Q/2060_UR", small : LH3 + "-pKloDoPQP-4/TMOUwmn1WkI/" + A8 + "An8/wF47FFA2eg8/mini2060_UR"}, | |
"2062" : {big : LH4 + "-hH6m8U8Asyc/TMfJ2_rxPqI/" + A8 + "AsI/7KSKo6RvvDw/2062_SR", small : LH6 + "-OExOgPF_psc/TMfJ3rB4lPI/" + A8 + "AsM/1fYkoek98_Y/mini2062_SR"}, | |
"2063" : {big : LH6 + "-HNm7K3MvOww/TMclN-HTk0I/" + A8 + "ArU/NVooLCquOpY/2063_UR", small : LH6 + "-w9VSPeo0tYo/TMclQVTFQZI/" + A8 + "Arw/TfVusfo-BAM/mini2063_UR"}, | |
"2064" : {big : LH5 + "-sK4R7Eqmo7k/TMclOIUhKhI/" + A8 + "ArY/e57UHPgqleI/2064_SR", small : LH6 + "-VgxmjdaPKlI/TMclQi1chCI/" + A8 + "Ar0/zCHoSzIFjwc/mini2064_SR"}, | |
"2066" : {big : LH5 + "-8Glkm9ym_vA/TVDfNPJQiRI/" + A8 + "Ayo/PQYFS-BA1zA/2066_UR", small : LH5 + "-URZkBYugsY8/TVDfNqWOgxI/" + A8 + "Ay0/tdkTbdYSOrQ/mini2066_UR"}, | |
"2067" : {big : LH5 + "-ErReumiNtC4/TPTMslYyxXI/" + A8 + "Auc/gZszdtTF_hk/2067_R", small : LH4 + "-nN9aFylV8II/TPTMu2rIPyI/" + A8 + "Aus/Mco0hiY2u6w/mini2067_R"}, | |
"2068" : {big : LH3 + "-I91MTam9lTs/TPTMtuxkAoI/" + A8 + "Aug/dFmEqPSFKiU/2068_R", small : LH4 + "-PSOebsa1ysg/TPTMvLEjUzI/" + A8 + "Auw/aajzWlzcsnI/mini2068_R"}, | |
"2069" : {big : LH6 + "-lyaizpUrqhQ/TT9wv8Hj1tI/" + A8 + "AwE/WcctHhf9YnE/2069_SR", small : LH4 + "-BgiN6wTEmrQ/TT9wym0StTI/" + A8 + "AwY/RDvv0OpawOE/mini2069_SR"}, | |
"2070" : {big : LH4 + "-FvCiLluCvDw/TT9wwdS7kfI/" + A8 + "AwI/2ZIRz_zdN4k/2070_UC", small : LH3 + "-r2lAH_Bd0OQ/TT9wy9k0A4I/" + A8 + "Awc/ThUNDwz6pic/mini2070_UC"}, | |
"2071" : {big : LH3 + "-od86VIQ22VM/TT9wwys03KI/" + A8 + "AwM/Bzn7_u7kQDM/2071_UR", small : LH5 + "-N0cjPkJhinc/TT9wzOANviI/" + A8 + "Awg/MrponatyFFs/mini2071_UR"}, | |
"2074" : {big : LH5 + "-UZ8bBtZ5nVY/TW3TyZv-9BI/" + A8 + "A7k/oWifMVFHTxs/2074_R", small : LH6 + "-3qcYnNTvqS4/TW3T04KFZDI/" + A8 + "A78/O18-YshwK1M/mini2074_R"}, | |
"2076" : {big : LH6 + "-QANBigfzxmY/TZCCgAVxqtI/" + A8 + "BDI/vLYtlPCVt2Q/2076_UC", small : LH3 + "-I8dx-BHw9Aw/TZCCjSSlHgI/" + A8 + "BDo/1sxBjnMU2Qc/mini2076_UC"}, | |
"2077" : {big : LH3 + "-u4foXjuJfQ4/TZCCgmDwZxI/" + A8 + "BDM/YhRfGNAag1U/2077_UC", small : LH3 + "-YNUU_YaGeYU/TZCCjy8_GGI/" + A8 + "BDs/X5scvTFm8ms/mini2077_UC"}, | |
"2078" : {big : LH6 + "-bDICdryrQ0s/Tbbbllu1n3I/" + A8 + "BEs/QWJ6IsF3Q3w/2078_R", small : LH3 + "-5RncC4HcYCw/Tbbbm_sNK7I/" + A8 + "BE8/QhMExooBWjg/mini2078_R"}, | |
"2084" : {big : LH6 + "-CD_aAYBnj28/TgB9_X-YOYI/" + A8 + "BGI/FnDGJfDUIDc/2084_SR", small : LH3 + "-MswkfG776fc/TgB9_22PFfI/" + A8 + "BGQ/YABQmwf3Lbo/mini2084_SR"}, | |
"2086" : {big : LH5 + "-gQiX8zJNu50/Ti4pA3WL0YI/" + A8 + "BJs/91U33cCFglo/2086_SR", small : LH6 + "-E5cp1E3mDLw/Ti4pCdT-eCI/" + A8 + "BJ8/KQ_aavGZi5A/mini2086_SR"}, | |
"2088" : {big : LH3 + "-W5GPapcZmA4/TkAJsCsGNfI/" + A8 + "BKM/Q9FtySyLJoc/2088_UR", small : LH4 + "-wLg7mfEfim0/TkAJtfGqCJI/" + A8 + "BKY/MlDGk5mrZpQ/mini2088_UR"}, | |
"2089" : {big : LH6 + "-zzwpE8gva5A/TkAJskkvd8I/" + A8 + "BKQ/DfqIJh72gJg/2089_SR", small : LH5 + "-cW0O6pRe2j0/TkAJtph-QgI/" + A8 + "BKc/NW0Q8L6YmG0/mini2089_SR"}, | |
"2091" : {big : LH6 + "-ytRjxYJ-Ta8/TkAJs7CqZrI/" + A8 + "BKU/uCU6SxoORkQ/2091_UC", small : LH3 + "-TnK6J1-EFJs/TkAJt5APvjI/" + A8 + "BKg/9zAhSi20mNI/mini2091_UC"}, | |
"2092" : {big : LH3 + "-DE8C3haagc0/TlVoTVBc4dI/" + A8 + "BKo/Wf9bQiJMmH8/2092_UR", small : LH3 + "-9paaT3F39nQ/TlVoUIv5NkI/" + A8 + "BKw/fzxJLOMjlQ8/mini2092_UR"}, | |
"2093" : {big : LH5 + "-t4WM5LCFEsM/TlVoTmAlv1I/" + A8 + "BKs/25qnl2BlkJ8/2093_SR", small : LH6 + "-pCa_LjqQ3-k/TlVoUbOLXaI/" + A8 + "BK0/C-lD3T_do18/mini2093_SR"}, | |
"2094" : {big : LH6 + "-wMTjZB_dx1Y/ToAEB4DOqOI/" + A8 + "BTY/IvgiLzKlGzg/2094_UR", small : LH3 + "-5UH5vSnIStU/ToAEC-CnCyI/" + A8 + "BTk/Th_A-8lF_0U/mini2094_UR"}, | |
"2096" : {big : LH3 + "-hhWI9J9j5rE/Tp70LpIuI_I/" + A8 + "BWM/XvRUZs_icps/2096_R", small : LH6 + "-YUlcOMeLUtQ/Tp70OurB_WI/" + A8 + "BXU/230MPJszuBQ/mini2096_R"}, | |
"2097" : {big : LH3 + "-Dsm2vFSIs00/Tp70MEIYRSI/" + A8 + "BWU/QWPccspxphw/2097_UC", small : LH4 + "-huFBmqykyvI/Tp70O1e6uSI/" + A8 + "BXc/TckZYPyfjL0/mini2097_UC"}, | |
"2098" : {big : LH5 + "-EPeWN1qqTpI/Tp70MRZNFzI/" + A8 + "BWc/O6rCghlwyMI/2098_UC", small : LH3 + "-STkejNnsBeE/Tp70POSIlgI/" + A8 + "BXk/lm2WbNyvyv8/mini2098_UC"}, | |
"2099" : {big : LH3 + "-TjdAX_F-UUw/TqbwcNuQy-I/" + A8 + "BYU/AuUAZ3sUtcw/2099_SR", small : LH3 + "-SRItuwFPwmg/TqbweUkzvkI/" + A8 + "BYs/4NDquJetCB8/mini2099_SR"}, | |
"2102" : {big : LH6 + "-i-ejabfb58Y/Tw7YVuHptNI/" + A8 + "Ba4/wX6OzWjsGFE/2102_UR", small : LH3 + "--gdygEG7qL8/Tw7YZMfQj0I/" + A8 + "Bbg/xMjStAYp1bQ/mini2102_UR"}, | |
"2104" : {big : LH3 + "-pNwSC8ozHBg/TxwXed0x7vI/" + A8 + "B-c/AfN_ax4cd04/2104_UR", small : LH4 + "-ES_iLf1EjOk/TxwXf9wgceI/" + A8 + "B-w/p_MjHsNWltc/mini2104_UR"}, | |
"2113" : {big : LH5 + "-9vB3XMb_14s/T_JTML4emMI/" + A8 + "A88/CePWhNtxvJQ/2113_R", small : LH4 + "-QgdJAzQJfts/T_JTfk1Hm2I/" + A8 + "A9M/JRO8UOaZ3lI/mini2113_R"}, | |
"2114" : {big : LH5 + "-zB16UcOsat0/UAzroy3VanI/" + A8 + "BCY/FDXT_AAJ29U/2114_UR_2", small : LH4 + "-C0GSNj6wxu4/UAzsgKhLS0I/" + A8 + "BDM/fi0IbMsmKUw/mini2114_UR_2"}, | |
"2115" : {big : LH4 + "-P4MRhcFNGsI/UAziGMUPvAI/" + A8 + "A_U/YC1kfImr0JU/2115_SR_2", small : LH3 + "-XNob3prSlbs/UAzioXp9rtI/" + A8 + "A_s/Wg7UzsKTWOc/mini2115_SR_2"}, | |
"2116" : {big : LH4 + "-bZeAOjdARhw/UE6ZogBb89I/" + A8 + "BGY/B7CixFLTVSQ/2116_R_1", small : LH6 + "-aZE8Q6kqnq0/UE6Z7dAy9eI/" + A8 + "BGw/OXn577UgfzY/mini2116_R_1"}, | |
"2119" : {big : LH4 + "-IzJ6JZ_As94/UIC9Hwco33I/" + A8 + "BOQ/BWIHpUcUb9M/2119_UR_2", small : LH6 + "-M7bWZSuNgyQ/UIC9zLEpUNI/" + A8 + "BPU/lLMrMPIPYzA/mini2119_UR_2"}, | |
"2120" : {big : LH4 + "-F_9KRIeHhho/UIC9H1D4qeI/" + A8 + "BOM/5CBcfOojmd0/2120_SR", small : LH5 + "-mL2KhVahO34/UIC9zMjkKCI/" + A8 + "BPQ/LxJnF5h4qzs/mini2120_SR"}, | |
"2124" : {big : LH6 + "-zk3OUPvhKE0/UJZA4W72wVI/" + A8 + "BUI/mIaf7XrJaFY/2124_UR_4", small : LH6 + "-tvsCuIs4xxE/UJZB2ZyKhsI/" + A8 + "BVE/9RBq6lUyQJ0/mini2124_UR_4"}, | |
"2129" : {big : LH5 + "-7VWaIxuw7XY/UTlC4k4NZPI/" + A8 + "Bp8/gl4lvaG5c_E/2129_UR_1", small : LH5 + "-xIxKXIhudHg/UTlGUXlmIXI/" + A8 + "BuU/rIlqmAbCkUk/mini2129_UR_1"}, | |
"2135" : {big : LH6 + "-v1kLMHxon4Y/Ums3sTwNkKI/" + A8 + "B1o/O1roN1jMAfs/2135_UR", small : LH4 + "-XO7KSb-50sw/Ums4FxvNq6I/" + A8 + "B2I/4jf60HBd95g/mini2135_UR"}, | |
"3001" : {big : LH4 + "-LVYxV3G7ubA/TMOUE8XBbCI/" + A8 + "Ah4/jDx0mpIkrOw/3001_R", small : LH3 + "-nvcyciDLYzQ/TMOUxFpHtXI/" + A8 + "AoA/n2_0lF8ijyg/mini3001_R"}, | |
"3002" : {big : LH3 + "-MijYWAK6Hb8/TMOUFTN6BfI/" + A8 + "Ah8/y0Q2C9sVW4E/3002_SR", small : LH5 + "-HsSi81b0_NY/TMOUxRs0CDI/" + A8 + "AoE/y-fvMI1ErXQ/mini3002_SR"}, | |
"3003" : {big : LH4 + "-aVqtsl_ANBY/TMOUF4jNx3I/" + A8 + "AiA/SAochOqhxVw/3003_SR", small : LH3 + "-OF3WGe_fRz4/TMOUxgrtLLI/" + A8 + "AoI/9Ynjp1OjEH0/mini3003_SR"}, | |
"3004" : {big : LH3 + "-iN6amrGftpU/TMOUGpyhbJI/" + A8 + "AiI/dbB8Y-0m0OA/3004_SR", small : LH4 + "-rnIb77im6cc/TMOUyHMsUkI/" + A8 + "AoM/FLChu97t_y4/mini3004_SR"}, | |
"3005" : {big : LH6 + "-fP2wpVzcUg8/TMOUHKnmmPI/" + A8 + "AiM/l4KI5iJZRQE/3005_R", small : LH6 + "-BuFJb7NII4M/TMOUyQp9thI/" + A8 + "AoQ/w1-YHs-YDjI/mini3005_R"}, | |
"3006" : {big : LH3 + "-Cas_K_cQ890/TMOUHhLRrAI/" + A8 + "AiQ/NiHuGqp7rdQ/3006_SR", small : LH3 + "-DJhtLQ9zQKg/TMOUy5TkMCI/" + A8 + "AoU/EFQfGP_6LA4/mini3006_SR"}, | |
"3007" : {big : LH6 + "-tU6Fvilpp4s/TMOUIbDNZBI/" + A8 + "AiU/oYDRF2WzHv0/3007_R", small : LH3 + "-1zBimUVswk0/TMOUzKffVYI/" + A8 + "AoY/08XmeBxHtcE/mini3007_R"}, | |
"3008" : {big : LH3 + "-6_1lWBgCkVU/TMOUI-PUYpI/" + A8 + "AiY/r0lYYsg5UHA/3008_UC", small : LH3 + "-QkkxXnwPUco/TMOUzXjSFKI/" + A8 + "Aoc/kovB_9HHTMg/mini3008_UC"}, | |
"3009" : {big : LH3 + "-yuaRA0hdiVw/TMOUJd_COlI/" + A8 + "Aic/j3K4kCt0m1o/3009_UC", small : LH3 + "-NEVxUQoWxlM/TMOUz6kshkI/" + A8 + "Aok/d7vA6IFSZYY/mini3009_UC"}, | |
"3010" : {big : LH6 + "-YKh-2sPAxeQ/TMOUKHLewMI/" + A8 + "Aig/Jf7l4e61yTc/3010_R", small : LH6 + "-NAwcp7IXHFA/TMOU0I--MXI/" + A8 + "Aoo/I1hdTQNwxsM/mini3010_R"}, | |
"3013" : {big : LH5 + "-zMjF2oq2EFc/TMOUKTw0TXI/" + A8 + "Aik/uhKEhrAum7U/3013_UC", small : LH6 + "-AIUCvdT5tyw/TMOU0gQoHbI/" + A8 + "Aos/bPUGDwEH_KE/mini3013_UC"}, | |
"3031" : {big : LH5 + "-4eZX3bX_BWU/TUBXZDLQH4I/" + A8 + "Axw/c5G-WhTsMuU/3031_R", small : LH6 + "-fRrL7fO7u3w/TUBXbLW9ysI/" + A8 + "AyA/C-tHHMOs5QU/mini3031_R"}, | |
"3032" : {big : LH4 + "-lIAmsd2p3iw/TUBXZoTttvI/" + A8 + "Ax0/tFHZPy7pkB4/3032_R", small : LH5 + "-KoK5IXvdysU/TUBXbTyjspI/" + A8 + "AyE/mTNa5a_os54/mini3032_R"}, | |
"3037" : {big : LH5 + "-l1-9QdFG5bk/TMOUK0iKPxI/" + A8 + "Aio/tAxl-misT1Y/3037_R", small : LH5 + "-YOKKvaLQMzs/TMOU1JhNQRI/" + A8 + "Aow/KQVu1KvFESc/mini3037_R"}, | |
"3038" : {big : LH6 + "-Npha340QCO0/TMOULexVMqI/" + A8 + "Ais/X8zY9NNPGZ8/3038_UC", small : LH5 + "-EqbKmGfgV5k/TMOU1Xy4MlI/" + A8 + "Ao0/Gc9aHY7dVdM/mini3038_UC"}, | |
"3039" : {big : LH4 + "-B-xHi9Gu_ig/TMOUL4TFfhI/" + A8 + "Aiw/RhyOA2yKj0I/3039_C", small : LH4 + "-8Lq7sqP36CU/TMOU1iK2YYI/" + A8 + "Ao4/_ZoT_00yPd0/mini3039_C"}, | |
"3040" : {big : LH4 + "-ynSM39Zynpw/TMOUMmuuX_I/" + A8 + "Ai0/PFXJMb9M00A/3040_SR", small : LH6 + "-Nnr_nohY5-M/TMOU1xFvjlI/" + A8 + "Ao8/dT1K1hCGCu8/mini3040_SR"}, | |
"3041" : {big : LH4 + "-x9HbCgMx1P4/TMOUNNVsfNI/" + A8 + "Ai4/zPsag1CuvwI/3041_R", small : LH6 + "-0hJFkltJnsE/TMOU2fLpLEI/" + A8 + "ApA/Rz0K5V0DLYM/mini3041_R"}, | |
"3042" : {big : LH4 + "-5_52oj93cGs/TMOUNwrd0hI/" + A8 + "Ai8/_XIpmZ4HQBI/3042_R", small : LH5 + "-Xia2s0OGnMo/TMOU2_XO_PI/" + A8 + "ApE/PWtzxvN6PJc/mini3042_R"}, | |
"3043" : {big : LH3 + "-4X7Tw1Dg2ms/TMOUOU6udXI/" + A8 + "AjA/FffzjDC3iOY/3043_UC", small : LH6 + "-nZf8oMrqkZ8/TMOU3CYK0dI/" + A8 + "ApI/C_mwbu0iBYU/mini3043_UC"}, | |
"3045" : {big : LH3 + "-jzsgxYqTCDg/TMOUPedOOLI/" + A8 + "AjE/WhT3fgdF9FY/3045_UR", small : LH5 + "-d9DgN-6KNzM/TMOU3SagEjI/" + A8 + "ApM/1aOYNsBeCoM/mini3045_UR"}, | |
"3046" : {big : LH3 + "-z4D2MsNgSi8/TMOUP1m0hXI/" + A8 + "AjI/ZIQjJIejimE/3046_UR", small : LH5 + "-QBl6DMNPIfw/TMOU3__uZiI/" + A8 + "ApQ/Wzfy0CGO3ts/mini3046_UR"}, | |
"3047" : {big : LH3 + "-b-zDXcYmwoE/TMO7sx_MhTI/" + A8 + "Aqs/s7FdawzHJJE/3047_UR", small : LH3 + "-t9ECqhG0r6E/TMO7uk2RMbI/" + A8 + "Aq8/5UkhDkXZhmg/mini3047_UR"}, | |
"3049" : {big : LH3 + "-1M6Mz9a9TzU/TMOUQoZ9_BI/" + A8 + "AjM/LjJ6QuYcy_E/3049_UC", small : LH3 + "-taSkS87ilLw/TMOU4DefQaI/" + A8 + "ApU/J4JLkO-a5Lg/mini3049_UC"}, | |
"3051" : {big : LH3 + "-TFOOxvjJKeo/TMO7tOarDJI/" + A8 + "Aqw/RfZ7fjwmLlo/3051_R", small : LH3 + "-0cCh_A5ztCA/TMO7uzlkjxI/" + A8 + "ArA/bTtfuUdUTJE/mini3051_R"}, | |
"3052" : {big : LH3 + "-8NffT6IZG2I/TMOURLLbAmI/" + A8 + "AjQ/Wfey2KDy-Jg/3052_UC", small : LH5 + "-Yf4E9xdKdOA/TMOU4sXrtrI/" + A8 + "ApY/_IuUt6Gc-JA/mini3052_UC"}, | |
"3053" : {big : LH3 + "-uTgde6Nw3eM/TMclOnUVmuI/" + A8 + "Arc/pOoENC71FVs/3053_UR", small : LH4 + "-8kQDWknwpKc/TMclRJkg-KI/" + A8 + "Ar4/-5sgbHhLUrE/mini3053_UR"}, | |
"3054" : {big : LH6 + "-DVm9YUFfQa4/TMclO1AjeeI/" + A8 + "Arg/G5EV5wmQgyE/3054_SR", small : LH4 + "-X0Y65vBOOYw/TMclRZnTrAI/" + A8 + "Ar8/nq3XEa6rYb4/mini3054_SR"}, | |
"3056" : {big : LH5 + "-MA_-i6yxU_4/TUBXaIPMHJI/" + A8 + "Ax4/iV3kyDOi7VU/3056_UR", small : LH4 + "--euHdRVt6mY/TUBXb9yQkrI/" + A8 + "AyI/VmlaQTwEBS8/mini3056_UR"}, | |
"3057" : {big : LH5 + "-vjss5dEfpX0/TUBXailKb_I/" + A8 + "Ax8/NcU8g79acfo/3057_UR", small : LH3 + "-M8Rhkb4VLpA/TUBXcY7xReI/" + A8 + "AyM/G0p2UxJV_wo/mini3057_UR"}, | |
"3058" : {big : LH3 + "-0pxkAYg06tk/TSE1FxEaCdI/" + A8 + "AvQ/KjizN46LWX0/3058_UR", small : LH3 + "-DSW96376Tfc/TSE1HW4UCPI/" + A8 + "Avg/JQdRau-da_M/mini3058_UR"}, | |
"3062" : {big : LH6 + "-aHX8lR6Ahag/TT9wxxmDquI/" + A8 + "AwQ/cTeNAhpKT0Y/3062_UC", small : LH6 + "-S0H7LzqulHU/TT9wzovgP3I/" + A8 + "Awk/mIzaSy1V2PU/mini3062_UC"}, | |
"3064" : {big : LH5 + "-c-Gnv1iQVVY/TW3Ty-i035I/" + A8 + "A7o/P2BvGFtJt_M/3064_R", small : LH4 + "-k5K3vL6b6_E/TW3T1FlyA0I/" + A8 + "A8A/izks226-mw8/mini3064_R"}, | |
"3065" : {big : LH5 + "-TIjhYRvuTWc/TZCChGGo_QI/" + A8 + "BDQ/uH3mHF3Zp2k/3065_UR", small : LH5 + "-ozaGASGEhhs/TZCCkF4YNwI/" + A8 + "BDw/afuHU1TLGqM/mini3065_UR"}, | |
"3066" : {big : LH4 + "-SzKmKmr-nqs/TW5YvoDXm3I/" + A8 + "A8w/NWKKEuxD3uM/3066_UR", small : LH4 + "-1qmtbnVCM7w/TW5YwI_9MQI/" + A8 + "A80/k-xRd1LiecE/mini3066_UR"}, | |
"3067" : {big : LH5 + "-0oq9DyXmsGY/TZCChmRG8XI/" + A8 + "BDU/2RVqQUl1JLQ/3067_UR", small : LH3 + "-YtH8Dq4b5KY/TZCCkRLt4oI/" + A8 + "BD0/Rh3J4Ldta7s/mini3067_UR"}, | |
"3078" : {big : LH5 + "-z_T8oyM-Npc/Tp70MwHnS9I/" + A8 + "BWk/x0Oae4Uaom8/3078_R", small : LH5 + "-F-8WFZaHSjU/Tp70PetFrqI/" + A8 + "BXs/RAgjtiqhT48/mini3078_R"}, | |
"3079" : {big : LH3 + "-LuZq2Bo9Xdg/Tp70NT-De1I/" + A8 + "BWs/fjajiN1v0b8/3079_UC", small : LH5 + "-X1HDBaq5BKE/Tp70Pmq8eaI/" + A8 + "BX0/tjzbw-WuG5g/mini3079_UC"}, | |
"3080" : {big : LH4 + "-mTQR7_p-K_M/Tp70NuAP6oI/" + A8 + "BW0/hefRxiMAimk/3080_UC", small : LH6 + "-hLMSLSZir-A/Tp70P-0cnNI/" + A8 + "BX8/DB1vbLd_4X0/mini3080_UC"}, | |
"3081" : {big : LH4 + "-e9lQGOo4q1I/TrnKdOVqFlI/" + A8 + "BZE/iQAfgS7Jask/3081_UR", small : LH5 + "-avoNc0UG0Ps/TrnKfabmv4I/" + A8 + "BZY/Mspr8MDFhKQ/mini3081_UR"}, | |
"3082" : {big : LH4 + "-rN-x8VDrazY/TrnKdiN4kTI/" + A8 + "BZI/-UJJT4ea0eU/3082_SR", small : LH4 + "-0rX402sK2LM/TrnKfwq_PpI/" + A8 + "BZg/WXrIfST5bsQ/mini3082_SR"}, | |
"3083" : {big : LH6 + "-BFc6XaEQWF0/TrnKeEPMYNI/" + A8 + "BZQ/fm4YeprtrcI/3083_R", small : LH3 + "-KBPt30ooorY/TrnKg4RmnII/" + A8 + "BZo/tOgexpuVEQY/mini3083_R"}, | |
"3087" : {big : LH4 + "-qzjK8ADzMGo/TspwUbLYNxI/" + A8 + "BZ4/r0_TV4ewizI/3087_UR", small : LH5 + "-YeNbZ3_YPP8/TspwWHRCwoI/" + A8 + "BaQ/zXxNfLGaeWw/mini3087_UR"}, | |
"3089" : {big : LH5 + "-rC2jSBS8-GU/Tw7YWFASvkI/" + A8 + "BbA/AWfLtqaudFY/3089_UR", small : LH6 + "-knOlpahCh0g/Tw7YZ7MsM9I/" + A8 + "Bbo/jFpNIySEQ_g/mini3089_UR"}, | |
"3090" : {big : LH5 + "-OxGBgZKGomY/Tw7YWlkspCI/" + A8 + "BbM/RU6JrZZzpYo/3090_SR", small : LH3 + "-Vyb3WdXg9tY/Tw7YaVJbEkI/" + A8 + "Bbw/lSelD5ltTCA/mini3090_SR"}, | |
"3091" : {big : LH5 + "-1KxA8jtEYl4/TxwXe1wFRiI/" + A8 + "B-g/EmQeJaAknpE/3091_UR", small : LH3 + "-Qz_xBeLPdpI/TxwXgGaefSI/" + A8 + "B-0/-BOEkr_hhhM/mini3091_UR"}, | |
"3097" : {big : LH3 + "-huC8I-JO3E0/T7llAmAT6nI/" + A8 + "AT4/iag3Y8KRprY/3097_SR", small : LH6 + "-o4PoL-MSnp4/T7nYOxmhvsI/" + A8 + "Ab8/qwjrH1tP_0w/mini3097_SR"}, | |
"3104" : {big : LH6 + "-n5Q863B6CLM/UE6cVl55ghI/" + A8 + "BJE/wQgw0nSHJPw/3104_UR_1", small : LH5 + "-dBgRCSd7Jw4/UE6b3pv014I/" + A8 + "BIY/repXjHDPRR4/mini3104_UR_1"}, | |
"3105" : {big : LH6 + "-WVnB9VDdSn0/UE6antTFFfI/" + A8 + "BHQ/mOzVY6lr_Cc/3105_SR_1", small : LH3 + "-95ogeoXGAAk/UE6bK6PZlVI/" + A8 + "BH4/94VifuC4Mos/mini3105_SR_1"}, | |
"3107" : {big : LH3 + "-S40aLmCnyzw/UID3UdORD2I/" + A8 + "BRk/79joqIUsTA8/3107_SR_1", small : LH5 + "-1nlXqFmSHcE/UID3sC9cPNI/" + A8 + "BSc/sjwYkw8nLV0/mini3107_SR_1"}, | |
"3112" : {big : LH4 + "-Qh5PG5vU79s/UPYue_vi8wI/" + A8 + "BXE/Wof7CjUclh8/3112_SR_1", small : LH3 + "-tgqttZdBmsQ/UPYvHwKh54I/" + A8 + "BYI/Xw2cwbBjFeg/mini3112_SR_1"}, | |
"3114" : {big : LH4 + "-PWRPMCW_8nw/UQB71FZ_rJI/" + A8 + "Bok/SMmWO_npT-w/3114_UR_2", small : LH5 + "-rZFtmSrBoa4/UQB-peD_L6I/" + A8 + "BpE/YmANErxmpVk/mini3114_UR_2"}, | |
"3115" : {big : LH3 + "-1Gv-BhhjBgc/UP9qf2EYXwI/" + A8 + "BlY/xWX0a4XMjfU/3115_SR", small : LH6 + "-OuO89fNd_lA/UP9s5knoRNI/" + A8 + "BnM/N72ghulqyHE/mini3115_SR"}, | |
"3116" : {big : LH3 + "-c8UNKpm75tU/UP9qf26gngI/" + A8 + "BlU/plKSps_bo-0/3116_R_1", small : LH3 + "-jc1KtP7vBI0/UP9s5Xfi6pI/" + A8 + "BnI/_rSx0ZK3QpI/mini3116_R_1"}, | |
"3117" : {big : LH3 + "-qth0LJLtmN4/UP9qhdz6a3I/" + A8 + "Bls/EDcAoFVbMek/3117_R", small : LH6 + "-6W1TfhykLvI/UP9s6zknVuI/" + A8 + "Bng/FZtc3xohoSg/mini3117_R"}, | |
"3128" : {big : LH3 + "-VFelVhuAy9c/Ums3s9X4VqI/" + A8 + "B1w/53tkFE1hHy8/3128_UC", small : LH6 + "-0g5jlxd2M38/Ums4GaX5DQI/" + A8 + "B2M/kydmzxXZ7Dc/mini3128_UC"}, | |
"4001" : {big : LH3 + "-rPCGC0Bh1Fc/TVDfNfYhGFI/" + A8 + "Ays/oAhuRQLpZ6g/4001_SR", small : LH6 + "-lzwENk0zJTY/TVDfNS309kI/" + A8 + "Ayw/o7wt9h6D9H0/mini4001_SR"}, | |
"4002" : {big : LH3 + "-W_U4yFEJO_w/TMOUSQRaowI/" + A8 + "AjY/eWtvz4DjgpY/4002_R", small : LH5 + "-UQ02qCvIsSE/TMOU5X1QQ2I/" + A8 + "Apg/hd71wP-QCsM/mini4002_R"}, | |
"4003" : {big : LH3 + "-x7NnM3JgJZw/TMOUS6P0fEI/" + A8 + "Ajc/-86F_ombfWA/4003_R", small : LH5 + "-bFhMrBs54MY/TMOU5gR3uGI/" + A8 + "Apk/GprgvA1z1Tc/mini4003_R"}, | |
"4004" : {big : LH5 + "-UC0Xt7phUqc/TMOUTVFsIzI/" + A8 + "Ajg/II3Atly7DMQ/4004_R", small : LH5 + "-DwOJrIsEEL8/TMOU5xFmbNI/" + A8 + "Apo/dHDqeM1d8oY/mini4004_R"}, | |
"4005" : {big : LH3 + "-gg06FKX2y7U/TMOUT_9oPHI/" + A8 + "Ajk/fE9Q2wyDl2A/4005_R", small : LH6 + "-sFQNguvj5Eo/TMOU6TwZASI/" + A8 + "Aps/JvYbLu153VI/mini4005_R"}, | |
"4006" : {big : LH3 + "-FyRRZUULxmI/TMOUUkqxrZI/" + A8 + "Ajo/hbPU10vxNgY/4006_UC", small : LH4 + "-5dbFOaq0U9Y/TMOU6pFCFWI/" + A8 + "Apw/iE3MhkdXs8A/mini4006_UC"}, | |
"4007" : {big : LH6 + "-HqKuRnEtZZw/TMOUVMCW3UI/" + A8 + "Ajs/I7Q0pRkjPP0/4007_C", small : LH4 + "-zZ1bXt6hgok/TMOU67kpv5I/" + A8 + "Ap0/K0rzvCliT2M/mini4007_C"}, | |
"4025" : {big : LH6 + "-ue3GXe6VYhU/TMOUVhhQZgI/" + A8 + "Ajw/Yv9OIE3vXFY/4025_SR", small : LH6 + "-eRrpaGiEWIc/TMOU7boBMmI/" + A8 + "Ap4/37zpxctxsrY/mini4025_SR"}, | |
"4026" : {big : LH6 + "-d0vd96hgy4U/TMOUWNKSqqI/" + A8 + "Aj0/ShsOJEG8Gp4/4026_R", small : LH4 + "-bCy-k5N_bOU/TMOU7huScDI/" + A8 + "Ap8/U9iqGwANKew/mini4026_R"}, | |
"4027" : {big : LH3 + "-vDtqbTFiv4c/TMOUWnm5w0I/" + A8 + "Aj4/Bu3o1Jk0YTM/4027_UC", small : LH5 + "-Gq7KiIlxyBQ/TMOU8EoFz6I/" + A8 + "AqA/XqXqOJyx2H8/mini4027_UC"}, | |
"4029" : {big : LH5 + "-iZ7an7IwqJw/TMOUXLFtWWI/" + A8 + "Aj8/xrpOND9Db9k/4029_R", small : LH4 + "-zZKgtvOromE/TMOU8opmvtI/" + A8 + "AqE/y7_CR6YQiaA/mini4029_R"}, | |
"4031" : {big : LH4 + "-ggQonUkSp2g/TMOUXki26vI/" + A8 + "AkA/MPykzDQ5qIc/4031_UR", small : LH5 + "-g057mb26wuI/TMOU82SqcSI/" + A8 + "AqI/tXaY5x8gKUw/mini4031_UR"}, | |
"4032" : {big : LH5 + "-oDiCoH0S4GY/TMOUYLSFpuI/" + A8 + "AkE/tPmlskMoFBo/4032_SR", small : LH5 + "-ATpTfZiGvJ4/TMOU9X-ULPI/" + A8 + "AqM/aICJqXLSuoo/mini4032_SR"}, | |
"4033" : {big : LH4 + "-y1vHJL6eyUM/TMOUYprSnDI/" + A8 + "AkI/TG2q8rtqAFE/4033_SR", small : LH6 + "-hel0pFyOVq8/TMOU9_n_ygI/" + A8 + "AqQ/VwxRGxb5k4g/mini4033_SR"}, | |
"4034" : {big : LH3 + "-BBLUVlJNN-I/TMOUZEb3lSI/" + A8 + "AkM/Td501sGU6bo/4034_SR", small : LH6 + "-nML-048INCI/TMOU-MOyyAI/" + A8 + "AqU/0THXpe1PPBU/mini4034_SR"}, | |
"4038" : {big : LH5 + "-Tri4DBVSvuo/TMclPU4sQJI/" + A8 + "Ark/98Bq-Thq08E/4038_UC", small : LH5 + "-3LUqSD-vxQ8/TMclRv5Tt9I/" + A8 + "AsA/O9wriGDDBHY/mini4038_UC"}, | |
"4039" : {big : LH5 + "-nSd40N3yHX4/TSE1GVQmGFI/" + A8 + "AvU/onDT_HtL79w/4039_UR", small : LH5 + "-W6hIQyo7Cfw/TSE1H4-8fMI/" + A8 + "Avk/wRPf-LA7GjQ/mini4039_UR"}, | |
"4042" : {big : LH3 + "-YxtLfx6S78Q/TW3TznofjBI/" + A8 + "A7w/ub9ZbVI7F58/4042_SR", small : LH6 + "--nNRKfWE9H4/TW3T1zS1NAI/" + A8 + "A8I/pBQSHMlcCU4/mini4042_SR"}, | |
"4046" : {big : LH4 + "-2F1qPtMYiX4/TT9wyNTs4BI/" + A8 + "AwU/dGNaHahxfSw/4046_UC", small : LH5 + "-8fTiLKAoeqw/TT9wz1rKLaI/" + A8 + "Awo/nHJxWucyu5w/mini4046_UC"}, | |
"4047" : {big : LH3 + "-_6b0I5nlXFw/TZCCiGASkKI/" + A8 + "BDY/2w55Uy5U6gg/4047_SR", small : LH4 + "-u-_xhc4C1Rs/TZCCknJF8oI/" + A8 + "BD4/awQFYPosn2Y/mini4047_SR"}, | |
"4048" : {big : LH4 + "-Ua1c7kmbE_Q/TW3T0LKqBAI/" + A8 + "A70/AmqXTG-w6U8/4048_SR", small : LH4 + "-CUtV4_Sca10/TW3T2EOWkeI/" + A8 + "A8M/IO2rlZ7DEN4/mini4048_SR"}, | |
"4050" : {big : LH5 + "-1aUHVy2cx8A/TZCCiaYThhI/" + A8 + "BDc/H0ylhZfXVN4/4050_SR", small : LH3 + "-w_XSpOvtk5Y/TZCCk-dnqKI/" + A8 + "BD8/nxkS4UeSc60/mini4050_SR"}, | |
"4051" : {big : LH4 + "-fWdLakxRGmY/Tbbbl3e67II/" + A8 + "BEw/OYhBHDHMgfM/4051_UR", small : LH3 + "-xqTnAa-A03g/TbbbnAlAPII/" + A8 + "BFA/FZCJL24YBWw/mini4051_UR"}, | |
"4052" : {big : LH3 + "-pDdAtOUiaj0/TbbbmfoveXI/" + A8 + "BE0/RO9fO-OqMlU/4052_R", small : LH4 + "-hJfIO125Fxk/TbbbnlUfVrI/" + A8 + "BFE/YKcFUgg7XR8/mini4052_R"}, | |
"4053" : {big : LH3 + "-0UHrFqB2wgo/Tdp214RxijI/" + A8 + "BFU/U6QERIKs-n4/4053_UR", small : LH6 + "-5r12h8jRtK8/Tdp22plxIwI/" + A8 + "BFg/eQKLN_XWlXQ/mini4053_UR"}, | |
"4055" : {big : LH5 + "-t5j_uxkBUUo/Ti4pBUala5I/" + A8 + "BJw/Na0lakZ8ix0/4055_UR", small : LH5 + "-kO2YGVIfS98/Ti4pCkeIBhI/" + A8 + "BKA/h9muF4mF9Aw/mini4055_UR"}, | |
"4056" : {big : LH5 + "-tc70aUVdjYc/Ti4pB0XfnpI/" + A8 + "BJ0/h9lJQexYh88/4056_SR", small : LH6 + "-SG-lJWzT8gs/Ti4pC81gvEI/" + A8 + "BKE/d9c01H_M7iQ/mini4056_SR"}, | |
"4059" : {big : LH3 + "-_HDOuV0cCzs/ToAECN6WNgI/" + A8 + "BTc/_zWu-El83-8/4059_R", small : LH3 + "-k_ujaZsYUho/ToAEDJliZPI/" + A8 + "BTo/04iIBFrfQbk/mini4059_R"}, | |
"4060" : {big : LH5 + "-BdtTX_9ulhY/Tqbwch0QylI/" + A8 + "BYc/ddz7lMRr48I/4060_UR", small : LH3 + "-gaMKP-vv5qk/Tqbwe2JJgKI/" + A8 + "BY0/r7LeU3aqCMg/mini4060_UR"}, | |
"4063" : {big : LH6 + "-qNAEp7X6Ix8/TspwUmc9roI/" + A8 + "BZ8/mW6lxnRJH_w/4063_R", small : LH3 + "-OiNwhH_-N2g/TspwWu0q0KI/" + A8 + "BaU/9Zkw8-5oLXM/mini4063_R"}, | |
"4064" : {big : LH4 + "-PPo8pbYl7pY/TspwVEH9qSI/" + A8 + "BaI/QgmJlUepXbs/4064_R", small : LH3 + "-S1PgP2M1W-E/TspwW9LpU8I/" + A8 + "BaY/uX1FpgZE1fM/mini4064_R"}, | |
"4068" : {big : LH6 + "-mXybKpO3MxU/TxwXfQZQ6vI/" + A8 + "B-o/qMMJpQI4HZA/4068_R", small : LH6 + "-a9KfzpV-E2I/TxwXgtbva9I/" + A8 + "B-4/2WXHGrWt2nI/mini4068_R"}, | |
"4070" : {big : LH5 + "-5v9x5wLYZbg/T7ljOVNCm4I/" + A8 + "AVM/3c-3ocxe6LA/4070_SR", small : LH5 + "-89fmKZ-AemQ/T7nYPJfPbzI/" + A8 + "AcE/GcUm5rrMJFw/mini4070_SR"}, | |
"4072" : {big : LH3 + "-dnwJnSMFjCI/T7ljORaMLiI/" + A8 + "AVM/45L-QW2xsTg/4072_UR", small : LH4 + "-LqxiOvi6CAs/T7nYRuvICsI/" + A8 + "Acg/GCaxgRHB2q0/mini4072_UR"}, | |
"4074" : {big : LH3 + "-9C4FZ6P9FgU/T7llDYtQ_lI/" + A8 + "AUc/9JSYu61E1wk/4074_UC", small : LH5 + "-07D1YcUlNes/T7nYPkBVlgI/" + A8 + "AcI/3iOxiYbJJjE/mini4074_UC"}, | |
"4077" : {big : LH6 + "-Omkt1keqECU/T7nX55Clk8I/" + A8 + "Aa8/lOZ0-nOoExY/4077_R", small : LH5 + "-rP63zVr-Lc8/T7nYSMdv7QI/" + A8 + "Ack/UqLUuorhbLQ/mini4077_R"}, | |
"4083" : {big : LH3 + "-paniUyvXOYU/T_JTMEF8OGI/" + A8 + "A84/7jO8m78iPN0/4083_R", small : LH6 + "-lu1Ebq-X-so/T_JTfgApGQI/" + A8 + "A9I/cVLI5p6xino/mini4083_R"}, | |
"4086" : {big : LH4 + "-wSj17hvWofE/UAzoANfjeKI/" + A8 + "BAM/GDaTIwF0LNY/4086_R_2", small : LH3 + "-OTt_d-f-s7c/UAzo0o7UvBI/" + A8 + "BBA/JM7uOKR-FSI/mini4086_R_2"}, | |
"4087" : {big : LH3 + "-rIM5zcp6cBY/UCt_IqF1euI/" + A8 + "BD4/sqe4CLMkqD4/4087_UR", small : LH3 + "-_1kvBfrF6ds/UCt_yWPKYBI/" + A8 + "BEI/SSYWfgvy_5A/mini4087_UR"}, | |
"4090" : {big : LH5 + "-prbUj2DB4s8/UE66bXfZQHI/" + A8 + "BMA/AEKev34FBr8/4090_UC", small : LH5 + "-7uPGf-2kaBw/UE66-zrTKXI/" + A8 + "BMk/Hw2Le-0xoI8/mini4090_UC"}, | |
"4093" : {big : LH5 + "-lULhtPaxek4/UE6dXd7dgsI/" + A8 + "BKE/cxB_e5taEgE/4093_UC_3", small : LH5 + "-VgzqzrRiBlg/UE6eMJWKQaI/" + A8 + "BKw/9V4bqVVzXH8/mini4093_UC_3"}, | |
"4105" : {big : LH5 + "-eXyMVfo78Y4/UTlC5A97IcI/" + A8 + "BqU/Ijj_OHPCPWg/4105_UR_1", small : LH3 + "-1G6tQppvPEY/UTlGVBHhA-I/" + A8 + "Bug/--a7m39z-XU/mini4105_UR_1"}, | |
"4111" : {big : LH6 + "-xUI3JAc8R8U/UTlC6AMgFUI/" + A8 + "Bq0/ZNUirvKRynE/4111_UR_1", small : LH4 + "-mhxrs0ekOOs/UTlGVo1QVkI/" + A8 + "Bu4/nG_K_ZsFZoc/mini4111_UR_1"} | |
}; | |
var elements = document.getElementsByClassName('illust'); | |
for (i = 0; i < elements.length; i++) { | |
// 大イラストの置き換え | |
if (elements[i].nodeName == 'IMG') { | |
var imgname = elements[i].src.substring(elements[i].src.lastIndexOf("/") + 1).substring(0, 4); | |
if (illust[imgname] != undefined && illust[imgname] != null) { | |
elements[i].src = illust[imgname].big + ".png"; | |
} | |
} | |
// サムネイルの置き換え | |
if (elements[i].nodeName == 'TD' || elements[i].nodeName == 'DIV') { | |
var img = elements[i].getElementsByTagName('img')[0]; | |
if(img !=undefined){ | |
var imgname = img.src.substring(img.src.lastIndexOf("/") + 1).substring(0, 4); | |
if (illust[imgname] != undefined && illust[imgname] != null) { | |
img.src = illust[imgname].small + ".png"; | |
} | |
} | |
} | |
} | |
// 小イラストの置き換え | |
var minielements = document.getElementsByClassName('illustMini'); | |
for (i = 0; i < minielements.length; i++) { | |
var img = minielements[i].getElementsByTagName('img')[0]; | |
if(img !=undefined){ | |
var imgname = img.src.substring(img.src.lastIndexOf("/") + 1).substring(0,4); | |
if (illust[imgname] != undefined && illust[imgname] != null) { | |
img.src = illust[imgname].small + ".png"; | |
} | |
} | |
} | |
// イメージ: 水鏡先生を袁術先生に変更 | |
var teacher = document.getElementById('teacher'); | |
if (teacher != null) { | |
var random = Math.floor(Math.random() * 6); // 0?5までの乱数値 | |
switch (random) { | |
case 0: | |
teacher.src = LH4 + "_yaaM6-lAuRY/TNfkJ53VBtI/" + A8 + "AtU/fO6qaKBfrXk/teacher_1.png"; | |
break; | |
case 1: | |
teacher.src = LH4 + "_yaaM6-lAuRY/TNfkJ4sFEnI/" + A8 + "AtY/r-L-XnSGQm8/teacher_2.png"; | |
break; | |
case 2: | |
teacher.src = LH4 + "_yaaM6-lAuRY/TNfkKLdQJCI/" + A8 + "Atc/kD8dw97xWxU/teacher_3.png"; | |
break; | |
case 3: | |
teacher.src = LH3 + "_yaaM6-lAuRY/TNfkKHSLDfI/" + A8 + "Atg/wm0YlHobs-Y/teacher_4.png"; | |
break; | |
case 4: | |
teacher.src = LH4 + "_yaaM6-lAuRY/TNfkKP8Y7VI/" + A8 + "Atk/I9rPMmSn2fs/teacher_5.png"; | |
break; | |
case 5: | |
teacher.src = LH3 + "_yaaM6-lAuRY/TNfkNVG2ypI/" + A8 + "Ato/Fw5oA8LMYWE/teacher_6.png"; | |
break; | |
} | |
} | |
// 名札: "水鏡先生"を"袁術先生"に変更 | |
var teacher_name = document.getElementById('teacherName'); | |
if (teacher_name != null) { | |
teacher_name.src = LH3 + "_yaaM6-lAuRY/TNfkNpLhUyI/" + A8 + "Ats/fpXRp00rQv0/teacher_name.png"; | |
} | |
// プロフィール背景画像を差し替え | |
GM_addStyle('div#header_bottom #profileBtn a { background-image:url("http://lh3.ggpht.com/_yaaM6-lAuRY/TNfm_YvWZxI/AAAAAAAAAt0/jnHgWqKO96Q/profile.png") !important }'); | |
} | |
//end | |
// カードのレアリティを見た目だけ変更するアホツール | |
// ブラ三 | |
function disp_URChange() { var css = "div.card {\n background: transparent url(/20120802-01/extend_project/w760/img/card/common/bg_card_ur.png) no-repeat scroll left top !important;\n }\n \n span.soltype {\n overflow: hidden;\n width: 21px;\n }\n span.soltype img[title=\"歩兵\"] {\n padding-left: 21px !important;\n background-image: url(/20120802-01/extend_project/w760/img/card/type/type_501_ur.gif) !important;\n }\n span.soltype img[title=\"槍兵\"] {\n padding-left: 21px !important;\n background-image: url(/20120802-01/extend_project/w760/img/card/type/type_502_ur.gif) !important;\n }\n span.soltype img[title=\"騎兵\"] {\n padding-left: 21px !important;\n background-image: url(/20120802-01/extend_project/w760/img/card/type/type_503_ur.gif) !important;\n }\n span.soltype img[title=\"弓兵\"] {\n padding-left: 21px !important;\n background-image: url(/20120802-01/extend_project/w760/img/card/type/type_504_ur.gif) !important;\n }";disp_BGChange(css);} | |
function disp_SRChange() { var css = "div.card {\n background: transparent url(/20120802-01/extend_project/w760/img/card/common/bg_card_sr.png) no-repeat scroll left top !important;\n }\n \n span.soltype {\n overflow: hidden;\n width: 21px;\n }\n span.soltype img[title=\"歩兵\"] {\n padding-left: 21px !important;\n background-image: url(/20120802-01/extend_project/w760/img/card/type/type_501_sr.gif) !important;\n }\n span.soltype img[title=\"槍兵\"] {\n padding-left: 21px !important;\n background-image: url(/20120802-01/extend_project/w760/img/card/type/type_502_sr.gif) !important;\n }\n span.soltype img[title=\"騎兵\"] {\n padding-left: 21px !important;\n background-image: url(/20120802-01/extend_project/w760/img/card/type/type_503_sr.gif) !important;\n }\n span.soltype img[title=\"弓兵\"] {\n padding-left: 21px !important;\n background-image: url(/20120802-01/extend_project/w760/img/card/type/type_504_sr.gif) !important;\n }";disp_BGChange(css);} | |
// MCAXIS | |
// PR,HR,UR,SR | |
function disp_PRChange() { var css = "div.card {\n background: transparent url(http://mg-cdn.bmcaxis.jp/20121220-01/extend_project/mcaxis/img/card/common/bg_card_pr.png) no-repeat scroll left top !important;\n }";disp_BGChange(css);} | |
function disp_HRChange() { var css = "div.card {\n background: transparent url(http://mg-cdn.bmcaxis.jp/20121220-01/extend_project/mcaxis/img/card/common/bg_card_hr.png) no-repeat scroll left top !important;\n }";disp_BGChange(css);} | |
function disp_ARChange() { var css = "div.card {\n background: transparent url(http://mg-cdn.bmcaxis.jp/20121220-01/extend_project/mcaxis/img/card/common/bg_card_ur.png) no-repeat scroll left top !important;\n }";disp_BGChange(css);} | |
function disp_BRChange() { var css = "div.card {\n background: transparent url(http://mg-cdn.bmcaxis.jp/20121220-01/extend_project/mcaxis/img/card/common/bg_card_sr.png) no-repeat scroll left top !important;\n }";disp_BGChange(css);} | |
function disp_BGChange(css){ | |
if (typeof GM_addStyle != "undefined") { | |
GM_addStyle(css); | |
} else if (typeof PRO_addStyle != "undefined") { | |
PRO_addStyle(css); | |
} else if (typeof addStyle != "undefined") { | |
addStyle(css); | |
} else { | |
var heads = document.getElementsByTagName("head"); | |
if (heads.length > 0) { | |
var node = document.createElement("style"); | |
node.type = "text/css"; | |
node.appendChild(document.createTextNode(css)); | |
heads[0].appendChild(node); | |
} | |
} | |
} | |
// レアリティを見た目だけ変更するアホツール END | |
function disp_SENSEIChange() { //水鏡先生"を"袁術先生"に変更に置き換えるアホツール START ***************************************************************** | |
if(document.getElementById('questB3_thumb')){document.getElementById('questB3_thumb').innerHTML = '<img src="http://gyazo.com/86f98f411fc6bc7d0f2c208999bab8f9.png?1336998290"><div style="color:#fff; width:150px; height:30px; text-align:center; background-color:#fcc; background-image:url(../20120508-02/extend_project/w760/img/tutorial/quest_name_bg.png); line-height:25px;">やっぱり 水鏡先生</div>';}} | |
////////////////////// | |
//スタイル変更 | |
////////////////////// | |
//必ず実行する。 | |
function cut_main(){ | |
if(location.pathname != "/run_appli.pl"){ | |
return; | |
} | |
GM_addStyle( | |
".appliMainbox01,.gadgetStage, .gadgetStage iframe {width:945px !important;}" + | |
".appliSidebox01 {display:none !important;}" + | |
".mixiPointDisplay {display:none !important;}" + | |
".serviceNavigation {display:none !important;}" + | |
".headerLogo {display:none !important;}" + | |
".adBanner {display:none !important;}" + | |
".globalNavigation {display:none !important;}" + | |
".displayMain {display:none !important;}" | |
); | |
} | |
//必ず実行する。 | |
function cut_main1(){ | |
GM_addStyle( | |
"#server_wrapper, #canvas_view #container {width:auto !important;}" + | |
".serverNews, #serverLatest, #serverList, .serverBrowser {margin:0 auto 10px !important;}" + | |
".serverNews, #serverList, .serverBrowser {width:742px !important;}" + | |
".serverItem1 {margin:5px !important;}" + | |
"#serverLatest {width:280px !important;}" + | |
".serverItemSpace {display:none !important;}" + | |
"#gadget-friend-selector{display:none !important;}" + | |
"#adsHeader {display:none !important;}" + | |
"#mapbox div.alliance-base-box-top{left: 260px ! important; top:0px ! important;}" +//同盟拠点 | |
"div#action{left: 415px ! important; top:10px ! important;}" + | |
"#mixi_ad_head, #mixi_ad_groups {display:none !important;}" | |
); | |
//ブラ三ニュース配置変更 | |
if(OPT_B3NEWS && document.getElementsByClassName("brNews").length!=0){ | |
GM_addStyle("#wrapper {margin-top:40px !important;} div.brNews{position:absolute;top:223px;}"); | |
} | |
} | |
//スタイル変更時に実行 | |
function cut_main2(){ | |
GM_addStyle( | |
"#ADDSPACE, .appliSidebox01 {display:none !important;}" + | |
"#container {width:auto !important;padding: 15px 0px 10px !important;}" + | |
"#container #header, #container #tabArea, #container #box {width:auto !important;}" + | |
"#header_bottom {background:none !important; height:5px !important;}" + | |
"#supportNavi {position:absolute; top:8px; left:680px;}" + | |
"#adsHeader {visibility: hidden;}" + | |
"#btn_area {position:absolute; top:170px; left:758px; width:auto !important; height: auto !important;}" + | |
"#btn_area_box {width:180px !important; height: auto !important; padding:0 !important;}" + | |
"#btn_area_box a {display:block !important; height:25px; margin-bottom:3px !important;}" + | |
"#worldtime {position:absolute; top:75px; left:775px; width:100px !important; height:auto !important; margin:auto !important;}" + | |
"#worldtime dl {width:140px !important; height:40px !important;}" + | |
"#worldtime * {float:none !important; height:auto !important; margin:auto !important; padding:3px !important; background-image:none !important; background-color:#000;}" + | |
"#worldtime dd {border:1px #fd0 solid;}" + | |
"#server_time_disp { padding:0 !important;}" + | |
"#bptpcp_area {position:absolute; top:137px; left:770px; background:none !important;}" + | |
"#statusIcon {top:22px !important; left:710px !important; white-space:nowrap !important;}" + | |
"#lodgment {top:183px !important; left:774px !important; background-image:none !important;}" + | |
"#lodgment * {background-image:none !important; background-color:#333 !important;}" + | |
"#lodgment ul li {padding:2px 0 !important;}" + | |
"#lodgment .on {background:#000 !important; padding-left:3px !important; width:120px !important;}" + | |
"#lodgment .on span {background:#000 !important;}" + | |
".footer_box {float:none !important;position:absolute; top:642px; left:764px; }" + //ac.42.a | |
"#whiteWrapper {min-height:550px;}" + | |
".message_textarea_width {min-height:320px;}" + | |
"#social {display:none !important;}" | |
); | |
//ブラ三ニュース位置変更(スタイル変更時) | |
if(OPT_B3NEWS && document.getElementsByClassName("brNews").length!=0){ | |
GM_addStyle("#wrapper {margin-top:40px !important;} div.brNews {position:absolute !important;top:160px !important;}"); | |
} | |
if (OPT_SMALLBTN == 1) { | |
//小さいボタンON時に拠点と簡易出兵先を移動 | |
GM_addStyle( | |
"#lodgment {top:40px !important; left:774px !important; background-image:none !important;}" + | |
".footer_box {float:none !important;position:absolute; top:522px; left:760px; }" | |
); | |
} | |
if(DISP_RANK == 1){ | |
GM_addStyle("#social {display:none !important;}"); | |
} | |
} | |
// common関数拡張 | |
function cinsertSideBox(insPos,insNode) { | |
var sideboxes = $a(".//div[@id=\"beyond_fixpanel\"]/div[@class=\"sideBox\"]"); | |
var srt = new Array(); | |
var pos = 0; | |
var insNodeId = insNode.sideBox.id; | |
for(var i=0 ; i<sideboxes.length ; i++) { | |
var conf = cloadData( sideboxes[i].id + "conf" , '{"float":false, "open":true, "x":"", "y":"", "pos":99 }', true, true ); | |
pos = conf.pos; | |
if (insPos <= conf.pos && insNodeId != sideboxes[i].id) { | |
pos++; | |
} | |
else if (insNodeId == sideboxes[i].id) { | |
pos = insPos; | |
} | |
srt.push({"node":sideboxes[i], "pos":pos}); | |
} | |
srt.sort( function(a,b) {return a.pos - b.pos;}); | |
for(var i=0 ; i<srt.length ; i++){ | |
srt[i].node.parentNode.removeChild(srt[i].node); | |
} | |
var fixpanel = $("beyond_fixpanel"); | |
for(var i=0 ; i<srt.length ; i++){ | |
fixpanel.appendChild(srt[i].node); | |
} | |
} | |
function cgetCurrentVillageId() { | |
var xy = cgetCurrentBaseXY(); | |
return VILLAGES_INFO[(xy.x+"_"+xy.y).replace(/-/g,"m")].vid; | |
} | |
function chasVillageId(vid) { | |
vid = parseInt(vid,10); | |
var vids = cgetVillageIds(); | |
return vids[vid] ? true : false; | |
} | |
function cgetVillageIds() { | |
var ret = new Object(); | |
for (var key in VILLAGES_INFO) { | |
if (isNaN(""+VILLAGES_INFO[key].vid)) { | |
continue; | |
} | |
ret[VILLAGES_INFO[key].vid] = VILLAGES_INFO[key].vid; | |
} | |
return ret; | |
} | |
function cgetElementSibling(element,direction,skipCount) { | |
var hasElementSibling = (typeof element.nextElementSibling == 'object' || typeof element.previousElementSibling == 'object') ? true : false; | |
if (!skipCount) skipCount = 1; | |
for (var i = 0;i < skipCount;) { | |
if (hasElementSibling) { | |
i++; | |
if (direction == 1) { | |
element = element.previousElementSibling; | |
} | |
else { | |
element = element.nextElementSibling; | |
} | |
} | |
else { | |
if (direction == 1) { | |
element = element.previousSibling; | |
} | |
else { | |
element = element.nextSibling; | |
} | |
if (element.nodeType == 1) { | |
i++; | |
} | |
} | |
if (element == null) { | |
break; | |
} | |
} | |
return element; | |
} | |
// areaから四方のareaを取得 | |
function cgetSquareElementFromArea(area) { | |
var coords = area.getAttribute('coords'); | |
var matches = null; | |
if (!coords || !(matches = coords.match(/^(\d+),(\d+)/))) return false; | |
var base = new Object(); | |
base.x = parseInt(matches[1],10); | |
base.y = parseInt(matches[2],10); | |
var $x = function(xp,dc) { return d.evaluate(xp, dc||d, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; }; | |
var add = new Object(); | |
add.x = 50; | |
add.y = 25; | |
var isMap = false; | |
if (0 <= location.pathname.indexOf("map.php")) { | |
isMap = true; | |
//地図51×51対応 | |
var size = parseInt($x('id("change-map-scale")//li[contains(concat(" ",normalize-space(@class)," ")," now ")]').className.match(/sort(\d+) /)[1],10); | |
switch (size) { | |
case 20: | |
add.x = 16; | |
add.y = 8; | |
break; | |
case 15: | |
add.x = 22; | |
add.y = 11; | |
break; | |
default: | |
add.x = 30; | |
add.y = 15; | |
break; | |
} | |
base.y += add.y * 2; | |
} | |
var xpaths = {ne:calc(base,add,0),nw:calc(base,add,1),se:calc(base,add,2),sw:calc(base,add,3)}; | |
var ret = new Object(); | |
for (var key in xpaths) { | |
ret[key] = $x('//area[@coords="' + xpaths[key] + '"]'); | |
} | |
return ret; | |
// direction ne:0 nw:1 se:2 sw:3 | |
function calc(base,add,direction) { | |
var addX = (direction % 2) == 0 ? add.x : - add.x; | |
var addY = direction < 2 ? - add.y : add.y; | |
var retBaseX = base.x + addX; | |
var retBaseY = base.y + addY; | |
var top = [retBaseX, retBaseY - (add.y * 2)]; | |
var left = [retBaseX - add.x, retBaseY - add.y]; | |
var bottom = [retBaseX, retBaseY]; | |
var right = [retBaseX + add.x, retBaseY - add.y]; | |
var ret = isMap ? top.concat(left,bottom,right) : bottom.concat(left,top,right); | |
return ret.join(","); | |
} | |
} | |
// areaからx,y,name,lvを返す | |
function cgetFacilityInfoFromArea(area) { | |
var retObj = {name:"",lv:0,x:-1,y:-1}; | |
var matches = null; | |
if (area.alt) { | |
if ((matches = area.alt.match(/^([^ ]+)[^\d]+(\d+)/))) { | |
retObj.name = matches[1]; | |
retObj.lv = parseInt(matches[2],10); | |
} | |
else { | |
retObj.name = area.alt; | |
} | |
} | |
if (area.href && (matches = area.href.match(/(?:x=(\d+)&y=(\d+))/))) { | |
retObj.x = parseInt(matches[1],10); | |
retObj.y = parseInt(matches[2],10); | |
} | |
return retObj; | |
} | |
function caddSessionId(url) { | |
if (0 < SID.length && url.search(/(\?|&)SSID=[^&]+&?/i) < 0) { | |
var anchor = ''; | |
var matches; | |
if ((matches = url.match(/#[^#]+$/))) { | |
url = url.substring(0,url.lastIndexOf('#')); | |
anchor = matches[0]; | |
} | |
url += 0 <= url.indexOf('?') ? '&' : '?'; | |
url += SID; | |
url += anchor; | |
} | |
return url; | |
} | |
}) (); | |
//faraway beyond本体終了 ======================================================================== | |
//-------------------------------------------------------- | |
// map_tool 2014/03/08 コメントが重いので削除 | |
// | |
// 公開ページ: http://blog.livedoor.jp/froo/archives/51365945.html | |
// 使い方: 全体地図ページ左下「地図ツール」の各リンクをクリック | |
// | |
// どらごらバージョン:http://doragora.blog86.fc2.com/blog-entry-3.html | |
//-------------------------------------------------------- | |
//main | |
function disp_maptool(){//faraway メイン関数の関数名を再設定 | |
map_hostname = "map_"+ location.hostname; ////location.hostnameが付いたデータを削除する為、地図ツールのものは、"map_"+location.hostnameにして他に影響が出ないようにした。faraway111013 | |
//mixi鯖障害回避用: 広告iframe内で呼び出されたら無視 | |
var container = document.evaluate('//*[@id="container"]', | |
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
if (container.snapshotLength == 0) return; | |
initGMWrapper_1(); | |
BASE_TIME = getBaseTime(); | |
ALLYS_INDEX = GM_getValue(map_hostname + "ALLYS_INDEX", "").split(DELIMIT_1); | |
USERS_INDEX = GM_getValue(map_hostname + "USERS_INDEX", "").split(DELIMIT_1); | |
// jQuery append by どらごら | |
jQueryAppend(); | |
// オプション読み出し by どらごら | |
ROUTE_ENABLE = GM_getValue(map_hostname + "route_enable", false); | |
CURSOR_ENABLE = GM_getValue(map_hostname + "cursor_flg", false); | |
// 競合回避 by どらごら | |
if( document.getElementById('route_output') != null) { | |
ROUTE_ENABLE = false; | |
} | |
//地図ページ | |
if (location.pathname == "/map.php") { | |
//地図サイズ | |
MAP_SCALE = getMapScale(); | |
//中心座標取得 | |
CENTER_X = parseInt(getParameter_1("x")); | |
if (isNaN(CENTER_X)) CENTER_X = 0; | |
CENTER_Y = parseInt(getParameter_1("y")); | |
if (isNaN(CENTER_Y)) CENTER_Y = 0; | |
//マップモード取得 | |
MAP_MODE = GM_getValue(map_hostname + "MAP_MODE", ""); | |
//GM_setValue(map_hostname + "MAP_MODE", ""); | |
if((ROUTE_ENABLE) && (GM_getValue(map_hostname + "default_mapM", "false") == true)) { | |
// 中域画面が標準 by どらごら | |
if(MAP_MODE == "") MAP_MODE = MAP_MODE_M; | |
} else { | |
GM_setValue(map_hostname + "MAP_MODE", ""); | |
} | |
//自拠点座標取得 | |
var xy = getMyXY_1(); | |
if (xy == "") { | |
MY_X = 0; | |
MY_Y = 0; | |
} else { | |
MY_X = parseInt(xy.split(",")[0]); | |
MY_Y = parseInt(xy.split(",")[1]); | |
} | |
//名称取得 | |
USERS = loadNames("USERS"); | |
ALLYS = loadNames("ALLYS"); | |
MAP_MATE_NAMES = MAP_MATE_NAMES_DEF; | |
//色取得 | |
USER_COLORS = loadColors("USER_COLORS", USER_COLORS_DEF); | |
ALLY_COLORS = loadColors("ALLY_COLORS", ALLY_COLORS_DEF); | |
MAP_MATE_COLORS = loadColors("MAP_MATE_COLORS", MAP_MATE_COLORS_DEF); | |
//NPC表示フラグ | |
DISP_NPC_YET = GM_getValue(map_hostname + "DISP_NPC_YET", true); | |
DISP_NPC_FALLEN = GM_getValue(map_hostname + "DISP_NPC_FALLEN", false); | |
//期数 | |
DISP_PERIOD1 = GM_getValue(map_hostname + "DISP_PERIOD1", true); | |
DISP_PERIOD2 = GM_getValue(map_hostname + "DISP_PERIOD2", false); | |
DISP_PERIOD3 = GM_getValue(map_hostname + "DISP_PERIOD3", false); | |
DISP_PERIOD4 = GM_getValue(map_hostname + "DISP_PERIOD4", false); | |
DISP_PERIOD5 = GM_getValue(map_hostname + "DISP_PERIOD5", false); | |
DISP_PERIOD6 = GM_getValue(map_hostname + "DISP_PERIOD6", false); | |
DISP_COMPROMISE = GM_getValue(map_hostname + "DISP_COMPROMISE", 70); | |
//期数(討伐・空き地 民兵出現 推定機ツールから読み出し) | |
if( GM_getValue("OPT_CALCN_1KI") ){ | |
var sv_season=""; | |
var svname = location.hostname.substr(0,location.hostname.indexOf(".")); | |
var gmarry = GM_listValues();gmarry_length=gmarry.length | |
for(i=0;i<gmarry_length;i++){ | |
if(gmarry[i].match(/^bro3_tobatsu_sv([0-9]+)$/)){ | |
var ii=RegExp.$1; | |
var sv_world =GM_getValue(gmarry[i]); | |
if(sv_world == svname){ | |
sv_season=GM_getValue('bro3_tobatsu_season'+ii); | |
if(!sv_season==""){ | |
DISP_PERIOD1 = false;DISP_PERIOD2 = false;DISP_PERIOD3 = false; | |
DISP_PERIOD4 = false;DISP_PERIOD5 = false;DISP_PERIOD6 = false; | |
if(sv_season==1) DISP_PERIOD1=true; | |
if(sv_season==2) DISP_PERIOD2=true; | |
if(sv_season==3 || sv_season==4) DISP_PERIOD3=true; | |
if(sv_season>=5 && sv_season<=9) DISP_PERIOD4=true; | |
if(sv_season==10) DISP_PERIOD5=true; | |
if(sv_season>=11) DISP_PERIOD6=true; | |
} | |
break; | |
} | |
} | |
} | |
} | |
//プチワイド | |
MAP_WIDE = GM_getValue(map_hostname + "MAP_WIDE", false); | |
if (MAP_WIDE){ | |
RADIUS = 38; //半径(中域) | |
CELL_SIZE_M = 9; //中域地図の1マスサイズ(px) | |
FONT_SIZE = "7px"; //中域地図のマス内文字サイズ | |
} else { | |
RADIUS = 25; //半径(中域) | |
CELL_SIZE_M = 14; //中域地図の1マスサイズ(px) | |
FONT_SIZE = "10px"; //中域地図のマス内文字サイズ | |
} | |
//資源表示 | |
DISP_MATERIAL = GM_getValue(map_hostname + "DISP_MATERIAL", false); | |
DISP_PICTURE = GM_getValue(map_hostname + "DISP_PICTURE", true); | |
//マップ色モード | |
MAP_COLOR_MODE = GM_getValue(location.hostname + "MAP_COLOR_MODE", false); | |
//完全一致フラグ | |
MATCH_FULL = GM_getValue(map_hostname + "MATCH_FULL", false); | |
window.setTimeout(ChangePicture, 0); | |
saveMapData(); | |
window.setTimeout(saveCapital, 0); | |
window.setTimeout(saveAllyForMap, 0); | |
window.setTimeout(markChangeArea, 0); | |
window.setTimeout(defaultTargets, 0); | |
window.setTimeout(addMapHtml, 0); | |
window.setTimeout(changeMap, 0); | |
//同盟トップページ | |
} else if (location.pathname == "/alliance/info.php") { | |
saveAllyForAllyInfo(); | |
allianceCSV_1(); | |
//君主プロフィールページ | |
} else if (location.pathname == "/user/" || location.pathname == "/user/index.php") { | |
saveUserForProf(); | |
// 出兵画面 by どらごら | |
} else if (location.pathname == "/facility/castle_send_troop.php") { | |
sendTroop(); | |
} | |
window.setTimeout(saveAllysIndex, 0); | |
window.setTimeout(saveUsersIndex, 0); | |
} | |
//地図データ保存 | |
function saveMapData() { | |
saveMapData2(document); | |
} | |
function saveMapData2(dom) { | |
var areas = dom.evaluate('//*[@id="mapOverlayMap"]//area/@onmouseover', | |
dom, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
for (var i = 0; i < areas.snapshotLength; i++) { | |
rowText = areas.snapshotItem(i).textContent; | |
rowText = rowText.replace(/^.*mapInfoView/, "mapInfoViewCustom"); | |
rowText = rowText.replace(/^.*rewrite/, "mapInfoViewCustom"); | |
rowText = rowText.replace(/\); .*$/, ");"); | |
eval(rowText); | |
} | |
} | |
function mapInfoViewCustom(h,k,g,l,e,c,b,f,j,d,i,a) { | |
window.setTimeout(function() { | |
var key = map_hostname + l; | |
var xy = l.replace(/^\((-?[0-9]+\,-?[0-9]+)\)$/, "$1"); | |
//前セルデータ取得 | |
var data = loadCellData(key); | |
//保存データ作成 | |
data = updateMapCellBefore(data); | |
data[IDX_VILLAGE_NAME] = h; //地名 | |
data[IDX_USER_NAME] = k; //君主名 | |
data[IDX_POPULATION] = (g=="-") ? "" : g; //人口 | |
data[IDX_ALLIANCER] = e; //同盟名 | |
data[IDX_POWER] = c; //戦力 | |
data[IDX_WOOD] = f; //森 | |
data[IDX_STONE] = j; //岩 | |
data[IDX_IRON] = d; //鉄 | |
data[IDX_RICE] = i; //穀 | |
data[IDX_NPC_FLG] = a; //NPC拠点 | |
if (data[IDX_CAPITAL_FLG] != "C" || data[IDX_POPULATION] == ""){ | |
data[IDX_CAPITAL_FLG] = ""; //人口なしまたは最新のフラグ以外はクリア | |
} | |
//Greasemonkey領域に永続保存 | |
saveCellData(key, data); | |
//同盟⇔君主→拠点関係性情報更新 | |
if (data[IDX_USER_NAME] != "") { | |
//君主所属同盟情報更新 | |
updateAllyMember(data[IDX_USER_NAME], data[IDX_ALLIANCER]); | |
//拠点情報更新 | |
if (data[IDX_POPULATION] != "" || data[IDX_NPC_FLG] == "1") { | |
var userData = getUserDataCache(data[IDX_USER_NAME]); | |
if (searchArrayItem(userData[IDX_USER_VILLAGES], xy) < 0) { | |
userData[IDX_USER_VILLAGES].push(xy); | |
saveUserData(data[IDX_USER_NAME], userData); | |
} | |
} | |
} | |
//NPC砦を登録 | |
if (data[IDX_NPC_FLG] == "1") { | |
saveNpcsIndex(xy); | |
} | |
}, 0); | |
} | |
//前所有者情報が基準時刻より古かったら更新 | |
function updateMapCellBefore(data) { | |
if (data[IDX_TIME_BEFORE] == undefined || | |
data[IDX_TIME_BEFORE] < BASE_TIME) { | |
data[IDX_TIME_BEFORE] = getCurrentTime2(); //前所有者更新時刻 | |
data[IDX_USER_BEFORE] = data[IDX_USER_NAME]; //前君主 | |
data[IDX_ALLY_BEFORE] = data[IDX_ALLIANCER]; //前同盟 | |
} | |
return data; | |
} | |
//地図のマスデータを保存 | |
function saveCellData(key, data) { | |
//初回表示時の変更チェックを回避 | |
if (data[IDX_USER_BEFORE] == undefined) { | |
data[IDX_USER_BEFORE] = data[IDX_USER_NAME]; | |
} | |
if (data[IDX_ALLY_BEFORE] == undefined) { | |
data[IDX_ALLY_BEFORE] = data[IDX_ALLIANCER]; | |
} | |
//最終更新日時 | |
data[IDX_LAST_UPDATE] = getCurrentTime(); | |
//Greasemonkey領域に永続保存 | |
GM_setValue(key, genDelimitString_1(data, DELIMIT_1)); | |
CELLS_CACHE[key] = data; | |
} | |
//地図のマスデータを読み込み | |
function loadCellData(key) { | |
var data = new Array(); | |
//Greasemonkey領域から取得 | |
var dataStr = GM_getValue(key); | |
if (dataStr != undefined) { | |
data = dataStr.split(DELIMIT_1); | |
} | |
return data; | |
} | |
//地図のマスデータのキャッシュを取得 | |
function getCellDataCache(key) { | |
if (CELLS_CACHE[key] == undefined) { | |
CELLS_CACHE[key] = loadCellData(key); | |
} | |
return CELLS_CACHE[key]; | |
} | |
//本拠地フラグ保存 | |
function saveCapital() { | |
// by どらごら | |
saveCapital2(document); | |
} | |
function saveCapital2(dom) { | |
var myAlly; | |
var imgs = dom.evaluate('//*[@id="mapsAll"]//img', | |
dom, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
for (var i = 0; i < imgs.snapshotLength; i++) { | |
var className = imgs.snapshotItem(i).className; | |
var src = imgs.snapshotItem(i).src; | |
if (!className.match(/mapAll[0-9]+/)) { | |
continue; | |
} | |
if (src.match(/capital_[a-z]+_[a-z]+\.png$/)) { | |
var xy = getXyFromMapClass(className); | |
var key = generateCellKey(xy[0], xy[1]); | |
var data = getCellDataCache(key); | |
data[IDX_CAPITAL_FLG] = "C"; | |
saveCellData(key, data); | |
} | |
} | |
} | |
//配下同盟データ保存(全体地図ページ) | |
function saveAllyForMap() { | |
// by どらごら | |
saveAllyForMap2(document); | |
} | |
function saveAllyForMap2(dom) { | |
var myAlly; | |
var depAllys = new Array(); //自同盟の配下である同盟 | |
var aloneAllys = new Array(); //自同盟の配下でない同盟 | |
var imgs = dom.evaluate('//*[@id="mapsAll"]//img', | |
dom, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
for (var i = 0; i < imgs.snapshotLength; i++) { | |
var className = imgs.snapshotItem(i).className; | |
var src = imgs.snapshotItem(i).src; | |
if (!className.match(/mapAll[0-9]+/)) { | |
continue; | |
} | |
if (src.match(/_b_.\.png$/) || src.match(/_g_.\.png$/)) { | |
if (myAlly == undefined) { | |
myAlly = getAllyFromMapClass(className); | |
} | |
} else if (src.match(/_bk_.\.png$/)) { | |
var allyName = getAllyFromMapClass(className); | |
depAllys[allyName] = allyName; | |
} else { | |
var allyName = getAllyFromMapClass(className); | |
aloneAllys[allyName] = allyName; | |
} | |
} | |
// 自同盟名を取得する事で、下記直後の条件文が真になるようにする by どらごら | |
myAlly = getAllyFromXy(MY_X, MY_Y); | |
//Greasemonkey領域に永続保存 | |
if (myAlly != undefined && myAlly != "") { | |
//自同盟の配下である同盟 | |
for (var i in depAllys) { | |
if(i=="each") break;//faraway110606 全範囲取得の0/9,1/9...9/9が表示されない現象に対応 | |
updateParentAlly(i, myAlly); | |
} | |
//自同盟の配下でない同盟 | |
for (var i in aloneAllys) { | |
var before = getParentAlly(i); | |
//かつては自同盟配下だった同盟 | |
if (before == myAlly) { | |
updateParentAlly(i, ""); | |
} | |
} | |
} | |
} | |
//配下同盟データ保存(同盟情報ページ) | |
function saveAllyForAllyInfo() { | |
//「略称」欄取得 | |
var myAlly = ""; | |
var myAllyElem = document.evaluate( | |
'//*[@id="gray02Wrapper"]//table/tbody/tr[3]/td', | |
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
if (myAllyElem.snapshotLength == 0) return; | |
myAlly = myAllyElem.snapshotItem(0).innerHTML; | |
//「状態」欄取得 | |
var parentAlly = ""; | |
var statElem = document.evaluate( | |
'//*[@id="gray02Wrapper"]//table/tbody/tr[5]/td[2]', | |
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
if (statElem.snapshotItem(0).innerHTML.match(/親同盟/)) { | |
var parentAllyElem = document.evaluate( | |
'//*[@id="gray02Wrapper"]//table/tbody/tr[5]/td[2]/a', | |
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
if (parentAllyElem.snapshotLength >= 1) { | |
parentAlly = parentAllyElem.snapshotItem(0).innerHTML; | |
} | |
} | |
//Greasemonkey領域に永続保存 | |
updateParentAlly(myAlly, parentAlly); | |
} | |
//君主領地データ保存(プロフィールページ) | |
function saveUserForProf() { | |
//「君主」欄取得 | |
var user = ""; | |
var userElem = document.evaluate( | |
'//*[@id="gray02Wrapper"]//table/tbody/tr[2]/td[2]', | |
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
user = userElem.snapshotItem(0).innerHTML; | |
//「同盟」欄取得 | |
var ally = ""; | |
var allyElem = document.evaluate( | |
'//*[@id="gray02Wrapper"]//table/tbody/tr[4]/td[5]/a', | |
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
ally = allyElem.snapshotItem(0).innerHTML; | |
//「国情報」欄取得 | |
var landElems = document.evaluate( | |
'//*[@id="gray02Wrapper"]//table/tbody/tr', | |
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
var isLandList =false; | |
var villages = new Array(); | |
for (var i=0; i<landElems.snapshotLength; i++) { | |
var item = landElems.snapshotItem(i); | |
if(getChildElement_1(item, 0)==undefined) continue; | |
if (!isLandList) { | |
if (trim_1(getChildElement_1(item, 0).innerHTML) == "名前") { | |
isLandList = true; | |
} | |
continue; | |
} | |
//地名を取得 | |
var landall = getChildElement_1(item, 0).innerHTML; | |
var land = trim_1(getChildElement_1(getChildElement_1(item, 0), 0).innerHTML); | |
//座標を取得 | |
var xySrc = getChildElement_1(item, 1).innerHTML; | |
xySrc = "" + xySrc.match(/-?[0-9]+\,-?[0-9]+/i); | |
var xy = xySrc.split(","); | |
var x = xy[0]; | |
var y = xy[1]; | |
if (!isNumeric_1(x) || !isNumeric_1(y)) continue; | |
//人口を取得 | |
var popul = getChildElement_1(item, 2).innerHTML; | |
if (!isNumeric_1(popul)) popul = ""; | |
//マスデータを更新 | |
var key = generateCellKey(x, y); | |
var data = loadCellData(key); | |
data = updateMapCellBefore(data); | |
data[IDX_VILLAGE_NAME] = land; | |
data[IDX_USER_NAME] = user; | |
data[IDX_POPULATION] = popul; | |
data[IDX_ALLIANCER] = ally; | |
data[IDX_CAPITAL_FLG] = (landall.match(/本拠地/) ? "C" : ""); | |
saveCellData(key, data); | |
//拠点の場合、座標を別領域に保存 | |
if (popul != "") { | |
villages.push(xy); | |
} | |
} | |
//同盟所属情報を更新 | |
updateAllyMember(user, ally); | |
//君主の拠点データを更新 | |
var userData = getUserDataCache(user); | |
userData[IDX_USER_VILLAGES] = villages; | |
saveUserData(user, userData); | |
} | |
//MapタグのClass属性から同盟名を取得 | |
function getAllyFromMapClass(className) { | |
var xy = getXyFromMapClass(className); | |
var data = getCellDataCache(generateCellKey(xy[0], xy[1])); | |
var ally = data[IDX_ALLIANCER]; | |
if (ally == undefined) ally = ""; | |
return ally; | |
} | |
//MapタグのClass属性から座標を取得 | |
function getXyFromMapClass(className) { | |
var mapNo = parseInt(trimZero_1(className.replace(/mapAll/, ""))); | |
var x = CENTER_X - Math.floor((MAP_SCALE-1)/2) + Math.floor((mapNo-1) / MAP_SCALE); | |
var y = CENTER_Y + Math.floor((MAP_SCALE-1)/2) - ((mapNo-1) % MAP_SCALE); | |
return new Array(x, y); | |
} | |
//HTML要素追加 | |
function addMapHtml() { | |
var rootElem = document.createElement("div"); | |
rootElem.id = "maptool"; | |
var mapElem = document.evaluate('//*[@id="mapboxInner"]', | |
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
mapElem.snapshotItem(0).insertBefore( | |
rootElem, document.getElementById(mapAllId).nextSibling); | |
addLinkHtml(rootElem); | |
addBodyHtml(rootElem); | |
addHeadHtml(rootElem); | |
if (navigator.userAgent.toLowerCase().indexOf('chrome') < 0) { | |
initPopup(); | |
} | |
} | |
//地図ツールOpenリンク追加 | |
function addLinkHtml(parentElem) { | |
var addElem = document.createElement("div"); | |
parentElem.appendChild(addElem); | |
addElem.id = "maptoolLink"; | |
addElem.style.margin = "4px 2px"; | |
//タイトル | |
var titleElem = document.createElement("span"); | |
titleElem.innerHTML = "地図ツール"; | |
titleElem.style.margin = "2px 2px"; | |
addElem.appendChild(titleElem); | |
//aタグ(中域地図) | |
var linkElem = document.createElement("a"); | |
linkElem.id = "maptoolOpen"; | |
linkElem.href = "javascript:void(0);"; | |
linkElem.innerHTML = "中域"; | |
linkElem.style.backgroundColor = "black"; | |
linkElem.style.padding = "2px 4px"; | |
linkElem.style.margin = "2px 2px"; | |
addElem.appendChild(linkElem); | |
//aタグ(広域地図) | |
var linkElem2 = document.createElement("a"); | |
linkElem2.id = "maptoolOpenL"; | |
linkElem2.href = "javascript:void(0);"; | |
linkElem2.innerHTML = "広域"; | |
linkElem2.style.backgroundColor = "black"; | |
linkElem2.style.padding = "2px 4px"; | |
linkElem2.style.margin = "2px 2px"; | |
addElem.appendChild(linkElem2); | |
//aタグ(CSV出力S) | |
var csvSizeS = CSV_RADIUS_S * 2 + 1; | |
var linkElemCsvS = document.createElement("a"); | |
linkElemCsvS.id = "maptoolCsvS"; | |
linkElemCsvS.href = "javascript:void(0);"; | |
linkElemCsvS.innerHTML = "CSV" + | |
"<span style='font-size:9px'>" + csvSizeS + "x" + csvSizeS + "</span>"; | |
linkElemCsvS.style.backgroundColor = "black"; | |
linkElemCsvS.style.padding = "2px 4px"; | |
linkElemCsvS.style.margin = "2px 2px"; | |
addElem.appendChild(linkElemCsvS); | |
//aタグ(CSV出力L) | |
var csvSizeL = CSV_RADIUS_L * 2 + 1; | |
var linkElemCsvL = document.createElement("a"); | |
linkElemCsvL.id = "maptoolCsvL"; | |
linkElemCsvL.href = "javascript:void(0);"; | |
linkElemCsvL.innerHTML = "CSV" + | |
"<span style='font-size:9px'>" + csvSizeL + "x" + csvSizeL + "</span>"; | |
linkElemCsvL.style.backgroundColor = "black"; | |
linkElemCsvL.style.padding = "2px 4px"; | |
linkElemCsvL.style.margin = "2px 2px"; | |
addElem.appendChild(linkElemCsvL); | |
//aタグ(CSV出力LL) | |
var csvSizeLL = CSV_RADIUS_LL * 2 + 1; | |
var linkElemCsvLL = document.createElement("a"); | |
linkElemCsvLL.id = "maptoolCsvLL"; | |
linkElemCsvLL.href = "javascript:void(0);"; | |
linkElemCsvLL.innerHTML = "CSV" + | |
"<span style='font-size:9px'>" + csvSizeLL + "x" + csvSizeLL + "</span>"; | |
linkElemCsvLL.style.backgroundColor = "black"; | |
linkElemCsvLL.style.padding = "2px 4px"; | |
linkElemCsvLL.style.margin = "2px 2px"; | |
addElem.appendChild(linkElemCsvLL); | |
//イベントリスナー(中域地図) | |
linkElem.addEventListener("click", | |
function() { | |
MAP_MODE = MAP_MODE_M; | |
changeMap(); | |
}, | |
true); | |
//イベントリスナー(広域地図) | |
linkElem2.addEventListener("click", | |
function() { | |
MAP_MODE = MAP_MODE_L; | |
changeMap(); | |
}, | |
true); | |
//イベントリスナー(CSV出力S) | |
linkElemCsvS.addEventListener("click", | |
function() { | |
outputMapCsvS(); | |
}, | |
true); | |
//イベントリスナー(CSV出力L) | |
linkElemCsvL.addEventListener("click", | |
function() { | |
outputMapCsvL(); | |
}, | |
true); | |
//イベントリスナー(CSV出力LL) | |
linkElemCsvLL.addEventListener("click", | |
function() { | |
outputMapCsvLL(); | |
}, | |
true); | |
//初期化機能 | |
//aタグ | |
var linkElemClr = document.createElement("a"); | |
linkElemClr.id = "maptoolClr"; | |
linkElemClr.href = "javascript:void(0);"; | |
linkElemClr.innerHTML = "初期化"; | |
linkElemClr.style.backgroundColor = "black"; | |
linkElemClr.style.padding = "2px 4px"; | |
linkElemClr.style.margin = "2px 2px"; | |
addElem.appendChild(linkElemClr); | |
//イベントリスナー | |
linkElemClr.addEventListener("click", | |
function() { | |
if (confirm("地図ツールデータを初期化します: " + map_hostname)) { | |
clearAllData(); | |
location.reload(); | |
} | |
}, | |
true); | |
} | |
//ヘッダ部HTML追加 | |
function addHeadHtml(parentElem) { | |
var addElem = document.createElement("div"); | |
parentElem.appendChild(addElem); | |
// 遠征支援機能 by どらごら | |
var routeHTML = ""; | |
if(ROUTE_ENABLE) { | |
routeHTML = | |
"<table style='font-size:11px; margin:1px;'>"+ | |
"<tr>"+ | |
"<td id='fld_route_output' style='background-color:black; padding:3px 4px;'>"+ | |
"<textarea cols='100' rows='10' id='route_output'></textarea>"+ | |
"</td>"+ | |
"<td id='fld_route_botton' style='background-color:black; padding:3px 4px; color:white; '>"+ | |
"<input id='route_cursor_enable' type='checkbox' style='vertical-align:bottom' " + | |
(CURSOR_ENABLE ? "checked" : "") + "/>カーソル位置<br />"+ | |
"<input id='route_default_mapM' type='checkbox' style='vertical-align:bottom' " + | |
(GM_getValue(map_hostname + "default_mapM", "true") == true ? "checked" : "") + "/>中域画面が標準<br />"+ | |
"<input id='route_chk_enable' type='checkbox' style='vertical-align:bottom' " + | |
(GM_getValue(map_hostname + "chk_flg", "false") == true ? "checked" : "") + " />直接クリック<br />"+ | |
"<input id='route_rewrite' type='button' value='マップに反映'></input><br />"+ | |
"<input id='route_validate' type='button' value='ルート検証'></input><br />"+ | |
"</td>"+ | |
"</tr>"+ | |
"</table>"; | |
} | |
addElem.id = "maptoolHead"; | |
addElem.style.margin = "2px 2px"; | |
addElem.innerHTML = | |
"<table style='font-size:11px; margin:1px;'>"+ | |
"<tr>"+ | |
"<td style='background-color:black; padding:3px 4px; text-align:center;'>"+ | |
"<a id='maptoolClose' href='javascript:void(0);'>狭域</a> "+ | |
"<a id='maptoolSwitch' href='javascript:void(0);'></a>"+ | |
"</td>"+ | |
"<td style='background-color:black; padding:3px 4px; "+ | |
"font-size:10px; font-family:monospace;'>"+ | |
"<a id='maptoolMoveLeft' href='javascript:void(0);'>←</a> "+ | |
"<a id='maptoolMoveUp' href='javascript:void(0);'>↑</a> "+ | |
"<a id='maptoolMoveDown' href='javascript:void(0);'>↓</a> "+ | |
"<a id='maptoolMoveRight' href='javascript:void(0);'>→</a>"+ | |
"</td>"+ | |
"<td style='width:4px'></td>"+ | |
"<td style='color:white; background-color:black; padding:0px 4px; "+ | |
"text-align:center;'>"+ | |
"<input id='maptoolTime' type='button' value='基準時更新' /> "+ | |
"<span id='base_time'></span>"+ | |
"</td>"+ | |
"<td style='width:4px'></td>"+ | |
"<td style='color:white; background-color:black; padding:3px 4px; "+ | |
"text-align:center;'>"+ | |
"入力モード "+ | |
"<a id='maptoolModeName' href='javascript:void(0);'>名称</a> "+ | |
"<a id='maptoolModeColor' href='javascript:void(0);'>色</a>"+ | |
"</td>"+ | |
"<td style='width:4px'></td>"+ | |
"<td style='color:white; background-color:black; padding:3px 4px; "+ | |
"text-align:center;'>"+ | |
"<a id='maptoolExGetMap5959' href='javascript:void(0);'>全範囲取得</a>"+ | |
"</td>"+ | |
"<td style='width:4px'></td>"+ | |
"<td style='color:white; background-color:black; padding:3px 4px; "+ | |
"text-align:center;'>"+ | |
"<input id='maptoolExRouteEnable' type='checkbox' style='vertical-align:bottom' " + | |
(ROUTE_ENABLE ? "checked" : "") + " />遠征支援"+ | |
"</td>"+ | |
"<td>" + | |
"<input id='configopen' type='button' value='設定' />"+ | |
"</td>"+ | |
"</tr>"+ | |
"</table>" + | |
"<div id='CONFIG_AREA' style='display:none;'>" + | |
"<table style='boder:1px; margin:1px;'>" + | |
"<tr><td>" + | |
"<table style='font-size:11px; margin:1px;'><tr>" + | |
"<td style='color:white; background-color:black; padding:3px 4px; text-align:center;'>戦力 "+ | |
"<input id='fld_compromise' type='text' style='width:30px' />% "+ | |
"</td>"+ | |
"<td style='width:4px'></td>"+ | |
"<td style='color:white; background-color:black; padding:3px 4px; text-align:center;'>資源 "+ | |
"<input id='fld_material1' type='radio' name='material' value ='1' style='vertical-align:bottom' />期待値 "+ | |
"<input id='fld_material2' type='radio' name='material' value ='2' style='vertical-align:bottom' />範囲 "+ | |
"<input id='material_picture' type='checkbox' style='vertical-align:bottom' />アイコン表示"+ | |
"</td>"+ | |
"<td style='width:4px'></td>"+ | |
"<td style='color:white; background-color:black; padding:3px 4px; text-align:center;'>サイズ "+ | |
"<input id='fld_mapwide1' type='radio' name='mapwide' value ='1' style='vertical-align:bottom' />51x51 "+ | |
"<input id='fld_mapwide2' type='radio' name='mapwide' value ='2' style='vertical-align:bottom' />77x77"+ | |
"</td>"+ | |
"<td style='width:4px'></td>"+ | |
"<td style='color:white; background-color:black; padding:3px 4px; text-align:center;'>mapタイプ "+ | |
"<input id='fld_period1' type='radio' name='fld_period' value ='1' style='vertical-align:bottom' />a "+ | |
"<input id='fld_period2' type='radio' name='fld_period' value ='2' style='vertical-align:bottom' />b "+ | |
"<input id='fld_period3' type='radio' name='fld_period' value ='3' style='vertical-align:bottom' />c "+ | |
"<input id='fld_period4' type='radio' name='fld_period' value ='4' style='vertical-align:bottom' />d "+ | |
"<input id='fld_period5' type='radio' name='fld_period' value ='5' style='vertical-align:bottom' />e "+ | |
"<input id='fld_period6' type='radio' name='fld_period' value ='6' style='vertical-align:bottom' />f "+ | |
"</td>"+ | |
"<td style='width:4px'></td>"+ | |
"<td style='color:white; background-color:black; padding:3px 4px; text-align:center;'>"+ | |
"<input id='maptoolMatchFull' type='checkbox' style='vertical-align:bottom' />完全一致"+ | |
"</td>"+ | |
"</tr></table>" + | |
"<table style='font-size:11px; margin:1px;'><tr>" + | |
"<td style='color:white; background-color:black; padding:3px 4px; text-align:center;'>NPC"+ | |
"<input id='fld_npc_yet' type='checkbox' style='vertical-align:bottom' />未 "+ | |
"<input id='fld_npc_fallen' type='checkbox' style='vertical-align:bottom' />済"+ | |
"</td>"+ | |
"<td style='width:4px'></td>"+ | |
"</tr></table>" + | |
"</td><td>"+ | |
"<input id='configclose' type='button' value='閉じる' style='margin:0px 4px 4px 4px' />"+ | |
"</td></tr>" + | |
"</tr></table>" + | |
"</div>"+ | |
"<table style='font-size:11px; margin:1px;'>"+ | |
"<tr>"+ | |
"<td style='color:white; background-color:black; padding:3px 4px' rowspan='3'>君主</td>"+ | |
"<td id='fld_user1' style='padding:3px 4px;'>"+ | |
"<input id='user1' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user2' style='padding:3px 4px;'>"+ | |
"<input id='user2' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user3' style='padding:3px 4px;'>"+ | |
"<input id='user3' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user4' style='padding:3px 4px;'>"+ | |
"<input id='user4' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user5' style='padding:3px 4px;'>"+ | |
"<input id='user5' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user6' style='padding:3px 4px;'>"+ | |
"<input id='user6' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user7' style='padding:3px 4px;'>"+ | |
"<input id='user7' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user8' style='padding:3px 4px;'>"+ | |
"<input id='user8' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user9' style='padding:3px 4px;'>"+ | |
"<input id='user9' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user10' style='padding:3px 4px;'>"+ | |
"<input id='user10' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td style='background-color:black; padding:0px 2px; text-align:center;width:50px' rowspan='6'>"+ | |
"<input id='maptoolSave' type='button' value='保存' />"+ | |
"</td>"+ | |
"</tr>"+ | |
"<tr>"+ | |
"<td id='fld_user11' style='padding:3px 4px;'>"+ | |
"<input id='user11' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user12' style='padding:3px 4px;'>"+ | |
"<input id='user12' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user13' style='padding:3px 4px;'>"+ | |
"<input id='user13' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user14' style='padding:3px 4px;'>"+ | |
"<input id='user14' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user15' style='padding:3px 4px;'>"+ | |
"<input id='user15' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user16' style='padding:3px 4px;'>"+ | |
"<input id='user16' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user17' style='padding:3px 4px;'>"+ | |
"<input id='user17' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user18' style='padding:3px 4px;'>"+ | |
"<input id='user18' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user19' style='padding:3px 4px;'>"+ | |
"<input id='user19' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user20' style='padding:3px 4px;'>"+ | |
"<input id='user20' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"</tr>"+ | |
"<tr>"+ | |
"<td id='fld_user21' style='padding:3px 4px;'>"+ | |
"<input id='user21' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user22' style='padding:3px 4px;'>"+ | |
"<input id='user22' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user23' style='padding:3px 4px;'>"+ | |
"<input id='user23' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user24' style='padding:3px 4px;'>"+ | |
"<input id='user24' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user25' style='padding:3px 4px;'>"+ | |
"<input id='user25' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user26' style='padding:3px 4px;'>"+ | |
"<input id='user26' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user27' style='padding:3px 4px;'>"+ | |
"<input id='user27' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user28' style='padding:3px 4px;'>"+ | |
"<input id='user28' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user29' style='padding:3px 4px;'>"+ | |
"<input id='user29' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_user30' style='padding:3px 4px;'>"+ | |
"<input id='user30' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"</tr>"+ | |
"<tr>"+ | |
"<td style='color:white; background-color:black; padding:3px 4px' rowspan='3'>同盟</td>"+ | |
"<td id='fld_ally1' style='padding:3px 4px;'>"+ | |
"<input id='ally1' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally2' style='padding:3px 4px;'>"+ | |
"<input id='ally2' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally3' style='padding:3px 4px;'>"+ | |
"<input id='ally3' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally4' style='padding:3px 4px;'>"+ | |
"<input id='ally4' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally5' style='padding:3px 4px;'>"+ | |
"<input id='ally5' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally6' style='padding:3px 4px;'>"+ | |
"<input id='ally6' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally7' style='padding:3px 4px;'>"+ | |
"<input id='ally7' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally8' style='padding:3px 4px;'>"+ | |
"<input id='ally8' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally9' style='padding:3px 4px;'>"+ | |
"<input id='ally9' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally10' style='padding:3px 4px;'>"+ | |
"<input id='ally10' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"</tr>"+ | |
"<tr>"+ | |
"<td id='fld_ally11' style='padding:3px 4px;'>"+ | |
"<input id='ally11' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally12' style='padding:3px 4px;'>"+ | |
"<input id='ally12' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally13' style='padding:3px 4px;'>"+ | |
"<input id='ally13' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally14' style='padding:3px 4px;'>"+ | |
"<input id='ally14' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally15' style='padding:3px 4px;'>"+ | |
"<input id='ally15' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally16' style='padding:3px 4px;'>"+ | |
"<input id='ally16' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally17' style='padding:3px 4px;'>"+ | |
"<input id='ally17' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally18' style='padding:3px 4px;'>"+ | |
"<input id='ally18' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally19' style='padding:3px 4px;'>"+ | |
"<input id='ally19' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally20' style='padding:3px 4px;'>"+ | |
"<input id='ally20' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"</tr>"+ | |
"<tr>"+ | |
"<td id='fld_ally21' style='padding:3px 4px;'>"+ | |
"<input id='ally21' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally22' style='padding:3px 4px;'>"+ | |
"<input id='ally22' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally23' style='padding:3px 4px;'>"+ | |
"<input id='ally23' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally24' style='padding:3px 4px;'>"+ | |
"<input id='ally24' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally25' style='padding:3px 4px;'>"+ | |
"<input id='ally25' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally26' style='padding:3px 4px;'>"+ | |
"<input id='ally26' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally27' style='padding:3px 4px;'>"+ | |
"<input id='ally27' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally28' style='padding:3px 4px;'>"+ | |
"<input id='ally28' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally29' style='padding:3px 4px;'>"+ | |
"<input id='ally29' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_ally30' style='padding:3px 4px;'>"+ | |
"<input id='ally30' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"</tr>"+ | |
"<tr>"+ | |
"<td style='color:white; background-color:black; padding:3px 4px' colspan='2'>資源 " + | |
"<input id='fld_map_color' type='checkbox' style='vertical-align:bottom' />色表示する"+ | |
"</td>"+ | |
"<td id='fld_col1' style='padding:3px 4px;'>"+ | |
"<input id='col1' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_col2' style='padding:3px 4px;'>"+ | |
"<input id='col2' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_col3' style='padding:3px 4px;'>"+ | |
"<input id='col3' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_col4' style='padding:3px 4px;'>"+ | |
"<input id='col4' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_col5' style='padding:3px 4px;'>"+ | |
"<input id='col5' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"<td id='fld_col6' style='padding:3px 4px;'>"+ | |
"<input id='col6' type='text' style='width:50px' />"+ | |
"</td>"+ | |
"</tr>"+ | |
"</table>" + routeHTML; | |
//----- | |
//バージョン | |
document.getElementById("configopen").value = "Ver." + VERSION_1; | |
//基準時刻 | |
var baseTime = BASE_TIME; | |
if (baseTime.length == 8) baseTime += "000000"; | |
document.getElementById("base_time").innerHTML = | |
baseTime.substr(4, 2) + "/" + baseTime.substr(6, 2) + | |
" " + baseTime.substr(8, 2) + ":" + baseTime.substr(10, 2); | |
//完全一致 | |
document.getElementById("maptoolMatchFull").checked = MATCH_FULL; | |
//項目背景着色 | |
setFieldColors(); | |
//君主、同盟を表示 | |
setInputNames(); | |
//NPCを表示 | |
document.getElementById("fld_npc_yet").checked = DISP_NPC_YET; | |
document.getElementById("fld_npc_fallen").checked = DISP_NPC_FALLEN; | |
//期数 | |
document.getElementById("fld_period1").checked = DISP_PERIOD1; | |
document.getElementById("fld_period2").checked = DISP_PERIOD2; | |
document.getElementById("fld_period3").checked = DISP_PERIOD3; | |
document.getElementById("fld_period4").checked = DISP_PERIOD4; | |
document.getElementById("fld_period5").checked = DISP_PERIOD5; | |
document.getElementById("fld_period6").checked = DISP_PERIOD6; | |
document.getElementById("fld_compromise").value= DISP_COMPROMISE; | |
//プチワイド | |
document.getElementById("fld_mapwide1").checked = MAP_WIDE == false; | |
document.getElementById("fld_mapwide2").checked = MAP_WIDE; | |
//資源表示 | |
document.getElementById("fld_material1").checked = DISP_MATERIAL == false; | |
document.getElementById("fld_material2").checked = DISP_MATERIAL; | |
document.getElementById("material_picture").checked = DISP_PICTURE; | |
document.getElementById("fld_map_color").checked = MAP_COLOR_MODE; | |
// ルート用スクリプトを追加 by どらごら | |
addRouteScriptHtml(); | |
//イベントリスナー登録(保存ボタン) | |
document.getElementById('maptoolSave').addEventListener("click", | |
function() { | |
//入力値をGreasemonkey領域に保存 | |
if (INPUT_MODE == INPUT_MODE_NAME) { | |
saveInputUsers("USERS"); | |
saveInputAllys("ALLYS"); | |
USERS = loadNames("USERS"); | |
ALLYS = loadNames("ALLYS"); | |
MAP_MATE_NAMES = MAP_MATE_NAMES_DEF; | |
defaultTargets(); | |
setInputNames(); | |
} else if (INPUT_MODE == INPUT_MODE_COLOR) { | |
saveInputUsers("USER_COLORS"); | |
saveInputAllys("ALLY_COLORS"); | |
saveInputColors("MAP_MATE_COLORS"); | |
USER_COLORS = loadColors("USER_COLORS", USER_COLORS_DEF); | |
ALLY_COLORS = loadColors("ALLY_COLORS", ALLY_COLORS_DEF); | |
MAP_MATE_COLORS = loadColors("MAP_MATE_COLORS", MAP_MATE_COLORS_DEF); | |
setInputColors(); | |
setFieldColors(); | |
} | |
//NPC表示フラグ | |
DISP_NPC_YET = document.getElementById("fld_npc_yet").checked; | |
DISP_NPC_FALLEN = document.getElementById("fld_npc_fallen").checked; | |
GM_setValue(map_hostname + "DISP_NPC_YET", DISP_NPC_YET); | |
GM_setValue(map_hostname + "DISP_NPC_FALLEN", DISP_NPC_FALLEN); | |
//期数 | |
DISP_PERIOD1 = document.getElementById("fld_period1").checked; | |
DISP_PERIOD2 = document.getElementById("fld_period2").checked; | |
DISP_PERIOD3 = document.getElementById("fld_period3").checked; | |
DISP_PERIOD4 = document.getElementById("fld_period4").checked; | |
DISP_PERIOD5 = document.getElementById("fld_period5").checked; | |
DISP_PERIOD6 = document.getElementById("fld_period6").checked; | |
DISP_COMPROMISE = document.getElementById("fld_compromise").value; | |
GM_setValue(map_hostname + "DISP_PERIOD1", DISP_PERIOD1); | |
GM_setValue(map_hostname + "DISP_PERIOD2", DISP_PERIOD2); | |
GM_setValue(map_hostname + "DISP_PERIOD3", DISP_PERIOD3); | |
GM_setValue(map_hostname + "DISP_PERIOD4", DISP_PERIOD4); | |
GM_setValue(map_hostname + "DISP_PERIOD5", DISP_PERIOD5); | |
GM_setValue(map_hostname + "DISP_PERIOD6", DISP_PERIOD6); | |
GM_setValue(map_hostname + "DISP_COMPROMISE", DISP_COMPROMISE); | |
//プチワイド | |
MAP_WIDE = document.getElementById("fld_mapwide2").checked; | |
GM_setValue(map_hostname + "MAP_WIDE", MAP_WIDE); | |
if (MAP_WIDE){ | |
RADIUS = 38; //半径(中域) | |
CELL_SIZE_M = 9; //中域地図の1マスサイズ(px) | |
FONT_SIZE = "7px"; //中域地図のマス内文字サイズ | |
} else { | |
RADIUS = 25; //半径(中域) | |
CELL_SIZE_M = 14; //中域地図の1マスサイズ(px) | |
FONT_SIZE = "10px"; //中域地図のマス内文字サイズ | |
} | |
DISP_MATERIAL = document.getElementById("fld_material2").checked; | |
GM_setValue(map_hostname + "DISP_MATERIAL", DISP_MATERIAL); | |
DISP_PICTURE = document.getElementById("material_picture").checked; | |
GM_setValue(map_hostname + "DISP_PICTURE", DISP_PICTURE); | |
//資源色表示 | |
MAP_COLOR_MODE = document.getElementById("fld_map_color").checked; | |
GM_setValue(location.hostname + "MAP_COLOR_MODE", MAP_COLOR_MODE); | |
//地図変更 | |
LOADED_MAPS = new Array(); | |
changeMap(); | |
}, | |
true); | |
//イベントリスナー登録(基準時更新ボタン) | |
document.getElementById('maptoolTime').addEventListener("click", | |
function() { | |
//基準時間として現在時刻をGreasemonkey領域に保存 | |
GM_setValue(map_hostname + "BASE_TIME", getCurrentTime2()); | |
//ページリロード | |
GM_setValue(map_hostname + "MAP_MODE", MAP_MODE); | |
location.reload(); | |
}, | |
true); | |
//イベントリスナー登録(狭域地図リンク) | |
document.getElementById('maptoolClose').addEventListener("click", | |
function() { | |
MAP_MODE = MAP_MODE_S; | |
changeMap(); | |
}, | |
true); | |
//イベントリスナー登録(中域/広域地図リンク) | |
document.getElementById('maptoolSwitch').addEventListener("click", | |
function() { | |
MAP_MODE = (MAP_MODE == MAP_MODE_L ? MAP_MODE_M : MAP_MODE_L); | |
changeMap(); | |
}, true); | |
//イベントリスナー登録(←↑↓→リンク) | |
document.getElementById('maptoolMoveLeft').addEventListener("click", | |
function() { shiftMap(-1, 0); }, true); | |
document.getElementById('maptoolMoveUp').addEventListener("click", | |
function() { shiftMap(0, 1); }, true); | |
document.getElementById('maptoolMoveDown').addEventListener("click", | |
function() { shiftMap(0, -1); }, true); | |
document.getElementById('maptoolMoveRight').addEventListener("click", | |
function() { shiftMap(1, 0); }, true); | |
//イベントリスナー登録(名称設定・色設定) | |
document.getElementById('maptoolModeName').addEventListener("click", | |
function() { setInputNames(); }, true); | |
document.getElementById('maptoolModeColor').addEventListener("click", | |
function() { setInputColors(); }, true); | |
//イベントリスナー登録(完全一致チェックボックス) | |
document.getElementById('maptoolMatchFull').addEventListener("click", | |
function() { changeMatchMode(this.checked); }, true); | |
//イベントリスナー登録(59x59範囲取得 by どらごら) | |
document.getElementById('maptoolExGetMap5959').addEventListener("click", | |
function() { getMap5959(); }, true); | |
//イベントリスナー登録(遠征支援 by どらごら) | |
document.getElementById('maptoolExRouteEnable').addEventListener("click", | |
function() { | |
GM_setValue(map_hostname + "route_enable", j$("#maptoolExRouteEnable").attr('checked')); | |
//ページリロード | |
location.reload(); | |
}, true); | |
//イベントリスナー登録(閉じる) | |
document.getElementById('configclose').addEventListener("click", | |
function(){ConfigClose();}, true); | |
//イベントリスナー登録(開く≒バージョンボタン) | |
document.getElementById('configopen').addEventListener("click", | |
function(){ConfigOpen();}, true); | |
if(ROUTE_ENABLE) { | |
//イベントリスナー登録(カーソル位置 by どらごら) | |
document.getElementById('route_cursor_enable').addEventListener("click", | |
function() { | |
CURSOR_ENABLE = j$("#route_cursor_enable").attr('checked'); | |
GM_setValue(map_hostname + "cursor_flg", CURSOR_ENABLE); | |
//ページリロード | |
location.reload(); | |
}, true); | |
//イベントリスナー登録(中域画面が標準 by どらごら) | |
document.getElementById('route_default_mapM').addEventListener("click", | |
function() { | |
GM_setValue(map_hostname + "default_mapM", j$("#route_default_mapM").attr('checked')); | |
}, true); | |
//イベントリスナー登録(直接クリック有効 by どらごら) | |
document.getElementById('route_chk_enable').addEventListener("click", | |
function() { | |
GM_setValue(map_hostname + "chk_flg", j$("#route_chk_enable").attr('checked')); | |
}, true); | |
//イベントリスナー登録(マップに反映 by どらごら) | |
document.getElementById('route_rewrite').addEventListener("click", | |
function() { onReWrite(); }, true); | |
//イベントリスナー登録(ルート検証 by どらごら) | |
document.getElementById('route_validate').addEventListener("click", | |
function() { onValidation(); }, true); | |
} | |
} | |
//本体部HTML追加 | |
function addBodyHtml(parentElem) { | |
//中域地図div | |
var addElem = document.createElement("div"); | |
parentElem.appendChild(addElem); | |
addElem.id = "maptoolBody"; | |
addElem.style.display = "none"; | |
//広域地図div | |
var addElem2 = document.createElement("div"); | |
parentElem.appendChild(addElem2); | |
addElem2.id = "maptoolBodyL"; | |
addElem2.style.display = "none"; | |
//中域/広域地図ドラッグ&ドロップイベントリスナー | |
var elems = new Array(); | |
elems.push(addElem); | |
elems.push(addElem2); | |
for (var i=0; i<elems.length; i++) { | |
elems[i].addEventListener("mousedown", | |
function(event) { | |
MOUSE_DRAGGING_1 = true; | |
MOUSE_DRAG_START_X = event.pageX; | |
MOUSE_DRAG_START_Y = event.pageY; | |
this.style.cursor = "move"; | |
event.preventDefault(); | |
}, | |
false); | |
elems[i].addEventListener("mouseup", | |
function(event) { | |
if (!MOUSE_DRAGGING_1) { | |
return true; | |
} | |
MOUSE_DRAGGING_1 = false; | |
this.style.cursor = "default"; | |
var offsetX = event.pageX - MOUSE_DRAG_START_X; | |
var offsetY = event.pageY - MOUSE_DRAG_START_Y; | |
if (Math.sqrt(offsetX*offsetX+offsetY*offsetY) > 5) { | |
var cellSize; | |
if (MAP_MODE == MAP_MODE_M) cellSize = CELL_SIZE_M; | |
else if (MAP_MODE == MAP_MODE_L) cellSize = CELL_SIZE_L; | |
if (cellSize != undefined) { | |
moveMap(CENTER_X - Math.round(offsetX / cellSize), | |
CENTER_Y + Math.round(offsetY / cellSize)); | |
} | |
} | |
event.preventDefault(); | |
}, | |
false); | |
} | |
} | |
//地図(中域)本体部HTML生成 | |
function genBodyHtml() { | |
var bodyHtml = ""; | |
bodyHtml += "<table style='border:1px solid gray; font-size:" + FONT_SIZE + "'>\n"; | |
//各マス作成 | |
for (var y=CENTER_Y+RADIUS; y>=CENTER_Y-RADIUS; y--) { | |
bodyHtml += "<tr style='height:" + CELL_SIZE_M + "px'>\n"; | |
for (var x=CENTER_X-RADIUS; x<=CENTER_X+RADIUS; x++) { | |
bodyHtml += generateMapCellHtml(x, y); | |
} | |
bodyHtml += "</tr>\n"; | |
} | |
bodyHtml += "</table>\n"; | |
return bodyHtml; | |
} | |
//地図(広域)本体部HTML生成 | |
function genBodyHtmlL() { | |
var bodyHtml = ""; | |
var width = (RADIUS_L * 2 + 1) * CELL_SIZE_L; | |
bodyHtml += | |
"<div id='mapBodyL' style='background-color:lightgray; color:white; " + | |
"position:relative; overflow:hidden; " + | |
"width:" + width + "px; height:" + width + "px;'>\r\n"; | |
//中心線 | |
bodyHtml += | |
"<div style='background-color:darkgray; position:absolute; " + | |
"width:" + width + "px; height:1px; " + | |
"left:0px; top:" + (Math.floor(width/2) + 1) + "px;'></div>"; | |
bodyHtml += | |
"<div style='background-color:darkgray; position:absolute; " + | |
"width:1px; height:" + width + "px; " + | |
"left:" + (Math.floor(width/2) + 1) + "px; top:0px;'></div>"; | |
//同盟単位 | |
for (var i = ALLYS.length - 1; i >= 0; i--) { | |
var allySub = ALLYS[i]; | |
if (allySub == "") { | |
continue; | |
} | |
//名称が部分一致する同盟が対象 | |
var matchAllys = searchArrayString(ALLYS_INDEX, allySub); | |
for (var j=0; j<matchAllys.length; j++) { | |
var allyData = getAllyDataCache(matchAllys[j]); | |
var members = allyData[IDX_ALLY_MEMBERS]; | |
for (var k=0; k<members.length; k++) { | |
bodyHtml += genUserVillageHtml(members[k], ALLY_COLORS[i], matchAllys[j], 1); | |
} | |
} | |
} | |
//NPC拠点 | |
if (DISP_NPC_YET || DISP_NPC_FALLEN) { | |
var npcs = splitDelimited( | |
GM_getValue(map_hostname + "NPCS_INDEX", ""), DELIMIT_1); | |
bodyHtml += genVillagesHtml(npcs, "", NPC_COLOR, 3); | |
} | |
//君主単位 | |
for (var i = USERS.length - 1; i >= 0; i--) { | |
var userSub = USERS[i]; | |
if (userSub == "") { | |
continue; | |
} | |
//名称が部分一致する君主が対象 | |
var matchUsers = searchArrayString(USERS_INDEX, userSub); | |
for (var j=0; j<matchUsers.length; j++) { | |
bodyHtml += genUserVillageHtml(matchUsers[j], USER_COLORS[i], "", 2); | |
} | |
} | |
bodyHtml += "</div>"; | |
return bodyHtml; | |
} | |
//君主下各拠点のHTML生成(広域地図) | |
function genUserVillageHtml(user, color, ally, priority) { | |
var ret = ""; | |
var userData = getUserDataCache(user); | |
//既に同盟から抜けている場合はスキップ | |
if (ally != "" && ally != userData[IDX_USER_ALLY]) { | |
return ""; | |
} | |
//各拠点HTML生成 | |
var villages = userData[IDX_USER_VILLAGES]; | |
ret = genVillagesHtml(villages, user, color, priority); | |
return ret; | |
} | |
//拠点表示(複数分)HTML生成(広域地図) | |
function genVillagesHtml(villages, user, color, priority) { | |
var ret = ""; | |
for (var j = 0; j < villages.length; j++) { | |
var x = parseInt(villages[j].split(",")[0]); | |
var y = parseInt(villages[j].split(",")[1]); | |
if (isNaN(x) || isNaN(y)) { | |
continue; | |
} | |
ret += genVillageHtml(user, color, x, y, priority) + "\r\n"; | |
} | |
return ret; | |
} | |
//拠点表示HTML生成(広域地図) | |
function genVillageHtml(user, color, x, y, priority) { | |
//画面範囲外ならスキップ | |
if (x < CENTER_X-RADIUS_L-5 || x > CENTER_X+RADIUS_L+5) return ""; | |
if (y < CENTER_Y-RADIUS_L-5 || y > CENTER_Y+RADIUS_L+5) return ""; | |
//マスデータ取得 | |
var data = loadCellData(generateCellKey(x, y)); | |
//表示対象外はスキップ | |
if (data[IDX_NPC_FLG] == "1") { | |
//NPCの表示指定がない場合はスキップ | |
var disp = false; | |
if (data[IDX_ALLIANCER] == NPC_ALLY) { | |
if (DISP_NPC_YET) { | |
disp = true; | |
} | |
} else { | |
if (DISP_NPC_FALLEN) { | |
if (user == "") disp = true; | |
} else { | |
if (user != "") disp = true; | |
} | |
} | |
if (!disp) return ""; | |
} else { | |
//既に拠点がない場合はスキップ | |
if ((data[IDX_POPULATION] == undefined || data[IDX_POPULATION] == "" || | |
data[IDX_USER_NAME] != user)) { | |
return ""; | |
} | |
} | |
//四角形のサイズを決定 | |
var size; | |
if (data[IDX_NPC_FLG] == "1") { | |
if (data[IDX_POWER].length <= 3) size = 2; | |
else if (data[IDX_POWER].length <= 6) size = 3; | |
else size = 4; | |
} else { | |
var population = parseInt(data[IDX_POPULATION]); | |
if (population < 100) size = 1; | |
else if (population < 250) size = 2; | |
else if (population < 600) size = 3; | |
else if (population < 1000) size = 4; | |
else size = 5; | |
} | |
var borderWidth = 1; | |
var width = (size + 1) * 2 + 1 - borderWidth * 2; | |
var left = (x - (CENTER_X - RADIUS_L)) * CELL_SIZE_L - (width-CELL_SIZE_L)/2; | |
var top = ((CENTER_Y + RADIUS_L) - y) * CELL_SIZE_L - (width-CELL_SIZE_L)/2; | |
var zIndex = priority * 10 + (9 - size); | |
var clsData = new genPopupText(data, x, y); // by どらごら | |
var popupText = clsData.popupText; | |
var ret = | |
"<a href='" + getMapUrl(x, y) + "'>" + | |
"<div style='background-color:" + color + "; z-index:" + zIndex + "; " + | |
"width:" + width + "px; height:" + width + "px; " + | |
"left:" + left + "px; top:" + top + "px; " + | |
"position:absolute; border:outset " + borderWidth + "px " + color + "' "; | |
if (navigator.userAgent.toLowerCase().indexOf('chrome') >= 0) { | |
ret += "title='" + popupText.replace(/<br\/>/g, "\n") + "'>"; | |
} else { | |
ret += "onMouseOver='onPopup(\"" + popupText + "\", event.pageX, event.pageY)' " + | |
"onMouseOut='offPopup()'>"; | |
} | |
ret += "</div></a>"; | |
return ret; | |
} | |
//説明ポップアップ初期化 | |
function initPopup() { | |
//CSS | |
addGlobalStyle( | |
".popup{"+ | |
"position:absolute; left:0px; top:0px; visibility:hidden;opacity:1; "+ | |
"font-size:9pt; color:#ffffff; -moz-border-radius: 8px;"+ | |
"background-color:#000000; layer-background-color:#FFFFFF; "+ | |
"border:1px solid #ffffFF; padding:10px;z-index:999;"+ | |
"}" | |
); | |
//表示関数 | |
var funcHTML = | |
'function onPopup(text, nX, nY) {\n'+ | |
'var sX = -10, sY = 24;\n'+ | |
'var msgElem = document.getElementById("popup");\n'+ | |
'msgElem.innerHTML = text;\n'+ | |
'msgElem.style.visibility = "visible";\n'+ | |
'msgElem.style.left = (nX + sX) + "px";\n'+ | |
'msgElem.style.top = (nY + sY) + "px";\n'+ | |
'}\n'+ | |
'function offPopup() {\n'+ | |
'document.getElementById("popup").style.visibility = "hidden";\n'+ | |
'}\n'; | |
var scriptElem = document.createElement("script"); | |
scriptElem.type = "text/javascript"; | |
scriptElem.innerHTML = funcHTML; | |
document.getElementsByTagName("head")[0].appendChild(scriptElem); | |
//HTMLタグ追加 | |
var popupElem = document.createElement('span'); | |
popupElem.id = "popup"; | |
popupElem.className = "popup"; | |
var mapElem = document.evaluate('//*[@id="maptool"]', | |
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
mapElem.snapshotItem(0).appendChild(popupElem); | |
//イベントリスナー登録 | |
popupElem.addEventListener("mouseover", | |
function() { this.style.visibility = "hidden" }, true); | |
} | |
//所有者が変わった領地に印 | |
function markChangeArea() { | |
// by どらごら | |
markChangeArea2(document); | |
} | |
function markChangeArea2(dom) { | |
var markHtml = ""; | |
var mapElem = dom.evaluate('//*[@id="mapsAll"]', dom, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0); | |
var baseX = CENTER_X - Math.floor((MAP_SCALE-1)/2); | |
var baseY = CENTER_Y + Math.floor((MAP_SCALE-1)/2); | |
for (var x = baseX; x <= baseX + MAP_SCALE - 1; x++) { | |
for (var y = baseY; y >= baseY - MAP_SCALE + 1; y--) { | |
//保存データ取得 | |
var data = getCellDataCache(generateCellKey(x, y)); | |
var userBefore = data[IDX_USER_BEFORE]; | |
var userAfter = data[IDX_USER_NAME]; | |
if (userBefore == userAfter) { | |
continue; | |
} | |
//チェック画像 | |
var areaNo = (x - baseX) * MAP_SCALE + (baseY - y) + 1; | |
var addElem = document.createElement("img"); | |
addElem.className = "mapAll" + padZero_1(areaNo); | |
addElem.alt = "change"; | |
addElem.src = "data:image/gif;base64,"+ | |
"R0lGODlhPAA8AHcAMSH+GlNvZnR3YXJlOiBNaWNyb3NvZnQgT2ZmaWNlACH5BAEAAAAALBMAHgAZ"+ | |
"ABQAgAAAAP4AAAIyhI+ZwayPmoRUOvpswFDzbH2KJy5TGZ2oQa5AyF0HjKltddK1pn58s/q5eC5W"+ | |
"byhDFQAAOw=="; | |
mapElem.appendChild(addElem); | |
} | |
} | |
} | |
//地図幅の取得 | |
function getMapScale() { | |
var sort15 = document.evaluate('//*[@id="change-map-scale"]/ul/li[@class="sort15 now"]', | |
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
if (sort15.snapshotLength != 0) { | |
return 15; | |
} | |
var sort21 = document.evaluate('//*[@id="change-map-scale"]/ul/li[@class="sort21 now"]', | |
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
if (sort21.snapshotLength != 0) { | |
return 20; | |
} | |
return 11; | |
} | |
//君主、同盟の指定がない場合は中心座標の君主をデフォルト | |
function defaultTargets() { | |
if (USERS[0] != "" || ALLYS[0] != "") { | |
return; | |
} | |
var data = getCellDataCache(generateCellKey(CENTER_X, CENTER_Y)); | |
if (data.length > 0) { | |
USERS[0] = data[IDX_USER_NAME]; | |
ALLYS[0] = data[IDX_ALLIANCER]; | |
} | |
} | |
//名称入力欄設定 | |
function setInputNames() { | |
INPUT_MODE = INPUT_MODE_NAME; | |
setInputLink("maptoolModeName"); | |
setInputs(USERS, ALLYS, MAP_MATE_NAMES, ""); | |
} | |
//色入力欄設定 | |
function setInputColors() { | |
INPUT_MODE = INPUT_MODE_COLOR; | |
setInputLink("maptoolModeColor"); | |
setInputs(USER_COLORS, ALLY_COLORS, MAP_MATE_COLORS, "monospace"); | |
} | |
//リンク背景色設定 | |
function setInputLink(id) { | |
var linkIds = new Array("maptoolModeName", "maptoolModeColor"); | |
for (var i = 0; i < linkIds.length; i++) { | |
var elem = document.getElementById(linkIds[i]); | |
if (linkIds[i] == id) { | |
elem.style.backgroundColor = "dimgray"; | |
} else { | |
elem.style.backgroundColor = ""; | |
} | |
} | |
} | |
//入力欄設定 | |
function setInputs(users, allys, colors, fontFamily) { | |
//各テキストボックスを初期化 | |
for (var i = 0; i < USER_COLORS.length; i++) { | |
var field = document.getElementById("user" + (i+1)); | |
field.value = ""; | |
field.style.fontFamily = fontFamily; | |
} | |
for (var i = 0; i < ALLY_COLORS.length; i++) { | |
var field = document.getElementById("ally" + (i+1)); | |
field.value = ""; | |
field.style.fontFamily = fontFamily; | |
} | |
for (var i = 0; i < MAP_MATE_COLORS.length; i++) { | |
var field = document.getElementById("col" + (i+1)); | |
field.value = ""; | |
field.style.fontFamily = fontFamily; | |
} | |
//各テキストボックスに設定 | |
for (var i = 0; i < users.length; i++) { | |
document.getElementById("user" + (i+1)).value = users[i]; | |
} | |
for (var i = 0; i < allys.length; i++) { | |
document.getElementById("ally" + (i+1)).value = allys[i]; | |
} | |
for (var i = 0; i < colors.length; i++) { | |
document.getElementById("col" + (i+1)).value = colors[i]; | |
} | |
} | |
//入力欄背景色設定 | |
function setFieldColors() { | |
for (var i = 0; i < USER_COLORS.length; i++) { | |
document.getElementById("fld_user" + (i+1)).style.backgroundColor = USER_COLORS[i]; | |
} | |
for (var i = 0; i < ALLY_COLORS.length; i++) { | |
document.getElementById("fld_ally" + (i+1)).style.backgroundColor = ALLY_COLORS[i]; | |
} | |
for (var i = 0; i < MAP_MATE_COLORS.length; i++) { | |
document.getElementById("fld_col" + (i+1)).style.backgroundColor = MAP_MATE_COLORS[i]; | |
} | |
} | |
//地図1マス生成 | |
function generateMapCellHtml(x, y) { | |
var cellHtml = ""; | |
//保存データ取得 | |
var data = loadCellData(generateCellKey(x, y)); | |
var user = data[IDX_USER_NAME]; | |
var population = data[IDX_POPULATION]; | |
var ally = data[IDX_ALLIANCER]; | |
var power = data[IDX_POWER]; | |
var npcFlg = data[IDX_NPC_FLG]; | |
var capitalFlg = data[IDX_CAPITAL_FLG]; | |
var timeBefore = data[IDX_TIME_BEFORE]; | |
var userBefore = data[IDX_USER_BEFORE]; | |
var parentAlly = getParentAlly(ally); | |
//背景色 | |
var bgColor; | |
var reverse = false; | |
if (user == undefined) {bgColor = "gray";} | |
else if (user == "") { bgColor = "white";} | |
else if (npcFlg == "1" && ((DISP_NPC_YET && ally == NPC_ALLY) || (DISP_NPC_FALLEN && ally != NPC_ALLY))) {bgColor = NPC_COLOR;reverse = true;} | |
if (MAP_COLOR_MODE){ | |
if (bgColor == undefined) {if (matchString(user, USERS[0])) {bgColor = USER_COLORS[0];reverse = true;}} | |
if (bgColor == undefined) {if (matchString(ally, ALLYS[0]) || matchString(parentAlly, ALLYS[0])) {bgColor = ALLY_COLORS[0];}} | |
if (bgColor == undefined) {if (user != ""){bgColor = MAP_MATE_COLORS[MAP_OTHER_COLOR];reverse = true;}} | |
if (user == "") { | |
if (data[IDX_STONE] + data[IDX_IRON] + data[IDX_RICE] == "000"){bgColor = MAP_MATE_COLORS[MAP_WOOD_COLOR];} | |
else if (data[IDX_WOOD] + data[IDX_IRON] + data[IDX_RICE] == "000"){bgColor = MAP_MATE_COLORS[MAP_STONE_COLOR];} | |
else if (data[IDX_WOOD] + data[IDX_STONE] + data[IDX_RICE] == "000"){bgColor = MAP_MATE_COLORS[MAP_IRON_COLOR];} | |
else if (data[IDX_WOOD] + data[IDX_STONE] + data[IDX_IRON] == "000"){bgColor = MAP_MATE_COLORS[MAP_RICE_COLOR];} | |
else { bgColor = MAP_MATE_COLORS[MAP_MIX_COLOR];} | |
reverse = true; | |
} | |
} else { | |
if (bgColor == undefined) {for (var i=0; i<USERS.length; i++) { if (matchString(user, USERS[i])) {bgColor = USER_COLORS[i];reverse = true;break;}}} | |
if (bgColor == undefined) {for (var i=0; i<ALLYS.length; i++) { if (matchString(ally, ALLYS[i]) || matchString(parentAlly, ALLYS[i])) { bgColor = ALLY_COLORS[i];break;}}} | |
} | |
if (bgColor == undefined) {bgColor = ETC_COLOR;} | |
//マス情報は新しい? | |
var isNewData = (timeBefore >= BASE_TIME); | |
//所有者変更有無チェック | |
var isDiff = (userBefore != user && isNewData); | |
//ポップアップ内容 | |
//var popupText = genPopupText(data, x, y); | |
var clsData = new genPopupText(data, x, y); // by どらごら | |
var popupText = clsData.popupText; | |
//データが古いマスに目印 | |
var borderStyle = "border: solid white 1px;"; | |
if (!isNewData) { | |
if (reverse) { | |
borderStyle = "border: solid lightgrey 1px;"; | |
} else { | |
borderStyle = "border: solid gray 1px;" | |
} | |
} | |
//中心マスに目印 | |
if (x==CENTER_X && y==CENTER_Y) { | |
var borderColor; | |
if (reverse) borderColor = "black"; | |
else borderColor = "black"; | |
borderStyle = "border: solid "+borderColor+" 2px;"; | |
} | |
//☆多領地、人口多拠点を強調 | |
var hiPowerStyle, textColor; | |
if ((power != undefined && power.length >= HI_POWER) || | |
(population != undefined && parseInt(population) > HI_POPUL)) { | |
hiPowerStyle = "font-weight:bold;"; | |
if (reverse) textColor = "white"; | |
else textColor = "black"; | |
} else { | |
hiPowerStyle = ""; | |
if (reverse) textColor = "lightgray"; | |
else textColor = "dimgray"; | |
} | |
//配下同盟表示 | |
var anchorStyle = ""; | |
if (ally != "" && parentAlly != "" && !reverse) {anchorStyle += "background-color:whitesmoke;";} | |
//本拠地表示 | |
if (capitalFlg == "C") {anchorStyle += "border:dotted 1px " + textColor + ";";} | |
//所有者変更表示 | |
if (isDiff) { | |
if (reverse) textColor = "pink"; | |
else textColor = "red"; | |
} | |
//tdタグ by どらごら | |
if(ROUTE_ENABLE == false) { | |
cellHtml += "<td style='width:" + CELL_SIZE_M + "px; text-align:center; " + | |
"background-color:" + bgColor + ";" + borderStyle + hiPowerStyle + "'>"; | |
} else { | |
// x,y,p,c,b | |
var argv = "event, " + | |
clsData.x + "," + clsData.y + | |
"," + "\"" + clsData.power + "\"" + | |
"," + ((clsData.x==CENTER_X && clsData.y==CENTER_Y) ? "true" : "false") + | |
"," + "\"" + bgColor + "\"" + | |
""; | |
var mouse_over = ""; | |
if(CURSOR_ENABLE) { | |
mouse_over = " onMouseOver='onMapMouseOver("+ argv + ");' onMouseOut='onMapMouseOut("+ argv + ");' "; | |
} | |
cellHtml += "<td style='width:" + CELL_SIZE_M + "px; text-align:center; "+ | |
"background-color:" + bgColor + ";" + borderStyle + hiPowerStyle + "' " + | |
"id='route_td_" + clsData.x + "_" + clsData.y + "' onClick='onMapClick("+ argv + ");' " + | |
mouse_over + " onContextMenu='onMapContextMenu("+ argv +");'>"; | |
} | |
//座標リンク by どらごら | |
if(ROUTE_ENABLE == false) { | |
cellHtml += "<a href='" + getMapUrl(x, y) + "' " + | |
"style='color:" + textColor + "; text-decoration:none; " + anchorStyle + "' "; | |
if (navigator.userAgent.toLowerCase().indexOf('chrome') >= 0) { | |
cellHtml += "title='" + popupText.replace(/<br\/>/g, "\n") + "'>"; | |
} else { | |
cellHtml += "onMouseOver='onPopup(\"" + popupText + "\", event.pageX, event.pageY)' " + | |
"onMouseOut='offPopup()'>"; | |
} | |
} else { | |
cellHtml += "<a href='javascript:void(0);' id='route_a_" + clsData.x + "_" + clsData.y + "' " + | |
"style='color:" + textColor + "; text-decoration:none; " + anchorStyle + "' "; | |
if (navigator.userAgent.toLowerCase().indexOf('chrome') >= 0) { | |
cellHtml += "title='" + popupText.replace(/<br\/>/g, "\n") + "'>"; | |
} else { | |
cellHtml += "onMouseOver='onPopup(\"" + popupText + "\", event.pageX, event.pageY)' " + | |
"onMouseOut='offPopup()'>"; | |
} | |
} | |
//☆数(領地) 、「C」(Castle/PC)、「P」(PC)、「N」(NPC) | |
if (data.length == 0) cellHtml += " "; | |
else if (npcFlg == "1") cellHtml += "N"; | |
else if (population != "" & capitalFlg == "C") cellHtml += capitalFlg; | |
else if (population != "") cellHtml += "P"; | |
else if (power == "") cellHtml += "?"; | |
else cellHtml += power.length; | |
cellHtml += "</a>"; | |
cellHtml += "</td>\n"; | |
return cellHtml; | |
} | |
//ポップアップテキスト生成 | |
// クラス化 by どらごら | |
function genPopupText(data, x, y) { | |
this.x = x; | |
this.y = y; | |
this.data = data; | |
this.village = data[IDX_VILLAGE_NAME]; | |
this.user = data[IDX_USER_NAME]; | |
this.population = data[IDX_POPULATION]; | |
this.ally = data[IDX_ALLIANCER]; | |
this.power = data[IDX_POWER]; | |
this.material = | |
"森"+data[IDX_WOOD] + | |
" 岩"+data[IDX_STONE] + | |
" 鉄"+data[IDX_IRON] + | |
" 穀"+data[IDX_RICE]; | |
this.npcFlg = data[IDX_NPC_FLG]; | |
this.userBefore = data[IDX_USER_BEFORE]; | |
this.allyBefore = data[IDX_ALLY_BEFORE]; | |
this.lastUpdate = data[IDX_LAST_UPDATE]; | |
this.parentAlly = getParentAlly(this.ally); | |
//自拠点からの距離 | |
this.distance = -1; | |
if (MY_X != 0 || MY_Y != 0) { | |
this.distance = Math.sqrt((MY_X-x)*(MY_X-x)+(MY_Y-y)*(MY_Y-y)); | |
this.distance = Math.round(this.distance * 100) / 100; | |
} | |
//兵数計算 | |
var ki = 0; | |
if (DISP_PERIOD1){ki=1} | |
if (DISP_PERIOD2){ki=2} | |
if (DISP_PERIOD3){ki=3} | |
if (DISP_PERIOD4){ki=4} | |
if (DISP_PERIOD5){ki=5} | |
if (DISP_PERIOD6){ki=6} | |
var heika = [0,0,0,0,0,0,0]; | |
var defTxt = ""; | |
for (i=0; i<MINPEI.length; i++){ | |
if (MINPEI[i][0] == ki && MINPEI[i][1] == this.power && MINPEI[i][2] == this.material){ | |
heika[0] = MINPEI[i][3] * (1+(this.distance * 0.1)); | |
heika[1] = MINPEI[i][4] * (1+(this.distance * 0.1)); | |
heika[2] = MINPEI[i][5] * (1+(this.distance * 0.1)); | |
heika[3] = MINPEI[i][6] * (1+(this.distance * 0.1)); | |
heika[4] = MINPEI[i][7] * (1+(this.distance * 0.1)); | |
heika[5] = MINPEI[i][8] * (1+(this.distance * 0.1)); | |
heika[6] = MINPEI[i][9] * (1+(this.distance * 0.1)); | |
var sum = [[0,0],[0,0],[0,0],[0,0]]; | |
for (j=0; j<4; j++){ | |
for (k=0; k<7; k++){ | |
sum[j][0] = sum[j][0] + (SPEC[k][j] * Math.floor(heika[k]*3)); | |
if (DISP_COMPROMISE != undefined && DISP_COMPROMISE >= 0 && DISP_COMPROMISE <= 100){ | |
sum[j][1] = sum[j][1] + (SPEC[k][j] * Math.floor(heika[k]*3*DISP_COMPROMISE/100)); | |
} | |
} | |
} | |
if (sum[0][0] != 0 || sum[0][1] != 0 || sum[1][0] != 0 || sum[1][1] != 0 || sum[2][0] != 0 || sum[2][1] != 0 || sum[3][0] != 0 || sum[3][1] != 0) { | |
var nin = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]; | |
for (k=0; k<7; k++){ | |
j=k; | |
if (k>3){j=k-3} | |
nin[k][0] = Math.ceil(sum[j][0] / SPEC[k][4]); | |
nin[k][1] = Math.ceil(sum[j][1] / SPEC[k][4]); | |
} | |
if (defTxt != ""){defTxt += "または、(↑平地23、平地20↓)<br/>"} | |
defTxt += "vs歩:" + sum[0][0] + "("+ nin[0][0] +") " + sum[0][1] + "("+ nin[0][1] +")<br/>"; | |
defTxt += "vs槍:" + sum[1][0] + "("+ nin[1][0] +"/" + nin[4][0] + ") " + sum[1][1] + "("+ nin[1][1] + "/" + nin[4][1] +")<br/>"; | |
defTxt += "vs弓:" + sum[2][0] + "("+ nin[2][0] +"/" + nin[5][0] + ") " + sum[2][1] + "("+ nin[2][1] + "/" + nin[5][1] +")<br/>"; | |
defTxt += "vs騎:" + sum[3][0] + "("+ nin[3][0] +"/" + nin[6][0] + ") " + sum[3][1] + "("+ nin[3][1] + "/" + nin[6][1] +")<br/>"; | |
} | |
} | |
} | |
//入手資源計算 | |
var getTxt = ""; | |
if (DISP_MATERIAL) { | |
if (data[IDX_WOOD]!=0) { | |
getTxt += " 木" + Math.floor(data[IDX_WOOD] * this.distance * 10) + "~" + Math.floor(data[IDX_WOOD] * this.distance * 100); | |
} | |
if (data[IDX_STONE]!=0) { | |
getTxt += " 石" + Math.floor(data[IDX_STONE] * this.distance * 10) + "~" + Math.floor(data[IDX_STONE] * this.distance * 100); | |
} | |
if (data[IDX_IRON]!=0) { | |
getTxt += " 鉄" + Math.floor(data[IDX_IRON] * this.distance * 10) + "~" + Math.floor(data[IDX_IRON] * this.distance * 100); | |
} | |
if (data[IDX_RICE]!=0) { | |
getTxt += " 糧" + Math.floor(data[IDX_RICE] * this.distance * 10) + "~" + Math.floor(data[IDX_RICE] * this.distance * 100); | |
} | |
} else { | |
if (data[IDX_WOOD]!=0) { | |
getTxt += " 木" + Math.floor(data[IDX_WOOD] * this.distance * 1595 / 100); | |
} | |
if (data[IDX_STONE]!=0) { | |
getTxt += " 石" + Math.floor(data[IDX_STONE] * this.distance * 1595 / 100); | |
} | |
if (data[IDX_IRON]!=0) { | |
getTxt += " 鉄" + Math.floor(data[IDX_IRON] * this.distance * 1595 / 100); | |
} | |
if (data[IDX_RICE]!=0) { | |
getTxt += " 糧" + Math.floor(data[IDX_RICE] * this.distance * 1595 / 100); | |
} | |
} | |
//[地名]([座標])/[[距離]] | |
if (this.village == undefined) this.village = "不明"; | |
this.popupText = ""; | |
this.popupText += this.village; | |
this.popupText += "(" + x + "," + y + " )" | |
if (this.distance >= 0) { | |
this.popupText += " / " | |
this.popupText += "[" + this.distance + "]" | |
} | |
this.popupText += "<br/>"; | |
//[君主名]@[同盟名]@[親同盟]([前君主名]@[同盟名]) | |
this.exists = false; | |
if (this.user != undefined && this.user != "") { | |
this.popupText += this.user + "@" + this.ally; | |
if (this.parentAlly != "") this.popupText += "@" + this.parentAlly; | |
this.exists = true; | |
} | |
if (this.userBefore != this.user && this.userBefore != undefined && this.userBefore != "") { | |
this.popupText += "(" + this.userBefore + "@" + this.allyBefore + ")"; | |
this.exists = true; | |
} | |
if (this.exists) { | |
this.popupText += "<br/>"; | |
} | |
//NPC戦力 | |
if (this.power != undefined && this.power != "") { | |
this.popupText += this.power + "<br/>"; | |
} | |
//資源 | |
if (this.power != undefined && this.power != "" && this.npcFlg != "1") { | |
this.popupText += this.material + "<br/>"; | |
if (getTxt != "") { | |
this.popupText += " 賊討伐入手(" + getTxt + ")<br/>"; | |
if (DISP_MATERIAL) { | |
this.popupText += " ※1倍:45% ~ 10倍:1%<br/>" | |
} else { | |
this.popupText += " ※期待値:1.6倍<br/>" | |
} | |
} | |
} | |
//人口 | |
if (this.population != undefined && this.population != "") { | |
this.popupText += "人" +this. population + "<br/>"; | |
} | |
//防御力 | |
if (defTxt != "") { | |
this.popupText += defTxt; | |
} | |
//最終更新日時 | |
if (this.lastUpdate != undefined) { | |
var dateText = this.lastUpdate; | |
dateText = dateText.replace(/^[0-9]{4}\//, ""); | |
dateText = dateText.replace(/:[0-9]{2}$/, ""); | |
this.popupText += dateText; | |
} | |
} | |
//地図切り替え | |
function changeMap() { | |
//現在の表示を消去 | |
if (MAP_MODE != MAP_MODE_S) { | |
document.getElementById(mapAllId).style.display = "none"; | |
document.getElementById("maptoolLink").style.display = "none"; | |
} else { | |
document.getElementById("maptoolHead").style.display = "none"; | |
} | |
if (MAP_MODE != MAP_MODE_M) { | |
document.getElementById("maptoolBody").style.display = "none"; | |
} | |
if (MAP_MODE != MAP_MODE_L) { | |
document.getElementById("maptoolBodyL").style.display = "none"; | |
} | |
//地図ツール共通部表示 | |
if (MAP_MODE != MAP_MODE_S) { | |
document.getElementById("maptoolHead").style.display = "block"; | |
var switchName; | |
if (MAP_MODE == MAP_MODE_M) switchName = "広域"; | |
if (MAP_MODE == MAP_MODE_L) switchName = "中域"; | |
document.getElementById("maptoolSwitch").innerHTML = switchName; | |
if (MAP_MODE == MAP_MODE_L) { | |
document.getElementById("maptoolTime").disabled = true; | |
} else { | |
document.getElementById("maptoolTime").disabled = false; | |
} | |
} | |
//時間がかかるので別スレッド化(一旦描画して砂時計を表示させる) | |
setWaitCursor(); | |
window.setTimeout(function() { | |
//地図ツール個別部表示 | |
if (MAP_MODE == MAP_MODE_M) { | |
//中域地図 | |
document.getElementById("maptoolBody").style.display = "block"; | |
} else if (MAP_MODE == MAP_MODE_L) { | |
//広域地図 | |
document.getElementById("maptoolBodyL").style.display = "block"; | |
} else { | |
//狭域地図 | |
var x = parseInt(getParameter_1("x")); | |
if (isNaN(x)) x = 0; | |
var y = parseInt(getParameter_1("y")); | |
if (isNaN(y)) y = 0; | |
if (x == CENTER_X && y == CENTER_Y) { | |
document.getElementById(mapAllId).style.display = "block"; | |
document.getElementById("maptoolLink").style.display = "block"; | |
window.scroll(0,0); | |
} else { | |
//ページリロード | |
GM_setValue(map_hostname + "MAP_MODE", MAP_MODE); | |
location.href = getMapUrl(CENTER_X, CENTER_Y); | |
} | |
} | |
//未表示の場合はHTML生成 | |
if (LOADED_MAPS[MAP_MODE] != "1") { | |
if (MAP_MODE == MAP_MODE_M) { | |
document.getElementById("maptoolBody").innerHTML = genBodyHtml(); | |
} else if (MAP_MODE == MAP_MODE_L) { | |
document.getElementById("maptoolBodyL").innerHTML = genBodyHtmlL(); | |
} | |
LOADED_MAPS[MAP_MODE] = "1"; | |
} | |
// by どらごら | |
if(ROUTE_ENABLE) { | |
onReWrite(); | |
} | |
resetCursor(); | |
}, 0); | |
} | |
//同盟データ読み込み | |
function loadAllyData(ally) { | |
var ret = new Array(); | |
var src = GM_getValue(generateAllyKey(ally), ""); | |
var array1 = src.split(DELIMIT_1); | |
ret[IDX_ALLY_PARENT] = array1[IDX_ALLY_PARENT]; | |
if (ret[IDX_ALLY_PARENT] == undefined) ret[IDX_ALLY_PARENT] = ""; | |
var chiliren = new Array(); | |
if (array1[IDX_ALLY_CHILDREN] != undefined && array1[IDX_ALLY_CHILDREN] != "") { | |
chiliren = array1[IDX_ALLY_CHILDREN].split(DELIMIT2_1); | |
} | |
ret[IDX_ALLY_CHILDREN] = chiliren; | |
var members = new Array(); | |
if (array1[IDX_ALLY_MEMBERS] != undefined && array1[IDX_ALLY_MEMBERS] != "") { | |
members = array1[IDX_ALLY_MEMBERS].split(DELIMIT2_1); | |
} | |
ret[IDX_ALLY_MEMBERS] = members; | |
return ret; | |
} | |
//同盟データ保存 | |
function saveAllyData(ally, data) { | |
var dataArray = new Array(); | |
dataArray[IDX_ALLY_PARENT] = data[IDX_ALLY_PARENT]; | |
dataArray[IDX_ALLY_CHILDREN] = genDelimitString_1(data[IDX_ALLY_CHILDREN], DELIMIT2_1); | |
dataArray[IDX_ALLY_MEMBERS] = genDelimitString_1(data[IDX_ALLY_MEMBERS], DELIMIT2_1); | |
GM_setValue(generateAllyKey(ally), genDelimitString_1(dataArray, DELIMIT_1)); | |
ALLYS_CACHE[ally] = data; | |
if (searchArrayItem(ALLYS_INDEX, ally) < 0) { | |
ALLYS_INDEX.push(ally); | |
} | |
} | |
//同盟データキャッシュ取得 | |
function getAllyDataCache(ally) { | |
if (ALLYS_CACHE[ally] == undefined) { | |
ALLYS_CACHE[ally] = loadAllyData(ally); | |
} | |
return ALLYS_CACHE[ally]; | |
} | |
//親同盟取得 | |
function getParentAlly(ally) { | |
parentAlly = getAllyDataCache(ally)[IDX_ALLY_PARENT]; | |
if (parentAlly == undefined) { | |
parentAlly = ""; | |
} | |
return parentAlly; | |
} | |
//親同盟更新 | |
function updateParentAlly(child, parent) { | |
var childData = getAllyDataCache(child); | |
var beforeParent = childData[IDX_ALLY_PARENT]; | |
//子同盟のデータを更新 | |
childData[IDX_ALLY_PARENT] = parent; | |
saveAllyData(child, childData); | |
//親同盟の子同盟リストに追加 | |
if (parent != "") { | |
//TODO | |
} | |
//親同盟が変わった場合、元親の子同盟リストから削除 | |
if (beforeParent != "" && beforeParent != parent) { | |
//TODO | |
} | |
} | |
//同盟所属君主のデータを更新 | |
function updateAllyMember(user, ally) { | |
//所属同盟のデータを更新 | |
{ | |
var afterAllyData = getAllyDataCache(ally); | |
var members = afterAllyData[IDX_ALLY_MEMBERS]; | |
if (searchArrayItem(members, user) < 0) { | |
members.push(user); | |
afterAllyData[IDX_ALLY_MEMBERS] = members; | |
saveAllyData(ally, afterAllyData); | |
} | |
} | |
//君主データの同盟情報を取得 | |
var userData = getUserDataCache(user); | |
var beforeAlly = userData[IDX_USER_ALLY]; | |
//君主データがなかったら作成 | |
if (beforeAlly == "") { | |
userData[IDX_USER_ALLY] = ally; | |
saveUserData(user, userData); | |
//君主の所属同盟が変化した場合 | |
} else if (beforeAlly != ally) { | |
//同盟データの所属君主情報を更新 | |
var beforeAllyData = getAllyDataCache(beforeAlly); | |
var members = beforeAllyData[IDX_ALLY_MEMBERS]; | |
var itemIdx = searchArrayItem(members, user); | |
if (itemIdx >= 0) { | |
members.splice(itemIdx, 1); | |
beforeAllyData[IDX_ALLY_MEMBERS] = members; | |
saveAllyData(beforeAlly, beforeAllyData); | |
} | |
//君主データの同盟情報を更新 | |
userData[IDX_USER_ALLY] = ally; | |
saveUserData(user, userData); | |
} | |
} | |
//君主データ読み込み | |
function loadUserData(user) { | |
var ret = new Array(); | |
var src = GM_getValue(generateUserKey(user), ""); | |
var array1 = src.split(DELIMIT_1); | |
var villages = new Array(); | |
if (array1[IDX_USER_VILLAGES] != undefined && array1[IDX_USER_VILLAGES] != "") { | |
villages = array1[IDX_USER_VILLAGES].split("|"); | |
} | |
ret[IDX_USER_VILLAGES] = villages; | |
ret[IDX_USER_ALLY] = array1[IDX_USER_ALLY]; | |
if (ret[IDX_USER_ALLY] == undefined) ret[IDX_USER_ALLY] = ""; | |
return ret; | |
} | |
//君主データ保存 | |
function saveUserData(user, data) { | |
var dataArray = new Array(); | |
dataArray[IDX_USER_VILLAGES] = genDelimitString_1(data[IDX_USER_VILLAGES], "|"); | |
dataArray[IDX_USER_ALLY] = data[IDX_USER_ALLY]; | |
GM_setValue(generateUserKey(user), genDelimitString_1(dataArray, DELIMIT_1)); | |
USERS_CACHE[user] = data; | |
if (searchArrayItem(USERS_INDEX, user) < 0) { | |
USERS_INDEX.push(user); | |
} | |
} | |
//君主データキャッシュ取得 | |
function getUserDataCache(user) { | |
if (USERS_CACHE[user] == undefined) { | |
USERS_CACHE[user] = loadUserData(user); | |
} | |
return USERS_CACHE[user]; | |
} | |
//検索用索引保存 | |
function saveAllysIndex() { | |
GM_setValue(map_hostname + "ALLYS_INDEX", | |
genDelimitString_1(ALLYS_INDEX, DELIMIT_1)); | |
} | |
function saveUsersIndex() { | |
GM_setValue(map_hostname + "USERS_INDEX", | |
genDelimitString_1(USERS_INDEX, DELIMIT_1)); | |
} | |
//NPC砦リストに追加 | |
function saveNpcsIndex(value) { | |
var key = map_hostname + "NPCS_INDEX"; | |
var delimiter = DELIMIT_1; | |
var items = splitDelimited(GM_getValue(key, ""), delimiter); | |
if (items.indexOf(value) == -1) { | |
items.push(value); | |
//Greasemonkey領域へ永続保存 | |
GM_setValue(key, genDelimitString_1(items, delimiter)); | |
} | |
} | |
//完全一致/部分一致変更 | |
function changeMatchMode(checked) { | |
GM_setValue(map_hostname + "MATCH_FULL", checked); | |
MATCH_FULL = checked; | |
//地図変更 | |
LOADED_MAPS = new Array(); | |
changeMap(); | |
} | |
//名称定義読み込み | |
function loadNames(key) { | |
var result = GM_getValue(map_hostname + key, "").split(DELIMIT_1); | |
return result; | |
} | |
//色定義読み込み | |
function loadColors(key, defaults) { | |
var result = new Array(); | |
var inputs = GM_getValue(map_hostname + key, "").split(DELIMIT_1) | |
for (var i = 0; i < defaults.length; i++) { | |
if (inputs[i] == undefined || inputs[i] == "") { | |
result[i] = defaults[i]; | |
} else { | |
result[i] = inputs[i]; | |
} | |
} | |
return result; | |
} | |
//入力値を保存 | |
function saveInputAllys(key) { | |
saveInputValues(key, ALLY_COLORS.length, "ally"); | |
} | |
function saveInputUsers(key) { | |
saveInputValues(key, USER_COLORS.length, "user"); | |
} | |
function saveInputColors(key) { | |
saveInputValues(key, MAP_MATE_COLORS.length, "col"); | |
} | |
function saveInputValues(key, length, id) { | |
var newAllys = new Array(); | |
//テキストボックスから入力値を取得 | |
for (var i = 0; i < length; i++) { | |
newAllys[i] = trim_1(document.getElementById(id + (i+1)).value); | |
} | |
//Greasemonkey領域に永続保存 | |
trimArray(newAllys); | |
GM_setValue(map_hostname + key, genDelimitString_1(newAllys, DELIMIT_1)); | |
} | |
//配列空項目削除 | |
function trimArray(ary) { | |
for (var i = ary.length - 1; i >= 0; i--) { | |
if (ary[i] != undefined && ary[i] != "") break; | |
ary.splice(i, 1); | |
} | |
} | |
//地図データCSV出力 | |
function outputMapCsvS() { | |
outputMapCsv(CSV_RADIUS_S); | |
} | |
function outputMapCsvL() { | |
outputMapCsv(CSV_RADIUS_L); | |
} | |
function outputMapCsvLL() { | |
outputMapCsv(CSV_RADIUS_LL); | |
} | |
function outputMapCsv(radius) { | |
document.getElementById(mapAllId).style.display = "none"; | |
document.getElementById("maptoolLink").style.display = "none"; | |
var frameElem = document.createElement("iframe"); | |
frameElem.id = "maptoolCsvFrame"; | |
frameElem.style.width = "100%"; | |
frameElem.style.height = "540px"; | |
var mapElem = document.evaluate('//*[@id="mapboxInner"]', | |
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
mapElem.snapshotItem(0).insertBefore( | |
frameElem, document.getElementById(mapAllId).nextSibling); | |
//時間がかかるので別スレッド化(一旦描画して砂時計を表示させる) | |
setWaitCursor(); | |
window.setTimeout(function() { | |
var frameDoc = document.getElementById("maptoolCsvFrame").contentDocument; | |
var addElem = frameDoc.createElement("pre"); | |
addElem.id = "maptoolCsv"; | |
addElem.style.fontSize = "12px"; | |
frameDoc.body.appendChild(addElem); | |
//タイトル行 | |
var csvText = ""; | |
csvText += "X,Y,VILLAGE_NAME,USER_NAME,POPULATION,X_Y,ALLIANCER,POWER,"; | |
csvText += "WOOD,STONE,IRON,RICE,NPC_FLAG,LAST_UPDATE,CAPITAL_FLAG,PARENT_ALLY\n"; | |
//各マス行 | |
for (var y=CENTER_Y+radius; y>=CENTER_Y-radius; y--) { | |
for (var x=CENTER_X-radius; x<=CENTER_X+radius; x++) { | |
//保存データ取得 | |
var data = loadCellData(generateCellKey(x, y)); | |
if (data.length == 0) { | |
continue; | |
} | |
csvText += x; | |
csvText += ","; | |
csvText += y; | |
csvText += ","; | |
csvText += convCsvString(data[IDX_VILLAGE_NAME]); | |
csvText += ","; | |
csvText += convCsvString(data[IDX_USER_NAME]); | |
csvText += ","; | |
csvText += data[IDX_POPULATION]; | |
csvText += ","; | |
csvText += convCsvString("(" + x + "," + y + ")"); | |
csvText += ","; | |
csvText += convCsvString(data[IDX_ALLIANCER]); | |
csvText += ","; | |
csvText += data[IDX_POWER]; | |
csvText += ","; | |
csvText += data[IDX_WOOD]; | |
csvText += ","; | |
csvText += data[IDX_STONE]; | |
csvText += ","; | |
csvText += data[IDX_IRON]; | |
csvText += ","; | |
csvText += data[IDX_RICE]; | |
csvText += ","; | |
csvText += data[IDX_NPC_FLG]; | |
csvText += ","; | |
csvText += data[IDX_LAST_UPDATE]; | |
csvText += ","; | |
csvText += data[IDX_CAPITAL_FLG]; | |
csvText += ","; | |
csvText += convCsvString(getParentAlly(data[IDX_ALLIANCER])); | |
csvText += "\n"; | |
} | |
} | |
addElem.innerHTML = csvText; | |
resetCursor(); | |
}, 100); | |
} | |
//マスデータキー生成 | |
function generateCellKey(x, y) { | |
return map_hostname + "(" + x + "," + y + ")"; | |
} | |
//同盟データキー生成 | |
function generateAllyKey(allyName) { | |
return map_hostname + "_ally_" + escape(allyName); | |
} | |
//君主データキー生成 | |
function generateUserKey(userName) { | |
return map_hostname + "_user_" + escape(userName); | |
} | |
//基準時刻取得 | |
function getBaseTime() { | |
var res = GM_getValue(map_hostname + "BASE_TIME", ""); | |
if (res == "") { | |
var date = new Date(); | |
res = "" + date.getFullYear() + padZero_1(date.getMonth() + 1) + | |
padZero_1(date.getDate()); | |
} | |
return res; | |
} | |
//自拠点座標取得 | |
//RE土@mixi鯖さん(http://3gokushijp.zouri.jp/)提供 | |
function getMyXY_1() { | |
var d = document; | |
var $x = function(xp,dc) { | |
return document.evaluate(xp, dc||d, null, | |
XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | |
}; | |
var nowLoc = $x('id("gNav")//a[contains(@href,"map.php")]'); | |
if (!nowLoc) return ""; | |
var xy = nowLoc.href.match(/x=([\-0-9]+)&y=([\-0-9]+)/i); | |
if( xy ) { | |
return xy[1]+","+xy[2]; | |
} | |
} | |
//地図シフト | |
function shiftMap(shiftX, shiftY) { | |
var r; //半径 | |
if (MAP_MODE == MAP_MODE_M) r = RADIUS; | |
else if (MAP_MODE == MAP_MODE_L) r = RADIUS_L; | |
//移動先座標算出 | |
var x = CENTER_X + ((r*2 + 1) * shiftX); | |
var y = CENTER_Y + ((r*2 + 1) * shiftY); | |
//地図移動 | |
moveMap(x, y); | |
} | |
//地図移動 | |
function moveMap(x, y) { | |
if (isNaN(x) || isNaN(y)) return; | |
CENTER_X = x; | |
CENTER_Y = y; | |
//範囲外に出ないように | |
CENTER_X = (CENTER_X > MAX_XY ? MAX_XY: CENTER_X); | |
CENTER_X = (CENTER_X < -MAX_XY ? -MAX_XY: CENTER_X); | |
CENTER_Y = (CENTER_Y > MAX_XY ? MAX_XY: CENTER_Y); | |
CENTER_Y = (CENTER_Y < -MAX_XY ? -MAX_XY: CENTER_Y); | |
//地図表示 | |
LOADED_MAPS = new Array(); | |
changeMap(); | |
} | |
//地図画面URL取得 | |
function getMapUrl(x, y) { | |
return "/map.php?x=" + x + "&y=" + y; | |
} | |
//全データ初期化 | |
function clearAllData() { | |
var keys = GM_listValues(); | |
var hostname = map_hostname; //location.hostnameが付いたデータを削除する為、地図ツールのものは、"map_"+location.hostnameにして他に影響が出ないようにした。faraway111013 | |
for (var i = 0; i < keys.length; i++) { | |
if (keys[i].indexOf(hostname, 0) == 0) { | |
GM_deleteValue(keys[i]); | |
} | |
} | |
} | |
//カーソル変更 | |
function setWaitCursor() { | |
document.getElementsByTagName("body")[0].style.cursor = "wait"; | |
} | |
function resetCursor() { | |
document.getElementsByTagName("body")[0].style.cursor = "auto"; | |
} | |
//CSS追加 | |
function addGlobalStyle(css) { | |
var head, style; | |
head = document.getElementsByTagName("head")[0]; | |
if (!head) { return; } style = document.createElement("style"); | |
style.type = "text/css"; | |
style.innerHTML = css; | |
head.appendChild(style); | |
} | |
//URLパラメータ取得 | |
function getParameter_1(key) { | |
var str = location.search.split("?"); | |
if (str.length < 2) { | |
return ""; | |
} | |
var params = str[1].split("&"); | |
for (var i = 0; i < params.length; i++) { | |
var keyVal = params[i].split("="); | |
if (keyVal[0] == key && keyVal.length == 2) { | |
return decodeURIComponent(keyVal[1]); | |
} | |
} | |
return ""; | |
} | |
//子Element取得 | |
function getChildElement_1(parentNode, position) { | |
var current = 0; | |
for (var i = 0; i < parentNode.childNodes.length; i++){ | |
var childNode = parentNode.childNodes[i]; | |
if (childNode.nodeType == 1) { | |
if (current == position) { | |
return childNode; | |
} | |
current++; | |
} | |
} | |
return undefined; | |
} | |
//現在時刻取得(yyyy/mm/dd hh:mm:ss) | |
function getCurrentTime() { | |
var date = new Date(); | |
var res = "" + date.getFullYear() + "/" + padZero_1(date.getMonth() + 1) + | |
"/" + padZero_1(date.getDate()) + " " + padZero_1(date.getHours()) + ":" + | |
padZero_1(date.getMinutes()) + ":" + padZero_1(date.getSeconds()); | |
return res; | |
} | |
//現在時刻取得2(yyyymmddhhmmss) | |
function getCurrentTime2() { | |
var date = new Date(); | |
var res = "" + date.getFullYear() + padZero_1(date.getMonth() + 1) + | |
padZero_1(date.getDate()) + padZero_1(date.getHours()) + | |
padZero_1(date.getMinutes()) + padZero_1(date.getSeconds()); | |
return res; | |
} | |
//先頭ゼロ付加 | |
function padZero_1(num) { | |
var result; | |
if (num < 10) { | |
result = "0" + num; | |
} else { | |
result = "" + num; | |
} | |
return result; | |
} | |
//先頭ゼロ除去 | |
function trimZero_1(str) { | |
var res = str.replace(/^0*/, ""); | |
if (res == "") res = "0"; | |
return res; | |
} | |
//空白除去 | |
function trim_1(str) { | |
return str.replace(/^[ \t\r\n]+|[ \t\r\n]+$/g, ""); | |
} | |
//CSV用文字列変換 | |
function convCsvString(str) { | |
var result; | |
//「"」を「""」に変換 | |
result = str.replace(/\"/g, "\"\""); | |
//「,」を含む場合は全体を「"」で囲む | |
if (result.indexOf(",") >= 0) { | |
result = "\"" + result + "\"" | |
} | |
return result; | |
} | |
//デリミタ区切り文字列生成 | |
function genDelimitString_1(dataArray, delimiter) { | |
var ret = ""; | |
for (var i=0; i < dataArray.length; i++) { | |
if (dataArray[i] != undefined) ret += dataArray[i]; | |
if (i < dataArray.length-1) ret += delimiter; | |
} | |
return ret; | |
} | |
//完全一致/部分一致チェック | |
function matchString(target, sub) { | |
if (target == undefined || sub == undefined || sub == "") { | |
return false; | |
} | |
var tbl = sub.split(",") | |
target = target.toLowerCase(); | |
for (var i=0; i<tbl.length; i++) { | |
var tmp = tbl[i].toLowerCase(); | |
if (tmp != undefined && tmp != "") { | |
if (MATCH_FULL) { | |
if (target == tmp) return true; | |
} else { | |
if (target.indexOf(tmp) >= 0) return true; | |
} | |
} | |
} | |
return false; | |
} | |
function searchArrayString(targets, sub) { | |
var ret = new Array(); | |
for (var i=0; i<targets.length; i++) { | |
if (matchString(targets[i], sub)) ret.push(targets[i]); | |
} | |
return ret; | |
} | |
//数値チェック | |
function isNumeric_1(num) { | |
if (num.match(/^-?[0-9]+$/)) { | |
return true; | |
} | |
return false; | |
} | |
//配列検索 | |
function searchArrayItem(array, key) { | |
for (var i=0; i<array.length; i++) { | |
if (array[i] == key) { | |
return i; | |
} | |
} | |
return -1; | |
} | |
//デリミタ区切り文字列を配列に変換 | |
function splitDelimited(str, delimiter) { | |
if (str == undefined || str == "") { | |
return new Array(); | |
} else { | |
return str.split(delimiter); | |
} | |
} | |
//Google Chrome用GM_*系ラッパー関数 | |
function initGMWrapper_1() { | |
// @copyright 2009, James Campos | |
// @license cc-by-3.0; http://creativecommons.org/licenses/by/3.0/ | |
if ((typeof GM_getValue == 'undefined') || (GM_getValue('a', 'b') == undefined)) { | |
GM_addStyle = function(css) { | |
var style = document.createElement('style'); | |
style.textContent = css; | |
document.getElementsByTagName('head')[0].appendChild(style); | |
} | |
GM_deleteValue = function(name) { | |
localStorage.removeItem(LOCAL_STORAGE_1 + "." + name); | |
} | |
GM_getValue = function(name, defaultValue) { | |
var value = localStorage.getItem(LOCAL_STORAGE_1 + "." + name); | |
if (!value) | |
return defaultValue; | |
var type = value[0]; | |
value = value.substring(1); | |
switch (type) { | |
case 'b': | |
return value == 'true'; | |
case 'n': | |
return Number(value); | |
default: | |
return value; | |
} | |
} | |
GM_log = function(message) { | |
console.log(message); | |
} | |
GM_setValue = function(name, value) { | |
value = (typeof value)[0] + value; | |
try { | |
localStorage.setItem(LOCAL_STORAGE_1 + "." + name, value); | |
} catch (e) { | |
alert("localStorageへの保存に失敗 (" + e + ")"); | |
throw e; | |
} | |
} | |
//by froo | |
GM_listValues = function() { | |
var res = new Array(); | |
for (var i = 0; i < localStorage.length; i++) { | |
var key = localStorage.key(i); | |
if (key.indexOf(LOCAL_STORAGE_1 + ".", 0) == 0) { | |
res.push(key.replace(/^.*?\./, "")); | |
} | |
} | |
return res; | |
} | |
} | |
} | |
//------------------------------------------------------------------------------ | |
//座標から同盟名を取得 by どらごら | |
// getAllyFromMapClassからコピペ | |
function getAllyFromXy(x, y) { | |
var data = getCellDataCache(generateCellKey(x, y)); | |
var ally = data[IDX_ALLIANCER]; | |
if (ally == undefined) ally = ""; | |
return ally; | |
} | |
//59x59範囲取得 by どらごら | |
function getMap5959() { | |
var max; //取得画面数 | |
var pos; //取得位置補正 | |
if (MAP_MODE == MAP_MODE_L){ | |
max = 13; //13×13=169画面分取得 | |
pos = 120; | |
} else { | |
if (MAP_WIDE){ | |
max = 4; //4×4=16画面分取得 | |
pos = 30; | |
} else { | |
max = 3; //3×3=9画面分取得 | |
pos = 20; | |
} | |
} | |
if( confirm("表示範囲を一気に取得するためサーバに負荷がかかります。\n" + | |
"何度も実行するとDOS攻撃と同じなので、実行には注意して下さい\n" + | |
"※取得中はあまり他の動作を行わないようにしてください。") == false ) return; | |
for (var i = 0; i < max; i++) { | |
for (var j = 0; j < max; j++) { | |
GET_MAP_LIST.push(new Array(CENTER_X - pos + (j*20), CENTER_Y - pos + (i*20))); | |
} | |
} | |
setWaitCursor(); | |
GET_MAP_LIST_COUNTER = GET_MAP_LIST.length; | |
MAX_MAP_LIST = GET_MAP_LIST_COUNTER; | |
window.setTimeout(getMaps, 0); | |
GET_MAP_SLEEP_TID = setInterval( GetMapSleep , 1000); | |
} | |
// 条件監視sleep by どらごら | |
function GetMapSleep(){ | |
j$("#maptoolExGetMap5959").text((MAX_MAP_LIST - GET_MAP_LIST_COUNTER) + "/" + MAX_MAP_LIST); | |
clearInterval(GET_MAP_SLEEP_TID); | |
if(GET_MAP_LIST_COUNTER <= 0){ | |
LOADED_MAPS = new Array(); | |
changeMap(); | |
resetCursor(); | |
j$("#maptoolExGetMap5959").text("全範囲取得"); | |
alert("地図情報 取得完了!"); | |
} else { | |
GET_MAP_SLEEP_TID = setInterval( GetMapSleep , 1000); | |
} | |
} | |
// マップページをajaxを使用して取得 by どらごら | |
function getMaps() { | |
j$("#maptoolExGetMap5959").text((MAX_MAP_LIST - GET_MAP_LIST_COUNTER) + "/" + MAX_MAP_LIST); | |
if(GET_MAP_LIST.length == 0) { | |
return; | |
} | |
var mapPosi = GET_MAP_LIST.pop(); | |
cajaxRequest_1(getMapUrl(mapPosi[0], mapPosi[1]) + "&type=5", "GET", "", function(req) { | |
var cx = parseInt(CENTER_X); | |
var cy = parseInt(CENTER_Y); | |
var map= parseInt(MAP_SCALE); | |
CENTER_X = parseInt(mapPosi[0]); | |
CENTER_Y = parseInt(mapPosi[1]); | |
MAP_SCALE = 21; //↑の引数「type=5」は1画面21×21マスのモード | |
var reqXML = createNewDocument(req.responseText); | |
saveMapData2(reqXML); | |
saveCapital2(reqXML); | |
saveAllyForMap2(reqXML); | |
CENTER_X = parseInt(cx); | |
CENTER_Y = parseInt(cy); | |
MAP_SCALE = map; | |
GET_MAP_LIST_COUNTER = GET_MAP_LIST_COUNTER - 1; | |
}); | |
window.setTimeout(getMaps, 0); | |
} | |
// html to new document | |
// Autopagerize(http://userscripts.org/scripts/review/8551) | |
// by どらごら | |
function createNewDocument(req) { | |
return createHTMLDocumentByString(req); | |
function createHTMLDocumentByString(str) { | |
if (document.documentElement.nodeName != 'HTML') { | |
return new DOMParser().parseFromString(str, 'application/xhtml+xml') | |
} | |
var html = strip_html_tag(str) | |
var htmlDoc | |
try { | |
// We have to handle exceptions since Opera 9.6 throws | |
// a NOT_SUPPORTED_ERR exception for |document.cloneNode(false)| | |
// against the DOM 3 Core spec. | |
htmlDoc = document.cloneNode(false) | |
htmlDoc.appendChild(htmlDoc.importNode(document.documentElement, false)) | |
} | |
catch(e) { | |
htmlDoc = document.implementation.createDocument(null, 'html', null) | |
} | |
var fragment = createDocumentFragmentByString(html) | |
try { | |
fragment = htmlDoc.adoptNode(fragment) | |
} | |
catch(e) { | |
fragment = htmlDoc.importNode(fragment, true) | |
} | |
htmlDoc.documentElement.appendChild(fragment) | |
return htmlDoc | |
} | |
function strip_html_tag(str) { | |
var chunks = str.split(/(<html(?:[ \t\r\n][^>]*)?>)/) | |
if (chunks.length >= 3) { | |
chunks.splice(0, 2) | |
} | |
str = chunks.join('') | |
chunks = str.split(/(<\/html[ \t\r\n]*>)/) | |
if (chunks.length >= 3) { | |
chunks.splice(chunks.length - 2) | |
} | |
return chunks.join('') | |
} | |
function createDocumentFragmentByString(str) { | |
var range = document.createRange() | |
range.setStartAfter(document.body) | |
return range.createContextualFragment(str) | |
} | |
} | |
// ajaxラッパー by どらごら | |
function cajaxRequest_1(url, method, param, func_success, func_fail){ | |
var req = new XMLHttpRequest(); | |
req.onreadystatechange = function() { | |
if (req.readyState == 4 && req.status == 200){ | |
func_success(req); | |
} | |
else if (req.readyState == 4 && req.status != 200){ | |
func_fail(req); | |
} | |
} | |
req.open(method, url, true); | |
if (method == 'POST'){ | |
req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); | |
} | |
req.send(param); | |
} | |
// jQuery append by どらごら | |
// | |
function jQueryAppend() { | |
j$ = unsafeWindow.jQuery; | |
j$(document.body).append( | |
"<div id='route_contextmenu'>" + | |
"<ul id='route_command' style='text-align:left'></ul>" + | |
"</div>"); | |
j$("#route_contextmenu") | |
.hide() | |
.css({ | |
position: "absolute", | |
backgroundColor: "white", | |
border: "outset 2px gray", | |
color: "black", | |
padding: "3px", | |
zIndex: 999 | |
}); | |
} | |
// スクリプトタグを追加 by どらごら | |
function addRouteScriptHtml() { | |
if(ROUTE_ENABLE == false) return; | |
var funcHTML = onMapMouseOver+onMapMouseOut+onMapClick+menuMapChk+createArgClass+ | |
onMapContextMenu+menuMapChk+menuChkDel; | |
var scriptElem = document.createElement("script"); | |
scriptElem.type = "text/javascript"; | |
scriptElem.innerHTML = funcHTML; | |
document.getElementsByTagName("head")[0].appendChild(scriptElem); | |
} | |
function createArgClass(x, y, pw, center_flg, bg_color) { | |
this.x = x; | |
this.y = y; | |
this.pw = pw; | |
this.center_flg = center_flg; | |
this.bg_color = bg_color; | |
} | |
// マウス移動 by どらごら | |
function onMapMouseOver(e, x,y,p,c,b) { | |
j$("#route_td_" + x + "_" + y).css("border", "solid 2px lime"); | |
} | |
// マウス外れ by どらごら | |
function onMapMouseOut(e, x,y,p,c,b) { | |
//中心マスに目印 | |
var borderColor = "white"; | |
var borderPic = "0px"; | |
var bold = "solid"; | |
if (c) { | |
borderColor = "black"; | |
borderPic = "2px"; | |
} | |
j$("#route_td_" + x + "_" + y).css("border", bold+" "+borderPic+" "+borderColor); | |
} | |
// マップ左クリック by どらごら | |
function onMapClick(e, x,y,p,c,b) { | |
if(document.getElementById("route_chk_enable").checked == true) { | |
menuMapChk(e, x,y,p,c,b); | |
} else { | |
location.href = "/map.php?x=" + x + "&y=" + y; | |
} | |
} | |
// マップ右クリック by どらごら | |
function onMapContextMenu(e, x,y,p,c,b) { | |
// メニュー追加 | |
j$("#route_command") | |
.text("") | |
.append("<li id='chkLink' class='route_item' style='padding:0px 10px'>チェック</li>") | |
.append("<li id='delLink' class='route_item' style='padding:0px 10px'>取り消し</li>") | |
.append("<li id='moveLink' class='route_item' style='padding:0px 10px'>画面遷移</li>") | |
.append("<li id='detailLink' class='route_item' style='padding:0px 10px'>詳細</li>") | |
.append("<li id='sortieLink' class='route_item' style='padding:0px 10px'>出撃</li>"); | |
j$(".route_item") | |
.mouseover(function() { | |
j$(this).css("backgroundColor", "grey") | |
}) | |
.mouseout(function() { | |
j$(this).css("backgroundColor", "white") | |
}); | |
j$("#chkLink") | |
.addClass("subMenuItem") | |
.unbind("click") | |
.one("click", | |
function (x,y,p,c,b) { | |
return function () { | |
menuMapChk(e, x,y,p,c,b); | |
}; | |
}(x,y,p,c,b)); | |
j$("#delLink") | |
.addClass("subMenuItem") | |
.unbind("click") | |
.one("click", | |
function (x,y,p,c,b) { | |
return function () { | |
menuChkDel(e, x,y,p,c,b); | |
}; | |
}(x,y,p,c,b)); | |
j$("#moveLink") | |
.addClass("subMenuItem") | |
.unbind("click") | |
.one("click", | |
function (x,y,p,c,b) { | |
return function () { | |
location.href = "map.php?x=" + x + "&y=" + y; | |
}; | |
}(x,y,p,c,b)); | |
j$("#detailLink") | |
.addClass("subMenuItem") | |
.unbind("click") | |
.one("click", | |
function (x,y,p,c,b) { | |
return function () { | |
location.href = "land.php?x=" + x + "&y=" + y; | |
}; | |
}(x,y,p,c,b)); | |
j$("#sortieLink") | |
.addClass("subMenuItem") | |
.unbind("click") | |
.one("click", | |
function (x,y,p,c,b) { | |
return function () { | |
location.href = "facility/castle_send_troop.php?x=" + x + "&y=" + y + "#ptop"; | |
}; | |
}(x,y,p,c,b)); | |
// メニュー表示 | |
j$("#route_contextmenu") | |
.css({ | |
left: e.pageX + "px", | |
top: e.pageY + "px" | |
}) | |
.show(); | |
j$(document) | |
.unbind("click") | |
.one("click", | |
function () { | |
j$("#route_contextmenu").hide(); | |
}); | |
// デフォルトのメニューは非表示 | |
e.preventDefault(); | |
} | |
// ルートの検証 by どらごら | |
function onValidation() { | |
var txtbox = document.getElementById("route_output"); | |
var line = txtbox.value.split("\n"); | |
var x = null; | |
var y = null; | |
var lineNum; | |
for(var i=0;i<line.length;i++) { | |
regObj = new RegExp(/[^-^\d]*([^,]*),([^\)]*)\)[\s\u3000\u2605\u2606\d]*(.*)/); | |
if (line[i].match(regObj)) { | |
var tdElem = document.getElementById("route_td_" + RegExp.$1 + "_" + RegExp.$2); | |
if (tdElem == null) { | |
continue; | |
} | |
if ((x == null) && (y == null)) { | |
x = RegExp.$1; | |
y = RegExp.$2; | |
lineNum = i; | |
continue; | |
} | |
if ((Math.abs(x - RegExp.$1) > 1 ) || (Math.abs(y - RegExp.$2) > 1 )) { | |
// not chain | |
var msg = (lineNum + 1) + "行目の(" + x + "," + y + ")と\n" + | |
(i + 1) + "行目の(" + RegExp.$1 + "," + RegExp.$2 + ")が離れています"; | |
alert(msg); | |
} | |
x = RegExp.$1; | |
y = RegExp.$2; | |
lineNum = i; | |
} | |
} | |
alert("チェック終了!"); | |
} | |
// マップをチェック by どらごら | |
function menuMapChk(e, x,y,p,c,b) { | |
j$("#route_output").val(j$("#route_output").val() + "(" + x + "," + y + ") ★" + p.length + " \n"); | |
j$("#route_td_" + x + "_" + y).css("backgroundColor", "#FF00FF"); | |
} | |
// チェックを削除 by どらごら | |
function menuChkDel(e, x,y,p,c,b) { | |
var txtbox = document.getElementById("route_output"); | |
var line = txtbox.value.split("\n"); | |
var newText = ""; | |
for(var i=0;i<line.length;i++) { | |
regObj = new RegExp(/[^-^\d]*([^,]*),([^\)]*)\)[\s\u3000\u2605\u2606\d]*(.*)/); | |
if (line[i].match(regObj)) { | |
if((x == RegExp.$1) && (y == RegExp.$2)) { | |
var tdElem = document.getElementById("route_td_" + RegExp.$1 + "_" + RegExp.$2); | |
if(tdElem != null) { | |
tdElem.style.backgroundColor = b; | |
} | |
} else { | |
newText += line[i] + "\n"; | |
} | |
} else { | |
// 一致しなくても、行は有効 | |
newText += line[i] + "\n"; | |
} | |
} | |
txtbox.value = newText; | |
} | |
// マップに反映 by どらごら | |
function onReWrite() { | |
var txtbox = document.getElementById("route_output"); | |
var line = txtbox.value.split("\n"); | |
for(var i=0;i<line.length;i++) { | |
regObj = new RegExp(/[^-^\d]*([^,]*),([^\)]*)\)[\s\u3000\u2605\u2606\d]*(.*)/); | |
if (line[i].match(regObj)) { | |
var tdElem = document.getElementById("route_td_" + RegExp.$1 + "_" + RegExp.$2); | |
if(tdElem == null) { | |
continue; | |
} | |
if(RegExp.$3.trim() == "") { | |
tdElem.style.backgroundColor = "#FF00FF"; | |
} else { | |
tdElem.style.backgroundColor = "#00FF00"; | |
} | |
} | |
} | |
} | |
// 出兵画面に簡易出兵先情報表示準備 by どらごら | |
function sendTroop() { | |
//自拠点座標取得 | |
var xy = getMyXY_1(); | |
if (xy == "") { | |
MY_X = 0; | |
MY_Y = 0; | |
} else { | |
MY_X = parseInt(xy.split(",")[0]); | |
MY_Y = parseInt(xy.split(",")[1]); | |
} | |
j$("input[name=village_x_value]").attr("id", "village_x_value"); | |
j$("input[name=village_y_value]").attr("id", "village_y_value"); | |
document.getElementById("village_x_value").addEventListener("change", | |
function() { | |
sendTroopInfo(); | |
}, | |
true); | |
document.getElementById("village_y_value").addEventListener("change", | |
function() { | |
sendTroopInfo(); | |
}, | |
true); | |
j$(".notice:eq(3)").append( | |
"<div id='sendTroopInfo'>" + | |
"<table id='sendTroopInfoTable' class='commonTables'>" + | |
"<tr>" + | |
"<th class='mainTtl'>森</th>" + | |
"<th class='mainTtl'>岩</th>" + | |
"<th class='mainTtl'>鉄</th>" + | |
"<th class='mainTtl'>糧</th>" + | |
"<th class='mainTtl'>強さ</th>" + | |
"<th class='mainTtl'>距離</th>" + | |
"</tr>" + | |
"<tr>" + | |
"<td id='sendTroop_wood'></th>" + | |
"<td id='sendTroop_stone'></th>" + | |
"<td id='sendTroop_iron'></th>" + | |
"<td id='sendTroop_rice'></th>" + | |
"<td id='sendTroop_power'></th>" + | |
"<td id='sendTroop_distance'></th>" + | |
"</tr>" + | |
"</table>" + | |
"<div id='locationErrMsg' style='display:none'>"+ | |
"<font color='red'>未取得の座標です</font>"+ | |
"</div>"+ | |
"</div>" | |
); | |
// 情報表示 | |
sendTroopInfo(); | |
} | |
// 出兵画面に簡易出兵先情報表示 by どらごら | |
function sendTroopInfo() { | |
//保存データ取得 | |
var x = parseInt(j$("input[name=village_x_value]").val()); | |
var y = parseInt(j$("input[name=village_y_value]").val()); | |
var data = loadCellData(generateCellKey(x, y)); | |
if (data.length == 0) { | |
j$("#sendTroopInfoTable td:first") | |
.text("") | |
.next().text("") | |
.next().text("") | |
.next().text("") | |
.next().text("") | |
.next().text("") | |
; | |
j$("#locationErrMsg").show(); | |
} else { | |
var clsData = new genPopupText(data, x, y); // by どらごら | |
j$("#sendTroopInfoTable td:first") | |
.text(clsData.data[IDX_WOOD]) | |
.next().text(clsData.data[IDX_STONE]) | |
.next().text(clsData.data[IDX_IRON]) | |
.next().text(clsData.data[IDX_RICE]) | |
.next().text("☆" + (clsData.power).length) | |
.next().text(clsData.distance) | |
; | |
j$("#locationErrMsg").hide(); | |
} | |
} | |
function allianceCSV_1(){ | |
//CSV出力用 | |
if (j$("#csvMake").size() == 0){ | |
j$("table.tables") | |
.after("<iframe style=\"width: 100%; height: 0px; visibility:hidden\" id=\"memberCsvFrame\"></iframe>") | |
.after("<p id=\"csvMake\">同盟員全領地情報取得</p>"); | |
j$("#csvMake").css("background","black").css("width", "180px").css("color", "white").css("text-align", "center"); | |
} | |
j$("#csvMake").click(function() { | |
if (j$("#csvMake").text() != "同盟員全領地情報取得"){return;} | |
if( confirm("同盟員の情報を一気に取得するためサーバに負荷がかかります。\n何度も実行するとDOS攻撃と同じなので、実行には注意して下さい") == false ) return; | |
MEMBER_ID_LIST = new Array(); | |
j$("table.tables td a").each(function(){ | |
var url = j$(this).attr("href"); | |
var uid = url.match(/user_id=[0-9]+/); | |
if (uid != null){ | |
MEMBER_ID_LIST.push({"URL":"/user/?" + uid}); | |
} | |
}); | |
MEMBER_INFO_TEXT = "X座標,Y座標,君主,領地,人口,本拠地,戦力,森,岩,鉄,糧,備考\n"; | |
setWaitCursor(); | |
MEMBER_ID_LIST_COUNTER = MEMBER_ID_LIST.length; | |
MEMBER_ID_MAX_COUNTER = MEMBER_ID_LIST_COUNTER; | |
window.setTimeout(GetMember, 0); | |
}); | |
} | |
function GetMember() { | |
j$("#csvMake").text("情報取得中" + (MEMBER_ID_MAX_COUNTER - MEMBER_ID_LIST_COUNTER) + "/" + MEMBER_ID_MAX_COUNTER); | |
if(MEMBER_ID_LIST.length == 0) { | |
if (MEMBER_ID_LIST_COUNTER > 0){ | |
window.setTimeout(GetMember, 1000); | |
} else { | |
var frameDoc = document.getElementById("memberCsvFrame").contentDocument; | |
var addElem = frameDoc.createElement("pre"); | |
addElem.id = "memberCsv"; | |
addElem.style.fontSize = "12px"; | |
frameDoc.body.appendChild(addElem); | |
addElem.innerHTML = MEMBER_INFO_TEXT; | |
j$("#memberCsvFrame").css("height", "300px").css("visibility","visible"); | |
j$("#csvMake").text("同盟員全領地情報取得(済)"); | |
resetCursor(); | |
alert("同盟情報 取得完了!"); | |
return; | |
} | |
} | |
var member = MEMBER_ID_LIST.pop(); | |
cajaxRequest_1(member.URL, "GET", "", function(req) { | |
var dt = getXYListfromUserHTML(req.responseText); | |
if( dt ) { | |
for(var i=0 ; i<dt.length ; i++) { | |
MEMBER_INFO_TEXT += dt[i].x + ","; | |
MEMBER_INFO_TEXT += dt[i].y + ","; | |
MEMBER_INFO_TEXT += convCsvString(dt[i].user_name) + ","; | |
MEMBER_INFO_TEXT += convCsvString(dt[i].area_name) + ","; | |
MEMBER_INFO_TEXT += dt[i].jinko + ","; | |
MEMBER_INFO_TEXT += dt[i].honkyo + ","; | |
var data = getCellDataCache(generateCellKey(dt[i].x, dt[i].y)); | |
if (data.length == 0) { | |
MEMBER_INFO_TEXT += ",,,,,情報未取得\n"; | |
} else { | |
if (dt[i].jinko != ""){ | |
MEMBER_INFO_TEXT += ",,,,,\n"; //拠点の場合、資源情報は無しとする。 | |
} else { | |
MEMBER_INFO_TEXT += data[IDX_POWER] + ","; | |
MEMBER_INFO_TEXT += data[IDX_WOOD] + ","; | |
MEMBER_INFO_TEXT += data[IDX_STONE] + ","; | |
MEMBER_INFO_TEXT += data[IDX_IRON] + ","; | |
MEMBER_INFO_TEXT += data[IDX_RICE] + ",\n"; | |
} | |
} | |
} | |
} | |
MEMBER_ID_LIST_COUNTER = MEMBER_ID_LIST_COUNTER - 1; | |
}); | |
window.setTimeout(GetMember, 0); | |
function getXYListfromUserHTML(html){ | |
var ret = new Array(); | |
var tmp = html.match(/<td[^>]*>君主<\/td>[^<]*<td[^>]*>([^<\s]+)/); | |
if( !tmp ) return null; | |
var user_name = tmp[1]; | |
var pos; | |
var reg = /<a href="\.\.\/(?:land|village_change)\.php[^"]*">\s*([^<\s]+)\s*<\/a>[^<]*<\/td>[^<]*<td[^>]*>([\-0-9]+),([\-0-9]+)<\/td>[^<]*<td[^>]*>([0-9]+| )<\/td>/; | |
var honkyo = 1; | |
while((pos = html.search(reg) ) != -1 ) { | |
html = html.substr(pos); | |
var dat = html.match(reg); | |
if( !dat ) break; | |
if( dat[4] == " " ) dat[4] = ""; | |
ret.push({"user_name":user_name, "area_name":dat[1].replace(/(^\s+|\s+$)/g, ""), "x":dat[2], "y":dat[3], "jinko":dat[4], "honkyo":honkyo}); | |
honkyo=""; | |
html = html.substr(dat[0].length); | |
} | |
return ret; | |
} | |
} | |
function ChangePicture() { | |
if (DISP_PICTURE){return;} | |
j$("div #mapsAll img").each(function(){ | |
var src = j$(this).attr("src"); | |
if (src.indexOf("resource") >= 0){ | |
j$(this).remove(); //資源画像がヒットされたらタグそのものを削除。 | |
} | |
}); | |
} | |
function ConfigOpen() { | |
j$('#CONFIG_AREA').show(); | |
GM_log("#open"); | |
} | |
function ConfigClose() { | |
j$('#CONFIG_AREA').hide(); | |
GM_log("#close"); | |
} | |
//faraway 1.地図ツールのソース(bro3_map_tool.user.js) 終了 | |
//--------------------------------------------- | |
// 同盟貢献チェッカー | |
//--------------------------------------------- | |
function disp_alliance() { | |
if(location.pathname != "/alliance/info.php") return; | |
//mixi鯖障害回避用: 広告iframe内で呼び出されたら無視 | |
var container = document.evaluate('//*[@id="container"]', | |
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
if (container.snapshotLength == 0) return; | |
initGMWrapper_3(); | |
//「略称」欄取得 | |
var myAllyElem = document.evaluate( | |
'//*[@id="gray02Wrapper"]//table/tbody/tr[3]/td', | |
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
if (myAllyElem.snapshotLength == 0) return; | |
ALLY_NAME = trim_3(myAllyElem.snapshotItem(0).innerHTML); | |
//前回更新日時取得 | |
LAST_UPDATE = GM_getValue(generateAllyKey_3(ALLY_NAME), ""); | |
//同盟ランキングTableタイトル部取得 | |
var tableTitle = document.evaluate( | |
'//*[@id="gray02Wrapper"]//table[@class="tables"]/tbody/tr/th', | |
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
//チェック実行リンク追加 | |
var checkExecLink = document.createElement("a"); | |
checkExecLink.id = "checkContribLink"; | |
checkExecLink.href = "javascript:void(0)"; | |
checkExecLink.innerHTML = "貢献チェック実行"; | |
if (LAST_UPDATE != "") { | |
checkExecLink.innerHTML += "(前回:" + convDateStrShort(LAST_UPDATE) + ")"; | |
} | |
checkExecLink.style.margin = "0px 5px"; | |
tableTitle.snapshotItem(0).appendChild(checkExecLink); | |
checkExecLink.addEventListener("click", chackContrib, true); | |
//基準時刻更新リンク追加 | |
var checkSaveLink = document.createElement("a"); | |
checkSaveLink.id = "saveContribLink"; | |
checkSaveLink.href = "javascript:void(0)"; | |
checkSaveLink.innerHTML = "貢献チェック基準時刻更新"; | |
checkSaveLink.innerHTML += "("; | |
if (LAST_UPDATE != "") { | |
checkSaveLink.innerHTML += convDateStrShort(LAST_UPDATE); | |
} | |
checkSaveLink.innerHTML += " → " + convDateStrShort(CURRENT_TIME); | |
checkSaveLink.innerHTML += ")"; | |
checkSaveLink.style.display = "none"; | |
checkSaveLink.style.margin = "0px 5px"; | |
tableTitle.snapshotItem(0).appendChild(checkSaveLink); | |
checkSaveLink.addEventListener("click", saveContrib, true); | |
//データ更新済メッセージ追加 | |
var messageSaveEnd = document.createElement("span"); | |
messageSaveEnd.id = "descContribEnd"; | |
messageSaveEnd.innerHTML = "貢献チェック基準時刻更新済"; | |
messageSaveEnd.innerHTML += "("; | |
if (LAST_UPDATE != "") { | |
messageSaveEnd.innerHTML += convDateStrShort(LAST_UPDATE); | |
} | |
messageSaveEnd.innerHTML += " → " + convDateStrShort(CURRENT_TIME); | |
messageSaveEnd.innerHTML += ")"; | |
messageSaveEnd.style.display = "none"; | |
messageSaveEnd.style.margin = "0px 5px"; | |
messageSaveEnd.style.fontSize = "10px"; | |
tableTitle.snapshotItem(0).appendChild(messageSaveEnd); | |
} | |
//貢献チェック実行 | |
function chackContrib() { | |
//「同盟内ランキング」Table各行の取得 | |
var userElems = document.evaluate( | |
'//*[@id="gray02Wrapper"]//table[@class="tables"]/tbody/tr', | |
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
for (var i = 0; i < userElems.snapshotLength; i++) { | |
var newModified = ""; | |
var oldModified = ""; | |
var rowFields = document.evaluate('./td', userElems.snapshotItem(i), | |
null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
if (rowFields.snapshotLength == 0) continue; | |
//「君主」欄 | |
var userField = rowFields.snapshotItem(1); | |
var userLink = document.evaluate('./a', userField, | |
null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
var user = trim_3(userLink.snapshotItem(0).innerHTML); | |
//前回値取得 | |
var userData = new Array(); | |
var dataStr = GM_getValue(generateUserKey_3(user), ""); | |
if (dataStr != "") { | |
userData = dataStr.split(DELIMIT_3); | |
} | |
//「ランク」欄 | |
{ | |
var rankField = rowFields.snapshotItem(0); | |
var newRank = trim_3(rankField.innerHTML); | |
var rankItem = new Array("", ""); | |
if (userData[IDX_RANK] != undefined && userData[IDX_RANK] != "") { | |
rankItem = userData[IDX_RANK].split(","); | |
} | |
var oldRank = rankItem[0]; | |
if (newRank != oldRank) { | |
if (oldRank != "") { | |
var diff = diffNum(oldRank, newRank); | |
if (parseInt(diff) > 0) rankField.style.color = "red"; | |
else rankField.style.color = "blue"; | |
rankField.innerHTML = newRank + "<font size='-2'>(" + diff + ")</font>"; | |
} | |
rankItem[0] = newRank; | |
rankItem[1] = CURRENT_TIME; | |
userData[IDX_RANK] = rankItem; | |
} | |
} | |
//貢献チェック対象データ | |
var fieldId = new Array( | |
new Array(IDX_POINT, 2), //ポイント | |
new Array(IDX_CONTRIB, 3), //寄付 | |
new Array(IDX_VILLAGE, 4) //拠点 | |
); | |
for (var j = 0; j < fieldId.length; j++) { | |
var targetElem = rowFields.snapshotItem(fieldId[j][1]); | |
var targetData = userData[fieldId[j][0]]; | |
var newValue = trim_3(targetElem.innerHTML); | |
var dataItem = new Array("", ""); | |
if (targetData != undefined && targetData != "") { | |
dataItem = targetData.split(","); | |
} | |
var oldValue = dataItem[0]; | |
if (dataItem[1] > oldModified) { | |
oldModified = dataItem[1]; | |
} | |
if (newValue != oldValue) { | |
//増減表示 | |
if (oldValue != "") { | |
var diff = diffNum(newValue, oldValue); | |
if (parseInt(diff) > 0) targetElem.style.color = "red"; | |
else targetElem.style.color = "blue"; | |
targetElem.innerHTML = newValue + | |
"<font size='-2'>(" + diff + ")</font>"; | |
} | |
dataItem[0] = newValue; | |
dataItem[1] = CURRENT_TIME; | |
userData[fieldId[j][0]] = genDelimitString_3(dataItem, ","); | |
newModified = CURRENT_TIME; | |
} else if (oldModified > newModified) { | |
newModified = oldModified; | |
} | |
} | |
//前回変化からの時間数を表示 | |
var newText = trim_3(userField.innerHTML); | |
newText += "<font size='-2'> ("; | |
if (oldModified != "" && oldModified != newModified) { | |
newText += diffTime(CURRENT_TIME, oldModified) + "→"; | |
} | |
newText += diffTime(CURRENT_TIME, newModified); | |
newText += ")</font>"; | |
userField.innerHTML = newText; | |
if (oldModified != newModified) { | |
userField.style.color = "red"; | |
} | |
//データを保存 | |
if (newModified == CURRENT_TIME || rankItem[1] == CURRENT_TIME) { | |
SAVE_DATA[user] = userData; | |
SAVE_USERS.push(user); | |
} | |
} | |
//操作リンク更新 | |
document.getElementById("checkContribLink").style.display = "none"; | |
if (LAST_UPDATE == "") { | |
//初回なら即保存 | |
saveContrib(); | |
document.getElementById("descContribEnd").style.display = "inline"; | |
} else { | |
document.getElementById("saveContribLink").style.display = "inline"; | |
} | |
} | |
//貢献チェック基準更新 | |
function saveContrib() { | |
//Greasemonkey領域へ値を保存 | |
for (var i = 0; i < SAVE_USERS.length; i++) { | |
var dataStr = genDelimitString_3(SAVE_DATA[SAVE_USERS[i]], DELIMIT_3); | |
GM_setValue(generateUserKey_3(SAVE_USERS[i]), dataStr); | |
} | |
//Greasemonkey領域へ最終更新時刻を保存 | |
GM_setValue(generateAllyKey_3(ALLY_NAME), CURRENT_TIME); | |
//操作リンク更新 | |
document.getElementById("saveContribLink").style.display = "none"; | |
document.getElementById("descContribEnd").style.display = "inline"; | |
} | |
//同盟データキー生成 | |
function generateAllyKey_3(allyName) { | |
return location.hostname + "_ally2_" + escape(allyName);//faraway110602 同盟内ランキング貢献チェック実行(前回:05/12 14:02)文字化け回避保存のキー文字をユニークなものにした) | |
} | |
//君主データキー生成 | |
function generateUserKey_3(userName) { | |
return location.hostname + "_user_3_" + escape(userName); //faraway110616 他のスクリプトと競合する為 | |
} | |
//数値増減計算(文字列) | |
function diffNum(strNum1, strNum2) { | |
var intNum1 = parseInt(strNum1); | |
if (isNaN(intNum1)) intNum1 = 0; | |
var intNum2 = parseInt(strNum2); | |
if (isNaN(intNum2)) intNum2 = 0; | |
var diffInt = intNum1 - intNum2; | |
var diffStr = "" + diffInt; | |
if (diffInt > 0) diffStr = "+" + diffStr; | |
return diffStr; | |
} | |
//時刻差分計算(文字列) | |
function diffTime(strTime1, strTime2) { | |
var date1 = new Date(strTime1); | |
var date2 = new Date(strTime2); | |
var diffSec = Math.ceil((date1.getTime() - date2.getTime()) / 1000); | |
var result = ""; | |
result += Math.floor(diffSec / (60*60)); | |
result += ":"; | |
result += padZero_3(Math.floor((diffSec % (60*60)) / 60)); | |
result += ":"; | |
result += padZero_3(diffSec % 60); | |
return result; | |
} | |
//日時文字列編集(yyyy/mm/dd hh:mm:ss) | |
function generateDateString_3(date) { | |
var res = "" + date.getFullYear() + "/" + padZero_3(date.getMonth() + 1) + | |
"/" + padZero_3(date.getDate()) + " " + padZero_3(date.getHours()) + ":" + | |
padZero_3(date.getMinutes()) + ":" + padZero_3(date.getSeconds()); | |
return res; | |
} | |
//日付文字列を短縮型に変換 | |
function convDateStrShort(str) { | |
var result = str; | |
result = result.replace(/^[0-9]{4}\//, ""); | |
result = result.replace(/:[0-9]{2}$/, ""); | |
return result; | |
} | |
//先頭ゼロ付加 | |
function padZero_3(num) { | |
var result; | |
if (num < 10) { | |
result = "0" + num; | |
} else { | |
result = "" + num; | |
} | |
return result; | |
} | |
//空白除去 | |
function trim_3(str) { | |
return str.replace(/^[ \t\r\n]+|[ \t\r\n]+$/g, ""); | |
} | |
//デリミタ区切り文字列生成 | |
function genDelimitString_3(dataArray, delimiter) { | |
var ret = ""; | |
for (var i=0; i < dataArray.length; i++) { | |
if (dataArray[i] != undefined) ret += dataArray[i]; | |
if (i < dataArray.length-1) ret += delimiter; | |
} | |
return ret; | |
} | |
//Google Chrome用GM_*系ラッパー関数 | |
function initGMWrapper_3() { | |
// @copyright 2009, James Campos | |
// @license cc-by-3.0; http://creativecommons.org/licenses/by/3.0/ | |
if ((typeof GM_getValue == 'undefined') || (GM_getValue('a', 'b') == undefined)) { | |
GM_addStyle = function(css) { | |
var style = document.createElement('style'); | |
style.textContent = css; | |
document.getElementsByTagName('head')[0].appendChild(style); | |
} | |
GM_deleteValue = function(name) { | |
localStorage.removeItem(LOCAL_STORAGE_3 + "." + name); | |
} | |
GM_getValue = function(name, defaultValue) { | |
var value = localStorage.getItem(LOCAL_STORAGE_3 + "." + name); | |
if (!value) | |
return defaultValue; | |
var type = value[0]; | |
value = value.substring(1); | |
switch (type) { | |
case 'b': | |
return value == 'true'; | |
case 'n': | |
return Number(value); | |
default: | |
return value; | |
} | |
} | |
GM_log = function(message) { | |
console.log(message); | |
} | |
GM_setValue = function(name, value) { | |
value = (typeof value)[0] + value; | |
localStorage.setItem(LOCAL_STORAGE_3 + "." + name, value); | |
} | |
} | |
} | |
//faraway 3.同盟貢献チェッカーのソース(bro3_contrib_checker.user.js)終了 | |
//-------------------------------------- | |
// 発展チェッカー | |
//-------------------------------------- | |
// 公開ページ: http://blog.livedoor.jp/froo/archives/51383261.html | |
// 使い方: 君主プロフィールページを表示 | |
function disp_development() { //4.発展チェッカー faraway | |
//mixi鯖障害回避用: 広告iframe内で呼び出されたら無視 | |
var container = document.evaluate('//*[@id="container"]', | |
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
if (container.snapshotLength == 0) return; | |
//プロフィールページ以外なら処理しない | |
if (location.pathname != "/user/" && location.pathname != "/user/index.php") { | |
return; | |
} | |
initGMWrapper_4(); | |
//「君主」欄取得 | |
var user = ""; | |
var userElem = document.evaluate( | |
'//*[@id="gray02Wrapper"]//table/tbody/tr[2]/td[2]', | |
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
user = userElem.snapshotItem(0).innerHTML; | |
//前回値取得 | |
var data = new Array(); | |
var dataStr = GM_getValue(generateUserKey_4(user)); //faraway _4を追加 | |
if (dataStr != undefined) { | |
data = dataStr.split(DELIMIT_4); | |
} | |
//各値欄取得 | |
var fieldPaths = new Array( | |
'//*[@id="gray02Wrapper"]//table/tbody/tr[4]/td[3]', //ランク | |
'//*[@id="gray02Wrapper"]//table/tbody/tr[5]/td[2]', //総合 | |
'//*[@id="gray02Wrapper"]//table/tbody/tr[6]/td[2]', //総人口 | |
'//*[@id="gray02Wrapper"]//table/tbody/tr[6]/td[4]', //拠点 | |
'//*[@id="gray02Wrapper"]//table/tbody/tr[7]/td[2]', //攻撃 | |
'//*[@id="gray02Wrapper"]//table/tbody/tr[7]/td[4]', //防御 | |
'//*[@id="gray02Wrapper"]//table/tbody/tr[8]/td[2]', //撃破スコア | |
'//*[@id="gray02Wrapper"]//table/tbody/tr[8]/td[4]', //防衛スコア | |
'//*[@id="gray02Wrapper"]//table/tbody/tr[4]/td[5]', //同盟 | |
'//*[@id="gray02Wrapper"]//table/tbody/tr[5]/td[4]' //役職 | |
); | |
for (var i=0; i<fieldPaths.length; i++) { | |
var targetElem = document.evaluate(fieldPaths[i], | |
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
var value = targetElem.snapshotItem(0).innerHTML; | |
var dataItem = new Array(); | |
if (data[i] != undefined) { | |
dataItem = data[i].split(","); | |
} | |
//値変化を表示 | |
var lastUpdate = getCurrentTime_4(); | |
//日時表示編集 | |
var dateText = dataItem[1]; | |
if (dateText == undefined) dateText = lastUpdate; | |
dateText = dateText.replace(/^[0-9]{4}-/, ""); | |
dateText = dateText.replace(/:[0-9]{2}$/, ""); | |
if (dataItem[0] != undefined && value != dataItem[0]) { | |
targetElem.snapshotItem(0).style.color = "red"; | |
targetElem.snapshotItem(0).innerHTML = | |
value + " ← " + dataItem[0] + | |
" (" + dateText + " ~)"; | |
} else { | |
targetElem.snapshotItem(0).innerHTML = | |
value + " (" + dateText + " ~)"; | |
} | |
//値に変更があったら更新 | |
if (value != dataItem[0]) { | |
dataItem[0] = value; | |
dataItem[1] = lastUpdate; | |
data[i] = dataItem; | |
} | |
} | |
//値を保存 | |
GM_setValue(generateUserKey_4(user), genDelimitString_4(data, DELIMIT_4)); | |
} | |
//君主データキー生成 | |
function generateUserKey_4(userName) { | |
//faraway110616 return location.hostname + "_user_" + escape(userName); | |
return location.hostname + "_user_4_" + escape(userName); //faraway110616 他のスクリプトと競合する為 | |
} | |
//現在時刻取得(yyyy-mm-dd hh:mm:ss) | |
function getCurrentTime_4() { | |
var date = new Date(); | |
var res = "" + date.getFullYear() + "-" + padZero_4(date.getMonth() + 1) + | |
"-" + padZero_4(date.getDate()) + " " + padZero_4(date.getHours()) + ":" + | |
padZero_4(date.getMinutes()) + ":" + padZero_4(date.getSeconds()); | |
return res; | |
} | |
//先頭ゼロ付加 | |
function padZero_4(num) { | |
var result; | |
if (num < 10) { | |
result = "0" + num; | |
} else { | |
result = "" + num; | |
} | |
return result; | |
} | |
//デリミタ区切り文字列生成 | |
function genDelimitString_4(dataArray, delimiter) { | |
var ret = ""; | |
for (var i=0; i < dataArray.length; i++) { | |
if (dataArray[i] != undefined) ret += dataArray[i]; | |
if (i < dataArray.length-1) ret += delimiter; | |
} | |
return ret; | |
} | |
//Google Chrome用GM_*系ラッパー関数 | |
function initGMWrapper_4() { | |
// @copyright 2009, James Campos | |
// @license cc-by-3.0; http://creativecommons.org/licenses/by/3.0/ | |
if ((typeof GM_getValue == 'undefined') || (GM_getValue('a', 'b') == undefined)) { | |
GM_addStyle = function(css) { | |
var style = document.createElement('style'); | |
style.textContent = css; | |
document.getElementsByTagName('head')[0].appendChild(style); | |
} | |
GM_deleteValue = function(name) { | |
localStorage.removeItem(LOCAL_STORAGE4 + "." + name); | |
} | |
GM_getValue = function(name, defaultValue) { | |
var value = localStorage.getItem(LOCAL_STORAGE4 + "." + name); | |
if (!value) | |
return defaultValue; | |
var type = value[0]; | |
value = value.substring(1); | |
switch (type) { | |
case 'b': | |
return value == 'true'; | |
case 'n': | |
return Number(value); | |
default: | |
return value; | |
} | |
} | |
GM_log = function(message) { | |
console.log(message); | |
} | |
GM_setValue = function(name, value) { | |
value = (typeof value)[0] + value; | |
localStorage.setItem(LOCAL_STORAGE4 + "." + name, value); | |
} | |
} | |
} | |
//faraway 4.発展チェッカーのソース(bro3_growth_checker.user.js)終了 | |
//================================================================================ | |
//5.統計グラフ化ツール | |
//================================================================================ | |
// | |
// 公開ページ: http://blog.livedoor.jp/froo/archives/51416669.html | |
// 使い方: 「統計」-「同盟」ページ検索欄横の各リンクをクリック | |
function disp_statistics() { //faraway | |
if(location.pathname != "/alliance/list.php") return; | |
//mixi鯖障害回避用: 広告iframe内で呼び出されたら無視 | |
var container = document.evaluate('//*[@id="container"]', | |
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
if (container.snapshotLength == 0) return; | |
initGMWrapper_5(); | |
var allysIndexTmp = GM_getValue(location.hostname + "_allys_index", ""); | |
if (allysIndexTmp != "") ALLYS_INDEX_5 = allysIndexTmp.split(DELIMIT_5); | |
getAllyData_5(); | |
addLinkHtml_5(); | |
} | |
//同盟ランキングデータ取得 | |
function getAllyData_5() { | |
var tableElems = document.evaluate( | |
'//*[@id="grayWrapper"]//table/tbody/tr', | |
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
//ランキング時刻を取得 | |
var time = getChildElement_5( | |
getChildElement_5(tableElems.snapshotItem(0), 2), 0).innerHTML; | |
time = time.replace(/^([0-9]{2}:[0-9]{2}).+$/, "$1"); | |
var now = new Date(); | |
var nowTime = padZero_5(now.getHours()) + ":" + padZero_5(now.getMinutes()); | |
//前日分かチェック | |
var tmpDate = now; | |
if (nowTime < time) { | |
tmpDate.setDate(now.getDate() - 1); | |
} | |
//日時に編集 | |
var datetime = tmpDate.getFullYear() + "/" + padZero_5(tmpDate.getMonth() + 1) + | |
"/" + padZero_5(tmpDate.getDate()) + " " + time; | |
//各同盟データ取得 | |
CURRENT_ALLYS_5 = new Array(); | |
for (var i = 2; i<tableElems.snapshotLength; i++) { | |
var item = tableElems.snapshotItem(i); | |
var appendData = new Array(); | |
appendData[IDX_DATETIME] = datetime; | |
//更新データ取得 | |
var name = getChildElement_5(getChildElement_5(item, 1), 0).innerHTML; //同盟略称 | |
appendData[IDX_POINT_5] = getChildElement_5(item, 2).innerHTML; //ポイント | |
appendData[IDX_RANK_5] = getChildElement_5(item, 0).innerHTML.replace(/→\s/, ""); //ランク | |
appendData[IDX_MEMBER] = getChildElement_5(item, 3).innerHTML; //メンバー | |
CURRENT_ALLYS_5.push(name); | |
//既存データを取得 | |
var data = loadAllyData_5(name); | |
//データ更新 | |
var upIdx = data.length; | |
if (data.length >= 1) { | |
var lastDatetime = data[data.length-1][0]; | |
if (datetime == lastDatetime) { | |
upIdx--; | |
} | |
} | |
data[upIdx] = appendData; | |
//Greasemonkey領域へ永続保存 | |
saveAllyData_5(name, data); | |
//検索用索引更新 | |
if (searchArrayItem_5(ALLYS_INDEX_5, name) < 0) { | |
ALLYS_INDEX_5.push(name); | |
} | |
} | |
//検索用索引をGreasemonkey領域へ永続保存 | |
saveAllysIndex_5(); | |
} | |
//ツールOpenリンク追加 | |
function addLinkHtml_5() { | |
var containerElem = document.getElementById("rankSearch"); | |
var addElem = document.createElement("span"); | |
containerElem.appendChild(addElem); | |
addElem.id = "toolLink"; | |
//aタグ(グラフ) | |
var linkGraph = document.createElement("a"); | |
linkGraph.id = "toolOpen"; | |
linkGraph.href = "javascript:void(0);"; | |
linkGraph.innerHTML = "グラフ表示"; | |
linkGraph.style.color = "white"; | |
linkGraph.style.backgroundColor = "black"; | |
linkGraph.style.padding = "3px 5px"; | |
linkGraph.style.margin = "2px 4px"; | |
linkGraph.addEventListener("click", function() {openTool();}, true); | |
addElem.appendChild(linkGraph); | |
//aタグ(CSV) | |
var linkCsv = document.createElement("a"); | |
linkCsv.id = "toolCsv"; | |
linkCsv.href = "javascript:void(0);"; | |
linkCsv.innerHTML = "CSV表示"; | |
linkCsv.style.color = "white"; | |
linkCsv.style.backgroundColor = "black"; | |
linkCsv.style.padding = "3px 5px"; | |
linkCsv.style.margin = "2px 4px"; | |
linkCsv.addEventListener("click", function() {outputCsv();}, true); | |
addElem.appendChild(linkCsv); | |
} | |
//ツールOpen | |
function openTool() { | |
//既存オブジェクト消去 | |
document.getElementById("grayWrapper").style.display = "none"; | |
//グラフオブジェクト表示 | |
if (TOOL_LOADED) { | |
document.getElementById("graphtool").style.display = "block"; | |
} else { | |
addToolHtml(document.getElementById("whiteWrapper")); | |
TOOL_LOADED = true; | |
} | |
} | |
//ツールHTML追加 | |
function addToolHtml(parentElem) { | |
//グラフオブジェクト追加 | |
var toolElem = document.createElement("div"); | |
parentElem.appendChild(toolElem); | |
toolElem.id = "graphtool"; | |
toolElem.style.margin = "8px 8px"; | |
//グラフ化対象同盟取得 | |
loadTargetAllys(); | |
//HTML追加 | |
addGraphHtml(toolElem); | |
addCtrlHtml(toolElem); | |
if (navigator.userAgent.toLowerCase().indexOf('chrome') < 0) { | |
initPopup_5(toolElem); | |
} | |
} | |
//グラフ部HTML追加 | |
function addGraphHtml(parentElem) { | |
var graphElem = document.createElement("div"); | |
parentElem.insertBefore(graphElem, document.getElementById("graphCtrl")); | |
graphElem.id = "graphMain"; | |
graphElem.style.position = "relative"; | |
var canvasHtml = "<canvas id='graphCanvas' " + | |
"width='" + (GRAPH_WIDTH + GRAPH_PADDING * 2) + | |
"' height='" + (GRAPH_HEIGHT + GRAPH_PADDING * 2) + "'></canvas>"; | |
graphElem.innerHTML = canvasHtml; | |
var canvas = document.getElementById("graphCanvas"); | |
canvas.style.backgroundColor = "gainsboro"; | |
var ctx = canvas.getContext("2d"); | |
//時間がかかるので別スレッド化(一旦描画して砂時計を表示させる) | |
setWaitCursor_5(); | |
window.setTimeout(function() { | |
//同盟データ取得 | |
var allysData = new Array(); | |
var maxDatetime = new Date("2000/1/1 00:00:00"); | |
var minDatetime = new Date("2099/12/31 23:59:59"); | |
var maxPoint = 0; | |
var minPoint = 0; | |
for (var i = 0; i < ALLYS_5.length; i++) { | |
if (ALLYS_5[i] == "") continue; | |
var srcData = loadAllyData_5(ALLYS_5[i]); | |
if (srcData.length == 0) continue; | |
allysData[i] = new Array(); | |
for (var j = 0; j < srcData.length; j++) { | |
allysData[i][j] = new Array(); | |
var datetime = new Date(srcData[j][IDX_DATETIME]); | |
var point = parseInt(srcData[j][IDX_POINT_5]); | |
if (isNaN(point)) point = 0; | |
//最大/最小値チェック | |
if (datetime.getTime() > maxDatetime.getTime()) maxDatetime = datetime; | |
if (datetime.getTime() < minDatetime.getTime()) minDatetime = datetime; | |
if (point > maxPoint) maxPoint = point; | |
allysData[i][j][IDX_DATETIME] = datetime; | |
allysData[i][j][IDX_POINT_5] = point; | |
} | |
} | |
//グラフ表示 | |
for (var i = allysData.length - 1; i >= 0; i--) { | |
if (allysData[i] == undefined) continue; | |
ctx.strokeStyle = ALLY_COLORS_5[i]; | |
ctx.beginPath(); | |
var isFirst = true; | |
for (var j = 0; j < allysData[i].length; j++) { | |
if (allysData[i][j] == undefined) continue; | |
var datetime = allysData[i][j][IDX_DATETIME]; | |
var point = allysData[i][j][IDX_POINT_5]; | |
var xRatio = 0; | |
if (maxDatetime.getTime() > minDatetime.getTime()) { | |
xRatio = (datetime.getTime() - minDatetime.getTime()) | |
/ (maxDatetime.getTime() - minDatetime.getTime()); | |
} | |
var yRatio = 0; | |
if (maxPoint > minPoint) { | |
yRatio = (point - minPoint) / (maxPoint - minPoint); | |
} | |
var xPos = Math.floor(GRAPH_WIDTH * xRatio) + GRAPH_PADDING; | |
var yPos = GRAPH_HEIGHT - Math.floor(GRAPH_HEIGHT * yRatio) + GRAPH_PADDING; | |
if (isFirst) ctx.moveTo(xPos, yPos); | |
else ctx.lineTo(xPos, yPos); | |
isFirst = false; | |
var mark = document.createElement("div"); | |
graphElem.appendChild(mark); | |
mark.style.position = "absolute"; | |
mark.style.border = "outset 1px " + ALLY_COLORS_5[i]; | |
mark.style.backgroundColor = ALLY_COLORS_5[i]; | |
mark.style.width = "6px"; | |
mark.style.height = "6px"; | |
mark.style.left = (xPos - 4) + "px"; | |
mark.style.top = (yPos - 4) + "px"; | |
//ポップアップ設定 | |
var popupText = ALLYS_5[i] + "<br/>" + generateDateString_5(datetime) + | |
"<br/> " + point + "ポイント"; | |
if (navigator.userAgent.toLowerCase().indexOf('chrome') >= 0) { | |
mark.title = popupText.replace(/<br\/>/g, "\n"); | |
} else { | |
mark.addEventListener("mouseover", createOnPopup(popupText), true); | |
mark.addEventListener("mouseout", function() {offPopup_5();}, true); | |
} | |
} | |
ctx.stroke(); | |
} | |
resetCursor_5(); | |
}, 0); | |
} | |
//操作部HTML追加 | |
function addCtrlHtml(parentElem) { | |
var addElem = document.createElement("div"); | |
parentElem.appendChild(addElem); | |
addElem.id = "graphCtrl"; | |
addElem.style.margin = "2px 2px"; | |
addElem.innerHTML = | |
"<table style='font-size:11px'>"+ | |
"<tr>"+ | |
"<td style='background-color:black; padding:5px 4px; text-align:center;'>"+ | |
"<a id='graphtoolClose' href='javascript:void(0);'>ランキング</a>"+ | |
"</td>"+ | |
"<td style='width:5px'></td>"+ | |
"<td id='fld_ally1' style='padding:2px 4px;'>"+ | |
"<input id='ally1' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td id='fld_ally2' style='padding:2px 4px;'>"+ | |
"<input id='ally2' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td id='fld_ally3' style='padding:2px 4px;'>"+ | |
"<input id='ally3' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td id='fld_ally4' style='padding:2px 4px;'>"+ | |
"<input id='ally4' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td id='fld_ally5' style='padding:2px 4px;'>"+ | |
"<input id='ally5' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td id='fld_ally6' style='padding:2px 4px;'>"+ | |
"<input id='ally6' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td id='fld_ally7' style='padding:2px 4px;'>"+ | |
"<input id='ally7' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td id='fld_ally8' style='padding:2px 4px;'>"+ | |
"<input id='ally8' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td id='fld_ally9' style='padding:2px 4px;'>"+ | |
"<input id='ally9' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td id='fld_ally10' style='padding:2px 4px;'>"+ | |
"<input id='ally10' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td style='background-color:black; padding:0px 4px; text-align:center;'>"+ | |
"<input id='graphtoolSave' type='button' value='保存' />"+ | |
"</td>"+ | |
"</tr>"+ | |
"<tr>"+ | |
"<td id='version' "+ | |
"style='font-size:9px; padding:2px 2px; text-align:center;'></td>"+ | |
"<td></td>"+ | |
"<td id='fld_ally11' style='padding:2px 4px;'>"+ | |
"<input id='ally11' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td id='fld_ally12' style='padding:2px 4px;'>"+ | |
"<input id='ally12' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td id='fld_ally13' style='padding:2px 4px;'>"+ | |
"<input id='ally13' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td id='fld_ally14' style='padding:2px 4px;'>"+ | |
"<input id='ally14' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td id='fld_ally15' style='padding:2px 4px;'>"+ | |
"<input id='ally15' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td id='fld_ally16' style='padding:2px 4px;'>"+ | |
"<input id='ally16' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td id='fld_ally17' style='padding:2px 4px;'>"+ | |
"<input id='ally17' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td id='fld_ally18' style='padding:2px 4px;'>"+ | |
"<input id='ally18' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td id='fld_ally19' style='padding:2px 4px;'>"+ | |
"<input id='ally19' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td id='fld_ally20' style='padding:2px 4px;'>"+ | |
"<input id='ally20' type='text' style='width:52px' />"+ | |
"</td>"+ | |
"<td style='background-color:black; padding:0px 4px; text-align:center;'>"+ | |
"<input id='graphtoolClear' type='button' value='消去' />"+ | |
"</td>"+ | |
"</tr>"+ | |
"</table>"; | |
//バージョン | |
document.getElementById("version").innerHTML = "Ver." + VERSION_5; | |
//着色 | |
for (var i = 0; i < ALLY_COLORS_5.length; i++) {document.getElementById("fld_ally" + (i+1)).style.backgroundColor = ALLY_COLORS_5[i];} | |
//同盟を表示 | |
for (var i = 0; i < ALLYS_5.length; i++) {document.getElementById("ally" + (i+1)).value = ALLYS_5[i];} | |
//イベントリスナー登録(保存ボタン) | |
document.getElementById('graphtoolSave').addEventListener("click", | |
function() { | |
//入力同盟名をGreasemonkey領域に保存 | |
for (var i = 0; i < ALLY_COLORS_5.length; i++) {ALLYS_5[i] = trim_5(document.getElementById("ally" + (i+1)).value);} | |
GM_setValue(location.hostname + "_allys", genDelimitString_5(ALLYS_5, DELIMIT_5)); | |
//グラフ再描画 | |
var toolElem = document.getElementById("graphtool"); | |
toolElem.removeChild(document.getElementById("graphMain")); | |
addGraphHtml(toolElem); | |
}, | |
true); | |
//イベントリスナー登録(消去ボタン) | |
document.getElementById('graphtoolClear').addEventListener("click",function() {clearAllys();}, true); | |
//イベントリスナー登録(閉じるリンク) | |
document.getElementById('graphtoolClose').addEventListener("click",function() {closeTool();}, true); | |
} | |
//説明ポップアップ初期化 | |
function initPopup_5(parentElem) { | |
//CSS | |
addGlobalStyle_5( | |
".popup{"+ | |
"position:absolute; left:0px; top:0px; visibility:hidden; "+ | |
"font-size:9pt; color:#0099FF; "+ | |
"background-color:#FFFFFF; layer-background-color:#FFFFFF; "+ | |
"border:1px solid #0099FF; padding:5; z-index:255;"+ | |
"}" | |
); | |
//HTMLタグ追加 | |
var popupElem = document.createElement('span');popupElem.id = "popup";popupElem.className = "popup";parentElem.appendChild(popupElem); | |
//イベントリスナー登録 | |
popupElem.addEventListener("mouseover", function() { this.style.visibility = "hidden" }, true); | |
} | |
//ポップアップOn関数作成 | |
function createOnPopup(text) {return function(e) {onPopup_5(text, e.pageX, e.pageY);}} | |
//ポップアップOn/Off | |
function onPopup_5(text, nX, nY) { | |
var sX = -10, sY = 24; | |
var msgElem = document.getElementById("popup"); | |
msgElem.innerHTML = text; | |
msgElem.style.visibility = "visible"; | |
msgElem.style.left = (nX + sX) + "px"; | |
msgElem.style.top = (nY + sY) + "px"; | |
} | |
function offPopup_5() {document.getElementById("popup").style.visibility = "hidden";} | |
//同盟入力消去 | |
function clearAllys() {for (var i = 0; i < ALLY_COLORS_5.length; i++) {document.getElementById("ally" + (i+1)).value = "";}} | |
//ツールを閉じる | |
function closeTool() {document.getElementById("grayWrapper").style.display = "block";document.getElementById("graphtool").style.display = "none";} | |
//同盟データ保存 | |
function saveAllyData_5(name, data) { | |
var saveData = new Array(); | |
for (var i = 0; i < data.length; i++) {saveData[i] = genDelimitString_5(data[i], DELIMIT2_5);} | |
GM_setValue(generateAllyKey_5(name), genDelimitString_5(saveData, DELIMIT_5)); | |
} | |
//同盟データ読み込み | |
function loadAllyData_5(ally) { | |
var ret = new Array(); | |
var src = GM_getValue(generateAllyKey_5(ally), ""); | |
var array1 = src.split(DELIMIT_5); | |
for (var i = 0; i < array1.length; i++) {if (array1[i] != "") {ret[i] = array1[i].split(DELIMIT2_5);}} | |
return ret; | |
} | |
//グラフ表示対象同盟を読み込み | |
function loadTargetAllys() { | |
ALLYS_5 = GM_getValue(location.hostname + "_allys", "").split(DELIMIT_5); | |
//指定同盟なしなら現ランキング表示の同盟をデフォルト設定 | |
for (var i = 0; i < ALLYS_5.length; i++) {if (ALLYS_5[i] != "") return;} | |
for (var i = 0; i < CURRENT_ALLYS_5.length; i++) {ALLYS_5[i] = CURRENT_ALLYS_5[i];} | |
} | |
//CSV出力 | |
function outputCsv() { | |
document.getElementById("grayWrapper").style.display = "none"; | |
var frameElem = document.createElement("iframe"); | |
frameElem.id = "toolCsvFrame"; | |
frameElem.style.width = "100%"; | |
frameElem.style.height = "540px"; | |
var container = document.getElementById("whiteWrapper"); | |
container.appendChild(frameElem); | |
//時間がかかるので別スレッド化(一旦描画して砂時計を表示させる) | |
setWaitCursor_5(); | |
window.setTimeout(function() { | |
var frameDoc = document.getElementById("toolCsvFrame").contentDocument; | |
var addElem = frameDoc.createElement("pre"); | |
addElem.id = "toolCsv"; | |
addElem.style.fontSize = "12px"; | |
frameDoc.body.appendChild(addElem); | |
//タイトル行 | |
var csvText = ""; | |
csvText += "ALLIANCER,DATETIME,RANK,POINT,MEMBER\n"; | |
//データ行 | |
for (var i = 0; i < ALLYS_INDEX_5.length; i++) { | |
//保存データ取得 | |
var srcData = loadAllyData_5(ALLYS_INDEX_5[i]); | |
if (srcData.length == 0) continue; | |
for (var j = 0; j < srcData.length; j++) { | |
csvText += convCsvString_5(ALLYS_INDEX_5[i]); | |
csvText += ","; | |
csvText += srcData[j][IDX_DATETIME]; | |
csvText += ","; | |
csvText += srcData[j][IDX_RANK_5]; | |
csvText += ","; | |
csvText += srcData[j][IDX_POINT_5]; | |
csvText += ","; | |
csvText += srcData[j][IDX_MEMBER]; | |
csvText += "\n"; | |
} | |
} | |
addElem.innerHTML = csvText; | |
resetCursor_5(); | |
}, 0); | |
} | |
//同盟データキー生成 | |
function generateAllyKey_5(allyName) { | |
return location.hostname + "_ally5_" + escape(allyName);//faraway110602 保存名をユニークにする | |
} | |
//検索用索引保存 | |
function saveAllysIndex_5() {GM_setValue(location.hostname + "_allys_index", genDelimitString_5(ALLYS_INDEX_5, DELIMIT_5));} | |
//子Element取得 | |
function getChildElement_5(parentNode, position) { | |
var current = 0; | |
for (var i = 0; i < parentNode.childNodes.length; i++){ | |
var childNode = parentNode.childNodes[i]; | |
if (childNode.nodeType == 1) { | |
if (current == position) {return childNode;} | |
current++; | |
} | |
} | |
return undefined; | |
} | |
//カーソル変更 | |
function setWaitCursor_5() {document.getElementsByTagName("body")[0].style.cursor = "wait";} | |
function resetCursor_5() {document.getElementsByTagName("body")[0].style.cursor = "auto";} | |
//CSS追加 | |
function addGlobalStyle_5(css) { | |
var head, style; | |
head = document.getElementsByTagName("head")[0]; | |
if (!head) { return; } style = document.createElement("style"); | |
style.type = "text/css"; | |
style.innerHTML = css; | |
head.appendChild(style); | |
} | |
//日時文字列編集(mm/dd hh:mm) | |
function generateDateString_5(date) { | |
var res = "" + padZero_5(date.getMonth() + 1) + "/" + padZero_5(date.getDate()) + | |
" " + padZero_5(date.getHours()) + ":" + padZero_5(date.getMinutes()); | |
return res; | |
} | |
//先頭ゼロ付加 | |
function padZero_5(num) { | |
var result; | |
if (num < 10) { | |
result = "0" + num; | |
} else { | |
result = "" + num; | |
} | |
return result; | |
} | |
//空白除去 | |
function trim_5(str) { return str.replace(/^[ \t\r\n]+|[ \t\r\n]+$/g, "");} | |
//CSV用文字列変換 | |
function convCsvString_5(str) { | |
var result; | |
//「"」を「""」に変換 | |
result = str.replace(/\"/g, "\"\""); | |
//「,」を含む場合は全体を「"」で囲む | |
if (result.indexOf(",") >= 0) { result = "\"" + result + "\"";} | |
return result; | |
} | |
//デリミタ区切り文字列生成 | |
function genDelimitString_5(dataArray, delimiter) { | |
var ret = ""; | |
for (var i=0; i < dataArray.length; i++) { | |
if (dataArray[i] != undefined) ret += dataArray[i]; | |
if (i < dataArray.length-1) ret += delimiter; | |
} | |
return ret; | |
} | |
//配列検索 | |
function searchArrayItem_5(array, key) { | |
for (var i=0; i<array.length; i++) {if (array[i] == key) {return i;}} | |
return -1; | |
} | |
//Google Chrome用GM_*系ラッパー関数 | |
function initGMWrapper_5() { | |
// @copyright 2009, James Campos | |
// @license cc-by-3.0; http://creativecommons.org/licenses/by/3.0/ | |
if ((typeof GM_getValue == 'undefined') || (GM_getValue('a', 'b') == undefined)) { | |
GM_addStyle = function(css) { | |
var style = document.createElement('style'); | |
style.textContent = css; | |
document.getElementsByTagName('head')[0].appendChild(style); | |
} | |
GM_deleteValue = function(name) {localStorage.removeItem(LOCAL_STORAGE_5 + "." + name);} | |
GM_getValue = function(name, defaultValue) { | |
var value = localStorage.getItem(LOCAL_STORAGE_5 + "." + name); | |
if (!value) return defaultValue; | |
var type = value[0]; | |
value = value.substring(1); | |
switch (type) { | |
case 'b': | |
return value == 'true'; | |
case 'n': | |
return Number(value); | |
default: | |
return value; | |
} | |
} | |
GM_log = function(message) {console.log(message);} | |
GM_setValue = function(name, value) {value = (typeof value)[0] + value;localStorage.setItem(LOCAL_STORAGE_5 + "." + name, value);} | |
} | |
} | |
//faraway 5.統計グラフ化ツールのソース(bro3_graph.user.js)終了 | |
//------------------------------------------- | |
// 同盟ログツール | |
//------------------------------------------- | |
// | |
// 公開ページ: http://blog.livedoor.jp/froo/archives/51450661.html | |
// 使い方: 同盟ログ詳細(/alliance/detail.php)下部にツールリンク | |
// 同盟ログ一覧(/alliance/alliance_log.php)に未読マーク | |
// 報告書詳細(/report/detail.php)下部に戦力計算表示 | |
// 拠点詳細(/village.php)・領地詳細(/land.php)に関連最新ログリンク | |
function disp_alliancelog() { | |
//mixi鯖障害回避用: 広告iframe内で呼び出されたら無視 | |
var container = document.evaluate('//*[@id="container"]',document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
if (container.snapshotLength == 0) return; | |
initGMWrapper_6(); | |
if (location.pathname == "/alliance/detail.php") { | |
//ログデータ取得 | |
LOG_DATA[IDX_SUBJECT] = getSubject(); | |
LOG_DATA[IDX_DATE] = getLogDate(); | |
LOG_DATA[IDX_ACTOR] = getActor(); | |
LOG_DATA[IDX_SOLDIER_COUNT] = getSoldier(); | |
//HTML追加 | |
if (LOG_DATA[IDX_ACTOR].length > 0) {appendHeaderHtml();appendLinksHtml();} | |
//保存 | |
saveLogData(LOG_ID, LOG_DATA); | |
} else if (location.pathname == "/report/detail.php") { | |
$tmp=$x_7('//div[@id="gray02Wrapper"]/table[@class="tables"]//tr[2]/td[1]').innerHTML; | |
if(($tmp.indexOf("ブショーデュエルで"))>0) return; //デュエルの結果ならおしまい。 | |
if(($tmp.indexOf("【拠点消滅】"))>0) return; //拠点消滅ならおしまい。 | |
if(($tmp.indexOf("【砦占領】"))>0) return; //砦占領ならおしまい。 | |
if(($tmp.indexOf("へ援軍が到着しました"))>0) return; //援軍ならおしまい。 | |
if(($tmp.indexOf("盟主に任命されました"))>0) return; | |
if(($tmp.indexOf("盟主補佐に任命されました"))>0) return; | |
if(($tmp.indexOf("軍師に任命されました"))>0) return; | |
if(($tmp.indexOf("大督に任命されました"))>0) return; | |
if(($tmp.indexOf("盟主に解任されました"))>0) return; | |
if(($tmp.indexOf("盟主補佐を解任されました"))>0) return; | |
if(($tmp.indexOf("盟主軍師を解任されました"))>0) return; | |
if(($tmp.indexOf("外交官を解任されました"))>0) return; | |
if(($tmp.indexOf("大督を解任されました"))>0) return; | |
if($tmp.match(/【勢力情報】.*が.*の城を破壊しました/)) return; | |
appendHeaderHtml(); | |
appendSoldierCountHtml(getSoldier()); | |
} | |
} | |
//件名取得 | |
function getSubject() { | |
var elem = document.evaluate('//*[@id="gray02Wrapper"]/table[1]/tbody/tr[2]/td',document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
return trim_6(elem.snapshotItem(0).innerHTML); | |
} | |
//ログ時刻取得 | |
function getLogDate() { | |
var elem = document.evaluate('//*[@id="gray02Wrapper"]/table[@class="tables"]/tbody/tr/td[@class="sendingDate"]',document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
return trim_6(elem.snapshotItem(0).innerHTML); | |
} | |
//攻撃者・防御者の取得 | |
function getActor() { | |
var result = new Array(); | |
var links = new Array(); | |
var tables = document.evaluate('//*[@id="gray02Wrapper"]/table[@class="tables"]',document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
for (var i = 0; i < tables.snapshotLength; i++) { | |
var itemTable = tables.snapshotItem(i); | |
if (links[0] == undefined && itemTable.summary == "攻撃者") { | |
links[0] = document.evaluate('./tbody/tr/th[@class="attackerBase"]/a',itemTable, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
} else if (links[1] == undefined && itemTable.summary == "防御者") { | |
links[1] = document.evaluate('./tbody/tr/th[@class="defenserBase"]/a',itemTable, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
} | |
} | |
for (var i = 0; i < 2; i++) { | |
result[i] = new Array(); | |
result[i][IDX2_ALLY_ID] = ""; | |
result[i][IDX2_ALLY_NAME] = ""; | |
result[i][IDX2_USER_ID] = ""; | |
result[i][IDX2_USER_NAME] = ""; | |
result[i][IDX2_VILLAGE_ID] = ""; | |
result[i][IDX2_VILLAGE_NAME] = ""; | |
if (links[i] == undefined) { | |
//何もしない | |
} else if (links[i].snapshotLength == 1) { | |
result[i][IDX2_VILLAGE_ID] = getParameter2_6(links[i].snapshotItem(0).href, "village_id"); | |
result[i][IDX2_VILLAGE_NAME] = trim_6(links[i].snapshotItem(0).innerHTML); | |
} else if (links[i].snapshotLength >= 3) { | |
result[i][IDX2_ALLY_ID] = getParameter2_6(links[i].snapshotItem(0).href, "id"); | |
result[i][IDX2_ALLY_NAME] = trim_6(links[i].snapshotItem(0).innerHTML); | |
result[i][IDX2_USER_ID] = getParameter2_6(links[i].snapshotItem(1).href, "user_id"); | |
result[i][IDX2_USER_NAME] = trim_6(links[i].snapshotItem(1).innerHTML); | |
result[i][IDX2_VILLAGE_ID] = getParameter2_6(links[i].snapshotItem(2).href, "village_id"); | |
result[i][IDX2_VILLAGE_NAME] = trim_6(links[i].snapshotItem(2).innerHTML); | |
} | |
//防御者情報がない場合は件名欄から取得 | |
if (i == 1 && result[i][IDX2_VILLAGE_ID] == "") { | |
var subject = getSubject(); | |
if (subject.match(/【不可侵条約】/)) continue; | |
if (subject.match(/【同盟変更】/)) continue; | |
if (subject.match(/【脱退】/)) continue; | |
if (subject.match(/【同盟追放】/)) continue; | |
var titleElem = document.evaluate( | |
'//*[@id="gray02Wrapper"]/table[1]/tbody/tr[2]/td/a', | |
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
if (titleElem.snapshotLength >= 2) { | |
var allyIdx; | |
var villageIdx; | |
var attacker = getParameter2_6(titleElem.snapshotItem(1).href, "village_id"); | |
var swap = (i == 0) ? 1 : 0; | |
if (result[swap][IDX2_VILLAGE_ID] == attacker) { | |
if (titleElem.snapshotLength == 3) { | |
villageIdx = 2; | |
} else { | |
allyIdx = 2; | |
villageIdx = 3; | |
} | |
} else { | |
allyIdx = 0; | |
villageIdx = 1; | |
} | |
if (allyIdx == undefined) { | |
result[i][IDX2_ALLY_ID] = ""; | |
result[i][IDX2_ALLY_NAME] = ""; | |
} else { | |
result[i][IDX2_ALLY_ID] = | |
getParameter2_6(titleElem.snapshotItem(allyIdx).href, "id"); | |
result[i][IDX2_ALLY_NAME] = | |
trim_6(titleElem.snapshotItem(allyIdx).innerHTML); | |
} | |
result[i][IDX2_USER_ID] = ""; | |
result[i][IDX2_USER_NAME] = ""; | |
result[i][IDX2_VILLAGE_ID] = | |
getParameter2_6(titleElem.snapshotItem(villageIdx).href, "village_id"); | |
result[i][IDX2_VILLAGE_NAME] = | |
trim_6(titleElem.snapshotItem(villageIdx).innerHTML); | |
} | |
} | |
} | |
return result; | |
} | |
//兵士取得 | |
function getSoldier() { | |
var result = new Array(); | |
var attackerData = new Array(); | |
var defenderData = new Array(); | |
var tables = document.evaluate('//*[@id="gray02Wrapper"]/table[@class="tables"]', | |
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
for (var i = 0; i < tables.snapshotLength; i++) { | |
var itemTable = tables.snapshotItem(i); | |
if (itemTable.summary == "攻撃者") { | |
attackerData = addSoldierCount(attackerData, getSoldierCount(itemTable)); | |
} else if (itemTable.summary == "防御者") { | |
defenderData = addSoldierCount(defenderData, getSoldierCount(itemTable)); | |
} | |
} | |
if (attackerData.length > 0 || defenderData.length > 0) { | |
result.push(attackerData); | |
result.push(defenderData); | |
} | |
return result; | |
} | |
//ツールHTML初期化 | |
function resetToolHtml() { | |
//本体部div | |
var toolBody = document.getElementById("toolBody"); | |
if (toolBody) { | |
var container = document.evaluate('//*[@id="gray02Wrapper"]',document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0); | |
container.removeChild(toolBody); | |
} | |
//リンク背景色 | |
var linkIds = new Array("calcLink", "attackerLink", "defenderLink"); | |
for (var i = 0; i < linkIds.length; i++) { | |
var elem = document.getElementById(linkIds[i]); | |
elem.style.backgroundColor = "white"; | |
} | |
} | |
//ツール名&バージョン表示HTML追加 | |
function appendHeaderHtml() { | |
var container = document.evaluate('//*[@id="gray02Wrapper"]',document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0); | |
var titleElem = document.createElement("div"); | |
container.appendChild(titleElem); | |
titleElem.innerHTML = "<br/>ログツール " + "<font size='-2'>Ver." + VERSION_6 + "<font>"; | |
} | |
//リンク部HTML追加 | |
function appendLinksHtml() { | |
var container = document.evaluate('//*[@id="gray02Wrapper"]',document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0); | |
var linkContainer = document.createElement("div"); | |
container.appendChild(linkContainer); | |
var calcLink = document.createElement("a"); | |
var attackerLink = document.createElement("a"); | |
var defenderLink = document.createElement("a"); | |
linkContainer.appendChild(calcLink); | |
linkContainer.appendChild(attackerLink); | |
linkContainer.appendChild(defenderLink); | |
calcLink.id = "calcLink"; | |
calcLink.innerHTML = "戦力計算"; | |
calcLink.style.margin = "4px"; | |
calcLink.style.padding = "2px"; | |
calcLink.href = "javascript:void(0)"; | |
calcLink.addEventListener("click", function() {dispSoldierCount()}, true); | |
attackerLink.id = "attackerLink"; | |
attackerLink.innerHTML = "攻撃者関連ログ"; | |
attackerLink.style.margin = "4px"; | |
attackerLink.style.padding = "2px"; | |
attackerLink.href = "javascript:void(0)"; | |
attackerLink.addEventListener("click", function() {dispHistory(0)}, true); | |
defenderLink.id = "defenderLink"; | |
defenderLink.innerHTML = "防御者関連ログ"; | |
defenderLink.style.margin = "4px"; | |
defenderLink.style.padding = "2px"; | |
defenderLink.href = "javascript:void(0)"; | |
defenderLink.addEventListener("click", function() {dispHistory(1)}, true); | |
} | |
//戦力計算表示 | |
function dispSoldierCount() { | |
resetToolHtml(); | |
var calkLink = document.getElementById("calcLink"); | |
calkLink.style.backgroundColor = "yellow"; | |
appendSoldierCountHtml(LOG_DATA[IDX_SOLDIER_COUNT]); | |
} | |
//関連ログ表示 | |
//actorIdx: 0=攻撃者 1=防御者 | |
function dispHistory(actorIdx) { | |
resetToolHtml(); | |
var linkIds = new Array("attackerLink", "defenderLink"); | |
var link = document.getElementById(linkIds[actorIdx]); | |
link.style.backgroundColor = "yellow"; | |
appendHistoryHtml(actorIdx); | |
} | |
//兵士数表示HTML追加 | |
function appendSoldierCountHtml(soldierCount) { | |
var container = document.evaluate('//*[@id="gray02Wrapper"]',document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0); | |
var toolBody = document.createElement("div"); | |
toolBody.id = "toolBody"; | |
container.appendChild(toolBody); | |
//table追加 | |
appendRestTable(toolBody, soldierCount[0], soldierCount[1]); | |
appendLossTable(toolBody, soldierCount[0], soldierCount[1]); | |
} | |
//関連ログ表示HTML追加 | |
function appendHistoryHtml(actorIdx) { | |
var container = document.evaluate('//*[@id="gray02Wrapper"]',document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0); | |
var toolBody = document.createElement("div"); | |
toolBody.id = "toolBody"; | |
container.appendChild(toolBody); | |
//table追加 | |
var table = document.createElement("table"); | |
toolBody.appendChild(table); | |
table.style.fontSize = "11px"; | |
table.style.margin = "3px"; | |
//タイトル行 | |
var titleRow = document.createElement("tr"); | |
titleRow.style.backgroundColor = "lawngreen"; | |
table.appendChild(titleRow); | |
var titleTexts = new Array("件名", "時刻", "攻撃戦力", "防御戦力"); | |
for (var i = 0; i < titleTexts.length; i++) { | |
var titleField = document.createElement("th"); | |
titleRow.appendChild(titleField); | |
titleField.style.border = "solid 1px black"; | |
titleField.style.padding = "3px"; | |
titleField.innerHTML = titleTexts[i]; | |
} | |
var logs = new Array(); | |
if (LOG_DATA[IDX_ACTOR][actorIdx] != undefined) { | |
var villageId = LOG_DATA[IDX_ACTOR][actorIdx][IDX2_VILLAGE_ID]; | |
logs = loadLogIndex(villageId); | |
logs.sort().reverse(); | |
} | |
//データ行 | |
for (var i = 0; i < logs.length; i++) { | |
var dataRow = document.createElement("tr"); | |
table.appendChild(dataRow); | |
if (logs[i] == LOG_ID) {dataRow.style.backgroundColor = "yellow";} | |
var logData = loadLogData(logs[i]); | |
if (logData.length == 0) continue; | |
//件名 | |
var subject = "<a href='/alliance/detail.php?id=" + logs[i] + | |
"&p=" + getParameter_6("p") + "'>" + | |
logData[IDX_SUBJECT].replace(/<[^>]+>/g, "") + "</a>"; | |
//戦力 | |
var soldierTotal = new Array(); | |
for (var j = 0; j < 2; j++) { | |
if (logData[IDX_SOLDIER_COUNT][j] == undefined) { | |
soldierTotal[j] = "-"; | |
} else { | |
soldierTotal[j] = convDispNum(totalSoldiers(logData[IDX_SOLDIER_COUNT][j][0])); | |
var lossSoldier = totalSoldiers(logData[IDX_SOLDIER_COUNT][j][1]); | |
if (lossSoldier != 0 && !isNaN(lossSoldier)) {soldierTotal[j] += "(" + convDispNum(-lossSoldier) + ")";} | |
} | |
if (villageId == logData[IDX_ACTOR][j][IDX2_VILLAGE_ID]) {soldierTotal[j] = "<font color='red'><b>" + soldierTotal[j] + "</b></font>";} | |
} | |
var dataTexts = new Array(subject, logData[IDX_DATE], soldierTotal[0], soldierTotal[1]); | |
for (var j = 0; j < dataTexts.length; j++) { | |
var field = document.createElement("td"); | |
field.style.border = "solid 1px black"; | |
field.style.padding = "3px"; | |
dataRow.appendChild(field); | |
field.innerHTML = dataTexts[j]; | |
} | |
} | |
} | |
//兵士数加算 | |
function addSoldierCount(total, add) { | |
if (total == undefined) total = new Array(); | |
for (var i = 0; i < 2; i++) { | |
if (total[i] == undefined) {total[i] = new Array(0,0,0,0,0,0,0,0,0,0,0);} | |
for (var j = 0; j < 11; j++) {total[i][j] += add[i][j];} | |
} | |
return total; | |
} | |
//兵士数取得 | |
function getSoldierCount(table) { | |
var result = new Array(); | |
var rows = document.evaluate('./tbody/tr', | |
table, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
for (var i = 0; i < rows.snapshotLength; i++) { | |
var row = rows.snapshotItem(i); | |
var fields = document.evaluate('./td',row, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
if (fields.snapshotLength != 12) continue; | |
var temp = new Array(); | |
for (var j = 0; j < fields.snapshotLength; j++) { | |
var field = fields.snapshotItem(j); | |
temp[j] = parseInt(trim_6(field.innerHTML)); | |
} | |
result.push(temp); | |
} | |
return result; | |
} | |
//残兵士table追加 | |
function appendRestTable(container, atData, dfData) { | |
var table = document.createElement("table"); | |
container.appendChild(table); | |
table.id = "restSoldier"; | |
table.className = "tables"; | |
table.innerHTML = | |
'<tr>'+ | |
'<th class="attacker" style="background-color:lawngreen;">残兵士合計</th>'+ | |
'<th class="attackerBase" style="background-color:lawngreen;" colspan="13"></th>'+ | |
'</tr>'+ | |
'<tr>'+ | |
'<th class="blank"> </th>'+ | |
'<th class="solClass">剣兵</th>'+ | |
'<th class="solClass">槍兵</th>'+ | |
'<th class="solClass">弓兵</th>'+ | |
'<th class="solClass">騎兵</th>'+ | |
'<th class="solClass">矛槍兵</th>'+ | |
'<th class="solClass">弩兵</th>'+ | |
'<th class="solClass">近衛騎兵</th>'+ | |
'<th class="solClass">斥候</th>'+ | |
'<th class="solClass">斥候騎兵</th>'+ | |
'<th class="solClass">衝車</th>'+ | |
'<th class="solClass">投石機</th>'+ | |
'<th class="solClass">合計</th>'+ | |
'</tr>'+ | |
'<tr>'+ | |
'<th class="blank">攻撃者</th>'+ | |
'<td id="restAttacker0"></td>'+ | |
'<td id="restAttacker1"></td>'+ | |
'<td id="restAttacker2"></td>'+ | |
'<td id="restAttacker3"></td>'+ | |
'<td id="restAttacker4"></td>'+ | |
'<td id="restAttacker5"></td>'+ | |
'<td id="restAttacker6"></td>'+ | |
'<td id="restAttacker7"></td>'+ | |
'<td id="restAttacker8"></td>'+ | |
'<td id="restAttacker9"></td>'+ | |
'<td id="restAttacker10"></td>'+ | |
'<td id="restAttackerTotal"></td>'+ | |
'</tr>'+ | |
'<tr>'+ | |
'<th class="blank">防御者</th>'+ | |
'<td id="restDefender0"></td>'+ | |
'<td id="restDefender1"></td>'+ | |
'<td id="restDefender2"></td>'+ | |
'<td id="restDefender3"></td>'+ | |
'<td id="restDefender4"></td>'+ | |
'<td id="restDefender5"></td>'+ | |
'<td id="restDefender6"></td>'+ | |
'<td id="restDefender7"></td>'+ | |
'<td id="restDefender8"></td>'+ | |
'<td id="restDefender9"></td>'+ | |
'<td id="restDefender10"></td>'+ | |
'<td id="restDefenderTotal"></td>'+ | |
'</tr>'; | |
//各項目設定 | |
var rowKey = new Array("restAttacker", "restDefender"); | |
var allData = new Array(atData, dfData); | |
for (var i = 0; i < rowKey.length; i++) { | |
if (allData[i] == undefined) break; | |
var restArray = new Array(); | |
for (var col = 0; col < 11; col++) { | |
if (allData[i][0] == undefined || allData[i][1] == undefined) { | |
restArray[col] = NaN; | |
} else { | |
restArray[col] = allData[i][0][col] - allData[i][1][col]; | |
} | |
var field = document.getElementById(rowKey[i] + col); | |
field.innerHTML = convDispNum(restArray[col]); | |
} | |
var totalField = document.getElementById(rowKey[i] + "Total"); | |
totalField.innerHTML = convDispNum(totalSoldiers(restArray)); | |
} | |
} | |
//死傷者table追加 | |
function appendLossTable(container, atData, dfData) { | |
var table = document.createElement("table"); | |
container.appendChild(table); | |
table.id = "lossSoldier"; | |
table.className = "tables"; | |
table.innerHTML = | |
'<tr>'+ | |
'<th class="attacker" style="background-color:lawngreen;">死傷者合計</th>'+ | |
'<th class="attackerBase" style="background-color:lawngreen;" colspan="13"></th>'+ | |
'</tr>'+ | |
'<tr>'+ | |
'<th class="blank"> </th>'+ | |
'<th class="solClass">剣兵</th>'+ | |
'<th class="solClass">槍兵</th>'+ | |
'<th class="solClass">弓兵</th>'+ | |
'<th class="solClass">騎兵</th>'+ | |
'<th class="solClass">矛槍兵</th>'+ | |
'<th class="solClass">弩兵</th>'+ | |
'<th class="solClass">近衛騎兵</th>'+ | |
'<th class="solClass">斥候</th>'+ | |
'<th class="solClass">斥候騎兵</th>'+ | |
'<th class="solClass">衝車</th>'+ | |
'<th class="solClass">投石機</th>'+ | |
'<th class="solClass">合計</th>'+ | |
'</tr>'+ | |
'<tr>'+ | |
'<th class="blank">攻撃者</th>'+ | |
'<td id="lossAttacker0"></td>'+ | |
'<td id="lossAttacker1"></td>'+ | |
'<td id="lossAttacker2"></td>'+ | |
'<td id="lossAttacker3"></td>'+ | |
'<td id="lossAttacker4"></td>'+ | |
'<td id="lossAttacker5"></td>'+ | |
'<td id="lossAttacker6"></td>'+ | |
'<td id="lossAttacker7"></td>'+ | |
'<td id="lossAttacker8"></td>'+ | |
'<td id="lossAttacker9"></td>'+ | |
'<td id="lossAttacker10"></td>'+ | |
'<td id="lossAttackerTotal"></td>'+ | |
'</tr>'+ | |
'<tr>'+ | |
'<th class="blank">防御者</th>'+ | |
'<td id="lossDefender0"></td>'+ | |
'<td id="lossDefender1"></td>'+ | |
'<td id="lossDefender2"></td>'+ | |
'<td id="lossDefender3"></td>'+ | |
'<td id="lossDefender4"></td>'+ | |
'<td id="lossDefender5"></td>'+ | |
'<td id="lossDefender6"></td>'+ | |
'<td id="lossDefender7"></td>'+ | |
'<td id="lossDefender8"></td>'+ | |
'<td id="lossDefender9"></td>'+ | |
'<td id="lossDefender10"></td>'+ | |
'<td id="lossDefenderTotal"></td>'+ | |
'</tr>'; | |
//各項目設定 | |
var rowKey = new Array("lossAttacker", "lossDefender"); | |
var allData = new Array(atData, dfData); | |
for (var i = 0; i < rowKey.length; i++) { | |
if (allData[i] == undefined) break; | |
var lossArray; | |
if (allData[i][1] == undefined) { | |
lossArray = new Array(); | |
} else { | |
lossArray = allData[i][1]; | |
} | |
for (var col = 0; col < 11; col++) { | |
var field = document.getElementById(rowKey[i] + col); | |
field.innerHTML = convDispNum(lossArray[col]); | |
} | |
var totalField = document.getElementById(rowKey[i] + "Total"); | |
totalField.innerHTML = convDispNum(totalSoldiers(lossArray)); | |
} | |
} | |
//兵士合計(ポイント換算) | |
function totalSoldiers(soldiers) { | |
if (soldiers == undefined || soldiers.length == 0) return NaN; | |
var result = 0; | |
//剣兵 | |
result += soldiers[0]; | |
//下級兵 | |
for (var i = 1; i <= 3; i++) {result += soldiers[i] * 2;} | |
//上級兵 | |
for (var i = 4; i <= 6; i++) {result += soldiers[i] * 4;} | |
//斥候 | |
result += soldiers[7]; | |
result += soldiers[8] * 2; | |
//攻城兵器 | |
result += soldiers[9] * 2; | |
result += soldiers[10] * 4; | |
return result; | |
} | |
//ログデータ永続保存 | |
function saveLogData(logId, logData) { | |
var logDataStr = new Array(); | |
logDataStr[IDX_SUBJECT] = logData[IDX_SUBJECT]; //件名 | |
logDataStr[IDX_DATE] = logData[IDX_DATE]; //ログ時刻 | |
//攻撃者・防御者 | |
logDataStr[IDX_ACTOR] = new Array(); | |
if (logData[IDX_ACTOR].length > 0) { | |
logDataStr[IDX_ACTOR][0] = | |
genDelimitString_6(logData[IDX_ACTOR][0], DELIMIT3_6); //攻撃者 | |
logDataStr[IDX_ACTOR][1] = | |
genDelimitString_6(logData[IDX_ACTOR][1], DELIMIT3_6); //防御者 | |
} | |
logDataStr[IDX_ACTOR] = | |
genDelimitString_6(logDataStr[IDX_ACTOR], DELIMIT2_6); | |
//兵士数 | |
logDataStr[IDX_SOLDIER_COUNT] = new Array(); | |
for (var i = 0; i < logData[IDX_SOLDIER_COUNT].length; i++) { | |
logDataStr[IDX_SOLDIER_COUNT][i] = new Array(); | |
if (logData[IDX_SOLDIER_COUNT][i] == undefined) continue; | |
for (var j = 0; j < logData[IDX_SOLDIER_COUNT][i].length; j++) { | |
logDataStr[IDX_SOLDIER_COUNT][i][j] = new Array(); | |
for (var k = 0; k < logData[IDX_SOLDIER_COUNT][i][j].length ; k++) { | |
logDataStr[IDX_SOLDIER_COUNT][i][j][k] = | |
convDispNum(logData[IDX_SOLDIER_COUNT][i][j][k]); | |
} | |
} | |
logDataStr[IDX_SOLDIER_COUNT][i] = | |
genDelimitString_6(logDataStr[IDX_SOLDIER_COUNT][i], DELIMIT3_6); | |
} | |
logDataStr[IDX_SOLDIER_COUNT] = | |
genDelimitString_6(logDataStr[IDX_SOLDIER_COUNT], DELIMIT2_6); | |
//ログデータ本体をGreasemonkey領域へ永続保存 | |
GM_setValue(generateLogKey(logId), genDelimitString_6(logDataStr, DELIMIT_6)) | |
//ログインデックスに追加 | |
addIndex(location.hostname + "_log_index", logId, ","); | |
//拠点インデックスに追加 | |
if (logData[IDX_ACTOR].length > 0) { | |
var nameUpdate = false; | |
var names = splitDelimited_6( | |
GM_getValue(location.hostname + "_village_name", ""), DELIMIT_6); | |
for (var i = 0; i < logData[IDX_ACTOR].length; i++) { | |
var actorId = logData[IDX_ACTOR][i][IDX2_VILLAGE_ID]; | |
var actorName = logData[IDX_ACTOR][i][IDX2_VILLAGE_NAME]; | |
//拠点ID-ログIDインデックスに追加 | |
addIndex(generateVillageKey(actorId), logId, ","); | |
//拠点ID-拠点名インデックスに追加 | |
if (actorName != "") { | |
var nameExists = false; | |
for (var j = 0; j < names.length; j++) { | |
var item = splitDelimited_6(names[j], DELIMIT2_6); | |
if (item[0] == actorId) { | |
if (item[1] == actorName) { | |
nameExists = true; | |
} | |
break; | |
} | |
} | |
if (!nameExists) { | |
nameUpdate = true; | |
names[j] = actorId + DELIMIT2_6 + actorName; | |
} | |
} | |
} | |
//拠点名-拠点IDインデックスをGreasemonkey領域へ永続保存 | |
if (nameUpdate) { | |
GM_setValue(location.hostname + "_village_name", genDelimitString_6(names, DELIMIT_6)); | |
} | |
} | |
} | |
//インデックス追加 | |
function addIndex(key, value, delimiter) { | |
var items = splitDelimited_6(GM_getValue(key, ""), delimiter); | |
if (items.indexOf(value) == -1) { | |
items.push(value); | |
//Greasemonkey領域へ永続保存 | |
GM_setValue(key, genDelimitString_6(items, delimiter)); | |
} | |
} | |
//ログデータ読み出し | |
function loadLogData(logId) { | |
var result = splitDelimited_6(GM_getValue(generateLogKey(logId), ""), DELIMIT_6); | |
if (result.length == 0) return result; | |
//攻撃者・防御者 | |
result[IDX_ACTOR] = splitDelimited_6(result[IDX_ACTOR], DELIMIT2_6); | |
for (var i = 0; i < result[IDX_ACTOR].length; i++) { | |
result[IDX_ACTOR][i] = splitDelimited_6(result[IDX_ACTOR][i], DELIMIT3_6); | |
} | |
//兵士数 | |
result[IDX_SOLDIER_COUNT] = splitDelimited_6(result[IDX_SOLDIER_COUNT], DELIMIT2_6); | |
for (var i = 0; i < result[IDX_SOLDIER_COUNT].length; i++) { | |
result[IDX_SOLDIER_COUNT][i] = | |
splitDelimited_6(result[IDX_SOLDIER_COUNT][i], DELIMIT3_6); | |
for (var j = 0; j < result[IDX_SOLDIER_COUNT][i].length; j++) { | |
result[IDX_SOLDIER_COUNT][i][j] = | |
splitDelimited_6(result[IDX_SOLDIER_COUNT][i][j], ","); | |
for (var k = 0; k < result[IDX_SOLDIER_COUNT][i][j].length; k++) { | |
result[IDX_SOLDIER_COUNT][i][j][k] = | |
parseInt(result[IDX_SOLDIER_COUNT][i][j][k]); | |
} | |
} | |
} | |
return result; | |
} | |
//未読チェック | |
function checkAlreadyRead() { | |
var logs = splitDelimited_6(GM_getValue(location.hostname + "_log_index", ""), ","); | |
var rowElems = document.evaluate( | |
'//*[@id="gray02Wrapper"]/div/div/table/tbody/tr/td[1]', | |
document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
for (var i = 0; i < rowElems.snapshotLength; i++) { | |
var field = rowElems.snapshotItem(i); | |
var link = document.evaluate('./a', field, null, | |
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0); | |
var id = getParameter2_6(link.href, "id"); | |
if (logs.indexOf(id) == -1) { | |
field.innerHTML += " [未]"; | |
} | |
} | |
} | |
//拠点に関係する最新ログへのリンクを追加 | |
function appendNewestLogLink() { | |
//拠点名を取得 | |
var baseNameElem = document.evaluate( | |
'//*[@id="basepoint"]/span[@class="basename"]', | |
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
var baseName = trim_6(baseNameElem.snapshotItem(0).innerHTML); | |
//拠点ID取得 | |
var villageId = ""; | |
var names = splitDelimited_6( | |
GM_getValue(location.hostname + "_village_name", ""), DELIMIT_6); | |
for (var j = 0; j < names.length; j++) { | |
var item = splitDelimited_6(names[j], DELIMIT2_6); | |
if (item[1] == baseName) { | |
villageId = item[0]; | |
break; | |
} | |
} | |
//最新ログのID取得 | |
var logId = ""; | |
var names = new Array(); | |
if (villageId != "") { | |
var logs = loadLogIndex(villageId); | |
if (logs.length > 0) { | |
logs.sort().reverse(); | |
logId = "" + logs[0]; | |
} | |
} | |
//リンクHTML追加 | |
if (logId != "") { | |
var statusElem = document.evaluate('//*[@id="basepoint"]/div[@class="status"]', | |
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0); | |
if(!statusElem){var statusElem = document.evaluate('//*[@id="basepoint"]/div[@class="status village-bottom"]', | |
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0); | |
} | |
var sepElem = document.createElement("span"); | |
statusElem.appendChild(sepElem); | |
sepElem.className = "sep"; | |
sepElem.style.margin = "4px"; | |
sepElem.innerHTML = "|"; | |
var linkElem = document.createElement("a"); | |
statusElem.appendChild(linkElem); | |
linkElem.href = "/alliance/detail.php?id=" + logId; | |
linkElem.style.margin = "4px"; | |
linkElem.innerHTML = "最新ログ"; | |
} | |
} | |
//ログインデックス取得 | |
function loadLogIndex(villageId) { | |
var logs = splitDelimited_6(GM_getValue(generateVillageKey(villageId), ""), ","); | |
for (var i = 0; i < logs.length; i++) logs[i] = parseInt(logs[i]); | |
return logs; | |
} | |
//ログデータキー生成 | |
function generateLogKey(logId) { | |
return location.hostname + "_log_" + logId; | |
} | |
//拠点データキー生成 | |
function generateVillageKey(villageId) { | |
return location.hostname + "_village_" + villageId; | |
} | |
//数値を表示用に変換 | |
function convDispNum(value) { | |
if (isNaN(value)) { | |
return "?"; | |
} else { | |
return "" + value; | |
} | |
} | |
//URLパラメータ取得 | |
function getParameter_6(key) { | |
return getParameter2_6(location.search, key); | |
} | |
//URLパラメータ取得 | |
function getParameter2_6(url, key) { | |
var str = url.replace(/#.*$/, "").split("?"); | |
if (str.length < 2) { | |
return ""; | |
} | |
var params = str[1].split("&"); | |
for (var i = 0; i < params.length; i++) { | |
var keyVal = params[i].split("="); | |
if (keyVal[0] == key && keyVal.length == 2) { | |
return decodeURIComponent(keyVal[1]); | |
} | |
} | |
return ""; | |
} | |
//デリミタ区切り文字列生成 | |
function genDelimitString_6(dataArray, delimiter) { | |
var ret = ""; | |
if (dataArray == undefined) return ret; | |
for (var i=0; i < dataArray.length; i++) { | |
if (dataArray[i] != undefined) ret += dataArray[i]; | |
if (i < dataArray.length-1) ret += delimiter; | |
} | |
return ret; | |
} | |
//デリミタ区切り文字列を配列に変換 | |
function splitDelimited_6(str, delimiter) { | |
if (str == undefined || str == "") { | |
return new Array(); | |
} else { | |
return str.split(delimiter); | |
} | |
} | |
//空白除去 | |
function trim_6(str) { | |
return str.replace(/^[ \t\r\n]+|[ \t\r\n]+$/g, ""); | |
} | |
//Google Chrome用GM_*系ラッパー関数 | |
function initGMWrapper_6() { | |
// @copyright 2009, James Campos | |
// @license cc-by-3.0; http://creativecommons.org/licenses/by/3.0/ | |
if ((typeof GM_getValue == 'undefined') || (GM_getValue('a', 'b') == undefined)) { | |
GM_addStyle = function(css) { | |
var style = document.createElement('style'); | |
style.textContent = css; | |
document.getElementsByTagName('head')[0].appendChild(style); | |
} | |
GM_deleteValue = function(name) { | |
localStorage.removeItem(LOCAL_STORAGE_6 + "." + name); | |
} | |
GM_getValue = function(name, defaultValue) { | |
var value = localStorage.getItem(LOCAL_STORAGE_6 + "." + name); | |
if (!value) | |
return defaultValue; | |
var type = value[0]; | |
value = value.substring(1); | |
switch (type) { | |
case 'b': | |
return value == 'true'; | |
case 'n': | |
return Number(value); | |
default: | |
return value; | |
} | |
} | |
GM_log = function(message) { | |
console.log(message); | |
} | |
GM_setValue = function(name, value) { | |
value = (typeof value)[0] + value; | |
try { | |
localStorage.setItem(LOCAL_STORAGE_6 + "." + name, value); | |
} catch (e) { | |
alert("localStorageへの保存に失敗 (" + e + ")"); | |
throw e; | |
} | |
} | |
} | |
} | |
//faraway 6.同盟ログツールのソース(bro3_log_tool.user.js)終了 | |
function bro3_atk_calc(){ | |
/*======================================================= | |
初期処理 | |
=========================================================*/ | |
//現在表示URL | |
NowUrl = URLGet(); | |
//デッキセット済みClass取得 | |
if (NowUrl == "busyobook_card.php") { | |
// return; | |
var deckSet_ctl = document.getElementsByClassName("busyo-card"); | |
} else if(NowUrl == "deck.php"){ | |
var deckSet_ctl = document.getElementsByClassName("cardColmn"); | |
} else{ | |
return; | |
} | |
//○枚目カウント用 | |
var cardcnt = 0; | |
//デッキセット済カウント用 | |
var deckcnt = 0; | |
var skil1 = new Array(); //スキル1効果 | |
var skil2 = new Array(); //スキル2効果 | |
var skil3 = new Array(); //スキル3効果 | |
var skilcnt1 = 0; | |
var skilcnt2 = 0; | |
var skilcnt3 = 0; | |
var card_type = new Array(); //兵科 | |
/*===================================== | |
* 変更前ステータス | |
*====================================*/ | |
var card_att = new Array(); //攻撃力 | |
var card_int = new Array(); //知力 | |
var card_wdef = new Array(); //歩防御 | |
var card_sdef = new Array(); //槍防御 | |
var card_bdef = new Array(); //弓防御 | |
var card_rdef = new Array(); //馬防御 | |
var card_speed = new Array(); //移動速度 | |
//カード裏情報取得用 | |
var deck_CBack = document.getElementsByClassName("card_back"); | |
/*======================================================= | |
表示関連 初期処理 | |
=========================================================*/ | |
//デッキセット済&カード表示用 | |
for (i = 0; i < deckSet_ctl.length; i++) { | |
html = SkilSet(i); | |
deckSet_ctl[i].innerHTML = html + deckSet_ctl[i].innerHTML; | |
var deckSkil = document.getElementById("deckSkil" + i); | |
deckSkil.addEventListener("change", function(){var e = this.className;SkilSelect(e);}, true); | |
var p_chk = document.getElementById("p_chk" + i); | |
p_chk.addEventListener("click", function(){var e = this.className;SkilSelect(e);}, true); | |
var kakinAtt = document.getElementById("kakinAtt" + i); | |
kakinAtt.addEventListener("click", function(){var e = this.className;SkilSelect(e);}, true); | |
var kakinDef = document.getElementById("kakinDef" + i); | |
kakinDef.addEventListener("click", function(){var e = this.className;SkilSelect(e);}, true); | |
cardcnt = cardcnt + 1; | |
deckcnt = i; | |
} | |
//カード表示以外の場合 | |
var sortflg = document.getElementsByClassName("sortTotal"); | |
if (sortflg[0].value != 1) { | |
var othercard = document.getElementsByClassName("statusDetail"); | |
var stscard = document.getElementsByClassName("statusDetail"); | |
var wk = document.getElementsByClassName("cardStatusDetail"); | |
//alert(wk[0].clientHeight); | |
if (cardcnt == 0) { | |
deckcnt = -1; | |
} | |
for (i = 0; i < othercard.length; i++) { | |
wk[i].style.marginBottom = "45px"; | |
html = SkilSet((i + deckcnt + 1)); | |
othercard[i].innerHTML = html + othercard[i].innerHTML; | |
var deckSkil = document.getElementById("deckSkil" + (i + deckcnt + 1)); | |
deckSkil.addEventListener("change", function(){var e = this.className;SkilSelect(e);}, true); | |
var p_chk = document.getElementById("p_chk" + (i + deckcnt + 1)); | |
p_chk.addEventListener("click", function(){var e = this.className;SkilSelect(e);}, true); | |
var kakinAtt = document.getElementById("kakinAtt" + (i + deckcnt + 1)); | |
kakinAtt.addEventListener("click", function(){var e = this.className;SkilSelect(e);}, true); | |
var kakinDef = document.getElementById("kakinDef" + (i + deckcnt + 1)); | |
kakinDef.addEventListener("click", function(){var e = this.className;SkilSelect(e);}, true); | |
cardcnt = cardcnt + 1; | |
} | |
} | |
/*------------+---------------------------------------------------------+ | |
* スキル取得&コンボボックス作成処理 | | |
*------------+---------------------------------------------------------*/ | |
function SkilSet(cnt) { | |
var passiveFlg1 = 0; //パッシブ有無フラグ | |
var passiveFlg2 = 0; //パッシブ有無フラグ | |
var passiveFlg3 = 0; //パッシブ有無フラグ | |
//スキル名(Lv込)取得 | |
if (deck_CBack[cnt].getElementsByClassName("skillName1 red").length > 0) { | |
passiveFlg1 = 1; | |
var wkskil1 = ""; | |
var wkskil1_1 = document.getElementsByClassName("skill1"); | |
skil1[cardcnt] = wkskil1_1[skilcnt1].innerHTML; | |
skilcnt1 = skilcnt1 + 1; | |
} else if (deck_CBack[cnt].getElementsByClassName("skillName1").length > 0) { | |
var wkskil1 = deck_CBack[cnt].getElementsByClassName("skillName1"); | |
var wkskil1_1 = document.getElementsByClassName("skill1"); | |
skil1[cardcnt] = wkskil1_1[skilcnt1].innerHTML; | |
skilcnt1 = skilcnt1 + 1; | |
} else { | |
var wkskil1 = ""; | |
skil1[cardcnt] = ""; | |
} | |
if (deck_CBack[cnt].getElementsByClassName("skillName2 red").length > 0) { | |
passiveFlg2 = 1; | |
var wkskil2 = ""; | |
var wkskil2_1 = document.getElementsByClassName("skill2"); | |
skil2[cardcnt] = wkskil2_1[skilcnt2].innerHTML; | |
skilcnt2 = skilcnt2 + 1; | |
} else if (deck_CBack[cnt].getElementsByClassName("skillName2").length > 0) { | |
var wkskil2 = deck_CBack[cnt].getElementsByClassName("skillName2"); | |
var wkskil2_1 = document.getElementsByClassName("skill2"); | |
skil2[cardcnt] = wkskil2_1[skilcnt2].innerHTML; | |
skilcnt2 = skilcnt2 + 1; | |
} else { | |
var wkskil2 = ""; | |
skil2[cardcnt] = ""; | |
} | |
if (deck_CBack[cnt].getElementsByClassName("skillName3 red").length > 0) { | |
passiveFlg3 = 1; | |
var wkskil3 = ""; | |
var wkskil3_1 = document.getElementsByClassName("skill3"); | |
skil3[cardcnt] = wkskil3_1[skilcnt3].innerHTML; | |
skilcnt3 = skilcnt3 + 1; | |
} else if (deck_CBack[cnt].getElementsByClassName("skillName3").length > 0) { | |
var wkskil3 = deck_CBack[cnt].getElementsByClassName("skillName3"); | |
var wkskil3_1 = document.getElementsByClassName("skill3"); | |
skil3[cardcnt] = wkskil3_1[skilcnt3].innerHTML; | |
skilcnt3 = skilcnt3 + 1; | |
} else { | |
var wkskil3 = ""; | |
skil3[cardcnt] = ""; | |
} | |
//兵科取得 | |
card_type[cardcnt] = document.getElementsByClassName("soltype")[cardcnt].getElementsByTagName("img")[0].alt; | |
/*===================================== | |
* 変更前ステータス取得 | |
*====================================*/ | |
card_att[cardcnt] = document.getElementsByClassName("status_att")[cardcnt].innerHTML; //攻撃力 | |
card_int[cardcnt] = document.getElementsByClassName("status_int")[cardcnt].innerHTML; //知力 | |
card_wdef[cardcnt] = document.getElementsByClassName("status_wdef")[cardcnt].innerHTML; //歩防御 | |
card_sdef[cardcnt] = document.getElementsByClassName("status_sdef")[cardcnt].innerHTML; //槍防御 | |
card_bdef[cardcnt] = document.getElementsByClassName("status_bdef")[cardcnt].innerHTML; //弓防御 | |
card_rdef[cardcnt] = document.getElementsByClassName("status_rdef")[cardcnt].innerHTML; //馬防御 | |
card_speed[cardcnt] = document.getElementsByClassName("status_speed")[cardcnt].innerHTML; //移動速度 | |
//コンボボックスにセット | |
var html = ""; | |
html += "<div style=\"height:30px;width:220px;display:table;display:table-cell;vertical-align:middle;margin:auto;\">\n"; | |
html += "<select name=\"deckSkil" + cnt + "\" style=\"width:200px;\" id=\"deckSkil" + cnt + "\" class=\"" + cnt + "\">\n"; | |
html += "<option value=\"0\">指定無し</option>\n"; | |
if (wkskil1 != "") { | |
html += "<option value=\"1\">" + wkskil1[0].innerHTML.substring(2) + "</option>\n"; | |
} | |
if (wkskil2 != "") { | |
html += "<option value=\"2\">" + wkskil2[0].innerHTML.substring(2) + "</option>\n"; | |
} | |
if (wkskil3 != "") { | |
html += "<option value=\"3\">" + wkskil3[0].innerHTML.substring(2) + "</option>\n"; | |
} | |
html += "</select><br />\n"; | |
if (passiveFlg1 == 0 && passiveFlg2 == 0 && passiveFlg3 == 0) { | |
html += "<input type=\"checkbox\" id=\"p_chk" + cnt + "\"disabled=\"disabled\" class=\"" + cnt + "\" />パッシブ \n"; | |
} else { | |
html += "<input type=\"checkbox\" id=\"p_chk" + cnt + "\" class=\"" + cnt + "\" />パッシブ \n"; | |
} | |
html += "<input type=\"checkbox\" id=\"kakinAtt" + cnt + "\" class=\"" + cnt + "\" />攻撃課金 <input type=\"checkbox\" id=\"kakinDef" + cnt + "\" class=\"" + cnt + "\" />防御課金\n"; | |
html += "</div>\n"; | |
return html; | |
} | |
/*------------+---------------------------------------------------------+ | |
* スキル選択後処理 | | |
*------------+---------------------------------------------------------*/ | |
function SkilSelect(l) { | |
var val = document.getElementById("deckSkil" + l).value; | |
var passiveFlg = document.getElementById("p_chk" + l).checked; | |
var kakinFlg = document.getElementById("kakinAtt" + l).checked; | |
var kakinFlg2 = document.getElementById("kakinDef" + l).checked; | |
var skil_res = ""; | |
if (val == 1) { | |
skil_res = skil1[l]; | |
} else if (val == 2) { | |
skil_res = skil2[l]; | |
} else if (val == 3) { | |
skil_res = skil3[l]; | |
} | |
//フラグが無ければステータスALLクリアし抜ける | |
if (skil_res == "" && passiveFlg == false && kakinFlg == false && kakinFlg2 == false) { | |
document.getElementsByClassName("status_att")[l].innerHTML = card_att[l]; //攻撃力 | |
document.getElementsByClassName("status_int")[l].innerHTML = card_int[l]; //知力 | |
document.getElementsByClassName("status_wdef")[l].innerHTML = card_wdef[l]; //歩防御 | |
document.getElementsByClassName("status_sdef")[l].innerHTML = card_sdef[l]; //槍防御 | |
document.getElementsByClassName("status_bdef")[l].innerHTML = card_bdef[l]; //弓防御 | |
document.getElementsByClassName("status_rdef")[l].innerHTML = card_rdef[l]; //馬防御 | |
document.getElementsByClassName("status_speed")[l].innerHTML = card_speed[l]; //移動速度 | |
//カード表示以外の場合 | |
if (deckcnt < l) { | |
var sts_atk1 = document.getElementsByClassName("statusParameter1"); | |
var sts_atk2 = sts_atk1[(l - deckcnt - 1)].getElementsByTagName("td"); | |
sts_atk2[1].innerHTML = card_att[l]; | |
sts_atk2[3].innerHTML = card_int[l]; | |
sts_atk2[5].innerHTML = card_wdef[l]; | |
sts_atk2[7].innerHTML = card_sdef[l]; | |
sts_atk2[9].innerHTML = card_bdef[l]; | |
sts_atk2[11].innerHTML = card_rdef[l]; | |
sts_atk2[13].innerHTML = card_speed[l]; | |
} | |
return; | |
} | |
/*===================================== | |
* 正規表現用セット | |
*====================================*/ | |
var re1 = /\d+(?:\.\d+)?[%%%]?/; //スキル効果(小数点含む) | |
var re2 = /\d+(?:\.\d+)?[%]?/; //スキル効果(小数点含む) | |
var re3 = /\d+(?:\.\d+)?/; //スキル効果(小数点含む) | |
/*===================================== | |
* 各上昇率用セット | |
*====================================*/ | |
var wk_att_skil = 0; | |
var wk_def_skil = 0; | |
var wk_spe_skil = 0; | |
var att_skilnum = 0; | |
var def_skilnum = 0; | |
var spd_skilnum = 0; | |
var atk_kakinFlg = 0; | |
var def_kakinFlg = 0; | |
var housan_Flg = 0; | |
if (passiveFlg == true) { | |
//パッシブ取得 | |
var p_skil = new Array(); | |
p_skil[0] = skil1[l]; | |
p_skil[1] = skil2[l]; | |
p_skil[2] = skil3[l]; | |
for (i = 0; i < 3; i++) { | |
var wkskil_res = p_skil[i]; | |
wk_att_skil = 0; | |
wk_def_skil = 0; | |
wk_spe_skil = 0; | |
wkcnt0 = wkskil_res.indexOf("自動"); | |
if (wkskil_res != "" && wkcnt0 > -1) { | |
//攻撃力用 | |
wkcnt0 = wkskil_res.indexOf(")の武将1枚につき"); | |
if (wkcnt0 > -1) { | |
wk_skil = wkskil_res.substring(wkcnt0 + 5); | |
wk_att_skil = String(wk_skil.match(re2)); | |
wk_att_skil = parseFloat(wk_att_skil.substring(0, (wk_att_skil.length - 1))) / 100; | |
} else { | |
wkcnt0 = wkskil_res.indexOf("攻撃力"); | |
if (wkcnt0 > -1) { | |
wkcnt1 = wkskil_res.indexOf("武将の攻撃力"); | |
if (wkcnt1 > -1) { | |
wkcnt2 = wkskil_res.indexOf("兵科"); | |
if (wkcnt2 > -1) { | |
wkcnt3 = wkskil_res.indexOf(card_type[l]); | |
if (wkcnt3 > -1) { | |
wk_skil = wkskil_res.substring(wkcnt3); | |
wk_att_skil = String(wk_skil.match(re1)); | |
wk_att_skil = parseFloat(wk_att_skil.substring(0, (wk_att_skil.length - 1))) / 100; | |
} | |
} else { | |
wk_skil = wkskil_res.substring(wkcnt1); | |
wk_att_skil = String(wk_skil.match(re1)); | |
wk_att_skil = parseFloat(wk_att_skil.substring(0, (wk_att_skil.length - 1))) / 100; | |
} | |
} else { | |
wkcnt2 = wkskil_res.indexOf("兵科"); | |
if (wkcnt2 > -1) { | |
} else { | |
wk_skil = wkskil_res.substring(wkcnt0); | |
wk_att_skil = String(wk_skil.match(re1)); | |
wk_att_skil = parseFloat(wk_att_skil.substring(0, (wk_att_skil.length - 1))) / 100; | |
} | |
} | |
} | |
} | |
//防御力用 | |
wkcnt1 = wkskil_res.indexOf("武将の防御力"); | |
if (wkcnt1 > -1) { | |
wkcnt2 = wkskil_res.indexOf("兵科"); | |
if (wkcnt2 > -1) { | |
wkcnt3 = wkskil_res.indexOf(card_type[l]); | |
if (wkcnt3 > -1) { | |
wk_skil = wkskil_res.substring(wkcnt3); | |
wk_def_skil = String(wk_skil.match(re1)); | |
wk_def_skil = parseFloat(wk_def_skil.substring(0, (wk_def_skil.length - 1))) / 100; | |
} | |
} else { | |
wk_skil = wkskil_res.substring(wkcnt1); | |
wk_def_skil = String(wk_skil.match(re1)); | |
wk_def_skil = parseFloat(wk_def_skil.substring(0, (wk_def_skil.length - 1))) / 100; | |
} | |
} | |
//移速用 | |
wkcnt1 = wkskil_res.indexOf("移動速度"); | |
if (wkcnt1 > -1) { | |
wkcnt2 = wkskil_res.indexOf("兵科"); | |
if (wkcnt2 > -1) { | |
wkcnt3 = wkskil_res.indexOf(card_type[l]); | |
if (wkcnt3 > -1) { | |
wk_skil = wkskil_res.substring(wkcnt1); | |
wk_spe_skil = String(wk_skil.match(re1)); | |
wk_spe_skil = parseFloat(wk_spe_skil.substring(0, (wk_spe_skil.length - 1))) / 100; | |
} | |
} else { | |
wkcnt3 = wkskil_res.indexOf("移動速度が半分"); | |
if (wkcnt3 > -1) { | |
wk_spe_skil = 99999; | |
} else { | |
wkcnt3 = wkskil_res.indexOf("移動速度が半減"); | |
if (wkcnt3 > -1) { | |
wk_spe_skil = 99999; | |
} else { | |
wk_skil = wkskil_res.substring(wkcnt1); | |
wk_spe_skil = String(wk_skil.match(re1)); | |
wk_spe_skil = parseFloat(wk_spe_skil.substring(0, (wk_spe_skil.length - 1))) / 100; | |
} | |
} | |
} | |
} | |
} | |
att_skilnum = att_skilnum + wk_att_skil; | |
def_skilnum = def_skilnum + wk_def_skil; | |
spd_skilnum = spd_skilnum + wk_spe_skil; | |
} | |
} | |
if (kakinFlg == true) { | |
atk_kakinFlg = 1; | |
} | |
if (kakinFlg2 == true) { | |
def_kakinFlg = 1; | |
} | |
if (skil_res != "") { | |
var wk_skil = ""; | |
var wkcnt0 = 0; | |
var wkcnt1 = 0; | |
var wkcnt2 = 0; | |
var wkcnt3 = 0; | |
wk_att_skil = 0; | |
wk_def_skil = 0; | |
wk_spe_skil = 0; | |
//攻撃力用 | |
wkcnt0 = skil_res.indexOf(")の武将1枚につき"); | |
if (wkcnt0 > -1) { | |
wk_skil = skil_res.substring(wkcnt0 + 5); | |
wk_att_skil = String(wk_skil.match(re1)); | |
wk_att_skil = parseFloat(wk_att_skil.substring(0, (wk_att_skil.length - 1))) / 100; | |
} else { | |
wkcnt0 = skil_res.indexOf("兵器の城・砦・村への攻撃"); | |
if (wkcnt0 > -1) { | |
} else { | |
wkcnt0 = skil_res.indexOf("兵器を含む部隊の"); | |
if (wkcnt0 > -1) { | |
} else { | |
wkcnt0 = skil_res.indexOf("武将および全兵科の攻撃力"); | |
if (wkcnt0 > -1) { | |
wk_skil = skil_res.substring(wkcnt0); | |
wk_att_skil = String(wk_skil.match(re1)); | |
wk_att_skil = parseFloat(wk_att_skil.substring(0, (wk_att_skil.length - 1))) / 100; | |
} else { | |
wkcnt0 = skil_res.indexOf("近衛騎兵、矛槍兵、弩兵、投石機"); | |
if (wkcnt0 > -1) { | |
} else { | |
wkcnt0 = skil_res.indexOf("全ての兵、"); | |
if (wkcnt0 > -1) { | |
wkcnt1 = skil_res.indexOf("武将の攻撃力"); | |
if (wkcnt1 > -1) { | |
wk_skil = skil_res.substring(wkcnt1); | |
wk_att_skil = String(wk_skil.match(re1)); | |
wk_att_skil = parseFloat(wk_att_skil.substring(0, (wk_att_skil.length - 1))) / 100; | |
} | |
} else { | |
wkcnt0 = skil_res.indexOf("全兵科の兵士"); | |
if (wkcnt0 > -1) { | |
wkcnt1 = skil_res.indexOf("武将の攻撃力"); | |
if (wkcnt1 > -1) { | |
wk_skil = skil_res.substring(wkcnt1); | |
wk_att_skil = String(wk_skil.match(re1)); | |
wk_att_skil = parseFloat(wk_att_skil.substring(0, (wk_att_skil.length - 1))) / 100; | |
} | |
} else { | |
wkcnt0 = skil_res.indexOf("全ての兵士の攻撃力"); | |
if (wkcnt0 > -1) { | |
wkcnt1 = skil_res.indexOf("武将の攻撃力"); | |
if (wkcnt1 > -1) { | |
wk_skil = skil_res.substring(wkcnt1); | |
wk_att_skil = String(wk_skil.match(re1)); | |
wk_att_skil = parseFloat(wk_att_skil.substring(0, (wk_att_skil.length - 1))) / 100; | |
} | |
} else { | |
wkcnt0 = skil_res.indexOf("兵の攻撃力"); | |
if (wkcnt0 > -1) { | |
wkcnt1 = skil_res.indexOf("武将の攻撃力"); | |
if (wkcnt1 > -1) { | |
wk_skil = skil_res.substring(wkcnt1); | |
wk_att_skil = String(wk_skil.match(re1)); | |
wk_att_skil = parseFloat(wk_att_skil.substring(0, (wk_att_skil.length - 1))) / 100; | |
} | |
} else { | |
wkcnt0 = skil_res.indexOf("攻撃力"); | |
if (wkcnt0 > -1) { | |
wkcnt1 = skil_res.indexOf("武将の攻撃力"); | |
if (wkcnt1 > -1) { | |
wkcnt2 = skil_res.indexOf("兵科"); | |
if (wkcnt2 > -1) { | |
wkcnt3 = skil_res.indexOf(card_type[l]); | |
if (wkcnt3 > -1) { | |
wk_skil = skil_res.substring(wkcnt3); | |
wk_att_skil = String(wk_skil.match(re1)); | |
wk_att_skil = parseFloat(wk_att_skil.substring(0, (wk_att_skil.length - 1))) / 100; | |
} | |
} else { | |
wk_skil = skil_res.substring(wkcnt1); | |
wk_att_skil = String(wk_skil.match(re1)); | |
wk_att_skil = parseFloat(wk_att_skil.substring(0, (wk_att_skil.length - 1))) / 100; | |
} | |
} else { | |
wkcnt2 = skil_res.indexOf("兵科"); | |
if (wkcnt2 > -1) { | |
wk_skil = skil_res.substring(wkcnt2); | |
wk_att_skil = String(wk_skil.match(re1)); | |
wk_att_skil = parseFloat(wk_att_skil.substring(0, (wk_att_skil.length - 1))) / 100; | |
} else { | |
wk_skil = skil_res.substring(wkcnt0); | |
wk_att_skil = String(wk_skil.match(re1)); | |
wk_att_skil = parseFloat(wk_att_skil.substring(0, (wk_att_skil.length - 1))) / 100; | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
//防御力用 | |
wkcnt1 = skil_res.indexOf("武将の防御力"); | |
if (wkcnt1 > -1) { | |
wkcnt2 = skil_res.indexOf("兵科"); | |
if (wkcnt2 > -1) { | |
wkcnt3 = skil_res.indexOf(card_type[l]); | |
if (wkcnt3 > -1) { | |
wk_skil = skil_res.substring(wkcnt3); | |
wk_def_skil = String(wk_skil.match(re1)); | |
wk_def_skil = parseFloat(wk_def_skil.substring(0, (wk_def_skil.length - 1))) / 100; | |
} | |
} else { | |
wk_skil = skil_res.substring(wkcnt1); | |
wk_def_skil = String(wk_skil.match(re1)); | |
wk_def_skil = parseFloat(wk_def_skil.substring(0, (wk_def_skil.length - 1))) / 100; | |
} | |
} | |
//移速用 | |
wkcnt0 = skil_res.indexOf("兵器の城・砦・村への攻撃"); | |
if (wkcnt0 > -1) { | |
} else { | |
wkcnt0 = skil_res.indexOf("近衛騎兵、矛槍兵、弩兵、投石機"); | |
if (wkcnt0 > -1) { | |
} else { | |
wkcnt0 = skil_res.indexOf("兵器を含む部隊の"); | |
if (wkcnt0 > -1) { | |
} else { | |
wkcnt0 = skil_res.indexOf("出兵時、兵器を除く全兵・武将の移動速度が"); | |
if (wkcnt0 > -1) { | |
wk_skil = skil_res.substring(wkcnt0); | |
wk_spe_skil = String(wk_skil.match(re3)); | |
housan_Flg = wk_spe_skil; | |
} else { | |
wkcnt1 = skil_res.indexOf("移動速度"); | |
if (wkcnt1 > -1) { | |
wkcnt0 = skil_res.indexOf("武将の移動速度"); | |
if (wkcnt0 > -1) { | |
wkcnt2 = skil_res.indexOf("兵科"); | |
if (wkcnt2 > -1) { | |
wkcnt3 = skil_res.indexOf(card_type[l]); | |
if (wkcnt3 > -1) { | |
wk_skil = skil_res.substring(wkcnt3); | |
wk_spe_skil = String(wk_skil.match(re1)); | |
wk_spe_skil = parseFloat(wk_spe_skil.substring(0, (wk_spe_skil.length - 1))) / 100; | |
} else { | |
wkcnt0 = skil_res.indexOf("武将および全兵科の攻撃力"); | |
if (wkcnt0 > -1) { | |
wk_skil = skil_res.substring(wkcnt1); | |
wk_spe_skil = String(wk_skil.match(re1)); | |
wk_spe_skil = parseFloat(wk_spe_skil.substring(0, (wk_spe_skil.length - 1))) / 100; | |
} else { | |
/*wk_skil = skil_res.substring(wkcnt1); | |
wk_spe_skil = String(wk_skil.match(re1)); | |
wk_spe_skil = parseFloat(wk_spe_skil.substring(0, (wk_spe_skil.length - 1))) / 100;*/ | |
} | |
} | |
} else { | |
wkcnt3 = skil_res.indexOf("移動速度が半分"); | |
if (wkcnt3 > -1) { | |
wk_spe_skil = 99999; | |
} else { | |
wkcnt3 = skil_res.indexOf("移動速度が半減"); | |
if (wkcnt3 > -1) { | |
wk_spe_skil = 99999; | |
} else { | |
wk_skil = skil_res.substring(wkcnt1); | |
wk_spe_skil = String(wk_skil.match(re1)); | |
wk_spe_skil = parseFloat(wk_spe_skil.substring(0, (wk_spe_skil.length - 1))) / 100; | |
} | |
} | |
} | |
} else { | |
wkcnt3 = skil_res.indexOf("2分の1"); | |
if (wkcnt3 > -1) { | |
wk_spe_skil = 99999; | |
} else { | |
wk_skil = skil_res.substring(wkcnt1); | |
wk_spe_skil = String(wk_skil.match(re1)); | |
wk_spe_skil = parseFloat(wk_spe_skil.substring(0, (wk_spe_skil.length - 1))) / 100; | |
} | |
} | |
} else { | |
wkcnt2 = skil_res.indexOf("武将単騎時は移速"); | |
if (wkcnt2 > -1) { | |
wk_skil = skil_res.substring(wkcnt2); | |
wk_spe_skil = String(wk_skil.match(re1)); | |
wk_spe_skil = parseFloat(wk_spe_skil.substring(0, (wk_spe_skil.length - 1))) / 100; | |
} else { | |
wkcnt3 = skil_res.indexOf("移速"); | |
if (wkcnt3 > -1) { | |
wk_skil = skil_res.substring(wkcnt3); | |
wk_spe_skil = String(wk_skil.match(re1)); | |
wk_spe_skil = parseFloat(wk_spe_skil.substring(0, (wk_spe_skil.length - 1))) / 100; | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
att_skilnum = att_skilnum + wk_att_skil; | |
def_skilnum = def_skilnum + wk_def_skil; | |
if (housan_Flg != 0) { | |
spd_skilnum = housan_Flg; | |
} else { | |
if (wk_spe_skil != 99999) { | |
spd_skilnum = spd_skilnum + wk_spe_skil; | |
} | |
} | |
} | |
//攻撃用 | |
if (att_skilnum != 0 || atk_kakinFlg == 1) { | |
var wkcalc1 = 0; | |
if (atk_kakinFlg == 0) { | |
wkcalc1 = Math.ceil((parseFloat(card_att[l]) * att_skilnum) + parseFloat(card_att[l])); | |
} else if (atk_kakinFlg == 1 && att_skilnum != 0) { | |
wkcalc1 = Math.ceil((parseFloat(card_att[l]) * att_skilnum) + parseFloat(card_att[l])); | |
wkcalc1 = Math.ceil((wkcalc1 * 0.1) + wkcalc1); | |
} else if (atk_kakinFlg == 1 && att_skilnum == 0) { | |
wkcalc1 = Math.ceil((parseFloat(card_att[l]) * 0.1) + parseFloat(card_att[l])); | |
} | |
var sts_atk = document.getElementsByClassName("status_att"); | |
sts_atk[l].innerHTML = "<span style=\"color:#FF0000;\">" + wkcalc1 + "</span>"; | |
//カード表示以外の場合 | |
if (deckcnt < l) { | |
var sts_atk1 = document.getElementsByClassName("statusParameter1"); | |
var sts_atk2 = sts_atk1[(l - deckcnt - 1)].getElementsByTagName("td"); | |
sts_atk2[1].innerHTML = "<span style=\"color:#FF0000;\">" + wkcalc1 + "</span>"; | |
} | |
} else { | |
document.getElementsByClassName("status_att")[l].innerHTML = card_att[l]; //攻撃力 | |
//カード表示以外の場合 | |
if (deckcnt < l) { | |
var sts_atk1 = document.getElementsByClassName("statusParameter1"); | |
var sts_atk2 = sts_atk1[(l - deckcnt - 1)].getElementsByTagName("td"); | |
sts_atk2[1].innerHTML = card_att[l]; | |
} | |
} | |
//防御用 | |
if (def_skilnum != 0 || def_kakinFlg == 1) { | |
var wkcalc2 = 0; | |
var wkcalc3 = 0; | |
var wkcalc4 = 0; | |
var wkcalc5 = 0; | |
if (def_kakinFlg == 0) { | |
wkcalc2 = Math.ceil((parseFloat(card_wdef[l]) * def_skilnum) + parseFloat(card_wdef[l])); | |
wkcalc3 = Math.ceil((parseFloat(card_sdef[l]) * def_skilnum) + parseFloat(card_sdef[l])); | |
wkcalc4 = Math.ceil((parseFloat(card_bdef[l]) * def_skilnum) + parseFloat(card_bdef[l])); | |
wkcalc5 = Math.ceil((parseFloat(card_rdef[l]) * def_skilnum) + parseFloat(card_rdef[l])); | |
} else if (def_kakinFlg == 1 && def_skilnum != 0) { | |
wkcalc2 = Math.ceil((parseFloat(card_wdef[l]) * def_skilnum) + parseFloat(card_wdef[l])); | |
wkcalc3 = Math.ceil((parseFloat(card_sdef[l]) * def_skilnum) + parseFloat(card_sdef[l])); | |
wkcalc4 = Math.ceil((parseFloat(card_bdef[l]) * def_skilnum) + parseFloat(card_bdef[l])); | |
wkcalc5 = Math.ceil((parseFloat(card_rdef[l]) * def_skilnum) + parseFloat(card_rdef[l])); | |
wkcalc2 = Math.ceil((wkcalc2 * 0.1) + wkcalc2); | |
wkcalc3 = Math.ceil((wkcalc3 * 0.1) + wkcalc3); | |
wkcalc4 = Math.ceil((wkcalc4 * 0.1) + wkcalc4); | |
wkcalc5 = Math.ceil((wkcalc5 * 0.1) + wkcalc5); | |
} else if (def_kakinFlg == 1 && def_skilnum == 0) { | |
wkcalc2 = Math.ceil((parseFloat(card_wdef[l]) * 0.1) + parseFloat(card_wdef[l])); | |
wkcalc3 = Math.ceil((parseFloat(card_sdef[l]) * 0.1) + parseFloat(card_sdef[l])); | |
wkcalc4 = Math.ceil((parseFloat(card_bdef[l]) * 0.1) + parseFloat(card_bdef[l])); | |
wkcalc5 = Math.ceil((parseFloat(card_rdef[l]) * 0.1) + parseFloat(card_rdef[l])); | |
} | |
document.getElementsByClassName("status_wdef")[l].innerHTML = "<span style=\"color:#FF0000;\">" + wkcalc2 + "</span>"; //歩防御 | |
document.getElementsByClassName("status_sdef")[l].innerHTML = "<span style=\"color:#FF0000;\">" + wkcalc3 + "</span>"; //槍防御 | |
document.getElementsByClassName("status_bdef")[l].innerHTML = "<span style=\"color:#FF0000;\">" + wkcalc4 + "</span>"; //弓防御 | |
document.getElementsByClassName("status_rdef")[l].innerHTML = "<span style=\"color:#FF0000;\">" + wkcalc5 + "</span>"; //馬防御 | |
//カード表示以外の場合 | |
if (deckcnt < l) { | |
var sts_atk1 = document.getElementsByClassName("statusParameter1"); | |
var sts_atk2 = sts_atk1[(l - deckcnt - 1)].getElementsByTagName("td"); | |
sts_atk2[5].innerHTML = "<span style=\"color:#FF0000;\">" + wkcalc2 + "</span>"; | |
sts_atk2[7].innerHTML = "<span style=\"color:#FF0000;\">" + wkcalc3 + "</span>"; | |
sts_atk2[9].innerHTML = "<span style=\"color:#FF0000;\">" + wkcalc4 + "</span>"; | |
sts_atk2[11].innerHTML = "<span style=\"color:#FF0000;\">" + wkcalc5 + "</span>"; | |
} | |
} else { | |
document.getElementsByClassName("status_wdef")[l].innerHTML = card_wdef[l]; //歩防御 | |
document.getElementsByClassName("status_sdef")[l].innerHTML = card_sdef[l]; //槍防御 | |
document.getElementsByClassName("status_bdef")[l].innerHTML = card_bdef[l]; //弓防御 | |
document.getElementsByClassName("status_rdef")[l].innerHTML = card_rdef[l]; //馬防御 | |
//カード表示以外の場合 | |
if (deckcnt < l) { | |
var sts_atk1 = document.getElementsByClassName("statusParameter1"); | |
var sts_atk2 = sts_atk1[(l - deckcnt - 1)].getElementsByTagName("td"); | |
sts_atk2[5].innerHTML = card_wdef[l]; | |
sts_atk2[7].innerHTML = card_sdef[l]; | |
sts_atk2[9].innerHTML = card_bdef[l]; | |
sts_atk2[11].innerHTML = card_rdef[l]; | |
} | |
} | |
//速度用 | |
if (spd_skilnum != 0 || wk_spe_skil == 99999) { | |
var wkcalc6 = 0; | |
if (housan_Flg != 0) { | |
wkcalc6 = housan_Flg; | |
document.getElementsByClassName("status_speed")[l].innerHTML = "<span style=\"color:#FF0000;\">" + wkcalc6 + "</span>"; //移動速度 | |
} else { | |
if (wk_spe_skil != 99999) { | |
wkcalc6 = (parseFloat(card_speed[l]) * spd_skilnum) + parseFloat(card_speed[l]); | |
} else { | |
wkcalc6 = ((parseFloat(card_speed[l]) * spd_skilnum) + parseFloat(card_speed[l])) / 2; | |
} | |
document.getElementsByClassName("status_speed")[l].innerHTML = "<span style=\"color:#FF0000;\">" + wkcalc6.toFixed(1) + "</span>"; //移動速度 | |
} | |
//カード表示以外の場合 | |
if (deckcnt < l) { | |
var sts_atk1 = document.getElementsByClassName("statusParameter1"); | |
var sts_atk2 = sts_atk1[(l - deckcnt - 1)].getElementsByTagName("td"); | |
if (housan_Flg != 0) { | |
sts_atk2[13].innerHTML = "<span style=\"color:#FF0000;\">" + wkcalc6 + "</span>"; | |
} else { | |
sts_atk2[13].innerHTML = "<span style=\"color:#FF0000;\">" + wkcalc6.toFixed(1) + "</span>"; | |
} | |
} | |
} else { | |
document.getElementsByClassName("status_speed")[l].innerHTML = card_speed[l]; //移動速度 | |
//カード表示以外の場合 | |
if (deckcnt < l) { | |
var sts_atk1 = document.getElementsByClassName("statusParameter1"); | |
var sts_atk2 = sts_atk1[(l - deckcnt - 1)].getElementsByTagName("td"); | |
sts_atk2[13].innerHTML = card_speed[l]; | |
} | |
} | |
} | |
/*------------+---------------------------------------------------------+ | |
* 現在ファイル名取得用 | | |
*------------+---------------------------------------------------------*/ | |
function URLGet() { | |
wkurl = location.href; | |
var arr = wkurl.split("/"); | |
wkurl = arr[arr.length-1]; | |
arr = wkurl.split("#"); | |
wkurl = arr[0]; | |
arr = wkurl.split("?"); | |
wkurl = arr[0]; | |
return wkurl; | |
} | |
} | |
//--------------------------------------------------------- | |
// NPC砦、領土検索ツール 2014/02/21 refactoring | |
//--------------------------------------------------------- | |
// start | |
function disp_npcfort() { | |
j$ = unsafeWindow.jQuery; | |
npcfort_main(); | |
function npcfort_main(){ | |
if (location.pathname != "/map.php" && location.pathname != "/big_map.php") { | |
return; | |
} | |
var ua = navigator.userAgent; | |
if( ua.match(/Chrome\/([\.\d]+)/)) { | |
browserType = "Chrome"; | |
} | |
else{ | |
browserType = ""; | |
} | |
// 51x51モードの実装されているサーバーかを取得 | |
add51_51mode = 1; | |
//HTML追加 | |
addHtml_7(); | |
// 51x51モードか? | |
if( getViewSize() != 51 ){ | |
//結果取得 | |
getNPCCastleInfo(); | |
} | |
else{ | |
//結果取得 | |
getNPCCastleInfo_51(0); // 0: ルート構築再描画ではない | |
} | |
} | |
//----------------// | |
// 出兵情報の検索 // | |
//----------------// | |
function putSoldierInfo(){ | |
//----------------------------// | |
// スプレッドシート情報の取得 // | |
//----------------------------// | |
var chkflg4; | |
execFlag = loadExecFlag(location.hostname, "FLAG4"); | |
if( execFlag == "" ){ | |
chkflg4 = new String(FLAG4); // 初期値 | |
} | |
else{ | |
chkflg4 = execFlag; | |
} | |
// スプレッドシート名の加工 | |
if( chkflg4.charAt(0) == '1' ){ | |
var key = chkflg4.substr(1).replace(/.*[\?&]key=([^&]+).*/, '$1'); | |
// 出兵情報を取得 | |
var battleType = new Array(); | |
var target = new Array(); | |
var arriveDate = new Array(); | |
var fdata = new Array(); | |
var count = 0; | |
var sortie = $e_7('//div[@id="sortie"]//th[@class="ttl3 w80"]'); | |
var flist = $e_7('//div[@id="sortie"]//table[@class="commonTablesNoMG"]//td[@class="digit"]'); | |
for( var i = 0; i < sortie.snapshotLength/3; i++ ){ | |
// 殲滅戦、援軍、強襲等 | |
battleType[count] = sortie.snapshotItem(i*3+0).textContent; | |
// 出兵先 | |
var pos = sortie.snapshotItem(i*3+1).parentNode.innerHTML.match(/\([-]*\d+,[-]*\d+\)/); | |
target[count] = pos[0]; | |
// 到着日時 | |
var dt = sortie.snapshotItem(i*3+2).parentNode.innerHTML.match(/\d+-\d+-\d+ \d+:\d+:\d+/); | |
arriveDate[count] = dt[0]; | |
// 兵士構成 | |
var fd = ""; | |
var total = 0; | |
for( var j = 0; j < 11; j++ ){ | |
var num = parseInt(flist.snapshotItem(i*12+j).textContent); | |
if( fd != "" ){ | |
fd = fd + "/"; | |
} | |
fd = fd + num; | |
total = parseInt(total) + parseInt(num); | |
} | |
if( total != 0 ){ | |
fdata[count] = fd + "[" + flist.snapshotItem(i*12+11).textContent + "]"; | |
} | |
else{ | |
fdata[count] = "SMK[" + flist.snapshotItem(i*12+11).textContent + "]"; | |
} | |
count ++; | |
} | |
// 出兵データをPOSTする | |
} | |
} | |
//----------------// | |
// 領土情報の検索 // | |
//----------------// | |
//拠点の作業中情報を取得 | |
function getNPCCastleInfo() { | |
//--------------// | |
// ホスト名判別 // | |
//--------------// | |
var hostname; | |
var ikibaku_flg; | |
hostname = location.hostname; | |
if( hostname.indexOf("1kibaku.jp") != -1 ){ | |
ikibaku_flg = 1; | |
} | |
else{ | |
ikibaku_flg = 0; | |
} | |
//--------------------------------------// | |
// チェックボックスに関する情報をロード // | |
//--------------------------------------// | |
var chkflg1; | |
var chkflg2; | |
execFlag = loadExecFlag(location.hostname, "FLAG0"); | |
if( execFlag == "" ){ | |
// 表示フラグをロード | |
var execFlag1 = loadExecFlag(location.hostname, "FLAG1"); | |
if( execFlag1 == "" ){ | |
chkflg1 = new String(FLAG1); // 初期値 | |
} | |
else{ | |
chkflg1 = execFlag1; | |
} | |
// オプションフラグをロード | |
var execFlag2 = loadExecFlag(location.hostname, "FLAG2"); | |
if( execFlag2 == "" ){ | |
chkflg2 = new String(FLAG2); // 初期値 | |
} | |
else{ | |
chkflg2 = execFlag2; | |
} | |
// 初回のときは、フラグを保存 | |
execFlag = chkflg1 + DELIMIT1_7 + chkflg2; | |
saveExecFlag(location.hostname, "FLAG0", execFlag); | |
} | |
else{ | |
var loadflg = new Array(); | |
loadflg = execFlag.split(DELIMIT1_7); | |
chkflg1 = loadflg[0]; | |
chkflg2 = loadflg[1]; | |
} | |
// 個人、同盟検索情報をロード | |
var chkflg3 = new Array(); | |
execFlag = loadExecFlag(location.hostname, "FLAG3"); | |
if( execFlag == "" ){ | |
var execFlag3 = loadExecFlag(location.hostname, "FLAG3-1"); | |
if( execFlag3 == "" ){ | |
chkflg3[0] = new String(FLAG3_1); // 初期値 | |
} | |
else{ | |
chkflg3[0] = execFlag3; | |
} | |
execFlag3 = loadExecFlag(location.hostname, "FLAG3-2"); | |
if( execFlag3 == "" ){ | |
chkflg3[1] = new String(FLAG3_2); // 初期値 | |
} | |
else{ | |
chkflg3[1] = execFlag3; | |
} | |
execFlag3 = loadExecFlag(location.hostname, "FLAG3-3"); | |
if( execFlag3 == "" ){ | |
chkflg3[2] = new String(FLAG3_3); // 初期値 | |
} | |
else{ | |
chkflg3[2] = execFlag3; | |
} | |
// 初回のときは、フラグを保存 | |
execFlag = chkflg3[0] + DELIMIT1_7 + chkflg3[1] + DELIMIT1_7 + chkflg3[2]; | |
saveExecFlag(location.hostname, "FLAG3", execFlag); | |
} | |
else{ | |
chkflg3 = execFlag.split(DELIMIT1_7); | |
} | |
//----------------------// | |
// 処理パラメータの抽出 // | |
//----------------------// | |
//-- データ絞り込み時のユーザー名情報の取得 --// | |
var checkBox1; | |
var checkBox2; | |
var userBox; | |
var listbox; | |
var userName = new Array(); | |
var userText; | |
var fullmatch = new Array(); | |
var nodisp = new Array(); | |
var target = new Array(); | |
var colorNo = new Array(); | |
for( var i = 0; i < 3; i++ ){ | |
fullmatch[i] = 0; | |
nodisp[i] = 0; | |
target[i] = 0; | |
colorNo[i] = 0; | |
} | |
// 個人・同盟検索1 | |
checkBox1 = $e_7('//*[@id="ckEnable1"]'); | |
if( checkBox1.snapshotItem(0).checked == true ){ | |
// 個人・同盟の別 | |
checkBox2 = $e_7('//*[@id="ckType1"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
target[0] = 1; | |
} | |
else{ | |
target[0] = 2; | |
} | |
// 完全一致 | |
checkBox2 = $e_7('//*[@id="ckFullMatch1"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
fullmatch[0] = 1; | |
} | |
else{ | |
fullmatch[0] = 0; | |
} | |
// ☆表示 | |
checkBox2 = $e_7('//*[@id="ckLevelSearch1"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
nodisp[0] = 1; | |
} | |
else{ | |
nodisp[0] = 0; | |
} | |
userBox = $e_7('//*[@id="userBox1"]'); | |
userText = userBox.snapshotItem(0).value; | |
userName[0] = new Array(); | |
userName[0] = userText.split(OWNER_SPLITKEY); | |
// 枠色 | |
listbox = $e_7('//*[@id="lsColor1"]'); | |
colorNo[0] = listbox.snapshotItem(0).selectedIndex + 1; | |
} | |
else{ | |
userName[0] = ""; | |
} | |
// 個人・同盟検索2 | |
checkBox1 = $e_7('//*[@id="ckEnable2"]'); | |
if( checkBox1.snapshotItem(0).checked == true ){ | |
// 個人・同盟の別 | |
checkBox2 = $e_7('//*[@id="ckType2"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
target[1] = 1; | |
} | |
else{ | |
target[1] = 2; | |
} | |
// 完全一致 | |
checkBox2 = $e_7('//*[@id="ckFullMatch2"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
fullmatch[1] = 1; | |
} | |
else{ | |
fullmatch[1] = 0; | |
} | |
// ☆表示 | |
checkBox2 = $e_7('//*[@id="ckLevelSearch2"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
nodisp[1] = 1; | |
} | |
else{ | |
nodisp[1] = 0; | |
} | |
userBox = $e_7('//*[@id="userBox2"]'); | |
userText = userBox.snapshotItem(0).value; | |
userName[1] = new Array(); | |
userName[1] = userText.split(OWNER_SPLITKEY); | |
// 枠色 | |
listbox = $e_7('//*[@id="lsColor2"]'); | |
colorNo[1] = listbox.snapshotItem(0).selectedIndex + 1; | |
} | |
else{ | |
userName[1] = ""; | |
} | |
// 個人・同盟検索3 | |
checkBox1 = $e_7('//*[@id="ckEnable3"]'); | |
if( checkBox1.snapshotItem(0).checked == true ){ | |
// 個人・同盟の別 | |
checkBox2 = $e_7('//*[@id="ckType3"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
target[2] = 1; | |
} | |
else{ | |
target[2] = 2; | |
} | |
// 完全一致 | |
checkBox2 = $e_7('//*[@id="ckFullMatch3"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
fullmatch[2] = 1; | |
} | |
else{ | |
fullmatch[2] = 0; | |
} | |
// ☆表示 | |
checkBox2 = $e_7('//*[@id="ckLevelSearch3"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
nodisp[2] = 1; | |
} | |
else{ | |
nodisp[2] = 0; | |
} | |
userBox = $e_7('//*[@id="userBox3"]'); | |
userText = userBox.snapshotItem(0).value; | |
userName[2] = new Array(); | |
userName[2] = userText.split(OWNER_SPLITKEY); | |
// 枠色 | |
listbox = $e_7('//*[@id="lsColor3"]'); | |
colorNo[2] = listbox.snapshotItem(0).selectedIndex + 1; | |
} | |
else{ | |
userName[2] = ""; | |
} | |
//-- 資源判別ONのとき、資源表示 --// | |
var res_mode; | |
var areaNo; | |
var areaNo2; | |
var areaNo3; | |
if( chkflg2.charAt(FLAG2_ANALYZE) == '1' ){ | |
res_mode = 1; | |
} | |
else{ | |
res_mode = 0; | |
} | |
// 強調表示選択値を取得 | |
areaNo = parseInt(chkflg2.substr(FLAG2_STRONG_AREANO,3)); | |
areaNo2 = parseInt(chkflg2.substr(FLAG2_STRONG_AREANO2,3)); | |
areaNo3 = parseInt(chkflg2.substr(FLAG2_STRONG_AREANO3,3)); | |
//------------------// | |
// 画面サイズの取得 // | |
//------------------// | |
var viewSize; | |
viewSize = getViewSize(); | |
//--------------------------------------------// | |
// 全体表示画面から、画面中央座標を手に入れる // | |
//--------------------------------------------// | |
var codx = $e_7('//div[@id="datas"]/input[@id=\"x\"]'); | |
var cody = $e_7('//div[@id="datas"]/input[@id=\"y\"]'); | |
var bx = codx.snapshotItem(0).value; | |
var by = cody.snapshotItem(0).value; | |
var sx; | |
var sy; | |
var ex; | |
var ey; | |
//--------------// | |
// ホスト名判別 // | |
//--------------// | |
var hosttype = ""; | |
if( (location.hostname.indexOf("1kibaku") == -1) | |
&& (location.hostname.indexOf("legend") == -1) ){ | |
hosttype = "0"; | |
} | |
//------------------// | |
// 左上座標を求める // | |
//------------------// | |
if( viewSize == 11 ){ | |
sx = parseInt(bx) - 5; | |
sy = parseInt(by) + 5; | |
} | |
else if( viewSize == 15 ){ | |
sx = parseInt(bx) - 7; | |
sy = parseInt(by) + 7; | |
} | |
else{ | |
sx = parseInt(bx) - 10; | |
sy = parseInt(by) + 10; | |
} | |
//----------------------// | |
// レーダーマップの描画 // | |
//----------------------// | |
var mapdata = new Array(); | |
var smallmapdv = $e_7('//*[@id="smallmap_dv"]'); | |
smallmapdv.snapshotItem(0).style.display = "inline"; | |
//--------------------------------------// | |
// マップデータからレーダーマップを作る // | |
//--------------------------------------// | |
var areasrc = document.evaluate('//*[@id="mapsAll"]//img/@src', | |
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
var areacls = document.evaluate('//*[@id="mapsAll"]//img/@class', | |
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
var smallmap = $e_7('//*[@id="smallmap"]'); | |
// マップの作成 | |
for(var i = 0; i < 21; i++ ){ | |
mapdata[i] = new Array(); | |
} | |
for(var i = 0; i < 21; i++ ){ | |
for(var j = 0; j < 21; j++ ){ | |
mapdata[j][i] = 'blank'; | |
} | |
} | |
var ck = $e_7('//*[@id="OldDesign"]'); | |
for (var i=0; i < areacls.snapshotLength-1; i++) { | |
// 施設情報を全てリスト | |
var rowTextA = areasrc.snapshotItem(i).textContent | |
rowTextA = rowTextA.replace(/^.*\//,''); | |
var clsText = areacls.snapshotItem(i).textContent; | |
clsText = clsText.replace(/^mapAll0*/,''); | |
var clsNo = parseInt(clsText) - 1; | |
var areaimg; | |
if( clsNo < 9 ){ | |
areaimg = $x_7('//div[@id="mapsAll"]//img[@class="mapAll0' + clsText + '"]'); | |
} | |
else{ | |
areaimg = $x_7('//div[@id="mapsAll"]//img[@class="mapAll' + clsText + '"]'); | |
} | |
var oldName = ""; | |
if( (areaimg != undefined) && (areaimg != null) ){ | |
oldName = areaimg.getAttribute("old"); | |
if( (oldName != undefined) && (oldName != null) ){ | |
rowTextA = oldName; | |
} | |
} | |
var x = clsNo % viewSize; | |
var y = Math.floor(clsNo / viewSize); | |
// 城の情報をチェック | |
if( rowTextA.indexOf('_bk_') >= 0 ){ | |
mapdata[y][x] = 'black'; | |
}else if( rowTextA.indexOf('_bg_') >= 0 ){ | |
mapdata[y][x] = 'aqua'; | |
}else if( rowTextA.indexOf('_b_') >= 0 ){ | |
mapdata[y][x] = 'blue'; | |
}else if( rowTextA.indexOf('_p_') >= 0 ){ | |
mapdata[y][x] = 'purple'; | |
}else if( rowTextA.indexOf('_r_') >= 0 ){ | |
mapdata[y][x] = 'red'; | |
}else if( rowTextA.indexOf('_g_') >= 0 ){ | |
mapdata[y][x] = 'green'; | |
}else if( rowTextA.indexOf('_o_') >= 0 ){ | |
mapdata[y][x] = 'orange'; | |
}else if( rowTextA.indexOf('_y_') >= 0 ){ | |
mapdata[y][x] = 'yellow'; | |
}else if( rowTextA.indexOf('blanc') >= 0 ){ | |
mapdata[y][x] = 'wall'; | |
} | |
// 51x51モードが実装されており、かつ旧マップ使用が有効 | |
if( hosttype == "0" ){ | |
if( (oldName != null) && (oldName != undefined) && (oldName != "")){ | |
areasrc.snapshotItem(i).textContent = "/20110414-01/extend_project/w760/img/panel/" + oldName; | |
} | |
} | |
} | |
// 51x51モードが実装されており、かつ旧マップ使用が有効 | |
if( hosttype == "0" ){ | |
for( y = 0; y < viewSize; y++ ){ | |
for( x = 0; x < viewSize; x++ ){ | |
if( mapdata[y][x] == 'blank' ){ | |
var classNo; | |
if( y*viewSize + x + 1 <= 9 ){ | |
classNo = "0" + parseInt(x + 1); | |
} | |
else{ | |
classNo = parseInt(y*viewSize + x + 1); | |
} | |
var ex = $x_7('//div[@id="mapsAll"]//img[@add="1"]'); | |
if( (ex != undefined) && (ex != null) ){ | |
var ex2_p = ex.parentNode; | |
ex2_p.removeChild(ex); | |
} | |
} | |
} | |
} | |
} | |
// オプションオンのときだけレーダー描画 | |
if( chkflg2.charAt(FLAG2_RADER) == '1' ){ | |
// テキストボックスサイズの修正 | |
if( viewSize == 11 ){ | |
smallmap.snapshotItem(0).style.width = "66px"; | |
smallmap.snapshotItem(0).style.height = "66px"; | |
smallmap.snapshotItem(0).style.marginLeft = '-10px'; | |
smallmap.snapshotItem(0).style.marginTop = '354px'; | |
} | |
else if( viewSize == 15 ){ | |
smallmap.snapshotItem(0).style.width = "90px"; | |
smallmap.snapshotItem(0).style.height = "90px"; | |
smallmap.snapshotItem(0).style.marginLeft = '-10px'; | |
smallmap.snapshotItem(0).style.marginTop = '330px'; | |
} | |
else{ | |
smallmap.snapshotItem(0).style.width = "126px"; | |
smallmap.snapshotItem(0).style.height = "126px"; | |
smallmap.snapshotItem(0).style.marginLeft = '-10px'; | |
smallmap.snapshotItem(0).style.marginTop = '300px'; | |
} | |
// 画像の設置 | |
var areaText = ''; | |
for( i = 0; i < viewSize; i++ ){ | |
for( j = 0; j < viewSize; j++ ){ | |
if( mapdata[j][i] == 'red' ){ | |
areaText = areaText + '<img src="' + icon_m[0] + '" width="6px" height="6px"/>'; | |
} | |
else if( mapdata[j][i] == 'green' ){ | |
areaText = areaText + '<img src="' + icon_m[1] + '" width="6px" height="6px"/>'; | |
} | |
else if( mapdata[j][i] == 'orange' ){ | |
areaText = areaText + '<img src="' + icon_m[2] + '" width="6px" height="6px"/>'; | |
} | |
else if( mapdata[j][i] == 'yellow' ){ | |
areaText = areaText + '<img src="' + icon_m[3] + '" width="6px" height="6px"/>'; | |
} | |
else if( mapdata[j][i] == 'black' ){ | |
areaText = areaText + '<img src="' + icon_m[4] + '" width="6px" height="6px"/>'; | |
} | |
else if( mapdata[j][i] == 'blank' ){ | |
areaText = areaText + '<img src="' + icon_m[5] + '" width="6px" height="6px"/>'; | |
} | |
else if( mapdata[j][i] == 'purple' ){ | |
areaText = areaText + '<img src="' + icon_m[6] + '" width="6px" height="6px"/>'; | |
} | |
else if( mapdata[j][i] == 'blue' ){ | |
areaText = areaText + '<img src="' + icon_m[7] + '" width="6px" height="6px"/>'; | |
} | |
else if( mapdata[j][i] == 'aqua' ){ | |
areaText = areaText + '<img src="' + icon_m[8] + '" width="6px" height="6px"/>'; | |
} | |
else if( mapdata[j][i] == 'wall' ){ | |
areaText = areaText + '<img src="' + icon_m[9] + '" width="6px" height="6px"/>'; | |
} | |
} | |
areaText = areaText + '<br>'; | |
} | |
if( areaText != '' ){ | |
smallmap.snapshotItem(0).innerHTML = areaText; | |
} | |
} | |
else{ | |
var smallmapdv = $e_7('//*[@id="smallmap_dv"]'); | |
smallmapdv.snapshotItem(0).style.display = "none"; | |
} | |
//----------------------------------------// | |
// 全体表示画面から、領土情報を手に入れる // | |
//----------------------------------------// | |
// イベントデータ | |
var areas = $e_7('//*[@id="mapOverlayMap"]//area/@onmouseover'); | |
var mouseout = $e_7('//*[@id="mapOverlayMap"]//area/@onmouseout'); | |
var href = $e_7('//*[@id="mapOverlayMap"]//area/@href'); | |
var textArea = $e_7('//*[@id="castleInfoText"]'); | |
var putText = ""; | |
//------------------// | |
// 全領土を検索する // | |
//------------------// | |
for (var i=0; i<areas.snapshotLength; i++) { | |
// 取得した領土の情報を抽出 | |
var rowText = areas.snapshotItem(i).textContent; | |
var rowText2 = href.snapshotItem(i).textContent; | |
rowText = rowText.replace(/^.*rewrite\(/, ""); | |
rowText = rowText.replace(/\); .*$/, ""); | |
var bkText = rowText; | |
rowText = rowText.replace(/\//g,"==uZer=="); | |
rowText = rowText.replace(/', '/g,"'/'"); | |
rowText = rowText.replace(/'/g,""); | |
var valueA = new Array(); | |
valueA = rowText.split('/'); | |
valueA[1] = valueA[1].replace(/==uZer==/,"/"); | |
var userTxt = '<b><font color="green">' + valueA[1] + '</font></b>'; | |
var groupTxt = '<b><font color="green">' + valueA[4] + '</font></b>'; | |
var pictImg = '<a href="' + rowText2 + '">' | |
+ '<img src="/20100705-01/img/common/sidebar/icon_base.gif" onmouseover="' //ac22 | |
+ areas.snapshotItem(i).textContent + '" onmouseout="' | |
+ mouseout.snapshotItem(i).textContent + '" ></a>'; | |
var linkText = '/' + pictImg + '<a href="' + rowText2 + '" style="text-decoration: none"><font color="#00BFFF"><b>' + valueA[3] + '</b></font></a>' + '/距離' + valueA[6]; | |
// マップ座標の取得 | |
var rowText3 = valueA[3]; | |
rowText3 = rowText3.replace(/\(/,""); | |
rowText3 = rowText3.replace(/\)/,""); | |
var valueB = new Array(); | |
valueB = rowText3.split(','); | |
var cx = parseInt(valueB[0]); | |
var cy = parseInt(valueB[1]); | |
// 資源数をカウント | |
var max; | |
var maxtype; | |
var maxcount; | |
max = 0; | |
maxtype = 0; | |
maxcount = 0; | |
if( res_mode == 1 ){ | |
for(var j = 7; j <= 10; j++ ){ | |
if( valueA[j] > max ){ | |
max = valueA[j]; | |
maxtype = j - 6; | |
} | |
} | |
for(var j = 7; j <= 10; j++ ){ | |
if( valueA[j] == max ){ | |
maxcount = maxcount + 1; | |
} | |
} | |
if(maxcount > 1){ | |
maxtype = 0; | |
} | |
} | |
//----------------------// | |
// 個人・同盟検索の判定 // | |
//----------------------// | |
var matchcase = -1; // マッチしたパターン | |
// 個人・同盟マッチチェック | |
for( var j = 0; j < 3; j++ ){ | |
for( var k = 0; k < userName[j].length; k++ ){ | |
// 検索有効時 username に値が入る | |
if( userName[j][k] != "" ){ | |
// ターゲットが個人 | |
if( target[j] == 1 ){ | |
// 完全一致かつ、ユーザー名が一致 | |
if( (fullmatch[j] == 1) && (valueA[1] == userName[j][k]) ){ | |
matchcase = j; | |
break; | |
} | |
// 部分一致かつ、ユーザー名が一致 | |
if( (fullmatch[j] == 0) && (valueA[1].indexOf(userName[j][k]) != -1) ){ | |
matchcase = j; | |
break; | |
} | |
} | |
// ターゲットが同盟 | |
else{ | |
// 完全一致かつ、ユーザー名が一致 | |
if( (fullmatch[j] == 1) && (valueA[4] == userName[j][k]) ){ | |
matchcase = j; | |
break; | |
} | |
// 部分一致かつ、ユーザー名が一致 | |
if( (fullmatch[j] == 0) && (valueA[4].indexOf(userName[j][k]) != -1) ){ | |
matchcase = j; | |
break; | |
} | |
} | |
} | |
} | |
if( matchcase != -1 ){ | |
break; | |
} | |
} | |
if( mapdata[Math.abs(cx-sx)][Math.abs(cy-sy)] == 'black' ){ | |
matchcase = -1; | |
} | |
//--------------// | |
// 資源強調判定 // | |
//--------------// | |
var landLevel = valueA[5].length; | |
if( valueA[5].substr(0,4) == '<img' ){ | |
// FaceBook Lands of Legends! 対応 | |
var stars = valueA[5].match(/<img/g); | |
landLevel = stars.length; | |
} | |
var strongflg = 0; | |
if( res_mode == 1 ){ | |
// 資源一致判定 | |
if( (season1[areaNo][1] == parseInt(valueA[7])) // 木 | |
&& (season1[areaNo][2] == parseInt(valueA[8])) // 石 | |
&& (season1[areaNo][3] == parseInt(valueA[9])) // 鉄 | |
&& (season1[areaNo][4] == parseInt(valueA[10])) // 糧 | |
&& (season1[areaNo][5] == landLevel) ){ // ★ | |
strongflg = 1; | |
} | |
else if( (season1[areaNo2][1] == parseInt(valueA[7])) // 木 | |
&& (season1[areaNo2][2] == parseInt(valueA[8])) // 石 | |
&& (season1[areaNo2][3] == parseInt(valueA[9])) // 鉄 | |
&& (season1[areaNo2][4] == parseInt(valueA[10])) // 糧 | |
&& (season1[areaNo2][5] == landLevel) ){ // ★ | |
strongflg = 2; | |
} | |
else if( (season1[areaNo3][1] == parseInt(valueA[7])) // 木 | |
&& (season1[areaNo3][2] == parseInt(valueA[8])) // 石 | |
&& (season1[areaNo3][3] == parseInt(valueA[9])) // 鉄 | |
&& (season1[areaNo3][4] == parseInt(valueA[10])) // 糧 | |
&& (season1[areaNo3][5] == landLevel) ){ // ★ | |
strongflg = 3; | |
} | |
} | |
//-----------------// | |
// NPC砦の検索判定 // | |
//-----------------// | |
if( (chkflg1.charAt(FLAG1_NPC) == '1') && (valueA[11] == '1') ){ | |
// NPC砦 | |
if( putText != "" ){ | |
putText = putText + "\n"; | |
} | |
// 砦名[0], 君主名[1], 座標[3], 所有者[4], ★[5] | |
if( valueA[4] == '-' ){ | |
putText = putText + '<b><font color="purple">NPC</font></b>/' + valueA[0] + '/<b><font color="red">未攻略</font></b>/' + userTxt + linkText + '/' + valueA[5]; | |
} | |
else{ | |
putText = putText + '<b><font color="purple">NPC</font></b>/' + valueA[0] + '/' + groupTxt + '/' + userTxt + linkText + '/' + valueA[5]; | |
} | |
if( res_mode == 0 ){ | |
disp_AreaIcon(cx,cy,valueA[5].length,viewSize,0); | |
} | |
} | |
//------------------------------------------// | |
// 領土検索、または個人・同盟領土の検索判定 // | |
//------------------------------------------// | |
if( valueA[1] != '' ){ | |
// 領地化されている土地 | |
if( (matchcase == -1) && (chkflg2.charAt(FLAG2_LAND) == '1') ){ | |
// 個人・同盟検索に該当せず、領土検索がオンの場合 | |
// ☆数による絞り込み | |
if( ((chkflg1.charAt(FLAG1_LV1) == '1') && (landLevel == 1)) | |
|| ((chkflg1.charAt(FLAG1_LV2) == '1') && (landLevel == 2)) | |
|| ((chkflg1.charAt(FLAG1_LV3) == '1') && (landLevel == 3)) | |
|| ((chkflg1.charAt(FLAG1_LV4) == '1') && (landLevel == 4)) | |
|| ((chkflg1.charAt(FLAG1_LV5) == '1') && (landLevel == 5)) | |
|| ((chkflg1.charAt(FLAG1_LV6) == '1') && (landLevel == 6)) | |
|| ((chkflg1.charAt(FLAG1_LV7) == '1') && (landLevel == 7)) | |
|| ((chkflg1.charAt(FLAG1_LV8) == '1') && (landLevel == 8)) | |
|| ((chkflg1.charAt(FLAG1_LV9) == '1') && (landLevel == 9)) ){ | |
// 領土情報は検索結果に反映 | |
if( putText != "" ){ | |
putText = putText + "\n"; | |
} | |
// 砦名[0], 君主名[1], 座標[3], ★[5] | |
if( valueA[5] != "" ){ | |
if( ikibaku_flg == 1 ){ | |
putText = putText + groupTxt + '領土/' + userTxt + '/' + valueA[0] + linkText + '/' + valueA[5] + '/学' + valueA[7] + '/体' + valueA[8] + '/武' + valueA[9] + '/糧' + valueA[10]; | |
} | |
else{ | |
putText = putText + groupTxt + '領土/' + userTxt + '/' + valueA[0] + linkText + '/' + valueA[5] + '/木' + valueA[7] + '/石' + valueA[8] + '/鉄' + valueA[9] + '/糧' + valueA[10]; | |
} | |
} | |
else{ | |
putText = putText + groupTxt + '領土/' + userTxt + '<b><font color="#FF0000">拠点</font></b>/' + valueA[0] + '/人口' + valueA[2] + linkText; | |
} | |
// 資源表示の有無で関数が変わる | |
if( res_mode == 0 ){ | |
// パステルカラー表示 | |
disp_AreaIcon(cx,cy,landLevel,viewSize,100); | |
} | |
else{ | |
// 資源別着色表示 | |
disp_AreaIcon2(cx,cy,landLevel,viewSize,100 + strongflg*1000,maxtype); | |
} | |
} | |
} | |
else if( matchcase != -1 ){ | |
// 個人・同盟検索結果がマッチ | |
if( nodisp[matchcase] == 0 ){ | |
// 画面に☆数を出す場合 | |
// ☆数による絞り込み | |
if( ((chkflg1.charAt(FLAG1_LV1) == '1') && (landLevel == 1)) | |
|| ((chkflg1.charAt(FLAG1_LV2) == '1') && (landLevel == 2)) | |
|| ((chkflg1.charAt(FLAG1_LV3) == '1') && (landLevel == 3)) | |
|| ((chkflg1.charAt(FLAG1_LV4) == '1') && (landLevel == 4)) | |
|| ((chkflg1.charAt(FLAG1_LV5) == '1') && (landLevel == 5)) | |
|| ((chkflg1.charAt(FLAG1_LV6) == '1') && (landLevel == 6)) | |
|| ((chkflg1.charAt(FLAG1_LV7) == '1') && (landLevel == 7)) | |
|| ((chkflg1.charAt(FLAG1_LV8) == '1') && (landLevel == 8)) | |
|| ((chkflg1.charAt(FLAG1_LV9) == '1') && (landLevel == 9)) ){ | |
// 領土情報は検索結果に反映 | |
if( putText != "" ){ | |
putText = putText + "\n"; | |
} | |
// 砦名[0], 君主名[1], 座標[3], ★[5] | |
if( valueA[5] != "" ){ | |
if( ikibaku_flg == 1 ){ | |
putText = putText + groupTxt + '領土/' + userTxt + '/' + valueA[0] + linkText + '/' + valueA[5] + '/学' + valueA[7] + '/体' + valueA[8] + '/武' + valueA[9] + '/糧' + valueA[10]; | |
} | |
else{ | |
putText = putText + groupTxt + '領土/' + userTxt + '/' + valueA[0] + linkText + '/' + valueA[5] + '/木' + valueA[7] + '/石' + valueA[8] + '/鉄' + valueA[9] + '/糧' + valueA[10]; | |
} | |
} | |
else{ | |
putText = putText + groupTxt + '領土/' + userTxt + '<b><font color="#FF0000">拠点</font></b>/' + valueA[0] + '/人口' + valueA[2] + linkText; | |
} | |
// 資源表示の有無で関数が変わる | |
if( res_mode == 0 ){ | |
// パステルカラー表示 | |
disp_AreaIcon(cx,cy,landLevel,viewSize,100 + colorNo[matchcase]); | |
} | |
else{ | |
// 資源別着色表示 | |
disp_AreaIcon2(cx,cy,landLevel,viewSize,100 + colorNo[matchcase] + strongflg*1000,maxtype); | |
} | |
} | |
else{ | |
// ☆数の絞り込み対象外となった土地は枠のみつける | |
disp_AreaIcon(cx,cy,landLevel,viewSize,colorNo[matchcase]); | |
} | |
} | |
else{ | |
// 画面に☆数を出さない(領土の着色のみ行う) | |
// 枠のみつける | |
disp_AreaIcon(cx,cy,landLevel,viewSize,colorNo[matchcase]); | |
} | |
} | |
} | |
// 空き地検索結果 | |
if( (chkflg2.charAt(FLAG2_EMPTY) == '1') && (valueA[1] == '') ){ | |
// 空き地(空き地同時検索を除き、個人/同盟領土検索時は出さない) | |
if( ((chkflg1.charAt(FLAG1_LV1) == '1') && (landLevel == 1)) | |
|| ((chkflg1.charAt(FLAG1_LV2) == '1') && (landLevel == 2)) | |
|| ((chkflg1.charAt(FLAG1_LV3) == '1') && (landLevel == 3)) | |
|| ((chkflg1.charAt(FLAG1_LV4) == '1') && (landLevel == 4)) | |
|| ((chkflg1.charAt(FLAG1_LV5) == '1') && (landLevel == 5)) | |
|| ((chkflg1.charAt(FLAG1_LV6) == '1') && (landLevel == 6)) | |
|| ((chkflg1.charAt(FLAG1_LV7) == '1') && (landLevel == 7)) | |
|| ((chkflg1.charAt(FLAG1_LV8) == '1') && (landLevel == 8)) | |
|| ((chkflg1.charAt(FLAG1_LV9) == '1') && (landLevel == 9)) ){ | |
if( putText != "" ){ | |
putText = putText + "\n"; | |
} | |
// 座標[3], ★[5], 木[7], 石[8], 鉄[9], 糧[10] | |
if( ikibaku_flg == 1 ){ | |
putText = putText + '空き地★' + landLevel + linkText + '/学' + valueA[7] + '/体' + valueA[8] + '/武' + valueA[9] + '/糧' + valueA[10]; | |
} | |
else{ | |
putText = putText + '空き地★' + landLevel + linkText + '/木' + valueA[7] + '/石' + valueA[8] + '/鉄' + valueA[9] + '/糧' + valueA[10]; | |
} | |
var drawColor; | |
if( chkflg2.charAt(FLAG2_EMPTY_DRAW) == "1" ){ | |
// 空き地着色モード有効時 | |
drawColor = parseInt(chkflg2.charAt(FLAG2_EMPTY_DRAW_COLOR)) + 1; | |
} | |
else{ | |
drawColor = 0; | |
} | |
drawColor = drawColor + 100 + strongflg*1000; // drawColor > 100で着色 | |
if( res_mode == 0 ){ | |
disp_AreaIcon(cx,cy,landLevel,viewSize,drawColor); | |
} | |
else{ | |
disp_AreaIcon2(cx,cy,landLevel,viewSize,drawColor,maxtype); | |
} | |
} | |
else if( chkflg2.charAt(FLAG2_EMPTY_DRAW) == "1" ){ | |
// 空き地着色モード有効時 | |
drawColor = parseInt(chkflg2.charAt(FLAG2_EMPTY_DRAW_COLOR)) + 1; | |
disp_AreaIcon(cx,cy,valueA[5].length,viewSize,drawColor); | |
} | |
} | |
else if( (chkflg2.charAt(FLAG2_EMPTY_DRAW) == "1") && (valueA[1] == '') ){ | |
// 空き地着色モード有効時 | |
drawColor = parseInt(chkflg2.charAt(FLAG2_EMPTY_DRAW_COLOR)) + 1; | |
disp_AreaIcon(cx,cy,valueA[5].length,viewSize,drawColor); | |
} | |
} | |
// 結果をTextAreaに表示 | |
textArea.snapshotItem(0).innerHTML = putText; | |
//------------------// | |
// 本拠地一覧の描画 // | |
//------------------// | |
if( chkflg2.charAt(FLAG2_OWNER) == '1' ){ | |
var baseinfodv = $e_7('//*[@id="baseinfo_dv"]'); | |
baseinfodv.snapshotItem(0).style.display = "inline"; | |
//----------------------------------// | |
// マップデータから本拠地一覧を作る // | |
//----------------------------------// | |
var areasrc = document.evaluate('//*[@id="mapsAll"]//img/@src', | |
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
var areacls = document.evaluate('//*[@id="mapsAll"]//img/@class', | |
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
var baseText = $e_7('//*[@id="baseInfoText"]'); | |
var blank = ' '; | |
var outTextLine = new Array(); | |
var outLineMax = 0; | |
var outLine = 0; | |
for (var i = 0; i < 9; i++ ){ | |
outTextLine[i] = ''; | |
} | |
for (var i=0; i < areacls.snapshotLength-1; i++) { | |
// 施設情報を全てリスト | |
var rowTextA = areasrc.snapshotItem(i).textContent | |
rowTextA = rowTextA.replace(/^.*\//,''); | |
var clsText = areacls.snapshotItem(i).textContent; | |
clsText = clsText.replace(/^mapAll0*/,''); | |
var clsNo = parseInt(clsText) - 1; | |
// 城の情報をチェック | |
if( rowTextA.substr(0,7) == 'capital' ){ | |
// テキストデータ | |
var text = areas.snapshotItem(clsNo).textContent; | |
// 城の情報を抽出 | |
var rowText = areas.snapshotItem(clsNo).textContent; | |
var rowText2 = href.snapshotItem(clsNo).textContent; | |
rowText = rowText.replace(/^.*rewrite\(/, ""); | |
rowText = rowText.replace(/\); .*$/, ""); | |
var bkText = rowText; | |
rowText = rowText.replace(/\//g,"==uZer=="); | |
rowText = rowText.replace(/', '/g,"'/'"); | |
rowText = rowText.replace(/'/g,""); | |
var valueA = new Array(); | |
valueA = rowText.split('/'); | |
valueA[1] = valueA[1].replace(/==uZer==/,"/"); | |
if( valueA[11] != '1' ){ | |
// NPC砦ではない | |
// マップ座標の取得 | |
var rowText3 = valueA[3]; | |
rowText3 = rowText3.replace(/\(/,""); | |
rowText3 = rowText3.replace(/\)/,""); | |
var valueB = new Array(); | |
valueB = rowText3.split(','); | |
var cx = parseInt(valueB[0]); | |
var cy = parseInt(valueB[1]); | |
// テキストの生成 | |
var data2 = '(' + formatRightNumber(cx,4) + ',' + formatRightNumber(cy,4) + ') '; | |
if( rowTextA.substr(0,9) == 'capital_r' ){ | |
// 他同盟 | |
data2 = data2 + '<font color="red" >' | |
}else if( rowTextA.substr(0,9) == 'capital_g' ){ | |
// 自同盟 | |
data2 = data2 + '<font color="green" >' | |
}else if( rowTextA.substr(0,10) == 'capital_bk' ){ | |
// 自配下 | |
data2 = data2 + '<font color="black" >' | |
}else if( rowTextA.substr(0,10) == 'capital_bg' ){ | |
// 同盟が配下 | |
data2 = data2 + '<font color="cyan" >' | |
}else if( rowTextA.substr(0,9) == 'capital_b' ){ | |
// プレイヤー | |
data2 = data2 + '<font color="blue" >' | |
}else if( rowTextA.substr(0,9) == 'capital_o' ){ | |
// 他配下 | |
data2 = data2 + '<font color="orange">' | |
}else if( rowTextA.substr(0,9) == 'capital_y' ){ | |
// 不可侵 | |
data2 = data2 + '<font color="yellow">' | |
} | |
data2 = data2 + valueA[1] + blank.substr(jstrlen(valueA[1])) + '</font>'; | |
outTextLine[outLine] = outTextLine[outLine] + data2; | |
if( outLine == 8 ){ | |
outLine = 0; | |
} | |
else{ | |
outLine = outLine + 1; | |
if( outLine > outLineMax ){ | |
outLineMax = outLine; | |
} | |
} | |
} | |
} | |
} | |
var outText = ''; | |
for( var i = 0; i < outLineMax; i++ ){ | |
// テキストの生成 | |
if( outText != '' ){ | |
outText = outText + '<br>'; | |
} | |
outText = outText + outTextLine[i]; | |
} | |
if( outText != '' ){ | |
baseText.snapshotItem(0).innerHTML = '<font color="brown"><b>本拠地リスト</b></font><br>' + outText; | |
} | |
} | |
else{ | |
var baseinfodv = $e_7('//*[@id="baseinfo_dv"]'); | |
baseinfodv.snapshotItem(0).style.display = "none"; | |
} | |
//----------------// | |
// 方位表示の描画 // | |
//----------------// | |
if( chkflg2.charAt(FLAG2_DIRECTION) == '1' ){ | |
var dv2; | |
var img; | |
// 方位アイコン(東) | |
img = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACAAAAAiCAYAAAA+stv/AAAABnRSTlMAwADAAMCNeLu6AAABIUlEQVR42tWXaw6EIAyEtydbj86eTOMmNezY'+ | |
'aSsiZPuTDPbrA6hSSnnNNGkBWJb3aq2X8pFhACsgiEwEEJmcgSh6LFmtfRxAnateKtW+5wvAmsozqwQZLUIfAOtlhHt2AngyA8wOgNo0G1gr'+ | |
'S4PRoAadmZlgAFF0VzTeMQ0BehmDGJKBWtcE0NoDmdtyWAbYZTW0B5oApmegZw/8ZwZ6WdcMsNftkQzoRnzXWZS7qf42gPdBdGwNHGhpANwU'+ | |
'Ra9OW+bEcCSznNcRY9RsPf0cZ5xba16mPBAK4A2TDIBBWyAK4/YAGyiiDs+emBNANELXuuxI5jWuOZRmxqjsGfd66KcE1tlnzq8AWCVFrTmW'+ | |
'R2eXXVbRHuv7XX7PW35KbwH0tA1E3rSyVRg+QgAAAABJRU5ErkJggg=='; | |
dv2 = d_7.createElement("div"); | |
dv2.style.position = "absolute"; | |
dv2.style.top = "390px"; | |
dv2.style.left = "500px"; | |
dv2.style.zIndex = 500; | |
dv2.id = "icon_east"; | |
dv2.innerHTML = '<img src="' + img + '">'; | |
$d("datas").parentNode.appendChild(dv2); | |
// 方位アイコン(西) | |
img = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAAABnRSTlMAwADAAMCNeLu6AAAA9klEQVR42u2YYQ7DIAiF58nWo7uTubjMhlJA'+ | |
'EHRd0vevWvXzFdA05ZwfV1BaCbJtzwKfc36l5SANonxRUjrCfEAw6SwVtAqE2UHKEpSzKswBZGRXbUdUm0U7iFbYOQ4EBqHamRtEApHy3AvS'+ | |
'm/sEgvMcyxOsXA0RQWYLOyeCULsbdYQqZiYQ+PJojHDjLgGiDtYIEJgpYSDc6dkDqX21LRSE6tOM+RkIVCiIdKmhag8VO7jfDKKNA4uGQaQa'+ | |
'wGUGXtj9adoC0B3NoYblAuFcsCqkoEkuLAXxAExxxKuQGInW/zoyI0a4DBQvz9SAUZDenEv/Bkh6A3xNvDBXWpYCAAAAAElFTkSuQmCC'; | |
dv2 = d_7.createElement("div"); | |
dv2.style.position = "absolute"; | |
dv2.style.top = "145px"; | |
dv2.style.left = "220px"; | |
dv2.style.zIndex = 500; | |
dv2.id = "icon_west"; | |
dv2.innerHTML = '<img src="' + img + '">'; | |
$d("datas").parentNode.appendChild(dv2); | |
// 方位アイコン(南) | |
img = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAABnRSTlMAwADAAMCNeLu6AAABAUlEQVR42u2XaxLCIAyE5WT26HiyOnUmHVzz'+ | |
'wJDQjnZ/0kC/hOVVaq23M6h4QZblvnLttT7KdJAVUEq5QN4hNp0CxILgfEV9poEQhFTFF4i0Aixxg/bGYwI7yOpCGdcHyIyKSNpBWiGUNO9e'+ | |
'j0hjsiD0AytLj0ekZa6CZImDMUHaTNuMrCphnLULd4FsHXAfwKykfYL6hoF4vhFoz3GQAsJNn7XCQkDaaSEIhAoBkbJDI1Mb54dhkAyFVQSr'+ | |
'YMVxsUMe6Y3jzq4Uj/RUBL+FgER75v884on9bZC0VeMB0Qx+SEW0m3s6SBuDQK6rovaM1F5tErQ2nvsW/42sGzwLcpSeYYfishi2CCMAAAAA'+ | |
'SUVORK5CYII='; | |
dv2 = d_7.createElement("div"); | |
dv2.style.position = "absolute"; | |
dv2.style.top = "390px"; | |
dv2.style.left = "220px"; | |
dv2.style.zIndex = 500; | |
dv2.id = "icon_south"; | |
dv2.innerHTML = '<img src="' + img + '">'; | |
$d("datas").parentNode.appendChild(dv2); | |
// 方位アイコン(南) | |
img = 'data:image/png;base64,'+ | |
'iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAAABnRSTlMAwADAAMCNeLu6AAABAElEQVR42u3WXQ7DIAgA4HGy9ejuZDZLZovI'+ | |
'n0aM2cZjNfoFLQIppccOAV7IcTwz9z2lF2hjIZBMtgO4IdLY70DgswUHwWNLIGUjbWw7CL7QHHIJpCDecwAR8JxlEO4yY0w4BGejOQ5gIFJR'+ | |
'wtELkRDc8VSQbFL8EAlPAddYVEbwfA3QQKzovSMUYdWVEIg3C0sy4gWEQ7Yt8X/I90JwoZsBkdoBFkKrrPVg9UJKO9BAuPLOFahZGVEh2oNH'+ | |
'345RCG2Q3BAgS81oFaU3qDoarUyPlHjPcZc9mjYA95Vau2c9et4o61R/jdZpj7aDFqLJiBXeTr03hppnaZEZ4YZExwnhd/gwvUipkQAAAABJ'+ | |
'RU5ErkJggg=='; | |
dv2 = d_7.createElement("div"); | |
dv2.style.position = "absolute"; | |
dv2.style.top = "145px"; | |
dv2.style.left = "500px"; | |
dv2.style.zIndex = 500; | |
dv2.id = "icon_north"; | |
dv2.innerHTML = '<img src="' + img + '">'; | |
$d("datas").parentNode.appendChild(dv2); | |
} | |
//--------------// | |
// 出兵情報共有 // | |
//--------------// | |
unionAttackInfo(); | |
} | |
//----------------// | |
// 領土情報の検索 // | |
//----------------// | |
//拠点の作業中情報を取得 | |
function getNPCCastleInfo_51(drawflag) { | |
//--------------------------------------// | |
// チェックボックスに関する情報をロード // | |
//--------------------------------------// | |
var chkflg1; | |
var chkflg2; | |
execFlag = loadExecFlag(location.hostname, "FLAG0"); | |
if( execFlag == "" ){ | |
// 表示フラグをロード | |
var execFlag1 = loadExecFlag(location.hostname, "FLAG1"); | |
if( execFlag1 == "" ){ | |
chkflg1 = new String(FLAG1); // 初期値 | |
} | |
else{ | |
chkflg1 = execFlag1; | |
} | |
// オプションフラグをロード | |
var execFlag2 = loadExecFlag(location.hostname, "FLAG2"); | |
if( execFlag2 == "" ){ | |
chkflg2 = new String(FLAG2); // 初期値 | |
} | |
else{ | |
chkflg2 = execFlag2; | |
} | |
// 初回のときは、フラグを保存 | |
execFlag = chkflg1 + DELIMIT1_7 + chkflg2; | |
saveExecFlag(location.hostname, "FLAG0", execFlag); | |
} | |
else{ | |
var loadflg = new Array(); | |
loadflg = execFlag.split(DELIMIT1_7); | |
chkflg1 = loadflg[0]; | |
chkflg2 = loadflg[1]; | |
} | |
// 個人、同盟検索情報をロード | |
var chkflg3 = new Array(); | |
execFlag = loadExecFlag(location.hostname, "FLAG3"); | |
if( execFlag == "" ){ | |
var execFlag3 = loadExecFlag(location.hostname, "FLAG3-1"); | |
if( execFlag3 == "" ){ | |
chkflg3[0] = new String(FLAG3_1); // 初期値 | |
} | |
else{ | |
chkflg3[0] = execFlag3; | |
} | |
execFlag3 = loadExecFlag(location.hostname, "FLAG3-2"); | |
if( execFlag3 == "" ){ | |
chkflg3[1] = new String(FLAG3_2); // 初期値 | |
} | |
else{ | |
chkflg3[1] = execFlag3; | |
} | |
execFlag3 = loadExecFlag(location.hostname, "FLAG3-3"); | |
if( execFlag3 == "" ){ | |
chkflg3[2] = new String(FLAG3_3); // 初期値 | |
} | |
else{ | |
chkflg3[2] = execFlag3; | |
} | |
// 初回のときは、フラグを保存 | |
execFlag = chkflg3[0] + DELIMIT1_7 + chkflg3[1] + DELIMIT1_7 + chkflg3[2]; | |
saveExecFlag(location.hostname, "FLAG3", execFlag); | |
} | |
else{ | |
chkflg3 = execFlag.split(DELIMIT1_7); | |
} | |
//-------------------------------------------------// | |
// 51x51モード未使用設定の場合、なにもしないで戻る // | |
//-------------------------------------------------// | |
if( chkflg2.charAt(FLAG2_NOEXEC51) == '1' ){ | |
return; | |
} | |
//----------------------// | |
// 処理パラメータの抽出 // | |
//----------------------// | |
//-- データ絞り込み時のユーザー名情報の取得 --// | |
var checkBox1; | |
var checkBox2; | |
var userBox; | |
var listbox; | |
var userName = new Array(); | |
var userText; | |
var fullmatch = new Array(); | |
var nodisp = new Array(); | |
var target = new Array(); | |
var colorNo = new Array(); | |
for( var i = 0; i < 3; i++ ){ | |
fullmatch[i] = 0; | |
nodisp[i] = 0; | |
target[i] = 0; | |
colorNo[i] = 0; | |
} | |
// 個人・同盟検索1 | |
checkBox1 = $e_7('//*[@id="ckEnable1"]'); | |
if( checkBox1.snapshotItem(0).checked == true ){ | |
// 個人・同盟の別 | |
checkBox2 = $e_7('//*[@id="ckType1"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
target[0] = 1; | |
} | |
else{ | |
target[0] = 2; | |
} | |
// 完全一致 | |
checkBox2 = $e_7('//*[@id="ckFullMatch1"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
fullmatch[0] = 1; | |
} | |
else{ | |
fullmatch[0] = 0; | |
} | |
// ☆表示 | |
checkBox2 = $e_7('//*[@id="ckLevelSearch1"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
nodisp[0] = 1; | |
} | |
else{ | |
nodisp[0] = 0; | |
} | |
userBox = $e_7('//*[@id="userBox1"]'); | |
userText = userBox.snapshotItem(0).value; | |
userName[0] = new Array(); | |
userName[0] = userText.split(OWNER_SPLITKEY); | |
// 枠色 | |
listbox = $e_7('//*[@id="lsColor1"]'); | |
colorNo[0] = listbox.snapshotItem(0).selectedIndex + 1; | |
} | |
else{ | |
userName[0] = ""; | |
} | |
// 個人・同盟検索2 | |
checkBox1 = $e_7('//*[@id="ckEnable2"]'); | |
if( checkBox1.snapshotItem(0).checked == true ){ | |
// 個人・同盟の別 | |
checkBox2 = $e_7('//*[@id="ckType2"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
target[1] = 1; | |
} | |
else{ | |
target[1] = 2; | |
} | |
// 完全一致 | |
checkBox2 = $e_7('//*[@id="ckFullMatch2"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
fullmatch[1] = 1; | |
} | |
else{ | |
fullmatch[1] = 0; | |
} | |
// ☆表示 | |
checkBox2 = $e_7('//*[@id="ckLevelSearch2"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
nodisp[1] = 1; | |
} | |
else{ | |
nodisp[1] = 0; | |
} | |
userBox = $e_7('//*[@id="userBox2"]'); | |
userText = userBox.snapshotItem(0).value; | |
userName[1] = new Array(); | |
userName[1] = userText.split(OWNER_SPLITKEY); | |
// 枠色 | |
listbox = $e_7('//*[@id="lsColor2"]'); | |
colorNo[1] = listbox.snapshotItem(0).selectedIndex + 1; | |
} | |
else{ | |
userName[1] = ""; | |
} | |
// 個人・同盟検索3 | |
checkBox1 = $e_7('//*[@id="ckEnable3"]'); | |
if( checkBox1.snapshotItem(0).checked == true ){ | |
// 個人・同盟の別 | |
checkBox2 = $e_7('//*[@id="ckType3"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
target[2] = 1; | |
} | |
else{ | |
target[2] = 2; | |
} | |
// 完全一致 | |
checkBox2 = $e_7('//*[@id="ckFullMatch3"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
fullmatch[2] = 1; | |
} | |
else{ | |
fullmatch[2] = 0; | |
} | |
// ☆表示 | |
checkBox2 = $e_7('//*[@id="ckLevelSearch3"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
nodisp[2] = 1; | |
} | |
else{ | |
nodisp[2] = 0; | |
} | |
userBox = $e_7('//*[@id="userBox3"]'); | |
userText = userBox.snapshotItem(0).value; | |
userName[2] = new Array(); | |
userName[2] = userText.split(OWNER_SPLITKEY); | |
// 枠色 | |
listbox = $e_7('//*[@id="lsColor3"]'); | |
colorNo[2] = listbox.snapshotItem(0).selectedIndex + 1; | |
} | |
else{ | |
userName[2] = ""; | |
} | |
//-- 資源判別ONのとき、資源表示 --// | |
var res_mode; | |
var areaNo; | |
var areaNo2; | |
var areaNo3; | |
if( chkflg2.charAt(FLAG2_ANALYZE) == '1' ){ | |
res_mode = 1; | |
} | |
else{ | |
res_mode = 0; | |
} | |
// 強調表示選択値を取得 | |
areaNo = parseInt(chkflg2.substr(FLAG2_STRONG_AREANO,3)); | |
areaNo2 = parseInt(chkflg2.substr(FLAG2_STRONG_AREANO2,3)); | |
areaNo3 = parseInt(chkflg2.substr(FLAG2_STRONG_AREANO3,3)); | |
//------------------// | |
// 画面サイズの取得 // | |
//------------------// | |
var viewSize = 51; | |
//-------------------------// | |
// 51x51モードへの設定反映 // | |
//-------------------------// | |
// 処理データの取得 | |
var href = $e_7('//*[@id="map51-content"]//div/a'); | |
var redrawX = new Array(); | |
var redrawY = new Array(); | |
if( drawflag == 1 ){ | |
if( (autoroute == AUTO_ROUTE_EDIT_LAST) || (autoroute == AUTO_ROUTE_NONE) ){ | |
// 始点を配列に保存 | |
redrawX[0] = autoroute_f[0]; | |
redrawY[0] = autoroute_f[1]; | |
} | |
// 終点を配列に保存 | |
redrawX[1] = autoroute_l[0]; | |
redrawY[1] = autoroute_l[1]; | |
// ルート構築ビューの中身を配列に保存 | |
var pos = 2; | |
var baseText = $e_7('//*[@id="routeInfoText"]'); | |
var text = baseText.snapshotItem(0).innerHTML; | |
if( text != "" ){ | |
var text2 = text.split("<br>"); | |
for( var i = 0; i < text2.length; i++ ){ | |
if( (i == 0) && (autoroute != AUTO_ROUTE_EDIT_FIRST) ){ | |
continue; | |
} | |
var list = text2[i].match(/(([-]*\d+),([-]*\d+))/); | |
redrawX[pos] = list[2]; | |
redrawY[pos] = list[3]; | |
pos = pos + 1; | |
} | |
} | |
} | |
var maxcount; | |
if( drawflag == 0 ){ | |
maxcount = href.snapshotLength; | |
} | |
else{ | |
maxcount = redrawX.length; | |
} | |
for( var i = 0; i < maxcount; i++ ){ | |
// for( var i = 0; i < 10; i++ ){ | |
var dt; | |
if( drawflag == 0 ){ | |
dt = href.snapshotItem(i); | |
} | |
else{ | |
dt = $x_7("//div[@id=\"map51-content\"]//a[@href=\"/land.php?x=" + redrawX[i] + "&y=" + redrawY[i] + "#ptop\"]"); | |
if( (dt == null) || (dt == undefined) ){ | |
continue; | |
} | |
} | |
var text = trim_7(dt.innerHTML); | |
var p; | |
var user = ""; | |
var group = ""; | |
var land = ""; | |
var landLevel = 0; | |
var space = 0; | |
// いま設定されている着色指定を解除 | |
if( text.indexOf("font") >= 0 ){ | |
text = text.substr(text.indexOf("</font>")-1,1); | |
if( text == "S" ){ | |
text = autoroute_f[2]; | |
} | |
else if( text == "E" ){ | |
text = autoroute_l[2]; | |
} | |
} | |
// 砦などの表示を英字に変更 | |
if( text == "村" ){ | |
text = "V"; | |
} else if( text == "砦" ){ | |
text = "F"; | |
} else if( text == "城" ){ | |
text = "C"; | |
} | |
//----------------------// | |
// 個人・同盟検索の判定 // | |
//----------------------// | |
var matchcase = -1; // マッチしたパターン | |
// 同盟名、個人名の取得 | |
p = dt.parentNode.innerHTML.match(/君主名<\/dt><dd>(.*)<\/dd><dt>座標/); | |
if( p != undefined ){ | |
user = p[1]; | |
} | |
else{ | |
p = dt.parentNode.innerHTML.match(/君主名<\/dt><dd>(.*)<\/dd><dt>座標/); | |
if( p != undefined ){ | |
user = p[1]; | |
} | |
} | |
p = dt.parentNode.innerHTML.match(/君主名<\/dt><dd>(.*)<\/dd><dt>人口/); | |
if( p != undefined ){ | |
user = p[1]; | |
} | |
else{ | |
p = dt.parentNode.innerHTML.match(/君主名<\/dt><dd>(.*)<\/dd><dt>人口/); | |
if( p != undefined ){ | |
user = p[1]; | |
} | |
} | |
p = dt.parentNode.innerHTML.match(/同盟名<\/dt><dd>(.*)<\/dd><dt>戦力/); | |
if( p != undefined ){ | |
group = p[1]; | |
} | |
else{ | |
p = dt.parentNode.innerHTML.match(/同盟名<\/dt><dd>(.*)<\/dd><dt>戦力/); | |
if( p != undefined ){ | |
group = p[1]; | |
} | |
} | |
p = dt.parentNode.innerHTML.match(/同盟名<\/dt><dd class="bottom-popup-r">(.*)<\/dd><\/dl>/); | |
if( p != undefined ){ | |
group = p[1]; | |
} | |
else{ | |
p = dt.parentNode.innerHTML.match(/同盟名<\/dt><dd class="bottom-popup-r">(.*)<\/dd><\/dl>/); | |
if( p != undefined ){ | |
group = p[1]; | |
} | |
} | |
p = dt.parentNode.innerHTML.match(/戦力<\/dt><dd>(.*)<\/dd><dt class=/); | |
if( p != undefined ){ | |
land = p[1]; | |
landLevel = land.length; | |
if(text == " "){ | |
text = landLevel; | |
} | |
} | |
else{ | |
p = dt.parentNode.innerHTML.match(/戦力<\/dt><dd>(.*)<\/dd><dt class=/); | |
if( p != undefined ){ | |
land = p[1]; | |
landLevel = land.length; | |
if(text == " "){ | |
text = landLevel; | |
} | |
} | |
} | |
if( dt.parentNode.innerHTML.indexOf(">空き地<") >= 0 ){ | |
space = 1; | |
} | |
else if( dt.parentNode.innerHTML.indexOf(">空き地<") >= 0 ){ | |
space = 1; | |
} | |
// 個人・同盟マッチチェック | |
for( var j = 0; j < 3; j++ ){ | |
for( var k = 0; k < userName[j].length; k++ ){ | |
// 検索有効時 username に値が入る | |
if( userName[j][k] != "" ){ | |
// ターゲットが個人 | |
if( target[j] == 1 ){ | |
// 完全一致かつ、ユーザー名が一致 | |
if( (fullmatch[j] == 1) && (user == userName[j][k]) ){ | |
matchcase = j; | |
break; | |
} | |
// 部分一致かつ、ユーザー名が一致 | |
if( (fullmatch[j] == 0) && (user.indexOf(userName[j][k]) != -1) ){ | |
matchcase = j; | |
break; | |
} | |
} | |
// ターゲットが同盟 | |
else{ | |
// 完全一致かつ、ユーザー名が一致 | |
if( (fullmatch[j] == 1) && (group == userName[j][k]) ){ | |
matchcase = j; | |
break; | |
} | |
// 部分一致かつ、ユーザー名が一致 | |
if( (fullmatch[j] == 0) && (group.indexOf(userName[j][k]) != -1) ){ | |
matchcase = j; | |
break; | |
} | |
} | |
} | |
} | |
if( matchcase != -1 ){ | |
break; | |
} | |
} | |
//-----------------// | |
// cssデータの作成 // | |
//-----------------// | |
var css = ""; | |
var strong = 0; // 太字にするか | |
if( space == 0 ){ | |
// 領地化されている土地 | |
if( (matchcase == -1) && (chkflg2.charAt(FLAG2_LAND) == '1') ){ | |
// 個人・同盟検索に該当せず、領土検索がオンの場合 | |
// ☆数による絞り込み | |
if( ((chkflg1.charAt(FLAG1_LV1) == '1') && (landLevel == 1)) | |
|| ((chkflg1.charAt(FLAG1_LV2) == '1') && (landLevel == 2)) | |
|| ((chkflg1.charAt(FLAG1_LV3) == '1') && (landLevel == 3)) | |
|| ((chkflg1.charAt(FLAG1_LV4) == '1') && (landLevel == 4)) | |
|| ((chkflg1.charAt(FLAG1_LV5) == '1') && (landLevel == 5)) | |
|| ((chkflg1.charAt(FLAG1_LV6) == '1') && (landLevel == 6)) | |
|| ((chkflg1.charAt(FLAG1_LV7) == '1') && (landLevel == 7)) | |
|| ((chkflg1.charAt(FLAG1_LV8) == '1') && (landLevel == 8)) | |
|| ((chkflg1.charAt(FLAG1_LV9) == '1') && (landLevel == 9)) ){ | |
// レベル表示指定のとき、太字にする | |
strong = 1; | |
} | |
} | |
} | |
if( (space == 1) && (chkflg2.charAt(FLAG2_EMPTY) == '1') ){ | |
// 空き地かつ、空き地検索が有効 | |
if( ((chkflg1.charAt(FLAG1_LV1) == '1') && (landLevel == 1)) | |
|| ((chkflg1.charAt(FLAG1_LV2) == '1') && (landLevel == 2)) | |
|| ((chkflg1.charAt(FLAG1_LV3) == '1') && (landLevel == 3)) | |
|| ((chkflg1.charAt(FLAG1_LV4) == '1') && (landLevel == 4)) | |
|| ((chkflg1.charAt(FLAG1_LV5) == '1') && (landLevel == 5)) | |
|| ((chkflg1.charAt(FLAG1_LV6) == '1') && (landLevel == 6)) | |
|| ((chkflg1.charAt(FLAG1_LV7) == '1') && (landLevel == 7)) | |
|| ((chkflg1.charAt(FLAG1_LV8) == '1') && (landLevel == 8)) | |
|| ((chkflg1.charAt(FLAG1_LV9) == '1') && (landLevel == 9)) ){ | |
// レベル表示指定のとき、太字にする | |
strong = 1; | |
} | |
} | |
// 個人・同盟マッチ判定 | |
if( matchcase != -1 ){ | |
// 枠着色CSSの追加 | |
css = css + 'border-style: solid; border-color: ' + cname_en[colorNo[matchcase]-1] + '; background-color: white; '; | |
if( nodisp[matchcase] == 0 ){ | |
if( ((chkflg1.charAt(FLAG1_LV1) == '1') && (landLevel == 1)) | |
|| ((chkflg1.charAt(FLAG1_LV2) == '1') && (landLevel == 2)) | |
|| ((chkflg1.charAt(FLAG1_LV3) == '1') && (landLevel == 3)) | |
|| ((chkflg1.charAt(FLAG1_LV4) == '1') && (landLevel == 4)) | |
|| ((chkflg1.charAt(FLAG1_LV5) == '1') && (landLevel == 5)) | |
|| ((chkflg1.charAt(FLAG1_LV6) == '1') && (landLevel == 6)) | |
|| ((chkflg1.charAt(FLAG1_LV7) == '1') && (landLevel == 7)) | |
|| ((chkflg1.charAt(FLAG1_LV8) == '1') && (landLevel == 8)) | |
|| ((chkflg1.charAt(FLAG1_LV9) == '1') && (landLevel == 9)) ){ | |
// 枠表示のみでなく、指定領土レベル以上のばあい、太字にする | |
strong = 1; | |
} | |
} | |
} | |
// 太字処理 | |
if( (strong == 1) && (landLevel > 0) ){ | |
// 太字化CSSの追加 資源判別オンのときのみ | |
if( res_mode == 1 ){ | |
css = css + 'text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;'; | |
} | |
} | |
else if( landLevel != 0 ){ | |
// 拠点以外の場合、灰色化CSSの追加 | |
css = css + 'color: transparent; '; | |
} | |
// 資源判別(太字処理のときのみ) | |
if( (strong == 1) && (res_mode == 1) ){ | |
p = dt.parentNode.innerHTML.match(/.*木(\d+)&nbsp;岩(\d+)&nbsp;鉄(\d+)&nbsp;糧(\d+).*/); | |
if( p != undefined ){ | |
// マッチ | |
var maxres = -1; | |
var maxpos = -1; | |
var multi = 0; | |
for( var j = 1; j < 5; j++ ){ | |
if(p[j] > maxres){ | |
maxres = p[j]; | |
maxpos = j; | |
multi = 0; | |
} | |
else if( p[j] == maxres ){ | |
multi = 1; | |
} | |
} | |
var col; | |
if( multi == 1 ){ | |
col = "white"; | |
} | |
else if( maxpos == 1 ){ | |
col = "springgreen"; | |
} | |
else if( maxpos == 2 ){ | |
col = "aqua"; | |
} | |
else if( maxpos == 3 ){ | |
col = "orange"; | |
} | |
else if( maxpos == 4 ){ | |
col = "yellow"; | |
} | |
// 資源判別CSSの追加 | |
css = css + 'color: ' + col + '; '; | |
} | |
} | |
//---------------------------------// | |
// 生成したCSSをマップデータに反映 // | |
//---------------------------------// | |
var newText; | |
if( css != "" ){ | |
if( res_mode == 1 ){ | |
newText = '<b><font style="' + css + '">' + text + '</font></b>'; | |
} | |
else{ | |
newText = '<font style="' + css + '">' + text + '</font>'; | |
} | |
dt.innerHTML = newText; | |
} | |
else{ | |
newText = '<font>' + text + '</font>'; | |
dt.innerHTML = newText; | |
} | |
} | |
return; | |
} | |
//--------------// | |
// 出兵情報共有 // | |
//--------------// | |
function unionAttackInfo() | |
{ | |
//--------------// | |
// 出兵情報共有 // | |
//--------------// | |
// チェック情報 | |
var checkBox = $e_7('//*[@id="ckUnion"]'); | |
// 画面サイズの取得 | |
var viewSize; | |
viewSize = getViewSize(); | |
if( viewSize == 51 ){ | |
// 51x51だといまのとこなにもできないので戻る | |
return; | |
} | |
// 全体表示画面から、画面中央座標を手に入れる // | |
var codx = $e_7('//div[@id="datas"]/input[@id=\"x\"]'); | |
var cody = $e_7('//div[@id="datas"]/input[@id=\"y\"]'); | |
var bx = codx.snapshotItem(0).value; | |
var by = cody.snapshotItem(0).value; | |
var sx; | |
var sy; | |
var ex; | |
var ey; | |
// 左上座標を求める | |
if( viewSize == 11 ){ | |
sx = parseInt(bx) - 5; | |
sy = parseInt(by) + 5; | |
} | |
else if( viewSize == 15 ){ | |
sx = parseInt(bx) - 7; | |
sy = parseInt(by) + 7; | |
} | |
else{ | |
sx = parseInt(bx) - 10; | |
sy = parseInt(by) + 10; | |
} | |
ex = parseInt(sx) + (parseInt(viewSize) - 1) | |
ey = parseInt(sy) - (parseInt(viewSize) - 1) | |
// chromeでクロスドメイン処理がうまくいかないので、とりあえずFireFox限定 | |
if( /*(browserType != "Chrome") &&*/ (checkBox.snapshotItem(0).checked == true) && (spreadsheet != "") ){ //faraway コメントにしてある | |
GM_xmlhttpRequest({ | |
method:"GET", | |
url:spreadsheet, | |
onload:function(x){ | |
var rollover = $d("rollover"); | |
var textline = x.responseText.split('\n'); | |
var pos = -1; | |
var user = -1; | |
var pd = -1; | |
var com = -1; | |
var data = textline[0].split('\t'); | |
for( var j = 0; j < data.length; j++ ){ | |
if( data[j] == '座標' ){ | |
pos = j; | |
} | |
else if( data[j] == 'ユーザー' ){ | |
user = j; | |
} | |
else if( data[j] == '着弾時刻' ){ | |
pd = j; | |
} | |
else if( data[j] == '補足' ){ | |
com = j; | |
} | |
} | |
// サーバー時間の取得 | |
var svdata = document.evaluate('//span[@id="server_time"]', | |
document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
var time_text = svdata.snapshotItem(0).textContent; | |
var day = time_text.match(/(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)/); | |
var servertime = new Date(parseInt(day[1],10),parseInt(day[2],10)-1,parseInt(day[3],10),parseInt(day[4],10),parseInt(day[5],10),parseInt(day[6],10),0); | |
if( (pos >= 0) && (user >=0) && (pd >= 0) ){ | |
var stack = new Array(); | |
for( var i = 1; i < textline.length; i++ ){ | |
var data = textline[i].split('\t'); | |
var posv = data[pos].match(/([-]*\d+),([-]*\d+)/); | |
if((posv == null) || (posv.length < 2) || (posv[1] < sx) || (posv[1] > ex) || (posv[2] < ey) || posv[2] > sy ){ | |
// 画面外 | |
continue; | |
} | |
stack[0] = posv[1]; | |
stack[1] = posv[2]; | |
stack[2] = data[user]; | |
stack[3] = data[pd]; | |
var flagWill = false; //other | |
// 終了時間の取得 | |
day = stack[3].match(/(\d+)[\/-](\d+)[\/-](\d+) +(\d+):(\d+):(\d+)/); | |
if((day == null) || (day.length < 7)){ | |
flagWill = true; | |
} | |
if(!flagWill) { | |
var endtime = new Date(parseInt(day[1],10),parseInt(day[2],10)-1,parseInt(day[3],10),parseInt(day[4],10),parseInt(day[5],10),parseInt(day[6],10),0); | |
var waittime = endtime.getTime() - servertime.getTime(); | |
if( waittime < 0 ){ | |
continue; | |
} | |
} | |
// areaデータを取ってみる | |
var area_pos = $x_7("//map[@id=\"mapOverlayMap\"]//area[@href=\"land.php?x=" + posv[1] + "&y=" + posv[2] + "#ptop\"]"); | |
if( area_pos == null ){ | |
area_pos = $x_7("//map[@id=\"mapOverlayMap\"]//area[@href=\"land.php?x=" + posv[1] + "&y=" + posv[2] + "\"]"); | |
} | |
var list3 = area_pos.getAttribute("onmouseover").match(/'(\d+)px', '(\d+)px/); | |
var puttext = !flagWill ? " " + stack[2] + " " + stack[3] : ' 予定ルート'; | |
if( com != -1 ){ | |
if( data[com] != undefined ){ | |
puttext += " " + data[com]; | |
} | |
} | |
area_pos.title = area_pos.alt; | |
area_pos.title += puttext; | |
// クリックしたポイントに画像を埋め込む | |
var img = d_7.createElement("img"); | |
img.style.position = "absolute"; | |
img.style.left = list3[1] + "px"; | |
img.style.top = list3[2] + "px"; | |
// アイコンの決定 | |
if(flagWill) { | |
img.name = "RootIcon"; | |
img.src = root_icon; | |
} else { | |
img.src = atk_icon; | |
img.name = "atkIcon"; | |
} | |
if( viewSize == 15 ){ | |
img.style.width = "44px"; | |
img.style.height = "44px"; | |
img.style.zIndex = 227; | |
} else if( viewSize == 21 ){ | |
img.style.width = "33px"; | |
img.style.height = "33px"; | |
img.style.zIndex = 444; | |
} else { | |
img.style.width = "60px"; | |
img.style.height = "60px"; | |
img.style.zIndex = 123; | |
} | |
rollover.parentNode.insertBefore(img, rollover.nextSibling); | |
} | |
} | |
} | |
}); | |
} | |
} | |
//------------------------// | |
// 文字列の長さをチェック // | |
//------------------------// | |
function jstrlen(str, i) { | |
var len = 0; | |
str = escape(str); | |
for (i = 0; i < str.length; i++, len++) { | |
if (str.charAt(i) == "%") { | |
if (str.charAt(++i) == "u") { | |
i += 3; | |
len++; | |
} | |
i++; | |
} | |
} | |
return len; | |
} | |
//----------// | |
// 桁数整形 // | |
//----------// | |
function formatRightNumber( num, length ){ | |
var fix = ' '; | |
var str; | |
var result = ''; | |
str = num.toString(10); | |
if( str.length < length ){ | |
result = fix.substr(0,length - str.length) + str; | |
} | |
else{ | |
result = str; | |
} | |
return result; | |
} | |
//--------------------------------// | |
// アイコン表示(レベル表示のみ) // | |
//--------------------------------// | |
function disp_AreaIcon(cx,cy,num,viewSize,group_flg) | |
{ | |
var area_pos = $x_7("//map[@id=\"mapOverlayMap\"]//area[@href=\"land.php?x=" + cx + "&y=" + cy + "#ptop\"]"); | |
if( area_pos == null ){ | |
area_pos = $x_7("//map[@id=\"mapOverlayMap\"]//area[@href=\"land.php?x=" + cx + "&y=" + cy + "\"]"); | |
} | |
var dat = area_pos.getAttribute("onmouseover"); | |
dat = dat.replace(/^.*overOperation/, "setArea"); | |
dat = dat.replace(/\);.*$/, ''); | |
dat = dat + ',' + num + ',' + viewSize + ',' + group_flg + ');'; | |
eval(dat); | |
function setArea(act, x, y, num, viewSize, group_flg) | |
{ | |
var rollover = $d("rollover"); | |
//--------------// | |
// ホスト名判別 // | |
//--------------// | |
var hosttype = ""; | |
if( (location.hostname.indexOf("1kibaku") == -1) | |
&& (location.hostname.indexOf("legend") == -1) ){ | |
hosttype = "0"; | |
} | |
//------------------// | |
// 旧マップ使用判定 // | |
//------------------// | |
var old = false; | |
if( group_flg >= 100 ){ | |
// 100より大きい場合は☆数表示あり | |
var img = d_7.createElement("img"); | |
img.style.position = "absolute"; | |
img.style.left = x; | |
var t = (y.substr(0,y.length-2)); | |
img.name = "viewIcon"; | |
if( viewSize == 15 ){ | |
img.src = icon_c_7[1][num]; | |
img.style.zIndex = 226; | |
img.style.top = (parseInt(t) + 3) + "px"; | |
} else if( viewSize == 21 ){ | |
img.src = icon_c_7[2][num]; | |
img.style.zIndex = 443; | |
img.style.top = (parseInt(t) + 3) + "px"; | |
} else { | |
img.src = icon_c_7[0][num]; | |
img.style.zIndex = 122; | |
img.style.top = (parseInt(t) + 0) + "px"; | |
} | |
rollover.parentNode.insertBefore(img, rollover.nextSibling); | |
} | |
if( (group_flg % 100) > 0 ){ | |
// カラー指定があるばあいは、枠を表示 | |
var img2 = d_7.createElement("img"); | |
img2.style.position = "absolute"; | |
img2.name = "viewIcon"; | |
var iconNo = group_flg % 100; | |
if( viewSize == 15 ){ | |
img2.src = icon_2[iconNo]; | |
img2.style.width = "44px"; | |
img2.style.height = "44px"; | |
img2.style.zIndex = 226; | |
if( (hosttype == "0") && (old != true) ){ | |
img2.style.left = x; | |
img2.style.top = parseInt(y.substr(0,y.length-2)) + 2 + "px"; | |
} | |
else{ | |
img2.style.left = x; | |
img2.style.top = y; | |
} | |
} else if( viewSize == 21 ){ | |
img2.src = icon_2[iconNo]; | |
img2.style.width = "33px"; | |
img2.style.height = "33px"; | |
img2.style.zIndex = 443; | |
if( (hosttype == "0") && (old != true) ){ | |
img2.style.left = parseInt(x.substr(0,x.length-2)) + 1 + "px"; | |
img2.style.top = parseInt(y.substr(0,y.length-2)) + 4 + "px"; | |
} | |
else{ | |
img2.style.left = x; | |
img2.style.top = parseInt(y.substr(0,y.length-2)) + 1 + "px"; | |
} | |
} else { | |
img2.src = icon_2[iconNo]; | |
img2.style.width = "60px"; | |
img2.style.height = "60px"; | |
img2.style.zIndex = 122; | |
if( (hosttype == "0") && (old != true) ){ | |
img2.style.left = parseInt(x.substr(0,x.length-2)) + 1 + "px"; | |
img2.style.top = parseInt(y.substr(0,y.length-2)) + 2 + "px"; | |
} | |
else{ | |
img2.style.left = x; | |
img2.style.top = y; | |
} | |
} | |
rollover.parentNode.insertBefore(img2, rollover.nextSibling); | |
} | |
} | |
} | |
//----------------------------// | |
// アイコン表示(資源モード) // | |
//----------------------------// | |
function disp_AreaIcon2(cx,cy,num,viewSize,group_flg,maxtype) | |
{ | |
var area_pos = $x_7("//map[@id=\"mapOverlayMap\"]//area[@href=\"land.php?x=" + cx + "&y=" + cy + "#ptop\"]"); | |
if( area_pos == null ){ | |
area_pos = $x_7("//map[@id=\"mapOverlayMap\"]//area[@href=\"land.php?x=" + cx + "&y=" + cy + "\"]"); | |
} | |
var dat = area_pos.getAttribute("onmouseover"); | |
dat = dat.replace(/^.*overOperation/, "setArea"); | |
dat = dat.replace(/\);.*$/, ''); | |
dat = dat + ',' + num + ',' + viewSize + ',' + group_flg + ',' + maxtype + ');'; | |
eval(dat); | |
function setArea(act, x, y, num, viewSize, group_flg, maxtype) | |
{ | |
var rollover = $d("rollover"); | |
//--------------// | |
// ホスト名判別 // | |
//--------------// | |
var hosttype = ""; | |
if( (location.hostname.indexOf("1kibaku") == -1) | |
&& (location.hostname.indexOf("legend") == -1) ){ | |
hosttype = "0"; | |
} | |
var old = false; | |
if( group_flg % 1000 >= 100 ){ | |
// 100より大きい場合は☆数表示あり | |
var img = d_7.createElement("img"); | |
img.style.position = "absolute"; | |
img.style.left = x; | |
var t = (y.substr(0,y.length-2)); | |
img.name = "viewIcon"; | |
if( viewSize == 15 ){ | |
img.src = icon_cs[1][num*5+maxtype]; | |
img.style.zIndex = 226; | |
img.style.top = (parseInt(t) + 3) + "px"; | |
} else if( viewSize == 21 ){ | |
img.src = icon_cs[2][num*5+maxtype]; | |
img.style.zIndex = 443; | |
img.style.top = (parseInt(t) + 3) + "px"; | |
} else { | |
img.src = icon_cs[0][num*5+maxtype]; | |
img.style.zIndex = 122; | |
img.style.top = (parseInt(t) + 0) + "px"; | |
} | |
rollover.parentNode.insertBefore(img, rollover.nextSibling); | |
} | |
if( (group_flg % 100) > 0 ){ | |
// カラー指定があるばあいは、枠を表示 | |
var img2 = d_7.createElement("img"); | |
img2.style.position = "absolute"; | |
img2.name = "viewIcon"; | |
var iconNo = group_flg % 100; | |
if( viewSize == 15 ){ | |
img2.src = icon_2[iconNo]; | |
img2.style.width = "44px"; | |
img2.style.height = "44px"; | |
img2.style.zIndex = 226; | |
if( (hosttype == "0") && (old != true) ){ | |
img2.style.left = x; | |
img2.style.top = parseInt(y.substr(0,y.length-2)) + 2 + "px"; | |
} | |
else{ | |
img2.style.left = x; | |
img2.style.top = y; | |
} | |
} else if( viewSize == 21 ){ | |
img2.src = icon_2[iconNo]; | |
img2.style.width = "33px"; | |
img2.style.height = "33px"; | |
img2.style.zIndex = 443; | |
if( (hosttype == "0") && (old != true) ){ | |
img2.style.left = parseInt(x.substr(0,x.length-2)) + 1 + "px"; | |
img2.style.top = parseInt(y.substr(0,y.length-2)) + 4 + "px"; | |
} | |
else{ | |
img2.style.left = x; | |
img2.style.top = parseInt(y.substr(0,y.length-2)) + 1 + "px"; | |
} | |
} else { | |
img2.src = icon_2[iconNo]; | |
img2.style.width = "60px"; | |
img2.style.height = "60px"; | |
img2.style.zIndex = 122; | |
if( (hosttype == "0") && (old != true) ){ | |
img2.style.left = parseInt(x.substr(0,x.length-2)) + 1 + "px"; | |
img2.style.top = parseInt(y.substr(0,y.length-2)) + 2 + "px"; | |
} | |
else{ | |
img2.style.left = x; | |
img2.style.top = y; | |
} | |
} | |
rollover.parentNode.insertBefore(img2, rollover.nextSibling); | |
} | |
if( Math.floor(group_flg / 1000) > 0 ){ | |
// 強調指定があるばあいは、強調★を表示 | |
var img3 = d_7.createElement("img"); | |
img3.style.position = "absolute"; | |
img3.style.left = x; | |
var t = (y.substr(0,y.length-2)); | |
img3.name = "viewIcon"; | |
var pow = Math.floor(group_flg / 1000) - 1; | |
if( viewSize == 15 ){ | |
img3.src = icon_3[pow*3+2]; | |
img3.style.width = "44px"; | |
img3.style.height = "44px"; | |
img3.style.zIndex = 227; | |
img3.style.top = (parseInt(t) + 3) + "px"; | |
} else if( viewSize == 21 ){ | |
img3.src = icon_3[pow*3+1]; | |
img3.style.width = "33px"; | |
img3.style.height = "33px"; | |
img3.style.zIndex = 443; | |
img3.style.top = (parseInt(t) + 3) + "px"; | |
} else { | |
img3.src = icon_3[pow*3+3]; | |
img3.style.width = "60px"; | |
img3.style.height = "60px"; | |
img3.style.zIndex = 123; | |
img3.style.top = (parseInt(t) + 0) + "px"; | |
} | |
rollover.parentNode.insertBefore(img3, rollover.nextSibling); | |
} | |
} | |
} | |
//--------------// | |
// データロード // | |
//--------------// | |
function loadExecFlag(hostname, key) { | |
var datakey = new String(); | |
datakey = hostname + VERSION_KEY + key; | |
var ret = new String(); | |
var src = CookieRead(datakey); | |
if (src == "") return ret; | |
return src; | |
} | |
//--------------// | |
// データセーブ // | |
//--------------// | |
function saveExecFlag(hostname, key, data) { | |
var datakey = new String(); | |
datakey = hostname + VERSION_KEY + key; | |
CookieWrite(datakey, data, 30); | |
} | |
//----------------------// | |
// クッキーへの書き込み // | |
//----------------------// | |
function CookieWrite(kword, kdata, kday) | |
{ | |
if(!navigator.cookieEnabled){ // クッキーが利用可能かどうか | |
alert("クッキーへの書き込みができません"); | |
return; | |
} | |
sday = new Date(); | |
sday.setTime(sday.getTime() + (kday * 1000 * 60 * 60 * 24)); | |
s2day = sday.toGMTString(); | |
document.cookie = kword + "=" + escape(kdata) + ";expires=" + s2day; | |
} | |
//----------------------// | |
// クッキーから読み込み // | |
//----------------------// | |
function CookieRead(kword) | |
{ | |
if(typeof(kword) == "undefined"){ // キーワードなし | |
return ""; // 何もしないで戻る | |
} | |
kword = kword + "="; | |
kdata = ""; | |
scookie = document.cookie + ";"; // クッキー情報を読み込む | |
start = scookie.indexOf(kword); // キーワードを検索 | |
if (start != -1){ | |
// キーワードと一致するものあり | |
end = scookie.indexOf(";", start); // 情報の末尾位置を検索 | |
kdata = unescape(scookie.substring(start + kword.length, end)); // データ取り出し | |
} | |
return kdata; | |
} | |
//------------// | |
// HTMLの生成 // | |
//------------// | |
function addHtml_7() { | |
var dv; | |
var dv2; | |
var body = $e_7('//body'); | |
if( body.snapshotLength > 0 ){ | |
body.snapshotItem(0).addEventListener("mousedown", function(e) {if(e.button == 2){checkData(e);}}, true); | |
body.snapshotItem(0).innerHTML = body.snapshotItem(0).innerHTML.replace(/\u2028/g," "); | |
} | |
//----------------// | |
// コンテナの取得 // | |
//----------------// | |
var container; | |
var mapbox = $e_7('//*[@id="mapboxInner"]'); | |
if (mapbox.snapshotLength == 0) { | |
container = document.body; | |
} else { | |
container = mapbox.snapshotItem(0); | |
} | |
//--------------------------------------// | |
// チェックボックスに関する情報をロード // | |
//--------------------------------------// | |
var chkflg1; | |
var chkflg2; | |
execFlag = loadExecFlag(location.hostname, "FLAG0"); | |
if( execFlag == "" ){ | |
// 表示フラグをロード | |
var execFlag1 = loadExecFlag(location.hostname, "FLAG1"); | |
if( execFlag1 == "" ){ | |
chkflg1 = new String(FLAG1); // 初期値 | |
} | |
else{ | |
chkflg1 = execFlag1; | |
} | |
// オプションフラグをロード | |
var execFlag2 = loadExecFlag(location.hostname, "FLAG2"); | |
if( execFlag2 == "" ){ | |
chkflg2 = new String(FLAG2); // 初期値 | |
} | |
else{ | |
chkflg2 = execFlag2; | |
} | |
// 初回のときは、フラグを保存 | |
execFlag = chkflg1 + DELIMIT1_7 + chkflg2; | |
saveExecFlag(location.hostname, "FLAG0", execFlag); | |
} | |
else{ | |
var loadflg = new Array(); | |
loadflg = execFlag.split(DELIMIT1_7); | |
chkflg1 = loadflg[0]; | |
chkflg2 = loadflg[1]; | |
} | |
// 個人、同盟検索情報をロード | |
var chkflg3 = new Array(); | |
var execFlag = loadExecFlag(location.hostname, "FLAG3"); | |
if( execFlag == "" ){ | |
var execFlag3 = loadExecFlag(location.hostname, "FLAG3-1"); | |
if( execFlag3 == "" ){ | |
chkflg3[0] = new String(FLAG3_1); // 初期値 | |
} | |
else{ | |
chkflg3[0] = execFlag3; | |
} | |
execFlag3 = loadExecFlag(location.hostname, "FLAG3-2"); | |
if( execFlag3 == "" ){ | |
chkflg3[1] = new String(FLAG3_2); // 初期値 | |
} | |
else{ | |
chkflg3[1] = execFlag3; | |
} | |
execFlag3 = loadExecFlag(location.hostname, "FLAG3-3"); | |
if( execFlag3 == "" ){ | |
chkflg3[2] = new String(FLAG3_3); // 初期値 | |
} | |
else{ | |
chkflg3[2] = execFlag3; | |
} | |
// 初回のときは、フラグを保存 | |
execFlag = chkflg3[0] + DELIMIT1_7 + chkflg3[1] + DELIMIT1_7 + chkflg3[2]; | |
saveExecFlag(location.hostname, "FLAG3", execFlag); | |
} | |
else{ | |
chkflg3 = execFlag.split(DELIMIT1_7); | |
} | |
// 出兵情報共有設定 | |
var chkflg4; | |
execFlag = loadExecFlag(location.hostname, "FLAG4"); | |
if( execFlag == "" ){ | |
chkflg4 = new String(FLAG4); // 初期値 | |
// 初回のときは、フラグを保存 | |
execFlag = chkflg4; | |
saveExecFlag(location.hostname, "FLAG4", execFlag); | |
} | |
else{ | |
chkflg4 = execFlag; | |
} | |
//--------------------------------------// | |
// 画面生成 // | |
//--------------------------------------// | |
var textLabel; | |
var button1; | |
var textArea; | |
//----------------// | |
//-- ヘッダー部 --// | |
//----------------// | |
//-- コントロール配置DIV --// | |
var linksDiv = document.createElement("div"); | |
container.appendChild(linksDiv); | |
//-- ツール名称ラベル --// | |
textLabel = document.createElement("span"); | |
textLabel.id = "toolLabel"; | |
textLabel.style.fontSize = "16px"; | |
textLabel.innerHTML = "<br><b>NPC砦、領土情報検索ツール Ver." + VERSION_7 + "</b>"; | |
textLabel.style.color = "black"; | |
linksDiv.appendChild(textLabel); | |
//-- 更新ボタン --// | |
button1 = document.createElement("input"); | |
button1.type = "button"; | |
button1.id = "ckButton1"; | |
button1.style.fontSize = "12px"; | |
button1.style.marginLeft = "6px"; | |
button1.value = "選択した条件で表示を更新"; | |
button1.addEventListener("click", function() {updateButtonClicked()}, true); | |
linksDiv.appendChild(button1); | |
//-- ★セットボタン --// | |
button1 = document.createElement("input"); | |
button1.type = "button"; | |
button1.id = "ckButton2a"; | |
button1.style.fontSize = "12px"; | |
button1.style.marginLeft = "6px"; | |
button1.value = "★のチェックを付ける"; | |
button1.addEventListener("click", function() {checkButtonClicked()}, true); | |
linksDiv.appendChild(button1); | |
//-- ★解除ボタン --// | |
button1 = document.createElement("input"); | |
button1.type = "button"; | |
button1.id = "ckButton2"; | |
button1.style.fontSize = "12px"; | |
button1.style.marginLeft = "6px"; | |
button1.value = "★のチェックを外す"; | |
button1.addEventListener("click", function() {uncheckButtonClicked()}, true); | |
linksDiv.appendChild(button1); | |
//-- (改行) --// | |
textLabel = document.createElement("span"); | |
textLabel.innerHTML = "<br>"; | |
linksDiv.appendChild(textLabel); | |
//--------------------// | |
//-- 検索オプション --// | |
//--------------------// | |
var checkbox; | |
var ckLabel; | |
var userBox; | |
var listbox; | |
var colorNo; | |
var areaNo; | |
var img; | |
var optionPre = document.createElement("pre"); | |
optionPre.style.fontSize = "14px"; | |
optionPre.style.color = "black"; | |
optionPre.style.backgroundColor = "#ffffcc"; | |
optionPre.style.width = "750px"; | |
optionPre.style.height = "100%"; | |
optionPre.style.border = "solid 2px"; | |
optionPre.style.padding = "2px"; | |
optionPre.style.marginTop = "2px"; | |
linksDiv.appendChild(optionPre); | |
//-- 検索・表示オプション見出し --// | |
textLabel = document.createElement("span"); | |
textLabel.style.fontSize = "14px"; | |
textLabel.id = "test"; | |
textLabel.innerHTML = "<font color=\"red\"><b>検索対象</b></font>"; | |
optionPre.appendChild(textLabel); | |
chkbox = document.createElement("input"); | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckMenu2"; | |
chkbox.style.marginLeft = "400px"; | |
if( chkflg2.charAt(FLAG2_MENU2) == '1' ){ | |
chkbox.checked = true; | |
} | |
chkbox.addEventListener("click", function() {menu2Clicked()}, true); | |
optionPre.appendChild(chkbox); | |
// 補助オプション表示切り替え | |
textLabel = document.createElement("span"); | |
textLabel.style.marginLeft = "4px"; | |
textLabel.style.fontSize = "14px"; | |
textLabel.innerHTML = "<font color=\"blue\"><b>補助OPTION表示</b></font>"; | |
optionPre.appendChild(textLabel); | |
chkbox = document.createElement("input"); | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckMenu4"; | |
chkbox.style.marginLeft = "14px"; | |
if( chkflg2.charAt(FLAG2_MENU4) == '1' ){ | |
chkbox.checked = true; | |
} | |
chkbox.addEventListener("click", function() {menu4Clicked()}, true); | |
optionPre.appendChild(chkbox); | |
// 同盟オプション表示切り替え | |
textLabel = document.createElement("span"); | |
textLabel.style.marginLeft = "4px"; | |
textLabel.style.fontSize = "14px"; | |
textLabel.innerHTML = "<font color=\"blue\"><b>同盟OPTION表示</b></font><br>"; | |
optionPre.appendChild(textLabel); | |
// 空き地検索 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckEmpty"; | |
chkbox.style.marginLeft = "15px"; | |
if( chkflg2.charAt(FLAG2_EMPTY) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "空き地検索"; | |
optionPre.appendChild(ckLabel); | |
// 領土検索 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckLand"; | |
chkbox.style.marginLeft = "15px"; | |
if( chkflg2.charAt(FLAG2_LAND) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "領土検索"; | |
optionPre.appendChild(ckLabel); | |
//-- ルート構築モード --// | |
// ルート構築モードチェックボックス | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckRouteMode"; | |
chkbox.style.marginLeft = "15px"; | |
chkbox.addEventListener("click", function() {routeModeChecked()}, true); | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "<font color=\"green\"><b>ルート構築モード(</b></font>"; | |
optionPre.appendChild(ckLabel); | |
// 資源情報出力なしチェックボックス | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckRouteMode2"; | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "<font color=\"green\"><b>資源情報なし</b></font>"; | |
optionPre.appendChild(ckLabel); | |
// 自動ルート構築チェックボックス | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.style.marginLeft = "14px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckAutoRouteMode"; | |
chkbox.addEventListener("click", function() {autoRouteModeChecked()}, true); | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "<font color=\"green\"><b>ルート自動構築)</b></font>"; | |
optionPre.appendChild(ckLabel); | |
// (ギャップ埋め) | |
ckLabel = document.createElement("pre"); | |
ckLabel.style.height = "2px"; | |
optionPre.appendChild(ckLabel); | |
//-- ルート自動構築オプション見出し --// | |
textLabel = document.createElement("pre"); | |
textLabel.style.fontSize = "14px"; | |
textLabel.style.marginTop = "2px"; | |
textLabel.innerHTML = "<font color=\"green\"><b>ルート自動構築条件設定</b></font><br>"; | |
optionPre.appendChild(textLabel); | |
// 探査レベル | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "15px"; | |
ckLabel.innerHTML = "探索レベル"; | |
optionPre.appendChild(ckLabel); | |
areaNo = parseInt(chkflg2.charAt(FLAG2_SEARCH_LEVEL)); | |
listbox = document.createElement("select"); | |
listbox.id = "lsRouteLevel"; | |
for( var i = 0; i < croutename.length; i++ ){ | |
var opt = document.createElement("option"); | |
opt.id = i; | |
var str = document.createTextNode(croutename[i]); | |
opt.appendChild(str); | |
listbox.appendChild(opt); | |
} | |
listbox.style.marginLeft = "4px"; | |
listbox.selectedIndex = areaNo; | |
optionPre.appendChild(listbox); | |
// 資源回避レベル | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "14px"; | |
ckLabel.innerHTML = "回避資源"; | |
optionPre.appendChild(ckLabel); | |
areaNo = parseInt(chkflg2.charAt(FLAG2_SKIP_RES)); | |
listbox = document.createElement("select"); | |
listbox.id = "lsSkipRes"; | |
for( var i = 0; i < croutelim.length; i++ ){ | |
var opt = document.createElement("option"); | |
opt.id = i; | |
var str = document.createTextNode(croutelim[i]); | |
opt.appendChild(str); | |
listbox.appendChild(opt); | |
} | |
listbox.style.marginLeft = "4px"; | |
listbox.selectedIndex = areaNo; | |
optionPre.appendChild(listbox); | |
// 個人領土回避 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckRouteUser"; | |
chkbox.style.marginLeft = "14px"; | |
if( chkflg2.charAt(FLAG2_SKIP_USER) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "個人領地を通過("; | |
optionPre.appendChild(ckLabel); | |
// 通過同盟指定 | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "個人・同盟"; | |
optionPre.appendChild(ckLabel); | |
areaNo = parseInt(chkflg2.charAt(FLAG2_SKIP_GROUP)); | |
listbox = document.createElement("select"); | |
listbox.id = "lsSkipGroup"; | |
for( var i = 0; i < groupname.length; i++ ){ | |
var opt = document.createElement("option"); | |
opt.id = i; | |
var str = document.createTextNode(groupname[i]); | |
opt.appendChild(str); | |
listbox.appendChild(opt); | |
} | |
listbox.style.marginLeft = "4px"; | |
listbox.selectedIndex = areaNo; | |
optionPre.appendChild(listbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = ")"; | |
optionPre.appendChild(ckLabel); | |
// 可変ルート | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckRouteRandom"; | |
chkbox.style.marginLeft = "10px"; | |
if( chkflg2.charAt(FLAG2_RANDOM_ROUTE) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "可変ルート"; | |
optionPre.appendChild(ckLabel); | |
// (ギャップ埋め) | |
ckLabel = document.createElement("pre"); | |
ckLabel.style.height = "2px"; | |
optionPre.appendChild(ckLabel); | |
//-- 検索・表示オプション2見出し --// | |
// 項目ラベル | |
textLabel = document.createElement("pre"); | |
textLabel.id = "Label2-1"; | |
textLabel.style.fontSize = "14px"; | |
textLabel.innerHTML = "<font color=\"red\"><b>表示補助</b></font><br>"; | |
optionPre.appendChild(textLabel); | |
// 資源判別 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckAnalyze"; | |
chkbox.style.marginLeft = "15px"; | |
if( chkflg2.charAt(FLAG2_ANALYZE) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "資源別に着色"; | |
ckLabel.id = "Label2-2"; | |
optionPre.appendChild(ckLabel); | |
// 資源判別(強調表示) | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "0px"; | |
ckLabel.innerHTML = "(強調表示"; | |
ckLabel.id = "Label2-3"; | |
optionPre.appendChild(ckLabel); | |
// 強調種別選択1 | |
areaNo = parseInt(chkflg2.substr(FLAG2_STRONG_AREANO,3)); | |
if( areaNo > season1.length ){ | |
areaNo = 0; | |
} | |
listbox = document.createElement("select"); | |
listbox.id = "lsArea"; | |
for( var i = 0; i < season1.length; i++ ){ | |
var opt = document.createElement("option"); | |
opt.id = i; | |
var str = document.createTextNode(season1[i][0]); | |
opt.appendChild(str); | |
listbox.appendChild(opt); | |
} | |
listbox.style.marginLeft = "4px"; | |
listbox.selectedIndex = areaNo; | |
optionPre.appendChild(listbox); | |
// 強調種別選択2 | |
areaNo = parseInt(chkflg2.substr(FLAG2_STRONG_AREANO2,3)); | |
if( areaNo > season1.length ){ | |
areaNo = 0; | |
} | |
listbox = document.createElement("select"); | |
listbox.id = "lsArea2"; | |
for( var i = 0; i < season1.length; i++ ){ | |
var opt = document.createElement("option"); | |
opt.id = i; | |
var str = document.createTextNode(season1[i][0]); | |
opt.appendChild(str); | |
listbox.appendChild(opt); | |
} | |
listbox.style.marginLeft = "4px"; | |
listbox.selectedIndex = areaNo; | |
optionPre.appendChild(listbox); | |
// 強調種別選択3 | |
areaNo = parseInt(chkflg2.substr(FLAG2_STRONG_AREANO3,3)); | |
if( areaNo > season1.length ){ | |
areaNo = 0; | |
} | |
listbox = document.createElement("select"); | |
listbox.id = "lsArea3"; | |
for( var i = 0; i < season1.length; i++ ){ | |
var opt = document.createElement("option"); | |
opt.id = i; | |
var str = document.createTextNode(season1[i][0]); | |
opt.appendChild(str); | |
listbox.appendChild(opt); | |
} | |
listbox.style.marginLeft = "4px"; | |
listbox.selectedIndex = areaNo; | |
optionPre.appendChild(listbox); | |
// 閉じかっこ | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "0px"; | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = ")<br>"; | |
ckLabel.id = "Label2-4"; | |
optionPre.appendChild(ckLabel); | |
// 空き地を着色 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckEmptyDraw"; | |
chkbox.style.marginLeft = "15px"; | |
if( chkflg2.charAt(FLAG2_EMPTY_DRAW) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "空き地を着色"; | |
ckLabel.id = "Label2-5"; | |
optionPre.appendChild(ckLabel); | |
// カラー選択 | |
colorNo = chkflg2.charAt(FLAG2_EMPTY_DRAW_COLOR); | |
listbox = document.createElement("select"); | |
listbox.id = "lsEmptyColor"; | |
for( var i = 0; i < cname.length; i++ ){ | |
var opt = document.createElement("option"); | |
opt.id = i; | |
var str = document.createTextNode(cname[i]); | |
opt.appendChild(str); | |
listbox.appendChild(opt); | |
} | |
listbox.style.marginLeft = "4px"; | |
listbox.selectedIndex = colorNo; | |
optionPre.appendChild(listbox); | |
// レーダー | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckRader"; | |
chkbox.style.marginLeft = "15px"; | |
if( chkflg2.charAt(FLAG2_RADER) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "縮小マップ"; | |
ckLabel.id = "Label2-6"; | |
optionPre.appendChild(ckLabel); | |
// 本拠地一覧 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckOwnerList"; | |
chkbox.style.marginLeft = "15px"; | |
if( chkflg2.charAt(FLAG2_OWNER) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "本拠地一覧"; | |
ckLabel.id = "Label2-7"; | |
optionPre.appendChild(ckLabel); | |
// 方位表示 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckDirection"; | |
chkbox.style.marginLeft = "15px"; | |
if( chkflg2.charAt(FLAG2_DIRECTION) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "方位表示"; | |
ckLabel.id = "Label2-8"; | |
optionPre.appendChild(ckLabel); | |
// 51x51画面で本ツールを使わない | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckNoExec51"; | |
chkbox.style.marginLeft = "15px"; | |
if( chkflg2.charAt(FLAG2_NOEXEC51) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "51x51で使用しない"; | |
ckLabel.id = "Label2-9"; | |
optionPre.appendChild(ckLabel); | |
//-- 表示対象オプション見出し --// | |
textLabel = document.createElement("pre"); | |
textLabel.style.fontSize = "14px"; | |
textLabel.style.marginTop = "2px"; | |
textLabel.innerHTML = "<font color=\"red\"><b>表示する領土の種類</b></font><br>"; | |
optionPre.appendChild(textLabel); | |
// NPC砦 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckNPC"; | |
chkbox.style.marginLeft = "15px"; | |
if( chkflg1.charAt(FLAG1_NPC) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "NPC砦"; | |
optionPre.appendChild(ckLabel); | |
// ☆1 | |
chkbox = document.createElement("input"); | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckLevel1"; | |
chkbox.style.marginLeft = "10px"; | |
if( chkflg1.charAt(FLAG1_LV1) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "☆1"; | |
optionPre.appendChild(ckLabel); | |
// ☆2 | |
chkbox = document.createElement("input"); | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckLevel2"; | |
chkbox.style.marginLeft = "10px"; | |
if( chkflg1.charAt(FLAG1_LV2) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "☆2"; | |
optionPre.appendChild(ckLabel); | |
// ☆3 | |
chkbox = document.createElement("input"); | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckLevel3"; | |
chkbox.style.marginLeft = "10px"; | |
if( chkflg1.charAt(FLAG1_LV3) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "☆3"; | |
optionPre.appendChild(ckLabel); | |
// ☆4 | |
chkbox = document.createElement("input"); | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckLevel4"; | |
chkbox.style.marginLeft = "10px"; | |
if( chkflg1.charAt(FLAG1_LV4) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "☆4"; | |
optionPre.appendChild(ckLabel); | |
// ☆5 | |
chkbox = document.createElement("input"); | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckLevel5"; | |
chkbox.style.marginLeft = "10px"; | |
if( chkflg1.charAt(FLAG1_LV5) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "☆5"; | |
optionPre.appendChild(ckLabel); | |
// ☆6 | |
chkbox = document.createElement("input"); | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckLevel6"; | |
chkbox.style.marginLeft = "10px"; | |
if( chkflg1.charAt(FLAG1_LV6) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "☆6"; | |
optionPre.appendChild(ckLabel); | |
// ☆7 | |
chkbox = document.createElement("input"); | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckLevel7"; | |
chkbox.style.marginLeft = "10px"; | |
if( chkflg1.charAt(FLAG1_LV7) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "☆7"; | |
optionPre.appendChild(ckLabel); | |
// ☆8 | |
chkbox = document.createElement("input"); | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckLevel8"; | |
chkbox.style.marginLeft = "10px"; | |
if( chkflg1.charAt(FLAG1_LV8) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "☆8"; | |
optionPre.appendChild(ckLabel); | |
// ☆9 | |
chkbox = document.createElement("input"); | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckLevel9"; | |
chkbox.style.marginLeft = "10px"; | |
if( chkflg1.charAt(FLAG1_LV9) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "☆9<br>"; | |
optionPre.appendChild(ckLabel); | |
// (ギャップ埋め) | |
ckLabel = document.createElement("pre"); | |
ckLabel.style.height = "2px"; | |
optionPre.appendChild(ckLabel); | |
//-- 個人・同盟検索オプション見出し --// | |
textLabel = document.createElement("pre"); | |
textLabel.style.fontSize = "14px"; | |
textLabel.innerHTML = "<font color=\"red\"><b>個人・同盟の検索</b></font><br>"; | |
textLabel.id = "Label4-1"; | |
optionPre.appendChild(textLabel); | |
//-- 個人・同盟検索オプション1 --// | |
// ナンバリング | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "<font color='blue'><b>No.1</b></font>"; | |
ckLabel.style.marginLeft = "15px"; | |
ckLabel.id = "Label4-2-1"; | |
optionPre.appendChild(ckLabel); | |
// 有効/無効 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckEnable1"; | |
chkbox.style.marginLeft = "8px"; | |
if( chkflg3[0].charAt(FLAG3_ENABLE) == '1' ){ | |
chkbox.checked = true; | |
} | |
chkbox.addEventListener("click", function() {enable1Checked()}, true); | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "有効にする"; | |
ckLabel.id = "Label4-2"; | |
optionPre.appendChild(ckLabel); | |
// 個人 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "radio"; | |
chkbox.id = "ckType1"; | |
chkbox.name = "ckType1"; | |
chkbox.value = "1"; | |
chkbox.style.marginLeft = "8px"; | |
if( chkflg3[0].charAt(FLAG3_USER) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "個人"; | |
ckLabel.id = "Label4-3"; | |
optionPre.appendChild(ckLabel); | |
// 同盟 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "radio"; | |
chkbox.id = "ckType1"; | |
chkbox.name = "ckType1"; | |
chkbox.value = "2"; | |
chkbox.style.marginLeft = "4px"; | |
if( chkflg3[0].charAt(FLAG3_GROUP) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "同盟"; | |
ckLabel.id = "Label4-4"; | |
optionPre.appendChild(ckLabel); | |
// 完全一致 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckFullMatch1"; | |
chkbox.style.marginLeft = "8px"; | |
if( chkflg3[0].charAt(FLAG3_MATCH) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "完全一致"; | |
ckLabel.id = "Label4-5"; | |
optionPre.appendChild(ckLabel); | |
// 個人・同盟名 | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "8px"; | |
ckLabel.innerHTML = "検索名称"; | |
ckLabel.id = "Label4-6"; | |
optionPre.appendChild(ckLabel); | |
userBox = document.createElement("input"); | |
userBox.id = "userBox1"; | |
userBox.style.marginLeft = "4px"; | |
userBox.width = 240; | |
if( chkflg3[0].charAt(FLAG3_ENABLE) == '1' ){ | |
userBox.disabled = false; | |
} | |
else{ | |
userBox.disabled = true; | |
} | |
userBox.value = chkflg3[0].substr(FLAG3_NAME); | |
userBox.href = "javascript:void(0);"; | |
optionPre.appendChild(userBox); | |
// 表示種別での絞り込み | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckLevelSearch1"; | |
chkbox.style.marginLeft = "8px"; | |
if( chkflg3[0].charAt(FLAG3_FILL) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "領土着色のみ"; | |
ckLabel.id = "Label4-7"; | |
optionPre.appendChild(ckLabel); | |
// カラー選択 | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginTop = "1px"; | |
ckLabel.style.marginLeft = "8px"; | |
ckLabel.innerHTML = "枠色"; | |
ckLabel.id = "Label4-8"; | |
optionPre.appendChild(ckLabel); | |
colorNo = chkflg3[0].charAt(FLAG3_COLOR); | |
listbox = document.createElement("select"); | |
listbox.id = "lsColor1"; | |
for( var i = 0; i < cname.length; i++ ){ | |
var opt = document.createElement("option"); | |
opt.id = i; | |
var str = document.createTextNode(cname[i]); | |
opt.appendChild(str); | |
listbox.appendChild(opt); | |
} | |
listbox.style.marginLeft = "4px"; | |
listbox.selectedIndex = colorNo; | |
optionPre.appendChild(listbox); | |
// (改行) | |
textLabel = document.createElement("span"); | |
textLabel.innerHTML = "<br>"; | |
textLabel.id = "Label4-9"; | |
optionPre.appendChild(textLabel); | |
//-- 個人・同盟検索オプション2 --// | |
// ナンバリング | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "<font color='blue'><b>No.2</b></font>"; | |
ckLabel.style.marginLeft = "15px"; | |
ckLabel.id = "Label4-2-2"; | |
optionPre.appendChild(ckLabel); | |
// 有効/無効 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckEnable2"; | |
chkbox.style.marginLeft = "8px"; | |
if( chkflg3[1].charAt(FLAG3_ENABLE) == '1' ){ | |
chkbox.checked = true; | |
} | |
chkbox.addEventListener("click", function() {enable2Checked()}, true); | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "有効にする"; | |
ckLabel.id = "Label4-10"; | |
optionPre.appendChild(ckLabel); | |
// 個人 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "radio"; | |
chkbox.id = "ckType2"; | |
chkbox.name = "ckType2"; | |
chkbox.value = "1"; | |
chkbox.style.marginLeft = "8px"; | |
if( chkflg3[1].charAt(FLAG3_USER) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "個人"; | |
ckLabel.id = "Label4-11"; | |
optionPre.appendChild(ckLabel); | |
// 同盟 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "radio"; | |
chkbox.id = "ckType2"; | |
chkbox.name = "ckType2"; | |
chkbox.value = "2"; | |
chkbox.style.marginLeft = "4px"; | |
if( chkflg3[1].charAt(FLAG3_GROUP) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "同盟"; | |
ckLabel.id = "Label4-12"; | |
optionPre.appendChild(ckLabel); | |
// 完全一致 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckFullMatch2"; | |
chkbox.style.marginLeft = "8px"; | |
if( chkflg3[1].charAt(FLAG3_MATCH) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "完全一致"; | |
ckLabel.id = "Label4-13"; | |
optionPre.appendChild(ckLabel); | |
// 個人・同盟名 | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "8px"; | |
ckLabel.innerHTML = "検索名称"; | |
ckLabel.id = "Label4-14"; | |
optionPre.appendChild(ckLabel); | |
userBox = document.createElement("input"); | |
userBox.id = "userBox2"; | |
userBox.style.marginLeft = "4px"; | |
userBox.width = 240; | |
if( chkflg3[1].charAt(FLAG3_ENABLE) == '1' ){ | |
userBox.disabled = false; | |
} | |
else{ | |
userBox.disabled = true; | |
} | |
userBox.value = chkflg3[1].substr(FLAG3_NAME); | |
userBox.href = "javascript:void(0);"; | |
optionPre.appendChild(userBox); | |
// 表示種別での絞り込み | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckLevelSearch2"; | |
chkbox.style.marginLeft = "8px"; | |
if( chkflg3[1].charAt(FLAG3_FILL) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "領土着色のみ"; | |
ckLabel.id = "Label4-15"; | |
optionPre.appendChild(ckLabel); | |
// カラー選択 | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginTop = "1px"; | |
ckLabel.style.marginLeft = "8px"; | |
ckLabel.innerHTML = "枠色"; | |
ckLabel.id = "Label4-16"; | |
optionPre.appendChild(ckLabel); | |
colorNo = chkflg3[1].charAt(FLAG3_COLOR); | |
listbox = document.createElement("select"); | |
listbox.id = "lsColor2"; | |
for( var i = 0; i < cname.length; i++ ){ | |
var opt = document.createElement("option"); | |
opt.id = i; | |
var str = document.createTextNode(cname[i]); | |
opt.appendChild(str); | |
listbox.appendChild(opt); | |
} | |
listbox.style.marginLeft = "4px"; | |
listbox.selectedIndex = colorNo; | |
optionPre.appendChild(listbox); | |
// (改行) | |
textLabel = document.createElement("span"); | |
textLabel.innerHTML = "<br>"; | |
textLabel.id = "Label4-17"; | |
optionPre.appendChild(textLabel); | |
//-- 個人・同盟検索オプション3 --// | |
// ナンバリング | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "<font color='blue'><b>No.3</b></font>"; | |
ckLabel.style.marginLeft = "15px"; | |
ckLabel.id = "Label4-2-3"; | |
optionPre.appendChild(ckLabel); | |
// 有効/無効 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckEnable3"; | |
chkbox.style.marginLeft = "8px"; | |
if( chkflg3[2].charAt(FLAG3_ENABLE) == '1' ){ | |
chkbox.checked = true; | |
} | |
chkbox.addEventListener("click", function() {enable3Checked()}, true); | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "有効にする"; | |
ckLabel.id = "Label4-18"; | |
optionPre.appendChild(ckLabel); | |
// 個人 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "radio"; | |
chkbox.id = "ckType3"; | |
chkbox.name = "ckType3"; | |
chkbox.value = "1"; | |
chkbox.style.marginLeft = "8px"; | |
if( chkflg3[2].charAt(FLAG3_USER) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "個人"; | |
ckLabel.id = "Label4-19"; | |
optionPre.appendChild(ckLabel); | |
// 同盟 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "radio"; | |
chkbox.id = "ckType3"; | |
chkbox.name = "ckType3"; | |
chkbox.value = "2"; | |
chkbox.style.marginLeft = "4px"; | |
if( chkflg3[2].charAt(FLAG3_GROUP) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "同盟"; | |
ckLabel.id = "Label4-20"; | |
optionPre.appendChild(ckLabel); | |
// 完全一致 | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckFullMatch3"; | |
chkbox.style.marginLeft = "8px"; | |
if( chkflg3[2].charAt(FLAG3_MATCH) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "完全一致"; | |
ckLabel.id = "Label4-21"; | |
optionPre.appendChild(ckLabel); | |
// 個人・同盟名 | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "8px"; | |
ckLabel.innerHTML = "検索名称"; | |
ckLabel.id = "Label4-22"; | |
optionPre.appendChild(ckLabel); | |
userBox = document.createElement("input"); | |
userBox.id = "userBox3"; | |
userBox.style.marginLeft = "4px"; | |
userBox.width = 240; | |
if( chkflg3[2].charAt(FLAG3_ENABLE) == '1' ){ | |
userBox.disabled = false; | |
} | |
else{ | |
userBox.disabled = true; | |
} | |
userBox.value = chkflg3[2].substr(FLAG3_NAME); | |
userBox.href = "javascript:void(0);"; | |
optionPre.appendChild(userBox); | |
// 表示種別での絞り込み | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckLevelSearch3"; | |
chkbox.style.marginLeft = "8px"; | |
if( chkflg3[2].charAt(FLAG3_FILL) == '1' ){ | |
chkbox.checked = true; | |
} | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "領土着色のみ"; | |
ckLabel.id = "Label4-23"; | |
optionPre.appendChild(ckLabel); | |
// カラー選択 | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginTop = "1px"; | |
ckLabel.style.marginLeft = "8px"; | |
ckLabel.innerHTML = "枠色"; | |
ckLabel.id = "Label4-24"; | |
optionPre.appendChild(ckLabel); | |
colorNo = chkflg3[2].charAt(FLAG3_COLOR); | |
listbox = document.createElement("select"); | |
listbox.id = "lsColor3"; | |
for( var i = 0; i < cname.length; i++ ){ | |
var opt = document.createElement("option"); | |
opt.id = i; | |
var str = document.createTextNode(cname[i]); | |
opt.appendChild(str); | |
listbox.appendChild(opt); | |
} | |
listbox.style.marginLeft = "4px"; | |
listbox.selectedIndex = colorNo; | |
optionPre.appendChild(listbox); | |
// (ギャップ埋め) | |
ckLabel = document.createElement("pre"); | |
ckLabel.style.height = "2px"; | |
optionPre.appendChild(ckLabel); | |
//-- 出兵情報共有見出し --// | |
textLabel = document.createElement("pre"); | |
textLabel.style.fontSize = "14px"; | |
textLabel.style.marginTop = "2px"; | |
textLabel.innerHTML = "<font color=\"green\"><b>出兵情報共有設定</b></font><br>"; | |
optionPre.appendChild(textLabel); | |
// 共有フラグ | |
chkbox = document.createElement("input"); | |
chkbox.style.marginTop = "1px"; | |
chkbox.type = "checkbox"; | |
chkbox.id = "ckUnion"; | |
chkbox.style.marginLeft = "14px"; | |
if( chkflg4.charAt(0) == '1' ){ | |
chkbox.checked = true; | |
} | |
chkbox.addEventListener("click", function() {attackIconClear()}, true); | |
optionPre.appendChild(chkbox); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "有効"; | |
optionPre.appendChild(ckLabel); | |
// シート名 | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "8px"; | |
ckLabel.innerHTML = "スプレッドシートURL"; | |
ckLabel.id = "Label5-1"; | |
optionPre.appendChild(ckLabel); | |
userBox = document.createElement("input"); | |
userBox.id = "userBox4"; | |
userBox.style.marginLeft = "4px"; | |
userBox.style.width = "500px"; | |
userBox.value = chkflg4.substr(1); | |
userBox.href = "javascript:void(0);"; | |
optionPre.appendChild(userBox); | |
// スプレッドシート名の加工 | |
if( chkflg4.charAt(0) == '1' ){ | |
spreadsheet = userBox.value.replace(/#gid/,"&gid") + "&output=txt"; | |
} | |
// (ギャップ埋め) | |
ckLabel = document.createElement("pre"); | |
ckLabel.style.height = "2px"; | |
optionPre.appendChild(ckLabel); | |
//----------------------------// | |
// 検索結果のテキスト表示領域 // | |
//----------------------------// | |
textArea = document.createElement("pre"); | |
textArea.id = "castleInfoText"; | |
textArea.innerHTML = ""; | |
textArea.style.fontSize = "14px"; | |
textArea.style.color = "black"; | |
textArea.style.backgroundColor = "#FFDEAD"; | |
textArea.style.width = "750px"; | |
textArea.style.height = "120px"; | |
textArea.style.overflow = "auto"; | |
textArea.style.border = "solid 2px"; | |
textArea.style.padding = "2px"; | |
textArea.style.marginTop = "-2px"; | |
linksDiv.appendChild(textArea); | |
//------------------// | |
// 部品描画先の設定 // | |
//------------------// | |
var target; | |
if( $d("datas") == undefined ){ | |
target = "change-map-scale"; | |
} | |
else{ | |
target = "datas"; | |
} | |
//--------------// | |
// ホスト名判別 // | |
//--------------// | |
var hosttype = location.hostname.substr(0,1); | |
//----------------------------// | |
// 縮小マップ描画エリアの定義 // | |
//----------------------------// | |
dv2 = d_7.createElement("div"); | |
dv2.style.display = "none"; | |
dv2.style.zIndex = 0; | |
dv2.id = "smallmap_dv"; | |
dv2.style.fontSize= "10px"; | |
// データ描画用 | |
textArea = document.createElement("div"); | |
textArea.id = "smallmap"; | |
textArea.style.width = "66px"; | |
textArea.style.height = "66px"; | |
textArea.innerHTML = ""; | |
textArea.style.color = "black"; | |
textArea.innerHTML = ""; | |
textArea.style.borderTop = "solid white 2px"; | |
textArea.style.borderLeft = "solid white 2px"; | |
textArea.style.borderRight = "solid white 1px"; | |
textArea.style.borderBottom = "solid white 1px"; | |
// 51x51モードがある鯖 | |
if( hosttype == "m" ){ | |
textArea.style.position = "absolute"; | |
textArea.style.top = '40px'; | |
textArea.style.left = '5px'; | |
} | |
dv2.appendChild(textArea); | |
$d(target).appendChild(dv2); | |
//----------------------------// | |
// 本拠地情報描画エリアの定義 // | |
//----------------------------// | |
dv = d_7.createElement("div"); | |
dv.style.position = "absolute"; | |
if( add51_51mode == 0 ){ | |
// 51x51モードがない鯖 | |
dv.style.top = '16px'; | |
dv.style.left = '260px'; | |
} | |
else{ | |
// mixi鯖とそれ以外 | |
if( hosttype == "m" ){ | |
dv.style.top = '380px'; | |
dv.style.left = '400px'; | |
} | |
else{ | |
dv.style.top = '420px'; | |
dv.style.left = '400px'; | |
} | |
} | |
dv.style.fontSize= "10px"; | |
dv.style.display = "none"; | |
dv.id = "baseinfo_dv"; | |
dv.style.zIndex = 500; | |
// レイアウト調整用 | |
textArea = document.createElement("pre"); | |
textArea.innerHTML = ""; | |
textArea.style.fontSize = "10px"; | |
textArea.innerHTML = ""; | |
dv.appendChild(textArea); | |
dv2 = d_7.createElement("div"); | |
dv2.style.border = "solid 2px"; | |
dv2.style.borderColor = "transparent"; | |
dv.appendChild(dv2); | |
// データ描画用 | |
textArea = document.createElement("pre"); | |
textArea.id = "baseInfoText"; | |
textArea.innerHTML = ""; | |
textArea.style.fontSize = "10px"; | |
textArea.style.color = "black"; | |
textArea.innerHTML = ""; | |
textArea.style.margin = "2px"; | |
dv2.appendChild(textArea); | |
$d(target).appendChild(dv); | |
//------------------// | |
// ルート構築モード // | |
//------------------// | |
dv2 = d_7.createElement("div"); | |
dv2.style.position = "absolute"; | |
if( add51_51mode == 0 ){ | |
// 51x51モードがない鯖 | |
dv2.style.top = "24px"; | |
dv2.style.left = "420px"; | |
} | |
else{ | |
// 51x51モードがある鯖 | |
if( location.pathname != "/big_map.php" ){ | |
if( location.hostname.substr(0,1) == "m" ){ | |
dv2.style.top = "54px"; | |
dv2.style.left = "430px"; | |
} | |
else{ | |
dv2.style.top = "61px"; | |
dv2.style.left = "560px"; | |
} | |
} | |
else{ | |
if( location.hostname.substr(0,1) == "m" ){ | |
dv2.style.top = "0px"; | |
dv2.style.left = "430px"; | |
} | |
else{ | |
dv2.style.top = "0px"; | |
dv2.style.left = "550px"; | |
} | |
} | |
} | |
dv2.style.fontSize= "10px"; | |
dv2.style.width = "184px"; | |
dv2.style.zIndex = 500; | |
dv2.style.display = "none"; | |
dv2.id = "routeField"; | |
$d(target).parentNode.appendChild(dv2); | |
ckLabel = document.createElement("span"); | |
ckLabel.style.marginLeft = "4px"; | |
ckLabel.innerHTML = "<font color=\"blue\"><b>ルート構築ビュー</b></font>"; | |
dv2.appendChild(ckLabel); | |
dv2 = d_7.createElement("div"); | |
dv2.style.position = "absolute"; | |
dv2.style.paddingLeft = "4px"; | |
if( add51_51mode == 0 ){ | |
// 51x51モードがない鯖 | |
dv2.style.top = "36px"; | |
dv2.style.left = "420px"; | |
} | |
else{ | |
// 51x51モードがある鯖 | |
if( location.pathname != "/big_map.php" ){ | |
if( location.hostname.substr(0,1) == "m" ){ | |
dv2.style.top = "66px"; | |
dv2.style.left = "420px"; | |
} | |
else{ | |
dv2.style.top = "73px"; | |
dv2.style.left = "560px"; | |
} | |
} | |
else{ | |
if( location.hostname.substr(0,1) == "m" ){ | |
dv2.style.top = "12px"; | |
dv2.style.left = "430px"; | |
} | |
else{ | |
dv2.style.top = "12px"; | |
dv2.style.left = "550px"; | |
} | |
} | |
} | |
dv2.style.fontSize= "10px"; | |
dv2.style.color= "blue"; | |
dv2.style.width = "184px"; | |
if( location.hostname.substr(0,1) == "m" ){ | |
if( location.pathname != "/big_map.php" ){ | |
dv2.style.height = "70px"; | |
} | |
else{ | |
dv2.style.height = "55px"; | |
} | |
} | |
else{ | |
if( location.pathname != "/big_map.php" ){ | |
dv2.style.height = "90px"; | |
} | |
else{ | |
dv2.style.height = "55px"; | |
} | |
} | |
dv2.style.border = "1px black solid"; | |
dv2.style.backgroundColor = "#FFFFCC"; | |
dv2.style.zIndex = 500; | |
dv2.style.overflowY = "scroll"; | |
dv2.style.display = "none"; | |
dv2.id = "routeField2"; | |
$d(target).parentNode.appendChild(dv2); | |
ckLabel = document.createElement("text"); | |
ckLabel.id = "routeInfoText"; | |
ckLabel.innerHTML = ""; | |
dv2.appendChild(ckLabel); | |
//-- 全選択ボタン --// | |
var button1 = document.createElement("input"); | |
button1.style.position = "absolute"; | |
if( add51_51mode == 0 ){ | |
// 51x51モードがない鯖 | |
button1.style.top = "128px"; | |
button1.style.left = "525px"; | |
} | |
else{ | |
// 51x51モードがある鯖 | |
if( location.pathname != "/big_map.php" ){ | |
if( location.hostname.substr(0,1) == "m" ){ | |
button1.style.top = "138px"; | |
button1.style.left = "525px"; | |
} | |
else{ | |
button1.style.top = "165px"; | |
button1.style.left = "665px"; | |
} | |
} | |
else{ | |
if( location.hostname.substr(0,1) == "m" ){ | |
button1.style.top = "69px"; | |
button1.style.left = "535px"; | |
} | |
else{ | |
button1.style.top = "69px"; | |
button1.style.left = "655px"; | |
} | |
} | |
} | |
button1.style.zIndex = 500; | |
button1.type = "button"; | |
button1.style.fontSize = "10px"; | |
button1.style.marginLeft = "6px"; | |
button1.value = "全選択"; | |
button1.style.display = "none"; | |
button1.id = "routeField5"; | |
button1.addEventListener("click", function() {routeSelectButtonClicked()}, true); | |
$d(target).parentNode.appendChild(button1); | |
//-- クリアボタン --// | |
button1 = document.createElement("input"); | |
button1.style.position = "absolute"; | |
if( add51_51mode == 0 ){ | |
// 51x51モードがない鯖 | |
button1.style.top = "128px"; | |
button1.style.left = "570px"; | |
} | |
else{ | |
// 51x51モードがある鯖 | |
if( location.pathname != "/big_map.php" ){ | |
if( location.hostname.substr(0,1) == "m" ){ | |
button1.style.top = "138px"; | |
button1.style.left = "570px"; | |
} | |
else{ | |
button1.style.top = "165px"; | |
button1.style.left = "710px"; | |
} | |
} | |
else{ | |
if( location.hostname.substr(0,1) == "m" ){ | |
button1.style.top = "69px"; | |
button1.style.left = "580px"; | |
} | |
else{ | |
button1.style.top = "69px"; | |
button1.style.left = "700px"; | |
} | |
} | |
} | |
button1.style.zIndex = 500; | |
button1.type = "button"; | |
button1.style.fontSize = "10px"; | |
button1.style.marginLeft = "6px"; | |
button1.value = "クリア"; | |
button1.style.display = "none"; | |
button1.id = "routeField3"; | |
button1.addEventListener("click", function() {routeClearButtonClicked()}, true); | |
$d(target).parentNode.appendChild(button1); | |
// インフォメーションエリア | |
dv2 = d_7.createElement("div"); | |
dv2.style.position = "absolute"; | |
if( location.pathname != "/big_map.php" ){ | |
dv2.style.top = "450px"; | |
dv2.style.left = "145px"; | |
} | |
else{ | |
if( location.hostname.substr(0,1) == "m" ){ | |
dv2.style.top = "90px"; | |
dv2.style.left = "430px"; | |
} | |
else{ | |
dv2.style.top = "90px"; | |
dv2.style.left = "550px"; | |
} | |
} | |
dv2.style.width = "500px"; | |
dv2.style.zIndex = 500; | |
dv2.id = "route_info"; | |
dv2.innerHTML = ''; | |
$d(target).parentNode.appendChild(dv2); | |
//--------------// | |
// メニュー制御 // | |
//--------------// | |
menu2Clicked(); | |
menu4Clicked(); | |
} | |
//----------------// | |
// ルート構築処理 // | |
//----------------// | |
function checkData(e){ | |
var rollover = $d("rollover"); | |
var checkBox = $e_7('//*[@id="ckRouteMode"]'); | |
var checkBox2 = $e_7('//*[@id="ckRouteMode2"]'); | |
var checkBox3 = $e_7('//*[@id="ckAutoRouteMode"]'); | |
var baseText = $e_7('//*[@id="routeInfoText"]'); | |
//------------------// | |
// 画面サイズの取得 // | |
//------------------// | |
var viewSize; | |
viewSize = getViewSize(); | |
var enf = true; | |
if( checkBox.snapshotLength > 0 ){ | |
// ルート構築モードがON | |
if( checkBox.snapshotItem(0).checked == true ){ | |
// ルート構築モード | |
enf = false; | |
if( viewSize == 51 ){ | |
// 51x51モードの場合、他とは違う処理をする | |
var elem; | |
var elemhtml = ""; | |
// マウス直下の情報を取得 | |
var el = document.elementFromPoint(e.clientX, e.clientY); | |
if( el != undefined ){ | |
if( el.tagName == "A" ){ | |
elem = el.parentNode; | |
} | |
else if( el.tagName == "FONT" ){ | |
elem = el.parentNode.parentNode.parentNode; | |
} | |
else{ | |
return; | |
} | |
elemhtml = elem.innerHTML; | |
} | |
// 自動構築モードがOFF | |
if( checkBox3.snapshotItem(0).checked == false ){ | |
alert("51x51画面では、自動ルート構築のみ実施可能です。\n自動ルート構築をチェックしてください。"); | |
return; | |
} | |
var list2 = elemhtml.match(/x=([-]*\d+)&y=([-]*\d+)#/); | |
if( (list2 != null) && (list2 != undefined) ){ | |
// クリックタイミングにより取れない場合は飛ばすため | |
if( (autoroute == AUTO_ROUTE_EDIT_LAST) && (autoroute_f[0] == list2[1]) && (autoroute_f[1] == list2[2]) ){ | |
// 終点=始点の場合、経路情報を削除し、モードを戻す | |
// 経路情報を消す | |
getNPCCastleInfo_51(1); | |
// モードを戻す | |
autoroute = AUTO_ROUTE_EDIT_FIRST; | |
// インフォメーションの更新 | |
autoRouteInfo(); | |
} | |
else if( (autoroute == AUTO_ROUTE_EDIT_END) && (autoroute_l[0] == list2[1]) && (autoroute_l[1] == list2[2]) ){ | |
// 終了後に終点クリックの場合、始点以外を削除し、モードを戻す | |
// 経路情報を消す | |
getNPCCastleInfo_51(1); | |
// ルートテキストをクリア | |
baseText.snapshotItem(0).innerHTML = ""; | |
// モードを戻す | |
autoroute = AUTO_ROUTE_EDIT_LAST; | |
// インフォメーションの更新 | |
autoRouteInfo(); | |
} | |
else{ | |
var newhtml; | |
var vtext; | |
var data = elemhtml.match(/<font.*>(.*)<\/font>/); | |
// 座標の登録 | |
if( autoroute == AUTO_ROUTE_EDIT_FIRST ){ | |
autoroute_f[0] = list2[1]; | |
autoroute_f[1] = list2[2]; | |
autoroute_f[2] = data[1]; | |
// 表示テキスト | |
vtext = "S"; | |
// モード変更 | |
autoroute = AUTO_ROUTE_EDIT_LAST; | |
// インフォメーションの更新 | |
autoRouteInfo(); | |
} | |
else if( autoroute == AUTO_ROUTE_EDIT_LAST ){ | |
autoroute_l[0] = list2[1]; | |
autoroute_l[1] = list2[2]; | |
autoroute_l[2] = data[1]; | |
// 表示テキスト | |
vtext = "E"; | |
// モード変更 | |
autoroute = AUTO_ROUTE_EDIT_END; | |
// インフォメーションの更新 | |
autoRouteInfo(); | |
} | |
// テキスト設定 | |
if( elemhtml.indexOf("<b>") >= 0 ){ | |
newhtml = elemhtml.replace(/<b>.*<\/b>/,"<font style=\"text-shadow: -1px -1px 0 #FFF, 1px -1px 0 #FFF, -1px 1px 0 #FFF, 1px 1px 0 #FFF; color:red; border-style: solid; border-color: cyan; background-color:cyan;\">" + vtext + "</font>"); | |
} | |
else{ | |
newhtml = elemhtml.replace(/<font.*>.*<\/font>/,"<font style=\"text-shadow: -1px -1px 0 #FFF, 1px -1px 0 #FFF, -1px 1px 0 #FFF, 1px 1px 0 #FFF; border-style: solid; border-color: cyan; color:red; background-color:cyan;\">" + vtext + "</font>"); | |
} | |
// マークを画面上に表示 | |
elem.innerHTML = newhtml; | |
if( autoroute == AUTO_ROUTE_EDIT_END ){ | |
// 始点、終点の設定がおわった | |
// ルート構築チェック(引数"1"はルートチェック) | |
if( makeAutoRoute_51("1") == false ){ | |
alert("目的地に到達するルートには到達できません。条件を見直してください。"); | |
// 経路情報を消す | |
getNPCCastleInfo_51(1); | |
// モードを戻す | |
autoroute = AUTO_ROUTE_EDIT_LAST; | |
// インフォメーションの更新 | |
autoRouteInfo(); | |
return; | |
} | |
// 確認 | |
if( window.confirm("この座標からルートを構築します") ){ | |
// ルート構築 | |
makeAutoRoute_51("0"); | |
} | |
else{ | |
// 経路情報を消す | |
getNPCCastleInfo_51(1); | |
// モードを戻す | |
autoroute = AUTO_ROUTE_EDIT_LAST; | |
// インフォメーションの更新 | |
autoRouteInfo(); | |
} | |
} | |
} | |
} | |
// コンテキストメニュー制御 | |
var body = $e_7('//body'); | |
if( body.snapshotLength > 0 ){ | |
if( enf == false ){ | |
body.snapshotItem(0).setAttribute("onContextmenu","return false;"); | |
} | |
else{ | |
body.snapshotItem(0).setAttribute("onContextmenu","return true;"); | |
} | |
} | |
return; | |
} | |
//---------------------------------// | |
// 51x51モードでないルート構築処理 // | |
//---------------------------------// | |
// 自動構築モードがOFF | |
if( checkBox3.snapshotItem(0).checked == false ){ | |
//----------------// | |
// 手動ルート構築 // | |
//----------------// | |
var obj = $e_7('//*[@id="x_y"]'); | |
var obj2 = $e_7('//*[@id="power"]'); | |
var obj3 = $e_7('//*[@id="material"]'); | |
var obj4 = $e_7('//*[@id="village_name"]'); | |
if( obj.snapshotLength > 0 ){ | |
var data = obj.snapshotItem(0).textContent; | |
data = data.replace(/ \/.*$/,""); | |
var data2 = obj2.snapshotItem(0).textContent; | |
var data3 = obj3.snapshotItem(0).textContent; | |
var list = data3.match(/^. *(\d+) . *(\d+) . *(\d+) . *(\d+)/); | |
var list2 = data.match(/^.([-]*\d+),([-]*\d+)/); | |
if( list2 != null ){ | |
// クリックタイミングにより取れない場合は飛ばすため | |
//----------------------// | |
// クリックデータの処理 // | |
//----------------------// | |
// ルート構築テキストの取得 | |
var text = baseText.snapshotItem(0).innerHTML; | |
// areaデータを取ってみる | |
var area_pos = $x_7("//map[@id=\"mapOverlayMap\"]//area[@href=\"land.php?x=" + list2[1] + "&y=" + list2[2] + "#ptop\"]"); | |
if( area_pos == null ){ | |
area_pos = $x_7("//map[@id=\"mapOverlayMap\"]//area[@href=\"land.php?x=" + list2[1] + "&y=" + list2[2] + "\"]"); | |
} | |
var list3 = area_pos.getAttribute("onmouseover").match(/'(\d+)px', '(\d+)px/); | |
// すでに画像が登録されてるか調べる | |
var ex = $e_7('//*[@id="' + list2[1] + '_' + list2[2] + '"]'); | |
if( ex.snapshotLength > 0 ){ | |
// 画像がいたら消す | |
var ex2 = $x_7('//*[@id="' + list2[1] + '_' + list2[2] + '"]'); | |
var ex2_p = ex2.parentNode; | |
ex2_p.removeChild(ex2); | |
var fp = text.indexOf(list2[0]); | |
var ep = text.indexOf("<br>",fp); | |
if( ep == -1 ){ | |
if( fp == 0 ){ | |
text = text.substr(0,fp); | |
} | |
else{ | |
text = text.substr(0,fp-4); | |
} | |
} | |
else{ | |
text = text.substr(0,fp) + text.substr(ep+4); | |
} | |
baseText.snapshotItem(0).innerHTML = text; | |
// ルートチェックの再実行 | |
routeCheckButtonClicked(); | |
} | |
else{ | |
// 画像がいなければルート追加 | |
var landLevel = data2.length; | |
var dt = obj2.snapshotItem(0).innerHTML.match(/star_warpower_b.gif/); | |
if( dt != null && dt.length > 0){ | |
// FaceBook Lands of Legends! 対応 | |
var stars = obj2.snapshotItem(0).innerHTML.match(/<img/g); | |
landLevel = stars.length; | |
list = data3.match(/Forest (\d+) Clay (\d+) Iron (\d+) Crop (\d+)/); | |
} | |
// 直前のルートからの距離を求める | |
var errf = false; | |
if( text != "" ){ | |
var p1 = text.lastIndexOf("<br>"); | |
var p2 = text.indexOf("×"); | |
var pos = new Array(); | |
if( p1 != -1 ){ | |
pos = text.substr(p1+4).match(/^\(([-]*\d+),([-]*\d+)/); | |
} | |
else{ | |
pos = text.match(/^\(([-]*\d+),([-]*\d+)/); | |
} | |
var dx = Math.abs(parseInt(pos[1]) - parseInt(list2[1])); | |
var dy = Math.abs(parseInt(pos[2]) - parseInt(list2[2])); | |
if( (dx >= 2) || (dy >= 2) || (p2 != -1) ){ | |
// 距離2以上か、すでに×アイコンがあればエラーアイコン | |
errf = true; | |
} | |
} | |
// テキストの更新 | |
if( text != "" ){ | |
text = text + "<br>"; | |
} | |
if( checkBox2.snapshotItem(0).checked == false ){ | |
if( list != null ){ | |
// 資源量出力があれば領地または空き地 | |
text = text + data + " ★" + landLevel + " (" + list[1] + "-" + list[2] + "-" + list[3] + "-" + list[4] + ")"; | |
} | |
else{ | |
// 資源量出力がなければ拠点か本拠地かNPC砦 | |
if( landLevel == 0 ){ | |
// ★0なら個人の本拠地または拠点 | |
text = text + data + " 個人本拠地/拠点"; | |
} | |
else{ | |
// ★0以外ならNPC砦または武将砦 | |
text = text + data + " ★" + landLevel + " (" + obj4.snapshotItem(0).textContent + ")"; | |
} | |
} | |
} | |
else{ | |
text = text + data + " ★" + landLevel; | |
} | |
if( (errf == true) && (p2 == -1) ){ | |
// 初回ルートエラーの場合赤×を追加 | |
text = text + '<b><font color="red">×</font></b>'; | |
} | |
baseText.snapshotItem(0).innerHTML = text; | |
// クリックしたポイントに画像を埋め込む | |
var img = d_7.createElement("img"); | |
img.style.position = "absolute"; | |
img.style.left = list3[1] + "px"; | |
img.style.top = list3[2] + "px"; | |
// アイコンの決定 | |
if( errf == false ){ | |
img.src = ricon; | |
} | |
else{ | |
img.src = ricon_e; | |
} | |
if( viewSize == 15 ){ | |
img.style.width = "44px"; | |
img.style.height = "44px"; | |
img.style.zIndex = 227; | |
} else if( viewSize == 21 ){ | |
img.style.width = "33px"; | |
img.style.height = "33px"; | |
img.style.zIndex = 444; | |
} else { | |
img.style.width = "60px"; | |
img.style.height = "60px"; | |
img.style.zIndex = 123; | |
} | |
img.name = "routeIcon"; | |
img.id = list2[1] + "_" + list2[2]; // 座標をイメージのIDにする | |
rollover.parentNode.insertBefore(img, rollover.nextSibling); | |
// スクロールバーを最下段に移動する | |
baseText.snapshotItem(0).parentNode.scrollTop = baseText.snapshotItem(0).parentNode.scrollHeight; | |
} | |
} | |
} | |
} | |
else{ | |
//----------------// | |
// 自動ルート構築 // | |
//----------------// | |
var obj = $e_7('//*[@id="x_y"]'); | |
if( obj.snapshotLength > 0 ){ | |
var data = obj.snapshotItem(0).textContent; | |
data = data.replace(/ \/.*$/,""); | |
var list2 = data.match(/^.([-]*\d+),([-]*\d+)/); | |
if( (list2 != null) && (list2 != undefined) ){ | |
// クリックタイミングにより取れない場合は飛ばすため | |
//----------------------// | |
// クリックデータの処理 // | |
//----------------------// | |
// areaデータを取ってみる | |
var area_pos = $x_7("//map[@id=\"mapOverlayMap\"]//area[@href=\"land.php?x=" + list2[1] + "&y=" + list2[2] + "#ptop\"]"); | |
if( area_pos == null ){ | |
area_pos = $x_7("//map[@id=\"mapOverlayMap\"]//area[@href=\"land.php?x=" + list2[1] + "&y=" + list2[2] + "\"]"); | |
} | |
var list3 = area_pos.getAttribute("onmouseover").match(/'(\d+)px', '(\d+)px/); | |
var ex = $e_7('//*[@id="' + list2[1] + '_' + list2[2] + '"]'); | |
if( (autoroute == AUTO_ROUTE_EDIT_LAST) && (ex.snapshotLength > 0) | |
&& (autoroute_f[0] == list2[1]) && (autoroute_f[1] == list2[2]) ){ | |
// 終点=始点の場合、登録済み画像を削除し、モードを戻す | |
// 画像がいたら消す | |
var ex2 = $x_7('//*[@id="' + list2[1] + '_' + list2[2] + '"]'); | |
var ex2_p = ex2.parentNode; | |
ex2_p.removeChild(ex2); | |
// モードを戻す | |
autoroute = AUTO_ROUTE_EDIT_FIRST; | |
// インフォメーションの更新 | |
autoRouteInfo(); | |
} | |
else if( (autoroute == AUTO_ROUTE_EDIT_END) && (ex.snapshotLength > 0) | |
&& (autoroute_l[0] == list2[1]) && (autoroute_l[1] == list2[2]) ){ | |
// 終了後に終点クリックの場合、始点以外を削除し、モードを戻す | |
// 始点以外の画像を全部消す | |
var en = $e_7('//*[@name="routeIcon"]'); | |
if( en.snapshotLength > 0 ){ | |
for( var i = 0; i < en.snapshotLength; i++ ){ | |
if( en.snapshotItem(i).id != autoroute_f[0] + "_" + autoroute_f[1] ){ | |
var ex = $x_7('//*[@id="' + en.snapshotItem(i).id + '"]'); | |
var ex_p = ex.parentNode; | |
ex_p.removeChild(ex); | |
} | |
} | |
} | |
// ルートテキストをクリア | |
baseText.snapshotItem(0).innerHTML = ""; | |
// モードを戻す | |
autoroute = AUTO_ROUTE_EDIT_LAST; | |
// インフォメーションの更新 | |
autoRouteInfo(); | |
} | |
else{ | |
// クリックしたポイントに画像を埋め込む | |
var img = d_7.createElement("img"); | |
img.style.position = "absolute"; | |
img.style.left = list3[1] + "px"; | |
img.style.top = list3[2] + "px"; | |
// アイコンの決定 | |
if( autoroute == AUTO_ROUTE_EDIT_FIRST ){ | |
img.src = ricon_f; | |
} | |
else if( autoroute == AUTO_ROUTE_EDIT_LAST ){ | |
img.src = ricon_l; | |
} | |
if( viewSize == 15 ){ | |
img.style.width = "44px"; | |
img.style.height = "44px"; | |
img.style.zIndex = 227; | |
} else if( viewSize == 21 ){ | |
img.style.width = "33px"; | |
img.style.height = "33px"; | |
img.style.zIndex = 444; | |
} else { | |
img.style.width = "60px"; | |
img.style.height = "60px"; | |
img.style.zIndex = 123; | |
} | |
img.name = "routeIcon"; | |
img.id = list2[1] + "_" + list2[2]; // 座標をイメージのIDにする | |
rollover.parentNode.insertBefore(img, rollover.nextSibling); | |
// 座標の登録 | |
if( autoroute == AUTO_ROUTE_EDIT_FIRST ){ | |
autoroute_f[0] = list2[1]; | |
autoroute_f[1] = list2[2]; | |
// モード変更 | |
autoroute = AUTO_ROUTE_EDIT_LAST; | |
// インフォメーションの更新 | |
autoRouteInfo(); | |
} | |
else if( autoroute == AUTO_ROUTE_EDIT_LAST ){ | |
autoroute_l[0] = list2[1]; | |
autoroute_l[1] = list2[2]; | |
// モード変更 | |
autoroute = AUTO_ROUTE_EDIT_END; | |
// インフォメーションの更新 | |
autoRouteInfo(); | |
// ルート構築チェック(引数"1"はルートチェック) | |
if( makeAutoRoute("1") == false ){ | |
alert("目的地に到達するルートには到達できません。条件を見直してください。"); | |
// 画像の削除とモードの戻し | |
var ex2 = $x_7('//*[@id="' + list2[1] + '_' + list2[2] + '"]'); | |
var ex2_p = ex2.parentNode; | |
ex2_p.removeChild(ex2); | |
// モードを戻す | |
autoroute = AUTO_ROUTE_EDIT_LAST; | |
// インフォメーションの更新 | |
autoRouteInfo(); | |
return; | |
} | |
// 確認 | |
if( window.confirm("この座標からルートを構築します") ){ | |
// ルート構築 | |
makeAutoRoute("0"); | |
} | |
else{ | |
// 画像の削除とモードの戻し | |
var ex2 = $x_7('//*[@id="' + list2[1] + '_' + list2[2] + '"]'); | |
var ex2_p = ex2.parentNode; | |
ex2_p.removeChild(ex2); | |
// モードを戻す | |
autoroute = AUTO_ROUTE_EDIT_LAST; | |
// インフォメーションの更新 | |
autoRouteInfo(); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
// コンテキストメニュー制御 | |
var body = $e_7('//body'); | |
if( body.snapshotLength > 0 ){ | |
if( enf == false ){ | |
body.snapshotItem(0).setAttribute("onContextmenu","return false;"); | |
} | |
else{ | |
body.snapshotItem(0).setAttribute("onContextmenu","return true;"); | |
} | |
} | |
} | |
//--------------// | |
// リロード処理 // | |
//--------------// | |
function reloadNext(){ | |
// マップに埋め込んだマーク画像を全部消す | |
var rollover = $d("rollover"); | |
// すでに画像が登録されてるか調べる | |
var en = $e_7('//*[@name="viewIcon"]'); | |
if( en.snapshotLength > 0 ){ | |
// 画像がいたら消す | |
for( var i = 0; i < en.snapshotLength; i++ ){ | |
var ex = $x_7('//*[@name="viewIcon"]'); | |
var ex_p = ex.parentNode; | |
ex_p.removeChild(ex); | |
} | |
} | |
en = $e_7('//*[@name="atkIcon"]'); | |
if( en.snapshotLength > 0 ){ | |
// 画像がいたら消す | |
for( var i = 0; i < en.snapshotLength; i++ ){ | |
var ex = $x_7('//*[@name="atkIcon"]'); | |
var ex_p = ex.parentNode; | |
ex_p.removeChild(ex); | |
} | |
} | |
en = $e_7('//*[@id="icon_east"]'); | |
if( en.snapshotLength > 0 ){ | |
// 画像がいたら消す | |
var ex = $x_7('//*[@id="icon_east"]'); | |
var ex_p = ex.parentNode; | |
ex_p.removeChild(ex); | |
} | |
en = $e_7('//*[@id="icon_west"]'); | |
if( en.snapshotLength > 0 ){ | |
// 画像がいたら消す | |
var ex = $x_7('//*[@id="icon_west"]'); | |
var ex_p = ex.parentNode; | |
ex_p.removeChild(ex); | |
} | |
en = $e_7('//*[@id="icon_north"]'); | |
if( en.snapshotLength > 0 ){ | |
// 画像がいたら消す | |
var ex = $x_7('//*[@id="icon_north"]'); | |
var ex_p = ex.parentNode; | |
ex_p.removeChild(ex); | |
} | |
en = $e_7('//*[@id="icon_south"]'); | |
if( en.snapshotLength > 0 ){ | |
// 画像がいたら消す | |
var ex = $x_7('//*[@id="icon_south"]'); | |
var ex_p = ex.parentNode; | |
ex_p.removeChild(ex); | |
} | |
// 画面更新 | |
if( getViewSize() != 51 ){ | |
getNPCCastleInfo(); | |
} | |
else{ | |
getNPCCastleInfo_51(0); // 0:通常再描画 | |
} | |
} | |
//------------------------// | |
// 更新ボタン押下処理処理 // | |
//------------------------// | |
function updateButtonClicked() { | |
var checkbox; | |
var userbox; | |
var listbox; | |
var colorNo; | |
//--------------------------------------// | |
// チェックボックスに関する情報をロード // | |
//--------------------------------------// | |
var chkflg1; | |
var chkflg2; | |
execFlag = loadExecFlag(location.hostname, "FLAG0"); | |
if( execFlag == "" ){ | |
// 表示フラグをロード | |
var execFlag1 = loadExecFlag(location.hostname, "FLAG1"); | |
if( execFlag1 == "" ){ | |
chkflg1 = new String(FLAG1); // 初期値 | |
} | |
else{ | |
chkflg1 = execFlag1; | |
} | |
// オプションフラグをロード | |
var execFlag2 = loadExecFlag(location.hostname, "FLAG2"); | |
if( execFlag2 == "" ){ | |
chkflg2 = new String(FLAG2); // 初期値 | |
} | |
else{ | |
chkflg2 = execFlag2; | |
} | |
// 初回のときは、フラグを保存 | |
execFlag = chkflg1 + DELIMIT1_7 + chkflg2; | |
saveExecFlag(location.hostname, "FLAG0", execFlag); | |
} | |
else{ | |
var loadflg = new Array(); | |
loadflg = execFlag.split(DELIMIT1_7); | |
chkflg1 = loadflg[0]; | |
chkflg2 = loadflg[1]; | |
} | |
// 個人、同盟検索情報をロード | |
var chkflg3 = new Array(); | |
var execFlag = loadExecFlag(location.hostname, "FLAG3"); | |
if( execFlag == "" ){ | |
var execFlag3 = loadExecFlag(location.hostname, "FLAG3-1"); | |
if( execFlag3 == "" ){ | |
chkflg3[0] = new String(FLAG3_1); // 初期値 | |
} | |
else{ | |
chkflg3[0] = execFlag3; | |
} | |
execFlag3 = loadExecFlag(location.hostname, "FLAG3-2"); | |
if( execFlag3 == "" ){ | |
chkflg3[1] = new String(FLAG3_2); // 初期値 | |
} | |
else{ | |
chkflg3[1] = execFlag3; | |
} | |
execFlag3 = loadExecFlag(location.hostname, "FLAG3-3"); | |
if( execFlag3 == "" ){ | |
chkflg3[2] = new String(FLAG3_3); // 初期値 | |
} | |
else{ | |
chkflg3[2] = execFlag3; | |
} | |
// 初回のときは、フラグを保存 | |
execFlag = chkflg3[0] + DELIMIT1_7 + chkflg3[1] + DELIMIT1_7 + chkflg3[2]; | |
saveExecFlag(location.hostname, "FLAG3", execFlag); | |
} | |
else{ | |
chkflg3 = execFlag.split(DELIMIT1_7); | |
} | |
var chkflg4; | |
execFlag = loadExecFlag(location.hostname, "FLAG4"); | |
if( execFlag == "" ){ | |
chkflg4 = new String(FLAG4); // 初期値 | |
// 初回のときは、フラグを保存 | |
execFlag = chkflg4; | |
saveExecFlag(location.hostname, "FLAG4", execFlag); | |
} | |
else{ | |
chkflg4 = execFlag; | |
} | |
//--------------------// | |
// 空き地検索チェック // | |
//--------------------// | |
checkBox = $e_7('//*[@id="ckEmpty"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg2 = '0' + chkflg2.substr(1); | |
} | |
else{ | |
chkflg2 = '1' + chkflg2.substr(1); | |
} | |
//------------------// | |
// 領土検索チェック // | |
//------------------// | |
checkBox = $e_7('//*[@id="ckLand"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg2 = chkflg2.substr(0,1) + '0' + chkflg2.substr(2); | |
} | |
else{ | |
chkflg2 = chkflg2.substr(0,1) + '1' + chkflg2.substr(2); | |
} | |
//------------------// | |
// 資源表示チェック // | |
//------------------// | |
checkBox = $e_7('//*[@id="ckAnalyze"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg2 = chkflg2.substr(0,2) + '0' + chkflg2.substr(3); | |
} | |
else{ | |
chkflg2 = chkflg2.substr(0,2) + '1' + chkflg2.substr(3); | |
} | |
//----------------------// | |
// レーダー表示チェック // | |
//----------------------// | |
checkBox = $e_7('//*[@id="ckRader"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg2 = chkflg2.substr(0,3) + '0' + chkflg2.substr(4); | |
} | |
else{ | |
chkflg2 = chkflg2.substr(0,3) + '1' + chkflg2.substr(4); | |
} | |
//------------------------// | |
// 本拠地一覧表示チェック // | |
//------------------------// | |
checkBox = $e_7('//*[@id="ckOwnerList"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg2 = chkflg2.substr(0,4) + '0' + chkflg2.substr(5); | |
} | |
else{ | |
chkflg2 = chkflg2.substr(0,4) + '1' + chkflg2.substr(5); | |
} | |
//--------------------// | |
// 空き地着色チェック // | |
//--------------------// | |
checkBox = $e_7('//*[@id="ckEmptyDraw"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg2 = chkflg2.substr(0,5) + '0' + chkflg2.substr(6); | |
} | |
else{ | |
chkflg2 = chkflg2.substr(0,5) + '1' + chkflg2.substr(6); | |
} | |
// 枠色 | |
listBox = $e_7('//*[@id="lsEmptyColor"]'); | |
colorNo = listBox.snapshotItem(0).selectedIndex; | |
chkflg2 = chkflg2.substr(0,6) + colorNo + chkflg2.substr(7); | |
//--------------// | |
// 強調表示指定 // | |
//--------------// | |
checkBox = $e_7('//*[@id="ckEmptyDraw"]'); | |
// 選択領土1 | |
listBox = $e_7('//*[@id="lsArea"]'); | |
areaNo = listBox.snapshotItem(0).selectedIndex; | |
chkflg2 = chkflg2.substr(0,7) + formatRightNumber(areaNo,3) + chkflg2.substr(10); | |
// 選択領土2 | |
listBox = $e_7('//*[@id="lsArea2"]'); | |
areaNo = listBox.snapshotItem(0).selectedIndex; | |
chkflg2 = chkflg2.substr(0,10) + formatRightNumber(areaNo,3) + chkflg2.substr(13); | |
// 選択領土3 | |
listBox = $e_7('//*[@id="lsArea3"]'); | |
areaNo = listBox.snapshotItem(0).selectedIndex; | |
chkflg2 = chkflg2.substr(0,13) + formatRightNumber(areaNo,3) + chkflg2.substr(16); | |
//----------------------// | |
// メニュー表示チェック // | |
//----------------------// | |
checkBox = $e_7('//*[@id="ckMenu2"]'); | |
// メニュー2 | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg2 = chkflg2.substr(0,16) + '0' + chkflg2.substr(17); | |
} | |
else{ | |
chkflg2 = chkflg2.substr(0,16) + '1' + chkflg2.substr(17); | |
} | |
// メニュー4 | |
checkBox = $e_7('//*[@id="ckMenu4"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg2 = chkflg2.substr(0,17) + '0' + chkflg2.substr(18); | |
} | |
else{ | |
chkflg2 = chkflg2.substr(0,17) + '1' + chkflg2.substr(18); | |
} | |
//--------------------------// | |
// ルート自動構築オプション // | |
//--------------------------// | |
//-- ルート自動構築オプション見出し --// | |
// 探査レベル | |
listBox = $e_7('//*[@id="lsRouteLevel"]'); | |
var level = listBox.snapshotItem(0).selectedIndex; | |
chkflg2 = chkflg2.substr(0,19) + level + chkflg2.substr(20); | |
// 資源回避レベル | |
listBox = $e_7('//*[@id="lsSkipRes"]'); | |
var level = listBox.snapshotItem(0).selectedIndex; | |
chkflg2 = chkflg2.substr(0,20) + level + chkflg2.substr(21); | |
// 個人領土回避 | |
checkBox = $e_7('//*[@id="ckRouteUser"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg2 = chkflg2.substr(0,21) + '0' + chkflg2.substr(22); | |
} | |
else{ | |
chkflg2 = chkflg2.substr(0,21) + '1' + chkflg2.substr(22); | |
} | |
// 通過同盟指定 | |
listBox = $e_7('//*[@id="lsSkipGroup"]'); | |
var level = listBox.snapshotItem(0).selectedIndex; | |
chkflg2 = chkflg2.substr(0,22) + level + chkflg2.substr(23); | |
// 可変ルート | |
checkBox = $e_7('//*[@id="ckRouteRandom"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg2 = chkflg2.substr(0,23) + '0' + chkflg2.substr(24); | |
} | |
else{ | |
chkflg2 = chkflg2.substr(0,23) + '1' + chkflg2.substr(24); | |
} | |
//-- 表示オプション追加 --// | |
// 方位表示 | |
checkBox = $e_7('//*[@id="ckDirection"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg2 = chkflg2.substr(0,24) + '0' + chkflg2.substr(25); | |
} | |
else{ | |
chkflg2 = chkflg2.substr(0,24) + '1' + chkflg2.substr(25); | |
} | |
//-- 旧マップモード --// | |
chkflg2 = chkflg2.substr(0,25) + '0' + chkflg2.substr(26); | |
//-- 51x51で使わない --// | |
checkBox = $e_7('//*[@id="ckNoExec51"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg2 = chkflg2.substr(0,26) + '0' + chkflg2.substr(27); | |
} | |
else{ | |
chkflg2 = chkflg2.substr(0,26) + '1' + chkflg2.substr(27); | |
} | |
//---------------// | |
// NPC砦チェック // | |
//---------------// | |
checkBox = $e_7('//*[@id="ckNPC"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg1 = '0' + chkflg1.substr(1); | |
} | |
else{ | |
chkflg1 = '1' + chkflg1.substr(1); | |
} | |
//---------------// | |
// ☆1砦チェック // | |
//---------------// | |
checkBox = $e_7('//*[@id="ckLevel1"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg1 = chkflg1.substr(0,1) + '0' + chkflg1.substr(2); | |
} | |
else{ | |
chkflg1 = chkflg1.substr(0,1) + '1' + chkflg1.substr(2); | |
} | |
//---------------// | |
// ☆2砦チェック // | |
//---------------// | |
checkBox = $e_7('//*[@id="ckLevel2"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg1 = chkflg1.substr(0,2) + '0' + chkflg1.substr(3); | |
} | |
else{ | |
chkflg1 = chkflg1.substr(0,2) + '1' + chkflg1.substr(3); | |
} | |
//---------------// | |
// ☆3砦チェック // | |
//---------------// | |
checkBox = $e_7('//*[@id="ckLevel3"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg1 = chkflg1.substr(0,3) + '0' + chkflg1.substr(4); | |
} | |
else{ | |
chkflg1 = chkflg1.substr(0,3) + '1' + chkflg1.substr(4); | |
} | |
//---------------// | |
// ☆4砦チェック // | |
//---------------// | |
checkBox = $e_7('//*[@id="ckLevel4"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg1 = chkflg1.substr(0,4) + '0' + chkflg1.substr(5); | |
} | |
else{ | |
chkflg1 = chkflg1.substr(0,4) + '1' + chkflg1.substr(5); | |
} | |
//---------------// | |
// ☆5砦チェック // | |
//---------------// | |
checkBox = $e_7('//*[@id="ckLevel5"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg1 = chkflg1.substr(0,5) + '0' + chkflg1.substr(6); | |
} | |
else{ | |
chkflg1 = chkflg1.substr(0,5) + '1' + chkflg1.substr(6); | |
} | |
//---------------// | |
// ☆6砦チェック // | |
//---------------// | |
checkBox = $e_7('//*[@id="ckLevel6"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg1 = chkflg1.substr(0,6) + '0' + chkflg1.substr(7); | |
} | |
else{ | |
chkflg1 = chkflg1.substr(0,6) + '1' + chkflg1.substr(7); | |
} | |
//---------------// | |
// ☆7砦チェック // | |
//---------------// | |
checkBox = $e_7('//*[@id="ckLevel7"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg1 = chkflg1.substr(0,7) + '0' + chkflg1.substr(8); | |
} | |
else{ | |
chkflg1 = chkflg1.substr(0,7) + '1' + chkflg1.substr(8); | |
} | |
//---------------// | |
// ☆8砦チェック // | |
//---------------// | |
checkBox = $e_7('//*[@id="ckLevel8"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg1 = chkflg1.substr(0,8) + '0' + chkflg1.substr(9); | |
} | |
else{ | |
chkflg1 = chkflg1.substr(0,8) + '1' + chkflg1.substr(9); | |
} | |
//---------------// | |
// ☆9砦チェック // | |
//---------------// | |
checkBox = $e_7('//*[@id="ckLevel9"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg1 = chkflg1.substr(0,9) + '0'; | |
} | |
else{ | |
chkflg1 = chkflg1.substr(0,9) + '1'; | |
} | |
//--------------------// | |
// 個人/同盟1の処理 // | |
//--------------------// | |
userBox = $e_7('//*[@id="userBox1"]'); | |
// 有効/無効 | |
checkBox = $e_7('//*[@id="ckEnable1"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg3[0] = '0' + chkflg3[0].substr(1); | |
userBox.disabled = true; | |
} | |
else{ | |
chkflg3[0] = '1' + chkflg3[0].substr(1); | |
userBox.disabled = false; | |
} | |
// 個人/同盟 | |
checkBox = $e_7('//*[@id="ckType1"]'); | |
if( checkBox.snapshotItem(0).checked == true ){ | |
// 個人 | |
chkflg3[0] = chkflg3[0].substr(0,1) + '10' + chkflg3[0].substr(3); | |
} | |
else{ | |
// 同盟 | |
chkflg3[0] = chkflg3[0].substr(0,1) + '01' + chkflg3[0].substr(3); | |
} | |
// 完全一致 | |
checkBox = $e_7('//*[@id="ckFullMatch1"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg3[0] = chkflg3[0].substr(0,3) + '0' + chkflg3[0].substr(4); | |
} | |
else{ | |
chkflg3[0] = chkflg3[0].substr(0,3) + '1' + chkflg3[0].substr(4); | |
} | |
// 絞り込み | |
checkBox = $e_7('//*[@id="ckLevelSearch1"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg3[0] = chkflg3[0].substr(0,4) + '0' + chkflg3[0].substr(5); | |
} | |
else{ | |
chkflg3[0] = chkflg3[0].substr(0,4) + '1' + chkflg3[0].substr(5); | |
} | |
// ユーザー名を更新 | |
chkflg3[0] = chkflg3[0].substr(0,FLAG3_NAME) + userBox.snapshotItem(0).value; | |
// 枠色 | |
listBox = $e_7('//*[@id="lsColor1"]'); | |
colorNo = listBox.snapshotItem(0).selectedIndex; | |
chkflg3[0] = chkflg3[0].substr(0,5) + colorNo + chkflg3[0].substr(6); | |
//--------------------// | |
// 個人/同盟2の処理 // | |
//--------------------// | |
userBox = $e_7('//*[@id="userBox2"]'); | |
// 有効/無効 | |
checkBox = $e_7('//*[@id="ckEnable2"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg3[1] = '0' + chkflg3[1].substr(1); | |
userBox.disabled = true; | |
} | |
else{ | |
chkflg3[1] = '1' + chkflg3[1].substr(1); | |
userBox.disabled = false; | |
} | |
// 個人/同盟 | |
checkBox = $e_7('//*[@id="ckType2"]'); | |
if( checkBox.snapshotItem(0).checked == true ){ | |
// 個人 | |
chkflg3[1] = chkflg3[1].substr(0,1) + '10' + chkflg3[1].substr(3); | |
} | |
else{ | |
// 同盟 | |
chkflg3[1] = chkflg3[1].substr(0,1) + '01' + chkflg3[1].substr(3); | |
} | |
// 完全一致 | |
checkBox = $e_7('//*[@id="ckFullMatch2"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg3[1] = chkflg3[1].substr(0,3) + '0' + chkflg3[1].substr(4); | |
} | |
else{ | |
chkflg3[1] = chkflg3[1].substr(0,3) + '1' + chkflg3[1].substr(4); | |
} | |
// 絞り込み | |
checkBox = $e_7('//*[@id="ckLevelSearch2"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg3[1] = chkflg3[1].substr(0,4) + '0' + chkflg3[1].substr(5); | |
} | |
else{ | |
chkflg3[1] = chkflg3[1].substr(0,4) + '1' + chkflg3[1].substr(5); | |
} | |
// ユーザー名を更新 | |
chkflg3[1] = chkflg3[1].substr(0,FLAG3_NAME) + userBox.snapshotItem(0).value; | |
// 枠色 | |
listBox = $e_7('//*[@id="lsColor2"]'); | |
colorNo = listBox.snapshotItem(0).selectedIndex; | |
chkflg3[1] = chkflg3[1].substr(0,5) + colorNo + chkflg3[1].substr(6); | |
//--------------------// | |
// 個人/同盟3の処理 // | |
//--------------------// | |
userBox = $e_7('//*[@id="userBox3"]'); | |
// 有効/無効 | |
checkBox = $e_7('//*[@id="ckEnable3"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg3[2] = '0' + chkflg3[2].substr(1); | |
userBox.disabled = true; | |
} | |
else{ | |
chkflg3[2] = '1' + chkflg3[2].substr(1); | |
userBox.disabled = false; | |
} | |
// 個人/同盟 | |
checkBox = $e_7('//*[@id="ckType3"]'); | |
if( checkBox.snapshotItem(0).checked == true ){ | |
// 個人 | |
chkflg3[2] = chkflg3[2].substr(0,1) + '10' + chkflg3[2].substr(3); | |
} | |
else{ | |
// 同盟 | |
chkflg3[2] = chkflg3[2].substr(0,1) + '01' + chkflg3[2].substr(3); | |
} | |
// 完全一致 | |
checkBox = $e_7('//*[@id="ckFullMatch3"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg3[2] = chkflg3[2].substr(0,3) + '0' + chkflg3[2].substr(4); | |
} | |
else{ | |
chkflg3[2] = chkflg3[2].substr(0,3) + '1' + chkflg3[2].substr(4); | |
} | |
// 絞り込み | |
checkBox = $e_7('//*[@id="ckLevelSearch3"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg3[2] = chkflg3[2].substr(0,4) + '0' + chkflg3[2].substr(5); | |
} | |
else{ | |
chkflg3[2] = chkflg3[2].substr(0,4) + '1' + chkflg3[2].substr(5); | |
} | |
// ユーザー名を更新 | |
chkflg3[2] = chkflg3[2].substr(0,FLAG3_NAME) + userBox.snapshotItem(0).value; | |
// 枠色 | |
listBox = $e_7('//*[@id="lsColor3"]'); | |
colorNo = listBox.snapshotItem(0).selectedIndex; | |
chkflg3[2] = chkflg3[2].substr(0,5) + colorNo + chkflg3[2].substr(6); | |
//----------------------// | |
// スプレッド連携の処理 // | |
//----------------------// | |
userBox = $e_7('//*[@id="userBox4"]'); | |
// 有効/無効 | |
checkBox = $e_7('//*[@id="ckUnion"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
chkflg4 = '0' + chkflg4.substr(1); | |
userBox.disabled = true; | |
} | |
else{ | |
chkflg4 = '1' + chkflg4.substr(1); | |
userBox.disabled = false; | |
} | |
// ユーザー名を更新 | |
chkflg4 = chkflg4.substr(0,1) + userBox.snapshotItem(0).value; | |
//----------------------// | |
// 更新したフラグを保存 // | |
//----------------------// | |
execFlag = chkflg1 + DELIMIT1_7 + chkflg2; | |
saveExecFlag(location.hostname, "FLAG0", execFlag); | |
execFlag = chkflg3[0] + DELIMIT1_7 + chkflg3[1] + DELIMIT1_7 + chkflg3[2]; | |
saveExecFlag(location.hostname, "FLAG3", execFlag); | |
saveExecFlag(location.hostname, "FLAG4", chkflg4); | |
//----------// | |
// リロード // | |
//----------// | |
reloadNext(); | |
} | |
//------------------------------// | |
// ★のチェックを付ける押下処理 // | |
//------------------------------// | |
function checkButtonClicked() { | |
// チェックボックスのチェックを外す // | |
var checkBox1 = $e_7('//*[@id="ckLevel1"]'); | |
var checkBox2 = $e_7('//*[@id="ckLevel2"]'); | |
var checkBox3 = $e_7('//*[@id="ckLevel3"]'); | |
var checkBox4 = $e_7('//*[@id="ckLevel4"]'); | |
var checkBox5 = $e_7('//*[@id="ckLevel5"]'); | |
var checkBox6 = $e_7('//*[@id="ckLevel6"]'); | |
var checkBox7 = $e_7('//*[@id="ckLevel7"]'); | |
var checkBox8 = $e_7('//*[@id="ckLevel8"]'); | |
var checkBox9 = $e_7('//*[@id="ckLevel9"]'); | |
checkBox1.snapshotItem(0).checked = true; | |
checkBox2.snapshotItem(0).checked = true; | |
checkBox3.snapshotItem(0).checked = true; | |
checkBox4.snapshotItem(0).checked = true; | |
checkBox5.snapshotItem(0).checked = true; | |
checkBox6.snapshotItem(0).checked = true; | |
checkBox7.snapshotItem(0).checked = true; | |
checkBox8.snapshotItem(0).checked = true; | |
checkBox9.snapshotItem(0).checked = true; | |
} | |
//----------------------------// | |
// ★のチェックを外す押下処理 // | |
//----------------------------// | |
function uncheckButtonClicked() { | |
// チェックボックスのチェックを外す // | |
var checkBox1 = $e_7('//*[@id="ckLevel1"]'); | |
var checkBox2 = $e_7('//*[@id="ckLevel2"]'); | |
var checkBox3 = $e_7('//*[@id="ckLevel3"]'); | |
var checkBox4 = $e_7('//*[@id="ckLevel4"]'); | |
var checkBox5 = $e_7('//*[@id="ckLevel5"]'); | |
var checkBox6 = $e_7('//*[@id="ckLevel6"]'); | |
var checkBox7 = $e_7('//*[@id="ckLevel7"]'); | |
var checkBox8 = $e_7('//*[@id="ckLevel8"]'); | |
var checkBox9 = $e_7('//*[@id="ckLevel9"]'); | |
checkBox1.snapshotItem(0).checked = false; | |
checkBox2.snapshotItem(0).checked = false; | |
checkBox3.snapshotItem(0).checked = false; | |
checkBox4.snapshotItem(0).checked = false; | |
checkBox5.snapshotItem(0).checked = false; | |
checkBox6.snapshotItem(0).checked = false; | |
checkBox7.snapshotItem(0).checked = false; | |
checkBox8.snapshotItem(0).checked = false; | |
checkBox9.snapshotItem(0).checked = false; | |
} | |
//----------------------------------// | |
// 有効チェックボックスチェック処理 // | |
//----------------------------------// | |
function enable1Checked() { | |
var userBox = $e_7('//*[@id="userBox1"]'); | |
var checkBox = $e_7('//*[@id="ckEnable1"]'); | |
// ユーザー指定のフラグを反転 | |
if( checkBox.snapshotItem(0).checked == false ){ | |
userBox.snapshotItem(0).disabled = true; | |
} | |
else{ | |
userBox.snapshotItem(0).disabled = false; | |
} | |
} | |
function enable2Checked() { | |
var userBox = $e_7('//*[@id="userBox2"]'); | |
var checkBox = $e_7('//*[@id="ckEnable2"]'); | |
// ユーザー指定のフラグを反転 | |
if( checkBox.snapshotItem(0).checked == false ){ | |
userBox.snapshotItem(0).disabled = true; | |
} | |
else{ | |
userBox.snapshotItem(0).disabled = false; | |
} | |
} | |
function enable3Checked() { | |
var userBox = $e_7('//*[@id="userBox3"]'); | |
var checkBox = $e_7('//*[@id="ckEnable3"]'); | |
// ユーザー指定のフラグを反転 | |
if( checkBox.snapshotItem(0).checked == false ){ | |
userBox.snapshotItem(0).disabled = true; | |
} | |
else{ | |
userBox.snapshotItem(0).disabled = false; | |
} | |
} | |
//------------------// | |
// ルート構築モード // | |
//------------------// | |
function routeModeChecked() { | |
var checkBox = $e_7('//*[@id="ckRouteMode"]'); | |
var checkBox2 = $e_7('//*[@id="ckAutoRouteMode"]'); | |
var routeField = $e_7('//*[@id="routeField"]'); | |
var routeField2 = $e_7('//*[@id="routeField2"]'); | |
var routeField3 = $e_7('//*[@id="routeField3"]'); | |
var routeField5 = $e_7('//*[@id="routeField5"]'); | |
var baseField = $e_7('//*[@id="baseField"]'); | |
// ユーザー指定のフラグを反転 | |
if( checkBox.snapshotItem(0).checked == false ){ | |
if( baseField.snapshotLength > 0 ){ | |
baseField.snapshotItem(0).style.display = "inline"; | |
} | |
routeField.snapshotItem(0).style.display = "none"; | |
routeField2.snapshotItem(0).style.display = "none"; | |
routeField3.snapshotItem(0).style.display = "none"; | |
routeField5.snapshotItem(0).style.display = "none"; | |
// メニュー解除されたらクリアボタンクリックを実行 | |
routeClearButtonClicked() | |
} | |
else{ | |
if( baseField.snapshotLength > 0 ){ | |
baseField.snapshotItem(0).style.display = "none"; | |
} | |
routeField.snapshotItem(0).style.display = "inline"; | |
routeField2.snapshotItem(0).style.display = "inline"; | |
routeField3.snapshotItem(0).style.display = "inline"; | |
routeField5.snapshotItem(0).style.display = "inline"; | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
// 自動構築モードがすでにチェックされてたら警告処理 | |
autoRouteModeChecked(); | |
} | |
} | |
// インフォメーションの更新 | |
autoRouteInfo(); | |
} | |
//----------------------// | |
// 自動ルート構築モード // | |
//----------------------// | |
function autoRouteModeChecked() { | |
var checkBox = $e_7('//*[@id="ckRouteMode"]'); | |
var checkBox2 = $e_7('//*[@id="ckAutoRouteMode"]'); | |
// 自動構築のチェック | |
if( (checkBox.snapshotItem(0).checked == true) && (checkBox2.snapshotItem(0).checked == true) ){ | |
if( window.confirm("作成中のルートが破棄されますがよろしいですか?") ){ | |
routeClearButtonClicked(); | |
autoroute = AUTO_ROUTE_EDIT_FIRST; | |
} | |
else{ | |
// 解除時はルートをクリアする | |
checkBox2.snapshotItem(0).checked = false; | |
return; | |
} | |
} | |
else{ | |
autoroute = AUTO_ROUTE_NONE; | |
routeClearButtonClicked(); | |
} | |
// インフォメーションの更新 | |
autoRouteInfo(); | |
} | |
//------------------------------------------// | |
// 自動ルート構築モードの指示メッセージ表示 // | |
//------------------------------------------// | |
function autoRouteInfo(){ | |
var routeField = $e_7('//*[@id="route_info"]'); | |
var checkBox = $e_7('//*[@id="ckRouteMode"]'); | |
if( checkBox.snapshotItem(0).checked == false ){ | |
// ルート構築モードがオフのときはメッセージをださない | |
routeField.snapshotItem(0).innerHTML = ''; | |
return; | |
} | |
if( location.pathname != "/big_map.php" ){ | |
if( autoroute == AUTO_ROUTE_EDIT_FIRST ){ | |
routeField.snapshotItem(0).innerHTML = '<font color="red"><b>ルート起点を<br>右クリックして下さい</b></font>'; | |
} | |
else if( autoroute == AUTO_ROUTE_EDIT_LAST ){ | |
routeField.snapshotItem(0).innerHTML = '<font color="red"><b>ルート終点を<br>右クリックして下さい</b></font>'; | |
} | |
else if( autoroute == AUTO_ROUTE_EDIT_END ){ | |
routeField.snapshotItem(0).innerHTML = '<font color="red"><b>ルート終点を<br>右クリックで再試行できます</b></font>'; | |
} | |
else{ | |
routeField.snapshotItem(0).innerHTML = ''; | |
} | |
} | |
else{ | |
if( autoroute == AUTO_ROUTE_EDIT_FIRST ){ | |
routeField.snapshotItem(0).innerHTML = '<font color="red"><b>右クリックで起点設定</b></font>'; | |
} | |
else if( autoroute == AUTO_ROUTE_EDIT_LAST ){ | |
routeField.snapshotItem(0).innerHTML = '<font color="red"><b>右クリックで終点設定</b></font>'; | |
} | |
else if( autoroute == AUTO_ROUTE_EDIT_END ){ | |
routeField.snapshotItem(0).innerHTML = '<font color="red"><b>終点右クリックで終点解除</b></font>'; | |
} | |
else{ | |
routeField.snapshotItem(0).innerHTML = ''; | |
} | |
} | |
} | |
//--------------------// | |
// ルート全選択ボタン // | |
//--------------------// | |
function routeSelectButtonClicked() { | |
// 構築ルート情報の選択 | |
var routeText = $x_7('//*[@id="routeInfoText"]'); | |
var objs = routeText.firstChild; | |
var obje = routeText.lastChild; | |
var range = document.createRange(); | |
range.setStart(objs,0); | |
range.setEnd(obje,obje.textContent.length); | |
var sel = getSelection(); | |
sel.removeAllRanges(); | |
sel.addRange(range); | |
} | |
//--------------------// | |
// ルートクリアボタン // | |
//--------------------// | |
function routeClearButtonClicked() { | |
var routeText = $e_7('//*[@id="routeInfoText"]'); | |
var checkBox = $e_7('//*[@id="ckAutoRouteMode"]'); | |
if( location.pathname == "/big_map.php" ){ | |
// 51x51画面では対象座標再描画で対応 | |
autoroute = AUTO_ROUTE_NONE; | |
getNPCCastleInfo_51(1); | |
routeText.snapshotItem(0).innerHTML = ""; | |
// ルート自動構築中ならフラグを初期化 | |
if( checkBox.snapshotItem(0).checked == true ){ | |
autoroute = AUTO_ROUTE_EDIT_FIRST; | |
} | |
return; | |
} | |
// 構築ルート情報のクリア | |
routeText.snapshotItem(0).innerHTML = ""; | |
// マップに埋め込んだマーク画像を全部消す | |
var rollover = $d("rollover"); | |
// すでに画像が登録されてるか調べる | |
var en = $e_7('//*[@name="routeIcon"]'); | |
if( en.snapshotLength > 0 ){ | |
// 画像がいたら消す | |
for( var i = 0; i < en.snapshotLength; i++ ){ | |
var ex = $x_7('//*[@id="' + en.snapshotItem(i).id + '"]'); | |
var ex_p = ex.parentNode; | |
ex_p.removeChild(ex); | |
} | |
} | |
// ルート自動構築中ならフラグを初期化 | |
if( checkBox.snapshotItem(0).checked == true ){ | |
autoroute = AUTO_ROUTE_EDIT_FIRST; | |
} | |
} | |
//------------------// | |
// ルート検証ボタン // | |
//------------------// | |
function routeCheckButtonClicked(e){ | |
var rollover = $d("rollover"); | |
var checkBox = $e_7('//*[@id="ckRouteMode"]'); | |
var checkBox2 = $e_7('//*[@id="ckRouteMode2"]'); | |
// マップに埋め込んだマーク画像を拾う | |
var rollover = $d("rollover"); | |
// すでに画像が登録されてるか調べる | |
var cx = 0; | |
var cy = 0; | |
var errf = false; | |
var errx; | |
var erry; | |
var en = $e_7('//*[@name="routeIcon"]'); | |
if( en.snapshotLength > 0 ){ | |
// 画像がいたら消す | |
for( var i = en.snapshotLength -1; i >= 0; i-- ){ | |
var ex = $x_7('//*[@id="' + en.snapshotItem(i).id + '"]'); | |
var list = en.snapshotItem(i).id.match(/^([-]*\d+).([-]*\d+)/); | |
if( i != en.snapshotLength -1 ){ | |
var dx = Math.abs(cx - parseInt(list[1])); | |
var dy = Math.abs(cy - parseInt(list[2])); | |
if( (dx >= 2) || (dy >= 2) || (errf == true) ){ | |
if( errf == false ){ | |
errx = parseInt(list[1]); | |
erry = parseInt(list[2]); | |
} | |
ex.src = ricon_e; | |
errf = true; | |
} | |
else{ | |
ex.src = ricon; | |
} | |
} | |
cx = parseInt(list[1]); | |
cy = parseInt(list[2]); | |
} | |
if( errf == true ){ | |
var baseText = $e_7('//*[@id="routeInfoText"]'); | |
var text = baseText.snapshotItem(0).innerHTML; | |
var fp = text.indexOf('(' + errx + ',' + erry + ')'); | |
var xp = text.indexOf('×',fp); | |
var ep = text.indexOf("<",fp); | |
if( ep == -1 ){ | |
if( xp == -1 ){ | |
// マークがないばあいだけつける | |
text = text + '<b><font color="red">×</font></b>'; | |
} | |
} | |
else{ | |
if( xp == -1 ){ | |
// マークがないばあいだけつける | |
text = text.substr(0,ep) + '<b><font color="red">×</font></b>' + text.substr(ep); | |
} | |
} | |
baseText.snapshotItem(0).innerHTML = text; | |
} | |
} | |
} | |
//----------------------// | |
// 表示補助メニュー制御 // | |
//----------------------// | |
function menu2Clicked() { | |
var checkBox = $e_7('//*[@id="ckMenu2"]'); | |
var label; | |
var chkbox; | |
var listbox; | |
// コントロールの表示切り替え | |
if( checkBox.snapshotItem(0).checked == false ){ | |
for( var i = 1; i <= 9; i++ ){ | |
label = $e_7('//*[@id="Label2-' + i + '"]'); | |
label.snapshotItem(0).style.display = "none"; | |
} | |
checkbox = $e_7('//*[@id="ckAnalyze"]'); | |
checkbox.snapshotItem(0).style.display = "none"; | |
checkbox = $e_7('//*[@id="ckEmptyDraw"]'); | |
checkbox.snapshotItem(0).style.display = "none"; | |
checkbox = $e_7('//*[@id="ckRader"]'); | |
checkbox.snapshotItem(0).style.display = "none"; | |
checkbox = $e_7('//*[@id="ckOwnerList"]'); | |
checkbox.snapshotItem(0).style.display = "none"; | |
checkbox = $e_7('//*[@id="ckDirection"]'); | |
checkbox.snapshotItem(0).style.display = "none"; | |
checkbox = $e_7('//*[@id="ckNoExec51"]'); | |
checkbox.snapshotItem(0).style.display = "none"; | |
listbox = $e_7('//*[@id="lsArea"]'); | |
listbox.snapshotItem(0).style.display = "none"; | |
listbox = $e_7('//*[@id="lsArea2"]'); | |
listbox.snapshotItem(0).style.display = "none"; | |
listbox = $e_7('//*[@id="lsArea3"]'); | |
listbox.snapshotItem(0).style.display = "none"; | |
listbox = $e_7('//*[@id="lsEmptyColor"]'); | |
listbox.snapshotItem(0).style.display = "none"; | |
} | |
else{ | |
for( var i = 1; i <= 9; i++ ){ | |
label = $e_7('//*[@id="Label2-' + i + '"]'); | |
label.snapshotItem(0).style.display = "inline"; | |
} | |
checkbox = $e_7('//*[@id="ckAnalyze"]'); | |
checkbox.snapshotItem(0).style.display = "inline"; | |
checkbox = $e_7('//*[@id="ckEmptyDraw"]'); | |
checkbox.snapshotItem(0).style.display = "inline"; | |
checkbox = $e_7('//*[@id="ckRader"]'); | |
checkbox.snapshotItem(0).style.display = "inline"; | |
checkbox = $e_7('//*[@id="ckOwnerList"]'); | |
checkbox.snapshotItem(0).style.display = "inline"; | |
checkbox = $e_7('//*[@id="ckDirection"]'); | |
checkbox.snapshotItem(0).style.display = "inline"; | |
checkbox = $e_7('//*[@id="ckNoExec51"]'); | |
checkbox.snapshotItem(0).style.display = "inline"; | |
listbox = $e_7('//*[@id="lsArea"]'); | |
listbox.snapshotItem(0).style.display = "inline"; | |
listbox = $e_7('//*[@id="lsArea2"]'); | |
listbox.snapshotItem(0).style.display = "inline"; | |
listbox = $e_7('//*[@id="lsArea3"]'); | |
listbox.snapshotItem(0).style.display = "inline"; | |
listbox = $e_7('//*[@id="lsEmptyColor"]'); | |
listbox.snapshotItem(0).style.display = "inline"; | |
} | |
} | |
//----------------------// | |
// 同盟検索メニュー制御 // | |
//----------------------// | |
function menu4Clicked() { | |
var checkBox = $e_7('//*[@id="ckMenu4"]'); | |
var label; | |
var chkbox; | |
var listbox; | |
var userbox; | |
// コントロールの表示切り替え | |
if( checkBox.snapshotItem(0).checked == false ){ | |
for( var i = 1; i <= 24; i++ ){ | |
label = $e_7('//*[@id="Label4-' + i + '"]'); | |
label.snapshotItem(0).style.display = "none"; | |
} | |
for( var i = 1; i <= 3; i++ ){ | |
label = $e_7('//*[@id="Label4-2-' + i + '"]'); | |
label.snapshotItem(0).style.display = "none"; | |
} | |
for( var i = 1; i <=3; i++ ){ | |
checkbox = $e_7('//*[@id="ckEnable' + i + '"]'); | |
checkbox.snapshotItem(0).style.display = "none"; | |
checkbox = $e_7('//*[@id="ckType' + i + '"]'); | |
checkbox.snapshotItem(0).style.display = "none"; | |
checkbox.snapshotItem(1).style.display = "none"; | |
checkbox = $e_7('//*[@id="ckFullMatch' + i + '"]'); | |
checkbox.snapshotItem(0).style.display = "none"; | |
checkbox = $e_7('//*[@id="ckLevelSearch' + i + '"]'); | |
checkbox.snapshotItem(0).style.display = "none"; | |
userbox = $e_7('//*[@id="userBox' + i + '"]'); | |
userbox.snapshotItem(0).style.display = "none"; | |
listbox = $e_7('//*[@id="lsColor' + i + '"]'); | |
listbox.snapshotItem(0).style.display = "none"; | |
} | |
} | |
else{ | |
for( var i = 1; i <= 24; i++ ){ | |
label = $e_7('//*[@id="Label4-' + i + '"]'); | |
label.snapshotItem(0).style.display = "inline"; | |
} | |
for( var i = 1; i <= 3; i++ ){ | |
label = $e_7('//*[@id="Label4-2-' + i + '"]'); | |
label.snapshotItem(0).style.display = "inline"; | |
} | |
for( var i = 1; i <=3; i++ ){ | |
checkbox = $e_7('//*[@id="ckEnable' + i + '"]'); | |
checkbox.snapshotItem(0).style.display = "inline"; | |
checkbox = $e_7('//*[@id="ckType' + i + '"]'); | |
checkbox.snapshotItem(0).style.display = "inline"; | |
checkbox.snapshotItem(1).style.display = "inline"; | |
checkbox = $e_7('//*[@id="ckFullMatch' + i + '"]'); | |
checkbox.snapshotItem(0).style.display = "inline"; | |
checkbox = $e_7('//*[@id="ckLevelSearch' + i + '"]'); | |
checkbox.snapshotItem(0).style.display = "inline"; | |
userbox = $e_7('//*[@id="userBox' + i + '"]'); | |
userbox.snapshotItem(0).style.display = "inline"; | |
listbox = $e_7('//*[@id="lsColor' + i + '"]'); | |
listbox.snapshotItem(0).style.display = "inline"; | |
} | |
} | |
} | |
//----------// | |
// 空白除去 // | |
//----------// | |
function trim_7(str) | |
{ | |
if (str == undefined) return ""; | |
return str.replace(/^[ \t\r\n]+|[ \t\r\n]+$/g, ""); | |
} | |
//------------------// | |
// 画面サイズの取得 // | |
//------------------// | |
function getViewSize() | |
{ | |
var viewSize; | |
if( $x_7("//div[@id=\"changemapscale\"]/ul/li[@class=\"sort15 now\"]") ){ | |
viewSize = 15; // 15x15 | |
} | |
else if( $x_7("//div[@id=\"changemapscale\"]/ul/li[@class=\"sort20 now\"]") ){ | |
viewSize = 20; // 20x20 | |
} | |
else if( $x_7("//div[@id=\"change-map-scale\"]/ul/li[@class=\"sort15 now\"]") ){ | |
viewSize = 15; // 15x15 本鯖の仕様変更対応 | |
} | |
else if( $x_7("//div[@id=\"change-map-scale\"]/ul/li[@class=\"sort21 now\"]") ){ | |
viewSize = 21; // 21x21 本鯖の仕様変更対応 | |
} | |
else if( $x_7("//div[@id=\"change-map-scale\"]/ul/li[@class=\"sort51 now\"]") ){ | |
viewSize = 51; // 51x51 本鯖の仕様変更対応 | |
} | |
else{ | |
viewSize = 11; // 11x11 | |
} | |
return viewSize; | |
} | |
//----------------// | |
// 自動ルート構築 // | |
//----------------// | |
function makeAutoRoute(checkmode) | |
{ | |
//------// | |
// 定数 // | |
//------// | |
var MAP_NONE = -1; // 未処理 | |
var MAP_NPC = -2; // NPC砦 | |
var MAP_WALL = -3; // 壁 | |
var MAP_START = 0; // 起点 | |
var MAP_END = -999; // 目的地 | |
//------------------// | |
// 画面サイズの取得 // | |
//------------------// | |
var viewSize; | |
viewSize = getViewSize(); | |
//--------------------------// | |
// 同盟検索オプションの取得 // | |
//--------------------------// | |
var checkBox1; | |
var userName = new Array(); | |
var userText; | |
var fullmatch = new Array(); | |
var target = new Array(); | |
for( var i = 0; i < 3; i++ ){ | |
fullmatch[i] = 0; | |
target[i] = 0; | |
} | |
// 個人・同盟検索1 | |
checkBox1 = $e_7('//*[@id="ckEnable1"]'); | |
if( checkBox1.snapshotItem(0).checked == true ){ | |
// 個人・同盟の別 | |
checkBox2 = $e_7('//*[@id="ckType1"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
target[0] = 1; | |
} | |
else{ | |
target[0] = 2; | |
} | |
// 完全一致 | |
checkBox2 = $e_7('//*[@id="ckFullMatch1"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
fullmatch[0] = 1; | |
} | |
else{ | |
fullmatch[0] = 0; | |
} | |
userBox = $e_7('//*[@id="userBox1"]'); | |
userText = userBox.snapshotItem(0).value; | |
userName[0] = new Array(); | |
userName[0] = userText.split(OWNER_SPLITKEY); | |
} | |
else{ | |
userName[0] = ""; | |
} | |
// 個人・同盟検索2 | |
checkBox1 = $e_7('//*[@id="ckEnable2"]'); | |
if( checkBox1.snapshotItem(0).checked == true ){ | |
// 個人・同盟の別 | |
checkBox2 = $e_7('//*[@id="ckType2"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
target[1] = 1; | |
} | |
else{ | |
target[1] = 2; | |
} | |
// 完全一致 | |
checkBox2 = $e_7('//*[@id="ckFullMatch2"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
fullmatch[1] = 1; | |
} | |
else{ | |
fullmatch[1] = 0; | |
} | |
userBox = $e_7('//*[@id="userBox2"]'); | |
userText = userBox.snapshotItem(0).value; | |
userName[1] = new Array(); | |
userName[1] = userText.split(OWNER_SPLITKEY); | |
} | |
else{ | |
userName[1] = ""; | |
} | |
// 個人・同盟検索3 | |
checkBox1 = $e_7('//*[@id="ckEnable3"]'); | |
if( checkBox1.snapshotItem(0).checked == true ){ | |
// 個人・同盟の別 | |
checkBox2 = $e_7('//*[@id="ckType3"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
target[2] = 1; | |
} | |
else{ | |
target[2] = 2; | |
} | |
// 完全一致 | |
checkBox2 = $e_7('//*[@id="ckFullMatch3"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
fullmatch[2] = 1; | |
} | |
else{ | |
fullmatch[2] = 0; | |
} | |
userBox = $e_7('//*[@id="userBox3"]'); | |
userText = userBox.snapshotItem(0).value; | |
userName[2] = new Array(); | |
userName[2] = userText.split(OWNER_SPLITKEY); | |
} | |
else{ | |
userName[2] = ""; | |
} | |
//--------------------------------------------// | |
// 全体表示画面から、画面中央座標を手に入れる // | |
//--------------------------------------------// | |
var codx = $e_7('//div[@id="datas"]/input[@id=\"x\"]'); | |
var cody = $e_7('//div[@id="datas"]/input[@id=\"y\"]'); | |
var bx = codx.snapshotItem(0).value; | |
var by = cody.snapshotItem(0).value; | |
// 左上座標を求める | |
if( viewSize == 11 ){ | |
bx = parseInt(bx) - 5; | |
by = parseInt(by) + 5; | |
} | |
else if( viewSize == 15 ){ | |
bx = parseInt(bx) - 7; | |
by = parseInt(by) + 7; | |
} | |
else{ | |
bx = parseInt(bx) - 10; | |
by = parseInt(by) + 10; | |
} | |
// 始点、終点座標を求める | |
var sx = Math.abs(parseInt(autoroute_f[0]) - parseInt(bx)); | |
var sy = Math.abs(parseInt(autoroute_f[1]) - parseInt(by)); | |
var ex = Math.abs(parseInt(autoroute_l[0]) - parseInt(bx)); | |
var ey = Math.abs(parseInt(autoroute_l[1]) - parseInt(by)); | |
//------------------// | |
// 探査レベルの取得 // | |
//------------------// | |
var listBox = $e_7('//*[@id="lsRouteLevel"]'); | |
var listBox2 = $e_7('//*[@id="lsSkipRes"]'); | |
var listBox3 = $e_7('//*[@id="lsSkipGroup"]'); | |
var limit = listBox.snapshotItem(0).selectedIndex + 1; | |
var skipres = listBox2.snapshotItem(0).selectedIndex; | |
var skipgrp = listBox3.snapshotItem(0).selectedIndex; | |
//------------------------------// | |
// マップデータをマトリックス化 // | |
//------------------------------// | |
// マップの作成 | |
var mapdata = new Array(); | |
var resdata = new Array(); | |
for(var i = 0; i < 21; i++ ){ | |
mapdata[i] = new Array(); | |
resdata[i] = new Array(); | |
} | |
for(var i = 0; i < 21; i++ ){ | |
for(var j = 0; j < 21; j++ ){ | |
if( (i >= viewSize) || (j >= viewSize) ){ | |
mapdata[i][j] = MAP_WALL; // 画面外は壁扱い | |
} | |
else{ | |
mapdata[i][j] = MAP_NONE; // 未処理エリア | |
} | |
} | |
} | |
//----------------// | |
// 領土情報の取得 // | |
//----------------// | |
var areas = $e_7('//*[@id="mapOverlayMap"]//area/@onmouseover'); | |
//--------------------------------// | |
// 領土の情報をマトリックスに反映 // | |
//--------------------------------// | |
var ckUser = $e_7('//*[@id="ckRouteUser"]'); | |
for (var i = 0; i < areas.snapshotLength; i++) { | |
var rowText = areas.snapshotItem(i).textContent; | |
rowText = rowText.replace(/^.*rewrite\(/, ""); | |
rowText = rowText.replace(/\); .*$/, ""); | |
var bkText = rowText; | |
rowText = rowText.replace(/\//g,"==uZer=="); | |
rowText = rowText.replace(/', '/g,"'/'"); | |
rowText = rowText.replace(/'/g,""); | |
var valueA = new Array(); | |
valueA = rowText.split('/'); | |
valueA[1] = valueA[1].replace(/==uZer==/,"/"); | |
// マップ座標の取得 | |
var rowText3 = valueA[3]; | |
rowText3 = rowText3.replace(/\(/,""); | |
rowText3 = rowText3.replace(/\)/,""); | |
var valueB = new Array(); | |
valueB = rowText3.split(','); | |
var x = parseInt(valueB[0]); | |
var y = parseInt(valueB[1]); | |
// 資源レベル | |
var landLevel = valueA[5].length; | |
if( valueA[5].substr(0,4) == '<img' ){ | |
// FaceBook Lands of Legends! 対応 | |
var stars = valueA[5].match(/<img/g); | |
landLevel = stars.length; | |
} | |
//--------------------------------// | |
// マトリックス上のオフセット計算 // | |
//--------------------------------// | |
var px = Math.abs(parseInt(x) - parseInt(bx)); | |
var py = Math.abs(parseInt(y) - parseInt(by)); | |
//--------------------// | |
// 各種情報の埋め込み // | |
//--------------------// | |
if( valueA[11] == '1' ){ | |
// NPC砦 | |
mapdata[px][py] = MAP_NPC; | |
// リソース情報 | |
resdata[px][py] = "★" + landLevel + " (" + valueA[0] + ")"; | |
} | |
else if( valueA[1] != '' ){ | |
// 個人領土 | |
if( (ckUser.snapshotItem(0).checked == false) || ((ckUser.snapshotItem(0).checked == true) && (landLevel == 0)) ){ | |
mapdata[px][py] = MAP_WALL; // 個人領土を対象外、あるいは対象かつ拠点の場合、壁とみなす | |
} | |
// 同盟指定 | |
if( (ckUser.snapshotItem(0).checked == true) && (skipgrp > 0) ){ | |
// 同盟指定ありの場合、指定条件にマッチしない領土は壁とみなす | |
var matchcase = false; // マッチしたパターン | |
var groupNo = skipgrp - 1; | |
// 個人・同盟マッチチェック | |
for( var k = 0; k < userName[groupNo].length; k++ ){ | |
// 検索有効時 username に値が入る | |
if( userName[groupNo][k] != "" ){ | |
// ターゲットが個人 | |
if( target[groupNo] == 1 ){ | |
// 完全一致かつ、ユーザー名が一致 | |
if( (fullmatch[groupNo] == 1) && (valueA[1] == userName[groupNo][k]) ){ | |
matchcase = true; | |
break; | |
} | |
// 部分一致かつ、ユーザー名が一致 | |
if( (fullmatch[groupNo] == 0) && (valueA[1].indexOf(userName[groupNo][k]) != -1) ){ | |
matchcase = true; | |
break; | |
} | |
} | |
// ターゲットが同盟 | |
else{ | |
// 完全一致かつ、ユーザー名が一致 | |
if( (fullmatch[groupNo] == 1) && (valueA[4] == userName[groupNo][k]) ){ | |
matchcase = true; | |
break; | |
} | |
// 部分一致かつ、ユーザー名が一致 | |
if( (fullmatch[groupNo] == 0) && (valueA[4].indexOf(userName[groupNo][k]) != -1) ){ | |
matchcase = true; | |
break; | |
} | |
} | |
} | |
} | |
if( matchcase == false ){ | |
// マッチしない場合は壁扱い | |
mapdata[px][py] = MAP_WALL; | |
} | |
} | |
// リソース情報 | |
if( landLevel != 0 ){ | |
resdata[px][py] = '★' + landLevel + ' (' + valueA[7] + ',' + valueA[8] + ',' + valueA[9] + ',' + valueA[10] + ')'; | |
} | |
else{ | |
resdata[px][py] = '個人本拠地/拠点'; | |
} | |
} | |
else{ | |
// リソース情報 | |
resdata[px][py] = '★' + landLevel + ' (' + valueA[7] + ',' + valueA[8] + ',' + valueA[9] + ',' + valueA[10] + ')'; | |
} | |
//----------------// | |
// ルート特殊処理 // | |
//----------------// | |
// 土地レベルでの判定 | |
if( (landLevel > limit) || (mapdata[px][py] == MAP_NPC) ){ | |
// レベル超過の土地とNPC砦は壁扱いとする | |
mapdata[px][py] = MAP_WALL; // 壁扱い | |
} | |
// 資源回避での判定 | |
if( (season1[cchkres[skipres]][1] == valueA[7]) | |
&& (season1[cchkres[skipres]][2] == valueA[8]) | |
&& (season1[cchkres[skipres]][3] == valueA[9]) | |
&& (season1[cchkres[skipres]][4] == valueA[10]) ){ | |
// 回避条件に一致する資源は壁扱いとする | |
mapdata[px][py] = MAP_WALL; // 壁扱い | |
} | |
// 始点、終点特例 | |
if( ((px == sx) && (py == sy)) || ((px == ex) && (py == ey)) ){ | |
mapdata[px][py] = MAP_NONE; // 始点と目的地はルートに加える | |
} | |
} | |
//--------------------// | |
// 始点情報の埋め込み // | |
//--------------------// | |
mapdata[sx][sy] = MAP_START; | |
// 探索情報設定 | |
var posdata = new Array(); | |
var maxpos = 0; | |
posdata[0] = parseInt(sy) * 21 + parseInt(sx); | |
for( var i = 0; i <= maxpos; i++ ){ | |
var cx = parseInt(posdata[i]) % 21; | |
var cy = Math.floor(parseInt(posdata[i]) / 21); | |
for( var j = 0; j < chkptn.length; j++ ){ | |
var lx = parseInt(cx) + parseInt(chkptn[j][0]); | |
if( (parseInt(lx) < 0) || (parseInt(lx) >= viewSize) ){ | |
continue; | |
} | |
var ly = parseInt(cy) + parseInt(chkptn[j][1]); | |
if( (parseInt(ly) < 0) || (parseInt(ly) >= viewSize) ){ | |
continue; | |
} | |
// 現座標からの移動距離+1を求める | |
var dist = parseInt(mapdata[cx][cy]) + 1; | |
// 編集可能? | |
if( (mapdata[lx][ly] == MAP_NONE) || (mapdata[lx][ly] == MAP_NPC) ){ | |
// 距離更新 | |
mapdata[lx][ly] = dist; | |
// 座標登録 | |
maxpos = maxpos + 1; | |
posdata[maxpos] = parseInt(ly) * 21 + parseInt(lx); | |
} | |
else if( (mapdata[lx][ly] > 0) && (parseInt(mapdata[lx][ly])) > dist ){ | |
// 距離更新 | |
mapdata[lx][ly] = dist; | |
// 座標登録 | |
maxpos = maxpos + 1; | |
posdata[maxpos] = parseInt(ly) * 21 + parseInt(lx); | |
} | |
} | |
} | |
// 事前チェックオンのとき、結果だけ返す | |
if( checkmode == "1" ){ | |
if( mapdata[ex][ey] < 0 ){ | |
return false; | |
} | |
else{ | |
return true; | |
} | |
} | |
// 終点にたどりつけたか? | |
if( mapdata[ex][ey] < 0 ){ | |
alert("目的地に到達するルートを構築できませんでした。構築条件を見直してください。"); | |
return false; | |
} | |
//--------------------// | |
// サーチルート逆探査 // | |
//--------------------// | |
posdata[0] = parseInt(ey) * 21 + parseInt(ex); | |
maxpos = 0; | |
for( var i = 0; i <= maxpos; i++ ){ | |
var cx = parseInt(posdata[i]) % 21; | |
var cy = Math.floor(parseInt(posdata[i]) / 21); | |
if( (cx == sx) && (cy == sy) ){ | |
break; | |
} | |
// コースとして通過可能な最小資源の土地を調べる | |
var lowLevel = 9; | |
for( var j = 0; j < chkptn.length; j++ ){ | |
var lx = parseInt(cx) + parseInt(chkptn[j][0]); | |
if( (parseInt(lx) < 0) || (parseInt(lx) >= viewSize) ){ | |
continue; | |
} | |
var ly = parseInt(cy) + parseInt(chkptn[j][1]); | |
if( (parseInt(ly) < 0) || (parseInt(ly) >= viewSize) ){ | |
continue; | |
} | |
// 現座標からの移動距離-1を求める | |
var dist = parseInt(mapdata[cx][cy]) - 1; | |
// 該当する座標? | |
if( (mapdata[lx][ly] >= 0) && (parseInt(mapdata[lx][ly])) == dist ){ | |
var level = resdata[lx][ly].substr(resdata[lx][ly].indexOf("★")+1,1); | |
if( resdata[lx][ly].indexOf("個人本拠地/拠点") >= 0 ){ | |
level = 0; | |
} | |
if( lowLevel > level ){ | |
lowLevel = level; | |
} | |
} | |
} | |
//--------------------------// | |
// 固定・ランダム構築の分岐 // | |
//--------------------------// | |
checkBox1 = $e_7('//*[@id="ckRouteRandom"]'); | |
if( checkBox1.snapshotItem(0).checked == true ){ | |
//--------------------// | |
// ランダムルート構築 // | |
//--------------------// | |
// パターン乱数の算出 | |
var pattern; | |
var rptn = new Array(2); | |
pattern = Math.floor(Math.random() * 30); | |
if( pattern < 24 ){ | |
// 十字優先のパターン(80%の確率でこちら) | |
rptn[0] = pattern; | |
// 後半4パターンの決定 | |
pattern = Math.floor(Math.random() * 24); | |
rptn[1] = pattern + 24; | |
} | |
else{ | |
// ×字優先のパターン(20%の確率でこちら) | |
pattern = Math.floor(Math.random() * 24); | |
rptn[1] = pattern; | |
// 前半4パターンの決定 | |
pattern = Math.floor(Math.random() * 24); | |
rptn[0] = pattern + 24; | |
} | |
// ルート探索 | |
for( var j = 0; j < 8; j++ ){ | |
var rno; | |
var offset; | |
if( j < 4 ){ | |
rno = rptn[0]; | |
offset = j; | |
} | |
else{ | |
rno = rptn[1]; | |
offset = j - 4; | |
} | |
var lx = parseInt(cx) + parseInt(chkptn_r[rno*4 + offset][0]); | |
if( (parseInt(lx) < 0) || (parseInt(lx) >= viewSize) ){ | |
continue; | |
} | |
var ly = parseInt(cy) + parseInt(chkptn_r[rno*4 + offset][1]); | |
if( (parseInt(ly) < 0) || (parseInt(ly) >= viewSize) ){ | |
continue; | |
} | |
// 現座標からの移動距離-1を求める | |
var dist = parseInt(mapdata[cx][cy]) - 1; | |
var level = resdata[lx][ly].substr(resdata[lx][ly].indexOf("★")+1,1); | |
if( resdata[lx][ly].indexOf("個人本拠地/拠点") >= 0 ){ | |
level = 0; | |
} | |
// 該当する座標? | |
if( (mapdata[lx][ly] >= 0) && (parseInt(mapdata[lx][ly]) == dist) && (level == lowLevel) ){ | |
// 座標登録 | |
maxpos = maxpos + 1; | |
posdata[maxpos] = parseInt(ly) * 21 + parseInt(lx); | |
break; | |
} | |
} | |
} | |
else{ | |
//----------------// | |
// 固定ルート構築 // | |
//----------------// | |
// ルート探索 | |
for( var j = 0; j < chkptn.length; j++ ){ | |
var lx = parseInt(cx) + parseInt(chkptn[j][0]); | |
if( (parseInt(lx) < 0) || (parseInt(lx) >= viewSize) ){ | |
continue; | |
} | |
var ly = parseInt(cy) + parseInt(chkptn[j][1]); | |
if( (parseInt(ly) < 0) || (parseInt(ly) >= viewSize) ){ | |
continue; | |
} | |
// 現座標からの移動距離-1を求める | |
var dist = parseInt(mapdata[cx][cy]) - 1; | |
var level = resdata[lx][ly].substr(resdata[lx][ly].indexOf("★")+1,1); | |
if( resdata[lx][ly].indexOf("個人本拠地/拠点") >= 0 ){ | |
level = 0; | |
} | |
// 該当する座標? | |
if( (mapdata[lx][ly] >= 0) && (parseInt(mapdata[lx][ly]) == dist) && (level == lowLevel) ){ | |
// 座標登録 | |
maxpos = maxpos + 1; | |
posdata[maxpos] = parseInt(ly) * 21 + parseInt(lx); | |
break; | |
} | |
} | |
} | |
} | |
//----------------// | |
// ルート情報表示 // | |
//----------------// | |
var baseText = $e_7('//*[@id="routeInfoText"]'); | |
checkBox1 = $e_7('//*[@id="ckRouteMode2"]'); | |
var rollover = $d("rollover"); | |
var text = ''; | |
for( var i = maxpos; i >= 0; i-- ){ | |
var cx = parseInt(posdata[i]) % 21; | |
var cy = Math.floor(parseInt(posdata[i]) / 21); | |
// areaデータを取ってみる | |
var area_pos = $x_7("//map[@id=\"mapOverlayMap\"]//area[@href=\"land.php?x=" + (parseInt(bx) + cx) + "&y=" + (parseInt(by) - cy) + "#ptop\"]"); | |
if( area_pos == null ){ | |
area_pos = $x_7("//map[@id=\"mapOverlayMap\"]//area[@href=\"land.php?x=" + (parseInt(bx) + cx) + "&y=" + (parseInt(by) - cy) + "\"]"); | |
} | |
var list3 = area_pos.getAttribute("onmouseover").match(/'(\d+)px', '(\d+)px/); | |
// クリックしたポイントに画像を埋め込む | |
var img = d_7.createElement("img"); | |
img.style.position = "absolute"; | |
img.style.left = list3[1] + "px"; | |
img.style.top = list3[2] + "px"; | |
// アイコンの決定 | |
if( (i != 0) && (i != maxpos) ){ | |
img.src = ricon; | |
if( viewSize == 15 ){ | |
img.style.width = "44px"; | |
img.style.height = "44px"; | |
img.style.zIndex = 227; | |
} else if( viewSize == 21 ){ | |
img.style.width = "33px"; | |
img.style.height = "33px"; | |
img.style.zIndex = 444; | |
} else { | |
img.style.width = "60px"; | |
img.style.height = "60px"; | |
img.style.zIndex = 123; | |
} | |
img.name = "routeIcon"; | |
img.id = (parseInt(bx) + cx) + "_" + (parseInt(by) - cy); // 座標をイメージのIDにする | |
rollover.parentNode.insertBefore(img, rollover.nextSibling); | |
} | |
if( text != '' ){ | |
text = text + '<br>'; | |
} | |
// 資源表示での出力切り替え | |
if( checkBox1.snapshotItem(0).checked == false ){ | |
// 資源出力あり | |
text = text + '(' + (parseInt(bx) + cx) + ',' + (parseInt(by) - cy) + ') ' + resdata[cx][cy]; | |
} | |
else{ | |
// 資源出力なし | |
if( resdata[cx][cy].indexOf("★") >= 0 ){ | |
text = text + '(' + (parseInt(bx) + cx) + ',' + (parseInt(by) - cy) + ') ' | |
+ resdata[cx][cy].substr(0,2); | |
} | |
else{ | |
text = text + '(' + (parseInt(bx) + cx) + ',' + (parseInt(by) - cy) + ') ' + resdata[cx][cy]; | |
} | |
} | |
} | |
// ルート表の表示 | |
baseText.snapshotItem(0).innerHTML = text; | |
// ルートを記憶 | |
autoroute_path[autoroute_maxpaths] = text; | |
autoroute_maxpaths = autoroute_maxpaths + 1; | |
return true; | |
} | |
//-----------------------// | |
// 自動ルート構築(51x51) // | |
//-----------------------// | |
function makeAutoRoute_51(checkmode) | |
{ | |
//------// | |
// 定数 // | |
//------// | |
var MAP_NONE = -1; // 未処理 | |
var MAP_NPC = -2; // NPC砦 | |
var MAP_WALL = -3; // 壁 | |
var MAP_START = 0; // 起点 | |
var MAP_END = -999; // 目的地 | |
//------------------// | |
// 画面サイズの取得 // | |
//------------------// | |
var viewSize; | |
viewSize = getViewSize(); | |
if( viewSize != 51 ){ | |
return false; | |
} | |
//--------------------------// | |
// 同盟検索オプションの取得 // | |
//--------------------------// | |
var checkBox1; | |
var userName = new Array(); | |
var userText; | |
var fullmatch = new Array(); | |
var target = new Array(); | |
for( var i = 0; i < 3; i++ ){ | |
fullmatch[i] = 0; | |
target[i] = 0; | |
} | |
// 個人・同盟検索1 | |
checkBox1 = $e_7('//*[@id="ckEnable1"]'); | |
if( checkBox1.snapshotItem(0).checked == true ){ | |
// 個人・同盟の別 | |
checkBox2 = $e_7('//*[@id="ckType1"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
target[0] = 1; | |
} | |
else{ | |
target[0] = 2; | |
} | |
// 完全一致 | |
checkBox2 = $e_7('//*[@id="ckFullMatch1"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
fullmatch[0] = 1; | |
} | |
else{ | |
fullmatch[0] = 0; | |
} | |
userBox = $e_7('//*[@id="userBox1"]'); | |
userText = userBox.snapshotItem(0).value; | |
userName[0] = new Array(); | |
userName[0] = userText.split(OWNER_SPLITKEY); | |
} | |
else{ | |
userName[0] = ""; | |
} | |
// 個人・同盟検索2 | |
checkBox1 = $e_7('//*[@id="ckEnable2"]'); | |
if( checkBox1.snapshotItem(0).checked == true ){ | |
// 個人・同盟の別 | |
checkBox2 = $e_7('//*[@id="ckType2"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
target[1] = 1; | |
} | |
else{ | |
target[1] = 2; | |
} | |
// 完全一致 | |
checkBox2 = $e_7('//*[@id="ckFullMatch2"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
fullmatch[1] = 1; | |
} | |
else{ | |
fullmatch[1] = 0; | |
} | |
userBox = $e_7('//*[@id="userBox2"]'); | |
userText = userBox.snapshotItem(0).value; | |
userName[1] = new Array(); | |
userName[1] = userText.split(OWNER_SPLITKEY); | |
} | |
else{ | |
userName[1] = ""; | |
} | |
// 個人・同盟検索3 | |
checkBox1 = $e_7('//*[@id="ckEnable3"]'); | |
if( checkBox1.snapshotItem(0).checked == true ){ | |
// 個人・同盟の別 | |
checkBox2 = $e_7('//*[@id="ckType3"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
target[2] = 1; | |
} | |
else{ | |
target[2] = 2; | |
} | |
// 完全一致 | |
checkBox2 = $e_7('//*[@id="ckFullMatch3"]'); | |
if( checkBox2.snapshotItem(0).checked == true ){ | |
fullmatch[2] = 1; | |
} | |
else{ | |
fullmatch[2] = 0; | |
} | |
userBox = $e_7('//*[@id="userBox3"]'); | |
userText = userBox.snapshotItem(0).value; | |
userName[2] = new Array(); | |
userName[2] = userText.split(OWNER_SPLITKEY); | |
} | |
else{ | |
userName[2] = ""; | |
} | |
//--------------------------------------------// | |
// 全体表示画面から、画面中央座標を手に入れる // | |
//--------------------------------------------// | |
var ckUser = $e_7('//*[@id="ckRouteUser"]'); | |
// 処理データの取得 | |
var href = $e_7('//*[@id="map51-content"]//li'); | |
var list2 = href.snapshotItem(1300).innerHTML.match(/x=([-]*\d+)&y=([-]*\d+)#/); | |
// 左上座標を求める | |
var bx = parseInt(list2[1]) - 25; | |
var by = parseInt(list2[2]) + 25; | |
// 始点、終点座標を求める | |
var sx = Math.abs(parseInt(autoroute_f[0]) - parseInt(bx)); | |
var sy = Math.abs(parseInt(autoroute_f[1]) - parseInt(by)); | |
var ex = Math.abs(parseInt(autoroute_l[0]) - parseInt(bx)); | |
var ey = Math.abs(parseInt(autoroute_l[1]) - parseInt(by)); | |
//------------------// | |
// 探査レベルの取得 // | |
//------------------// | |
var listBox = $e_7('//*[@id="lsRouteLevel"]'); | |
var listBox2 = $e_7('//*[@id="lsSkipRes"]'); | |
var listBox3 = $e_7('//*[@id="lsSkipGroup"]'); | |
var limit = listBox.snapshotItem(0).selectedIndex + 1; | |
var skipres = listBox2.snapshotItem(0).selectedIndex; | |
var skipgrp = listBox3.snapshotItem(0).selectedIndex; | |
//------------------------------// | |
// マップデータをマトリックス化 // | |
//------------------------------// | |
// マップの作成 | |
var mapdata = new Array(); | |
var resdata = new Array(); | |
for(var i = 0; i < 51; i++ ){ | |
mapdata[i] = new Array(); | |
resdata[i] = new Array(); | |
} | |
for(var i = 0; i < 51; i++ ){ | |
for(var j = 0; j < 51; j++ ){ | |
if( (i >= viewSize) || (j >= viewSize) ){ | |
mapdata[i][j] = MAP_WALL; // 画面外は壁扱い | |
} | |
else{ | |
mapdata[i][j] = MAP_NONE; // 未処理エリア | |
} | |
} | |
} | |
//--------------------------------// | |
// 領土の情報をマトリックスに反映 // | |
//--------------------------------// | |
for (var i = 0; i < href.snapshotLength; i++) { | |
var elem = href.snapshotItem(i); | |
list2 = elem.innerHTML.match(/x=([-]*\d+)&y=([-]*\d+)#/); | |
if( (list2 == null) || (list2 == undefined) ){ | |
continue; | |
} | |
// マトリックス上のオフセット計算 | |
var px = Math.abs(parseInt(list2[1]) - parseInt(bx)); | |
var py = Math.abs(parseInt(list2[2]) - parseInt(by)); | |
// 座標の取得 | |
var list = elem.innerHTML.match(/x=([-]*\d+)&y=([-]*\d+)#/); | |
if( (list == null) || (list == undefined) ){ | |
continue; | |
} | |
// 土地レベルの取得 | |
var p = elem.innerHTML.match(/戦力<\/dt><dd>(.*)<\/dd><dt class=/); | |
if( p != undefined ){ | |
land = p[1]; | |
landLevel = land.length; | |
} | |
else{ | |
p = elem.innerHTML.match(/戦力<\/dt><dd>(.*)<\/dd><dt class=/); | |
if( p != undefined ){ | |
land = p[1]; | |
landLevel = land.length; | |
} | |
else{ | |
landLevel = 0; | |
} | |
} | |
// 空き地状態の取得 | |
var space = 0; | |
if( elem.innerHTML.indexOf(">空き地<") >= 0 ){ | |
space = 1; | |
} | |
else if( elem.innerHTML.indexOf(">空き地<") >= 0 ){ | |
space = 1; | |
} | |
// 同盟名、個人名の取得 | |
var user; | |
var group; | |
p = elem.innerHTML.match(/君主名<\/dt><dd>(.*)<\/dd><dt>座標/); | |
if( p != undefined ){ | |
user = p[1]; | |
} | |
else{ | |
p = elem.innerHTML.match(/君主名<\/dt><dd>(.*)<\/dd><dt>座標/); | |
if( p != undefined ){ | |
user = p[1]; | |
} | |
} | |
p = elem.innerHTML.match(/君主名<\/dt><dd>(.*)<\/dd><dt>人口/); | |
if( p != undefined ){ | |
user = p[1]; | |
} | |
else{ | |
p = elem.innerHTML.match(/君主名<\/dt><dd>(.*)<\/dd><dt>人口/); | |
if( p != undefined ){ | |
user = p[1]; | |
} | |
} | |
p = elem.innerHTML.match(/同盟名<\/dt><dd>(.*)<\/dd><dt>戦力/); | |
if( p != undefined ){ | |
group = p[1]; | |
} | |
else{ | |
p = elem.innerHTML.match(/同盟名<\/dt><dd>(.*)<\/dd><dt>戦力/); | |
if( p != undefined ){ | |
group = p[1]; | |
} | |
} | |
p = elem.innerHTML.match(/同盟名<\/dt><dd class="bottom-popup-r">(.*)<\/dd><\/dl>/); | |
if( p != undefined ){ | |
group = p[1]; | |
} | |
else{ | |
p = elem.innerHTML.match(/同盟名<\/dt><dd class="bottom-popup-r">(.*)<\/dd><\/dl>/); | |
if( p != undefined ){ | |
group = p[1]; | |
} | |
} | |
// 資源の取得 | |
var res = elem.innerHTML.match(/.*木(\d+)&nbsp;岩(\d+)&nbsp;鉄(\d+)&nbsp;糧(\d+).*/); | |
if( res == undefined){ | |
res = new Array(); | |
res[1] = 0; | |
res[2] = 0; | |
res[3] = 0; | |
res[4] = 0; | |
} | |
//----------------// | |
// 領地のチェック // | |
//----------------// | |
// NPC砦判定 | |
if( elem.innerHTML.indexOf("npc-red-star") >= 0 ){ | |
// NPC砦名 | |
var casname = elem.innerHTML.match(/bigmap-caption">(.*)<\/dt><dd class=/); | |
if( (casname == null) || (casname == undefined) ){ | |
casname = elem.innerHTML.match(/bigmap-caption">(.*)<\/dt><dd class=/); | |
} | |
// NPC砦 | |
mapdata[px][py] = MAP_NPC; | |
// リソース情報 | |
resdata[px][py] = "★" + landLevel + " (" + casname[1] + ")"; | |
} | |
else if( space == 0 ){ | |
// 個人領土 | |
if( (ckUser.snapshotItem(0).checked == false) || ((ckUser.snapshotItem(0).checked == true) && (landLevel == 0)) ){ | |
mapdata[px][py] = MAP_WALL; // 個人領土を対象外、あるいは対象かつ拠点の場合、壁とみなす | |
} | |
// 同盟指定 | |
if( (ckUser.snapshotItem(0).checked == true) && (skipgrp > 0) ){ | |
// 同盟指定ありの場合、指定条件にマッチしない領土は壁とみなす | |
var matchcase = false; // マッチしたパターン | |
var groupNo = skipgrp - 1; | |
// 個人・同盟マッチチェック | |
for( var k = 0; k < userName[groupNo].length; k++ ){ | |
// 検索有効時 username に値が入る | |
if( userName[groupNo][k] != "" ){ | |
// ターゲットが個人 | |
if( target[groupNo] == 1 ){ | |
// 完全一致かつ、ユーザー名が一致 | |
if( (fullmatch[groupNo] == 1) && (user == userName[groupNo][k]) ){ | |
matchcase = true; | |
break; | |
} | |
// 部分一致かつ、ユーザー名が一致 | |
if( (fullmatch[groupNo] == 0) && (user.indexOf(userName[groupNo][k]) != -1) ){ | |
matchcase = true; | |
break; | |
} | |
} | |
// ターゲットが同盟 | |
else{ | |
// 完全一致かつ、ユーザー名が一致 | |
if( (fullmatch[groupNo] == 1) && (group == userName[groupNo][k]) ){ | |
matchcase = true; | |
break; | |
} | |
// 部分一致かつ、ユーザー名が一致 | |
if( (fullmatch[groupNo] == 0) && (group.indexOf(userName[groupNo][k]) != -1) ){ | |
matchcase = true; | |
break; | |
} | |
} | |
} | |
} | |
if( matchcase == false ){ | |
// マッチしない場合は壁扱い | |
mapdata[px][py] = MAP_WALL; | |
} | |
} | |
// リソース情報 | |
if( landLevel != 0 ){ | |
resdata[px][py] = '★' + landLevel + ' (' + res[1] + ',' + res[2] + ',' + res[3] + ',' + res[4] + ')'; | |
} | |
else{ | |
resdata[px][py] = '個人本拠地/拠点'; | |
} | |
} | |
else{ | |
// リソース情報 | |
resdata[px][py] = '★' + landLevel + ' (' + res[1] + ',' + res[2] + ',' + res[3] + ',' + res[4] + ')'; | |
} | |
//----------------// | |
// ルート特殊処理 // | |
//----------------// | |
// 土地レベルでの判定 | |
if( (landLevel > limit) || (mapdata[px][py] == MAP_NPC) ){ | |
// レベル超過の土地とNPC砦は壁扱いとする | |
mapdata[px][py] = MAP_WALL; // 壁扱い | |
} | |
// 資源回避での判定 | |
if( (season1[cchkres[skipres]][1] == res[1]) | |
&& (season1[cchkres[skipres]][2] == res[2]) | |
&& (season1[cchkres[skipres]][3] == res[3]) | |
&& (season1[cchkres[skipres]][4] == res[4]) ){ | |
// 回避条件に一致する資源は壁扱いとする | |
mapdata[px][py] = MAP_WALL; // 壁扱い | |
} | |
// 始点、終点特例 | |
if( ((px == sx) && (py == sy)) || ((px == ex) && (py == ey)) ){ | |
mapdata[px][py] = MAP_NONE; // 始点と目的地はルートに加える | |
} | |
} | |
//--------------------// | |
// 始点情報の埋め込み // | |
//--------------------// | |
mapdata[sx][sy] = MAP_START; | |
// 探索情報設定 | |
var posdata = new Array(); | |
var maxpos = 0; | |
posdata[0] = parseInt(sy) * 51 + parseInt(sx); | |
for( var i = 0; i <= maxpos; i++ ){ | |
var cx = parseInt(posdata[i]) % 51; | |
var cy = Math.floor(parseInt(posdata[i]) / 51); | |
for( var j = 0; j < chkptn.length; j++ ){ | |
var lx = parseInt(cx) + parseInt(chkptn[j][0]); | |
if( (parseInt(lx) < 0) || (parseInt(lx) >= viewSize) ){ | |
continue; | |
} | |
var ly = parseInt(cy) + parseInt(chkptn[j][1]); | |
if( (parseInt(ly) < 0) || (parseInt(ly) >= viewSize) ){ | |
continue; | |
} | |
// 現座標からの移動距離+1を求める | |
var dist = parseInt(mapdata[cx][cy]) + 1; | |
// 編集可能? | |
if( (mapdata[lx][ly] == MAP_NONE) || (mapdata[lx][ly] == MAP_NPC) ){ | |
// 距離更新 | |
mapdata[lx][ly] = dist; | |
// 座標登録 | |
maxpos = maxpos + 1; | |
posdata[maxpos] = parseInt(ly) * 51 + parseInt(lx); | |
} | |
else if( (mapdata[lx][ly] > 0) && (parseInt(mapdata[lx][ly])) > dist ){ | |
// 距離更新 | |
mapdata[lx][ly] = dist; | |
// 座標登録 | |
maxpos = maxpos + 1; | |
posdata[maxpos] = parseInt(ly) * 51 + parseInt(lx); | |
} | |
} | |
} | |
// 事前チェックオンのとき、結果だけ返す | |
if( checkmode == "1" ){ | |
if( mapdata[ex][ey] < 0 ){ | |
return false; | |
} | |
else{ | |
return true; | |
} | |
} | |
// 終点にたどりつけたか? | |
if( mapdata[ex][ey] < 0 ){ | |
alert("目的地に到達するルートを構築できませんでした。構築条件を見直してください。"); | |
return false; | |
} | |
//--------------------// | |
// サーチルート逆探査 // | |
//--------------------// | |
posdata[0] = parseInt(ey) * 51 + parseInt(ex); | |
maxpos = 0; | |
for( var i = 0; i <= maxpos; i++ ){ | |
var cx = parseInt(posdata[i]) % 51; | |
var cy = Math.floor(parseInt(posdata[i]) / 51); | |
if( (cx == sx) && (cy == sy) ){ | |
break; | |
} | |
// コースとして通過可能な最小資源の土地を調べる | |
var lowLevel = 9; | |
for( var j = 0; j < chkptn.length; j++ ){ | |
var lx = parseInt(cx) + parseInt(chkptn[j][0]); | |
if( (parseInt(lx) < 0) || (parseInt(lx) >= viewSize) ){ | |
continue; | |
} | |
var ly = parseInt(cy) + parseInt(chkptn[j][1]); | |
if( (parseInt(ly) < 0) || (parseInt(ly) >= viewSize) ){ | |
continue; | |
} | |
// 現座標からの移動距離-1を求める | |
var dist = parseInt(mapdata[cx][cy]) - 1; | |
// 該当する座標? | |
if( (mapdata[lx][ly] >= 0) && (parseInt(mapdata[lx][ly])) == dist ){ | |
var level = resdata[lx][ly].substr(resdata[lx][ly].indexOf("★")+1,1); | |
if( resdata[lx][ly].indexOf("個人本拠地/拠点") >= 0 ){ | |
level = 0; | |
} | |
if( lowLevel > level ){ | |
lowLevel = level; | |
} | |
} | |
} | |
//--------------------------// | |
// 固定・ランダム構築の分岐 // | |
//--------------------------// | |
checkBox1 = $e_7('//*[@id="ckRouteRandom"]'); | |
if( checkBox1.snapshotItem(0).checked == true ){ | |
//--------------------// | |
// ランダムルート構築 // | |
//--------------------// | |
// パターン乱数の算出 | |
var pattern; | |
var rptn = new Array(2); | |
pattern = Math.floor(Math.random() * 30); | |
if( pattern < 24 ){ | |
// 十字優先のパターン(80%の確率でこちら) | |
rptn[0] = pattern; | |
// 後半4パターンの決定 | |
pattern = Math.floor(Math.random() * 24); | |
rptn[1] = pattern + 24; | |
} | |
else{ | |
// ×字優先のパターン(20%の確率でこちら) | |
pattern = Math.floor(Math.random() * 24); | |
rptn[1] = pattern; | |
// 前半4パターンの決定 | |
pattern = Math.floor(Math.random() * 24); | |
rptn[0] = pattern + 24; | |
} | |
// ルート探索 | |
for( var j = 0; j < 8; j++ ){ | |
var rno; | |
var offset; | |
if( j < 4 ){ | |
rno = rptn[0]; | |
offset = j; | |
} | |
else{ | |
rno = rptn[1]; | |
offset = j - 4; | |
} | |
var lx = parseInt(cx) + parseInt(chkptn_r[rno*4 + offset][0]); | |
if( (parseInt(lx) < 0) || (parseInt(lx) >= viewSize) ){ | |
continue; | |
} | |
var ly = parseInt(cy) + parseInt(chkptn_r[rno*4 + offset][1]); | |
if( (parseInt(ly) < 0) || (parseInt(ly) >= viewSize) ){ | |
continue; | |
} | |
// 現座標からの移動距離-1を求める | |
var dist = parseInt(mapdata[cx][cy]) - 1; | |
var level = resdata[lx][ly].substr(resdata[lx][ly].indexOf("★")+1,1); | |
if( resdata[lx][ly].indexOf("個人本拠地/拠点") >= 0 ){ | |
level = 0; | |
} | |
// 該当する座標? | |
if( (mapdata[lx][ly] >= 0) && (parseInt(mapdata[lx][ly]) == dist) && (level == lowLevel) ){ | |
// 座標登録 | |
maxpos = maxpos + 1; | |
posdata[maxpos] = parseInt(ly) * 51 + parseInt(lx); | |
break; | |
} | |
} | |
} | |
else{ | |
//----------------// | |
// 固定ルート構築 // | |
//----------------// | |
// ルート探索 | |
for( var j = 0; j < chkptn.length; j++ ){ | |
var lx = parseInt(cx) + parseInt(chkptn[j][0]); | |
if( (parseInt(lx) < 0) || (parseInt(lx) >= viewSize) ){ | |
continue; | |
} | |
var ly = parseInt(cy) + parseInt(chkptn[j][1]); | |
if( (parseInt(ly) < 0) || (parseInt(ly) >= viewSize) ){ | |
continue; | |
} | |
// 現座標からの移動距離-1を求める | |
var dist = parseInt(mapdata[cx][cy]) - 1; | |
var level = resdata[lx][ly].substr(resdata[lx][ly].indexOf("★")+1,1); | |
if( resdata[lx][ly].indexOf("個人本拠地/拠点") >= 0 ){ | |
level = 0; | |
} | |
// 該当する座標? | |
if( (mapdata[lx][ly] >= 0) && (parseInt(mapdata[lx][ly]) == dist) && (level == lowLevel) ){ | |
// 座標登録 | |
maxpos = maxpos + 1; | |
posdata[maxpos] = parseInt(ly) * 51 + parseInt(lx); | |
break; | |
} | |
} | |
} | |
} | |
//----------------// | |
// ルート情報表示 // | |
//----------------// | |
var baseText = $e_7('//*[@id="routeInfoText"]'); | |
checkBox1 = $e_7('//*[@id="ckRouteMode2"]'); | |
var text = ''; | |
for( var i = maxpos; i >= 0; i-- ){ | |
var cx = parseInt(posdata[i]) % 51; | |
var cy = Math.floor(parseInt(posdata[i]) / 51); | |
// areaデータを取ってみる | |
var elem = $x_7("//div[@id=\"map51-content\"]//a[@href=\"/land.php?x=" + (parseInt(bx) + cx) + "&y=" + (parseInt(by) - cy) + "#ptop\"]"); | |
// アイコン表示 | |
var newhtml; | |
if( elem.innerHTML.indexOf("<b>") >= 0 ){ | |
newhtml = elem.innerHTML.replace(/<b>.*<\/b>/,"<font style=\"border-style: solid; border-color: cyan; background-color:cyan;\"> </font>"); | |
} | |
else{ | |
if( (elem.innerHTML.indexOf(">S</font>") >= 0) || (elem.innerHTML.indexOf(">E</font>") >= 0) ){ | |
newhtml = elem.innerHTML; | |
} | |
else{ | |
newhtml = elem.innerHTML.replace(/<font.*>.*<\/font>/,"<font style=\"border-style: solid; border-color: cyan; background-color:cyan;\"> </font>"); | |
} | |
} | |
elem.innerHTML = newhtml; | |
if( text != '' ){ | |
text = text + '<br>'; | |
} | |
// 資源表示での出力切り替え | |
if( checkBox1.snapshotItem(0).checked == false ){ | |
// 資源出力あり | |
text = text + '(' + (parseInt(bx) + cx) + ',' + (parseInt(by) - cy) + ') ' + resdata[cx][cy]; | |
} | |
else{ | |
// 資源出力なし | |
if( resdata[cx][cy].indexOf("★") >= 0 ){ | |
text = text + '(' + (parseInt(bx) + cx) + ',' + (parseInt(by) - cy) + ') ' | |
+ resdata[cx][cy].substr(0,2); | |
} | |
else{ | |
text = text + '(' + (parseInt(bx) + cx) + ',' + (parseInt(by) - cy) + ') ' + resdata[cx][cy]; | |
} | |
} | |
} | |
// ルート表の表示 | |
baseText.snapshotItem(0).innerHTML = text; | |
return true; | |
} | |
//--------------------// | |
// 出兵アイコンクリア // | |
//--------------------// | |
function attackIconClear() { | |
// 出兵アイコンのクリア | |
var checkBox = $e_7('//*[@id="ckUnion"]'); | |
// マップに埋め込んだマーク画像を全部消す | |
var rollover = $d("rollover"); | |
// 無効なら画像を消す | |
if( checkBox.snapshotItem(0).checked == false ){ | |
// すでに画像が登録されてるか調べる | |
var en = $e_7('//*[@name="atkIcon"]'); | |
if( en.snapshotLength > 0 ){ | |
// 画像がいたら消す | |
for( var i = 0; i < en.snapshotLength; i++ ){ | |
var ex = en.snapshotItem(i); | |
var ex_p = ex.parentNode; | |
ex_p.removeChild(ex); | |
} | |
} | |
} | |
else{ | |
// 出兵情報マッピング | |
unionAttackInfo(); | |
} | |
} | |
} | |
//faraway 7.NPC砦、領土情報検索ツールのソース(bro3_npc_castle_info2.user.js)終了 | |
//faraway 8.右クリック拡張のソース(b3rclick.user.js)開始 | |
//================================================================================ | |
//8.右クリック拡張 | |
//================================================================================ | |
function disp_rightclick() { | |
/** | |
* gettextっぽい感じのやつ | |
* @param {String} message | |
* @param {Object} messageObject | |
* @function | |
*/ | |
var _ = (function () { | |
var locale = navigator.language.toLowerCase().substr(0,2), | |
domain = location.hostname.replace(/^[^.]+\./,'').toLowerCase(), | |
checks = [ | |
{'default' : '_ja','locale' : locale}, | |
{'default' : '_3gokushi.jp','locale' : domain} | |
]; | |
return function (message,messageObject) { | |
var messages,defKey; | |
checks.forEach(function (check) { | |
var key = '_'+check.locale; | |
if (Object.prototype.hasOwnProperty.call(messageObject, key)) { | |
messages = messageObject[key]; | |
defKey = check['default']; | |
} | |
}); | |
return messages[message] ? messages[message] : messageObject[defKey][message]; | |
}; | |
})(), | |
NAMESPACE = 'com.dosukoi-kissa.www/'+location.host, /*faraway120125+location.host*/ | |
systemMessages = { | |
'_3gokushi.jp' : { | |
'LordName' : '\u541b\u4e3b\u540d', //君主名 | |
'Flatland' : '\u5e73\u5730' //平地 | |
}, | |
'_1kibaku.jp' : { | |
'LordName' : '\u982d\u9996\u540d', | |
'Flatland' : '\u5e73\u5730' | |
}, | |
}, | |
localeMessages = { // 台湾、英語版すでにないのでロケール定義削除(2014/02/21) | |
'_ja' : { | |
'Infomation' : '\u60c5\u5831', //情報 | |
'Deploy' : '\u51fa\u5175', //出兵 | |
'CenterMap' : '\u4e2d\u592e\u306b\u8868\u793a\u3059\u308b', //中央に表示する | |
'ConvertTerritory' : '\u3053\u306e\u9818\u5730\u3092\u62e0\u70b9\u306b\u3059\u308b', //この領地を拠点にする | |
'LvUpTerritory' : '\u3053\u306e\u9818\u5730\u3092\u30ec\u30d9\u30eb\u30a2\u30c3\u30d7', //この領地をレベルアップ | |
'DiscardTerritory' : '\u3053\u306e\u9818\u5730\u3092\u7834\u68c4\u3059\u308b', //この領地を破棄する | |
'LvUp' : '\u30ec\u30d9\u30eb\u30a2\u30c3\u30d7', //レベルアップ | |
'Building' : '\u5efa\u7bc9>>', //建築>> | |
'CityField' : '\u90fd\u5e02\u753b\u9762', //都市画面 | |
'MapField' : '\u5730\u56f3\u753b\u9762', //地図画面 | |
'GovernorField' : '\u5185\u653f\u753b\u9762' //内政画面 | |
}, | |
}, | |
$ = function (id,pd) {return pd ? pd.getElementById(id) : document.getElementById(id);}, | |
$x = function(xp, dc) {function c(f) {var g = '';if (typeof f === 'string') {g = f;}var h = function(a) {var b = document.implementation.createHTMLDocument('');var c = b.createRange();c.selectNodeContents(b.documentElement);c.deleteContents();b.documentElement.appendChild(c.createContextualFragment(a));return b;};if (0 <= navigator.userAgent.toLowerCase().indexOf('firefox')) {h = function(a) {var b = document.implementation.createDocumentType('html','-//W3C//DTD HTML 4.01//EN','http://www.w3.org/TR/html4/strict.dtd');var c = document.implementation.createDocument(null, 'html', b);var d = document.createRange();d.selectNodeContents(document.documentElement);var e = c.adoptNode(d.createContextualFragment(a));c.documentElement.appendChild(e);return c;};}return h(g);}var m = [], r = null, n = null;var o = dc || document.documentElement;var p = o.ownerDocument;if (typeof dc === 'object' && typeof dc.nodeType === 'number') {if (dc.nodeType === 1 && dc.nodeName.toUpperCase() === 'HTML') {o = c(dc.innerHTML);p = o;}else if (dc.nodeType === 9) {o = dc.documentElement;p = dc;}}else if (typeof dc === 'string') {o = c(dc);p = o;}try {r = p.evaluate(xp, o, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for ( var i = 0, l = r.snapshotLength; i < l; i++) m.push(r.snapshotItem(i));}catch (e) {try {var q = p.evaluate(xp, o, null, XPathResult.ANY_TYPE, null);while (n = q.iterateNext()) m.push(n);}catch (e) {throw new Error(e.message);}}return m;}, | |
$s = function(xp, dc) { return $x(xp,dc).shift();}, | |
$e = function(doc, event, func, useCapture) {var eventList = event;var eType = null;var capture = useCapture || false;if (typeof event == 'string') {eventList = {};eventList[event] = [func];} else {for (eType in eventList) {if (typeof eventList[eType] == 'object'&& eventList[eType] instanceof Array) {continue;}eventList[eType] = [ event[eType] ];}}for (eType in eventList) {var eventName = eType;for ( var i = 0; i < eventList[eType].length; i++) {doc.addEventListener(eventName, eventList[eType][i], capture);}}}, | |
//初期設定 | |
menuWarp = createElement('div'), | |
mainMenu = createElement('div', { | |
'attribute' : { | |
'class' : 'rMenu' | |
}, | |
'css' : { | |
'padding': '3px', | |
'opacity': 0.8, | |
'font-size': 'small', | |
'color': '#333333', | |
'background-color': '#000000', | |
'border': '1px solid #7777FF', | |
'position': 'absolute', | |
'z-index': 10000, | |
'cursor': 'pointer', | |
'display': 'none', | |
'min-width': '75px' | |
}, | |
'innerText' : 'none' | |
}), | |
subMenu = mainMenu.cloneNode(false); | |
subMenu.setAttribute('ready','false'); | |
subMenu.innerHTML = "<ul><li>testdayo</li></ul>"; | |
document.body.appendChild(menuWarp); | |
menuWarp.appendChild(mainMenu); | |
menuWarp.appendChild(subMenu); | |
$e(mainMenu, { | |
'mouseover' : function(e){ | |
mainMenu.style.display = "block"; | |
}, | |
'mouseout' : function(e){ | |
mainMenu.style.display = "none"; | |
} | |
}); | |
$e(subMenu, { | |
'mouseover' : function(e){ | |
mainMenu.style.display = "block"; | |
subMenu.style.display = "block"; | |
}, | |
'mouseout' : function(e){ | |
mainMenu.style.display = "none"; | |
subMenu.style.display = "none"; | |
} | |
}); | |
subMenu.innerHTML = "<ul><li>testdayo</li></ul>"; | |
var userName = GM_getValue(NAMESPACE+"userName",null); | |
var preCheckTime = GM_getValue(NAMESPACE+"preCheckTime_UserName", null); | |
var now = new Date().getTime(); | |
if (!preCheckTime) preCheckTime = new Date(1976,4,12,3,4,56,789).getTime();//十分前の日付 | |
if (userName == null || (preCheckTime + 24*60*60*1000) <= now) { | |
var interval = 0; | |
var getUserName = function(){ | |
GM_xmlhttpRequest({ | |
url:location.protocol + "//" + location.host+"/user/"+location.search, | |
method : 'GET', | |
onload : function(res){ | |
var dom = document.createElement("html"); | |
dom.innerHTML = res.responseText; | |
var ret = $x('//table[contains(concat(" ",normalize-space(@class)," "), " commonTables ")]//tr[2]/td[2]',dom); | |
ret.forEach(function(self){ | |
userName = self.innerHTML; | |
GM_setValue(NAMESPACE+"userName",userName); | |
GM_setValue(NAMESPACE+"preCheckTime_UserName",""+new Date().getTime()); | |
}); | |
if (userName) { | |
clearInterval(interval); | |
} | |
} | |
}); | |
}; | |
setTimeout(getUserName,0); | |
} | |
// 右クリック時の動作 | |
function rightClickMenu(){ | |
this.init.apply(this,arguments); | |
} | |
rightClickMenu.prototype = { | |
init:function(){ | |
this.ruleList = new Array(); | |
this.ruleList.length = 0; | |
this.menu = new Array(); | |
this.menu.length = 0; | |
}, | |
addMenu:function(menuName){ | |
this.menu[menuName] = eval(menuName); | |
}, | |
addRule:function(){ | |
this.ruleList[this.ruleList.length] = { | |
type:arguments[0], | |
value:arguments[1], | |
menu:arguments[2] | |
}; | |
}, | |
setListener:function(){ | |
var callee = this; | |
var mFunc = function(event){ | |
var resultMenu = callee.evaluate.apply(callee,arguments); | |
if(resultMenu != false && event.button == '2'){ | |
if (typeof resultMenu.ready == 'function') { | |
resultMenu.ready(event); | |
} | |
var addWarp = document.createElement("UL"); | |
for(var n=0;n < resultMenu.items.length;n++){ | |
var addDoc = null; | |
var item = resultMenu.items[n]; | |
var name = callee.getValue(item,"name",arguments); | |
if (!name) { | |
continue;; | |
} | |
switch(item.type){ | |
case 'link': | |
var match = null; | |
var href = callee.getValue(item,"href",arguments); | |
addDoc = document.createElement("A"); | |
if (0 < href.length) { | |
if (href.lastIndexOf("&") == (href.length - 1)) { | |
href = href.slice(0,-1); | |
} | |
if ((match = event.target.href.match(/[\?|&](([x|y]|SSID)=[\w,-]+)/ig)) != null) { | |
if (href.lastIndexOf("?") != (href.length - 1)) { | |
href += "&"; | |
} | |
href += match.join("").replace("?",""); | |
} | |
$e(addDoc,"click",function() { | |
subMenu.style.display = "none"; | |
mainMenu.style.display = "none"; | |
}); | |
} | |
else { | |
href = "javascript:void(0);"; | |
} | |
addDoc.href = href; | |
addDoc.appendChild(document.createTextNode(name)); | |
break; | |
case 'text': | |
addDoc = document.createElement("SPAN"); | |
addDoc.innerHTML = name; | |
break; | |
} | |
if (typeof item.events == 'object') { | |
$e(addDoc,item.events); | |
} | |
var li = document.createElement("LI"); | |
li.appendChild(addDoc); | |
addWarp.appendChild(li); | |
} | |
mainMenu.replaceChild(addWarp,mainMenu.firstChild); | |
mainMenu.style.display = 'block'; | |
mainMenu.style.top = event.pageY - 5 + 'px'; | |
mainMenu.style.left = event.pageX - 5 + 'px'; | |
var warpWidth = parseFloat(document.defaultView.getComputedStyle(addWarp, '').width); | |
var bodyWidth = parseFloat(document.defaultView.getComputedStyle(mainMenu.parentNode, '').width); | |
if (bodyWidth < (event.pageX + warpWidth + 10)) { | |
mainMenu.style.left = (bodyWidth - warpWidth - 15) + "px"; | |
} | |
} else { | |
mainMenu.style.display = 'none'; | |
} | |
event.preventDefault(); | |
return false; | |
}; | |
['(id("mapOverlayMap") | id("map51-content")//div)/*[contains("aAareaAREA",name(.))][@href]','//div[contains(concat(" ",normalize-space(@class)," "), " sideBoxInner ") and contains(concat(" ",normalize-space(@class)," "), " basename ")]//li/a','id("lodgment")/div[contains(concat(" ",normalize-space(@class)," "), " floatInner ")]//li/a[not(contains(concat(" ",normalize-space(@class)," "), " map-basing "))]'].forEach(function(xpath){ | |
$x(xpath).forEach(function(self){ | |
$e(self,'contextmenu',mFunc); | |
}); | |
}); | |
}, | |
evaluate : function (event) { | |
for (var n=0;n<this.ruleList.length;n++) { | |
if (this.ruleList[n].type != 'cond') { | |
if (eval("event.target." + this.ruleList[n].type) == this.ruleList[n].value) { | |
return this.menu[this.ruleList[n].menu]; | |
} | |
} else { | |
if(this.ruleList[n].value(event)){ | |
return this.menu[this.ruleList[n].menu]; | |
} | |
} | |
} | |
return false; | |
}, | |
getValue : function(item,prop,orgArguments) { | |
switch (typeof item[prop]) { | |
case "function": | |
return item[prop].apply(item,orgArguments); | |
case "string": | |
return item[prop]; | |
} | |
return ""; | |
} | |
}; | |
// ***************************メニューオブジェクト********************* | |
var mapMenu = { | |
items:[ | |
{ | |
name:function(e){ | |
var name = '<b>'; | |
if (e.target.nodeName.toUpperCase() == 'A') { | |
$x('@onmouseover',e.target).forEach(function(mouseover){ | |
var doc = mouseover.value.replace(/^[^']+'|'[^']+$/g,''); | |
name += $s('//dt[contains(concat(" ",normalize-space(@class)," "), " bigmap-caption ")]/text()',doc).data; | |
}); | |
} | |
else { | |
name += e.target.alt; | |
} | |
return name + "</b>"; | |
}, | |
type:"text" | |
}, | |
{ | |
name: _("Infomation",localeMessages), //情報 | |
type:"link", | |
href:"land.php?" | |
}, | |
{ | |
name:_("Deploy",localeMessages), //出兵 | |
type:"link", | |
href:"facility/castle_send_troop.php?" | |
}, | |
{ | |
name:_("CenterMap",localeMessages), //中央に表示する | |
type:"link", | |
href:"map.php?" | |
}, | |
{ | |
name: function(e){ | |
var isMyTerritory = false; | |
if (e.target.nodeName.toUpperCase() == 'A') { | |
$x('@onmouseover',e.target).forEach(function(mouseover){ | |
var doc = mouseover.value.replace(/^[^']+'|'[^']+$/g,''); | |
var text = $s('//dt[contains(text(),"'+_('LordName', systemMessages)+'")]/following-sibling::dd[1]/text()',doc); | |
if (text && text.data == userName) { | |
isMyTerritory = true; | |
} | |
}); | |
} | |
else { | |
isMyTerritory = new RegExp("'[^']+'[^']+'"+userName+"'","i").test(e.target.getAttribute("onmouseover")); | |
} | |
return isMyTerritory ? _("ConvertTerritory",localeMessages) : null; | |
}, | |
type:"link", | |
href:"facility/select_type.php?" | |
}, | |
{ | |
name: function(e){ | |
var isMyTerritory = false; | |
if (e.target.nodeName.toUpperCase() == 'A') { | |
$x('@onmouseover',e.target).forEach(function(mouseover){ | |
var doc = mouseover.value.replace(/^[^']+'|'[^']+$/g,''); | |
var text = $s('//dt[contains(text(),"'+_('LordName', systemMessages)+'")]/following-sibling::dd[1]/text()',doc); | |
if (text && text.data == userName) { | |
isMyTerritory = true; | |
} | |
}); | |
} | |
else { | |
isMyTerritory = new RegExp("'[^']+'[^']+'"+userName+"'","i").test(e.target.getAttribute("onmouseover")); | |
} | |
return isMyTerritory ? _("LvUpTerritory",localeMessages) : null; | |
}, | |
type:"link", | |
href:"territory_proc.php?" | |
}, | |
{ | |
name:function(e){ | |
var isMyTerritory = false; | |
if (e.target.nodeName.toUpperCase() == 'A') { | |
$x('@onmouseover',e.target).forEach(function(mouseover){ | |
var doc = mouseover.value.replace(/^[^']+'|'[^']+$/g,''); | |
var text = $s('//dt[contains(text(),"'+_('LordName', systemMessages)+'")]/following-sibling::dd[1]/text()',doc); | |
if (text && text.data == userName) { | |
isMyTerritory = true; | |
} | |
}); | |
} | |
else { | |
isMyTerritory = new RegExp("'[^']+'[^']+'"+userName+"'","i").test(e.target.getAttribute("onmouseover")); | |
} | |
return isMyTerritory ? _("DiscardTerritory",localeMessages) : null; | |
}, | |
type:"link", | |
href:"territory_proc.php?mode=remove&", | |
events : { | |
click : function (event) { | |
subMenu.style.display = "none"; | |
mainMenu.style.display = "none"; | |
event.target.href.match(/^.*[\?\&]x=(-?[0-9]+)&.*y=(-?[0-9]+).*$/); | |
x=RegExp.$1;y=RegExp.$2; | |
var url = "http://" + document.location.hostname + "/territory_proc.php?x=" + x + "&y=" + y + "&mode=remove"; | |
wrapHttpReq(url, "GET", null, | |
function(response) { | |
var rmtime = response.match(/(現在領地を破棄中です)[^\d]*\n(\d+-\d+-\d+ \d+:\d+:\d+)/ ); | |
if( rmtime ) { | |
if( rmtime[1] == "現在領地を破棄中です" ) { | |
addTerritoryList(rmtime[2], 0, x, y ); | |
} | |
} | |
alert("座標(" + x + "," + y + ")の領地を破棄しました。"); | |
} | |
); | |
event.preventDefault(); | |
} | |
} | |
} | |
] | |
}; | |
var villageMenu = { | |
items:[ | |
{ | |
name:function(event){ | |
return "<b>" + event.target.alt + "</b>"; | |
}, | |
type:"text" | |
}, | |
{ | |
name: _("Infomation",localeMessages), | |
type:"link", | |
href:"facility/select_facility.php?" | |
}, | |
{ | |
name:function(event){ | |
if (event.target.alt == _('Flatland', systemMessages)) { | |
return null; | |
} | |
return _("LvUp",localeMessages); | |
}, | |
type:"link", | |
href:"facility/build.php?", | |
events : { | |
click : function (event) { | |
subMenu.style.display = "none"; | |
mainMenu.style.display = "none"; | |
event.target.href.match(/^.*[\?\&]x=(-?[0-9]+)&.*y=(-?[0-9]+).*$/); | |
x=RegExp.$1;y=RegExp.$2; | |
hiro_lvupfacility(x,y,document.evaluate('//*[@id="basepoint"]/span[@class="xy"]',document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0).innerHTML); | |
event.preventDefault(); | |
return false; | |
} | |
} | |
}, | |
{ | |
name:function(event){ | |
if (event.target.alt == _('Flatland', systemMessages)) { | |
return _('Building', localeMessages); | |
} | |
return ""; | |
}, | |
type:"link", | |
href:"", | |
events : { | |
mouseover : function(event) { | |
var enabled = function() { | |
if (subMenu.getAttribute("ready") == "false") { | |
setTimeout(enabled,200); | |
return; | |
}; | |
var left = parseFloat(mainMenu.style.left) + ((mainMenu.clientWidth < 75) ? 75 : mainMenu.clientWidth) - 15; | |
subMenu.style.display = 'block'; | |
subMenu.style.top = event.pageY + 'px'; | |
subMenu.style.left = left + 'px'; | |
}; | |
enabled(); | |
}, | |
mouseout: function(e) { | |
subMenu.style.display = 'none'; | |
}, | |
click : function (e) { | |
e.preventDefault(); | |
return false; | |
} | |
} | |
} | |
], | |
ready : function(event) { | |
var baseUrl = location.protocol + "//"+location.hostname+"/"; | |
subMenu.setAttribute("ready","false"); | |
GM_xmlhttpRequest({ | |
url:event.target.href, | |
method : 'GET', | |
onload:function(respons){ | |
subMenu.innerHTML = ""; | |
var addWarp = document.createElement("UL"); | |
subMenu.appendChild(addWarp); | |
var dom = document.createElement("html"); | |
dom.innerHTML = respons.responseText; | |
$x('//table[@summary="object"]',dom).forEach(function(self){ //建設可能施設数分ループ | |
var addDocWarp = document.createElement("LI"); | |
var addDoc = document.createElement("A"); | |
$x('.//th[contains(concat(" ",normalize-space(@class)," "), " mainTtl ")]',self).forEach(function(th){ | |
addDoc.innerHTML = th.innerHTML; //施設名取得 | |
}); | |
//リンク先取得 | |
$x('.//div[contains(concat(" ",normalize-space(@class)," "), "lvupFacility")]/p[contains(concat(" ",normalize-space(@class)," "), " main ")]/a',self).forEach(function(a){ | |
addDoc.href = "javascript:void(0)"; | |
lfc2_formname=a.getAttribute('onClick').match(/\'([^\']+)/)[1]; //施設建築用のFORMの名称 | |
//FormのinputのnameとValue全部とりだし | |
$x('//form[@name="' + lfc2_formname + '"]/input',self).forEach(function(input){ | |
if(input.name=="ssid" ) lfc2_ssid =input.value; | |
if(input.name=="id" ) lfc2_id =input.value; | |
if(input.name=="x" ) lfc2_x =input.value; | |
if(input.name=="y" ) lfc2_y =input.value; | |
if(input.name=="village_id") lfc2_village_id =input.value; | |
}) | |
addDoc.id = [lfc2_ssid,lfc2_id,lfc2_x,lfc2_y,lfc2_village_id].join(","); | |
}); | |
//クリックした時の動作 | |
$e(addDoc,'click',function(e){ | |
subMenu.style.display = "none";mainMenu.style.display = "none"; | |
hiro_buildfacitity2( this.id.split(',')[0],this.id.split(',')[1], | |
this.id.split(',')[2],this.id.split(',')[3],this.id.split(',')[4]); | |
}); | |
addDocWarp.appendChild(addDoc); | |
addWarp.appendChild(addDocWarp); | |
//建設可能施設数分ループ完了 | |
}); | |
subMenu.setAttribute("ready","true"); | |
} | |
}); | |
} | |
}; | |
var sidebarVillageMenu = { | |
items:[ | |
{ | |
name:function(event){ | |
return "<b>" + event.target.title + "</b>"; | |
}, | |
type:"text" | |
}, | |
{ | |
name: _("CityField",localeMessages), | |
type:"link", | |
href:function(event){ | |
var res = null; | |
var query = ""; | |
if((res = event.target.href.match(/village_id=([^&]*)/i)) != null){ | |
query = res[1]; | |
} | |
return "http://" + location.host + "/village_change.php?page=%2Fvillage.php&village_id=" + query; | |
} | |
}, | |
{ | |
name:_("MapField",localeMessages), | |
type:"link", | |
href:function(event){ | |
var res = null; | |
var query = ""; | |
if((res = event.target.href.match(/village_id=([^&]*)/i)) != null){ | |
query = res[1]; | |
} | |
return "http://" + location.host + "/village_change.php?page=%2Fmap.php&village_id=" + query; | |
} | |
}, | |
{ | |
name:_("GovernorField",localeMessages), | |
type:"link", | |
href:function(event){ | |
var res = null; | |
var query = ""; | |
if((res = event.target.href.match(/village_id=([^&]*)/i)) != null){ | |
query = res[1]; | |
} | |
return "http://" + location.host + "/village_change.php?page=%2Fcard%2Fdomestic_setting.php&village_id=" + query + "&"; | |
} | |
} | |
] | |
}; | |
// ***************************メニューオブジェクトここまで*************** | |
// **************************全体************************* | |
var rMenu = new rightClickMenu(); | |
rMenu.setListener(); | |
rMenu.addMenu('sidebarVillageMenu'); | |
rMenu.addRule("cond",function(event){ | |
if(event.target.href != "undefined" && event.target.href.match(/village_change.php/i)){ | |
return true; | |
} | |
},'sidebarVillageMenu'); | |
// **************************地図画面************************* | |
if(document.URL.match(/(?:big_)?map\.php/i)){ | |
rMenu.addMenu('mapMenu'); | |
rMenu.addRule('tagName','AREA','mapMenu'); | |
rMenu.addRule('tagName','A','mapMenu'); | |
} | |
// **************************都市画面************************* | |
if(document.URL.match(/village.php/i)){ | |
rMenu.addMenu('villageMenu'); | |
rMenu.addRule('tagName','AREA','villageMenu'); | |
} | |
GM_addStyle([ | |
".rMenu li b{ color:#FFAAAA;list-style :none outside none;white-space: nowrap;}", | |
".rMenu li{ color:#FFFFFF;list-style :none outside none;white-space: nowrap;}", | |
".rMenu a:link{text-decoration:none;padding-right:2px;padding-left:1px}", | |
".rMenu a:visited {text-decoration:none;padding-right:2px;padding-left:1px}", | |
".rMenu a:hover {background-color:#DDDDDD;color:#333333;text-decoration:none;}", | |
".rMenu a:active {background-color:#DDDDDD;color:#333333;text-decoration:none;}", | |
".rMenu a {display: block;width: 98%;margin-right: 1px;}", | |
"#headerArea{ display:none; }", | |
].join("\n") | |
); | |
/** | |
* | |
* @param {String} text | |
* @returns {Element} | |
*/ | |
function createText(text) { | |
return document.createTextNode(text); | |
} | |
/** | |
* Function createElement | |
* | |
* @param {String} elementName | |
* @param {Object} [option] | |
* @param {HTMLDocument} [doc] | |
* @returns {Element} | |
*/ | |
function createElement(elementName, option, doc) { | |
var pageDocument = doc ? doc : document; | |
var retElement = elementName == 'img' ? new Image() : pageDocument | |
.createElement(elementName); | |
if (typeof option == 'object') { | |
if (typeof option.attribute == 'object') { | |
for ( var attrName in option.attribute) { | |
retElement.setAttribute(attrName, option.attribute[attrName]); | |
} | |
} | |
if (typeof option.events == 'object') { | |
$e(retElement, option.events); | |
} | |
if (typeof option.innerText == 'string') { | |
retElement.appendChild(pageDocument.createTextNode(option.innerText)); | |
} | |
if (typeof option.css == 'object') { | |
var cssString = ''; | |
for ( var cssProp in option.css) { | |
retElement.style.setProperty(cssProp, option.css[cssProp], ''); | |
} | |
} else if (option.css == 'string') { | |
retElement.style.cssText = option.css; | |
} | |
} | |
return retElement; | |
} | |
/** | |
* initGMFunctions | |
* @description GM関数初期化 | |
*/ | |
function initGMFunctions() { | |
var hasGM = (function() { | |
var result = {}, | |
notSupportReg = /not\s*support/i, | |
existsAPI = function(func) { | |
return typeof func === 'function' && | |
( Object.prototype.hasOwnProperty.call(func, '__proto__') === false || | |
notSupportReg.test(String(func)) === false ); | |
}; | |
[ | |
'GM_getValue', 'GM_setValue', 'GM_listValues', 'GM_deleteValue', 'GM_addStyle', | |
'GM_log', 'GM_xmlhttpRequest', 'GM_getResourceURL', 'GM_getResourceText' | |
].forEach(function(methodName) { | |
var resName = methodName.substr(3); | |
result[resName] = false; | |
if (Object.prototype.hasOwnProperty.call(this, methodName) && existsAPI(this[methodName])) { | |
result[resName] = true; | |
} | |
}); | |
return result; | |
})(); | |
/** | |
* GM_addStyle | |
* @param {String} css css text | |
* @function | |
*/ | |
if (hasGM.addStyle === false) { | |
GM_addStyle = function(css) { | |
var style = document.evaluate('//head/style[not(@src) and last()]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null); | |
style = style && style.singleNodeValue || document.createElement('style'); | |
style.type = 'text/css'; | |
style.appendChild(document.createTextNode(css)); | |
if (!(style.parentNode || style.parentElement)) { | |
document.getElementsByTagName('head')[0].appendChild(style); | |
} | |
}; | |
} | |
/** | |
* GM_setValue | |
* @param {String} name storage key | |
* @param {String|Number|Boolean} value storage saved object | |
* @throws {TypeError} | |
* @see localStorage | |
* @function | |
*/ | |
if (hasGM.setValue === false) { | |
GM_setValue = function(name, value) { | |
switch (typeof value) { | |
case 'string': | |
case 'number': | |
case 'boolean': | |
break; | |
default: | |
throw new TypeError(); | |
} | |
value = (typeof value)[0] + value; | |
localStorage.setItem(name, value); | |
}; | |
} | |
/** | |
* GM_getValue | |
* @param {String} key storage key | |
* @param {Object} [defaultValue] any Object | |
* @returns {Object} | |
* @see localStorage | |
* @function | |
*/ | |
if (hasGM.getValue === false) { | |
GM_getValue = function(key, defaultValue) { | |
var value = localStorage.getItem(key); | |
if (!value) { | |
return defaultValue; | |
} | |
var type = value[0]; | |
value = value.substring(1); | |
switch (type) { | |
case 'b': | |
return value == 'true'; | |
case 'n': | |
return Number(value); | |
default: | |
return value; | |
} | |
}; | |
} | |
/** | |
* GM_deleteValue | |
* @param {String} key storage key | |
* @see localStorage | |
* @function | |
*/ | |
if (hasGM.deleteValue === false) { | |
GM_deleteValue = function(key) { | |
localStorage.removeItem(key); | |
}; | |
} | |
/** | |
* GM_listValues | |
* @returns {Array} | |
* @see localStorage | |
* @function | |
*/ | |
if (hasGM.listValues === false) { | |
GM_listValues = function() { | |
var len = localStorage.length; | |
var res = []; | |
var key = ''; | |
for ( var i = 0; i < len; i++) { | |
key = localStorage.key(i); | |
res[key] = key; | |
} | |
return res; | |
}; | |
} | |
/** | |
* GM_log | |
* @param {Object} message any Object | |
* @function | |
* @see console | |
*/ | |
if (hasGM.log === false) { | |
GM_log = function(message) { | |
if (typeof console === 'object' && Object.prototype.hasOwnProperty.call(console, 'log')) { | |
console.log(message); | |
} | |
else if (typeof opera == 'object' && Object.prototype.hasOwnProperty.call(opera, 'postError')) { | |
opera.postError(message); | |
} | |
else { | |
window.alert(message); | |
} | |
}; | |
} | |
/** | |
* GM_xmlhttpRequest | |
* @param requestParam Object request parameter settings | |
* @param requestParam.url request url string | |
* @param [requestParam.method="GET"] request method. default is GET | |
* @param [requestParam.data] request data | |
* @param [requestParam.headers] request headers object | |
* @param [requestParam.onload] request complite event handler | |
* @param [requestParam.onerror] request error event handler | |
* @param [requestParam.onreadystatechange] request readystatechange event handler | |
* @returns {XMLHttpRequest} | |
*/ | |
if (hasGM.xmlhttpRequest === false) { | |
GM_xmlhttpRequest = function(requestParam) { | |
var xhr; | |
if (typeof XMLHttpRequest == 'function') { | |
xhr = XMLHttpRequest; | |
} | |
else { | |
return null; | |
} | |
var req = new xhr(); | |
[ | |
'onload', 'onerror', 'onreadystatechange' | |
].forEach(function(event) { | |
if ((event in requestParam) == false) { | |
return; | |
} | |
req[event] = function() { | |
var isComplete = (req.readyState == 4); | |
var responseState = { | |
responseText : req.responseText, | |
readyState : req.readyState, | |
responseHeaders : isComplete ? req.getAllResponseHeaders() : '', | |
status : isComplete ? req.status : 0, | |
statusText : isComplete ? req.statusText : '', | |
finalUrl : isComplete ? requestParam.url : '' | |
}; | |
requestParam[event](responseState); | |
}; | |
}); | |
try { | |
req.open(requestParam.method ? requestParam.method : 'GET', requestParam.url, true); | |
} | |
catch (e) { | |
if (requestParam.onerror) { | |
requestParam.onerror({ | |
readyState : 4, | |
responseHeaders : '', | |
responseText : '', | |
status : 403, | |
statusText : 'Forbidden', | |
finalUrl : '' | |
}); | |
} | |
return null; | |
} | |
if ('headers' in requestParam && typeof requestParam.headers == 'object') { | |
for ( var name in requestParam.headers) { | |
req.setRequestHeader(name, requestParam.headers[name]); | |
} | |
} | |
req.send(('data' in requestParam) ? requestParam.data : null); | |
return req; | |
}; | |
} | |
} | |
} | |
//faraway 8.右クリック拡張のソース(b3rclick.user.js)終了 | |
//----------------------------------------- | |
// 同盟レベル画面改善ツール | |
//----------------------------------------- | |
function disp_alliancelevel() { | |
if(location.pathname != "/alliance/level.php") return; | |
/* レベル/人数/寄付総額/最大人数/必要寄付額/次レベル最大人数 */ | |
cl=document.getElementsByClassName('contents'); | |
np=parseInt(cl[4].innerHTML)-parseInt(cl[2].innerHTML); | |
cl[1].innerHTML+=' <span style="color:red">(空き枠:'+(parseInt(cl[3].innerHTML)-parseInt(cl[1].innerHTML))+')</span>'; | |
cl[2].innerHTML+=' <br><span style="color:red">(次まで:'+(np)+'/1人あたり:'+Math.round(np/parseInt(cl[1].innerHTML))+')</span>'; | |
cl[3].innerHTML+=' <span style="color:red">(次で+'+(parseInt(cl[5].innerHTML)-parseInt(cl[3].innerHTML))+')</span>'; | |
} | |
//-------------------------------- | |
// ミス防止補助ツール | |
//-------------------------------- | |
function disp_mistakeprevention() { | |
if (location.pathname != "/facility/facility.php" && location.pathname != "/facility/castle_send_troop.php") return; | |
var chkScout='unit_value[310]'; | |
var msgScout='斥候'; | |
var chkScoutCavalry='unit_value[311]'; | |
var msgScoutCavalry='斥候騎兵'; | |
var chkFight='fighting_units'; | |
var dispatchOfTroops='btn_send'; | |
var soldierType=Array('infantry_count','spear_count','archer_count','cavalry_count','halbert_count','crossbow_count','cavalry_guards_count','scout_count','cavalry_scout_count','ram_count','catapult_count'); | |
var StatusTable='status_table'; | |
// 斥候が作成できるか判定 | |
sc=document.getElementById(chkScout); | |
if (sc) { | |
sc.style.backgroundColor='#ecc'; | |
sc.style.textAlign='center'; | |
sc.style.width='8em'; | |
sc.value=msgScout; | |
sc.select(); | |
} | |
// 斥候騎兵が作成できるか判定 | |
sc=document.getElementById(chkScoutCavalry); | |
if (sc) { | |
sc.style.backgroundColor='#ecc'; | |
sc.style.textAlign='center'; | |
sc.style.width='8em'; | |
sc.value=msgScoutCavalry; | |
sc.select(); | |
} | |
// 出兵画面か判定 | |
if (document.getElementsByClassName(chkFight).length>0) { | |
var soldiers=''; | |
var smodecls=''; | |
var smodetxt=''; | |
// suport:援軍 | |
// fight:賊討伐・殲滅戦 | |
// forceattack:強襲 | |
// spy:偵察 | |
smode=document.getElementsByClassName('suport'); | |
if (smode.length>0) { | |
smodetxt=smode[0].innerHTML.replace(/<sp.*an>/,''); | |
} | |
smode=document.getElementsByClassName('fight'); | |
if (smode.length>0) { | |
smodetxt=smode[0].innerHTML.replace(/<sp.*an>/,''); | |
} | |
smode=document.getElementsByClassName('forceattack'); | |
if (smode.length>0) { | |
smodetxt=smode[0].innerHTML.replace(/<sp.*an>/,''); | |
} | |
smode=document.getElementsByClassName('spy'); | |
if (smode.length>0) { | |
smodetxt=smode[0].innerHTML.replace(/<sp.*an>/,''); | |
} | |
areaplus=document.getElementsByClassName('controlArea'); | |
if (areaplus.length>0) { | |
areaplus[0].innerHTML+=' <span style="text-align:center;margin-left:1em;padding:3px 5px;font-weight:bold;background-color:#fc0">'+smodetxt+'<\/span>'; | |
} | |
for (lp=0;lp<soldierType.length;lp++) { | |
soldierels=document.getElementsByName(soldierType[lp]); | |
soldiers+=soldierels[0].value; | |
} | |
el=document.getElementById(dispatchOfTroops); | |
el.title=smodetxt; | |
if (soldiers=='') { | |
el.value='出兵(武将単騎)'; | |
el.style.color='#f00'; | |
el.style.backgroundColor='#ff0'; | |
} | |
//援軍判定 | |
html=document.getElementsByClassName('fightingpower'); | |
if (html[0].innerHTML.indexOf('援軍部隊戦力',0)>-1) { | |
el.value=(soldiers=='')?'出兵(単騎援軍)':'出兵(援軍)'; | |
el.style.color='#fff'; | |
el.style.backgroundColor=(soldiers=='')?'#009':'#363'; | |
} | |
} | |
//ステータス強化画面 | |
st=document.getElementById(StatusTable); | |
if (st) { | |
st.style.width='500px'; | |
} | |
// 鯖を表示 | |
sn=document.getElementById('worldtime'); | |
str=sn.innerHTML; | |
pp=str.indexOf('ワールド'); | |
str=str.substring(0,pp); | |
str=str.match('[0-9]*$'); | |
document.title='['+str+']'+document.title; | |
} | |
//faraway 10.ミス防止補助ツールのソース(3594warning.user.js)終了 | |
//------------------------------------ | |
// 書簡送信アシスタント | |
//------------------------------------ | |
function disp_lettertransmission() { | |
if (location.pathname != "/message/new.php" && location.pathname != "/false/login_sessionout.php" | |
&& location.pathname != "/message/outbox.php") return; | |
//操作ボックスの表示リンク追加 | |
addOpenLinkHtml_11(); | |
//通常の送信時に書簡をバックアップする。 | |
document.forms[0].elements[5].addEventListener("click", function(){ SubjectSave();BodySave();}, false); | |
//送信状況の取得 | |
var Send_Flg = GM_getValue(HOST + PGNAME + "Send_Flg", SENDTFLG_NEW); | |
GM_log("Main() Send_Flg=" + Send_Flg); | |
//プレビュー時 | |
if (Send_Flg == SENDTFLG_PRE) { | |
openSupportBox(); | |
var objtextTo = document.getElementsByName("to"); | |
if (objtextTo[0].type == "hidden"){ | |
GM_setValue(HOST + PGNAME + "Send_Flg", SENDTFLG_END); | |
var tid=setTimeout(function(){btn=document.getElementById("btn_send");btn.disabled=true;setHiddenValue(btn);btn.form.submit();},INTERVAL); | |
}else{ | |
GM_setValue(HOST + PGNAME + "Send_Flg", SENDTFLG_NEW); | |
alert("送信しようとしましたが、エラーで出来ませんでした。"); | |
return; | |
} | |
} | |
//送信終了時(送信履歴) | |
if (Send_Flg == SENDTFLG_END) { | |
GM_setValue(HOST + PGNAME + "Send_Flg", SENDTFLG_CON); | |
var tid=setTimeout(function(){location.href = "/message/new.php#ptop";},INTERVAL); | |
} | |
//連続送信中(新規作成画面) | |
if (Send_Flg == SENDTFLG_CON) { | |
OneAddressFlgDel(); | |
openSupportBox(); | |
//次の送信があるかチェック | |
if(SendConti()){ | |
GM_setValue(HOST + PGNAME + "Send_Flg", SENDTFLG_PRE); | |
var tid=setTimeout(function(){document.forms[0].elements[5].click();},INTERVAL); | |
} | |
} | |
//セッションタイムアウト画面 | |
if (location.pathname == "/false/login_sessionout.php") { | |
if (Send_Flg != SENDTFLG_NEW) { | |
alert("送信途中でセッションタイムアウトになりました。\n書簡の送信履歴でどこまで送信されているかチェックし\n再度送信してください。"); | |
GM_setValue(HOST + PGNAME + "Send_Flg", SENDTFLG_NEW); | |
} | |
} | |
} | |
//送信したアドレスのフラグを消す。 | |
function OneAddressFlgDel(){ | |
var arrylist = GetSendAddress(); | |
var arrynewlist =""; | |
var SendFLg = true; | |
for (var i=0; i < ADDRESSCNT; i++){ | |
if (arrylist[i] != undefined) { | |
if (arrylist[i] != "") { | |
GM_log("OneAddressFlgDel() SendFLg=" + SendFLg); | |
if (arrylist[i].split(DELIMIT2_11)[2] == 1 && SendFLg == true){ | |
GM_log("OneAddressFlgDel() if SendFLg=" + SendFLg); | |
arrynewlist += arrylist[i].split(DELIMIT2_11)[0] + DELIMIT2_11; | |
arrynewlist += arrylist[i].split(DELIMIT2_11)[1] + DELIMIT2_11; | |
arrynewlist += "0" + DELIMIT_11; | |
SendFLg = false; | |
}else{ | |
GM_log("OneAddressFlgDel() else SendFLg=" + SendFLg); | |
arrynewlist += arrylist[i].split(DELIMIT2_11)[0] + DELIMIT2_11; | |
arrynewlist += arrylist[i].split(DELIMIT2_11)[1] + DELIMIT2_11; | |
arrynewlist += arrylist[i].split(DELIMIT2_11)[2] + DELIMIT_11; | |
} | |
} | |
} | |
} | |
GM_log("OneAddressFlgDel() arrynewlist=" + arrynewlist); | |
GM_setValue(HOST + PGNAME + "addresslist", arrynewlist); | |
} | |
//送信開始 | |
function SendConti(){ | |
//アドレスチェック | |
var chkret = AdressCheck(); | |
if (chkret == false){ | |
GM_setValue(HOST + PGNAME + "Send_Flg", SENDTFLG_NEW); | |
alert("送信が完了しました。\n送信履歴で送信されてるか確認してください。"); | |
var tid=setTimeout(function(){location.href = "/message/outbox.php";},0); | |
return false; | |
} | |
//送信内容の読込み | |
SubjectLoad(); | |
BodyLoad(); | |
//送信先のチェック保存 | |
var arrylist = GetSendAddress(); | |
var arryflg = new Array(); | |
for (var i = 0; i < ADDRESSCNT; i++) { | |
var objChk = document.getElementById("chk" + i); | |
arryflg[i] = false; | |
if(objChk.checked == true){ | |
arryflg[i] = true; | |
} | |
} | |
GM_log("SendConti() arryflg=" + arryflg); | |
ChkSendAddress(arryflg); | |
var ret = SetSendAddress(); | |
return true; | |
} | |
//リンクHTML追加 | |
function addOpenLinkHtml_11() { | |
var menu = d_11.evaluate('//*[@id="statMenu"]',d_11, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
if (menu.snapshotLength == 0){GM_log("bro3_send_mail_supporter: htmlが変わってます。判る人は170行目付近のソースを書き換えてください。");return;} | |
var newmenu = d_11.createElement("li"); | |
newmenu.className = "last"; | |
//メニューリンク | |
var openLink = document.createElement("a"); | |
openLink.id = "AutoMoveLink"; | |
openLink.href = "javascript:void(0);"; | |
openLink.innerHTML = " 書簡送信サポート "; | |
openLink.addEventListener("click", function() {openSupportBox()}, true); | |
newmenu.appendChild(openLink); | |
menu.snapshotItem(0).appendChild(newmenu); | |
} | |
//ベースフォームを開く | |
function openSupportBox() { | |
closeSupportBox(); | |
addSupportHtml(); | |
} | |
//ベースフォームを閉じる | |
function closeSupportBox() { | |
deleteSupportHtml(); | |
closeSupportAddressBox(); | |
} | |
//ベースフォーム表示HTML削除 | |
function deleteSupportHtml() { | |
var elem = document.getElementById("SuppContainer"); | |
if (elem == undefined) return; | |
document.body.removeChild(document.getElementById("SuppContainer")); | |
} | |
//宛先追加フォームを開く | |
function openSupportAddressBox() { | |
closeSupportAddressBox(); | |
addSupport_AddressHtml(); | |
} | |
//宛先追加フォームを閉じる | |
function closeSupportAddressBox() { | |
deleteSupportAddressHtml(); | |
} | |
//宛先追加HTML削除 | |
function deleteSupportAddressHtml() { | |
var elem = document.getElementById("SuppAddresContainer"); | |
if (elem == undefined) return; | |
document.body.removeChild(document.getElementById("SuppAddresContainer")); | |
} | |
//ベースフォーム表示HTML追加 | |
function addSupportHtml() { | |
var popupLeft = GM_getValue(HOST + "popup_Suppleft", 0); | |
var popupTop = GM_getValue(HOST + "popup_Supptop", 0); | |
if (popupLeft < 0) popupLeft = 0; | |
if (popupTop < 0) popupTop = 0; | |
//表示コンテナ作成 | |
var SuppContainer = document.createElement("div"); | |
SuppContainer.id = "SuppContainer"; | |
SuppContainer.style.position = "absolute"; | |
SuppContainer.style.backgroundColor = "darkgray"; | |
SuppContainer.style.border = "outset 2px darkgray"; | |
SuppContainer.style.left = popupLeft + "px"; | |
SuppContainer.style.top = popupTop + "px"; | |
SuppContainer.style.fontSize = "10px"; | |
SuppContainer.style.padding = "3px"; | |
SuppContainer.style.zIndex = 8001; | |
document.body.appendChild(SuppContainer); | |
//閉じるリンク | |
var closeLink = document.createElement("a"); | |
closeLink.id = "timerCloseLink"; | |
closeLink.href = "javascript:void(0);"; | |
closeLink.style.margin = "3px"; | |
closeLink.innerHTML = "閉じる"; | |
closeLink.addEventListener("click", function() {closeSupportBox()}, true); | |
SuppContainer.appendChild(closeLink); | |
//バージョン | |
var version = document.createElement("span"); | |
version.style.fontSize = "9px"; | |
version.style.margin = "3px"; | |
version.innerHTML = "Ver." + VERSION_11; | |
SuppContainer.appendChild(version); | |
//入力項目の作成 | |
var table = document.createElement("div"); | |
table.innerHTML = "\ | |
<table width='930' border='1' cellspacing='0' cellpadding='10'>\ | |
<tr>\ | |
<td colspan='6' style='text-align:center' width='750'>宛先</td>\ | |
<td style='text-align:center' width='180'>件名</td>\ | |
</tr>\ | |
<tr>\ | |
<td rowspan='3' width='125'>\ | |
<input id='chk0' type='checkbox' /><span id='chk_name0'></span><br />\ | |
<input id='chk1' type='checkbox' /><span id='chk_name1'></span><br />\ | |
<input id='chk2' type='checkbox' /><span id='chk_name2'></span><br />\ | |
<input id='chk3' type='checkbox' /><span id='chk_name3'></span><br />\ | |
<input id='chk4' type='checkbox' /><span id='chk_name4'></span><br />\ | |
<input id='chk5' type='checkbox' /><span id='chk_name5'></span>\ | |
</td>\ | |
<td rowspan='3' width='125'>\ | |
<input id='chk6' type='checkbox' /><span id='chk_name6' /><br />\ | |
<input id='chk7' type='checkbox' /><span id='chk_name7' /><br />\ | |
<input id='chk8' type='checkbox' /><span id='chk_name8' /><br />\ | |
<input id='chk9' type='checkbox' /><span id='chk_name9' /><br />\ | |
<input id='chk10' type='checkbox' /><span id='chk_name10' /><br />\ | |
<input id='chk11' type='checkbox' /><span id='chk_name11' />\ | |
</td>\ | |
<td rowspan='3' width='125'>\ | |
<input id='chk12' type='checkbox' /><span id='chk_name12'></span><br />\ | |
<input id='chk13' type='checkbox' /><span id='chk_name13'></span><br />\ | |
<input id='chk14' type='checkbox' /><span id='chk_name14'></span><br />\ | |
<input id='chk15' type='checkbox' /><span id='chk_name15'></span><br />\ | |
<input id='chk16' type='checkbox' /><span id='chk_name16'></span><br />\ | |
<input id='chk17' type='checkbox' /><span id='chk_name17'></span>\ | |
</td>\ | |
<td rowspan='3' width='125'>\ | |
<input id='chk18' type='checkbox' /><span id='chk_name18'></span><br />\ | |
<input id='chk19' type='checkbox' /><span id='chk_name19'></span><br />\ | |
<input id='chk20' type='checkbox' /><span id='chk_name20'></span><br />\ | |
<input id='chk21' type='checkbox' /><span id='chk_name21'></span><br />\ | |
<input id='chk22' type='checkbox' /><span id='chk_name22'></span><br />\ | |
<input id='chk23' type='checkbox' /><span id='chk_name23'></span>\ | |
</td>\ | |
<td rowspan='3' width='125'>\ | |
<input id='chk24' type='checkbox' /><span id='chk_name24'></span><br />\ | |
<input id='chk25' type='checkbox' /><span id='chk_name25'></span><br />\ | |
<input id='chk26' type='checkbox' /><span id='chk_name26'></span><br />\ | |
<input id='chk27' type='checkbox' /><span id='chk_name27'></span><br />\ | |
<input id='chk28' type='checkbox' /><span id='chk_name28'></span><br />\ | |
<input id='chk29' type='checkbox' /><span id='chk_name29'></span>\ | |
</td>\ | |
<td rowspan='3' width='125'>\ | |
<input id='chk30' type='checkbox' /><span id='chk_name30'></span><br />\ | |
<input id='chk31' type='checkbox' /><span id='chk_name31'></span><br />\ | |
<input id='chk32' type='checkbox' /><span id='chk_name32'></span><br />\ | |
<input id='chk33' type='checkbox' /><span id='chk_name33'></span><br />\ | |
<input id='chk34' type='checkbox' /><span id='chk_name34'></span><br />\ | |
<input id='chk35' type='checkbox' /><span id='chk_name35'></span>\ | |
</td>\ | |
<td style='text-align:center'>\ | |
<input id='btn_mail_getSubject' type='button' value='件名保存' />\ | |
<input id='btn_mail_setSubject' type='button' value='件名読込' />\ | |
<input id='btn_mail_preSubject' type='button' value='保存中の件名表示' />\ | |
</td>\ | |
</tr>\ | |
<tr>\ | |
<td style='text-align:center'>本文(@@@name@@@=正式名称に置換)</td>\ | |
</tr>\ | |
<tr>\ | |
<td style='text-align:center'>\ | |
<input id='btn_mail_getBody' type='button' value='本文保存' />\ | |
<input id='btn_mail_setBody' type='button' value='本文読込' />\ | |
<input id='btn_mail_preBody' type='button' value='保存中の本文表示' />\ | |
</td>\ | |
</tr>\ | |
<tr>\ | |
<td colspan='6' style='text-align:center'>\ | |
<input id='btn_mail_add_list' type='button' value='宛先追加' />\ | |
<input id='btn_mail_del_list' type='button' value='宛先削除' /> \ | |
<input id='btn_Adress_checkALL' type='button' value='CheckALL' /> \ | |
<input id='btn_send_start' type='button' value='送信開始' /></td>\ | |
<td style='text-align:center'><input id='btn_cls_sub_body' type='button' value='保存件名・本文削除' /></td>\ | |
</tr>\ | |
</table>"; | |
SuppContainer.appendChild(table); | |
var arrylist = GetSendAddress(); | |
var ad = new Array(); | |
for (var i = 0; i < ADDRESSCNT; i++) { | |
if (arrylist[i] !=undefined){ | |
if (arrylist[i] != "") { | |
ad = arrylist[i].split(DELIMIT2_11); | |
var chk_name = document.getElementById("chk_name" + i); | |
chk_name.innerHTML = ad[0] + chk_name.innerHTML; | |
if (ad[2] != 0) { | |
var chkbox = document.getElementById("chk" + i); | |
chkbox.checked = true; | |
} | |
}else{ | |
var chkbox = document.getElementById("chk" + i); | |
chkbox.disabled = true; | |
} | |
}else{ | |
var chkbox = document.getElementById("chk" + i); | |
chkbox.disabled = true; | |
} | |
} | |
//件名○○ボタンへのイベント登録 | |
document.getElementById('btn_mail_getSubject').addEventListener("click",function() { SubjectSave(); }, true); | |
document.getElementById('btn_mail_setSubject').addEventListener("click",function() { SubjectLoad(); }, true); | |
document.getElementById('btn_mail_preSubject').addEventListener("click",function() { SubjectPreview(); }, true); | |
//本文○○ボタンへのイベント登録 | |
document.getElementById('btn_mail_getBody').addEventListener("click",function() { BodySave(); }, true); | |
document.getElementById('btn_mail_setBody').addEventListener("click",function() { BodyLoad(); }, true); | |
document.getElementById('btn_mail_preBody').addEventListener("click",function() { BodyPreview(); }, true); | |
//保存件名・本文削除 | |
document.getElementById('btn_cls_sub_body').addEventListener("click",function() { Cls_Sub_Body(); }, true); | |
//宛先○○ボタンへのイベント登録 | |
document.getElementById('btn_mail_add_list').addEventListener("click",function() { openSupportAddressBox(); }, true); | |
document.getElementById('btn_mail_del_list').addEventListener("click",function() { DellSupportAddress(); }, true); | |
//アドレス全部へのチェック | |
document.getElementById('btn_Adress_checkALL').addEventListener("click",function() { Adress_checkALL(); }, true); | |
//送信開始ボタンへのイベント登録 | |
document.getElementById('btn_send_start').addEventListener("click",function() { SendStert(); }, true); | |
} | |
function Adress_checkALL(){ | |
for (var i = 0; i < ADDRESSCNT; i++) { | |
var objChk = document.getElementById("chk" + i); | |
if (objChk.disabled != true){ | |
if (objChk.checked != true){ | |
objChk.checked = true; | |
}else{ | |
objChk.checked = false; | |
} | |
} | |
} | |
} | |
//送信開始 | |
function SendStert(){ | |
//アドレスチェック | |
var chkret = AdressCheck(); | |
if (chkret == false){ | |
alert("送信先をチェックしてください。\n下のフォームの送信先に入力されても送信されません。"); | |
return; | |
} | |
//入力チェック | |
var objtextsub = document.getElementsByName("subject"); | |
var objtextbody = document.getElementsByName("body"); | |
if (objtextsub[0].value == "" || objtextbody[0].value == "") { | |
alert("件名・本文ともに入力してください。"); | |
return; | |
} | |
var ret = confirm("件名&本文を保存し、送信を開始します。"); | |
if (ret == true) { | |
//送信内容の保存 | |
SubjectSave(); | |
BodySave(); | |
//送信先のチェック保存 | |
var arrylist = GetSendAddress(); | |
var arryflg = new Array(); | |
for (var i = 0; i < ADDRESSCNT; i++) { | |
var objChk = document.getElementById("chk" + i); | |
arryflg[i] = false; | |
if(objChk.checked == true){ | |
arryflg[i] = true; | |
} | |
} | |
ChkSendAddress(arryflg); | |
} | |
var ret = SetSendAddress(); | |
GM_setValue(HOST + PGNAME + "Send_Flg", SENDTFLG_PRE); | |
document.forms[0].elements[5].click(); | |
} | |
//宛先アドレスへフラグのセット | |
function ChkSendAddress(arryflg) { | |
var arrylist = GetSendAddress(); | |
var arrynewlist =""; | |
for (var i=0; i < ADDRESSCNT; i++){ | |
if (arryflg[i] == false){ | |
if (arrylist[i] != undefined) { | |
if (arrylist[i] != "") { | |
arrynewlist += arrylist[i].split(DELIMIT2_11)[0] + DELIMIT2_11; | |
arrynewlist += arrylist[i].split(DELIMIT2_11)[1] + DELIMIT2_11; | |
arrynewlist += "0" + DELIMIT_11; | |
} | |
} | |
}else{ | |
if (arrylist[i] != undefined) { | |
if (arrylist[i] != "") { | |
arrynewlist += arrylist[i].split(DELIMIT2_11)[0] + DELIMIT2_11; | |
arrynewlist += arrylist[i].split(DELIMIT2_11)[1] + DELIMIT2_11; | |
arrynewlist += "1" + DELIMIT_11; //送信フラグのセット | |
} | |
} | |
} | |
} | |
GM_setValue(HOST + PGNAME + "addresslist", arrynewlist); | |
} | |
//送信先がチェックされているかどうか | |
function AdressCheck() { | |
for (var i = 0; i < ADDRESSCNT; i++) { | |
var objChk = document.getElementById("chk" + i); | |
if(objChk.checked == true){ | |
return true; | |
} | |
} | |
return false; | |
} | |
//送信アドレスのセット 返値 true=送信可能 false=送信リスト終了 | |
function SetSendAddress(){ | |
var arrylist = GetSendAddress(); | |
for (var i = 0; i < ADDRESSCNT; i++){ | |
GM_log("Main() arrylist[i]=" + arrylist[i]); | |
if (arrylist[i] != undefined) { | |
if (arrylist[i] != "") { | |
if (arrylist[i].split(DELIMIT2_11)[2] == 1){ | |
var objtextTo = document.getElementsByName("to"); | |
objtextTo[0].value = arrylist[i].split(DELIMIT2_11)[0]; | |
var objtextBody = document.getElementsByName("body"); | |
objtextBody[0].value = objtextBody[0].value.replace("@@@name@@@", arrylist[i].split(DELIMIT2_11)[1]); | |
return true; | |
} | |
} | |
} | |
} | |
return false; | |
} | |
//宛先追加フォームHTML追加 | |
function addSupport_AddressHtml() { | |
var arrylist = GetSendAddress(); | |
if (arrylist[0] != undefined){ | |
if (arrylist.length == ADDRESSCNT+1){ | |
alert("これ以上追加できません。"); | |
return; | |
} | |
} | |
var popupLeft = GM_getValue(HOST + "popup_SuppAdleft", 150); | |
var popupTop = GM_getValue(HOST + "popup_SuppAdtop", 150); | |
if (popupLeft < 0) popupLeft = 0; | |
if (popupTop < 0) popupTop = 0; | |
//表示コンテナ作成 | |
var SuppContainer = document.createElement("div"); | |
SuppContainer.id = "SuppAddresContainer"; | |
SuppContainer.style.position = "absolute"; | |
SuppContainer.style.backgroundColor = "darkgray"; | |
SuppContainer.style.border = "outset 2px darkgray"; | |
SuppContainer.style.left = popupLeft + "px"; | |
SuppContainer.style.top = popupTop + "px"; | |
SuppContainer.style.fontSize = "10px"; | |
SuppContainer.style.padding = "3px"; | |
SuppContainer.style.zIndex = 253; | |
document.body.appendChild(SuppContainer); | |
//入力項目の作成 | |
var table = document.createElement("div"); | |
table.innerHTML = "\ | |
<table border='1' cellspacing='1' cellpadding='10'>\ | |
<tr>\ | |
<td>\ | |
宛先の追加 ※@は<font color='red'>半角</font>でお願いします。※<br />\ | |
※宛先名@@@正式名称(nottisan@@@呉越同舟 支部担当 nottisan様)<br />\ | |
</td>\ | |
</tr>\ | |
<tr>\ | |
<td>\ | |
<input id='inAddress' type='text' value='' size='65' /><br />\ | |
</td>\ | |
</tr>\ | |
<tr>\ | |
<td style='text-align:center'>\ | |
<input id='btn_add_ad' type='button' value='宛先保存' />\ | |
<input id='btn_add_ad_close' type='button' value='閉じる' />\ | |
</td>\ | |
</tr>\ | |
</table>"; | |
SuppContainer.appendChild(table); | |
//ボタンへのイベント登録 | |
document.getElementById('btn_add_ad').addEventListener("click",function() { SaveAddress(); }, true); | |
document.getElementById('btn_add_ad_close').addEventListener("click",function() { closeSupportAddressBox(); }, true); | |
} | |
//宛先の削除&保存、基本フォームのリフレッシュ | |
function DellSupportAddress() { | |
var arrylist = GetSendAddress(); | |
var arryflg = new Array(); | |
for (var i = 0; i < ADDRESSCNT; i++) { | |
var objChk = document.getElementById("chk" + i); | |
arryflg[i] = false; | |
if(objChk.checked == true){ | |
var ret = confirm(arrylist[i].split(DELIMIT2_11)[0] + "を削除します。"); | |
if (ret == true) arryflg[i] = true; | |
} | |
} | |
DelSendAddress(arryflg); | |
openSupportBox(); | |
} | |
//宛先アドレスの削除 | |
function DelSendAddress(arryflg) { | |
var arrylist = GetSendAddress(); | |
var arrynewlist ="" | |
for (var i=0; i < ADDRESSCNT; i++){ | |
if (arryflg[i] == false){ | |
if (arrylist[i] != undefined) { | |
if (arrylist[i] != "") { | |
arrynewlist += arrylist[i] + DELIMIT_11; | |
} | |
} | |
} | |
} | |
GM_setValue(HOST + PGNAME + "addresslist", arrynewlist); | |
} | |
//宛先の保存後、基本フォームのリフレッシュ | |
function SaveAddress() { | |
var inAddress = document.getElementById('inAddress').value; | |
if (inAddress.split("@@@").length < 1){ | |
alert("書式通りに入力してください。"); | |
return; | |
} | |
if (inAddress.length == 0){ | |
alert("宛先を入力してください。"); | |
return; | |
} | |
inAddress = inAddress.replace("@@@",DELIMIT2_11) + DELIMIT2_11 + "0"; | |
var addreslist = GM_getValue(HOST + PGNAME + "addresslist", ""); | |
addreslist += inAddress + DELIMIT_11; | |
GM_setValue(HOST + PGNAME + "addresslist", addreslist); | |
openSupportBox(); | |
openSupportAddressBox(); | |
} | |
//件名保存 | |
function SubjectSave() { | |
var objtextsub = document.getElementsByName("subject"); | |
var textsub = objtextsub[0].value; | |
GM_setValue(HOST + PGNAME + "SendSubject", textsub); | |
} | |
//件名読込み | |
function SubjectLoad() { | |
var textsub = GM_getValue(HOST + PGNAME + "SendSubject", ""); | |
var objtextsub = document.getElementsByName("subject"); | |
objtextsub[0].value = textsub; | |
} | |
//件名プレビュー | |
function SubjectPreview() { | |
var textsub = GM_getValue(HOST + PGNAME + "SendSubject", ""); | |
alert(textsub); | |
} | |
//本文保存 | |
function BodySave() { | |
var objtextbody = document.getElementsByName("body"); | |
var textbody = objtextbody[0].value; | |
GM_setValue(HOST + PGNAME + "SendBody", textbody); | |
} | |
//本文読込み | |
function BodyLoad() { | |
var textbody = GM_getValue(HOST + PGNAME + "SendBody", ""); | |
var objtextbody = document.getElementsByName("body"); | |
objtextbody[0].value = textbody; | |
} | |
//本文プレビュー | |
function BodyPreview() { | |
var textbody = GM_getValue(HOST + PGNAME + "SendBody", ""); | |
alert(textbody); | |
} | |
//件名・本文保存の削除 | |
function Cls_Sub_Body() { | |
GM_setValue(HOST + PGNAME + "SendSubject", ""); | |
GM_setValue(HOST + PGNAME + "SendBody", ""); | |
} | |
//アドレスの取得(名前) | |
function GetSendAddress(){ | |
var addreslist = GM_getValue(HOST + PGNAME + "addresslist", ""); | |
if (addreslist.length < 1 ) return ""; | |
var ArryList = new Array(); | |
ArryList = addreslist.split(DELIMIT_11); | |
return ArryList; | |
} | |
//デリミタ区切り文字列生成 | |
function genDelimitString_11(dataArray, delimiter) { | |
var ret = ""; | |
for (var i=0; i < dataArray.length; i++) { | |
if (dataArray[i] != undefined) ret += dataArray[i]; | |
if (i < dataArray.length-1) ret += delimiter; | |
} | |
return ret; | |
} | |
//デリミタ区切りアドレス文字列生成(宛先:dataArray,正式名称:dataArray2,チェックフラグ:dataArray3, delimiter | |
function genDelimitString_Adoress(dataArray,dataArray2,dataArray3, delimiter) { | |
var ret = ""; | |
for (var i=0; i < dataArray.length; i++) { | |
if (dataArray[i] != undefined) ret += dataArray[i]; | |
if (i < dataArray.length-1) ret += delimiter; | |
} | |
return ret; | |
} | |
function setHiddenValue(a){ | |
if(a.name){hid=document.createElement("input"); | |
hid.type="hidden"; | |
hid.name=a.name; | |
hid.value=a.value; | |
a.form.appendChild(hid); | |
}} | |
//faraway 11.書簡送信アシスタントのソース(bro3_Send_Mail_Supporter.user.js)終了 | |
//--------------------------------------- | |
// 書簡同胞リンク | |
//--------------------------------------- | |
function disp_letterbroadcast() { | |
if (location.pathname != "/message/new.php" ) return; | |
var sendTd = xpath('//*[@id="gray02Wrapper"]//table[@class="commonTables"]//tr/td', document); | |
var ar = GM_getValue(location.hostname + "CCALLY"); | |
var ALLY = new Array(); | |
if(ar == undefined){ | |
for(var i=0;i<num_12;i++){ | |
ALLY[i] = ""; | |
} | |
}else{ | |
ALLY = ar.split("#$%") | |
} | |
var ccLnk = new Array(); | |
var bar = document.createElement("ul"); | |
bar.id = "statMenu"; | |
for(var i=0;i<num_12;i++){ | |
ccLnk[i] = document.createElement("li"); | |
ccLnk[i].innerHTML = ALLY[i]; | |
(function(){ | |
var n = i; | |
ccLnk[i].addEventListener("click", function(){ccSet_12(n);}, true); | |
})(); | |
bar.appendChild(ccLnk[i]); | |
} | |
var opt = document.createElement("li"); | |
opt.className = "last"; | |
opt.innerHTML = "設定画面"; | |
opt.addEventListener("click", optMenu, true); | |
bar.appendChild(opt); | |
sendTd.snapshotItem(0).appendChild(bar); | |
} | |
function xpath(query,targetDoc) {return document.evaluate(query, targetDoc, null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);} | |
function ccSet_12(i){//faraway110606 ccSet()->ccSet_12() 14.トレード検索条件記憶と重複していた為、ユニークな名前に変更 | |
var input = xpath('//*[@id="gray02Wrapper"]//table[@class="commonTables"]//tr/td/input', document); | |
var NAME = GM_getValue(location.hostname + "CCNAME").split("#$%"); | |
input.snapshotItem(0).value = NAME[i]; | |
} | |
function optMenu(){ | |
var wrap = xpath('//*[@id="gray02Wrapper"]',document); | |
for(var i=wrap.snapshotItem(0).childNodes.length;i>0;i--){ | |
wrap.snapshotItem(0).removeChild(wrap.snapshotItem(0).lastChild); | |
} | |
var table = document.createElement("table"); | |
table.className = "commonTables"; | |
var tr = document.createElement("tr"); | |
var th = document.createElement("th"); | |
th.className = "ttl3"; | |
th.innerHTML = "表示名"; | |
th2 = document.createElement("th"); | |
th2.className = "ttl4"; | |
th2.innerHTML = "送信対象者"; | |
tr.appendChild(th); | |
tr.appendChild(th2); | |
table.appendChild(tr); | |
var ALLY = new Array(); | |
var NAME = new Array(); | |
var ar = GM_getValue(location.hostname + "CCALLY"); | |
if(ar == undefined){ | |
for(var i=0;i<num_12;i++){ | |
ALLY[i] = ""; | |
} | |
}else{ | |
ALLY = ar.split("#$%") | |
} | |
var ar = GM_getValue(location.hostname + "CCNAME"); | |
if(ar == undefined){ | |
for(var i=0;i<num_12;i++){ | |
NAME[i] = ""; | |
} | |
}else{ | |
NAME = ar.split("#$%") | |
} | |
for(var i=0;i<num_12;i++){ | |
var tr = document.createElement("tr"); | |
var td = document.createElement("th"); | |
td.innerHTML = "<input type=\"text\" size=\"15\" name=\"ally" + i + "\" id=\"ally" + i + "\" style=\"border:1px solid;\" value=\"" + ALLY[i] + "\" />"; | |
td.className = "ttl"; | |
var td2 = document.createElement("th"); | |
td2.className = "ttl"; | |
td2.innerHTML = "<input type=\"text\" size=\"40\" name=\"names" + i + "\" id=\"names" + i + "\" style=\"border:1px solid;\" value=\"" + NAME[i] + "\" />"; | |
tr.appendChild(td); | |
tr.appendChild(td2); | |
table.appendChild(tr); | |
} | |
var tr = document.createElement("tr"); | |
var td = document.createElement("td"); | |
td.colSpan = 2; | |
td.align = "center"; | |
var btn = document.createElement("input"); | |
btn.type = "button"; | |
btn.value = "保存"; | |
btn.addEventListener("click", saveData, true); | |
var wrlink = document.createElement("span"); | |
wrlink.innerHTML = " | "; | |
var link = document.createElement("a"); | |
link.href = "javascript:void(0)"; | |
link.innerHTML = "戻る"; | |
link.addEventListener("click", | |
function(){ | |
location.reload(); | |
}, | |
true); | |
wrlink.appendChild(link); | |
td.appendChild(btn); | |
td.appendChild(wrlink); | |
tr.appendChild(td); | |
table.appendChild(tr); | |
wrap.snapshotItem(0).appendChild(table); | |
} | |
function saveData(){ | |
var scrALLY = ""; // save用変数 | |
var scrNAME = ""; | |
var table = xpath('//*[@id="gray02Wrapper"]/table[@class="commonTables"]',document); | |
var n = 0; | |
var len = table.snapshotItem(0).rows.length; | |
for(var i=1;i<len-1;i++){ | |
var ally = xpath('//input[@id="ally' + n + '"]',document); | |
var names = xpath('//input[@id="names' + n + '"]',document); | |
scrALLY += ally.snapshotItem(0).value; | |
scrALLY += "#$%"; | |
scrNAME += names.snapshotItem(0).value; | |
scrNAME += "#$%"; | |
n++; | |
} | |
GM_setValue(location.hostname + "CCALLY", scrALLY); | |
GM_setValue(location.hostname + "CCNAME", scrNAME); | |
alert('保存OK。多分ね。'); | |
} | |
//faraway 12.書簡同報リンクのソース(b3ccmail.user.js)終了 | |
//-------------------------------------- | |
// 書簡保存&検索ツール | |
//-------------------------------------- | |
function disp_letterpreservation() { | |
//////////////////////////////////////////////////////// | |
// ページ読み込み完了を待たない処理 | |
//////////////////////////////////////////////////////// | |
// 対象ページでない場合処理中断 | |
if (!(location.pathname == location_inboxURL || location.pathname == location_outboxURL)) { return; } | |
// 各種チェック | |
if (!pre_check()) { | |
// 確認用 | |
return; | |
} | |
function pre_check() { | |
if (!worldKey) { console.log("ワールドキー取得エラー"); return false; } | |
var time_checker = new Date().toString(); | |
GM_setValue(worldKey + "time_checker", time_checker.toSource()); | |
var res_time_checker = eval(GM_getValue(worldKey + "time_checker", "")); | |
if (time_checker != res_time_checker) { | |
console.log("GM変数の利用エラー"); | |
console.log(" :" + time_checker); | |
console.log(" :" + res_time_checker); | |
return false; | |
} | |
if (!$_13) { console.log("jquery取得エラー"); return false; } | |
return true; | |
} | |
// GM変数ロード | |
loadOpValues(); | |
loadCmValue(); | |
// ページ読み込み完了後に本処理開始 | |
window.addEventListener("load", function() { pre_main(); }, false); | |
//////////////////////////////////////////////////////// | |
// ページ読み込み完了後に起動する処理 | |
// 1.ボタン付加 | |
// 2.autoCashオプションが有効な場合、書簡キャッシュ処理を稼働。 | |
//////////////////////////////////////////////////////// | |
function pre_main() { | |
addBtnMain(); | |
if (opValues["autoCash"]) { | |
syokanCashMain(); | |
} | |
} | |
//////////////////////////////////////////////////////// | |
// ボタン付加 | |
//////////////////////////////////////////////////////// | |
function addBtnMain() { | |
var targetNode = $xp1('//ul[@id="statMenu"]', d_13); | |
var cashBtn = d_13.createElement("input"); | |
cashBtn.type = "button"; | |
cashBtn.id = "cashBtn"; | |
cashBtn.value = "【書簡保存】"; | |
cashBtn.addEventListener("click", function() { | |
cashBtn.disabled = true; | |
if (confirm("現ページに表示されている書簡情報を保存します。")) { | |
syokanCashMain(); | |
} else { | |
cashBtn.disabled = false; | |
} | |
}, false); | |
// 自動キャッシュ有効時はボタン非活性 | |
if (opValues["autoCash"]) { cashBtn.disabled = true; } | |
targetNode.appendChild(cashBtn); | |
var introBtn = d_13.createElement("input"); | |
introBtn.type = "button"; | |
introBtn.id = "introBtn"; | |
introBtn.value = "【書簡検索】"; | |
introBtn.addEventListener("click", function() { | |
cashBtn.disabled = true; | |
introBtn.disabled = true; | |
addOpBtn.disabled = true; | |
searchModeMain(); | |
}, false); | |
targetNode.appendChild(introBtn); | |
var addOpBtn = d_13.createElement("input"); | |
addOpBtn.type = "button"; | |
addOpBtn.id = "addOpBtn"; | |
addOpBtn.value = "【設定】"; | |
addOpBtn.addEventListener("click", function() { | |
cashBtn.disabled = true; | |
introBtn.disabled = true; | |
addOpBtn.disabled = true; | |
addOpMain(); | |
}, false); | |
targetNode.appendChild(addOpBtn); | |
} | |
//////////////////////////////////////////////////////// | |
// 未キャッシュの書簡情報をキャッシュ | |
// 自動キャッシュの場合は確認メッセージ非活性 | |
//////////////////////////////////////////////////////// | |
function syokanCashMain() { | |
var linkNodes = $xp('//table[@class="commonTables"]/tbody/tr/td[2]/a', d_13); | |
// 未キャッシュIDのURLを格納 | |
for (var i = 0, len = linkNodes.snapshotLength; i < len; i++ ) { | |
var href = linkNodes.snapshotItem(i).href; | |
if (href == null) { continue; } | |
var syokanId = href.match("id=[0-9]+")[0].split("=")[1]; | |
if (syokanId == null) { continue; } | |
// 返信済みマークがある場合、保存件名をチェック | |
var henshinImg = $xp1('descendant::img[@alt="返信済"]',linkNodes.snapshotItem(i).parentNode); | |
if (!!henshinImg) { | |
if (!checkKenmeiCash(syokanId)) { | |
hrefArray.push([syokanId, href]); | |
continue; | |
} | |
} | |
if (checkIdCash(syokanId)) { continue; } | |
hrefArray.push([syokanId, href]); | |
} | |
if (hrefArray.length <= 0) { | |
if (!opValues["autoCash"]) { alert("新しい保存対象はありません。"); } | |
return; | |
} | |
// 実行中表示レイヤー | |
var layer = d_13.createElement("div"); | |
layer.id = "cash_layer"; | |
layer.style.backgroundColor = "#202020"; | |
layer.style.position = "fixed"; | |
layer.style.zIndex = 1; | |
layer.style.width = "100%"; | |
layer.style.height = "100%"; | |
layer.style.opacity = 0.9; | |
var explain = d_13.createElement("div"); | |
explain.id = "cash_explain"; | |
explain.style.backgroundColor = "white"; | |
explain.style.marginTop = "100px"; | |
explain.style.padding = "20px"; | |
explain.style.width = "100%"; | |
explain.innerHTML = "<b>書簡保存処理実行中</b> " + 1 + "/" + hrefArray.length; | |
layer.appendChild(explain); | |
var targetNode = $xp1('//body', d_13); | |
targetNode.insertBefore(layer, targetNode.firstChild); | |
loadPage(0); | |
} | |
// 該当IDがキャッシュ済みならtrueを返す | |
function checkIdCash(syokanId) { | |
for (var i in syokanIdArray) { | |
if (syokanIdArray.hasOwnProperty(i) && syokanIdArray[i] == syokanId){ return true; } | |
} | |
return false; | |
} | |
// 該当IDの保存件名にimgタグが含まれていればtrueを返す | |
function checkKenmeiCash(syokanId) { | |
var fillterEL = d_13.createElement('div'); | |
fillterEL.innerHTML = kenmeiArray[syokanId]; | |
var henshinImg = $xp1('descendant::img[@alt="返信済"]', fillterEL); | |
if (!!henshinImg) { return true; } | |
return false; | |
} | |
// loadNoにより同期処理させる | |
function loadPage(loadNo, res) { | |
var opt = { | |
method: 'get', | |
url: hrefArray[loadNo][1], | |
onload: function(res) { | |
addSyokanCash(loadNo, res); | |
} | |
} | |
GM_xmlhttpRequest(opt); | |
} | |
function addSyokanCash(loadNo, res) { | |
var syokanId = hrefArray[loadNo][0]; | |
var fillterEL = d_13.createElement('div'); | |
fillterEL.innerHTML = res.responseText; | |
var syokanTable = $xp1('descendant::table[@class="commonTables"]', fillterEL); | |
var soushinsya = $xp1('descendant::td[1]/div', syokanTable).innerHTML; | |
var atesaki = $xp1('descendant::td[2]', syokanTable).innerHTML; | |
var nichiji = $xp1('descendant::td[3]', syokanTable).innerHTML; | |
var kenmei = $xp1('descendant::td[4]', syokanTable).innerHTML; | |
var honbun = $xp1('descendant::td[5]', syokanTable).innerHTML; | |
// 未登録の書簡IDの場合は追加 | |
if (!checkIdCash(syokanId)) { syokanIdArray.push(syokanId) } | |
soushinsyaArray[syokanId] = soushinsya; | |
atesakiArray[syokanId] = atesaki; | |
kenmeiArray[syokanId] = kenmei; | |
nichijiArray[syokanId] = nichiji; | |
saveHonbunValue(syokanId, honbun); | |
if (loadNo + 1 >= hrefArray.length) { | |
saveCmValue(); | |
if (!opValues["autoCash"]) { alert("書簡保存が終了しました。"); } | |
var layer = $xp1('//div[@id="cash_layer"]', d_13); | |
layer.parentNode.removeChild(layer); | |
return; | |
} | |
var layerExplain = $xp1('//div[@id="cash_explain"]', d_13); | |
layerExplain.innerHTML = "<b>書簡保存処理実行中</b> " + (loadNo + 2) + "/" + hrefArray.length; | |
loadPage(loadNo + 1); | |
} | |
//////////////////////////////////////////////////////// | |
// 書簡検索&表示機能 | |
// 共通で使用するCSS定義は最初にセット | |
//////////////////////////////////////////////////////// | |
function searchModeMain() { | |
//faraway110601 GM_addStyle()への引数をString()で囲むFirefox4.0対応 | |
GM_addStyle("\ | |
table.showTable {\ | |
border: 2px solid black;\ | |
border-collapse: collapse;\ | |
margin: 5px;\ | |
}\ | |
.showTable th {\ | |
border: 2px solid black;\ | |
border-collapse: collapse;\ | |
color: white;\ | |
background-color: gray;\ | |
padding : 2px;\ | |
}\ | |
.showTable td {\ | |
border: 2px solid black;\ | |
border-collapse: collapse;\ | |
color: black;\ | |
background-color: white;\ | |
padding : 2px;\ | |
}\ | |
"); | |
var targetNode = $xp1('//div[@id="gray02Wrapper"]', d_13); | |
targetNode.innerHTML = null; | |
var baseEL = d_13.createElement("div"); | |
baseEL.id = "bro_view_base"; | |
targetNode.appendChild(baseEL); | |
addSearchHTML(); | |
if (opValues["uneiLimit"]) { | |
addShowTable(uneiSyokanLimit(syokanIdArray)); | |
} else { | |
addShowTable(syokanIdArray); | |
} | |
} | |
// 検索句付加 | |
function addSearchHTML() { | |
var baseEL = $xp1('//div[@id="bro_view_base"]', d_13); | |
baseEL.appendChild(d_13.createTextNode("【保存書簡の検索】")); | |
baseEL.appendChild(d_13.createElement("br")); | |
var searchBaseEL = d_13.createElement("div"); | |
searchBaseEL.id = "search_base"; | |
searchBaseEL.appendChild(d_13.createTextNode("検索条件: ")); | |
var inputTxtEL = d_13.createElement("input"); | |
inputTxtEL.size = 10; | |
inputTxtEL.id = "searchTxt"; | |
searchBaseEL.appendChild(inputTxtEL); | |
searchBaseEL.appendChild(d_13.createTextNode(" を ")); | |
var selectEL = d_13.createElement("select"); | |
selectEL.id = "searchSelect"; | |
var optionEL = d_13.createElement("option"); | |
optionEL.value = "soushinsya_atesaki"; | |
optionEL.text = "送信者または宛先に含む"; | |
selectEL.appendChild(optionEL.cloneNode(true)); | |
optionEL.value = "soushinsya"; | |
optionEL.text = "送信者に含む"; | |
selectEL.appendChild(optionEL.cloneNode(true)); | |
optionEL.value = "atesaki"; | |
optionEL.text = "宛先に含む"; | |
selectEL.appendChild(optionEL.cloneNode(true)); | |
searchBaseEL.appendChild(selectEL); | |
searchBaseEL.appendChild(d_13.createTextNode(" 書簡を ")); | |
var btnEL = d_13.createElement("input"); | |
btnEL.type = "button" | |
btnEL.value = "検索する"; | |
btnEL.addEventListener("click", searchExe, false); | |
searchBaseEL.appendChild(btnEL); | |
searchBaseEL.appendChild(d_13.createTextNode(" / ")); | |
var allBtnEL = d_13.createElement("input"); | |
allBtnEL.type = "button" | |
allBtnEL.value = "全件表示"; | |
allBtnEL.addEventListener("click", function() { | |
inputTxtEL.value = null; | |
selectEL.selectedIndex = 0; | |
searchExe() | |
}, false); | |
searchBaseEL.appendChild(allBtnEL); | |
baseEL.appendChild(searchBaseEL); | |
baseEL.appendChild(d_13.createElement("br")); | |
} | |
// 検索句の情報を元に検索実行 | |
function searchExe() { | |
var searchSelectNode = $xp1('//select[@id="searchSelect"]', d_13); | |
var searchMode = searchSelectNode.options[searchSelectNode.selectedIndex].value; | |
var searchTxt = $xp1('//input[@id="searchTxt"]', d_13).value; | |
var show_syokanIdArray = []; | |
if (searchMode == "soushinsya_atesaki") { | |
show_syokanIdArray = searchSoushinsya(syokanIdArray, searchTxt); | |
var addIdArray = searchAtesaki(syokanIdArray, searchTxt); | |
for (var i = 0, len = addIdArray.length; i < len; i++) { | |
if (show_syokanIdArray.indexOf(addIdArray[i]) == -1) { | |
show_syokanIdArray.push(addIdArray[i]); | |
} | |
} | |
} else if (searchMode == "soushinsya") { | |
show_syokanIdArray = searchSoushinsya(syokanIdArray, searchTxt); | |
} else if (searchMode == "atesaki") { | |
show_syokanIdArray = searchAtesaki(syokanIdArray, searchTxt); | |
} else { | |
return; | |
} | |
if (opValues["uneiLimit"]) { | |
addShowTable(uneiSyokanLimit(show_syokanIdArray)); | |
} else { | |
addShowTable(show_syokanIdArray); | |
} | |
} | |
// 送信者名で検索し、条件に合致するIDを返す | |
function searchSoushinsya(search_syokanIdArray, searchTxt) { | |
var resSyokanIdArray = []; | |
for (var i = 0, len = search_syokanIdArray.length; i < len; i++) { | |
var syokanId = search_syokanIdArray[i]; | |
if (soushinsyaArray[syokanId].indexOf(searchTxt) != -1) { | |
resSyokanIdArray.push(syokanId); | |
} | |
} | |
return resSyokanIdArray; | |
} | |
// 宛先名で検索し、条件に合致するIDを返す | |
function searchAtesaki(search_syokanIdArray, searchTxt) { | |
var resSyokanIdArray = []; | |
for (var i = 0, len = search_syokanIdArray.length; i < len; i++) { | |
var syokanId = search_syokanIdArray[i]; | |
if (atesakiArray[syokanId].indexOf(searchTxt) != -1) { | |
resSyokanIdArray.push(syokanId); | |
} | |
} | |
return resSyokanIdArray; | |
} | |
// 運営名で検索し、条件に合致しないIDを返す | |
function uneiSyokanLimit(search_syokanIdArray){ | |
var resSyokanIdArray = []; | |
for (var i = 0, len = search_syokanIdArray.length; i < len; i++) { | |
var syokanId = search_syokanIdArray[i]; | |
if (soushinsyaArray[syokanId].indexOf(uneiLimitTxt) == -1) { | |
resSyokanIdArray.push(syokanId); | |
} | |
} | |
return resSyokanIdArray; | |
} | |
// 引数の書簡ID配列、ページ番号を元に検索結果表示 | |
function addShowTable (show_syokanIdArray, page_index) { | |
if (page_index == null) { page_index = 0 }; | |
var pre_tableEL = $xp1('//table[@id="showTable"]', d_13); | |
if (pre_tableEL != null) { | |
pre_tableEL.parentNode.removeChild(pre_tableEL); | |
} | |
var pre_pagerEL = $xp1('//div[@id="search_pager"]', d_13); | |
if (pre_pagerEL != null) { | |
pre_pagerEL.parentNode.removeChild(pre_pagerEL); | |
} | |
var tableEL = d_13.createElement("table"); | |
tableEL.className = "showTable"; | |
tableEL.id = "showTable"; | |
var trEL = d_13.createElement("tr"); | |
var thEL = d_13.createElement("th"); | |
var tdEL = d_13.createElement("td"); | |
var pargerEL = d_13.createElement("div"); | |
pargerEL.id = "search_pager"; | |
thEL.innerHTML = "No"; | |
thEL.style.width = "20px"; | |
trEL.appendChild(thEL.cloneNode(true)); | |
thEL.innerHTML = "送信者"; | |
thEL.style.width = "80px"; | |
trEL.appendChild(thEL.cloneNode(true)); | |
thEL.innerHTML = "宛先"; | |
thEL.style.width = "120px"; | |
trEL.appendChild(thEL.cloneNode(true)); | |
thEL.innerHTML = "件名"; | |
thEL.style.width = "200px"; | |
trEL.appendChild(thEL.cloneNode(true)); | |
thEL.innerHTML = "日時"; | |
thEL.style.width = "80px"; | |
trEL.appendChild(thEL.cloneNode(true)); | |
thEL.innerHTML = "本文表示"; | |
thEL.style.width = "200px"; | |
trEL.appendChild(thEL.cloneNode(true)); | |
tableEL.appendChild(trEL.cloneNode(true)); | |
var len = show_syokanIdArray.length; | |
if (len <= 0 ) { | |
var data_trEL = d_13.createElement("tr"); | |
var data_thEL = d_13.createElement("th"); | |
var data_tdEL = d_13.createElement("td"); | |
data_tdEL.colSpan = 5; | |
data_tdEL.innerHTML = "※該当書簡は存在しません。"; | |
data_tdEL.align = "center"; | |
data_trEL.appendChild(data_thEL); | |
data_trEL.appendChild(data_tdEL); | |
tableEL.appendChild(data_trEL); | |
} else { | |
show_syokanIdArray.sort ( function sort(a, b) { return (b - a); } ) | |
var i_start = page_index * pageUnit; | |
var i_end = i_start + pageUnit; | |
if (i_end >= len) { i_end = len } | |
function returnShowSyokan(syokanId) { | |
return function() { showSyokan(syokanId); } | |
} | |
function returnSeachExe(searchTxt) { | |
return function() { | |
var searchSelectNode = $xp1('//select[@id="searchSelect"]', d_13); | |
searchSelectNode.selectedIndex = 0; | |
var searchTxtNode = $xp1('//input[@id="searchTxt"]', d_13); | |
searchTxtNode.value = searchTxt; | |
searchExe(); | |
} | |
} | |
for (var i = i_start; i < i_end; i++ ) { | |
var syokanId = show_syokanIdArray[i]; | |
var soushinsya = soushinsyaArray[syokanId]; | |
var kenmei = kenmeiArray[syokanId]; | |
var atesaki = atesakiArray[syokanId]; | |
var nichiji = nichijiArray[syokanId]; | |
var honbun = loadSyokanValue(syokanId); | |
honbun = honbun.replace(/<br>/g, ""); | |
var data_trEL = d_13.createElement("tr"); | |
var data_thEL = d_13.createElement("th"); | |
var data_tdEL = d_13.createElement("td"); | |
var data_tdBtnEL1 = d_13.createElement("td"); | |
data_tdBtnEL1.style.backgroundColor = "#ffffdf"; | |
var data_tdBtnEL2 = d_13.createElement("td"); | |
data_tdBtnEL2.style.backgroundColor = "#ffdfff"; | |
var data_tdBtnEL3 = d_13.createElement("td"); | |
data_tdBtnEL3.style.backgroundColor = "#dfffff"; | |
data_thEL.innerHTML = i + 1; | |
data_trEL.appendChild(data_thEL.cloneNode(true)); | |
data_tdBtnEL1.innerHTML = soushinsya; | |
data_tdBtnEL1.addEventListener("click", returnSeachExe(soushinsya), false); | |
data_trEL.appendChild(data_tdBtnEL1); | |
data_tdBtnEL2.innerHTML = atesaki; | |
data_tdBtnEL2.addEventListener("click", returnSeachExe(atesaki), false); | |
data_trEL.appendChild(data_tdBtnEL2); | |
data_tdEL.innerHTML = kenmei; | |
data_trEL.appendChild(data_tdEL.cloneNode(true)); | |
data_tdEL.innerHTML = nichiji; | |
data_trEL.appendChild(data_tdEL.cloneNode(true)); | |
data_tdBtnEL3.appendChild(d_13.createTextNode(c_subString(honbun, 30))); | |
data_tdBtnEL3.addEventListener("click", returnShowSyokan(syokanId), false); | |
data_trEL.appendChild(data_tdBtnEL3); | |
tableEL.appendChild(data_trEL); | |
} | |
if (len > pageUnit) { | |
var preBtnEL = d_13.createElement("input"); | |
preBtnEL.type = "button"; | |
preBtnEL.id = "prePager"; | |
preBtnEL.value = "前のページへ"; | |
preBtnEL.addEventListener("click", function() { | |
addShowTable(show_syokanIdArray, page_index - 1) | |
}, false); | |
var nextBtnEL = d_13.createElement("input"); | |
nextBtnEL.type = "button"; | |
nextBtnEL.id = "nextPager"; | |
nextBtnEL.value = "次のページへ"; | |
nextBtnEL.addEventListener("click", function() { | |
addShowTable(show_syokanIdArray, page_index + 1) | |
}, false); | |
if (i_start <= 0 ) { preBtnEL.disabled = true; } | |
if (i_end >= len ) { nextBtnEL.disabled = true; } | |
pargerEL.appendChild(preBtnEL); | |
pargerEL.appendChild(nextBtnEL); | |
} | |
pargerEL.appendChild(d_13.createTextNode(" 該当件数" + len + "件")); | |
} | |
var baseEL = $xp1('//div[@id="bro_view_base"]', d_13); | |
baseEL.appendChild(pargerEL); | |
baseEL.appendChild(tableEL); | |
$_13("#showTable").hide(); | |
$_13("#showTable").slideDown(); | |
} | |
function c_subString(txt, num) { | |
if (txt.length > num) { txt = txt.substring(0, num - 3) + "..."; } | |
return txt; | |
} | |
// 書簡文表示 | |
function showSyokan(syokanId) { | |
var baseLayer = d_13.createElement("div"); | |
baseLayer.id = "baseLayer"; | |
baseLayer.style.position = "absolute"; | |
baseLayer.style.zIndex = 1; | |
baseLayer.style.width = "100%"; | |
baseLayer.style.height = "100%"; | |
var mask = d_13.createElement("div"); | |
mask.style.backgroundColor = "#202020"; | |
mask.style.position = "fixed"; | |
mask.style.width = "100%"; | |
mask.style.height = "100%"; | |
mask.style.opacity = 0.90; | |
mask.addEventListener("click", function() { | |
baseLayer.parentNode.removeChild(baseLayer); | |
}, false); | |
baseLayer.appendChild(mask); | |
var explain = d_13.createElement("div"); | |
explain.id = "gray02Wrapper"; | |
explain.style.position = "absolute"; | |
explain.style.marginTop = "200px"; | |
explain.style.marginLeft = "50px"; | |
explain.style.padding = "25px"; | |
explain.style.width = "600px"; | |
baseLayer.appendChild(explain); | |
var targetNode = $xp1('//body', d_13); | |
targetNode.insertBefore(baseLayer, targetNode.firstChild); | |
var tableEL = d_13.createElement("table"); | |
tableEL.style.width = "100%"; | |
tableEL.className = "showTable"; | |
var trEL = d_13.createElement("tr"); | |
var thEL = d_13.createElement("th"); | |
var tdEL = d_13.createElement("td"); | |
tdEL.style.padding = "5px"; | |
thEL.innerHTML = "送信者"; | |
trEL.appendChild(thEL.cloneNode(true)); | |
thEL.innerHTML = "宛先"; | |
trEL.appendChild(thEL.cloneNode(true)); | |
thEL.innerHTML = "件名"; | |
trEL.appendChild(thEL.cloneNode(true)); | |
thEL.innerHTML = "日時"; | |
trEL.appendChild(thEL.cloneNode(true)); | |
tableEL.appendChild(trEL.cloneNode(true)); | |
var soushinsya = soushinsyaArray[syokanId]; | |
var kenmei = kenmeiArray[syokanId]; | |
var atesaki = atesakiArray[syokanId]; | |
var nichiji = nichijiArray[syokanId]; | |
var honbun = loadSyokanValue(syokanId); | |
trEL.innerHTML = null; | |
tdEL.innerHTML = soushinsya; | |
trEL.appendChild(tdEL.cloneNode(true)); | |
tdEL.innerHTML = atesaki; | |
trEL.appendChild(tdEL.cloneNode(true)); | |
tdEL.innerHTML = kenmei; | |
trEL.appendChild(tdEL.cloneNode(true)); | |
tdEL.innerHTML = nichiji; | |
trEL.appendChild(tdEL.cloneNode(true)); | |
tableEL.appendChild(trEL.cloneNode(true)); | |
trEL.innerHTML = null; | |
tdEL.colSpan = 4; | |
tdEL.innerHTML = honbun; | |
tdEL.appendChild(d_13.createElement("br")); | |
tdEL.appendChild(d_13.createElement("br")); | |
var aEL = d_13.createElement("a"); | |
aEL.innerHTML = "返信する"; | |
aEL.href = "new.php?id=" + syokanId; | |
tdEL.appendChild(aEL); | |
trEL.appendChild(tdEL); | |
tableEL.appendChild(trEL); | |
explain.appendChild(tableEL); | |
$_13("#gray02Wrapper").hide(); | |
$_13("#gray02Wrapper").slideDown(); | |
} | |
//////////////////////////////////////////////////////// | |
//オプション画面 | |
//////////////////////////////////////////////////////// | |
function addOpMain() { | |
var targetNode = $xp1('//div[@id="gray02Wrapper"]', d_13); | |
targetNode.innerHTML = null; | |
var baseEL = d_13.createElement("div"); | |
baseEL.id = "bro_op_base"; | |
baseEL.appendChild(d_13.createTextNode("【書簡保存・検索 設定】")); | |
baseEL.appendChild(d_13.createElement("br")); | |
baseEL.appendChild(d_13.createElement("br")); | |
baseEL.appendChild(d_13.createTextNode(" 1.書簡画面表示時、未保存書簡の自動保存を")); | |
var autoCashBtn = d_13.createElement("input"); | |
autoCashBtn.type = "button"; | |
autoCashBtn.id = "autoCashBtn"; | |
if (opValues["autoCash"]) { | |
autoCashBtn.value = "【無効化する】"; | |
autoCashBtn.addEventListener("click", function() { | |
opValues["autoCash"] = false; | |
saveOpValues(); | |
addOpMain(); | |
}, false); | |
} else { | |
autoCashBtn.value = "【有効化する】"; | |
autoCashBtn.addEventListener("click", function() { | |
opValues["autoCash"] = true; | |
saveOpValues(); | |
addOpMain(); | |
}, false); | |
} | |
baseEL.appendChild(autoCashBtn); | |
baseEL.appendChild(d_13.createElement("br")); | |
baseEL.appendChild(d_13.createElement("br")); | |
baseEL.appendChild(d_13.createTextNode(" 2.運営からの書簡を検索結果に")); | |
var UneiLimitBtn = d_13.createElement("input"); | |
UneiLimitBtn.type = "button"; | |
UneiLimitBtn.id = "UneiLimitBtn"; | |
if (opValues["uneiLimit"]) { | |
UneiLimitBtn.value = "【表示する】"; | |
UneiLimitBtn.addEventListener("click", function() { | |
opValues["uneiLimit"] = false; | |
saveOpValues(); | |
addOpMain(); | |
}, false); | |
} else { | |
UneiLimitBtn.value = "【表示しない】"; | |
UneiLimitBtn.addEventListener("click", function() { | |
opValues["uneiLimit"] = true; | |
saveOpValues(); | |
addOpMain(); | |
}, false); | |
} | |
baseEL.appendChild(UneiLimitBtn); | |
baseEL.appendChild(d_13.createElement("br")); | |
baseEL.appendChild(d_13.createElement("br")); | |
baseEL.appendChild(d_13.createTextNode(" 3.指定ワールドの保存書簡をだらあああと")); | |
var outputBtn = d_13.createElement("input"); | |
outputBtn.type = "button"; | |
outputBtn.id = "outputBtn"; | |
outputBtn.value = "【出力する】"; | |
outputBtn.addEventListener("click", function() { | |
outputBtn.disabled = true; | |
var key = prompt("現ワールド以外の書簡情報を出力したい場合は、\nホスト名を指定してください。\n※現ワールドのホスト名が初期値で表示されています。", worldKey); | |
if (!key) { outputBtn.disabled = false; return; } | |
key_loadCmValue(key); | |
var len = syokanIdArray.length; | |
if(len <= 0) { alert("指定ワールドの保存書簡は存在しません。"); outputBtn.disabled = false; return; } | |
syokanOutput(key); | |
}, false); | |
baseEL.appendChild(outputBtn); | |
baseEL.appendChild(d_13.createElement("br")); | |
baseEL.appendChild(d_13.createElement("br")); | |
baseEL.appendChild(d_13.createTextNode(" 4.指定ワールドの保存情報を")); | |
var resetBtn = d_13.createElement("input"); | |
resetBtn.type = "button"; | |
resetBtn.id = "resetBtn"; | |
resetBtn.value = "【リセットする】"; | |
resetBtn.addEventListener("click", function() { | |
resetBtn.disabled = true; | |
var key = prompt("現ワールド以外の書簡情報をリセットしたい場合は、\nホスト名を指定してください。\n※現ワールドのホスト名が初期値で表示されています。", worldKey); | |
if (!key) { resetBtn.disabled = false; return; } | |
key_loadCmValue(key); | |
var len = syokanIdArray.length; | |
if(len <= 0) { alert("指定ワールドの保存書簡は存在しません。"); resetBtn.disabled = false; return; } | |
if (confirm("【再確認】ホスト名:" + key + "ワールドの書簡情報のすべてをクリアします。\n※また、処理には相当な時間を要します。気長に待てる時の実行を推奨します。")) { | |
autoCashBtn.disabled = true; | |
UneiLimitBtn.disabled = true; | |
outputBtn.disabled = true; | |
resetCashMain(key); | |
} else { | |
resetBtn.disabled = false; | |
} | |
}, false); | |
baseEL.appendChild(resetBtn); | |
targetNode.appendChild(baseEL); | |
baseEL.appendChild(d_13.createElement("br")); | |
baseEL.appendChild(d_13.createElement("br")); | |
baseEL.appendChild(d_13.createTextNode(" 5.本スクリプトの最新版などは→をご確認ください ・w・ ")); | |
var aEL = d_13.createElement("a"); | |
aEL.innerHTML = "<font color='blue'><u>Project.殺伐</u></font>"; | |
aEL.href = "http://aoyamayuuto.blog92.fc2.com/"; | |
aEL.target = "_blank"; | |
baseEL.appendChild(aEL); | |
$_13("#bro_op_base").hide(); | |
$_13("#bro_op_base").slideDown(); | |
} | |
//////////////////////////////////////////////////////// | |
//書簡出力 | |
//////////////////////////////////////////////////////// | |
function syokanOutput(key, page_index) { | |
if (page_index == null) { page_index = 0 }; | |
var pre_baseEL = $xp1('//div[@id="bro_output_base"]', d_13); | |
if (pre_baseEL != null) { | |
pre_baseEL.parentNode.removeChild(pre_baseEL); | |
} | |
var targetNode = $xp1('//div[@id="gray02Wrapper"]', d_13); | |
targetNode.innerHTML = null; | |
var baseEL = d_13.createElement("div"); | |
baseEL.id = "bro_output_base"; | |
targetNode.appendChild(baseEL); | |
var textAreaEL = d_13.createElement("textarea"); | |
textAreaEL.cols = 95; | |
textAreaEL.rows = 25; | |
var len = syokanIdArray.length; | |
pageUnit = 100; | |
var i_start = page_index * pageUnit; | |
var i_end = i_start + pageUnit; | |
if (i_end >= len) { i_end = len } | |
for (var i = i_start; i < i_end; i++ ) { | |
var syokanId = syokanIdArray[i]; | |
var nichiji = nichijiArray[syokanId]; | |
var soushinsya = soushinsyaArray[syokanId]; | |
var atesaki = atesakiArray[syokanId]; | |
var kenmei = kenmeiArray[syokanId]; | |
var honbun = key_loadSyokanValue(key, syokanId); | |
honbun = honbun.replace(/\r\n/g, ""); | |
honbun = honbun.replace(/(\n|\r)/g, ""); | |
textAreaEL.defaultValue = textAreaEL.defaultValue + | |
syokanId + "\t" + | |
nichiji + "\t" + | |
soushinsya + "\t" + | |
atesaki + "\t" + | |
kenmei + "\t" + | |
honbun + "\n"; | |
} | |
if (len > pageUnit) { | |
var preBtnEL = d_13.createElement("input"); | |
preBtnEL.type = "button"; | |
preBtnEL.id = "prePager"; | |
preBtnEL.value = "前のページへ"; | |
preBtnEL.addEventListener("click", function() { | |
syokanOutput(key, page_index - 1) | |
}, false); | |
var nextBtnEL = d_13.createElement("input"); | |
nextBtnEL.type = "button"; | |
nextBtnEL.id = "nextPager"; | |
nextBtnEL.value = "次のページへ"; | |
nextBtnEL.addEventListener("click", function() { | |
syokanOutput(key, page_index + 1) | |
}, false); | |
if (i_start <= 0 ) { preBtnEL.disabled = true; } | |
if (i_end >= len ) { nextBtnEL.disabled = true; } | |
baseEL.appendChild(preBtnEL); | |
baseEL.appendChild(nextBtnEL); | |
} | |
baseEL.appendChild(d_13.createTextNode(" 総件数" + len + "件 " + (i_start + 1) + "~" + i_end)); | |
baseEL.appendChild(textAreaEL); | |
} | |
//////////////////////////////////////////////////////// | |
// GM関連の共通関数 | |
// 保持するGM変数は下記3分類 | |
// 1.オプション設定情報 | |
// 2.書簡項目ごとに分類したキャッシュ情報 | |
// 3.書簡本文のキャッシュ情報 | |
//////////////////////////////////////////////////////// | |
function loadOpValues () { | |
opValues = eval(GM_getValue(worldKey + "opValues", {})); | |
if (opValues["autoCash"] == null) { opValues["autoCash"] = false; } | |
if (opValues["uneiLimit"] == null) { opValues["uneiLimit"] = false; } | |
} | |
function saveOpValues () { | |
GM_setValue(worldKey + "opValues", opValues.toSource()); | |
} | |
function loadCmValue () { | |
syokanIdArray = eval(GM_getValue(worldKey + "syokanIdArray", [])); | |
soushinsyaArray = eval(GM_getValue(worldKey + "soushinsyaArray", {})); | |
atesakiArray = eval(GM_getValue(worldKey + "atesakiArray", {})); | |
kenmeiArray = eval(GM_getValue(worldKey + "kenmeiArray", {})); | |
nichijiArray = eval(GM_getValue(worldKey + "nichijiArray", {})); | |
} | |
function saveCmValue () { | |
GM_setValue(worldKey + "syokanIdArray", syokanIdArray.toSource()); | |
GM_setValue(worldKey + "soushinsyaArray", soushinsyaArray.toSource()); | |
GM_setValue(worldKey + "atesakiArray", atesakiArray.toSource()); | |
GM_setValue(worldKey + "kenmeiArray", kenmeiArray.toSource()); | |
GM_setValue(worldKey + "nichijiArray", nichijiArray.toSource()); | |
} | |
function loadSyokanValue (sy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
最近のアップデートで出発時刻計算が無効になり
本日のアップデートで出兵マップ表示が無効になりました
修正していただけないでしょうか?