Closed oleghalin closed 8 years ago
leavePracticeLobby()
?
nope. Its isnt work. I need to disconnect from server, not leave from lobby
node-dota2 does not connect to a game like you would in the normal client. I don't know exactly what issue you're having but it's not that.
srsly not connect? bro, just check bot. After launching bot connection to the server
Run nethook on the real client to figure out what messages are being sent. I last linked a pre-compiled version and a wiki about it here: https://github.com/RJacksonm1/node-dota2/issues/141#issuecomment-153559554
I'm pretty sure though, you just need to leave the lobby.
After finish of game, i disconnect from the server, check status of bot, bot is in lobby, after try invite myself to lobby, it isnt work
And when i tried to update lobby via practiceLobbyUpdate again i have this one message
11 is invalid state
When i try to leave lobby, i have this result
2 is fail
I understand that is it fail, but why? And what u mean of "11 is invalid stat"
There is a big list of errors. https://github.com/RJacksonm1/node-dota2/issues/174#issuecomment-162831628
What does it mean?
I think that after finishing game arg lobby dont seting to null, can it be?
In dota with account of bot this seems like that. (text on the button 'back to lobby') after clicking
Nethook and figure out what it wants.
On Fri, 11 Dec 2015 at 9:26 pm oleghalin notifications@github.com wrote:
[image: image] https://cloud.githubusercontent.com/assets/9086983/11742717/bf55fb80-a00a-11e5-946e-30da5b058da6.png In dota with account of bot this seems like that. (text on the button 'back to lobby') after clicking [image: image] https://cloud.githubusercontent.com/assets/9086983/11742726/d804189c-a00a-11e5-9644-d3f1c602e4de.png
— Reply to this email directly or view it on GitHub https://github.com/RJacksonm1/node-dota2/issues/179#issuecomment-163915116 .
Via nethook?
I've linked it a million times. Re-read this thread.
Its just question. Just sec
It's up ^^^ On Fri, 11 Dec 2015 at 9:30 pm oleghalin notifications@github.com wrote:
Its just ask.
— Reply to this email directly or view it on GitHub https://github.com/RJacksonm1/node-dota2/issues/179#issuecomment-163915654 .
The instructions say
NetHook2 will now begin dumping every message to file. You can locate the dumps in your Steam install, under the nethook directory. The directories are numbered with the unix time that dumping began.
It goes without saying that you need to perform the actions the bot will, so you can see what messages are being sent.
launchPracticeLobby, then abandonGame
abandonGame? node-dota havent this function
http://pastebin.com/RuJLYw6D in this file i get this, but what i must see there?
https://github.com/RJacksonm1/node-dota2/blob/master/proto/dota_gcmessages_client.proto#L203
It's there, just no handler for it, most likely.
Hm. Ill write this handler, and this function need to disconnect or not to connect?
http://pastebin.com/Bhe3ZfTj can u check my hanlder?
first abandonCurrentGame(),then leavePracticeLobby().
https://github.com/idreamshen/node-dota2/blob/master/handlers/lobbies.js#L183 I wrote it for the source engine 1
Thank you, i think this working function:
Dota2.abandonCurrentGame();
hanlder:
Dota2.Dota2Client.prototype.abandonCurrentGame = function(callback) {
callback = callback || null;
var _self = this;
if (!this._gcReady) {
if (this.debug) util.log("GC not ready, please listen for the 'ready' event.");
return null;
}
if (this.debug) util.log("Sending match CMsgAbandonCurrentGame request");
var payload = new Dota2.schema.CMsgAbandonCurrentGame({});
this._protoBufHeader.msg = Dota2.schema.EDOTAGCMsg.k_EMsgGCAbandonCurrentGame;
this._gc.send(
this._protoBufHeader,
payload.toBuffer(),
function(header, body) {
onPracticeLobbyResponse.call(_self, body, callback);
}
);
};
Feel free to make a pull request.
Oh no, sry. It isnt work.
The handler works for me and judging from the conversation here and from issue #56 it could be useful for others as well. Why no PR for this?
Make a PR.
How to leave lobby after launching it? I need to have the bot launch the lobby, then leave the game, and immediately create a new lobby. How to implement this?
If I do first abandonCurrentGame(),then leavePracticeLobby()., then I get a red screen in the match, and trying to create a new lobby - I get into the old lobby
I need - disconnect bot from current game, and create new one...
Im using function like this
function leaveLobby()
{
Dota2.abandonCurrentGame();
Dota2.leavePracticeLobby();
Dota2.leaveChat('Lobby_'+id);
}`
oleghalin Can I contact you? We swill both speak Russian. Skype planshetklik21, Viber +79516888868
If I use your function The situation does not change, so in the queue error And after the creation of the next lobby - it turns out that the bot Gets into the old lobby (game) ...
Yes. Vk.com/pawno_ua
How to leave from game after launching lobby? launchPracticeLobby