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.

#51 2015-08-11 21:23:19

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

Re: [Tutorial] TUTORIALS

I'm not sure you need to be doing anything in the Program.cs -- but there's no particular reason why not.

Variables cease to exist outside of their function blocks. Garbage collectors (usually?) pick them up. So yes, they'll have to be outside of that scope.
If your bot has  class MyInstance and public static bool Derp, you can write this in the main:
MyInstance.Derp = false;

Some notes:
Your Main and MyInstance (aka Form1) need to be in the same namespace. Otherwise, add the MyInstance namespace.
If your class isn't in the same namespace, it needs "Public". (Not for certain?)
Creating the static variable means it stays the same between instances of the class.  If it isn't static, you have to create the instance.
Public allows code outside the class to work with the variable.

That's a great deal of info.
But, to actually answer your question: yes. Also, if you want to be especially confused about the keyword "global", check this. But, it'll help straighten things out, too.

Offline

#52 2015-08-11 23:11:07

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

Re: [Tutorial] TUTORIALS

Yes, but they'd have to be declared in your CLASS, not your method.

There's no such thing as public or private variables in methods as far as I know.

Offline

#53 2015-08-11 23:29:25

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

Re: [Tutorial] TUTORIALS

The first I see in the new connection tutorial is "CheckForIllegalCrossThreadCalls"..
People shouldn't use it at all. And isn't hard to do it this way either. this.Invoke((MethodInvoker)delegate {     connect.Text = "Disconnect"; });

Offline

Wooted by: (3)

#54 2015-08-12 07:22:52

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

Re: [Tutorial] TUTORIALS

I love you guys!

Thank you so much!

-spinastar

Offline

#55 2015-08-16 05:33:14

Jabatheblob1
Member
Joined: 2015-03-01
Posts: 856

Re: [Tutorial] TUTORIALS

I can make more tutorials if you guys want, i am mainly away from ee though


If you would like me to make a bot for you, go here.

Offline

#56 2015-08-22 00:56:37

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

Re: [Tutorial] TUTORIALS

I did a tutorial how to get the metro theme on the form/gui.
The same theme that jesse used for his shopbot

https://www.youtube.com/watch?v=5hXBaZbQYqI

Offline

#57 2015-08-22 23:47:50

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

Re: [Tutorial] TUTORIALS

add ", null" at the end.
So it becomes:
client = PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", email_TextBox.Text, password_TextBox.Text, null);

Offline

#58 2015-08-25 15:44:28

shadowda
Member
From: somewhere probably.
Joined: 2015-02-19
Posts: 1,015

Re: [Tutorial] TUTORIALS

i was wondering. how do you make a bot PM someone in game? i understand say("message") but i don't know to to private message a specific player.


color = #1E1E1E       

latest?cb=20150604065609

Offline

#59 2015-08-25 15:59:31

Fastmapler
Member
Joined: 2015-02-21
Posts: 64

Re: [Tutorial] TUTORIALS

shadowda wrote:

i was wondering. how do you make a bot PM someone in game? i understand say("message") but i don't know to to private message a specific player.

You can just do con.Send("say", "/pm " + username + "  Hello!") To PM somebody. There is also many other ways to do this if you do not want large connecting text.


"Description: Description: is definitely orginal!" ~ Fastmapler The https://wiki.everybodyedits.com/images/3/30/049_grinch

Offline

#60 2015-08-25 19:44:08

shadowda
Member
From: somewhere probably.
Joined: 2015-02-19
Posts: 1,015

Re: [Tutorial] TUTORIALS

Just one more question. is it possible to to have a chat that has multiple lines.
Like when you type /help in normal ee it has a list of commands.
can you do that with a bot the same way.


color = #1E1E1E       

latest?cb=20150604065609

Offline

#61 2015-08-25 23:51:35

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

Re: [Tutorial] TUTORIALS

No, you can't do that. It was once possible but no.


zsbu6Xm.png thanks zoey aaaaaaaaaaaand thanks latif for the avatar

