Post
Topic
Board Gambling
Re: scripting primedice --- getting started
by
raitpngman
on 13/06/2016, 23:17:51 UTC
Is there a way to make a script only bet if it sees certain conditions met? That's the only thing about a script I would be interested in. If you could help me understand that would be awesome.

An example

while [ $better -le 60000 ]
do
result=$(curl -X POST --data "amount=$better&target=$target&condition=$condition" https://api.primedice.com/api/bet?access_token=$token 2>/dev/null | sed -e 's/.*"win":\(true\|false\).*/\1/')

echo
echo "$counter bet = $better"
echo "result = $result"

if [ "$result" = "true" ]; then
   let better=$amount
elif [ "$result" = "false" ]; then
   let better=$(($better * 10))
else
   break
fi


let counter=$counter+1
done