Anti Combat logging - DiscoBot

superlube

Member
Anti Combat logging - DiscoBot help and discussion here

is there a readme on how to install this?

do i need to create a discobot.pbo and add all the files & folders from the github link in post #1 ?? Where would I put this discobot.pbo ??

Thanks

(Make sure you backup any files you edit prior to following these instructions)

To install the bots, you need to first unpack your dayz_server.pbo file. Then copy the following files into the 'compile' folder:
server_botDamage.sqf
server_botDied.sqf
server_botSetup.sqf
server_botSync.sqf
(Link to files are in the original post)

Inside the 'compile' folder, you will see a file called 'server_playerLogin.sqf' and 'server_onPlayerDisconnect.sqf'

Inside the 'server_playerLogin.sqf' add this just above where it says "//??? endLoadingScreen;":
Code:
if (_playerID in botPlayers) then {
    botPlayers = botPlayers - [_playerID];
};

Inside the 'server_onPlayerDisconnect.sqf', find where it says :

Code:
if ((_timeout - time) > 0) then {
    diag_log format["COMBAT LOGGED: %1 (%2)", _playerName,_timeout];
  };
and edit it so it looks like this:
Code:
if ((_timeout - time) > 0) then {
    diag_log format["COMBAT LOGGED: %1 (%2)", _playerName,_timeout];
    if (alive _object) then {
        [_playerID, _characterID, typeof _object, _object] spawn server_botSetup;
    };
};

Lastly, find the "init" folder and edit the file called "server_functions.sqf". Add the following lines just below where it says
"server_spawnCrashSite = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf";"

Code:
server_botSetup =        compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_botSetup.sqf";
server_botSync =        compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_botSync.sqf";
server_botDamage =            compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_botDamage.sqf";
server_botDied =        compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_botDied.sqf";
//Get instance name (e.g. dayz_1.chernarus) (not sure if this line is needed tbh)
fnc_instanceName = {
    "dayz_" + str(dayz_instance) + "." + worldName
};
 
if(isNil "botPlayers") then {
    botPlayers = []
};

Save everything, pack your dayz_server back up and start your server. When testing, make sure your test subject is in combat (fire your gun) before he logs out. The bot wont appear if the player logs out legitimately.

Refer to "Manatee Hunter" files which he/she posted if you are still unsure where things go. I've had no complaints yet on my server in regards to this anti-combat logging feature - everything seems to work fine.
 
One question: Is the gear of the bot synced witht the database? What happens i put a dmr in my backpack, get into combat, bot appears, budy graps only the dmr but doesnt kill me and then i reconnect? Is the DMR gone from my backpack?
 
This is sweet! I hate combat loggers and get tons of complains all the time. I will test this one out.
 
One question: Is the gear of the bot synced witht the database? What happens i put a dmr in my backpack, get into combat, bot appears, budy graps only the dmr but doesnt kill me and then i reconnect? Is the DMR gone from my backpack?
The bot does sync with the database once is disappears or dies. I suspect it would be no different to grabbing the DMR out of the bag out of an actual player. The DMR might be dupable during high server load but again, probably would happen anyway even with a real player.
The only issue right now (which isn't really the bots fault) is that it doesn't stop people from alt f4'ing once dead - which causes the body to disappear. Theoretically, the are not in combat anymore aka combattimer = 0.
 
Ok, i tested it... it alows duping somehow. But as you said... duping with backpacks and stuff is working anyways...

Nice that this is working pretty fine :)
 
It doesn't stop you combat logging. It spawns a bot in your place allowing players to kill you. I personally tested this by running a separate DayZ session on a VM but you could always get a mate to test it out with you.
 
Weird, I am having none of these issues. I'm using Stapo's Lite dayz pack without rmod if that helps.

While I haven't specifically tried closing the game via alt tab + click close (I pressed Esc then Alt f4'd), I assumed it would still fall under the same category as 'disconnected' and would still run the onplayerdisconnect.sqf which initiates the bot.
The code in 'server_playerLogin.sqf' should stop you from logging in and looting your own body. I personally see a countdown in rpt logs confirming this.
I'm a bit worried now that I didn't test this enough though I have yet to have any players on my server to report any bugs.
 
Its possibly just something ive done wrong, i have a few things to do today, then ill start from scratch and post step by step of what ive done, hopefully it will stop anyone else running into the same problems ive hit :p
 
did what superlube said, using stapos lite package

i didnt change the server_monitor.sqf script so no idea :S

Code:
19:11:37 "HIVE: Starting"
19:11:37 "MISSION: File Updated"
19:11:37 "HIVE: Request sent"
19:11:37 Error in expression <1:",dayZ_instance];
_result = _key call server_hiveReadWrite;
 
diag_log "HIVE: R>
19:11:37  Error position: <server_hiveReadWrite;
 
diag_log "HIVE: R>
19:11:37  Error Undefined variable in expression: server_hivereadwrite
19:11:37 File z\addons\dayz_server\system\server_monitor.sqf, line 30
19:11:37 "DEBUG FPS  : 1.08703"
19:11:37 "CLEANUP: INITIALIZING CLEANUP SCRIPT"
19:14:41 "DEBUG FPS  : 50"

appreciate any help :X
 
Anyone have this working on the DayZ Control Center build? I get the bot to show, but when I come back in it appears the bot would have died and I am still alive.
 
works for me
on my chearnous map
thx

i have a suggestion...
any chance of making it so the gun icon is flashing while u are moving ingame?
 
Hello,
I just tried to install this on my dayz.st server. Whenever anyone logs out, or combat logs, a body (theirs)is placed on ground or standing up. You can then log in, right next to where your body is with all your gear, essentially free duping.

I will attach my .pbo file for people to look through and see if they can spot the problem.

Note that this pbo file also has bright nights in it, so if it is different from base check with that.

Thanks
 

Attachments

  • dayz_server.pbo
    88.4 KB · Views: 20
Don't work for me too :( Test it 10-15 times in combat mode with alt+f4, ctrl+alt+del, alt+tab... and players still disappear but bot just don't spawn
 

Attachments

  • dayz_server.pbo
    105.6 KB · Views: 14
The question is, can you spawn a bot on death to act like a zombie, and have all gear on them from the guy who just died and spawned this zombie?
 
Tbh not interested in that atm, just want to try get it working, and maybe make it so your in combat until you stand still for 10 seconds
 
well this works, sort of. if the player aborts with the menu, by clicking esc and quickly hitting abort before it greys out, it will not create a bot. if they use alt tab and kill the program it will create bot.
 
Back
Top