Seuntjies DiceBot
DiceBot => Programmer Mode => Topic started by: kodark on September 29, 2020, 05:04:40 pm
-
Hi,
First of all I would thank you to Seuntjie for this incredible work and always as I can, I donate when I win (: .
I tried to convert this Dicebot V3 script to KryGamesBot, unsuccessful.
Dicebot V3 working script:
betcalc = 0.002747 --(<-- Edit your betcalc for risk management)
bethigh = true
stopnow = false
first = true
done = true
chance = 48
betcount = 1
profittarget = 20547.00000000 --(<-- Edit your Profit target for stop!!!)
if (betcalc < 0.001) then print("Please set betcalc then restart the script") stop() end
base = balance * (betcalc / 100000)
curbet = base * 3.7255
nextbet = base
function dobet()
r = math.random(2)
if r == 1 then
bethigh = true
else
bethigh = true
end
if betcount == 1 then
betcount=0
resetseed();
else
betcount=betcount+1
end
if (balance) >= profittarget then
ching()
alarm()
stop()
print(balance)
print("PROFIT TARGET ACHIEVED!!!")
end
if (balance) < (nextbet) then
ching()
alarm()
stop()
print(balance)
print("BALANCE INSUFFICIENT FUNDS")
end
base = balance * (betcalc / 100000)
if (first) then
if(stopnow) then stop() end
if !win then
chance = math.random(45,50)
nextbet = curbet
first = false
done = true
end
end
if(!first and !done) then
if(stopnow) then stop() end
if win then
chance = 27.5
curbet = base * 3.7255
nextbet = base
first = true
done = true
else
curbet = curbet * 3.7255
nextbet = curbet
chance = 72.5
end
end
print("=========================================")
print(" ")
print("You Won ") print(profit) print(" for this Session")
print(" ")
print("Your Balance is ") print(balance)
print(" ")
print("=========================================")
done = false
end
What I did trying to convert following some instructions here in the forum and in the .doc file:
betcalc = 0.002747 --(<-- Edit your betcalc for risk management)
NextBet.High = true
stopnow = false
first = true
done = true
NextBet.Chance = 48
betcount = 1
profittarget = 20547.00000000 --(<-- Edit your Profit target for stop!!!)
if (betcalc < 0.001) then Print("Please set betcalc then restart the script") stop() end
base = balance * (betcalc / 100000)
curbet = base * 3.7255
NextBet.Amount = base
function DoDiceBet(PreviousBet, Win, NextBet)
r = math.random(2)
if r == 1 then
NextBet.High = true
else
NextBet.High = true
end
if betcount == 1 then
betcount=0
ResetSeed();
else
betcount=betcount+1
end
if (balance) >= profittarget then
Ching()
Alarm()
stop()
Print(balance)
Print("PROFIT TARGET ACHIEVED!!!")
end
if (balance) < (NextBet.Amount) then
Ching()
Alarm()
stop()
Print(balance)
Print("BALANCE INSUFFICIENT FUNDS")
end
base = balance * (betcalc / 100000)
if (first) then
if(stopnow) then stop() end
if !Win then
NextBet.Chance = math.random(45,50)
NextBet.Amount = curbet
first = false
done = true
end
end
if(!first and !done) then
if(stopnow) then stop() end
if Win then
NextBet.Chance = 27.5
curbet = base * 3.7255
NextBet.Amount = base
first = true
done = true
else
curbet = curbet * 3.7255
NextBet.Amount = curbet
NextBet.Chance = 72.5
end
end
Print("=========================================")
Print(" ")
Print("You Won ") Print(profit) Print(" for this Session")
Print(" ")
Print("Your Balance is ") Print(balance)
Print(" ")
Print("=========================================")
done = false
end
function ResetDice(NextBet)
NextBet.Amount=base
NextBet.Chance=48
NextBet.High=true
end
When I click Start the console gives me an error:
"doge.lua:(50,7-8): unexpected symbol near '!'
System.ArgumentException: function is not a function and has no __call metamethod.
at MoonSharp.Interpreter.Script.Call(DynValue function, DynValue[] args)
at DoormatBot.Strategies.ProgrammerLUA.RunReset()"
Could someone help me figure out or convert this script right from scratch? I think even if I fix those lines I will have another error coming out and still I dont know how to fix it.
I read the document and did a search in the forum.
Thanks,
K