打开主菜单

少前百科GFwiki β

更改

Widget:AVGplayer/js

添加16,114字节2021年4月27日 (二) 08:58
测试
<includeonly><script type="text/javascript">(window.RLQ=window.RLQ||[]).push(function(){
var dollarray= { "M16(3)":"http://www.gfwiki.org/images/d/db/M16A1_T.png", bgarray "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",  "AN94(0)":"http://www.gfwiki.org/images/b/b0/Pic_AN94.png", "AN94(2)":"http://www.gfwiki.org/images/5/53/AN94_angry.png", "AN94(3)":"http://www.gfwiki.org/images/a/ac/AN94_laugh.png", "AN94(4)":"http://www.gfwiki.org/images/b/b5/AN94_sad.png", "AN94(5)":"http://www.gfwiki.org/images/f/f7/AN94_surprise.png", "AN94(11)":"http://www.gfwiki.org/images/3/3b/Pic_AN94_1.png", "AN94(12)":"http://www.gfwiki.org/images/a/ae/Pic_AN94_2.png",  "AK12(0)":"http://www.gfwiki.org/images/0/00/Pic_AK12.png", "AK12(2)":"http://www.gfwiki.org/images/b/b3/AK12_angry.png", "AK12(3)":"http://www.gfwiki.org/images/e/e8/AK12_battle.png", "AK12(4)":"http://www.gfwiki.org/images/8/8e/AK12_laugh.png", "AK12(12)":"http://www.gfwiki.org/images/0/01/Pic_AK12_1.png", "AK12(13)":"http://www.gfwiki.org/images/0/09/Pic_AK12_2.png",  "RPK16(7)":"http://www.gfwiki.org/images/e/e2/Pic_RPK16_1.png", "RPK16(8)":"http://www.gfwiki.org/images/8/80/Pic_RPK16_2.png", "RPK16(9)":"http://www.gfwiki.org/images/9/93/Pic_RPK16_3.png", "RPK16(10)":"http://www.gfwiki.org/images/6/6c/Pic_RPK16_4.png",  "AK15(1)":"http://www.gfwiki.org/images/f/f8/Pic_AK15_D.png", "AK15(6)":"http://www.gfwiki.org/images/4/4b/Pic_AK15_1.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(0)":"http://www.gfwiki.org/images/b/b2/NPC-Ange.png", "NPC-Ange(1)":"http://www.gfwiki.org/images/c/ce/NPC-Ange_1.png", "NPC-Ange(2)":"http://www.gfwiki.org/images/8/82/Pic_NPC-Ange_2.png", "NPC-Ange(3)":"http://www.gfwiki.org/images/6/6e/NPC-Ange%283%29.png", "NPC-Ange(4)":"http://www.gfwiki.org/images/6/6e/NPC-Ange%284%29.png", "NPC-Ange(5)":"http://www.gfwiki.org/images/4/47/NPC-Ange%285%29.png", "NPC-Ange(6)":"http://www.gfwiki.org/images/c/c1/NPC-Ange%286%29.png", "NPC-Ange(7)":"http://www.gfwiki.org/images/4/43/NPC-Ange%287%29.png", "NPC-AngeStreet(0)":"http://www.gfwiki.org/images/8/87/NPC-AngeStreet.png",  "NPC-Jason(0)":"http://www.gfwiki.org/images/e/e5/NPC-Jason.png", "NPC-Jason(1)":"http://www.gfwiki.org/images/d/d5/NPC-Jason_1.png",  "NPC-Keven(0)":"http://www.gfwiki.org/images/3/37/Pic_NPC-Keven_0.png", "NPC-Keven(1)":"http://www.gfwiki.org/images/2/24/Pic_NPC-Keven_1.png", "NPC-Keven(2)":"http://www.gfwiki.org/images/f/f2/Pic_NPC-Keven_2.png",  "NPC-Light(0)":"http://www.gfwiki.org/images/9/95/NPC-Light%280%29.png", "NPC-Light(1)":"http://www.gfwiki.org/images/5/52/NPC-Light%281%29.png", "NPC-Light(2)":"http://www.gfwiki.org/images/d/d5/NPC-Light%282%29.png", "NPC-Light(3)":"http://www.gfwiki.org/images/b/b0/NPC-Light%283%29.png", "NPC-Light(4)":"http://www.gfwiki.org/images/2/2e/NPC-Light%284%29.png", "NPC-Light(5)":"http://www.gfwiki.org/images/d/dd/NPC-Light%285%29.png",  "NPC-Shadowless(0)":"http://www.gfwiki.org/images/8/88/NPC-Shadowless%280%29.png", "NPC-Shadowless(1)":"http://www.gfwiki.org/images/5/59/NPC-Shadowless%281%29.png", "NPC-Shadowless(2)":"http://www.gfwiki.org/images/f/fc/NPC-Shadowless%282%29.png", "NPC-Shadowless(3)":"http://www.gfwiki.org/images/8/88/NPC-Shadowless%283%29.png", "NPC-Shadowless(4)":"http://www.gfwiki.org/images/0/02/NPC-Shadowless%284%29.png", "NPC-Shadowless(5)":"http://www.gfwiki.org/images/7/78/NPC-Shadowless%285%29.png", "NPC-Shadowless(7)":"http://www.gfwiki.org/images/e/ec/NPC-Shadowless%287%29.png", "NPC-Shadowless(8)":"http://www.gfwiki.org/images/9/92/NPC-Shadowless%288%29.png", "NPC-Shadowless(9)":"http://www.gfwiki.org/images/a/a0/NPC-Shadowless%289%29.png", "NPC-Shadowless(10)":"http://www.gfwiki.org/images/b/bb/NPC-Shadowless%2810%29.png", "NPC-Shadowless(11)":"http://www.gfwiki.org/images/9/98/NPC-Shadowless%2811%29.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-Ambassador(0)":"http://www.gfwiki.org/images/e/ef/NPC-Ambassador.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(0)":"http://www.gfwiki.org/images/4/41/Narciss%280%29.png", "Narciss(1)":"http://www.gfwiki.org/images/d/db/Narciss%281%29.png", "Narciss(2)":"http://www.gfwiki.org/images/9/96/Narciss%282%29.png", "Narciss(3)":"http://www.gfwiki.org/images/6/61/Narciss%283%29.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-Morridow(0)":"http://www.gfwiki.org/images/d/d4/Pic_NPC-Morridow_0.png", "NPC-Morridow(1)":"http://www.gfwiki.org/images/f/f8/Pic_NPC-Morridow_1.png", "NPC-Morridow(2)":"http://www.gfwiki.org/images/1/14/Pic_NPC-Morridow_2.png", "NPC-Morridow(3)":"http://www.gfwiki.org/images/5/5f/Pic_NPC-Morridow_3.png", "NPC-Morridow(4)":"http://www.gfwiki.org/images/d/dd/Pic_NPC-Morridow_4.png", "NPC-Morridow(5)":"http://www.gfwiki.org/images/5/53/Pic_NPC-Morridow_5.png", "NPC-Morridow(6)":"http://www.gfwiki.org/images/f/f0/Pic_NPC-Morridow_6.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", "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-Bodyguard1(0)":"http://www.gfwiki.org/images/6/6b/NPC-Bodyguard1.png", "NPC-Bodyguard2(0)":"http://www.gfwiki.org/images/f/f1/NPC-Bodyguard2.png", bgmarray;
var xmlhttp_Spot = new XMLHttpRequest /* 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",xmlhttp_Spot /* 112 */ "NEGEV(0)":"http://www.gfwiki.org/images/0/04/Pic_NEGEV.onreadystatechange = functionpng", /* 257 */ "M200(0) {":"http://www.gfwiki.org/images/3/3e/Pic_M200.png",if /* 272 */ "DesertEagle(this0)":"http://www.gfwiki.readyState == org/images/4 && this/4b/Pic_DesertEagle.status == 200png", /* 296 */ "SL8(0) { ":"http://www.gfwiki.org/images/9/92/Pic_SL8.png", dollarray = JSON/* 296 */ "SL8(2)":"http://www.gfwiki.parseorg/images/9/9c/Pic_SL8_1.png", /* 296 */ "SL8(this3)":"http://www.responseTextgfwiki.org/images/d/da/Pic_SL8_3.replacepng", /* 316 */ "GeneralLiu(0)":"http://www.gfwiki.org/images/a/a0/\Pic_GeneralLiu.png", /\*\s{316 */ "GeneralLiu(1)":"http://www.gfwiki.org/images/d/d7/Pic_GeneralLiu_D.png",4}\ /* 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{1/dc/Pic_VP1915.png",4}\s{1 /* 334 */ "Savage99(0)":"http://www.gfwiki.org/images/e/ee/Pic_Savage99.png",4}\ /* 335 *\/"Fedorov(0)":"http://www.gfwiki.org/gimages/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.replacepng", "VHS(0)":"http://www.gfwiki.org/images/5/57/Pic_VHS.png",\n}   "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"\n}, "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",
};
xmlhttp_Spot.open("GET", "http://www.gfwiki.org/index.php?title=JSON:AVGDOLL&action=raw", true);
xmlhttp_Spot.send();
var bgarray;
var xmlhttp_Spot = new XMLHttpRequest();
xmlhttp_Spot.onreadystatechange = function() {
xmlhttp_Spot.send();
var xmlhttp_Spot bgmarray = new XMLHttpRequest();{ "BGM_Battle":"http://www.gfwiki.org/images/b/b4/BGM_Battle.mp3", "BGM_Danger":"http://www.gfwiki.org/images/9/98/BGM_Danger.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",xmlhttp_Spot "BGM_Brain":"http://www.onreadystatechange = function() {gfwiki.org/images/2/2d/BGM_Brain.mp3",if (this "BGM_Sneak":"http://www.gfwiki.readyState == org/images/4 && this/44/BGM_Sneak.mp3", "BGM_Truth":"http://www.gfwiki.org/images/b/b3/BGM_Truth.status == 200) { mp3", bgmarray = JSON"BGM_Hello":"http://www.gfwiki.org/images/2/2a/GF_Daily_01_loop.parse(thismp3", "BGM_Sunshine":"http://www.responseTextgfwiki.replace(org/\images/\*\s{13/3f/Home_formation_factory.mp3", "BGM_NightOPS":"http://www.gfwiki.org/images/4}\d{/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",4}\s{ "GF_21winter_avg_nightbar":"http://www.gfwiki.org/images/0/09/GF_21winter_avg_nightbar.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",  "10030":"http://www.gfwiki.org/images/b/b3/GF_EV3_Map1_tri.mp3", "10051":"http://www.gfwiki.org/images/8/87/GF_EV4_Map1.mp3", "10065":"http://www.gfwiki.org/images/a/a1/Bluestar_1_0%28win%29.mp3", "10082":"http://www.gfwiki.org/images/d/da/GF_EV4_Map3.mp3", "10106":"http://www.gfwiki.org/images/3/39/GF_EV5_BattleL1.mp3", "10194":"http://www.gfwiki.org/images/4}\*\/49/gGF_EV6_G%26K_pt1.mp3", "10209"):"http://www.gfwiki.replace(org/images/6/6f/GF_EV6_G%26K_pt3.mp3",\n} ", 10213"\n}:"));}http://www.gfwiki.org/images/3/31/GF_EV6_90w_pt1.mp3",
};
xmlhttp_Spot.open("GET", "http://www.gfwiki.org/index.php?title=JSON:AVGBGM&action=raw", true);
xmlhttp_Spot.send();
var searray = {
}
var animearray effarray = { "%%code=AVG_ink1%%":"https://img.nga.178.com/attachments/mon_202104/25/-bqqbQ8h20-jm6nXdZ3hT3cS8w-50.mp4?filename=AVG%5fink1%2emp4", "%%code=NPC_TV_0%%":"http://www.gfwiki.org/images/2/2c/NPC-news%280%29.png", "%%code=NPC_TV_1%%":"http://www.gfwiki.org/images/2/262e/AVG_ink1NPC-news%281%29.png", "%%code=NPC_TV_2%%":"http://www.gfwiki.org/images/8/81/NPC-news%282%29.png", "%%code=NPC_TV_3%%":"http://www.gfwiki.org/images/b/bc/NPC-news%283%29.png", "%%code=NPC_TV_4%%":"http://www.gfwiki.org/images/3/37/NPC-news%284%29.png", "%%code=NPC_TV_5%%":"http://www.gfwiki.org/images/7/76/NPC-news%285%29.png", "%%code=NPC_TV_6%%":"http://www.gfwiki.org/images/6/69/NPC-news%286%29.png", "%%code=NPC_TV_7%%":"http://www.gfwiki.org/images/1/1f/NPC-news%287%29.png", "%%code=NPC_TV_8%%":"http://www.gfwiki.org/images/f/f4/NPC-news%288%29.png", "%%code=NPC_TV_9%%":"http://www.gfwiki.org/images/f/f2/NPC-news%289%29.png", "%%code=NPC_TV_10%%":"http://www.gfwiki.org/images/4/40/NPC-news%2810%29.png", "%%code=NPC_TV_11%%":"http://www.gfwiki.org/images/0/05/NPC-news%2811%29.png", "%%code=NPC_TV_12%%":"http://www.gfwiki.org/images/a/af/NPC-news%2812%29.png", "%%code=NPC_TV_13%%":"http://www.gfwiki.org/images/1/13/NPC-news%2813%29.png", "%%code=NPC_TV_14%%":"http://www.gfwiki.org/images/7/70/NPC-news%2814%29.png", "%%code=NPC_TV_15%%":"http://www.gfwiki.org/images/8/8c/NPC-news%2815%29.png", "%%code=NPC_TV_16%%":"http://www.gfwiki.org/images/d/df/NPC-news%2816%29.png", "%%code=NPC_TV_17%%":"http://www.gfwiki.org/images/d/dc/NPC-news%2817%29.png", "%%code=NPC_TV_18%%":"http://www.gfwiki.org/images/c/c6/NPC-news%2818%29.png", "%%code=NPC_TV_19%%":"http://www.gfwiki.org/images/c/cf/NPC-news%2819%29.flvpng",
}
var autosign = 0; /* 是否开启自动模式 */
var autospeed = 4; /* 自动速度 */
var logallsign = 0; /* log是否展示全部的标志 */
var loadingfile = "";
var loadingfin = {doll:0, bg:0, bgm:0, eff:0};var loadingnow = {doll:0, bg:0, bgm:0, eff:0};
function avgcreat(){
loadingfile = $(this).attr("link");
$("#avgtitle").html($(this).children("span.avgname").html().replace(/<span class="subsign">/g, "").replace(/<\/span>/g, ""));
console.log($(this).children("span.avgname").html().replace(/<span class="subsign">/g, "").replace(/<\/span>/g, "") + " : " + $(this).attr("link"));
$("#avgbgm").attr("src", "");
function divcreat(){
var html_string = `
<div id="avgtitle"><\/div>
 
<div id="avgsettings">
<div id="avgblack" state="off" class="avgbutton">黑幕<\/div>
<div id="avgbtnbox">
<div id="avgsound" state="off" class="avgsmallbtn">▢)<\/div> <div id="avgsoundminus" class="avgsmallbtn avgpushbutton">-<\/div> <div id="avgsoundwidth" state="8"><\/div> <div id="avgsoundplus" class="avgsmallbtn avgpushbutton">+<\/div> <\/div> <span style="padding:5px;"><\/span>
<div id="avghand" class="avgbutton">手动<\/div> <div id="avgauto" class="avgbutton">自动<\/div>
<div id="avgbtnbox">
<div id="avgautominus" class="avgsmallbtn avgpushbutton">-<\/div> <div id="avgautonum">4<\/div> <div id="avgautoplus" class="avgsmallbtn avgpushbutton">+<\/div> <\/div> <span style="padding:5px;"><\/span>
<div id="avglog" state="off" class="avgbutton">LOG<\/div> <div id="avglognow" class="avgbutton avgbutton">当前<\/div> <div id="avglogall" class="avgbutton avgbutton">全部<\/div> <span style="padding:5px;"><\/span>
<div id="avgtobegin" class="avgbutton avgpushbutton">返回开始<\/div> <div id="avgchose" state="off" class="avgbutton">选择剧情</div> <div id="avgtitle"><\/div> <div id="avgload">加载进度: PIC[0/0] CG[0/0] BGM[0/0] OTH[0/0]<\/div> <\/div>
<div id="avgbox">
<div id="avgbackground"><\/div> <video id="avganime" autoplay="autoplay" preload="auto"></video>
<div id="avgword">
<div id="avgspeaker"><\/div> <div id="avgline"><\/div> <\/div> <\/div>
<div id="avglogbox" style="width:1200px; height:675px; border:1px #8888 solid; overflow-y:scroll; display:none; background-color:#111;"><\/div> <audio id="avgbgm" controls preload loop style="display:none;"><\/audio>`;
$("#avgdiv").html(html_string);
function readline(){
if(endsign blacksign == 1 || blacksign branchblock == 1 || branchblock ) return; if(endsign == 1) { $("#avgline").append(`<div class="endsigndiv"">${$("#avgtitle").html()} END</div>`); return; }
if(avgnextline){
if(avgbranches.length != 0){
let html_string = `<div id="avgbranchdiv">`;
for(i in avgbranches) html_string += `<div class="avgbranch" index="${i}">${avgbranches[i]}<\/div>`; html_string += `<\/div>`;
$("#avgbox").append(html_string);
$("#avgbgm").attr("src", bgmarray[thisline.slice(thisline.indexOf("<BGM>") + ("<BGM>").length, thisline.indexOf("</BGM>"))]);
$("#avgbgm")[0].play();
}
 
//special '<' efect
if(thisline.indexOf("<关闭蒙版>") != -1) $(".avgefect").remove();
if(thisline.indexOf("<回忆>") != -1) $("#avgbox").append(`<div class="avgefect" style="width:1200px; height:675px; position:absolute; z-index:10; backdrop-filter:sepia(0.8) brightness(0.8)"><\/div>`);
 
/*-- common_effect mp4 or other code --*/
if(thisline.indexOf("<common_effect>") != -1){
effect_creat(thisline.slice(thisline.indexOf("<common_effect>") + ("<common_effect>").length, thisline.indexOf("</common_effect>")));
}
var bgsrc = bgarray[thisline.slice(thisline.indexOf("<BIN>") + ("<BIN>").length, thisline.indexOf("</BIN>"))];
$("#avgbackground").html(`<img src="` + bgsrc + `"/>`);
if(thisline.indexOf("<Night>") != -1) $("#avgbackground").append(`<div style="width:1200px; height:675px; position:absolute; backdrop-filter:saturate(0.6) brightness(0.4) hue-rotate(15deg)"><\/div>`); } // background_mp4 common_effect if(thisline.indexOf("<common_effect>") != -1){ var animesrc = animearray[thisline.slice(thisline.indexOf("<common_effect>") + ("<common_effect>").length, thisline.indexOf("</common_effect>"))]; $("#avganime").css("display","unset"); $("#avganime").attr("src", animesrc); $("#avganime").bind('ended', function(){ $("#avganime").css("display","none"); });
}
// telephone frame mask - not speaker dark mask
// if telephone frame mask exist , not speaker dark mask won't exist
let telemask = `<div class="telemaskdiv"><\/div>`;
let darkmask_a = `<div class="darkmask" style="-webkit-mask-image:url(`;
let darkmask_b = `); -webkit-mask-size:cover; display:none;"><\/div>`;
if(newavgdoll.center != 0){
the_center += `<img src="` + dollarray[newavgdoll.center] + `" style="`;
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); -webkit-mask-position-x: 20px28px; -webkit-mask-size: 850px;"/>` + telemask + `<\/div>`; } else the_center += `"/><\/div>`;
$("#avgbox").append(the_center);
$(".avgdollpic").fadeIn(150);
the_left += `<img src="` + dollarray[newavgdoll.left] + `" style="`;
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); -webkit-mask-position-x: 20px28px; -webkit-mask-size: 850px;"/>` + telemask + `<\/div>`; } else the_left += `"/><\/div>`;
$("#avgbox").append(the_left);
$(".avgdollpic").fadeIn(150);
the_right += `<img src="` + dollarray[newavgdoll.right] + `" style="`;
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); -webkit-mask-position-x: 20px28px; -webkit-mask-size: 850px;"/>` + telemask + `<\/div>`; } else the_right += `"/><\/div>`;
$("#avgbox").append(the_right);
$(".avgdollpic").fadeIn(150);
let line = thisline.slice(thisline.indexOf(":") + 1, thisline.length);
// color & size
line = line.replace(/<\/color>/g, "<\/span>").replace(/<\/Size>/g, "<\/span>");
for(let j = 0; j < line.length; j++){
if(line.slice(j - ("<Size=").length, j) == "<Size="){
let line_temp = line.slice(line.indexOf("<c>") + 3, line.length).replace("\r", "");
avgbranches = line_temp.split("<c>");
// branches max number 6
/*for(let k = 0; k < 6; k ++) {
if(line_temp.indexOf("<c>" == -1) || line_temp.length == 0) break;
console.log("before" + line_temp);
line_temp = line_temp.slice(line_temp.indexOf("<c>") + 3, line_temp.length);
console.log("after" + line_temp);
avgbranches.push(line_temp.slice(0, line_temp.indexOf("<c>")));
console.log("push" + line_temp.slice(0, line_temp.indexOf("<c>")));
}*/
console.log(avgbranches);
}
setTimeout(function(){ $("#avgline").html(""); $("#avgword").animate({opacity:"1.0"}, 400, "swing");}, 400);
}
 
//special efect
if(thisline.indexOf("<关闭蒙版>") != -1) $(".avgefect").remove();
if(thisline.indexOf("<回忆>") != -1) $("#avgbox").append(`<div class="avgefect" style="width:1200px; height:675px; position:absolute; z-index:10; backdrop-filter:sepia(0.8) brightness(0.8)"></div>`);
//position sign
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);
}
/*---------------------------AVG记录的展示与控制--------------------AVG log's display and control -------*/
function avglogcreat(){
var let logpos = 0; var let logline = 1; var output let log_string = ``;
while(1){
var let thisline = (avgtxt.indexOf("\n", logpos) == -1) ? avgtxt.slice(logpos, avgtxt.length) : avgtxt.slice(logpos, avgtxt.indexOf("\n", logpos));
output log_string += `<div style="border-top:1px #8886 dashed; padding:7px 4px;"><table style="width:100%;"><tr><td avgpos="` + logpos + `"`; if(thisline.indexOf("<黑屏2>") != -1) output log_string += ` class="avglogtd" style="border:1px dashed #f4c430; cursor:zoom-in;`; else output log_string += ` style="border:none;`; output log_string += `width:5%; text-align:center; vertical-align:baseline;">` + logline + `<\/td>`; output log_string += `<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 log_string += `<\/td><td style="width:80%; vertical-align:baseline;">` + (thisline.indexOf("<分支") != -1) ? ("分支" + thisline[thisline.indexOf("<分支") + 3] + "<br>") : ""; log_string += thisline.slice(thisline.indexOf(":") + 1, thisline.length).replace(/\+/g, "<br>").replace(/<c>/g, " 分支") + `<\/td><\/tr><\/table><\/div>`;
if(avgtxt.indexOf("\n", logpos) == -1) break;
}
$("#avglogbox").html(outputlog_string);
$(".avglogtd").click(function(){
}
/*---------------------------初次加载,预加载,显示加载信息---------------------first load, preload, display loading information ------*/
function firstloading(){
loadingfin = {doll:0, bg:0, bgm:0, eff:0}; loadingnow = {doll:0, bg:0, bgm:0, eff:0};
var logpos = 0;
var loading = {doll:[], bg:[], bgm:[], eff:[]};  /*--------------------------- key word query, console that not in the array ---------------------------*/ var sekeyword = ["Speaker", "BIN", "BGM", "SE1", "SE2", "color", "Size", "通讯框", "黑屏1", "黑屏2", "common_effect", "关闭蒙版", "CGDelay", "回忆"]; var the_words = avgtxt.replace(/<color=#[A-Za-z0-9]{6}>/g, "<color>").replace(/<Size=\d{2}>/g, "<Size>"); while(the_words.indexOf("<") != -1 && the_words.length != 0){ let this_word = the_words.slice(the_words.indexOf("<"), the_words.indexOf(">") + 1); the_words = the_words.slice(the_words.indexOf(">") + 1, the_words.length); if(this_word[1] == "/") continue;  let sign = 1; for(i in sekeyword) if(("<" + sekeyword[i] + ">") == this_word) { sign = 0; break;} if(sign) console.log(this_word); if(sign) sekeyword.push(this_word.slice(1, this_word.length - 1)); }
while(1){
if(a == loading.bg[i].ID){ sign = 0; break; }
} if(sign) loading.bg.push({"ID":a, "URL":bgarray[a]});
}
if(thisline.indexOf("<common_effect>") != -1){
let sign = 1;
let a = thisline.slice(thisline.indexOf("<common_effect>") + ("<common_effect>").length, thisline.indexOf("</common_effect>"));
for(let i = 0; i < loading.eff.length; i++){
if(a == loading.eff[i].ID){ sign = 0; break; }
} if(sign) loading.eff.push({"ID":a, "URL":effarray[a]});
}
}
/*----------------- console loading urls ---------------*/ console.log("Doll Character Image array"); console.log(loading.doll);
console.log("Background CG array"); console.log(loading.bg);
console.log("Background Music array"); console.log(loading.bgm);
console.log("Common Effect array"); console.log(loading.eff);
console.log("********* Console end *********");
loadingfin.doll = loading.doll.length;
loadingfin.bg = loading.bg.length;
loadingfin.bgm = loading.bgm.length;
$("#avgload").html("加载进度: PIC[" + loadingnow.doll + "/" + loadingfin.doll + "] CG[" + loadingnoweff = loading.bg + "/" + loadingfineff.bg + "] BGM[" + loadingnow.bgm + "/" + loadingfin.bgm + "]"length; loading_sub();
for(i in loading.doll){
var let img = new Image();
$(img).load(function(){
if($(this).attr("file") == loadingfile) loadingnow.doll ++;
$loading_sub("#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].ID], "file":loadingfile});
}
for(i in loading.bg){
var let img = new Image();
$(img).load(function(){
if($(this).attr("file") == loadingfile) loadingnow.bg ++;
$loading_sub("#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].ID], "file":loadingfile});
}
for(i in loading.bgm){
var let audio = new Audio();
audio.addEventListener("canplaythrough", function(){
if($(this).attr("file") == loadingfile) loadingnow.bgm ++;
$loading_sub("#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].ID], "file":loadingfile, "preload":"preload", "controls":"controls"});
}
for(i in loading.eff){
let target_url = effarray[loading.eff[i].ID];
let target_type = target_url.slice(target_url.length - 3, target_url.length);
let new_element = (target_type == "png") ? document.createElement('img') : document.createElement('video');
if(target_type == "mp4") {
new_element.addEventListener("canplaythrough", function(){
if($(this).attr("file") == loadingfile) loadingnow.eff ++;
loading_sub(); $(this).remove();
});
$(new_element).attr({"src":effarray[loading.eff[i].ID], "file":loadingfile, "preload":"preload"});
} else if(target_type == "png") {
$(new_element).load(function(){
if($(this).attr("file") == loadingfile) loadingnow.eff ++;
loading_sub(); $(this).remove();
});
$(new_element).attr({"src":effarray[loading.eff[i].ID], "file":loadingfile});
}
}
}
 
function loading_sub(){
$("#avgload").html(`加载进度: PIC[${loadingnow.doll}/${loadingfin.doll}] CG[${loadingnow.bg}/${loadingfin.bg}] BGM[${loadingnow.bgm}/${loadingfin.bgm}] OTH[${loadingnow.eff}/${loadingfin.eff}]`);
}
 
/*---------------------------特效code 创建---------------------------*/
function effect_creat(effect_name){
if(effect_name == "%%code=AVG_ink1%%") {
let new_element = document.createElement('video');
$(new_element).attr({"class":"avgefect", "autoplay":"autoplay", "preload":"auto", "src":effarray[effect_name]});
$(new_element).css({"position":"absolute", "width":"1200px", "height":"675px", "top":"0px", "left":"0px", "overflow":"hidden", "z-index":"1"});
$(new_element).bind('ended', function(){ $(this).remove(); });
$("#avgbox").append(new_element);
} else if(effect_name.slice(0, ("%%code=NPC_TV").length) == "%%code=NPC_TV"){
let new_element = document.createElement('img');
$(new_element).attr({"class":"avgefect", "src":effarray[effect_name]});
$(new_element).css({"position":"absolute", "width":"1200px", "top":"-262.5px", "z-index":"1"});
$("#avgbox").append(new_element);
}
}
 
})
</script></includeonly>
24,691
个编辑