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 2016-08-13 15:38:01, last edited by SirJosh (2016-11-30 05:25:45)

SirJosh
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,077
Website

[Guide] Understanding how a EE Bot works, and how to make one.

Hello, and welcome to this guide understanding how an EE Bot works, and also how to make one. If this guide does not meet your needs, please see to another one.

Lesson 1: Learning Key Terms
Lesson 2: Learning the backend of EE, PlayerIO
Lesson 3: Learning a tiny bit of C#
Lesson 4: Using an IDE
Lesson 5: Getting started making the bot
Lesson 6: Making sure you have the right code in use.
Lesson 7: Adding other features to your bot

Thank you for reading this guide. Please leave suggestions if you have any suggestions.

A side note:
Please leave your programming questions related to general C# code (that's related to your bot), or questions about your bot here, instead of creating an entire topic for them, that way the bots and programming section doesn't have to be flooded with help me topics //forums.everybodyedits.com/img/smilies/smile

Offline

Wooted by: (4)

#2 2016-08-13 15:56:11, last edited by capasha (2016-08-13 16:02:46)

capasha
Moderation Team
Joined: 2015-02-21
Posts: 3,940
Website

Re: [Guide] Understanding how a EE Bot works, and how to make one.

Btw. You should never send init after the "onMessage". It wont work.

"leave" doesn't exists in the EE protocol. It's "left".

And this is the way you should use for ArmorGames:

var userid = "UserIDGoesHere";
var authtoken = "AuthTokenGoesHere";
 client = PlayerIO.Authenticate("everybody-edits-su9rn58o40itdbnw69plyw", "secure",new Dictionary<string, string> { { "userId", userid }, { "authToken", authtoken } }, null);

Offline

Wooted by:

#3 2016-08-13 16:06:09

Swarth100
Member
Joined: 2015-07-18
Posts: 305

Re: [Guide] Understanding how a EE Bot works, and how to make one.

It's nice that we have users working in guides, but IMO it feels a bit rushed.

I would suggest you split it uo in smaller topics with a bit more in-depth suggestions and a more complete code example (i.e. Instead on focusing on different aspect you might want to have a gradual buildup for a very simple bot on the same code)

Offline

Wooted by: (3)

#4 2016-08-13 16:17:43

SmittyW
Member
Joined: 2015-03-13
Posts: 2,083

Re: [Guide] Understanding how a EE Bot works, and how to make one.

