|
|
(未显示3个用户的11个中间版本) |
第1行: |
第1行: |
− | <includeonly><script type="text/javascript">(window.RLQ=window.RLQ||[]).push(function(){
| + | {{剧情模拟器剧情导航}} |
− | | + | {{#Widget:AssembledPlotOptions|title=七周年祝贺|json=AVG_Anniversary_7}} |
− | var dollarray = {
| + | {{#Widget:AVGplayer/css}} |
− | "M16(3)":"http://www.gfwiki.org/images/d/db/M16A1_T.png",
| + | {{#Widget:AVGplayer/js}} |
− | "SOPII(3)":"http://www.gfwiki.org/images/3/3d/Pic_M4_SOPMOD_II.png",
| + | {{#Widget:AssembledPlotOptions/common}} |
− | "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"
| |
− | };
| |
− | | |
− | var bgmarray = {
| |
− | "BGM_Battle":"http://www.gfwiki.org/images/f/fa/BGM_Battle.wav",
| |
− | "BGM_Empty":"",
| |
− | };
| |
− | | |
− | var bgarray = {
| |
− | "8":"http://www.gfwiki.org/images/9/9a/%E4%BD%9C%E6%88%98%E5%AE%A4avg.png",
| |
− | "9":"",
| |
− | "15":"http://www.gfwiki.org/images/a/ab/%E5%AE%A4%E5%86%85%E6%88%98%E6%96%97.png"
| |
− | };
| |
− | | |
− | var linepos = 0;
| |
− | var avgtxt = "";
| |
− | var avgnextline = "";
| |
− | | |
− | var autosign = 0;
| |
− | var autospeed = 4;
| |
− | var autotime = 10;
| |
− | | |
− | var logallsign = 0;
| |
− | | |
− | var xmlhttp = new XMLHttpRequest();
| |
− | xmlhttp.onreadystatechange = function() {
| |
− | if (this.readyState == 4 && this.status == 200) { avgtxt = (this.responseText); }
| |
− | };
| |
− | xmlhttp.open("GET", "http://www.gfwiki.org/images/5/51/AVG0-3-2.txt", true);
| |
− | xmlhttp.send();
| |
− | | |
− | 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="avgautobutton" 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="avgautobutton" 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="avgautobutton" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">返回开始</div>
| |
− | </div>
| |
− | | |
− | <div id="avgbox" style="width:1200px; height:675px; user-select:none;">
| |
− | <div id="avgbackground" style="position:absolute; width:1200px; height:675px; overflow:hidden; background-color:#111; z-index:1; border:1px #8888 solid;"></div>
| |
− | | |
− | <div id="avgdollcent" style="width:675px; height:585px; position:absolute; top:150px; left:262.5px; overflow:hidden; z-index:6;"></div>
| |
− | <div id="avgdollleft" style="width:675px; height:585px; position:absolute; top:150px; left:112.5px; overflow:hidden; z-index:4;"></div>
| |
− | <div id="avgdollleftmask" style="width:675px; height:585px; position:absolute; top:150px; left:112.5px; overflow:hidden; z-index:5; background-color:#0008; display:none; -webkit-mask-size:cover;"></div>
| |
− | <div id="avgdollrigh" style="width:675px; height:585px; position:absolute; top:150px; left:412.5px; overflow:hidden; z-index:2;"></div>
| |
− | <div id="avgdollrighmask" style="width:675px; height:585px; position:absolute; top:150px; left:412.5px; overflow:hidden; z-index:3; background-color:#0008; display:none; -webkit-mask-size:cover;"></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;">
| |
− | <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; margin:10px 0px;"></div>
| |
− | <audio id="avgbgm" controls preload loop style="display:none;"></audio>`;
| |
− | | |
− | $("#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"});
| |
− | });
| |
− |
| |
− | $(".avgautobutton").mousedown(function(){
| |
− | $(this).css({"background-color":"#f4c430aa","color":"black"});
| |
− | });
| |
− | $(".avgautobutton").mouseup(function(){
| |
− | $(this).css({"background-color":"#111111","color":"#eaeaea"});
| |
− | });
| |
− | | |
− | $("#avgauto").click(function(){
| |
− | autosign = 1;
| |
− | setTimeout("autoreadline()", 800 * autotime / 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);
| |
− | });
| |
− | $("#avgautominus").click(function(){
| |
− | var numnow = Number($("#avgautonum").html());
| |
− | $("#avgautonum").html((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").css("display","none");
| |
− | } else if($(this).attr("state") == "off"){
| |
− | $(this).attr("state", "on");
| |
− | $(this).css({"background-color":"#f4c430","color":"black"});
| |
− | $("#avglogbox").css("display","block");
| |
− | 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(){
| |
− | linepos = 0;
| |
− | readline();
| |
− | });
| |
− | }
| |
− | | |
− | divcreat();
| |
− | $("#avgbox").click(function(){ readline();});
| |
− | | |
− | function readline(){
| |
− | if(avgnextline){
| |
− | $("#avgline").html(avgnextline.slice(0, avgnextline.indexOf("+")));
| |
− | 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){
| |
− | $("#avgdollcent").html("");
| |
− | $("#avgdollleft").html("");
| |
− | $("#avgdollrigh").html("");
| |
− | $("#avgdollleftmask").css("display","none");
| |
− | $("#avgdollrighmask").css("display","none");
| |
− | $("#avgbackground").html("");
| |
− | }
| |
− | | |
− | //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("||"));
| |
− | | |
− | if(avgpicstr.indexOf(";") == -1 && avgpicstr.indexOf("()") == -1){
| |
− | avgpiccen = avgpicstr.slice(0, avgpicstr.indexOf("<Speaker>"));
| |
− | $("#avgdollcent").html(`<img name-data="` + avgpiccen + `"src="` + dollarray[avgpiccen] + `" style="width:675px; overflow:hidden;"/>`);
| |
− | $("#avgdollleft").html("");
| |
− | $("#avgdollleftmask").css({"display":"none"});
| |
− | $("#avgdollrigh").html("");
| |
− | $("#avgdollrighmask").css({"display":"none"});
| |
− | }
| |
− | else if(thisline.indexOf(";") == -1 && thisline.indexOf("()") != -1){}
| |
− | else if((avgpicstr.indexOf("<Speaker>") < avgpicstr.indexOf(";"))){
| |
− | avgpicleft = avgpicstr.slice(0, avgpicstr.indexOf("<Speaker>"));
| |
− | avgpicrigh = avgpicstr.slice(avgpicstr.indexOf(";") + 1, avgpicstr.length);
| |
− | $("#avgdollcent").html("");
| |
− | $("#avgdollleft").html(`<img name-data="` + avgpicleft + `"src="` + dollarray[avgpicleft] + `" style="width:675px; overflow:hidden;"/>`);
| |
− | $("#avgdollrigh").html(`<img name-data="` + avgpicrigh + `"src="` + dollarray[avgpicrigh] + `" style="width:675px; overflow:hidden;"/>`);
| |
− | $("#avgdollleft").css("z-index","4");
| |
− | $("#avgdollleftmask").css({"z-index":"5", "display":"none"});
| |
− | $("#avgdollrigh").css("z-index","2");
| |
− | $("#avgdollrighmask").css({"z-index":"3", "display":"block", "-webkit-mask-image":"url(" + dollarray[avgpicrigh] + ")"});
| |
− | }
| |
− | else if(avgpicstr.indexOf("<Speaker>") > avgpicstr.indexOf(";")){
| |
− | avgpicleft = avgpicstr.slice(0, avgpicstr.indexOf(";"));
| |
− | avgpicrigh = avgpicstr.slice(avgpicstr.indexOf(";") + 1, avgpicstr.indexOf("<Speaker>"));
| |
− | $("#avgdollcent").html("");
| |
− | $("#avgdollleft").html(`<img name-data="` + avgpicleft + `"src="` + dollarray[avgpicleft] + `" style="width:675px; overflow:hidden;"/>`);
| |
− | $("#avgdollrigh").html(`<img name-data="` + avgpicrigh + `"src="` + dollarray[avgpicrigh] + `" style="width:675px; overflow:hidden;"/>`);
| |
− | $("#avgdollleft").css("z-index","2");
| |
− | $("#avgdollleftmask").css({"z-index":"3", "display":"block", "-webkit-mask-image":"url(" + dollarray[avgpicleft] + ")"});
| |
− | $("#avgdollrigh").css("z-index","4");
| |
− | $("#avgdollrighmask").css({"z-index":"5", "display":"none"});
| |
− | }
| |
− | }
| |
− | else {
| |
− | $("#avgdollcent").html("");
| |
− | $("#avgdollleft").html("");
| |
− | $("#avgdollleftmask").css({"display":"none"});
| |
− | $("#avgdollrigh").html("");
| |
− | $("#avgdollrighmask").css({"display":"none"});
| |
− | }
| |
− | | |
− | //word speaker
| |
− | if(thisline.indexOf("<Speaker>") != -1){
| |
− | var speaker = thisline.slice(thisline.indexOf("<Speaker>") + ("<Speaker>").length , thisline.indexOf("</Speaker>"));
| |
− | $("#avgspeaker").html(speaker);
| |
− | }
| |
− | else $("#avgspeaker").html(" ");
| |
− | | |
− | //word line
| |
− | if(thisline.indexOf(":") != -1 && thisline.indexOf("+") == -1){
| |
− | $("#avgline").html(thisline.slice(thisline.indexOf(":") + 1, thisline.indexOf("\n")));
| |
− | autotime = thisline.slice(thisline.indexOf(":") + 1, thisline.indexOf("\n")).length;
| |
− | }
| |
− | else if(thisline.indexOf(":") != -1 && thisline.indexOf("+") != -1){
| |
− | $("#avgline").html(thisline.slice(thisline.indexOf(":") + 1, thisline.indexOf("+")));
| |
− | autotime = thisline.slice(thisline.indexOf(":") + 1, thisline.indexOf("+")).length;
| |
− | avgnextline = thisline.slice(thisline.indexOf("+") + 1, thisline.length);
| |
− | }
| |
− | else $("#avgline").html("");
| |
− | | |
− | //position sign
| |
− | linepos = avgtxt.indexOf("\n", linepos) + 1;
| |
− | if($("#avglog").attr("state") == "on") avglogcreat();
| |
− | }
| |
− | | |
− | function autoreadline(){
| |
− | if(autosign == 0) return;
| |
− | readline();
| |
− | setTimeout("autoreadline()", 800 * autotime / 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:1px #8886 solid; padding:6px 4px;"><table style="width:100%;"><tr>`;
| |
− | output += `<td avgpos="` + logpos + `" class="avglogtd" style="width:5%; text-align:center; vertical-align:baseline; cursor:alias;">` + 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(){
| |
− | linepos =Number( $(this).attr("avgpos"));
| |
− | readline();
| |
− | });
| |
− | $(".avglogtd").mouseover(function(){
| |
− | $(this).css({"background-color":"#eaeaeaaa","color":"black"});
| |
− | });
| |
− | $(".avglogtd").mouseout(function(){
| |
− | $(this).css({"background-color":"inherit","color":"inherit"});
| |
− | });
| |
− | }
| |
− | })</script></includeonly><noinclude>{{#Widget:AVGplayer}}</noinclude>
| |