30.30
118,229,761,915 (https://primedice.com/?iid=house%3A118229761915&modal=bet)
50.50
118,229,801,178 (https://primedice.com/?iid=house%3A118229801178&modal=bet)
Another straightforward challenge that's easy to script - yay! It's a pain to manually hunt these, so automating them where possible saves you a lot of time staring at the screen. For anyone that needs it, here's the JavaScript I used. Make sure you read it carefully so you know what it does! Update the values as needed for your currency/amount, then paste it into your browser's console while on PD.
// ==========================================
// Copy from here...
let stopContinousBetting = false;
function placeBet(rollUntilStop, betVariables){
let token = localStorage["session"].replaceAll("\"", "");
let query = {
"operationName":"PrimediceRoll",
"variables": betVariables,
"query":"mutation PrimediceRoll($amount: Float!, $target: Float!, $condition: CasinoGamePrimediceConditionEnum!, $currency: CurrencyEnum!) {\n primediceRoll(amount: $amount, target: $target, condition: $condition, currency: $currency) {\n ...CasinoBetFragment\n state {\n ...PrimediceStateFragment\n __typename\n }\n __typename\n }\n}\n\nfragment CasinoBetFragment on CasinoBet {\n id\n active\n payoutMultiplier\n amountMultiplier\n amount\n payout\n updatedAt\n currency\n game\n user {\n id\n name\n __typename\n }\n __typename\n}\n\nfragment PrimediceStateFragment on CasinoGamePrimedice {\n result\n target\n condition\n __typename\n}\n"
};
fetch("https://primedice.com/_api/graphql", {
method: "POST",
headers: {
"x-access-token": token,
"x-language": "en",
"x-lockdown-token": "",
"content-type": "application/json",
"content-length": query.length
},
body: JSON.stringify(query)
}).then(response => {
if (response.ok){
return response.json();
}
else{
console.log("Request failed!", response);
}
}).then((jsonBody) => {
if (jsonBody.data.primediceRoll){
let roll = jsonBody.data.primediceRoll;
let condition = roll.state.condition;
let target = roll.state.target;
let rollNumber = +roll.state.result.toFixed(2);
let won = condition === "above"
? rollNumber > target
: rollNumber < target;
console.log (
won ? "Win" : "Loss",
rollNumber);
if (rollUntilStop && !shouldStopBetting(won, rollNumber)){
placeBet(rollUntilStop, betVariables);
}
}
else{
console.log("No roll returned!", jsonBody);
}
});
}
function shouldStopBetting(won, rollNumber){
if (stopContinousBetting){
console.log("Betting manually stopped!");
stopContinousBetting = false;
return true;
}
let winningNumbers = [10.10, 20.20, 30.30, 40.40, 50.50, 60.60, 70.70, 80.80, 90.90];
if (won && (winningNumbers.indexOf(rollNumber) != -1)) {
console.log("Stop condition met!");
return true;
}
return false;
}
function stopBetting(){
stopContinousBetting = true;
}
// ...To here.
// ==========================================
// Run this only after you've input the exact bet parameters you want
placeBet(
true,
{
"currency":"ltc",
"amount":0.00032760,
"target":1.99,
"condition":"above"
});
// Run this if you want to interrupt betting
stopBetting();