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 2017-02-22 17:55:44, last edited by SirJosh3917 (2017-06-14 23:33:56)

SirJosh3917
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,095

[Release] EE Bot Code Generator

Let's say you want to quickly make a bot, to annoy your friends or constantly replace blocks, or for whatever strange reason. You go to make it, and you realize you have to recode everything and recode what you've already done so, many, times! Well, that's where EE Bot Code Generator comes in. You just goto the webpage, select what pieces of the code you want, copy it all, and paste it in your class Program { /*paste code here*/ }! It's as easy as can be!

You no longer need to bookmark the GameId somewhere, recode everything, find your bot-code template, or anything like that anymore!
It can automatically add InitParse into your code, automatically handle players, handle special open-world needs, and (soon) more!
It works, and it automatically calls the namespace classes are in so you don't have to add any using statements!

I will be taking any and all suggestions to help improve it.
It functions on javascript so you need that enabled.

You can use it here.

Give feedback, how I should document it, what I need to clarify, add comments on the code, anything and everything!

Offline

Wooted by:

#2 2017-02-22 17:58:03, last edited by SirJosh3917 (2017-02-23 03:20:46)

SirJosh3917
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,095

Re: [Release] EE Bot Code Generator

Update 0.2.0

    Added command handling
    Put code into regions
    Made the code window draggable

Offline

#3 2017-02-22 18:15:44

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

Re: [Release] EE Bot Code Generator

Here comes a new project, how long will this stay updated? All your other projects always end in like a week or so.
I'm kinda tired because you never finish your stuff or updating it. And I can't really say that this generator would help anyone. Copy & Pasting people, that's what you feed.

One more thing, processor made a better tool for beginners. It's bad that he doesn't fix the issues.

Offline

Wooted by:

#4 2017-02-22 18:37:21

SirJosh3917
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,095

Re: [Release] EE Bot Code Generator

capasha wrote:

Here comes a new project, how long will this stay updated? All your other projects always end in like a week or so.

kek i wonder how many projects i've done now lol

capasha wrote:

I'm kinda tired because you never finish your stuff or updating it. And I can't really say that this generator would help anyone. Copy & Pasting people, that's what you feed.

k
this tool isn't for beginners

capasha wrote:

One more thing, processor made a better tool for beginners. It's bad that he doesn't fix the issues.

this tool isn't for beginners
its just for like you want to make another bot but you have to copy/paste your old code or find gameid or regenerate old code or something it always gets annoying

Offline

Wooted by:

#5 2017-02-22 18:39:41

drunkbnu
Formerly HG
Joined: 2017-08-16
Posts: 2,306

Re: [Release] EE Bot Code Generator

Only beginners copy/paste.

Offline

Wooted by:

#6 2017-02-22 18:41:36

SirJosh3917
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,095

Re: [Release] EE Bot Code Generator

HG wrote:

Only beginners copy/paste.

What if you're making a new bot to do whatever strange thing, for a one-time usage?
Like, you want to uhh... make a checker pattern on a world or uhh
do something random like animated blocks

You go make a new project, and just realize that it's time to start the process again, create Connections, Clients, logging in, handle "init", find processor's initparse, handle world events, handle blocks, handle players, find the game id, e.t.c e.t.c
or you just find you bot template and edit that

That's where this comes in, and it generates code for you.

Offline

Wooted by:

#7 2017-02-22 18:42:54

drunkbnu
Formerly HG
Joined: 2017-08-16
Posts: 2,306

Re: [Release] EE Bot Code Generator

That shows you're way too lazy to start a new project. In one minute you can already establish a functional connection to an EE world.

Offline

#8 2017-02-22 18:44:33

SirJosh3917
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,095

Re: [Release] EE Bot Code Generator

HG wrote:

That shows you're way too lazy to start a new project. In one minute you can already establish a functional connection to an EE world.

yes and in a few seconds with this

I'm not sure why you're attacking this project, what harm does it do?

Offline

Wooted by:

#9 2017-02-22 18:46:49

drunkbnu
Formerly HG
Joined: 2017-08-16
Posts: 2,306

Re: [Release] EE Bot Code Generator

ninjasupeatsninja wrote:
HG wrote:

That shows you're way too lazy to start a new project. In one minute you can already establish a functional connection to an EE world.

yes and in a few seconds with this

I'm not sure why you're attacking this project, what harm does it do?

It takes longer to enter your website and toggle such options to take the "cancerous" code off your website and edit it, than to just write it.

Because just, look at that ugly code.

Offline

#10 2017-02-22 18:47:19, last edited by kubapolish (2017-02-22 18:47:35)

kubapolish
Banned
From: ̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍̍
Joined: 2015-02-19
Posts: 1,024
Website

Re: [Release] EE Bot Code Generator

Well I have a file called "eebotthingz.txt":

Hidden text

so when i start a new project in visual studio i can just open this file and copy-paste a few things.

just saying.


Offline

Wooted by:

#11 2017-02-22 18:47:35

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

Re: [Release] EE Bot Code Generator

ninjasupeatsninja wrote:
HG wrote:

Only beginners copy/paste.

What if you're making a new bot to do whatever strange thing, for a one-time usage?
Like, you want to uhh... make a checker pattern on a world or uhh
do something random like animated blocks

You go make a new project, and just realize that it's time to start the process again, create Connections, Clients, logging in, handle "init", find processor's initparse, handle world events, handle blocks, handle players, find the game id, e.t.c e.t.c
or you just find you bot template and edit that

That's where this comes in, and it generates code for you.

Are you serious? You can make your own templates that contains everything you need instead of copy/pasting.

Offline

Wooted by:

#12 2017-02-22 18:49:41, last edited by SirJosh3917 (2017-02-22 18:54:07)

SirJosh3917
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,095

Re: [Release] EE Bot Code Generator

keklol i get it guys
you don't like this tool because you have your reasons
1) copy paste template bot code
2) u don't like the generated code
3) uhh something else

that doesn't mean that this project needs to stop in its track drink bleach and then fall off a cliff

HG wrote:

Because just, look at that ugly code.

oh HO ho you want to call the code ugly?
ok then tell me how to make it cleaner

point out where it's ugly so i can make it cleaner. also don't get too fired up with hatred when you point out these things.

Offline

Wooted by:

#13 2017-02-22 18:54:28

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

Re: [Release] EE Bot Code Generator

Update this project or anything you want. If some people like this copy/pasting codes, then it would be good for them.

Offline

#14 2017-02-22 18:56:36

XxAtillaxX
Member
Joined: 2015-11-28
Posts: 4,202

Re: [Release] EE Bot Code Generator

Nobody should be using your spaghetti code as a template.


signature.png
*u stinky*

Offline

#15 2017-02-22 18:58:25, last edited by drunkbnu (2017-02-22 18:59:16)

drunkbnu
Formerly HG
Joined: 2017-08-16
Posts: 2,306

Re: [Release] EE Bot Code Generator

ninjasupeatsninja wrote:

keklol i get it guys
you don't like this tool because you have your reasons
1) copy paste template bot code
2) u don't like the generated code
3) uhh something else

that doesn't mean that this project needs to stop in its track drink bleach and then fall off a cliff

HG wrote:

Because just, look at that ugly code.

oh HO ho you want to call the code ugly?
ok then tell me how to make it cleaner

point out where it's ugly so i can make it cleaner. also don't get too fired up with hatred when you point out these things.

If I wanted to make it cleaner I would already have posted my EE Gtk# Bot, EE Winforms Bot and EE Console Bot templates, which are a lot cleaner than yours, but people can do that with their code styles.

Offline

#16 2017-02-22 18:58:56

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

Re: [Release] EE Bot Code Generator

XxAtillaxX wrote:

Nobody should be using your spaghetti code as a template.

I must agree on that. Not that I'm such a good programmer but this code are too much.

Offline

#17 2017-02-22 19:00:48

