|
|
第1行: |
第1行: |
− | <includeonly><script type="text/javascript">(window.RLQ=window.RLQ||[]).push(function(){
| + | {{剧情模拟器剧情导航}} |
− | | + | {{#Widget:AVGplayer/css}} |
− | var dollarray = {
| + | {{#Widget:AVGplayer/js}} |
− | "M16(3)":"http://www.gfwiki.org/images/d/db/M16A1_T.png",
| |
− | "SOPII(3)":"http://www.gfwiki.org/images/3/3d/Pic_M4_SOPMOD_II.png",
| |
− | "M4A1(2)":"http://www.gfwiki.org/images/4/41/M4A1_SAD.png",
| |
− | "AR15(2)":"http://www.gfwiki.org/images/3/39/AR15_T.png",
| |
− | "M4A1(0)":"http://www.gfwiki.org/images/4/4e/Pic_M4A1.png",
| |
− | "RO635(0)":"http://www.gfwiki.org/images/a/ae/%E5%B0%91%E5%A5%B3%E5%89%8D%E7%BA%BF-RO635.png",
| |
− | "RO635(4)":"http://www.gfwiki.org/images/c/c8/Pic_RO635_4.png",
| |
− |
| |
− | "M1903(10)":"http://www.gfwiki.org/images/5/5e/AVG_pic_M1903_10.png",
| |
− | "M1903(11)":"http://www.gfwiki.org/images/b/be/AVG_pic_M1903_11.png",
| |
− | "M1903(12)":"http://www.gfwiki.org/images/7/7e/AVG_pic_M1903_12.png",
| |
− | "M1903(13)":"http://www.gfwiki.org/images/a/a8/AVG_pic_M1903_13.png",
| |
− | "G36Mod(0)":"http://www.gfwiki.org/images/d/d8/Pic_G36Mod.png",
| |
− | | |
− | "M4 SOPMOD IIMod(0)":"http://www.gfwiki.org/images/7/70/M4_SOPMOD_IIMod.png",
| |
− | "M4 SOPMOD IIMod(3)":"http://www.gfwiki.org/images/8/8c/Pic_M4_SOPMOD_IIMod_2.png",
| |
− | "AR15Mod(0)":"http://www.gfwiki.org/images/c/cd/Pic_AR15Mod.png",
| |
− | "AR15Mod(4)":"http://www.gfwiki.org/images/c/cd/AR15Mod_%E5%BE%AE%E7%AC%91.png",
| |
− | "RO635Mod(0)":"http://www.gfwiki.org/images/9/90/Pic_RO635Mod.png",
| |
− | "RO635Mod(2)":"http://www.gfwiki.org/images/2/26/Pic_RO635Mod_2.png",
| |
− | "RO635Mod(3)":"http://www.gfwiki.org/images/8/8c/Pic_RO635Mod_3.png",
| |
− | "RO635Mod(4)":"http://www.gfwiki.org/images/7/74/Pic_RO635Mod_4.png",
| |
− | "RO635Mod(5)":"http://www.gfwiki.org/images/a/a5/Pic_RO635Mod_5.png",
| |
− | | |
− | "NPC-Kalin(0)":"http://www.gfwiki.org/images/2/21/Kalina.png",
| |
− | "NPC-Kalin(1)":"http://www.gfwiki.org/images/a/a5/Kalina_1.png",
| |
− | "NPC-Kalin(2)":"http://www.gfwiki.org/images/1/15/Kalina_2.png",
| |
− | "NPC-Kalin(3)":"http://www.gfwiki.org/images/9/95/Kalina_3.png",
| |
− | "NPC-Kalin(4)":"http://www.gfwiki.org/images/6/67/Kalina_4.png",
| |
− | "NPC-Kalin(5)":"http://www.gfwiki.org/images/0/0b/Kalina_5.png",
| |
− | "NPC-Kalin(6)":"http://www.gfwiki.org/images/0/0c/Kalina_6.png",
| |
− | "NPC-Kalin(7)":"http://www.gfwiki.org/images/1/11/Kalina_7.png",
| |
− | "NPC-Kalin(8)":"http://www.gfwiki.org/images/2/29/Kalina_8.png",
| |
− | | |
− | "NPC-Ange(2)":"http://www.gfwiki.org/images/8/82/Pic_NPC-Ange_2.png",
| |
− | | |
− | "NPC-Jason(0)":"http://www.gfwiki.org/images/e/e5/NPC-Jason.png",
| |
− | "NPC-Helian(0)":"http://www.gfwiki.org/images/4/4b/NPC-Helian.png",
| |
− | "NPC-Kyruger(0)":"http://www.gfwiki.org/images/c/cb/NPC-Kyruger.png",
| |
− | "NPC-Griffin(0)":"http://www.gfwiki.org/images/9/9b/NPC-Griffin%280%29.png",
| |
− | "NPC-Griffin(1)":"http://www.gfwiki.org/images/c/c4/NPC-Griffin%281%29.png",
| |
− | | |
− | "NPC-Refugee(0)":"http://www.gfwiki.org/images/9/97/Pic_NPC-Refugee_0.png",
| |
− | "NPC-Lilyan(0)":"http://www.gfwiki.org/images/1/13/Pic_NPC-Lilyan_0.png",
| |
− | "NPC-Elijah(0)":"http://www.gfwiki.org/images/a/a8/NPC-Elijah%280%29.png",
| |
− | | |
− | "NPC-Machlian(0)":"http://www.gfwiki.org/images/c/c7/NPC-Machlian%280%29.png",
| |
− | "NPC-Machlian(1)":"http://www.gfwiki.org/images/0/03/NPC-Machlian%281%29.png",
| |
− | "NPC-Machlian(2)":"http://www.gfwiki.org/images/0/0a/NPC-Machlian%282%29.png",
| |
− | "NPC-Machlian(3)":"http://www.gfwiki.org/images/b/b7/NPC-Machlian%283%29.png",
| |
− | "NPC-Machlian(4)":"http://www.gfwiki.org/images/f/f2/NPC-Machlian%284%29.png",
| |
− | "NPC-Machlian(6)":"http://www.gfwiki.org/images/b/bc/NPC-Machlian%286%29.png",
| |
− | "NPC-Machlian(7)":"http://www.gfwiki.org/images/9/97/NPC-Machlian%287%29.png",
| |
− | "NPC-Machlian(8)":"http://www.gfwiki.org/images/2/2d/NPC-Machlian%288%29.png",
| |
− |
| |
− | /* 16 */ "M1928A1(0)":"http://www.gfwiki.org/images/f/f4/Pic_M1928A1.png",
| |
− | /* 106 */ "FAL(0)":"http://www.gfwiki.org/images/d/d2/Pic_FNFALhx.png",
| |
− | /* 112 */ "NEGEV(0)":"http://www.gfwiki.org/images/0/04/Pic_NEGEV.png",
| |
− | /* 257 */ "M200(0)":"http://www.gfwiki.org/images/3/3e/Pic_M200.png",
| |
− | /* 272 */ "DesertEagle(0)":"http://www.gfwiki.org/images/4/4b/Pic_DesertEagle.png",
| |
− | /* 296 */ "SL8(0)":"http://www.gfwiki.org/images/9/92/Pic_SL8.png",
| |
− | /* 296 */ "SL8(3)":"http://www.gfwiki.org/images/d/da/Pic_SL8_3.png",
| |
− | /* 316 */ "GeneralLiu(0)":"http://www.gfwiki.org/images/a/a0/Pic_GeneralLiu.png",
| |
− | /* 316 */ "GeneralLiu(1)":"http://www.gfwiki.org/images/d/d7/Pic_GeneralLiu_D.png",
| |
− | /* 331 */ "Kolibri(0)":"http://www.gfwiki.org/images/a/a7/Pic_Kolibri.png",
| |
− | /* 332 */ "Derringer(0)":"http://www.gfwiki.org/images/a/a8/Pic_Derringer.png",
| |
− | /* 333 */ "VP1915(0)":"http://www.gfwiki.org/images/d/dc/Pic_VP1915.png",
| |
− | /* 334 */ "Savage99(0)":"http://www.gfwiki.org/images/e/ee/Pic_Savage99.png",
| |
− | /* 335 */ "Fedorov(0)":"http://www.gfwiki.org/images/e/e0/Pic_Fedorov.png",
| |
− | | |
− | "P22(0)":"http://www.gfwiki.org/images/7/77/Pic_P22.png",
| |
− | "Lewis(0)":"http://www.gfwiki.org/images/5/5d/Pic_Lewis.png",
| |
− | "AUGPARA(0)":"http://www.gfwiki.org/images/1/11/Pic_AUGPARA.png",
| |
− | "VHS(0)":"http://www.gfwiki.org/images/5/57/Pic_VHS.png",
| |
− | | |
− | "Nyto(1)":"http://www.gfwiki.org/images/e/e3/Pic_Nyto_black_LL.png",
| |
− | "NytoWhite(0)":"http://www.gfwiki.org/images/1/17/Pic_Nyto_white_LL.png",
| |
− | "NPC-Mercurows(0)":"http://www.gfwiki.org/images/f/f4/NPC-Mercurows.png",
| |
− | "NPC-Nimogen(0)":"http://www.gfwiki.org/images/b/be/NPC-Nimogen.png",
| |
− | | |
− | "Narciss(4)":"http://www.gfwiki.org/images/0/07/Narciss%284%29.png",
| |
− | "NytoIsomer(3)":"http://www.gfwiki.org/images/1/11/Nyto_Isomer_Shadow.png",
| |
− | "NytoIsomer(8)":"http://www.gfwiki.org/images/d/d0/Nyto_Isomer_8.png",
| |
− | | |
− | "NPC-Doppelsoldner(0)":"http://www.gfwiki.org/images/e/e8/Pic_Doppelsoldner_LL.png",
| |
− | "NPC-Uhlan(0)":"http://www.gfwiki.org/images/4/4d/Pic_Uhlan_LL.png",
| |
− | "NPC-Rodelero(0)":"http://www.gfwiki.org/images/8/88/Pic_Rodelero_LL.png",
| |
− | "NPC-Strelet(0)":"http://www.gfwiki.org/images/3/39/Pic_Strelet_LL.png",
| |
− | }; | |
− | | |
− | var bgarray = {
| |
− | "1":"http://www.gfwiki.org/images/0/00/%E6%A0%91%E6%9E%97.png",
| |
− | "8":"http://www.gfwiki.org/images/9/9a/%E4%BD%9C%E6%88%98%E5%AE%A4avg.png",
| |
− | "9":"http://www.gfwiki.org/images/4/44/BG-none.png",
| |
− | "15":"http://www.gfwiki.org/images/a/ab/%E5%AE%A4%E5%86%85%E6%88%98%E6%96%97.png",
| |
− | "55":"http://www.gfwiki.org/images/6/65/Metro.png",
| |
− | "73":"http://www.gfwiki.org/images/1/17/17xh-ShootingRange.png",
| |
− | "82":"http://www.gfwiki.org/images/6/63/BG-Dorm.png",
| |
− | "85":"http://www.gfwiki.org/images/b/b8/BG_Inner.png",
| |
− | "99":"http://www.gfwiki.org/images/2/22/BG-WildBattle.png",
| |
− | "160":"http://www.gfwiki.org/images/a/ac/BG-Sanatorium.png",
| |
− | "161":"http://www.gfwiki.org/images/d/dc/BG_Base.png",
| |
− | "166":"http://www.gfwiki.org/images/7/79/BG-Cybercity.png",
| |
− | "170":"http://www.gfwiki.org/images/c/c6/19WinterCG1.png",
| |
− | "182":"http://www.gfwiki.org/images/d/dc/BG-Guildhall.png",
| |
− | "197":"http://www.gfwiki.org/images/8/88/2019summer_3.png",
| |
− | "202":"http://www.gfwiki.org/images/5/52/2019summer_7.png",
| |
− | "227":"http://www.gfwiki.org/images/3/37/19winter_aurora.png",
| |
− | "262":"http://www.gfwiki.org/images/c/c8/GunCGlake.png",
| |
− | "269":"http://www.gfwiki.org/images/4/46/2020summerFlowerfield.png",
| |
− | "270":"http://www.gfwiki.org/images/6/67/2020summerOrphanage.png",
| |
− | "315":"http://www.gfwiki.org/images/6/6a/2021white_Berlin.png",
| |
− | "318":"http://www.gfwiki.org/images/d/df/2021white_Bernvillage.png",
| |
− | "334":"http://www.gfwiki.org/images/e/e3/2021white_Virgin.png",
| |
− | "335":"http://www.gfwiki.org/images/f/f0/2021white_Morridow.png",
| |
− | "356":"http://www.gfwiki.org/images/6/65/2021white_Safehouse.png",
| |
− | "357":"http://www.gfwiki.org/images/b/bd/2021white_GriffinSPAWAR.png",
| |
− | }; | |
− | | |
− | var bgmarray = {
| |
− | "BGM_Battle":"http://www.gfwiki.org/images/b/b4/BGM_Battle.mp3",
| |
− | "BGM_Empty":"http://www.gfwiki.org/images/7/72/BGM_Empty.mp3",
| |
− | "BGM_Room":"http://www.gfwiki.org/images/4/46/BGM_Room.mp3",
| |
− | "BGM_Sneak":"http://www.gfwiki.org/images/4/44/BGM_Sneak.mp3",
| |
− | "BGM_Truth":"http://www.gfwiki.org/images/b/b3/BGM_Truth.mp3",
| |
− | "BGM_Hello":"http://www.gfwiki.org/images/2/2a/GF_Daily_01_loop.mp3",
| |
− | "BGM_Sunshine":"http://www.gfwiki.org/images/3/3f/Home_formation_factory.mp3",
| |
− | "BGM_NightOPS":"http://www.gfwiki.org/images/4/4d/GUN_CineTense_loop.mp3",
| |
− | | |
− | "GF_EV9_Story":"http://www.gfwiki.org/images/2/29/GF_EV9_Story.mp3",
| |
− | "GF_Memorial":"http://www.gfwiki.org/images/1/17/GF_Memorial.mp3",
| |
− | "m_avg_casual":"http://www.gfwiki.org/images/c/cf/M_avg_casual.mp3",
| |
− | "GF_21winter_avg_pathfinder":"http://www.gfwiki.org/images/0/05/GF_21winter_avg_pathfinder.mp3",
| |
− | "GF_21winter_avg_mahaline":"http://www.gfwiki.org/images/c/ce/GF_21winter_avg_mahaline.mp3",
| |
− | | |
− | "BGM_stage1":"http://www.gfwiki.org/images/1/1d/GF_MAP1_BGM.mp3",
| |
− | "BGM_stage10":"http://www.gfwiki.org/images/d/db/GF_MAP10_BGM.mp3",
| |
− | "BGM_stage11":"http://www.gfwiki.org/images/d/dc/GF_MAP11_BGM.mp3",
| |
− | | |
− | "10213":"http://www.gfwiki.org/images/3/31/GF_EV6_90w_pt1.mp3",
| |
− | "10209":"http://www.gfwiki.org/images/6/6f/GF_EV6_G%26K_pt3.mp3",
| |
− | "10082":"http://www.gfwiki.org/images/d/da/GF_EV4_Map3.mp3"
| |
− | };
| |
− | | |
− | var linepos = 0;
| |
− | var endsign = 0; //该剧情是否结束的标志
| |
− | var avgtxt = ""; //avg文本
| |
− | var avgdoll = {left:0,center:0,right:0}; // 当前立绘
| |
− | var avgnextline = ""; //当一个场景有多个+台词时
| |
− | | |
− | var autosign = 0; //是否开启自动模式
| |
− | var autospeed = 4; //自动速度
| |
− | | |
− | var logallsign = 0; //log是否展示全部的标志
| |
− | | |
− | var printwordstr; //打印的台词
| |
− | var printwordnum; //打印台词的位置
| |
− | | |
− | var blacksign = 0; //黑幕的标志
| |
− | | |
− | var loadingfile = "";
| |
− | var loadingfin = {doll:0, bg:0, bgm:0};
| |
− | var loadingnow = {doll:0, bg:0, bgm:0};
| |
− | | |
− | function avgcreat(){
| |
− | var output = `
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/5/51/AVG0-3-2.txt">测试</div>
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/6/6a/AVG-44-B0-1.txt">0-1 塞勒涅的梦</div>
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/1/15/AVG-44-B1-1a.txt">1-1 a 来者的路</div>
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/3/30/AVG-44-B1-1b.txt">1-1 b 生存指南</div>
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/b/bf/AVG-44-B1-1First.txt">1-1 与蛇缠斗 Ⅰ 作战前</div>
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/6/62/AVG-44-B1-1-1point.txt">1-1 与蛇缠斗 Ⅰ 作战中1</div>
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/d/d4/AVG-44-B1-1-2point.txt">1-1 与蛇缠斗 Ⅰ 作战中2</div>
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/7/79/AVG-44-B1-1-2.txt">1-1 与蛇缠斗 Ⅱ</div>
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/8/8e/AVG-44-B1-2a.txt">1-2 a 匿伏</div>
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/a/a2/AVG-44-B1-2-1.txt">1-2 阿帕忒的诞生 Ⅰ</div>
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/d/dd/AVG-44-B1-2First.txt">1-2 阿帕忒的诞生 Ⅱ 作战中</div>
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/9/93/AVG-44-B1-2End.txt">1-2 阿帕忒的诞生 Ⅱ 作战后</div>
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/2/20/AVG-44-B1-3First.txt">1-3 赫墨拉指向光明 Ⅰ</div>
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/b/b8/AVG-44-B1-3-1.txt">1-3 赫墨拉指向光明 Ⅱ 作战前</div>
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/3/34/AVG-44-B1-3-2.txt">1-3 赫墨拉指向光明 Ⅲ</div>
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/d/dc/AVG-44-B1-4-1.txt">1-4 狮鹫之肩 Ⅰ</div>
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/4/42/AVG-44-B1-4-2.txt">1-4 狮鹫之肩 Ⅲ</div>`;
| |
− |
| |
− | /*<div class="avgchoice" link="http://www.gfwiki.org/images/5/51/AVG0-3-2.txt">测试</div>
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/4/4a/AVG-31-0-1.txt">纪念</div>
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/9/90/AVG-31-1A1-1.txt">幻影的和平 Ⅰ</div>
| |
− | <div class="avgchoice" link="http://www.gfwiki.org/images/0/04/AVG-31-1A2-1.txt">幻影的和平 Ⅱ</div>*/
| |
− | $("#avgchosebox").html(output);
| |
− | $(".avgchoice").css({"border":"1px #8886 solid", "padding":"6px 4px", "user-select":"none", "cursor":"pointer"});
| |
− | $(".avgchoice").click(function(){
| |
− | var xmlhttp = new XMLHttpRequest();
| |
− | xmlhttp.onreadystatechange = function() {
| |
− | if (this.readyState == 4 && this.status == 200) {
| |
− | avgtxt = (this.responseText);
| |
− | endsign = 0;
| |
− | avgnextline = "";
| |
− | readline();
| |
− | firstloading();
| |
− | }
| |
− | };
| |
− | xmlhttp.open("GET", $(this).attr("link"), true);
| |
− | xmlhttp.send();
| |
− | | |
− | loadingfile = $(this).attr("link");
| |
− | $("#avgbgm").attr("src", "");
| |
− | $("#avgbackground").html("");
| |
− | $(".avgdollpic").remove();
| |
− | linepos = 0;
| |
− | avgnextline = 0;
| |
− | });
| |
− | $(".avgchoice").mouseover(function(){
| |
− | $(this).css({"background-color":"#f4c430","color":"black"});
| |
− | });
| |
− | $(".avgchoice").mouseout(function(){
| |
− | $(this).css({"background-color":"inherit","color":"inherit"});
| |
− | });
| |
− | }
| |
− | | |
− | function divcreat(){
| |
− | var output = `
| |
− | <div id="settings" style="margin:5px; user-select:none;">
| |
− | <div id="avghand" class="avgbutton" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; background-color:#f4c430; color:black; cursor:pointer;">手动</div>
| |
− | <div id="avgauto" class="avgbutton" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">自动</div>
| |
− | <div id="avgautospeed" style="display:-webkit-inline-box; border:1px #eaeaea solid; vertical-align:top;"><table><tr>
| |
− | <td id="avgautominus" class="avgpushbutton" style="width:30%; display:inline-block; user-select:none; border:1px #eaeaea88 solid; padding:2px 10px; cursor:pointer;">-</td>
| |
− | <td id="avgautonum" style="width:40%; text-align:center;">4</td>
| |
− | <td id="avgautoplus" class="avgpushbutton" style="width:30%; display:inline-block; user-select:none; border:1px #eaeaea88 solid; padding:2px 10px; cursor:pointer;">+</td>
| |
− | </tr></table></div>
| |
− | <span style="padding:5px;"></span>
| |
− | <div id="avglog" state="off" class="avgbutton" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">LOG</div>
| |
− | <div id="avglognow" class="avgbutton" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; background-color:#f4c430; color:black; cursor:pointer;">当前</div>
| |
− | <div id="avglogall" class="avgbutton" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">全部</div>
| |
− | <span style="padding:5px;"></span>
| |
− | <div id="avgtobegin" class="avgpushbutton" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">返回开始</div>
| |
− | <div id="avgchose" state="off" class="avgpushbutton" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">选择剧情</div>
| |
− | <div id="avgload" style="display:inline-block; border-bottom:1px #eaeaea solid; font-size:12px; vertical-align:bottom; margin-left:12px;">加载进度: PIC[0/0] CG[0/0] BGM[0/0]</div>
| |
− | </div>
| |
− | | |
− | <div id="avgbox" style="width:1200px; height:675px; user-select:none; background-color:#111; border:1px #8888 solid;">
| |
− | <div id="avgbackground" style="position:absolute; width:1200px; height:675px; overflow:hidden; background-color:#111; z-index:1;"></div>
| |
− | <div id="avgword" style="width:600px; height:120px; position:absolute; top:584px; left:300px; z-index:7; background-image:url(http://www.gfwiki.org/images/3/3e/Avglinebg.png); background-size:7px; border: 1px #8888 solid; box-shadow: 0px 0px 3px #8888; overflow:hidden;">
| |
− | <div id="avgspeaker" style="margin:2px 8px; font-size:120%;"></div>
| |
− | <div id="avgline" style="margin:4px 15px; font-size:110%; position:absolute; top:26px;"></div>
| |
− | </div>
| |
− | </div>
| |
− |
| |
− | <div id="avglogbox" style="width:1200px; height:675px; border:1px #8888 solid; overflow-y:scroll; display:none; background-color:#111;"></div>
| |
− | <div id="avgchosebox" style="width:300px; height:675px; border:1px #8888 solid; overflow-y:scroll; display:none; position:absolute; background-color:#111; left:1220px; top:40px;"></div>
| |
− | <audio id="avgbgm" controls preload loop style="display:none;"></audio>`;
| |
− | | |
− | $("#mw-content-text").css({"height":"800px"});
| |
− | $("#mw-content-text").html(output);
| |
− | | |
− | $(".avgbutton").mouseover(function(){
| |
− | $(this).css({"border":"1px #f4c430 solid","padding":"5px 10px"});
| |
− | });
| |
− | $(".avgbutton").mouseout(function(){
| |
− | $(this).css({"border":"1px #eaeaea solid","padding":"5px 10px"});
| |
− | });
| |
− | | |
− | $(".avgpushbutton").mousedown(function(){
| |
− | $(this).css({"background-color":"#f4c430aa","color":"black"});
| |
− | });
| |
− | $(".avgpushbutton").mouseup(function(){
| |
− | $(this).css({"background-color":"#111111","color":"#eaeaea"});
| |
− | });
| |
− | | |
− | $("#avgauto").click(function(){
| |
− | autosign = 1;
| |
− | setTimeout(function(){ autoreadline(); }, 4000 / autospeed);
| |
− | $(this).css({"background-color":"#f4c430","color":"black"});
| |
− | $("#avghand").css({"background-color":"#111111","color":"#eaeaea"});
| |
− | });
| |
− | $("#avghand").click(function(){
| |
− | autosign = 0;
| |
− | $(this).css({"background-color":"#f4c430","color":"black"});
| |
− | $("#avgauto").css({"background-color":"#111111","color":"#eaeaea"});
| |
− | });
| |
− | | |
− | $("#avgautoplus").click(function(){
| |
− | var numnow = Number($("#avgautonum").html());
| |
− | $("#avgautonum").html((numnow >= 8) ? 8 : numnow + 1);
| |
− | autospeed = (numnow >= 8) ? 8 : numnow + 1;
| |
− | });
| |
− | $("#avgautominus").click(function(){
| |
− | var numnow = Number($("#avgautonum").html());
| |
− | $("#avgautonum").html((numnow <= 1) ? 1 : numnow - 1);
| |
− | autospeed = (numnow <= 1) ? 1 : numnow - 1;
| |
− | });
| |
− | | |
− | $("#avglog").click(function(){
| |
− | if($(this).attr("state") == "on"){
| |
− | $(this).attr("state", "off");
| |
− | $(this).css({"background-color":"#111111","color":"#eaeaea"});
| |
− | $("#avglogbox").fadeOut(300);
| |
− | setTimeout(function(){ $("#avgbox").fadeIn(300); }, 300);
| |
− | } else if($(this).attr("state") == "off"){
| |
− | $(this).attr("state", "on");
| |
− | $(this).css({"background-color":"#f4c430","color":"black"});
| |
− | $("#avgbox").fadeOut(300);
| |
− | setTimeout(function(){ $("#avglogbox").fadeIn(300); }, 300);
| |
− | avglogcreat();
| |
− | }
| |
− | });
| |
− | $("#avglognow").click(function(){
| |
− | $(this).css({"background-color":"#f4c430","color":"black"});
| |
− | $("#avglogall").css({"background-color":"#111111","color":"#eaeaea"});
| |
− | logallsign = 0;
| |
− | avglogcreat();
| |
− | });
| |
− | $("#avglogall").click(function(){
| |
− | $(this).css({"background-color":"#f4c430","color":"black"});
| |
− | $("#avglognow").css({"background-color":"#111111","color":"#eaeaea"});
| |
− | logallsign = 1;
| |
− | avglogcreat();
| |
− | });
| |
− | $("#avgtobegin").click(function(){
| |
− | endsign = 0;
| |
− | linepos = 0;
| |
− | avgnextline = "";
| |
− | readline();
| |
− | });
| |
− | $("#avgchose").click(function(){
| |
− | if($(this).attr("state") == "on"){
| |
− | $(this).attr("state", "off");
| |
− | $(this).css({"background-color":"#111111","color":"#eaeaea"});
| |
− | $("#avgchosebox").css("display","none");
| |
− | } else if($(this).attr("state") == "off"){
| |
− | $(this).attr("state", "on");
| |
− | $(this).css({"background-color":"#f4c430","color":"black"});
| |
− | $("#avgchosebox").css("display","block");
| |
− | avglogcreat();
| |
− | }
| |
− | });
| |
− | }
| |
− | | |
− | divcreat();
| |
− | avgcreat();
| |
− | $("#avgbox").click(function(){
| |
− | if(autosign == 1) $("#avghand").click();
| |
− | if(printwordstr && (printwordnum < printwordstr.length)) {printwordnum = printwordstr.length; printword();}
| |
− | else readline();
| |
− | });
| |
− | | |
− | function readline(){
| |
− | if(endsign == 1 || blacksign == 1) return;
| |
− | | |
− | if(avgnextline){
| |
− | printwordstr = avgnextline.slice(0, (avgnextline.indexOf("+") == -1) ? avgnextline.length : avgnextline.indexOf("+"));
| |
− | setTimeout(function(){ $("#avgline").html(""); printword(); }, 400);
| |
− | | |
− | printwordnum = 1;
| |
− | if(avgnextline.indexOf("+") == -1) avgnextline = "";
| |
− | else avgnextline = avgnextline.slice(avgnextline.indexOf("+") + 1, avgnextline.length);
| |
− | return;
| |
− | }
| |
− | | |
− | var thisline = avgtxt.slice(linepos, avgtxt.indexOf("\n", linepos));
| |
− | | |
− | //black
| |
− | if(thisline.indexOf("<黑屏2>") != -1 && blacksign == 0){
| |
− | $(".avgdollpic").fadeOut(1000 / autospeed);
| |
− | $("#avgbackground").fadeOut(1000 / autospeed); $("#avgword").fadeOut(1000 / autospeed);
| |
− | setTimeout(function(){
| |
− | $(".avgdollpic").remove(); $("#avgbackground").html(""); $("#avgbgm").attr("src", "");
| |
− | $("#avgspeaker").html(""); $("#avgline").html("");
| |
− | setTimeout(function(){
| |
− | blacksign = 2;
| |
− | readline();
| |
− | $(".avgdollpic").fadeIn(3000 / autospeed); $("#avgbackground").fadeIn(3000 / autospeed); $("#avgword").fadeIn(2000 / autospeed);
| |
− | }, 3000 / autospeed);
| |
− | }, 1000 / autospeed);
| |
− | blacksign = 1;
| |
− | return;
| |
− | } else if(blacksign == 2){
| |
− | blacksign = 0;
| |
− | }
| |
− | | |
− | //bgm
| |
− | if(thisline.indexOf("<BGM>") != -1){
| |
− | $("#avgbgm").attr("src", bgmarray[thisline.slice(thisline.indexOf("<BGM>") + ("<BGM>").length, thisline.indexOf("</BGM>"))]);
| |
− | $("#avgbgm")[0].play();
| |
− | }
| |
− | | |
− | //background
| |
− | if(thisline.indexOf("<BIN>") != -1){
| |
− | var bgsrc = bgarray[thisline.slice(thisline.indexOf("<BIN>") + ("<BIN>").length, thisline.indexOf("</BIN>"))];
| |
− | $("#avgbackground").html(`<img src="` + bgsrc + `" style="width:1200px; position:absolute; top:-262.5px;"/>`);
| |
− | }
| |
− | | |
− | //doll pic
| |
− | if(thisline.indexOf("<Speaker>") != -1){
| |
− | var avgpicstr = thisline.slice(0, thisline.indexOf("||"));
| |
− | var newavgdoll = {left:0,center:0,right:0};
| |
− | var the_speaker = "center";
| |
− | | |
− | // center
| |
− | if(avgpicstr.indexOf(";") == -1 && avgpicstr.indexOf("()") == -1)
| |
− | newavgdoll.center = avgpicstr.slice(0, avgpicstr.indexOf("<Speaker>"));
| |
− | // none
| |
− | else if(thisline.indexOf(";") == -1 && thisline.indexOf("()") != -1){}
| |
− | // speaker = left
| |
− | else if(avgpicstr.indexOf("<Speaker>") < avgpicstr.indexOf(";")){
| |
− | the_speaker = "left";
| |
− | avgpicleft = avgpicstr.slice(0, avgpicstr.indexOf("<Speaker>"));
| |
− | avgpicrigh = avgpicstr.slice(avgpicstr.indexOf(";") + 1, avgpicstr.length);
| |
− | newavgdoll = {left: avgpicleft,center:0,right: avgpicrigh};
| |
− | }
| |
− | // speaker = right
| |
− | else if(avgpicstr.indexOf("<Speaker>") > avgpicstr.indexOf(";")){
| |
− | the_speaker = "right";
| |
− | let avgpicstr_left = avgpicstr.slice(0, avgpicstr.indexOf(";") + 1);
| |
− | avgpicleft = avgpicstr_left.slice(0, ((avgpicstr_left.indexOf("<") < avgpicstr_left.indexOf(";")) ? avgpicstr_left.indexOf("<") : avgpicstr_left.indexOf(";")));
| |
− | avgpicrigh = avgpicstr.slice(avgpicstr.indexOf(";") + 1, avgpicstr.indexOf("<Speaker>"));
| |
− | newavgdoll = {left: avgpicleft,center:0,right: avgpicrigh};
| |
− | }
| |
− | | |
− | // the same - none - changed
| |
− | if(newavgdoll == avgdoll) {}
| |
− | else if(newavgdoll == {left:0,center:0,right:0}) {
| |
− | $(".avgdollpic").fadeOut(150);
| |
− | setTimeout(function(){ $(".avgdollpic").remove();}, 150);
| |
− | } else {
| |
− | // telephone frame mask - not speaker dark mask
| |
− | // if telephone frame mask exist , not speaker dark mask won't exist
| |
− | let telemask = `<div class="telemaskdiv" style="background-image:url(http://www.gfwiki.org/images/3/38/Telephonebg.png); position:absolute; top:37px; left:262px; width:264px; height:382px; background-size:5px; opacity:0.6; border:8px double #0690ef;"></div>`;
| |
− | let darkmask_a = `<div class="darkmask" style="position:absolute; top:0px; width:800px; height:800px; -webkit-mask-image:url(`;
| |
− | let darkmask_b = `); overflow:hidden; background-color:#0008; -webkit-mask-size:cover; display:none;"></div>`;
| |
− |
| |
− | if(newavgdoll.center != 0){
| |
− | let target_name = newavgdoll.center.slice(0, newavgdoll.center.indexOf("("));
| |
− | let avgdoll_div = document.querySelectorAll(".avgdollpic");
| |
− | let cen_sign = 1;
| |
− | | |
− | for(let i = 0; i < avgdoll_div.length; i++){
| |
− | let this_name = $(avgdoll_div[i]).attr("name-data").slice(0, $(avgdoll_div[i]).attr("name-data").indexOf("("));
| |
− | if(target_name == this_name){
| |
− | cen_sign = 0;
| |
− | $(avgdoll_div[i]).css({"z-index":"6"});
| |
− | $(avgdoll_div[i]).animate({"left":"200px"}, 300);
| |
− | if($(avgdoll_div[i]).children(".darkmask")){
| |
− | $(avgdoll_div[i]).children(".darkmask").fadeOut(150);
| |
− | $(avgdoll_div[i]).children(".darkmask").remove();
| |
− | }
| |
− | if($(avgdoll_div[i]).attr("name-data") != newavgdoll.center){
| |
− | setTimeout(function(){
| |
− | $(avgdoll_div[i]).attr("name-data", newavgdoll.center);
| |
− | $(avgdoll_div[i]).children("img").attr("src", dollarray[newavgdoll.center]);
| |
− | }, 300);
| |
− | }
| |
− | } else {
| |
− | $(avgdoll_div[i]).fadeOut(150);
| |
− | setTimeout(function(){ $(avgdoll_div[i]).remove();}, 150);
| |
− | }
| |
− | }
| |
− | | |
− | if(cen_sign){
| |
− | setTimeout(function(){
| |
− | let the_center = `<div class="avgdollpic" name-data="` + newavgdoll.center + `" style="width:800px; height:555px; position:absolute; top:180px; left:200px; overflow:hidden; z-index:6; display:none;">`
| |
− | the_center += `<img src="` + dollarray[newavgdoll.center] + `" style="width:800px; overflow:hidden; `;
| |
− | if((avgpicstr.indexOf("<通讯框>") != -1) && (avgpicstr.indexOf("<通讯框>") > avgpicstr.indexOf(";"))){
| |
− | the_center += `background-color:#12131d; -webkit-mask-image:url(http://www.gfwiki.org/images/d/d0/Mask.png);"/>` + telemask + `</div>`;
| |
− | } else the_center += `"/></div>`;
| |
− | $("#avgbox").append(the_center);
| |
− | $(".avgdollpic").fadeIn(150);
| |
− | }, 150);
| |
− | }
| |
− | }
| |
− | | |
− | if(newavgdoll.left != 0 && newavgdoll.right != 0){
| |
− | let left_name = newavgdoll.left.slice(0, newavgdoll.left.indexOf("("));
| |
− | let right_name = newavgdoll.right.slice(0, newavgdoll.right.indexOf("("));
| |
− | let avgdoll_div = document.querySelectorAll(".avgdollpic");
| |
− | let left_sign = 1, right_sign = 1;
| |
− | | |
− | for(let i = 0; i < avgdoll_div.length; i++){
| |
− | let this_name = $(avgdoll_div[i]).attr("name-data").slice(0, $(avgdoll_div[i]).attr("name-data").indexOf("("));
| |
− | if(left_name == this_name){
| |
− | left_sign = 0;
| |
− | $(avgdoll_div[i]).animate({"left":"20px"}, 300);
| |
− | $(avgdoll_div[i]).css({"z-index":((the_speaker == "left") ? "4" : "2")});
| |
− |
| |
− | if($(avgdoll_div[i]).children(".darkmask").length && (the_speaker == "left")){
| |
− | $(avgdoll_div[i]).children(".darkmask").fadeOut(150);
| |
− | $(avgdoll_div[i]).children(".darkmask").remove();
| |
− | } else if(!($(avgdoll_div[i]).children(".darkmask").length) && the_speaker == "right"){
| |
− | let darkmask = darkmask_a + dollarray[newavgdoll.left] + darkmask_b;
| |
− | $(avgdoll_div[i]).append(darkmask);
| |
− | $(".darkmask").fadeIn(300);
| |
− | }
| |
− |
| |
− | if($(avgdoll_div[i]).attr("name-data") != newavgdoll.left){
| |
− | setTimeout(function(){
| |
− | $(avgdoll_div[i]).attr("name-data", newavgdoll.left);
| |
− | $(avgdoll_div[i]).children("img").attr("src", dollarray[newavgdoll.left]);
| |
− | }, 150);
| |
− | }
| |
− | } else if(right_name == this_name){
| |
− | right_sign = 0;
| |
− | $(avgdoll_div[i]).animate({"left":"380px"}, 300);
| |
− | $(avgdoll_div[i]).css({"z-index":((the_speaker == "right") ? "4" : "2")});
| |
− | | |
− | if($(avgdoll_div[i]).children(".darkmask").length && (the_speaker == "right")){
| |
− | $(avgdoll_div[i]).children(".darkmask").fadeOut(150);
| |
− | $(avgdoll_div[i]).children(".darkmask").remove();
| |
− | } else if(!($(avgdoll_div[i]).children(".darkmask").length) && the_speaker == "left"){
| |
− | let darkmask = darkmask_a + dollarray[newavgdoll.right] + darkmask_b;
| |
− | $(avgdoll_div[i]).append(darkmask);
| |
− | $(".darkmask").fadeIn(300);
| |
− | }
| |
− | | |
− | if($(avgdoll_div[i]).attr("name-data") != newavgdoll.right){
| |
− | setTimeout(function(){
| |
− | $(avgdoll_div[i]).attr("name-data", newavgdoll.right);
| |
− | $(avgdoll_div[i]).children("img").attr("src", dollarray[newavgdoll.right]);
| |
− | }, 150);
| |
− | }
| |
− | } else {
| |
− | $(avgdoll_div[i]).fadeOut(150);
| |
− | setTimeout(function(){ $(avgdoll_div[i]).remove();}, 150);
| |
− | }
| |
− | }
| |
− | | |
− | if(left_sign){
| |
− | setTimeout(function(){
| |
− | let the_left = `<div class="avgdollpic" name-data="` + newavgdoll.left + `" style="width:800px; height:555px; position:absolute; top:180px; left:20px; overflow:hidden; z-index:` + ((the_speaker == "left") ? "4" : "2") + `;">`
| |
− | the_left += `<img src="` + dollarray[newavgdoll.left] + `" style="width:800px; overflow:hidden; `;
| |
− | if((avgpicstr.indexOf("<通讯框>") != -1) && (avgpicstr.indexOf("<通讯框>") < avgpicstr.indexOf(";"))){
| |
− | the_left += `background-color:#12131d; -webkit-mask-image:url(http://www.gfwiki.org/images/d/d0/Mask.png);"/>` + telemask + `</div>`;
| |
− | } else the_left += `"/></div>`;
| |
− | $("#avgbox").append(the_left);
| |
− | $(".avgdollpic").fadeIn(150);
| |
− | }, 150);
| |
− | }
| |
− | if(right_sign){
| |
− | setTimeout(function(){
| |
− | let the_right = `<div class="avgdollpic" name-data="` + newavgdoll.right + `" style="width:800px; height:555px; position:absolute; top:180px; left:380px; overflow:hidden; z-index:` + ((the_speaker == "right") ? "4" : "2") + `;">`
| |
− | the_right += `<img src="` + dollarray[newavgdoll.right] + `" style="width:800px; overflow:hidden; `;
| |
− | if((avgpicstr.indexOf("<通讯框>") != -1) && (avgpicstr.indexOf("<通讯框>") > avgpicstr.indexOf(";"))){
| |
− | the_right += `background-color:#12131d; -webkit-mask-image:url(http://www.gfwiki.org/images/d/d0/Mask.png);"/>` + telemask + `</div>`;
| |
− | } else the_right += `"/></div>`;
| |
− | $("#avgbox").append(the_right);
| |
− | $(".avgdollpic").fadeIn(150);
| |
− | }, 150);
| |
− | }
| |
− | }
| |
− | }
| |
− | | |
− | avgdoll = newavgdoll;
| |
− | } else {
| |
− | $(".avgdollpic").fadeOut(150);
| |
− | setTimeout(function(){ $(".avgdollpic").remove();}, 150);
| |
− | }
| |
− | | |
− | //word speaker
| |
− | if(thisline.indexOf("<Speaker>") != -1){
| |
− | var speaker = thisline.slice(thisline.indexOf("<Speaker>") + ("<Speaker>").length , thisline.indexOf("</Speaker>"));
| |
− | setTimeout(function(){ $("#avgspeaker").html(speaker); }, 400);
| |
− | } else setTimeout(function(){ $("#avgspeaker").html(" "); }, 400);
| |
− | | |
− | //word line - color & size handler
| |
− | if(thisline.indexOf(":") != -1){
| |
− | let keyword = (thisline.indexOf("+") != -1) ? "+" : "\n";
| |
− | let line = thisline.slice(thisline.indexOf(":") + 1, thisline.length);
| |
− | // color & size
| |
− | line = line.replace(/<\/color>/g, "</span").replace(/<\/Size>/g, "</span");
| |
− | line = line.replace(/<color=/g, "<span style=\"color:").replace(/<Size=/g, "<span style=\"font-size:1");
| |
− | for(let j = 0; j < line.length; j++){
| |
− | if(line.slice(j - ("font-size:1").length, j) == "font-size:1") line = line.slice(0, j+2) + "%" + line.slice(j+2, line.length);
| |
− | }
| |
− | line = line.replace(/>/g, "\">").replace(/<\/span/g, "<\/span>");
| |
− | | |
− | printwordstr = line.slice(0, line.indexOf(keyword));
| |
− | | |
− | $("#avgword").animate({opacity:"0.0"}, 400, "swing");
| |
− | setTimeout(function(){ $("#avgline").html(""); $("#avgword").animate({opacity:"1.0"}, 400, "swing");}, 400);
| |
− | setTimeout(function(){ printword();}, 800);
| |
− | printwordnum = 1;
| |
− | | |
− | if((line.indexOf("+") != -1)) avgnextline = line.slice(line.indexOf("+") + 1, line.length);
| |
− | } else {
| |
− | $("#avgword").animate({opacity:"0.0"}, 400, "swing");
| |
− | setTimeout(function(){ $("#avgline").html(""); $("#avgword").animate({opacity:"1.0"}, 400, "swing");}, 400);
| |
− | }
| |
− | | |
− | //position sign
| |
− | if(avgtxt.indexOf("\n", linepos) == -1) endsign = 1;
| |
− | linepos = avgtxt.indexOf("\n", linepos) + 1;
| |
− | if($("#avglog").attr("state") == "on") avglogcreat();
| |
− | }
| |
− | | |
− | function autoreadline(){
| |
− | if(autosign == 0) return;
| |
− | if($("#avglog").attr("state") != "on") readline();
| |
− | setTimeout(function(){
| |
− | autoreadline();
| |
− | }, 1000 + 600 * printwordstr.replace(/<\/span>/g, "").replace(/<span style="color:#[0-9A-Z]{6};">/g, "").replace(/<span style="font-size:1[0-9]{2}%;">/g, "").length / autospeed);
| |
− | }
| |
− | | |
− | function printword(){
| |
− | if(printwordstr[printwordnum - 1] == "<") printwordnum = printwordstr.indexOf(">", printwordnum - 1) + 2;
| |
− | let thisprint = printwordstr.slice(0, printwordnum);
| |
− | if(thisprint.indexOf("<span") != -1 && ((thisprint.indexOf("</span") == -1) || (thisprint.lastIndexOf("</span") < thisprint.lastIndexOf("<span")))) $("#avgline").html(thisprint + "</span>");
| |
− | else $("#avgline").html(thisprint);
| |
− | | |
− | printwordnum ++;
| |
− | if(printwordnum > printwordstr.length) return;
| |
− | setTimeout(function(){ printword();}, 200 / autospeed);
| |
− | }
| |
− | | |
− | function avglogcreat(){
| |
− | var logpos = 0;
| |
− | var logline = 1;
| |
− | var output = ``;
| |
− | | |
− | while(1){
| |
− | var thisline = (avgtxt.indexOf("\n", logpos) == -1) ? avgtxt.slice(logpos, avgtxt.length) : avgtxt.slice(logpos, avgtxt.indexOf("\n", logpos));
| |
− | | |
− | output += `<div style="border-top:1px #8886 dashed; padding:7px 4px;"><table style="width:100%;"><tr><td avgpos="` + logpos + `"`;
| |
− | if(thisline.indexOf("<黑屏2>") != -1) output += ` class="avglogtd" style="border:1px dashed #f4c430; cursor:zoom-in;`;
| |
− | else output += ` style="border:none;`;
| |
− | output += `width:5%; text-align:center; vertical-align:baseline;">` + logline + `</td>`;
| |
− | output += `<td style="width:15%; text-align:center; vertical-align:baseline;">` + ((thisline.indexOf("<Speaker>") != -1) ? thisline.slice(thisline.indexOf("<Speaker>") + ("<Speaker>").length , thisline.indexOf("</Speaker>")) : "");
| |
− | output += `</td><td style="width:80%; vertical-align:baseline;">` + thisline.slice(thisline.indexOf(":") + 1, thisline.length).replace(/\+/g, "<br>") + `</td></tr></table></div>`;
| |
− |
| |
− | if(avgtxt.indexOf("\n", logpos) == -1) break;
| |
− | logpos = avgtxt.indexOf("\n", logpos) + 1;
| |
− | if(logpos >= linepos && logallsign == 0) break;
| |
− | logline ++;
| |
− | }
| |
− | | |
− | $("#avglogbox").html(output);
| |
− | | |
− | $(".avglogtd").click(function(){
| |
− | endsign = 0;
| |
− | $("#avglog").click();
| |
− | avgnextline = "";
| |
− | linepos =Number( $(this).attr("avgpos"));
| |
− | readline();
| |
− | });
| |
− | }
| |
− | | |
− | function firstloading(){
| |
− | loadingfin = {doll:0, bg:0, bgm:0};
| |
− | loadingnow = {doll:0, bg:0, bgm:0};
| |
− | | |
− | var logpos = 0;
| |
− | var loading = {doll:[], bg:[], bgm:[]};
| |
− | | |
− | while(1){
| |
− | var thisline = (avgtxt.indexOf("\n", logpos) == -1) ? avgtxt.slice(logpos, avgtxt.length) : avgtxt.slice(logpos, avgtxt.indexOf("\n", logpos));
| |
− | | |
− | if(thisline.indexOf("<Speaker>") != -1 && thisline.indexOf("()<Speaker>") == -1){
| |
− | let avgpicstr = thisline.slice(0, thisline.indexOf("||"));
| |
− | let newavgdoll = [];
| |
− | if(avgpicstr.indexOf(";") == -1 && avgpicstr.indexOf("()") == -1){
| |
− | newavgdoll.push(avgpicstr.slice(0, avgpicstr.indexOf("<Speaker>")));
| |
− | } else if(thisline.indexOf(";") == -1 && thisline.indexOf("()") != -1){
| |
− | } else if(avgpicstr.indexOf("<Speaker>") < avgpicstr.indexOf(";")){
| |
− | newavgdoll.push(avgpicstr.slice(0, avgpicstr.indexOf("<Speaker>")));
| |
− | newavgdoll.push(avgpicstr.slice(avgpicstr.indexOf(";") + 1, avgpicstr.length));
| |
− | } else if(avgpicstr.indexOf("<Speaker>") > avgpicstr.indexOf(";")){
| |
− | avgpicleft = avgpicstr.slice(0, ((avgpicstr.indexOf("<") < avgpicstr.indexOf(";")) ? avgpicstr.indexOf(";") : avgpicstr.indexOf("<")));
| |
− | newavgdoll.push(avgpicstr.slice(avgpicstr.indexOf(";") + 1, avgpicstr.indexOf("<Speaker>")));
| |
− | }
| |
− | | |
− | for(let i = 0; i < newavgdoll.length; i++){
| |
− | let sign = 1;
| |
− | for(let j = 0; j < loading.doll.length; j++){
| |
− | if(newavgdoll[i] == loading.doll[j]){ sign = 0; break; }
| |
− | } if(sign) loading.doll.push(newavgdoll[i]);
| |
− | }
| |
− | }
| |
− | if(thisline.indexOf("<BGM>") != -1){
| |
− | let sign = 1;
| |
− | let a = thisline.slice(thisline.indexOf("<BGM>") + ("<BGM>").length, thisline.indexOf("</BGM>"));
| |
− | for(let i = 0; i < loading.bgm.length; i++){
| |
− | if(a == loading.bgm[i]){ sign = 0; break; }
| |
− | } if(sign) loading.bgm.push(a);
| |
− | }
| |
− | if(thisline.indexOf("<BIN>") != -1){
| |
− | let sign = 1;
| |
− | let a = thisline.slice(thisline.indexOf("<BIN>") + ("<BIN>").length, thisline.indexOf("</BIN>"));
| |
− | for(let i = 0; i < loading.bg.length; i++){
| |
− | if(a == loading.bg[i]){ sign = 0; break; }
| |
− | } if(sign) loading.bg.push(a);
| |
− | }
| |
− | | |
− | if(avgtxt.indexOf("\n", logpos) == -1) break;
| |
− | logpos = avgtxt.indexOf("\n", logpos) + 1;
| |
− | }
| |
− | | |
− | console.log(loading);
| |
− | loadingfin.doll = loading.doll.length;
| |
− | loadingfin.bg = loading.bg.length;
| |
− | loadingfin.bgm = loading.bgm.length;
| |
− | $("#avgload").html("加载进度: PIC[" + loadingnow.doll + "/" + loadingfin.doll + "] CG[" + loadingnow.bg + "/" + loadingfin.bg + "] BGM[" + loadingnow.bgm + "/" + loadingfin.bgm + "]");
| |
− | | |
− | for(i in loading.doll){
| |
− | var img = new Image();
| |
− | $(img).load(function(){
| |
− | if($(this).attr("file") == loadingfile) loadingnow.doll ++;
| |
− | $("#avgload").html("加载进度: PIC[" + loadingnow.doll + "/" + loadingfin.doll + "] CG[" + loadingnow.bg + "/" + loadingfin.bg + "] BGM[" + loadingnow.bgm + "/" + loadingfin.bgm + "]");
| |
− | $(this).remove();
| |
− | });
| |
− | $(img).attr({"src":dollarray[loading.doll[i]], "file":loadingfile});
| |
− | }
| |
− | for(i in loading.bg){
| |
− | var img = new Image();
| |
− | $(img).load(function(){
| |
− | if($(this).attr("file") == loadingfile) loadingnow.bg ++;
| |
− | $("#avgload").html("加载进度: PIC[" + loadingnow.doll + "/" + loadingfin.doll + "] CG[" + loadingnow.bg + "/" + loadingfin.bg + "] BGM[" + loadingnow.bgm + "/" + loadingfin.bgm + "]");
| |
− | $(this).remove();
| |
− | });
| |
− | $(img).attr({"src":bgarray[loading.bg[i]], "file":loadingfile});
| |
− | }
| |
− | for(i in loading.bgm){
| |
− | var audio = new Audio();
| |
− | audio.addEventListener("canplaythrough", function(){
| |
− | if($(this).attr("file") == loadingfile) loadingnow.bgm ++;
| |
− | $("#avgload").html("加载进度: PIC[" + loadingnow.doll + "/" + loadingfin.doll + "] CG[" + loadingnow.bg + "/" + loadingfin.bg + "] BGM[" + loadingnow.bgm + "/" + loadingfin.bgm + "]");
| |
− | $(this).remove();
| |
− | });
| |
− | $(audio).attr({"src":bgmarray[loading.bgm[i]], "file":loadingfile, "preload":"preload", "controls":"controls"});
| |
− | }
| |
− | }
| |
− | })</script></includeonly><noinclude>{{#Widget:AVGplayer}}</noinclude>
| |