Offline

Wooted by:

#62 2015-09-06 19:22:06

shadowda
Member
From: somewhere probably.
Joined: 2015-02-19
Posts: 1,015

Re: [Tutorial] TUTORIALS

For Tutorial 4 Getting map data. i keep getting a problem.

InvalidCastException was unhandled by user code

Value at index:12 is not System.Int32. It's a System.String

around

        public void getMapData(PlayerIOClient.Message m)
        {
            int w = m.GetInt(12);
            int h = m.GetInt(13);
            uint c = m.Count;
            uint kc = 17;
            while (kc < m.Count)

it forms a green box around

int w = m.GetInt(12);

because that is where the problem is. 

The problem only happens when i connect to a world.
after pressing connect the bot enters the world and visual c# 2010 will pop up with the problem.
if i press the debug button again (the green play button) the bot will continue with no problems.
Is there a way to make this stop?


color = #1E1E1E       

latest?cb=20150604065609

Offline

#63 2015-09-08 05:57:48

Jabatheblob1
Member
Joined: 2015-03-01
Posts: 856

Re: [Tutorial] TUTORIALS

shadowda wrote:

For Tutorial 4 Getting map data. i keep getting a problem.

InvalidCastException was unhandled by user code

Value at index:12 is not System.Int32. It's a System.String

around

        public void getMapData(PlayerIOClient.Message m)
        {
            int w = m.GetInt(12);
            int h = m.GetInt(13);
            uint c = m.Count;
            uint kc = 17;
            while (kc < m.Count)

it forms a green box around

int w = m.GetInt(12);

because that is where the problem is. 

The problem only happens when i connect to a world.
after pressing connect the bot enters the world and visual c# 2010 will pop up with the problem.
if i press the debug button again (the green play button) the bot will continue with no problems.
Is there a way to make this stop?

The init date got changed with the most recent update, it will have to be updated because the length and width are now different numbers


If you would like me to make a bot for you, go here.

Offline

#64 2015-09-08 21:58:21

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

Re: [Tutorial] TUTORIALS

shadowda wrote:

For Tutorial 4 Getting map data. i keep getting a problem.

InvalidCastException was unhandled by user code

Value at index:12 is not System.Int32. It's a System.String

around

        public void getMapData(PlayerIOClient.Message m)
        {
            int w = m.GetInt(12);
            int h = m.GetInt(13);
            uint c = m.Count;
            uint kc = 17;
            while (kc < m.Count)

it forms a green box around

int w = m.GetInt(12);

because that is where the problem is. 

The problem only happens when i connect to a world.
after pressing connect the bot enters the world and visual c# 2010 will pop up with the problem.
if i press the debug button again (the green play button) the bot will continue with no problems.
Is there a way to make this stop?

Using wrong numbers on width and height, is the issue. You need to add 17 and 18.
Also look at the init in http://capasha.com/eeinformation.php#init

Offline

#65 2015-09-08 23:24:50

Prodigy
Member
From: The United States of America
Joined: 2015-07-15
Posts: 2,613

Re: [Tutorial] TUTORIALS

ok //forums.everybodyedits.com/img/smilies/tongue


h0qIF0q.png

Offline

#66 2015-10-27 08:53:31

cpcrabs
Member
Joined: 2015-10-18
Posts: 158

Re: [Tutorial] TUTORIALS

madiik wrote:

http://forums.everybodyedits.com/viewtopic.php?id=27255

Zumza wrote:

its your code...

Create a successful "left" message tutorial.

shadowda wrote:

wow. thanks for the links. also, after following you first tutorial i have gotten it down to one error. Error 1

"No overload for method 'SimpleConnect' takes 3 arguments"

it happens at

PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", Email_TextBox.Text, Password_TextBox.Text)

in the connect code. i got the bot to run once but i dont know how and when trying to debug it always says bot.exe is missing. what does this all mean? thanks

4th argument must be satisfied with null.

I have no idea what that means.


17 i think

Offline

#67 2015-10-27 13:02:56

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

Re: [Tutorial] TUTORIALS

cpcrabs wrote:

I have no idea what that means.

PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", Email_TextBox.Text, Password_TextBox.Text, null)
//                                                                                  1st argument                     2nd argument            3rd argument            4th argument


zsbu6Xm.png thanks zoey aaaaaaaaaaaand thanks latif for the avatar

Offline

#68 2015-10-28 03:09:17, last edited by cpcrabs (2015-10-28 03:09:48)

cpcrabs
Member
Joined: 2015-10-18
Posts: 158

Re: [Tutorial] TUTORIALS

Thanks Xfrogman43. Though, I tried following the second tutorial of placing blocks, and I did everything right, but I keep getting this window pop up stopping me from opening my bot: atiJwXS

http://imgur.com/atiJwXS


17 i think

Offline

#69 2015-10-28 03:13:25

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

Re: [Tutorial] TUTORIALS

"Reinstalling the application might fix this problem"
Try that.

Before you do that, though, you could try remaking a new project and seeing if that works at all.


zsbu6Xm.png thanks zoey aaaaaaaaaaaand thanks latif for the avatar

Offline

#70 2015-10-29 05:47:42

cpcrabs
Member
Joined: 2015-10-18
Posts: 158

Re: [Tutorial] TUTORIALS

After I do the Tutorial 18: Connection Voice Over, can I go on to any other tutorial that interest me or do I have to go to Tutorial 2 and do it in order?


17 i think

Offline

#71 2015-10-29 13:12:15

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

Re: [Tutorial] TUTORIALS

cpcrabs wrote:

After I do the Tutorial 18: Connection Voice Over, can I go on to any other tutorial that interest me or do I have to go to Tutorial 2 and do it in order?

Well, you should start in order, at least 1-4 if you want to do other stuff. Video 18 is just connecting to a world but he's talking.


zsbu6Xm.png thanks zoey aaaaaaaaaaaand thanks latif for the avatar

Offline

#72 2015-11-01 20:06:38

Jabatheblob1
Member
Joined: 2015-03-01
Posts: 856

Re: [Tutorial] TUTORIALS

cpcrabs wrote:

After I do the Tutorial 18: Connection Voice Over, can I go on to any other tutorial that interest me or do I have to go to Tutorial 2 and do it in order?

In order to do some of the others you need to know how to place blocks or how to get world data. Other than the basics you can jump from tutorial to tutorial. It is intended to be watched in order because that's the order i made them in. But it doesn't really matter.


If you would like me to make a bot for you, go here.

Offline

#73 2015-11-01 22:50:59

Real_Naa2001
Member
Joined: 2015-10-24
Posts: 16

Re: [Tutorial] TUTORIALS

Does anyone know how to make a commands the quicker way, because every time I do it Jabatheblob1 way it always doesn't work //forums.everybodyedits.com/img/smilies/sad


SHUT AND LISTEN!!!

giphy.gif

Offline

#74 2015-11-01 22:55:45

Era
Member
From: ::1
Joined: 2015-05-06
Posts: 884

Re: [Tutorial] TUTORIALS

Real_Naa2001 wrote:

Does anyone know how to make a commands the quicker way, because every time I do it Jabatheblob1 way it always doesn't work //forums.everybodyedits.com/img/smilies/sad

You could use Botbits, its a pretty good api and allows you to make a command easily //forums.everybodyedits.com/img/smilies/big_smile

Offline

#75 2015-11-01 23:25:52

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

Re: [Tutorial] TUTORIALS

Making commands is easiest thing ever, you don't even need botbits for it.


zsbu6Xm.png thanks zoey aaaaaaaaaaaand thanks latif for the avatar

Offline

John1501101454669737

Board footer

Powered by FluxBB

[ Started around 1711714298.4904 - Generated in 0.096 seconds, 10 queries executed - Memory usage: 1.78 MiB (Peak: 2.06 MiB) ]