Jump to content
Aleksandar

🏆 [$800] The Greatest Minds: Alexander Graham Bell 📞

Recommended Posts

3.43

placed by Serlite on 25/02/2021

Wagered

0.00017019ltc.svg

Multiplier

20.00x

Profit

0.00323361ltc.svg

9.94

placed by Serlite on 25/02/2021

Wagered

0.00017019ltc.svg

Multiplier

3.00x

Profit

0.00034038ltc.svg

What an interesting challenge to script! Not very tough, but definitely different from the usual rollhunts we've done. Here's the script, for anyone still not finished it:

chance   = 4.9500
nextbet  = 0
bethigh  = false
currency = "Ltc"

local hitFirst = false

function dobet()
    local digit4 = round((lastBet.Roll * 100) % 10)
    if (win and !hitFirst and digit4 != 0 and digit4 != 1) then
        print(tostring(lastBet.Roll))
        print(tostring(lastBet.Id))
        
        hitFirst = true
        chance   = convertMultiplierToWinChance(digit4)
    elseif (win and hitFirst) then
        print(tostring(lastBet.Roll))
        print(tostring(lastBet.Id))
        
        ching()
        stop()
    else
        hitFirst = false
        chance   = convertMultiplierToWinChance(20)
    end
end

function convertMultiplierToWinChance(multiplier)
    return round(99 / multiplier, 2)
end

function round(num, numDecimalPlaces)
  local mult = 10^(numDecimalPlaces or 0)
  return math.floor(num * mult + 0.5) / mult
end

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×