Closed soubie1 closed 5 years ago
Hey,
I got the same issue. What I don't do anymore at the moment, is, using QuitList. The host has to trigger exit. It will be a problem only, if the host doesn't triggering quit and a joiner drags hoster out of game. Not a bot issue, regular Diablo II issue in TCP/IP games ^^ ( It seems to be okay, if the joiner are staying in game ( i.e. due to a while loop ) , they seem to be saved )
In d2bot-with-kolbot-master/d2bs/kolbot/libs/bots/... I made and put a separate script called TCPIPHostExit.js:
function TCPIPHostExit() {
delay(9000);
quit(true);
return true;
}
And I added this in my charconfigs ( where to put in charconfig ? I would suggest line 226 in unmodified charconfigs, behind BaalAssistant and before Town Settings ) :
Scripts.TCPIPHostExit = true;
As the last script for leechers "returns true", they will leave the game. That happens also with leader: last script returns true ? -> then NG. So I made TCPIPHostExit.js as my last script. My Hoster waits nine seconds so leechers have enough time to pick stuff at the end of their run ! and then leaves itself.
Seems to work as intendet so far. I hope the kolbot devs and collaborateurs may getting also a solution for this issue like Hyperjoin for TCP/IP a well done thing is =)
The thing with "quit(true);" is, if I used just "quit();", I believed that it was doing another exit method, but I'm not sure though and don't dare to edit it back to quit();. It may be a placebo effect... dunno ( I searched overall in botfolder for quit(true);, but there is none :(
But it seems to work.
Trial and error o/
PS: At ALL of you guys, If I'm telling untrue stuff and/or if I made mistakes or am offering dumb solutions, please feel free to correct me =)
even with quitlist there can be set a delay before quit. check https://github.com/kolton/d2bot-with-kolbot/issues/1462#issuecomment-484983690 for tcp/ip games the random delay isn't needed and you can set a fixed value.
@mf022 I'm missing to use QuitList since I bot in HC TCP/IP xD I'll defenitly give it a try, thanks mf022 o/
@mf022 tryed to do it the way described without the random part (i hope?!).. no change check pls
toolthread line 423-432
case 0x01: // "%Name1(%Name2) dropped due to errors." case 0x03: // "%Name1(%Name2) left our world. Diablo's minions weaken." if ((typeof Config.QuitList === "string" && Config.QuitList.toLowerCase() === "any") || (Config.QuitList instanceof Array && Config.QuitList.indexOf(name1) > -1)) { print(name1 + (mode === 0 ? " timed out" : " left"));
delay((5, 30) * 1000);
quitFlag = true;
}
FOllower.js: line 500-511
case me.name + " aon": attack = true;
say("Attack on.");
break;
case "quit":
case me.name + " quit":
delay((5, 30) * 1000);
quit();
break;
i did not use the last one bc im only leechin with 1 char.. I'm qiute new here btw, glad for any tips
@3CoRmEuM did it work for you?
delay((5, 30) * 1000);
this line should be
delay(10000);
for fixed 10 seconds delay
rand(5, 30) = random integer number between 5 and 30 delay is measured in miliseconds, so * 1000 is needed
hey!
got my lead/follow set up fine, playn tcp/ip games.
leecher is set up to quit with leader via Quit.List. Now there is this issue:
sometimes the leech ends the run 1ms after leader left. file is saved correclty, everything fine BUT other times the loader seems to quit too slow (i think thats the problem?), so that it gets the " Host of this game left, game closed". in this case, no exp, nor items etc. are saved, the run was basically not done in saves.
So if i run autobaal f.e. like every 1/3 runs end with this, making 2/3 of runs useless..
any ideas or same problems?