微件:Test

来自Limbo Wiki Mirror
Gaoice留言 | 贡献2026年2月2日 (一) 19:57的版本
   <button class="ggl-start-btn">来一张彩票…
…不,三张吧</button>
刮开奖券 · 在整张刮完后交由bot扫描
刮出数字即能获得对应额度的data
当“平”“安”“喜”“乐”四个字连城一条线时,可再获得一张刮刮卡
看不懂也没关系!bot会告诉你结果!
     剩余彩票: 张 
     可提现 DATA:
     <img class="ggl-bg"
       src="%E5%9B%BE%E7%89%871.png">
     <button class="ggl-redeem-hit" id="ggl-redeem-hit"></button>
       <button id="ggl-scan">扫描结果</button>

<style> .ggl-root{width:375px;margin:auto;font-family:sans-serif;position:relative} .ggl-mask{position:absolute;inset:0;background:#000d;z-index:99;display:flex;align-items:center;justify-content:center} .ggl-start-btn{padding:12px 20px;font-size:16px}

.ggl-top{text-align:center;font-size:14px;margin-bottom:6px}

.ggl-frame{padding:10px;border:3px solid #ff00aa;box-shadow:0 0 12px #ff00aa88}

.ggl-ticket{position:relative;aspect-ratio:1075/1911} .ggl-bg{width:100%;display:block}

.ggl-scratch-area{position:absolute;left:10%;top:35%;width:80%;height:53%} .ggl-grid{display:grid;width:100%;height:100%;grid-template-columns:repeat(5,1fr);grid-template-rows:repeat(6,1fr);gap:6px}

.ggl-cell{position:relative;overflow:hidden} .ggl-cell img,.ggl-cover{position:absolute;inset:0;width:100%;height:100%} .ggl-cover{

 background:url("180px-%E5%88%AE%E5%BC%80%E5%89%8D.png") center/cover;
 cursor:pointer

} .ggl-reward{

 position:absolute;inset:0;
 display:flex;align-items:center;justify-content:center;
 font-size:12px;font-weight:bold;pointer-events:none

}

.ggl-mascot{position:absolute;left:6%;top:107%;font-size:20px;color:#000} .ggl-bubble{position:absolute;left:6%;top:103%;width:60%;background:#fff;padding:6px;font-size:13px}

.ggl-controls{position:absolute;right:6%;top:103%}

  1. ggl-scan{opacity:.3}
  2. ggl-scan.active{opacity:1}

.ggl-redeem-hit{

 position:absolute;bottom:1%;left:2%;
 width:48%;height:10%;
 background:transparent;border:none;cursor:pointer

} </style>

<script> (function(){

const grid = document.querySelector('.ggl-grid'); const bubble = document.querySelector('.ggl-bubble'); const mascot = document.querySelector('.ggl-mascot'); const scan = document.getElementById('ggl-scan'); const leftEl = document.getElementById('ggl-left'); const dataEl = document.getElementById('ggl-data'); const mask = document.getElementById('ggl-mask'); const redeem = document.getElementById('ggl-redeem-hit');

const OPEN = 'https://wm.gaoice.run/images/thumb/4/4a/%E5%88%AE%E5%BC%80%E5%90%8E.jpg/180px-%E5%88%AE%E5%BC%80%E5%90%8E.jpg';

/* ===== 11 张剧情票 ===== */ const TICKETS = [

{left:2,data:0,mascot:,bubble:'你好。',onScan:'扫描完成:未检测到异常。',onRedeem:'点击兑奖区彩票会作废的哦(0',rewards:{12:'DATA'}},
{left:1,data:1,mascot:'(^▽^)ノ',bubble:'第一张,只中了 DATA。',onScan:'扫描结果:DATA ×1',onRedeem:'点击兑奖区彩票会作废的哦(00000',rewards:{1:'连',3:'着',16:'四',19:'个'}},
{left:2,data:2,mascot:'(ノ◕ヮ◕)ノ',bubble:'连着刮出了四个字!',onScan:'检测到异常排列,追加彩票。',onRedeem:'点击兑奖区彩票会作废的哦(00000',rewards:{1:'1',2:'2',3:'3',4:'4',5:'5',6:'6',7:'7',8:'8',9:'9',10:'10',11:'11',12:'12',13:'13',14:'14',15:'15',16:'16',17:'17',18:'18',19:'19',20:'20',21:'21',22:'22',23:'23',24:'24',25:'25',26:'26',27:'27',28:'28',29:'29',30:'30'}},
{left:2,data:4,mascot:'(^▽^)',bubble:'中了刮刮乐!DATA 2MB',onScan:'扫描完成:DATA 2MB',onRedeem:'点击兑奖区彩票会作废的哦(000000000',rewards:{8:'DATA',14:'🎟'}},
{left:2,data:5,mascot:'(・_・)',bubble:'什么都没有。',onScan:'扫描完成:空。',onRedeem:'这里点击兑奖区彩票会作废的哦(000000000',rewards:{22:'DATA'}},
{left:1,data:5,mascot:'(;゚Д゚)',bubble:'好像哪里不对。',onScan:'扫描警告:结构异常。',onRedeem:'……点击兑奖区彩票会作废的哦(000000000',rewards:{}},
{left:0,data:5,mascot:,bubble:'什么都没有。',onScan:'扫描完成:无有效数据。',onRedeem:'点击兑奖区彩票会作废的哦(000000000',rewards:{6:'🎟'}},
{left:0,data:7,mascot:'...',bubble:'▒▓░▒▓▒▓',onScan:'▒▓░▒▓▒▓▒▓▒▓',onRedeem:'▒▓░▒▓▒▓',rewards:{3:'DATA',18:'DATA'}},
{left:1,data:'—',mascot:,bubble:'哦 嗯 嘿 哈',onScan:'扫描结果:DATA 溢出。',rewards:Object.fromEntries([...Array(30).keys()].map(i=>[i,'DATA']))},
{left:0,data:'—',mascot:,bubble:'你是谁?',lock:true,onScan:'扫描失败。',rewards:{}},
{left:'▒▓░▒▓▒▓',data:'▒▓░▒▓▒▓',mascot:'平安喜乐',bubble:'你知道的太多了。',onScan:'权限越界。',final:true,rewards:{}}

];

let idx = 0; let revealed = 0; let scanned = false; let alertTimer = null; // ★ 第十张无限 alert

function build(){

 const t = TICKETS[idx];
 grid.innerHTML = ;
 revealed = 0;
 scanned = false;
 leftEl.textContent = t.left;
 dataEl.textContent = t.data;
 mascot.textContent = t.mascot || ;
 bubble.textContent = t.bubble || ;
 scan.textContent = '扫描结果';
 scan.classList.remove('active');
 for(let i=0;i<30;i++){
   const c = document.createElement('div');
   c.className = 'ggl-cell';
   c.innerHTML = `
     <img src="${OPEN}">
${t.rewards?.[i] || }
   `;
   const cover = c.querySelector('.ggl-cover');
   if(!t.lock){
     cover.onclick = () => {
       if(c.dataset.done) return;
       c.dataset.done = 1;
       cover.style.display = 'none';
       if(++revealed === 30){
         scan.classList.add('active');
       }
     };
   }
   grid.appendChild(c);
 }
 if(t.lock) scan.classList.add('active');

}

scan.onclick = () => {

 if(!scan.classList.contains('active')) return;
 const t = TICKETS[idx];
 /* ===== 第十张:刮完后点击扫描 → 无限 alert ===== */
 if(idx === 9 && revealed === 30){
   if(!alertTimer){
     alertTimer = setInterval(() => {
       alert('【这里写你的内容】'); // ★ 你自己改
     }, 300);
   }
   return;
 }
 /* 第一次:扫描 */
 if(!scanned){
   scanned = true;
   if(t.onScan) bubble.textContent = t.onScan;
   scan.textContent = '再来一张';
   if(t.final){
     document.body.style.filter = 'invert(1)';
     setTimeout(() => {
       location.href = '/index.php?title=六世恶言之一';
     }, 1200);
   }
   return;
 }
 /* 第二次:下一张 */
 idx++;
 if(idx < TICKETS.length) build();

};

redeem.onclick = () => {

 const t = TICKETS[idx];
 /* ===== 第十张兑奖区特殊弹窗 ===== */
 if(idx === 9 && revealed === 30){
   showModal(
     '无法兑奖',
     '该彩票已失效,正在重新校验……',
     '确定',
     () => {
       bubble.textContent = '校验完成。';
       setTimeout(() => {
         idx++;
         build();
       }, 1500);
     }
   );
   return;
 }
 if(t.onRedeem){
   bubble.textContent = t.onRedeem;
 }

};

mask.onclick = () => {

 mask.remove();
 build();

};

/* ===== 前端弹窗(不用 alert) ===== */ function showModal(title, text, btnText, onOk){

 const m = document.createElement('div');
 m.style.cssText = `
   position:fixed;inset:0;
   background:rgba(0,0,0,.6);
   z-index:9999;
   display:flex;
   align-items:center;
   justify-content:center;
 `;
 m.innerHTML = `

${title}

${text}

     <button>${btnText}</button>
 `;
 document.body.appendChild(m);
 m.querySelector('button').onclick = () => {
   m.remove();
   onOk && onOk();
 };

}

/* 测试快捷:Shift + D */ document.addEventListener('keydown', e => {

 if(e.shiftKey && e.key.toLowerCase() === 'd'){
   grid.querySelectorAll('.ggl-cover').forEach(c => c.style.display = 'none');
   revealed = 30;
   scan.classList.add('active');
 }

});

})(); </script>