Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
Pages: 1
You all know that the stalker code is
conn.Send("m", e.GetDouble(1), e.GetDouble(2), e.GetDouble(3), e.GetDouble(4), e.GetDouble(5), e.GetDouble(6), e.GetDouble(7), e.GetDouble(8), e.GetInt(9), e.GetBoolean(10));
and so do I, so that's what I wrote as the stalker code for 1448 Bot.
But, it does not seem to work.
First, I have to tell you some basic things in my bot before we continue, or you won't understand what I wrote.
Here are the variables I used.
string mover = Players[e.GetInt(0)]; //Where players is the name of the dictionary in which I store the username and id of the players
public bool staking;
public TextBox playerStalked;
if (mover == playerStalked.Text)
{
if (stalking)
{
conn.Send("m", e.GetDouble(1), e.GetDouble(2), e.GetDouble(3), e.GetDouble(4), e.GetDouble(5), e.GetDouble(6), e.GetDouble(7), e.GetDouble(8), e.GetInt(9), e.GetBoolean(10));
}
}
Now, I have the "Start stalking" button (called changeStalkBool), and the event changeStalkBool_Click() is written here:
private void changeStalkBool_Click(object sender, EventArgs e)
{
if (AdminStalk.Checked) //AdminStalk is a checkbox with Text "Allow stalking"
{
if (!stalking)
{
stalking = true;
changeStalkBool.Text = "Stop stalking";
say("Bot is now stalking: " + playerStalked.Text); //say() method I made
}
else
{
stalking = false;
changeStalkBool.Text = "Start stalking";
say("Bot has stopped stalking");
}
}
else
{
MessageBox.Show("Stalker is not enabled");
}
}
Also, the case "say" for the !stalk/!unstalk commands:
string playermessage = e.GetString(1);
string username = Players[e.GetInt(0)];
else if (playermessage.StartsWith("!stalk") || playermessage.StartsWith(".stalk"))
{
if (AdminList.Items.Contains(username) && AdminStalk.Checked)
{
string userToBe = playermessage.Substring(7);
stalking = false;
Invoke((MethodInvoker)delegate { playerStalked.Text = userToBe; });
Invoke((MethodInvoker)delegate { changeStalkBool.Text = "Stop stalking"; });
stalking = true;
say("Bot is now stalking: " + playerStalked.Text);
}
else
{
nope(username);
}
}
else if (playermessage == "!unstalk" || playermessage == ".unstalk")
{
if (AdminList.Items.Contains(username))
{
stalking = false;
Invoke((MethodInvoker)delegate { changeStalkBool.Text = "Start stalking"; });
say("Bot has stopped stalking");
}
else
{
nope(username);
}
}
Also, I do have a digbot along with the Stalker in case "m", but that won't be necessary because I tried removing the digbot to test the stalker but still it didn't work.
Offline
I might be wrong about this, but:
conn.Send("m", e.GetDouble(1), e.GetDouble(2), e.GetDouble(3), e.GetDouble(4), e.GetDouble(5), e.GetDouble(6), e.GetDouble(7), e.GetDouble(8), e.GetInt(9), e.GetBoolean(10));
by this:
the code should be:
conn.Send("m", e.GetDouble(1), e.GetDouble(2), e.GetDouble(3), e.GetDouble(4), e.GetInt(5), e.GetInt(6), e.GetInt(7), e.GetInt(8), e.GetDouble(9), e.GetBoolean(10));
I'm completely new to programming and this might not be correct.
Offline
I might be wrong about this, but:
alkazam1448 wrote:conn.Send("m", e.GetDouble(1), e.GetDouble(2), e.GetDouble(3), e.GetDouble(4), e.GetDouble(5), e.GetDouble(6), e.GetDouble(7), e.GetDouble(8), e.GetInt(9), e.GetBoolean(10));
by this:
the code should be:conn.Send("m", e.GetDouble(1), e.GetDouble(2), e.GetDouble(3), e.GetDouble(4), e.GetInt(5), e.GetInt(6), e.GetInt(7), e.GetInt(8), e.GetDouble(9), e.GetBoolean(10));
I'm completely new to programming and this might not be correct.
[9] <Integer> Coins
Doesn't take so much coding to figure out that coins is an int and is not a gravity multiplier.
Offline
Long code, just simply do this:
conn.Send("m", m[1], m[2], m[3], m[4], m[5], m[6], m[7], m[8], m[9], m[10]);
Offline
Pages: 1
[ Started around 1732471302.2728 - Generated in 0.063 seconds, 10 queries executed - Memory usage: 1.44 MiB (Peak: 1.56 MiB) ]