SirJosh3917
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,095

Re: [Release] EE Bot Code Generator

XxAtillaxX wrote:

Nobody should be using your spaghetti code as a template.

capasha wrote:
XxAtillaxX wrote:

Nobody should be using your spaghetti code as a template.

I must agree on that. Not that I'm such a good programmer but this code are too much.

HG wrote:

Because just, look at that ugly code.

How do I improve it then?

Offline

Wooted by: (2)

#18 2017-02-22 22:57:25

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

Re: [Release] EE Bot Code Generator

Would like to mention you can create your own templates in Visual Studio.
I myself created a template containing generic building, chatting, etc. objects and the obvious message handler.
All I have to is open a project with the template, change the room code and maybe 2-3 other things and I'm set to make the actual bot.

ninjasupeatsninja wrote:

How do I improve it then?

I do agree here.
People constantly just say the code of certain people is bad... But instead of just flaming, complaining or knocking somebody down any other way:
Give constructive criticism and help the d**n f***er improve.
Just the small things, like mentioning that doing stuff directly in the event handler instead of in a separate method is generally bad practice, already help.

@ninja
I noticed you're leaving unimportant stuff out (like the namespace and all that), but please:
If you intend to make your code "copyable", make it actually copyable.
It's either one person matching all the curly brackets "{}" (you), or all your users.
I'm pretty sure the one person fixing it will result in less total work and annoyance.

Offline

Wooted by:

#19 2017-02-22 23:29:14

SirJosh3917
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,095

Re: [Release] EE Bot Code Generator

den3107 wrote:

@ninja
I noticed you're leaving unimportant stuff out (like the namespace and all that), but please:
If you intend to make your code "copyable", make it actually copyable.
It's either one person matching all the curly brackets "{}" (you), or all your users.
I'm pretty sure the one person fixing it will result in less total work and annoyance.

It's designed to work in a console application.
If you make a new application, you delete the static main() so you're left with

namespace bot {
class Program {

}
}

The code is designed to be pasted

namespace bot {
class Program {
/* here */
}
}

It works for me, does it not work for you?

Offline

#20 2017-02-22 23:33:28, last edited by drunkbnu (2017-02-22 23:36:02)

drunkbnu
Formerly HG
Joined: 2017-08-16
Posts: 2,306

Re: [Release] EE Bot Code Generator

ninjasupeatsninja wrote:
den3107 wrote:

@ninja
I noticed you're leaving unimportant stuff out (like the namespace and all that), but please:
If you intend to make your code "copyable", make it actually copyable.
It's either one person matching all the curly brackets "{}" (you), or all your users.
I'm pretty sure the one person fixing it will result in less total work and annoyance.

It's designed to work in a console application.
If you make a new application, you delete the static main() so you're left with

namespace bot {
class Program {

}
}

The code is designed to be pasted

namespace bot {
class Program {
/* here */
}
}

It works for me, does it not work for you?

Nobody codes that way, and nobody pastes code that way.

They only copy the specific parts of the code they need, not all the code.

Offline

#21 2017-02-22 23:56:18, last edited by LukeM (2017-02-22 23:56:51)

LukeM
Member
From: England
Joined: 2016-06-03
Posts: 3,009
Website

Re: [Release] EE Bot Code Generator

It doesnt seem to me like there is anything really wrong with it, its just that generally you dont want to have an 'everything in one file' bot, because then you will have problems later finding what you need.
This works perfectly well for the examples you have given, but probably wouldnt be the best for bigger projects (especially because you have hardcoded username / password etc although that wouldnt be hard to change).

A few small things though:
Should probably set World to null, instead of an array with the incorrect size
Should only declare the chunks variable where it is actually used (use {} to allow you to do this multiple times in a switch):

				case "reset":
				World = new uint[2, e.GetInt(18), e.GetInt(19)];
				{
					var chunks = Yonom.EE.InitParse.Parse(e);
					foreach (var chunk in chunks)
						foreach (var pos in chunk.Locations)
							World[chunk.Layer, pos.X, pos.Y] = chunk.Type;
				}
				break;
