Would someone please tell me what this script is that i'm seeing?

Discussion in 'Scripting Discussions' started by Shadow_otw, Apr 12, 2017.

  1. Shadow_otw

    Shadow_otw Member

    Sep 10, 2013
    Likes Received:
    "if (!isNil 'dze_filterCheats' && !isNil 'channel_keys') then {[(_this select 0),-1,false] spawn dze_filterCheats;};"
    I'm finding it in my Battlemetrics log, and I don't know what it is!

    Thanks in advance!
  2. FallingSheep

    FallingSheep OpenDayZ Lord!

    Mar 17, 2013
    Likes Received:
    called from keyboard.sqf
    _filterCheat = {
    //Overriding default engine handling does not stop cheat input, need manual disableUserInput too
    _handled = [displayNull,_dikCode,_shiftState] call dze_filterCheats;
    and here
    _noise = {
    //Overriding default engine handling does not stop combination binds, need manual disableUserInput too
    _handled = [displayNull,_dikCode,_shiftState] call dze_filterCheats;
    if (diag_ticktime - dayz_lastCheckBit > 10 && !(_dikCode in channel_keys)) then {
    dayz_lastCheckBit = diag_ticktime;
    [player,20,true,(getPosATL player)] call player_alertZombies;
    also in rscTitles.hpp
    #define FILTER_CHEATS "_handled = if (isNil 'dze_filterCheats') then {false} else {_this call dze_filterCheats}; _handled"
    and compiled in compiles.sqf
    dze_filterCheats = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_filterCheats.sqf";
    and finally the player_filterCheats.sqf
    Overriding default engine handling does not stop cheat input.
    It also does not stop VON when combination binds like Ctrl+Z are used, because keyDown registers each key press individually.
    We need to manually disable user input.
    #include "\ca\editor\Data\Scripts\dikCodes.h"
    _dik = _this select 1;
    _shift = _this select 2;
    _handled = false;
    _channel = ctrlText (findDisplay 63 displayCtrl 101);
    _micIcon = ctrlShown (findDisplay 55 displayCtrl 101);
    _inputAction1 = {inputAction _x > 0} count voice_actions; //Includes mouse buttons and combination binds, but does not work when a dialog is open
    _inputAction2 = {inputAction _x > 0} count ["NextChannel","PrevChannel"];
    _channel = previous channel when changing channels.
    We can not predict which one that will be, because description.ext settings vary.
    So block all changing of channels while mic is locked on for now.
    _channelChange = _micIcon && ((!isNull findDisplay 24 && _dik in [DIK_DOWN,DIK_UP]) or (_dik in channel_keys) or (_inputAction2 > 0));
    _blockVoice = _channelChange or ((_dik in voice_keys or (_inputAction1 > 0)) && (_channel in DZE_DisabledChannels));
    if (_dik == DIK_NUMPADMINUS) then {dayz_minusDownTime = diag_tickTime;};
    _blockCheat = (_dik == DIK_NUMPADMINUS && _shift) or (_dik == DIK_LSHIFT && (diag_tickTime - dayz_minusDownTime < 1));
    if (_blockCheat or _blockVoice) then {
    if (_blockCheat) then {call player_forceSave;}; //Perform before disableUserInput to prevent reenable
    disableUserInput true;disableUserInput true;
    if (_blockVoice) then {findDisplay 55 closeDisplay 2;};
    [_blockVoice,_channel,_channelChange] spawn {
    _blockVoice = _this select 0;
    _channel = _this select 1;
    _channelChange = _this select 2;
    _testTime = diag_tickTime;
    CheatsDisabled = _testTime;
    switch true do {
    case _channelChange: {[localize "STR_EPOCH_NO_CHANNEL_SWITCH",1] call dayz_rollingMessages;};
    case _blockVoice: {[format[localize "STR_EPOCH_NO_VOICE",_channel],1] call dayz_rollingMessages;};
    default {[localize "STR_EPOCH_NO_CHEATS",1] call dayz_rollingMessages;};
    uiSleep 5;
    if (!r_player_unconsciousInputDisabled && CheatsDisabled == _testTime) then {
    //Enable input, disable and reenable to prevent the last key press being input after re-enable
    disableUserInput false;disableUserInput true;disableUserInput false;disableUserInput false;
    _handled = true;
    //diag_log format["FilterCheats - Display:%7 DIK:%1 Channel:%2 ChannelChange:%3 BlockVoice:%4 Handled:%5 MicIcon:%6 InputAction1:%8 InputAction2:%9",_dik,_channel,_channelChange,_blockVoice,_handled,_micIcon,(_this select 0),_inputAction1,_inputAction2];
    so long story short :p its a basic anti cheat built into epoch :)

Share This Page