Initial commit
This commit is contained in:
commit
2ed51f9fdc
11
LICENSE
Normal file
11
LICENSE
Normal file
@ -0,0 +1,11 @@
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
Version 2, December 2004
|
||||
|
||||
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
11
README.md
Normal file
11
README.md
Normal file
@ -0,0 +1,11 @@
|
||||
# SkinraveRewardTicketHandler
|
||||
|
||||
## Requirements
|
||||
* [Tampermonkey](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en) (Chrome)
|
||||
* [Greasemonkey](https://addons.mozilla.org/en-us/firefox/addon/greasemonkey/) (Firefox)
|
||||
|
||||
## Installation
|
||||
1. Ensure that you have either Tampermonkey or Greasemonkey installed.
|
||||
2. Download the script [`SkinraveRewardTicketHandler.user.js`](SkinraveRewardTicketHandler.user.js?raw=true).
|
||||
3. Confirm that you want to install the script.
|
||||
4. The script should now be installed and ready to use. Open the [Reward Ticket](https://skinrave.gg/en/reward-tickets) page.
|
45
SkinraveRewardTicketHandler.user.js
Normal file
45
SkinraveRewardTicketHandler.user.js
Normal file
@ -0,0 +1,45 @@
|
||||
// ==UserScript==
|
||||
// @name Skinrave Reward Ticket Handler
|
||||
// @namespace http://tampermonkey.net/
|
||||
// @version 2025-01-29
|
||||
// @description Claims tickets and tries to join minutely roulettes with the minimum bet
|
||||
// @author Abhorrent_Anger
|
||||
// @match https://skinrave.gg/en/reward-tickets
|
||||
// @icon https://www.google.com/s2/favicons?sz=64&domain=skinrave.gg
|
||||
// @grant none
|
||||
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
|
||||
// @require https://cdn.jsdelivr.net/gh/CoeJoder/waitForKeyElements.js@v1.3/waitForKeyElements.js
|
||||
// @run-at document-end
|
||||
// ==/UserScript==
|
||||
|
||||
const REJOIN_TIMER = 70000;
|
||||
const INITIAL_TIMER = 2000;
|
||||
const CLAIM_BUTTON_SELECTOR = "div.flex.justify-end.items-center.gap-2.h-full button:not(:disabled)";
|
||||
const TICKET_BALANCE_SELECTOR = "div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > span:nth-child(2) > span:nth-child(1)";
|
||||
const MAIN_WINDOW_SELECTOR = "div.flex.overflow-y-auto.overflow-x-hidden";
|
||||
const MIN_SELECTOR = "body > div.flex.overflow-y-auto.overflow-x-hidden > div.w-full.flex > div.w-full.max-w-full > main > main > div button:nth-child(8)";
|
||||
const JOIN_GAME_SELECTOR = "body > div.flex.overflow-y-auto.overflow-x-hidden > div.w-full.flex > div.w-full.max-w-full > main > main > div button.max-w-full:not(:disabled)";
|
||||
const MINUTE_SELECTOR = "body > div:contains('minute')";
|
||||
|
||||
function clickClaimButton() {
|
||||
$(CLAIM_BUTTON_SELECTOR).click();
|
||||
}
|
||||
|
||||
function clickJoinButton() {
|
||||
if ($(TICKET_BALANCE_SELECTOR).text() == '0.00' || $(MINUTE_SELECTOR).length == 0) {
|
||||
return false;
|
||||
}
|
||||
$(MIN_SELECTOR).click();
|
||||
$(JOIN_GAME_SELECTOR).click();
|
||||
console.log('Attempted to Join the Game');
|
||||
}
|
||||
|
||||
function runRoutines() {
|
||||
clickClaimButton();
|
||||
clickJoinButton();
|
||||
setTimeout(runRoutines, REJOIN_TIMER);
|
||||
}
|
||||
|
||||
waitForKeyElements(MAIN_WINDOW_SELECTOR, () => {
|
||||
setTimeout(runRoutines, INITIAL_TIMER);
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user