Where do I put the code? How do I start a new project? X(

Where is can I find good c#? //forums.everybodyedits.com/img/smilies/sad

Offline

Wooted by: (2)

#5 2016-08-13 20:39:39

Tomahawk
Forum Mod
From: BiH/UK
Joined: 2015-02-18
Posts: 2,465

Re: [Guide] Understanding how a EE Bot works, and how to make one.

Yay, a tutorial encouraging people to copy paste.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

Wooted by:

#6 2016-08-13 21:20:08

MartenM
Member
From: The Netherlands
Joined: 2016-03-31
Posts: 834
Website

Re: [Guide] Understanding how a EE Bot works, and how to make one.

Tomahawk wrote:

Yay, a tutorial encouraging people to copy paste.

You have to start somehow. If you know a better way to teach people things though a guide, be sure to share it. (So we can copy and paste it)


lm3hgg8.jpg

Ingame: marten22        My steam: MartenM

Offline

Wooted by: (2)

#7 2016-08-13 22:33:52

SirJosh
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,077
Website

Re: [Guide] Understanding how a EE Bot works, and how to make one.

capasha wrote:

Btw. You should never send init after the "onMessage". It wont work.

"leave" doesn't exists in the EE protocol. It's "left".

And this is the way you should use for ArmorGames:

var userid = "UserIDGoesHere";
var authtoken = "AuthTokenGoesHere";
 client = PlayerIO.Authenticate("everybody-edits-su9rn58o40itdbnw69plyw", "secure",new Dictionary<string, string> { { "userId", userid }, { "authToken", authtoken } }, null);

Fixed my errors.

Swarth100 wrote:

It's nice that we have users working in guides, but IMO it feels a bit rushed.

I would suggest you split it uo in smaller topics with a bit more in-depth suggestions and a more complete code example (i.e. Instead on focusing on different aspect you might want to have a gradual buildup for a very simple bot on the same code)

I agree with you. This should fix it up *smashes computer with hammer* tada!

SmittyW wrote:

Where do I put the code? How do I start a new project? X(

Where is can I find good c#? //forums.everybodyedits.com/img/smilies/sad

Ah! I havn't considered that! Adding a simple IDE usage tutorial right now.

Tomahawk wrote:

Yay, a tutorial encouraging people to copy paste.

Actually, copy pasting is how I learn. It sounds weird, but I learn by making inferences, taking known knowledge and applying it to other known knowledge, and using a basic background knowledge of how the subject im copy pasting from works.

^But that sounds too weird my explanation, a basic example is I'm a really fast learner, you don't even have to be a teacher or experienced teacher to teach me stuff.
  ^Obviously it sounds like im bragging, and I can't help but explain it in the way that I just now did, so im sorry for sounding like I'm a bragger.

Offline

Wooted by: (2)

#8 2016-08-13 23:10:37

hummerz5
Member
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,807

Re: [Guide] Understanding how a EE Bot works, and how to make one.

MartenM wrote:
Tomahawk wrote:

Yay, a tutorial encouraging people to copy paste.

You have to start somehow. If you know a better way to teach people things though a guide, be sure to share it. (So we can copy and paste it)

An appropriately motivated non-coder could gain the necessary information to create any of their ideas (given that they are possible on the existing system) through the PlayerIO documentation, EE message info, and the countless C#/.NET guides online. Given a copy/paste of a working bot, he or she no longer even needs the PlayerIO documentation (to a degree).

I've said it multiple times: my concern with copy and paste is that most prospective "learners" do not understand what they're facing. They then become reliant on someone else's copy/paste code.

Offline

Wooted by: (2)

#9 2016-08-14 01:12:24

AlphaJon
Member
From: Who knows
Joined: 2015-07-21
Posts: 1,297

Re: [Guide] Understanding how a EE Bot works, and how to make one.

To be fair, having some pieces of code you can use as a base to quickly set up the project is more efficient than starting it from scratch using the documentation.
But in the end, it all depends on what you focus more on: getting stuff done/having more time for extra features, or learning programming.
I don't consider EE bots to be the best learning base, though. You mainly have to tinker with the EE protocol and PlayerIO.

Offline

#10 2016-08-14 01:14:03

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

Re: [Guide] Understanding how a EE Bot works, and how to make one.

Tomahawk wrote:

Yay, a tutorial encouraging people to copy paste.

Codecademy basically makes you copy/paste, book my brother used on university made you "copy/paste" (type over).

hummerz5 wrote:

An appropriately motivated non-coder could gain the necessary information to create any of their ideas (given that they are possible on the existing system) through the PlayerIO documentation, EE message info, and the countless C#/.NET guides online. Given a copy/paste of a working bot, he or she no longer even needs the PlayerIO documentation (to a degree).

I've said it multiple times: my concern with copy and paste is that most prospective "learners" do not understand what they're facing. They then become reliant on someone else's copy/paste code.

It's their responsibility to look at the code they get fed and understand it. When I go to Stack Overflow I expect code, and not some fancy long prayer.
Unless you're really studying it or getting actual 1-on-1 (generally also with an actual person beside you) advise, you will not get fed code, all other moments you will, to some degree (since obviously you have to change the given code into something that fits into your puzzle).

Offline

#11 2016-08-14 02:56:31

hummerz5
Member
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,807

Re: [Guide] Understanding how a EE Bot works, and how to make one.

^Yeah. I realize again that I've missed a golden opportunity to advertise that project i had.

wiki guide. Can't we all just agree to throw all our crap together? I mean, it'd take some editing to look good, but I'd like to see a tutorial/guide/anything from the community for the community.

but that's a personal issue? If not that, then we could sticky a topic that's actually a directory to everyone's tutorials! //forums.everybodyedits.com/img/smilies/big_smile

Offline

#12 2016-08-14 03:03:09

Joshua708
Member
From: everybodyedits.com
Joined: 2015-03-04
Posts: 153

Re: [Guide] Understanding how a EE Bot works, and how to make one.

USE AGE
▲Links
knowledge
Visual Studio Community 2015 Direct Download
Youtube Video for Visual Studio Community 2015 Useage

illuminati has come to take ur soul


Hey look a bunch of stats about me
browser-chrome-blue.svg visual%20studio-community%202017-7D3BC4.svg windows-10-brightgreen.svg download-70%20mbps-blue.svg upload-10%20mbps-blue.svg

ram-16%20gb-green.svg Processor-Intel%20i5--5200U-green.svg Graphics-Intel%20HD%20Graphics%205500-green.svg



kyK5VkB.png

Offline

#13 2016-08-16 23:01:58

Tomahawk
Forum Mod
From: BiH/UK
Joined: 2015-02-18
Posts: 2,465

Re: [Guide] Understanding how a EE Bot works, and how to make one.

Conclusion: copy/paste is good.

...

Some botters are real pros then.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

#14 2016-08-17 18:49:13

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

Re: [Guide] Understanding how a EE Bot works, and how to make one.

Tomahawk wrote:

Conclusion: copy/paste is good.

...

Some botters are real pros then.

Correction: copy/paste/edit
The edit part is generally where it goes wrong.

A programmer also is to copy snippets. Not programs.
Besides, when you'd be a software developer you'd get fired when you keep remaking everything while there're libraries out there that already have that functionality while your version brings nothing extra.

Offline

Wooted by: (2)

#15 2016-08-17 19:03:01

hummerz5
Member
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,807

Re: [Guide] Understanding how a EE Bot works, and how to make one.

den3107 wrote:

Besides, when you'd be a software developer you'd get fired when you keep remaking everything while there're libraries out there that already have that functionality while your version brings nothing extra.

I love the thing we do on the internet where someone brings up an analogy or comparison and then it's up for validation.

If you're being paid to program, I imagine projects will rarely be "write ten lines of code [to make a snake bot]" or anything small/insignificant like that. If you grab a "library out there that already has [snake] functionality" for that small of setup, you're doing something wrong.

So I disagree with your analogy in that libraries are necessary for large or difficult tasks like making the connection to PlayerIO or hammering some perfectly-RFC-compliant crap.

But I do agree, people often seem to get stumped at the point where they copy someone else's code and find out it doesn't compile. lol

Offline

#16 2016-09-09 12:00:08

Vinyl Melody
Formerly BananaMilkShake
Joined: 2016-06-19
Posts: 616

Re: [Guide] Understanding how a EE Bot works, and how to make one.

How do you make a bot follow a player to a world if the bot's account added the player?


cb0de83627.png
Thanks to: Ernesdo (Current Avatar), Zoey2070 (Signature)

Very inactive, maybe in the future, idk.

Offline

Wooted by:

#17 2016-09-09 13:23:17

capasha
Moderation Team
Joined: 2015-02-21
Posts: 3,940
Website

Re: [Guide] Understanding how a EE Bot works, and how to make one.

BananaMilkShake wrote:

How do you make a bot follow a player to a world if the bot's account added the player?

I guess you are talking about friends? If so. You could use a timer that check if he is online and is in a new world.
This code did I make from the ActionScript 3 from the SWF. And it works.

Offline

#18 2016-09-10 03:08:40

Vinyl Melody
Formerly BananaMilkShake
Joined: 2016-06-19
Posts: 616

Re: [Guide] Understanding how a EE Bot works, and how to make one.

capasha wrote:
BananaMilkShake wrote:

How do you make a bot follow a player to a world if the bot's account added the player?

I guess you are talking about friends? If so. You could use a timer that check if he is online and is in a new world.
This code did I make from the ActionScript 3 from the SWF. And it works.

Converted to Form and hooked to my bot. It works! Thanks capasha, now I can be lazy again.


cb0de83627.png
Thanks to: Ernesdo (Current Avatar), Zoey2070 (Signature)

Very inactive, maybe in the future, idk.

Offline

#19 2016-09-16 14:17:30, last edited by dylantherabbit (2016-09-16 14:21:25)

dylantherabbit
Member
Joined: 2016-09-05
Posts: 93

Re: [Guide] Understanding how a EE Bot works, and how to make one.

Still too complicated for me, lol. I need a tool that will do the copy/pasting FOR me and maybe this might make more sense XD.


Leader of The Rabbit Squad | Managed to annoy an entire IRC for the lols. They went salty and banned me for a ridiculous time and now they want to ban me from EE itself. Learn to not be so salty peeps //forums.everybodyedits.com/img/smilies/tongue
The Rabbit Games Progress: 100%
011f32505ac447d098d4d5f1650d620d.png

Offline

#20 2016-09-17 11:43:52

Vinyl Melody
Formerly BananaMilkShake
Joined: 2016-06-19
Posts: 616

Re: [Guide] Understanding how a EE Bot works, and how to make one.

Just leaving a question,
If I fill the world using my bot. My bot doesn't pick up any commands until it finished filling up the world.
Is this perfectly natural or is there a magic trick to avoid it?


cb0de83627.png
Thanks to: Ernesdo (Current Avatar), Zoey2070 (Signature)

Very inactive, maybe in the future, idk.

Offline

#21 2016-09-17 11:53:34

capasha
Moderation Team
Joined: 2015-02-21
Posts: 3,940
Website

Re: [Guide] Understanding how a EE Bot works, and how to make one.

BananaMilkShake wrote:

Just leaving a question,
If I fill the world using my bot. My bot doesn't pick up any commands until it finished filling up the world.
Is this perfectly natural or is there a magic trick to avoid it?

What I should do. Is some sort of threading for the filling. If you use threading the messages are going to work.
Also do some checking if filling is in progress, ignore people to use the filltool command until it's finished.

Offline

Wooted by:

#22 2016-09-17 11:59:16

Vinyl Melody
Formerly BananaMilkShake
Joined: 2016-06-19
Posts: 616

Re: [Guide] Understanding how a EE Bot works, and how to make one.

What I should do. Is some sort of threading for the filling. If you use threading the messages are going to work.

If you mean using Thread.Sleep, I'm already using it.

VERY messy code

Also do some checking if filling is in progress, ignore people to use the filltool command until it's finished.

If you mean limiting the fill command to players with certain ranks (aka owner only). It is already.


cb0de83627.png
Thanks to: Ernesdo (Current Avatar), Zoey2070 (Signature)

Very inactive, maybe in the future, idk.

Offline

#23 2016-09-17 13:44:59

hummerz5
Member
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,807

Re: [Guide] Understanding how a EE Bot works, and how to make one.

Read here, first of all: https://msdn.microsoft.com/en-us/librar … s.71).aspx

Threading allows you to do two things at once, basically. Problem is, PlayerIOClient will fire your OnMessage each time there is a message, but after you're done with the last one. I guess that's actually a good thing.

So you can't respond to a "say" message until you're done with the last "say" message. If you loop for thirty seconds, you'll wait thirty until the bot responds to the message.

But with threading (That is, using more than one thread) you can do your looping nonsense AND work on responding to the new folk. Using Thread.Sleep is not threading because you're only telling your existing (one) thread to stop.

We've had a discussion about whether or not one should use threading or timers, but I'm not sure you're up for that yet.

Offline

#24 2016-09-17 13:46:12

capasha
Moderation Team
Joined: 2015-02-21
Posts: 3,940
Website

Re: [Guide] Understanding how a EE Bot works, and how to make one.

BananaMilkShake wrote:

What I should do. Is some sort of threading for the filling. If you use threading the messages are going to work.

If you mean using Thread.Sleep, I'm already using it.

VERY messy code

Also do some checking if filling is in progress, ignore people to use the filltool command until it's finished.

If you mean limiting the fill command to players with certain ranks (aka owner only). It is already.

Also if one user use the fill command. The fill command is in use. If someone else use the filltool while the filling is still filling, your bot will maybe crash.

The other thing, yes you can use thread.sleep, but if you use something like this:

Threading thread = new Threading(fillcommand);
thread.Start();

Your code will run in another thread. Which will ignore the messages. Which mean you would get messages.

Offline

#25 2016-09-17 13:53:04

MartenM
Member
From: The Netherlands
Joined: 2016-03-31
Posts: 834
Website

Re: [Guide] Understanding how a EE Bot works, and how to make one.

1. Make a button on a form.
2. For the button code
   Thread.Sleep(5000); or your fill.
3. Form freezes.
4. Go to google to find out how to fix this problem and why it occurs.

That's how I found out about this problem, and how to fix it.


lm3hgg8.jpg

Ingame: marten22        My steam: MartenM

Offline

SirJosh1474239631623606

Board footer

Powered by FluxBB

[ Started around 1601396142.1556 - Generated in 0.151 seconds, 11 queries executed - Memory usage: 1.83 MiB (Peak: 2.18 MiB) ]