MyDiceBot -Tutorial 4 - Script Bet on Magic-Dice

in #utopian-io5 years ago

mydicebot-steemit.png

MyDiceBot

  • https://mydicebot.github.io
  • MyDiceBot is World #1 Cross-Platform Dicing Bot.
  • Multiple platforms are supported, including Windows, Mac, Linux, and Web.
  • Multiple programming languages are supported such as Lua.
  • Open Source and Free Forever

Download and Launch

Select Currencies

  • You can choose STEEM or SBD from the currencies list
    Selection_060.png

Script Bet

mydicebot-script-bet.png

  • Script is the CORE feature of MyDiceBot
  • You could write lua script to bet automatically, under different conditions

Sample Code of betting 10,000 times to WIN STEEM/SBD

mydicebot-magicdice-script-bet.png

--[[
    This script doubles the bet after a loss but starts at a very high chance of success:  94%.  
    After each bet the chance reduces enough to bring equilibrium to profit but stops reducing chance at 49.5%.  
    First loss goes from 94% to 67%, then 57% and then gradually lower and closer to 49.5%.  
    It basically buys you a few more higher probability roles before the same old 49.5% martingale.
    author: grendel25
    link: https://bot.seuntjie.com/scripts.aspx?id=38
]]

-- You could just use Sleep(n) to use LUAs built in sleep function. 
-- But this one will have the same result without killing your CPU.
function sleep(n)
    t0 = os.clock() 
    while os.clock() - t0 <= n do end
end

-- init
chance = 94
basebet = 0.1
bethigh = false
lossstreakcount = 0 -- sample: user-defined lossstreakcount.
nextbet = basebet

-- do bet and let's rock
function dobet()

    -- some sites limit bet latency due to the low bet amount.
    -- enable it and avoid to be banned, just in case.
    -- eg. 2 means sleeping 2 seconds
    -- sleep(2)

    -- adjust the stopping condition of session profit.
    if profit >= 0.00001000 then
        stop()
    end

    -- adjust the stopping condition of wins.
    if wins >= 1000 then
        stop()
    end

    -- adjust the stopping condition of bets. 
    if (bets >= 5000) then 
        stop()
    end

    -- adjust the stopping condition of loss streak. 
    -- eg. -10 means 10 loss streak
    if (currentstreak <= -10) then
        stop()
    end

    -- if win, reset bet to base amount.
    if (win) then
        chance = 94
        nextbet = basebet
        lossstreakcount = 0
    end

    -- if loss, 
    -- first loss goes from 94% to 67%, 
    -- then 57% and then gradually lower and closer to 49.5%.
    if (!win) then
        lossstreakcount += 1
        if (lossstreakcount > 1) then
            nextbet = previousbet*2
            chance = (1/(((nextbet+(nextbet-basebet))/nextbet)))*100
            if chance < 49.5 then chance = 49.5 end
            bethigh = !bethigh
            print ("LOSE")
            print(nextbet)
            print(chance)
            print(profit)
            print(bets)
        else
            nextbet = previousbet*2
            chance = (1/(((basebet+nextbet))/nextbet))*100
            if chance < 49.5 then chance = 49.5 end
            bethigh = !bethigh
            print ("LOSE")
            print(nextbet)
            print(chance)
            print(profit)
            print(bets)
        end
    end
end

Stats

Selection_062.png

TOTAL STATS/CURRENT STATS 1

  • Right now, as there is no official API of MagicDice available, no possible to get all the history of betting statistics. So TOTAL STATS and CURRENT STATS 1 are showing the same statistics.
  • 'CURRENT STATS 1' is showing the statistics of current session, including Balance, Win, Loss, Bet, Profit and Wagered.

CURRENT STATS 2

  • currentstreak - current streak, it could be positive number or negative number. Positive means Wins streak, Negative means Loss streak.
  • maxwinstreak - Max Win Streak in current session.
  • maxlossstreak - Max Loss Streak in current session.

Charts

Selection_063.png

  • Y axis means how much profit you've made
  • X axis means how many bets you've made

Betting History

Selection_064.png

  • ID is the Bet ID in MagicDice.
  • Game is the Number you expect to roll, based on the 'chance' you've set.
  • Roll is the actual number rolled in MagicDice system.
  • Amount is the betting amount for each bet.
  • Payout is the payout by MagicDice system.
  • Profit is the profit you've made for each bet. (Payout - Amount = Profit)

Have fun by playing MagicDice

magic-dice-320.png

Sort:  

Thank you for your contribution @mydicebot.
After analyzing your tutorial we suggest the following points:

  • In the next tutorial please correct the links in the first section.

  • Your tutorial is quite short for a good tutorial. We recommend you aim for capturing at least 2-3 concepts.

  • We suggest that the tutorial be more detailed, so that the reader understands well what you have developed.

Your tutorial is very interesting and intuitive for readers. Thanks for your work on developing this tutorial.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for your review, @portugalcoin! Keep up the good work!

Thanks for reviewing, voting you.

Congratulations @mydicebot! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made more than 400 upvotes. Your next target is to reach 500 upvotes.

Click here to view your Board
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Support SteemitBoard's project! Vote for its witness and get one more award!

Hi @mydicebot!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 1.020 which ranks you at #52561 across all Steem accounts.
Your rank has improved 209 places in the last three days (old rank 52770).

In our last Algorithmic Curation Round, consisting of 351 contributions, your post is ranked at #333.

Evaluation of your UA score:
  • Only a few people are following you, try to convince more people with good work.
  • The readers like your work!
  • Try to work on user engagement: the more people that interact with you via the comments, the higher your UA score!

Feel free to join our @steem-ua Discord server

Hey, @mydicebot!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.28
TRX 0.11
JST 0.030
BTC 68518.46
ETH 3760.02
USDT 1.00
SBD 3.66