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.
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
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
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?
Offline
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
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
Offline
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
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
Is this part enough?
Login.Of(bot).WithEmail(email, password).CreateJoinRoom(WorldID);
//Login.Of(bot).WithFacebook(token).CreateJoinRoom(WorldID);
Offline
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
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
(...)
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
.
}, LogError);
});
}, LogError);
} else Success(client, config);
}, LogError);
}, LogError);
}, LogError);
I died a little inside.
Everybody edits, but some edit more than others
Offline
pls learn promises, async, await, then, catch etc
Offline
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
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
... 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.
.
}, 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 And I dont like the look of using 10 different functions
Edit: Oops, forgot to press the post button and now there are 10 other posts (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
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
[ Started around 1732216409.21 - Generated in 0.179 seconds, 14 queries executed - Memory usage: 1.66 MiB (Peak: 1.89 MiB) ]