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 2018-06-17 17:54:43, last edited by Kalumniatoris (2018-06-17 17:59:50)

Kalumniatoris
Member
Joined: 2018-05-24
Posts: 34

[Question]? I am unable to login as bot with my account.

Hello.
I'm writing my own bot and approached weird problem.

Both using 'pure' PlayerIoClient methods or with help of BotBits library I am unable to login to game as bot.
With BotBits I am getting "BotBits.JoinException: „Unknown: No error message was received from server.”".

At first I was thinking that I am doing something wrong, but bot is able to login as guest without any problems.

I've just tried to create alt account and still bot were able to log in as this new account, but whatever I am trying I am unable to login as my normal account.

Offline

#2 2018-06-17 18:12:21

Vitalijus
Member
From: Lithuania
Joined: 2015-02-15
Posts: 1,384
Website

Re: [Question]? I am unable to login as bot with my account.

Are you going to other people levels with the same account your trying to connect a bot?


wn7I7Oa.png

Offline

#3 2018-06-17 18:18:43, last edited by Kalumniatoris (2018-06-17 18:24:10)

Kalumniatoris
Member
Joined: 2018-05-24
Posts: 34

Re: [Question]? I am unable to login as bot with my account.

I am creating bot for my own level, so I am able to login using multiple clients anyway. But I was thinking that might be idea and tried to log in as bot without being logged in browser also without effects. (Also, from what I found, there is specified error when you are trying to login to not your level when you are already logged in)

Edit:
Just to be sure I created world with my new account, where I were never on with my 'normal one. I am still not able to enter it as bot.

Offline

#4 2018-06-17 18:24:11

Vitalijus
Member
From: Lithuania
Joined: 2015-02-15
Posts: 1,384
Website

Re: [Question]? I am unable to login as bot with my account.

Kalumniatoris wrote:

I am creating bot for my own level, so I am able to login using multiple clients anyway. But I was thinking that might be idea and tried to log in as bot without being logged in browser also without effects. (Also, from what I found, there is specified error when you are trying to login to not your level when you are already logged in)

You've discord?


wn7I7Oa.png

Offline

#5 2018-06-17 18:26:26, last edited by Kalumniatoris (2018-06-17 18:30:52)

Kalumniatoris
Member
Joined: 2018-05-24
Posts: 34

Re: [Question]? I am unable to login as bot with my account.

Vitalijus wrote:
Kalumniatoris wrote:

I am creating bot for my own level, so I am able to login using multiple clients anyway. But I was thinking that might be idea and tried to log in as bot without being logged in browser also without effects. (Also, from what I found, there is specified error when you are trying to login to not your level when you are already logged in)

You've discord?

Yes (just why it's working terribly slow for me now?)
Login same as here, tag #5550

Offline

#6 2018-06-17 18:30:44

Vitalijus
Member
From: Lithuania
Joined: 2015-02-15
Posts: 1,384
Website

Re: [Question]? I am unable to login as bot with my account.

Kalumniatoris wrote:
Vitalijus wrote:
Kalumniatoris wrote:

I am creating bot for my own level, so I am able to login using multiple clients anyway. But I was thinking that might be idea and tried to log in as bot without being logged in browser also without effects. (Also, from what I found, there is specified error when you are trying to login to not your level when you are already logged in)

You've discord?

Yes (just why it's working terribly slow for me now?)

Lets continue our chat there vytka#0428


wn7I7Oa.png

Offline

#7 2018-06-17 18:31:12

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

Re: [Question]? I am unable to login as bot with my account.

Is your account a normal EE website account, or is it one from a different site? IIRC you need to use a different method of logging in even if you've had your account linked, so it might be that.

Offline

#8 2018-06-17 18:41:26, last edited by Kalumniatoris (2018-06-17 18:45:47)

Kalumniatoris
Member
Joined: 2018-05-24
Posts: 34

Re: [Question]? I am unable to login as bot with my account.

Account is from FB (when I created account that was the only method to register). But was linked few weeks ago. I also tried to login with Facebooks OAuth token with same effects.
up to 'Login.Of(bot).WithEmail(email, password)'  (or 'Login.Of(bot).WithFacebook(token)') everything works correctly it's '.CreateJoinRoom(WorldID);' part that crashes.

Offline

#9 2018-06-17 18:45:14

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

Re: [Question]? I am unable to login as bot with my account.

Could you post the code you are using to try to connect?

Offline

#10 2018-06-17 18:47:07

Kalumniatoris
Member
Joined: 2018-05-24
Posts: 34

Re: [Question]? I am unable to login as bot with my account.

Is this part enough?

 Login.Of(bot).WithEmail(email, password).CreateJoinRoom(WorldID);
//Login.Of(bot).WithFacebook(token).CreateJoinRoom(WorldID);

Offline

#11 2018-06-17 18:55:20

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

Re: [Question]? I am unable to login as bot with my account.

I've never used BotBits so I can't help you with that, but I might be able to help with the pure PlayerIO one, could you post that?

Offline

#12 2018-06-17 19:01:18, last edited by Kalumniatoris (2018-06-17 19:01:59)

Kalumniatoris
Member
Joined: 2018-05-24
Posts: 34

Re: [Question]? I am unable to login as bot with my account.

LukeM wrote:

I've never used BotBits so I can't help you with that, but I might be able to help with the pure PlayerIO one, could you post that?

pure I was trying only email + password method, which I understand it's not going to work

 public static Client client;
        public static Connection con;
//two above of course outside of method.


client = PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", email, password, null);
con=  client.Multiplayer.CreateJoinRoom(WorldID, (WorldID.ToLower().StartsWith("bw") ? "Beta" : "Everybodyedits") + client.BigDB.Load("config", "config")["version"], true, null, null); (this part is obviously copied from one of examples (like rest of logging code), simple version with everything already included gave same effect)
         

Offline

#13 2018-06-17 19:06:05, last edited by LukeM (2018-06-17 19:08:34)

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

Re: [Question]? I am unable to login as bot with my account.

Oh ok, I don't have any C# code at hand and I don't have time to write it atm, but heres how I did it using JavaScript, maybe that will help:
(you can ignore the https stuff, thats just so it works on a website)

PlayerIO.authenticate("everybody-edits-su9rn58o40itdbnw69plyw", "simpleUsers", { email: email, password: password }, { }, client => {
	client.multiplayer.useSecureConnections = isHttps;
	PlugIt.Log("Authenticated", "Green");
	client.bigDB.load("config", "config", config => {
		PlugIt.Log("Loaded config", "Green");
		client.bigDB.loadMyPlayerObject(player => {
			PlugIt.Log("Loaded player object", "Green");
			if ("linkedTo" in player) {
				PlugIt.Log("Detected linked account", "Green");
				client.multiplayer.createJoinRoom("auth" + client.ConnectedUserId, "AuthRoom", true, null, { type: "Link" }, connection => {
					PlugIt.Log("Joined authentication room", "Green");
					connection.addMessageCallback("auth", m => {
						PlugIt.Log("Received authentication key", "Green");
						PlayerIO.authenticate("everybody-edits-su9rn58o40itdbnw69plyw", "linked", { userId: m.getString(0), auth: m.getString(1) }, { }, newClient => {
							newClient.multiplayer.useSecureConnections = isHttps;
							Success(newClient, config);
						}, LogError);
					});
				}, LogError);
			} else Success(client, config);
		}, LogError);
	}, LogError);
}, LogError);

This is from my bot PlugIt, I guess maybe try logging in with that to see if this fixes the problem.

Offline

#14 2018-06-17 19:28:25, last edited by Kalumniatoris (2018-06-17 20:07:11)

Kalumniatoris
Member
Joined: 2018-05-24
Posts: 34

Re: [Question]? I am unable to login as bot with my account.

LukeM wrote:

(...)
This is from my bot PlugIt, I guess maybe try logging in with that to see if this fixes the problem.

thanks
I 'cleaned' your code from not needed parts in my case and it seems to work correctly, (but this part was working for me anyway), now I am going to test js method of joining world and if that works to figure how to use it in C# version.

Seems that this is the case. Now to figure how to login via C#

Offline

Wooted by:

#15 2018-06-17 20:02:38

Zumza
Member
From: root
Joined: 2015-02-17
Posts: 4,656

Re: [Question]? I am unable to login as bot with my account.

.
                       }, LogError);
                    });
                }, LogError);
            } else Success(client, config);
        }, LogError);
    }, LogError);
}, LogError);

