svenjatzu Posted August 19, 2020 #1 Posted August 19, 2020 Hey there i thught about creating a tool that helps growing up your profits. Have a try its not bugfree up to now and needs some more updat3s. Additional feat, balance is shown in crypto and $ (lil buggy sometimes) . (read balance and set it to oldbal read balance again - when it changed take oldbal - new bal = amoun / % = amoun to send to vault. If you like just add your thougz about additional features. Id be happy about any feedback of your favourite % settings. Have fun. Feel free to send a tip for my work BTW there are some more appetizing scripts at my greasyfork like fullautomated recap solver for faucet Use addon tampermonkey to run it. // ==UserScript== // @name [01]Balance-Wingm https://stake.com/?c=263733c1bc // @description Setup the amount from each win to be sent to Vaulet in the line(66) /////////// Setup Profit here in Decimal: 50 % = 0.50 - 75 % = 0.75 - 15 % = 0.15 // @description Cryptocurrency is shown in Crypto and $ // @description Create your acc here to support my work https://stake.com/?c=263733c1bc // @version 2.2 // @author Dauersendung // @namespace https://greasyfork.org/de/users/444902-dauersendu // @match https://stake.com/* // @run-at document-start // @downloadURL none // ==/UserScript== var accessToken = localStorage.getItem('session').replace(/"/g, ''); var oldBal = ''; function getCurrency() { return JSON.parse(localStorage.getItem("v2_currency")).currency; } function getRate(cur) { return JSON.parse(localStorage.getItem('v2_currency')).conversions.rates[cur]; } function convertCurrency(cur, val) { return val * getRate(cur); } function getConversionElem() { var ele = document.querySelector("#conversionElem"); if(ele == null) { ele = document.createElement("span"); ele.id = "conversionElem"; ele.innerText = "0.00$"; document.querySelector(".styles__Wrap-rlm06o-0.bGSyHm").insertBefore(ele, null); } return ele; } window.onload = function loadpage(){ console.log(document.readyState); if (document.readyState === 'complete') { var oldBal = document.querySelector(".styles__Cashier-puey40-2.dMSTdD .styles__Content-rlm06o-1.ixoRjG").innerText; var curBalEle = document.querySelector(".styles__Cashier-puey40-2.dMSTdD .styles__Content-rlm06o-1.ixoRjG").innerText; function tresor(){ oldBal = curBalEle if (oldBal = curBalEle){ function depositBal(depositAmount) { var curr = getCurrency(); var data = [{ operationName: "CreateVaultDeposit", query: "mutation CreateVaultDeposit($amount: Float!, $currency: CurrencyEnum!) { createVaultDeposit(amount: $amount, currency: $currency) { id amount currency user { id balances { available { amount currency __typename } vault { amount currency __typename } __typename } __typename } __typename } } ", variables: { amount: depositAmount, currency: curr,}}] return fetch("https://api.stake.com/graphql", { "credentials": "omit", "headers": { "content-type": "application/json", 'x-access-token': accessToken, 'x-lockdown-token': undefined}, "referrer": "https://stake.com/?currency=" + curr + "&modal=vault&operation=deposit", "body": JSON.stringify(data), "method": "POST", "mode": "cors"});} function checkBalance() { var curBalEle=document.querySelector(".styles__Cashier-puey40-2.dMSTdD .styles__Content-rlm06o-1.ixoRjG"); if(document.getElementsByClassName('styles__Content-rlm06o-1 ixoRjG').length > 0){ curBalEle = document.getElementsByClassName('styles__Content-rlm06o-1 ixoRjG')[0].innerText; if(curBalEle != '') { //console.log('balance changed'); //console.log('old balance : ' + oldBal); //console.log('current balance : ' + curBalEle); if (curBalEle > oldBal) { var depositAmount = ((curBalEle - oldBal) * 0.5); /////////// Setup Profit here in Decimal: 50 % = 0.50 - 75 % = 0.75 - 15 % = 0.15 depositBal(depositAmount).then(() => { oldBal = document.querySelector(".styles__Cashier-puey40-2.dMSTdD .styles__Content-rlm06o-1.ixoRjG").innerText; localStorage.setItem("oldBal", oldBal); getConversionElem().innerText = convertCurrency(getCurrency(), curBalEle).toFixed(2) + "$"; oldBal = curBalEle; });} oldBal = curBalEle; }}}window.setInterval(checkBalance, 1751);}//timerspeed read send to tresor else{ tresor();//if different balance run func tresor }}var myTimer = setTimeout(tresor, 5500);}}; //timer func(tresor)
namtt007 Posted August 20, 2020 #2 Posted August 20, 2020 It really usefull. Thanks alot for your share
Boner Posted August 20, 2020 #3 Posted August 20, 2020 Nothing personal, but I cant help thinking that installing script from anyone other then Stake on Stake, especially when tied to your vault is a Bad idea. Although your intentions sound good. I feel that players could be making themselves vulnerable to theft by installing script from anyone other then Stake.com
svenjatzu Posted August 20, 2020 Author #4 Posted August 20, 2020 Thanks boner for your reply, i really unerstand your concernings. Thats the reason why im adding my code here so that anyone can see it and for that coders can give thair feedback to it. I guess that, If there would be any part in the script that wuld cause anything bad to other plaers: 1. i wuldnt post it, 2. its not my intention to damage anybody,; than the other coders already woul have left a comment in here An public posted code is more relyable than an tool like dicebot or any other compiled bot where you enter your personal api. you can take each element from the code and enter it in he console to see what the single elements sand for like eg document.querySelector(".styles__Cashier-puey40-2.dMSTdD .styles__Content-rlm06o-1.ixoRjG").innerText; but yas ofc i can undersand your thoughts and cindly sayin thanks for it. Maybe some javascrip pros could have a look a the code and validate it
Boner Posted August 20, 2020 #5 Posted August 20, 2020 54 minutes ago, svenjatzu said: Thanks boner for your reply, i really unerstand your concernings. Thats the reason why im adding my code here so that anyone can see it and for that coders can give thair feedback to it. I guess that, If there would be any part in the script that wuld cause anything bad to other plaers: 1. i wuldnt post it, 2. its not my intention to damage anybody,; than the other coders already woul have left a comment in here An public posted code is more relyable than an tool like dicebot or any other compiled bot where you enter your personal api. you can take each element from the code and enter it in he console to see what the single elements sand for like eg document.querySelector(".styles__Cashier-puey40-2.dMSTdD .styles__Content-rlm06o-1.ixoRjG").innerText; but yas ofc i can undersand your thoughts and cindly sayin thanks for it. Maybe some javascrip pros could have a look a the code and validate it Thanks for clarifying. I guess it's quite apperent that I know nothing of code. 🤪. Might turn out to be a good thing for some people. Good luck!
Dan Posted August 20, 2020 #6 Posted August 20, 2020 Code doesnt have anything sneaky in it at current date. Making stuff like this is fun and a good way to improve coding skills, good work my dude! My suggestions would be to avoid using the 'querySelector' stuff as our element names change each time we do a new build due to how webpack works. 7 hours ago, svenjatzu said: // ==UserScript== // @name [01]Balance-Wingm https://stake.com/?c=263733c1bc // @description Setup the amount from each win to be sent to Vaulet in the line(66) /////////// Setup Profit here in Decimal: 50 % = 0.50 - 75 % = 0.75 - 15 % = 0.15 // @description Cryptocurrency is shown in Crypto and $ // @description Create your acc here to support my work https://stake.com/?c=263733c1bc // @version 2.2 // @author Dauersendung // @namespace https://greasyfork.org/de/users/444902-dauersendu // @match https://stake.com/* // @run-at document-start // @downloadURL none // ==/UserScript== var accessToken = localStorage.getItem('session').replace(/"/g, ''); var oldBal = ''; function getCurrency() { return JSON.parse(localStorage.getItem("v2_currency")).currency; } function getRate(cur) { return JSON.parse(localStorage.getItem('v2_currency')).conversions.rates[cur]; } function convertCurrency(cur, val) { return val * getRate(cur); } function getConversionElem() { var ele = document.querySelector("#conversionElem"); if(ele == null) { ele = document.createElement("span"); ele.id = "conversionElem"; ele.innerText = "0.00$"; document.querySelector(".styles__Wrap-rlm06o-0.bGSyHm").insertBefore(ele, null); } return ele; } window.onload = function loadpage(){ console.log(document.readyState); if (document.readyState === 'complete') { var oldBal = document.querySelector(".styles__Cashier-puey40-2.dMSTdD .styles__Content-rlm06o-1.ixoRjG").innerText; var curBalEle = document.querySelector(".styles__Cashier-puey40-2.dMSTdD .styles__Content-rlm06o-1.ixoRjG").innerText; function tresor(){ oldBal = curBalEle if (oldBal = curBalEle){ function depositBal(depositAmount) { var curr = getCurrency(); var data = [{ operationName: "CreateVaultDeposit", query: "mutation CreateVaultDeposit($amount: Float!, $currency: CurrencyEnum!) { createVaultDeposit(amount: $amount, currency: $currency) { id amount currency user { id balances { available { amount currency __typename } vault { amount currency __typename } __typename } __typename } __typename } } ", variables: { amount: depositAmount, currency: curr,}}] return fetch("https://api.stake.com/graphql", { "credentials": "omit", "headers": { "content-type": "application/json", 'x-access-token': accessToken, 'x-lockdown-token': undefined}, "referrer": "https://stake.com/?currency=" + curr + "&modal=vault&operation=deposit", "body": JSON.stringify(data), "method": "POST", "mode": "cors"});} function checkBalance() { var curBalEle=document.querySelector(".styles__Cashier-puey40-2.dMSTdD .styles__Content-rlm06o-1.ixoRjG"); if(document.getElementsByClassName('styles__Content-rlm06o-1 ixoRjG').length > 0){ curBalEle = document.getElementsByClassName('styles__Content-rlm06o-1 ixoRjG')[0].innerText; if(curBalEle != '') { //console.log('balance changed'); //console.log('old balance : ' + oldBal); //console.log('current balance : ' + curBalEle); if (curBalEle > oldBal) { var depositAmount = ((curBalEle - oldBal) * 0.5); /////////// Setup Profit here in Decimal: 50 % = 0.50 - 75 % = 0.75 - 15 % = 0.15 depositBal(depositAmount).then(() => { oldBal = document.querySelector(".styles__Cashier-puey40-2.dMSTdD .styles__Content-rlm06o-1.ixoRjG").innerText; localStorage.setItem("oldBal", oldBal); getConversionElem().innerText = convertCurrency(getCurrency(), curBalEle).toFixed(2) + "$"; oldBal = curBalEle; });} oldBal = curBalEle; }}}window.setInterval(checkBalance, 1751);}//timerspeed read send to tresor else{ tresor();//if different balance run func tresor }}var myTimer = setTimeout(tresor, 5500);}}; //timer func(tresor)
namtt007 Posted August 20, 2020 #7 Posted August 20, 2020 querySelector which used to get balance can replace by api query StakeBalances($available: Boolean = true, $vault: Boolean = true) { user { id name balances { available @include(if: $available) { currency amount __typename } vault @include(if: $vault) { currency amount __typename } __typename } __typename } }
caveman2528 Posted August 20, 2020 #8 Posted August 20, 2020 some times not undestand loops and the logic of programs
svenjatzu Posted August 21, 2020 Author #10 Posted August 21, 2020 20 hours ago, Dan said: Code doesnt have anything sneaky in it at current date. Making stuff like this is fun and a good way to improve coding skills, good work my dude! My suggestions would be to avoid using the 'querySelector' stuff as our element names change each time we do a new build due to how webpack works. THanks alot Dan : ) ❤️ ill try to drop it in a comming update @ selectors : )
skywallkee Posted August 28, 2020 #12 Posted August 28, 2020 3 minutes ago, khuongn104 said: Is this work with xrp and tag? It only deposits to vault, so it has nothing to do with xrp's tag. You're not required anything additional on Stake to deposit to your balance
svenjatzu Posted August 29, 2020 Author #15 Posted August 29, 2020 20 hours ago, khuongn104 said: Is this work with xrp and tag? Hey : ) no its not working with xrp+tag, have a look at the screenshot. On each won bet it sends % of the profit from red arrow field to green box field : ) 19 hours ago, trangk452 said: Can this work for widthraw? Hey, thanks for your question, no this script is not created for withdraws, but for playing with dicebot eg so that after a time a real nice tresasure is collected in your vault : )
namtt007 Posted September 6, 2020 #16 Posted September 6, 2020 @svenjatzu In line: var curBalEle=document.querySelector(".styles__Cashier-puey40-2.dMSTdD .styles__Content-rlm06o-1.ixoRjG"); Could you please tell me the way to get id element of stake? I used chrome and only found: {displayName:"styles__Cashier",componentId:"puey40-2"} I can't find out dMSTdD Thanks alot for your support.
ocea45 Posted May 30, 2021 #17 Posted May 30, 2021 Hey i was just wondering if this was still working. it seems to have stopped working for me as of yesterday?
Featured Comment
Archived
This topic is now archived and is closed to further replies.