][NT3L][G3NC][ Posted December 17, 2022 Share Posted December 17, 2022 Bringing My Old Hotkey Script Back To Life. bcGame adding hotkeys to their platform never actually replaced the functionality of my old script. As of right now only Crash/Trendball, Video Poker, Coinflip, Plinko & Wheel are implemented. Unlike my old version this one doesn't come with an input box to capture the keys. The Chat & Private Chat & Game Search Etc. Etc. all have `placeholders` So when a keyEvent is captured and its target has a placeholder it stops processing it and doesn't prevent default. So it shouldn't double your bet and make you bet while you are typing/talking in chat. "NO PROMISES" Script will also check if bcGame's hotkeys are enabled and if they are, the script will disable them. Very bad things happen when you have 2 separate Hotkeys enabled If anyone actually uses this and wants other games added, let me know. // ==UserScript== // @name bcGame Hotkeys // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author ][NT3L][G3NC][ // @match https://bc.game/game/crash* // @match https://bc.game/game/video-poker // @match https://bc.game/game/coinflip // @match https://bc.game/game/plinko // @match https://bc.game/game/wheel // @icon https://www.google.com/s2/favicons?sz=64&domain=bc.game // @grant none // ==/UserScript== //========================================================##================================## // || || // Crash/Trendball || VIDEO POKER || // =================== || =============== || // || || // A: 1/2 Bet || A: 1/2 Bet || // S: 2x Bet || S: 2x Bet || // T: Switch To/From Crash|Trendball || 1: Hold/Unhold 1st Card || // R: TrendBall Red || 2: Hold/Unhold 2nd Card || // G: TrendBall Green || 3: Hold/Unhold 3rd Card || // Y: TrendBall Yellow (MOON) || 4: Hold/Unhold 4th Card || // SPACE: Bet/Cash Out/Cancel Bet OR Bets Red Trendball || 5: Hold/Unhold 5th Card || // || SPACE: Bet / Deal || //=====================##=====================##==========## || // || || ##====================## // COIN FLIP || PLINKO || WHEEL || // =============== || ============ || =========== || // || || || // A: 1/2 Bet || A: 1/2 Bet || A: 1/2 Bet || // S: 2x Bet || S: 2x Bet || S: 2x Bet || // T: Tails || R: Risk || R: Risk || // H: Heads || W: Rows || W: Segment || // SPACE: Bet / Deal || SPACE: Bet / Deal || SPACE: Bet / Deal || // || || || //=====================##=====================##======================## document.addEventListener('keydown', sexyKeys, false); function checkHotKeys(game) { try { // Check If bcGame Hotkeys Is Enabled if(game.settings.hotkeyEnable) { // Disable Hotkeys Otherwise Very Bad Things Will Happen game.settings.hotkeyEnable = false; } } catch(e) { // } return } function sexyKeys(event) { // Check that event isnt targeting Chat/Priv Chat/ Game Search... Anything With a Placeholder if(!event.target.attributes.getNamedItem('placeholder')) { if(location.href.includes('trenball')) { checkHotKeys(window.crash); switch(event.keyCode) { case 65: // A : 1/2 Bet try { document.querySelector(".button-group > button:nth-child(1)").click(); event.preventDefault(); } catch(err) { // } break; case 83: // S: 2x Bet try { document.querySelector(".button-group > button:nth-child(2)").click(); event.preventDefault(); } catch(err) { // } break; case 32: // SPACE: Bet Crash/ Red In Trendball try { document.querySelector('.game-control-panel').querySelectorAll('button')[3].click(); event.preventDefault(); } catch(err) { // } break; case 84: // T: Switch Between Crash & Trendball try { document.querySelector(".tabs-navs > button:nth-child(1)").click(); event.preventDefault(); } catch(err) { // } break; case 82: // R: Bet Red try { document.querySelector('.game-control-panel').querySelectorAll('button')[3].click(); event.preventDefault(); } catch(err) { // } break; case 71: // G: Bet Green try { document.querySelector('.game-control-panel').querySelectorAll('button')[4].click(); event.preventDefault(); } catch(err) { // } break; case 89: // Y: Bet Yellow (MOON) try { document.querySelector('.game-control-panel').querySelectorAll('button')[5].click(); event.preventDefault(); } catch(err) { // } break; } } else if(location.href.includes('crash')) { checkHotKeys(window.crash); switch(event.keyCode) { case 65: try { document.querySelector(".button-group > button:nth-child(1)").click(); event.preventDefault(); } catch(err) { // } break; case 83: try { document.querySelector(".button-group > button:nth-child(2)").click(); event.preventDefault(); } catch(err) { // } break; case 32: try { document.querySelector('.game-control-panel').querySelector('button').click(); event.preventDefault(); } catch(err) { // } break; case 84: try { document.querySelector(".tabs-navs > button:nth-child(2)").click(); event.preventDefault(); } catch(err) { // } break; } } else if(location.href.includes('video-poker')) { checkHotKeys(window.hdg); switch(event.keyCode) { case 65: // A : 1/2 Bet try { document.querySelector(".button-group > button:nth-child(1)").click(); event.preventDefault(); } catch(err) { // } break; case 83: // S: 2x Bet try { document.querySelector(".button-group > button:nth-child(2)").click(); event.preventDefault(); } catch(err) { // } break; case 32: // SPACE: Bet try { document.querySelector('.game-control-panel').querySelectorAll('button')[3].click(); event.preventDefault() } catch(err) { // } break; case 49: // 1: First Card try { document.querySelectorAll('.card-model')[0].click() event.preventDefault(); } catch(err) { // } break; case 50: // 2: Second Card try { document.querySelectorAll('.card-model')[1].click() event.preventDefault(); } catch(err) { // } break; case 51: // 3: Third Card try { document.querySelectorAll('.card-model')[2].click() event.preventDefault(); } catch(err) { // } break; case 52: // 4: Fourth Card try { document.querySelectorAll('.card-model')[3].click() event.preventDefault(); } catch(err) { // } break; case 53: // 5: Fifth Card try { document.querySelectorAll('.card-model')[4].click() event.preventDefault(); } catch(err) { // } break; } } else if(location.href.includes('coinflip')) { checkHotKeys(window.cfg); switch(event.keyCode) { case 65: try { document.querySelector(".game-control-panel *> button:nth-child(1)").click() event.preventDefault(); } catch(err) { // } break; case 83: try { document.querySelector(".game-control-panel *> button:nth-child(2)").click() event.preventDefault(); } catch(err) { // } break; case 32: try { document.querySelectorAll(".game-control-panel *> button")[5].click(); event.preventDefault(); } catch(err) { // } break; case 84: try { document.querySelectorAll(".game-control-panel *> button")[4].click(); event.preventDefault(); } catch(err) { // } break; case 72: try { document.querySelectorAll(".game-control-panel *> button")[3].click(); event.preventDefault(); } catch(err) { // } break; } } else if(location.href.includes('plinko')) { checkHotKeys(window.dg); switch(event.keyCode) { case 65: try { document.querySelector(".game-control-panel *> button:nth-child(1)").click() event.preventDefault(); } catch(err) { // } break; case 83: try { document.querySelector(".game-control-panel *> button:nth-child(2)").click() event.preventDefault(); } catch(err) { // } break; case 32: try { document.querySelector('.bet-button').click(); event.preventDefault(); } catch(err) { // } break; case 82: try { if(window.dg.risk == 3) { window.dg.risk = 1; } else { window.dg.risk += 1; } event.preventDefault(); } catch(err) { // } break; case 87: try { if(window.dg.rows == 16) { window.dg.rows = 8; } else { window.dg.rows += 1; } event.preventDefault(); } catch(err) { // } break; } } else if(location.href.includes('wheel')) { checkHotKeys(window.wlg); switch(event.keyCode) { case 65: try { document.querySelector(".game-control-panel *> button:nth-child(1)").click() event.preventDefault(); } catch(err) { // } break; case 83: try { document.querySelector(".game-control-panel *> button:nth-child(2)").click() event.preventDefault(); } catch(err) { // } break; case 32: try { document.querySelector('.bet-button').click(); event.preventDefault(); } catch(err) { // } break; case 82: try { if(window.wlg.risk == 3) { window.wlg.risk = 1; } else { window.wlg.risk += 1; } event.preventDefault(); } catch(err) { // } break; case 87: try { if(window.wlg.segment == 50) { window.wlg.segment = 10; } else { window.wlg.segment += 10; } event.preventDefault(); } catch(err) { // } break; } } } else { // Key Event May Be Targeting Something Other Than The Game So We Do Not Process & Block It.... } } Link to comment Share on other sites More sharing options...
Skele Posted April 2, 2023 Share Posted April 2, 2023 you could also use their hotkey system and then it will even show up in the hotkey menu with a description and everything. lbg.addHotkey('c', () => { DoManualMinBet() }, 'Makes min bet'); Link to comment Share on other sites More sharing options...
gwilson Posted April 2, 2023 Share Posted April 2, 2023 Hi tyabks cor the heads up. How is it going? This is a stunning hight quality software tor chating its beautifull havent use something like this before. How is it when it comes to storages consumption if you dont mind me asking? grace Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.