I died a little inside.


Everybody edits, but some edit more than others

Offline

#16 2018-06-17 20:13:04

Gosha
Member
From: Russia
Joined: 2015-03-15
Posts: 6,211

Re: [Question]? I am unable to login as bot with my account.

pls learn promises, async, await, then, catch etc

Offline

#17 2018-06-17 20:20:45

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

Re: [Question]? I am unable to login as bot with my account.

Gosha wrote:

pls learn promises, async, await, then, catch etc

what does kalumniatoris need that crud for
it's a linked account, the solution he needs is right over here

Offline

Wooted by:

#18 2018-06-17 20:24:58

Kalumniatoris
Member
Joined: 2018-05-24
Posts: 34

Re: [Question]? I am unable to login as bot with my account.

ninjasupeatsninja wrote:
Gosha wrote:

pls learn promises, async, await, then, catch etc

what does kalumniatoris need that crud for
it's a linked account, the solution he needs is right over here

I suppose that was more related to code that LukeM pasted, I was able to do it assynchronously in java without same effect as current method.

Thank you very much for this link.

Offline

#19 2018-06-17 20:25:50, last edited by LukeM (2018-06-17 20:29:09)

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

Re: [Question]? I am unable to login as bot with my account.

Kalumniatoris wrote:

... this part was working for me anyway ...

Oh yes, forgot to say, the client you first log in with only allows you to join an authentication room which gives you the login information of a second account iirc, this is a method of converting that first client into one that works for normal rooms, after this you just use it as usual.

Zumza wrote:

.
                       }, LogError);
                    });
                }, LogError);
            } else Success(client, config);
        }, LogError);
    }, LogError);
}, LogError);

I died a little inside.

Promises would be a much nicer way to do this, but afaik playerIO doesn't support that //forums.everybodyedits.com/img/smilies/sad And I dont like the look of using 10 different functions //forums.everybodyedits.com/img/smilies/tongue

Edit: Oops, forgot to press the post button and now there are 10 other posts //forums.everybodyedits.com/img/smilies/tongue (this was supposed to be just before Gosha's post)

Afaik theres no way to use anything nicer in javascript is there? Everything else requires access to the library code, which you don't have with PlayerIO (well you technically do, but changing its a pain)

Offline

#20 2018-06-17 20:51:10, last edited by Kalumniatoris (2018-06-18 09:10:34)

Kalumniatoris
Member
Joined: 2018-05-24
Posts: 34

Re: [Question]? I am unable to login as bot with my account.

Success. I managed to merge code that ninjasupeatsninja linked with what I had using BotBits library, and bot's is able to enter my world.

I may have did something wrong  with login code and antivirus/firewall decided to block my program, and somehow managed to remove permissions to file from everyone. Even itself.

Offline

Wooted by: (3)
Kalumniatoris1529265070710275

Board footer

Powered by FluxBB

[ Started around 1732216409.21 - Generated in 0.179 seconds, 14 queries executed - Memory usage: 1.66 MiB (Peak: 1.89 MiB) ]