Skip to content

Commit

Permalink
Minor bugs fixes and fixed betting at rollin
Browse files Browse the repository at this point in the history
Finaly bug fixes before v4 release
  • Loading branch information
Seuntjie900 committed Feb 15, 2016
1 parent 924f0a4 commit 018b708
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 45 deletions.
6 changes: 6 additions & 0 deletions DiceBot/Coinichiwa.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,17 @@ protected override bool internalWithdraw(double Amount, string Address)
public override void Login(string Username, string Password, string twofa)
{
reqID = 0;
if (Client!=null)
{
try { Client.Close(); }catch
{ }
}
Client = new TcpClient("api.coinichiwa.com", 81);
if (Client.Connected)
{
apikey = Password;
//Client.Connect("api.coinichiwa.com", 81);
ReadBuffer = new byte[256];
Client.GetStream().Read(ReadBuffer, 0, 256);

foreach (byte b in ReadBuffer)
Expand Down
4 changes: 2 additions & 2 deletions DiceBot/PD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public PD(cDiceBot Parent)
Name = "PrimeDice";
Tip = true;
TipUsingName = true;
Thread tChat = new Thread(GetMessagesThread);
tChat.Start();
//Thread tChat = new Thread(GetMessagesThread);
//tChat.Start();
SiteURL = "https://primedice.com/?ref=Seuntjie";
}

Expand Down
2 changes: 1 addition & 1 deletion DiceBot/Stats.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion DiceBot/betterbets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public BB(cDiceBot Parent)
Name = "BetterBets";
Tip = true;
TipUsingName = true;
SiteURL = "https://betterbets.io/?ref=1301492";
SiteURL = "https://betterbets.io/?ref=1304270";

}
HttpClientHandler ClientHandlr;// = new HttpClientHandler { UseCookies = true, AutomaticDecompression= DecompressionMethods.Deflate| DecompressionMethods.GZip };;
Expand Down
66 changes: 38 additions & 28 deletions DiceBot/cDiceBot.Designer.cs

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions DiceBot/cDiceBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2194,7 +2194,7 @@ public void DoBet(Bet bet)
if (Sound && SoundStreak && Losestreak > SoundStreakCount)
playalarm();
//email
if (!RunningSimulation)
if (!RunningSimulation && Emails!=null)
if (Emails.Streak && Losestreak > Emails.StreakSize)
Emails.SendStreak(Losestreak, Emails.StreakSize, dPreviousBalance);

Expand Down Expand Up @@ -4995,7 +4995,7 @@ private void exitToolStripMenuItem_Click(object sender, EventArgs e)

private void beginnersGuidToolStripMenuItem_Click(object sender, EventArgs e)
{
Process.Start("https://bitcointalk.org/index.php?topic=391870");
Process.Start("https://bot.seuntjie.com/gettingstarted.aspxex");
}

private void justDiceToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
Expand Down Expand Up @@ -6050,6 +6050,11 @@ public void DumpLog(string Message, int Level)
}
}
}

private void frequentlyAskedQuestionsToolStripMenuItem_Click(object sender, EventArgs e)
{
Process.Start("https://bot.seuntjie.com/faqs.aspx");
}

}
}
2 changes: 1 addition & 1 deletion DiceBot/dice999.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public dice999(cDiceBot Parent)
this.Parent = Parent;
AutoInvest = false;
AutoWithdraw = true;

edge = 0.1m;
ChangeSeed = false;
AutoLogin = false;
BetURL = "https://www.999dice.com/Bets/?b=";
Expand Down
2 changes: 1 addition & 1 deletion DiceBot/moneypot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void placebetthread(object _High)
MPBet tmp = json.JsonDeserialize<MPBet>(Resp);
if (tmp.error != null)
{
if (tmp.error.ToLower() == "you did not provide a valid hash")
if (tmp.error.ToLower().Contains("valid hash"))
{
ResetSeed();
placebetthread(High);
Expand Down
16 changes: 7 additions & 9 deletions DiceBot/rollin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void PlaceBetThread(object _High)
Parent.updateStatus(string.Format("Betting: {0:0.00000000} at {1:0.00000000} {2}", amount, chance, High ? "High" : "Low"));
List<KeyValuePair<string, string>> pairs = new List<KeyValuePair<string, string>>();
pairs.Add(new KeyValuePair<string, string>("bet_amount", (amount * 1000).ToString("0.00000", System.Globalization.NumberFormatInfo.InvariantInfo)));
pairs.Add(new KeyValuePair<string, string>("bet_number", tmpchance.ToString("0.00", System.Globalization.NumberFormatInfo.InvariantInfo)));
pairs.Add(new KeyValuePair<string, string>("bet_number", tmpchance.ToString("0", System.Globalization.NumberFormatInfo.InvariantInfo)));
pairs.Add(new KeyValuePair<string, string>("prediction", High ? "bigger" : "smaller"));
pairs.Add(new KeyValuePair<string, string>("seed", R.Next(int.MaxValue).ToString()));

Expand Down Expand Up @@ -188,7 +188,7 @@ public override void SendTip(string User, double amount)
List<KeyValuePair<string, string>> pairs = new List<KeyValuePair<string, string>>();
pairs.Add(new KeyValuePair<string, string>("username", User));
pairs.Add(new KeyValuePair<string, string>("private", "0"));
pairs.Add(new KeyValuePair<string, string>("amount", (amount * 1000).ToString("0.00000", System.Globalization.NumberFormatInfo.InvariantInfo)));
pairs.Add(new KeyValuePair<string, string>("amount", (amount * 1000).ToString("0", System.Globalization.NumberFormatInfo.InvariantInfo)));
FormUrlEncodedContent Content = new FormUrlEncodedContent(pairs);
string sEmitResponse = Client.PostAsync("tipsy/tip", Content).Result.Content.ReadAsStringAsync().Result;

Expand Down Expand Up @@ -419,15 +419,15 @@ public override bool ReadyToBet()
{
//return true;
if (amount == 0)
return (DateTime.Now - lastbet).TotalSeconds >= 10;
return (DateTime.Now - lastbet).TotalSeconds >= 3;
else if (amount < 0.00000010)
return (DateTime.Now - lastbet).TotalSeconds >= 5;
return (DateTime.Now - lastbet).TotalSeconds >= 2;
else if (amount < 0.00000100)
return (DateTime.Now - lastbet).TotalSeconds >= 3;
return (DateTime.Now - lastbet).TotalSeconds >= 1;
else if (amount < 0.00001000)
return (DateTime.Now - lastbet).TotalSeconds >= 2;
return (DateTime.Now - lastbet).TotalSeconds >= 500;
else
return (DateTime.Now - lastbet).TotalMilliseconds >= 500;
return (DateTime.Now - lastbet).TotalMilliseconds >= 100;
}

bool isRollin = true;
Expand All @@ -450,8 +450,6 @@ public override void SendChatMessage(string Message)
public override double GetLucky(string server, string client, int nonce)
{

server = "3fba0c51b98de5b3dce8c8c7df0505a4041b4eb44a983f94d5f8c34a6b86366e";
client = "0679f25b2c3e3ed93f80be4bf1f7930115279cd7";
HMACSHA512 betgenerator = new HMACSHA512();
List<byte> serverb = new List<byte>();

Expand Down

0 comments on commit 018b708

Please sign in to comment.