Ok so I managed to get it working. Turns out, my bot can connect to darkplaces, fte, and manquake and stay connected indefinitely as long as I spam some unreliables. However, and this is where I was messing up, proquake will still disconnect the bot. Unfortunately I don't have the proquake source code to examine, but I did manage to find in my packet captures that proquake sends an impulse 39 reliable message every 5 seconds. I spoke with r00k and he said that this was proquake's way of determining pings and such. He ended up giving me some insight on how Qrack handles this.. Essentially, the bot just needs to send an unreliable with the correct 'action time' in the form of a client movement order with an additional '39' as the impulse number. Upon doing this, my bot has remained connected to all proquake servers without issue.
Now, I just need to build upon this and add some code to handle map changes and afk timelimit disconnects. Thanks for all your help, guys!
Help with Quake Bot
Re: Help with Quake Bot
You are using the word "proquake" in place of the mod 'CRMOD'...proquake sends an impulse 39
crmod sends a stuffcmd to the client
Code: Select all
msg_entity = player;
WriteByte (MSG_ONE, SVC_STUFFCMD);
WriteString (MSG_ONE, "impulse 39\n");
Re: Help with Quake Bot
Ok so it's stuffcmd sent by the mod itself, not proquake. I guess I simply associated the problem with proquake because I was getting that stuffcmd when I connected to proquake servers running both crmod and cax. Also, prior to our conversation, I had not realized that some of these server messages required information back. As an example, I can get away with not recognizing the 'bright flash' command that the server sends.r00k wrote:You are using the word "proquake" in place of the mod 'CRMOD'...proquake sends an impulse 39
crmod sends a stuffcmd to the clientwhich sends impulse 39 back to the server to update a timer that is used to determine AFK, or lagged out clients.Code: Select all
msg_entity = player; WriteByte (MSG_ONE, SVC_STUFFCMD); WriteString (MSG_ONE, "impulse 39\n");
Re: Help with Quake Bot
Difference between reliable and unreliable msg?Spike wrote:What's wrong with stuffcmd? :/
Re: Help with Quake Bot
both the builtin and MSG_ONE are reliable, and sent to one. qc has no unreliable unicast method.
thus the only practical reason to use writebytes for stuffcmds is if you want to write a single char at a time in order to work around the lack of support for strcat.
thus the only practical reason to use writebytes for stuffcmds is if you want to write a single char at a time in order to work around the lack of support for strcat.
Re: Help with Quake Bot
Interesting. Seems like a decent enough solution and quite self-explanatory.. Pack a byte, append/concat it to the string. I suppose with strcat, you could do it directly.