Minigamer42

amq autoready

Feb 22nd, 2022
1,317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         amq autoready
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  try to take over the world!
  6. // @author       You
  7. // @match        https://animemusicquiz.com/*
  8. // @grant        none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12.     'use strict';
  13.  
  14.     if (!window.quiz) return;
  15.     function checkReady() {
  16.         if(!lobby.inLobby
  17.            || lobby.isHost
  18.            || lobby.isSpectator || lobby.isReady || quiz.gameMode === "Ranked") return;
  19.         lobby.fireMainButtonEvent();
  20.     }
  21.  
  22.     let settingChangeListener = new Listener("Room Settings Changed", (changes) => {
  23.         setTimeout(() => { checkReady(); }, 250);
  24.     });
  25.     settingChangeListener.bindListener();
  26.  
  27.     let hostPromotionListner = new Listener("Host Promotion", (payload) => {
  28.         setTimeout(() => { checkReady(); }, 250);
  29.     });
  30.     hostPromotionListner.bindListener();
  31.  
  32.     var quizOverListener = new Listener("quiz over", (data) => {
  33.         setTimeout(() => { checkReady(); }, 250);
  34.     })
  35.     quizOverListener.bindListener()
  36. })();
Advertisement
Add Comment
Please, Sign In to add comment