or:
				case "init":
				World = new uint[2, e.GetInt(18), e.GetInt(19)];
				foreach (var chunk in Yonom.EE.InitParse.Parse(e))
					foreach (var pos in chunk.Locations)
						World[chunk.Layer, pos.X, pos.Y] = chunk.Type;
				break;

reset doesnt work, use World = new uint[2, World.GetLength(1), World.GetLength(2)]; instead, as 18 and 19 are part of the reset data
You dont need the underscores after parameter names if you are using this.something

Offline

#22 2017-02-23 01:22:36

SirJosh3917
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,095

Re: [Release] EE Bot Code Generator

HG wrote:

They only copy the specific parts of the code they need, not all the code.

That's why you can enable/disable specific parts! //forums.everybodyedits.com/img/smilies/big_smile

destroyer123 wrote:

A few small things though:
Should probably set World to null, instead of an array with the incorrect size
Should only declare the chunks variable where it is actually used (use {} to allow you to do this multiple times in a switch):

				case "reset":
				World = new uint[2, e.GetInt(18), e.GetInt(19)];
				{
					var chunks = Yonom.EE.InitParse.Parse(e);
					foreach (var chunk in chunks)
						foreach (var pos in chunk.Locations)
							World[chunk.Layer, pos.X, pos.Y] = chunk.Type;
				}
				break;
or:
				case "init":
				World = new uint[2, e.GetInt(18), e.GetInt(19)];
				foreach (var chunk in Yonom.EE.InitParse.Parse(e))
					foreach (var pos in chunk.Locations)
						World[chunk.Layer, pos.X, pos.Y] = chunk.Type;
				break;

reset doesnt work, use World = new uint[2, World.GetLength(1), World.GetLength(2)]; instead, as 18 and 19 are part of the reset data
You dont need the underscores after parameter names if you are using this.something

Thanks for the feedback!

destroyer123 wrote:

its just that generally you dont want to have an 'everything in one file' bot, because then you will have problems later finding what you need.

Yes I know, but it'd be more work to have to copy different code in different file.
I should add #regions to it!

Offline

#23 2017-02-23 03:21:19

SirJosh3917
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,095

Re: [Release] EE Bot Code Generator

New update, 0.2.0

    Added command handling
    Put code into regions
    Made the code window draggable

Also edited the page, you have a menu to select all the different versions.

Offline

#24 2017-02-24 01:31:39

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,822

Re: [Release] EE Bot Code Generator

Visual Studio has these things called templates, where you create a basic bot to use as a starting point for all future projects.

Idk how you expect anyone to copy and reuse code that isn't perfect. There's no error checking in this whatsoever, and it's very inefficient code to run.


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:

#25 2017-02-24 08:54:35, last edited by LukeM (2017-02-24 08:56:26)

LukeM
Member
From: England
Joined: 2016-06-03
Posts: 3,009
Website

Re: [Release] EE Bot Code Generator

Tomahawk wrote:

Visual Studio has these things called templates, where you create a basic bot to use as a starting point for all future projects.

Idk how you expect anyone to copy and reuse code that isn't perfect. There's no error checking in this whatsoever, and it's very inefficient code to run.

I agree that the code isn't perfect, but I can't see why it would be inefficient...
Also, there are a large number of people playing EE that want to make a bot, but don't know where to start. This, although most people who are familiar with making bots wouldn't use it, could act as a starting point for new bot makers, to help them understand playerIO.
(Instead of helping people who ask 'my bot isn't working, can you help fix it' with setting up the playerIO myself, I'm just going to send them here from now on //forums.everybodyedits.com/img/smilies/big_smile)

Offline

LukeM1488020364648815

Board footer

Powered by FluxBB

[ Started around 1711615088.2624 - Generated in 0.197 seconds, 10 queries executed - Memory usage: 1.87 MiB (Peak: 2.18 MiB) ]