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-04-26 18:51:58, last edited by Xrecion (2015-04-26 20:28:22)

Xrecion
Member
Joined: 2015-04-26
Posts: 16

EE Bot

Hi !
*I'm form Poland so sorry for my English !*

I make bot to my brother (filiposs) and i need to do to blocks disappear at certain cords.
Now I have that the blocks are "flying" all the time.
zupf61.png

Offline

Wooted by: (3)

#2 2015-04-26 23:20:18

ewoke
Member
Joined: 2015-02-20
Posts: 412

Re: EE Bot

yes cuz that it was you have programmed there,

whats the problem exactly


if you can read this....good for you

Offline

Wooted by: (4)

#3 2015-04-27 12:01:29

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

Re: EE Bot

Please clarify your question.

Offline

Wooted by: (2)

#4 2015-04-27 18:35:23, last edited by Xrecion (2015-04-27 18:42:08)

Xrecion
Member
Joined: 2015-04-26
Posts: 16

Re: EE Bot

I want make something like this :

   Block "fly" in the left page, and then when the "fly" 10 blocks he disappear.(not "fly" next, because he destroy map).

155mnaa.png

Offline

Wooted by:

#5 2015-04-27 19:49:28

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: EE Bot

You check if your x is at the position you want the flying block to stop, and in that case you only make the block disappear and not create a new one.

Meaning your code will look something like this:

if (bid == 1)
{
   if (blocks[0, x - 1, y] == 0)
   {
      con.Send(bldatam, 0, x, y, 0);
      if(x == ***Ending x value***)
      {
         con.Send(bldatam, 0, x -1, y, 1);
      }
   }
}

Offline

Wooted by: (2)

#6 2015-04-27 20:11:17

Xrecion
Member
Joined: 2015-04-26
Posts: 16

Re: EE Bot

When i change code and i put arrows(id:1) then bot delete this arrow, when i put arrows on x = 4 then arrows moving to -x.
So... This is not this code //forums.everybodyedits.com/img/smilies/big_smile
But when i change code to :

            if (blocks[0, x - 1, y] == 0)
                    {
                        con.Send(bldatam, 0, x -1, y, 1);
                        if(x == 4)
                        {
                          con.Send(bldatam, 0, x, y, 0);
                        }
                    }
                                                          ... almost was well. When i put arrows then they moving to - x and when they are in x = 4 bot delete this arrows, but only in this cords. I want make that arrows disappear in X cords and not destroy my map .

Offline

Wooted by: (2)

#7 2015-04-27 20:41:48, last edited by den3107 (2015-04-27 20:43:36)

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: EE Bot

My bad, it's supposed to be if(x >= 4)
Using this all x cords above 3 will be deleted, so this would include 4.

Can be you want if(x <= 4) instead, but I'm not sure about that.

P.S. Compliments to the way you give us information and actually try to fix things yourself.

Offline

Wooted by: (4)

#8 2015-04-28 22:26:28

Xrecion
Member
Joined: 2015-04-26
Posts: 16

Re: EE Bot

Now my bot working perfect //forums.everybodyedits.com/img/smilies/wink
But have someone tutorial how to get a save section of the map ?! I don't want write after the 1 line for every block //forums.everybodyedits.com/img/smilies/big_smile
If no ... i will need to combine //forums.everybodyedits.com/img/smilies/big_smile

Offline

Wooted by:

#9 2015-04-28 23:05:15

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: EE Bot

Make a function that places blocks for you, in that function you can check if the desired coordinates for the block are inside the safezone. If they are, do some error handling if you want.

Offline

#10 2015-04-29 13:42:42

Xrecion
Member
Joined: 2015-04-26
Posts: 16

Re: EE Bot

In the sense that i must make 1 line to 1 block ?!
We can't redo it?
https://www.youtube.com/watch?v=2bK5bcG … e=youtu.be

Offline

#11 2015-04-29 15:54:45

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: EE Bot

Xrecion wrote:

In the sense that i must make 1 line to 1 block ?!
We can't redo it?
https://www.youtube.com/watch?v=2bK5bcG … e=youtu.be

You can write a function that takes 2 parameters: starting position and ending position
What the method then will do is draw your flying line from the given start to the given end.

If you want to make sure you always keep your save zones unedited, make a function with the following parameters
block Id
x position
y position
and all other parameters that are required for placing blocks like rotation and such

Within that method you place the block IF it is outside of the savezone.

Offline

#12 2015-06-11 19:24:48

Xrecion
Member
Joined: 2015-04-26
Posts: 16

Re: EE Bot

:/ :S
OenZf1k.png

Offline

#13 2015-06-11 19:34:13

capasha
Member
Joined: 2015-02-21
Posts: 4,066

Re: EE Bot

We need more then that to see what's the error is.

Offline

#14 2015-06-11 19:35:20, last edited by Srna (2015-06-11 19:40:36)

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

Re: EE Bot

Xrecion wrote:

OenZf1k.png

Replace:

client = PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", email_TextBox.Text, password_TextBox.Text);

With:

client = PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", email_TextBox.Text, password_TextBox.Text, null);

Hope this helps

*EDIT
I see that u have CheckForIllegalCrossThreadCalls = false;

