Back to scripts

批量开启盒子

game

快速开启多个盒子

2024-03-20v1.0.0Community

使用风险自负。此脚本可能违反 Blooket 的服务条款。

Usage

Steps

  1. 确保账户中有足够的代币
  2. 运行脚本并选择要开启的盒子类型
  3. 输入要开启的盒子数量
  4. 等待开启完成

Notes

  • 建议每次开启不超过 100 个盒子
  • 操作期间请勿刷新页面
  • 如遇到错误请检查代币是否足够

Requirements

  • 账户中需要足够的代币
  • 需要稳定的网络连接

Code

async function openBoxes() {
  const boxType = prompt('Which box do you want to open? (e.g., Space, Medieval, Breakfast)');
  const amount = Number(prompt('How many boxes do you want to open?'));
  
  if (!boxType || !amount) return;
  
  for (let i = 0; i < amount; i++) {
    const response = await fetch('https://api.blooket.com/api/users/unlockblook', {
      method: "PUT",
      headers: {
        "content-type": "application/json",
        "X-Blooket-Build": "0"
      },
      body: JSON.stringify({
        box: boxType
      })
    });
    
    if (!response.ok) {
      alert('Failed to open boxes');
      return;
    }
    
    await new Promise(resolve => setTimeout(resolve, 750));
  }
  
  alert('Successfully opened all boxes!');
}

openBoxes();

Changelog

Version 1.0.0

2024-03-20
  • 初始版本发布
  • 支持批量开启盒子
  • 添加延时机制防止请求过快