Official Everybody Edits Forums

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.

#1 2015-06-21 09:50:01

1448
Formerly alkazam1448
From: Numberland
Joined: 2015-04-12
Posts: 683
Website

Stalker not working

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

#2 2015-06-21 10:19:41, last edited by Br0k3n (2015-06-21 10:20:53)

Br0k3n
Member
From: Serbia
Joined: 2015-04-04
Posts: 1,451

Re: Stalker not working

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:
MEjoQHj.png
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.


?type=online&name=br0k3n ?type=lastlogin&name=br0k3n ?type=loginstreak&name=br0k3n

76561198080960604.png

Offline

#3 2015-06-21 13:30:18, last edited by DarkDragon4900 (2015-06-21 13:33:38)

DarkDragon4900
Member
Joined: 2015-03-17
Posts: 251

Re: Stalker not working

Br0k3n wrote:

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:
MEjoQHj.png
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

[9] <Integer> Coins

Doesn't take so much coding to figure out that coins is an int and is not a gravity multiplier.

Offline

Wooted by:

#4 2015-06-21 13:43:52

Srna
Member
Joined: 2015-02-26
Posts: 220

Re: Stalker not working

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

Wooted by: (2)
Srna1434890632514945

Board footer

Powered by FluxBB

[ Started around 1732477463.3693 - Generated in 0.056 seconds, 12 queries executed - Memory usage: 1.44 MiB (Peak: 1.56 MiB) ]