I recommend that you do:

Invoke(new EventHander(delegate
{
      //Ur Connect code here
}));

I think that it's like that, i think..

Offline

Wooted by:

#15 2015-06-12 13:42:44, last edited by Xrecion (2015-06-12 13:45:33)

Xrecion
Member
Joined: 2015-04-26
Posts: 16

Re: EE Bot

Thx Srna !
And next problem ... [Pushing blocks] but blocks don't want to be moved...

g6cLdkD.png

Offline

#16 2015-06-12 14:21:47, last edited by DarkDragon4900 (2015-06-12 14:22:21)

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

Re: EE Bot

m[1] and m[2] are Doubles.
You have to round them.

int PlayerX = Math.Round(m.GetDouble(1)) / 16;
int PlayerY = Math.Round(m.GetDouble(2)) / 16;

Offline

#17 2015-06-12 15:39:07

Xrecion
Member
Joined: 2015-04-26
Posts: 16

Re: EE Bot

zIKAyjl.png

Offline

#18 2015-06-12 16:16:46, last edited by DarkDragon4900 (2015-06-12 16:17:28)

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

Re: EE Bot

Oops.
Try

int PlayerX = (Math.Round(m.GetDouble(1)) / 16) as int;
int PlayerY = (Math.Round(m.GetDouble(2)) / 16) as int;

(That wasn't too hard to figure out. You can use Convert.ToInt32, too.)
(

int PlayerX = Convert.ToInt32(Math.Round(m.GetDouble(1)) / 16);
int PlayerY = Convert.ToInt32(Math.Round(m.GetDouble(2)) / 16);

)

Offline

#19 2015-06-12 17:16:24

Xfrogman43
Member
From: need to find a new home
Joined: 2015-02-15
Posts: 4,174

Re: EE Bot

int playerx = m.GetInt(1) / 16;
int playery = m.GetInt(2) / 16;

You can just make them ints.


zsbu6Xm.png thanks zoey aaaaaaaaaaaand thanks latif for the avatar

Offline

#20 2015-06-12 17:35:38

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

Re: EE Bot

Xfrogman43 wrote:
int playerx = m.GetInt(1) / 16;
int playery = m.GetInt(2) / 16;

You can just make them ints.

Well, not sure about it then.

Offline

#21 2015-06-13 16:39:10

Xrecion
Member
Joined: 2015-04-26
Posts: 16

Re: EE Bot

I wrote " int PlayerX = Convert.ToInt32(Math.Round(m.GetDouble(1)) / 16);
              int PlayerY = Convert.ToInt32(Math.Round(m.GetDouble(2)) / 16);" ... but blocks still don't want to be moved.
I wrote too : " say("X : " + PlayerX);
                     say("Y : " + PlayerY); " ... and bot don't want say my Y cords .

Offline

#22 2015-06-13 17:24:02, last edited by Srna (2015-06-13 17:24:43)

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

Re: EE Bot

I always do:

int PlayerX = (int)(m.GetDouble(1)) / 16;
int PlayerY = (int)(m.GetDouble(2)) / 16;
int Horizontal = m.GetInt(7);
int Vertical = m.GetInt(8);

You could try that but i dont know if it's different or the same as the other codes.

To test the X and Y, just do a simple dig.

ThreadPool.QueueUserWorkItem(delegate
{
      if (blocks[0, PlayerX + Horizontal, PlayerY + Vertical] == 16) //Brown brick
      {
           con.Send(worldKey, 0, PlayerX + Horizontal, PlayerY + Vertical, 4);   
           Thread.Sleep(10);
      }
});

ThreadPool.QueueUserWorkItem is for Thread.Sleep
If you dont use ThreadPool.QueueUserWorkItem it will freeze everything else (probably).

Hope this helps //forums.everybodyedits.com/img/smilies/smile

Offline

#23 2015-06-13 18:14:26

Xrecion
Member
Joined: 2015-04-26
Posts: 16

Re: EE Bot

I change to : "   int PlayerX = (int)(m.GetDouble(1)) / 16;
                        int PlayerY = (int)(m.GetDouble(2)) / 16;
                        int Horizontal = m.GetInt(7);
                        int Vertical = m.GetInt(8); " ... ,  make this Digbot and Digbot too don't work  :/

Offline

#24 2015-06-13 19:19:54, last edited by Xfrogman43 (2015-06-13 19:20:51)

Xfrogman43
Member
From: need to find a new home
Joined: 2015-02-15
Posts: 4,174

Re: EE Bot

Srna wrote:

ThreadPool.QueueUserWorkItem is for Thread.Sleep
If you dont use ThreadPool.QueueUserWorkItem it will freeze everything else (probably).

Threadpool makes it so you are able to do other things while there is a thread.sleep.
Thread.sleep will not allow you to do anything while it waits.


zsbu6Xm.png thanks zoey aaaaaaaaaaaand thanks latif for the avatar

Offline

Xfrogman431434219594511979

Board footer

Powered by FluxBB

[ Started around 1732478497.8417 - Generated in 0.069 seconds, 13 queries executed - Memory usage: 1.71 MiB (Peak: 1.94 MiB) ]