Jump to content

unconditional

Member
  • Posts

    16
  • Joined

  • Last visited

Posts posted by unconditional

  1. 5 minutes ago, _Lance_ said:

    You have more AI to kill, in your wai/config.sqf you can set wai_kill_percent back to the default which is 50 and that should help avoid that situation. If you want to keep it higher then maybe find a gps script out there that will do an AI check around you, I think one is included with clickactions already, for the GPS. 

    Also, It's random, but I've seen where a couple AI develop a separate brain from the rest of the group (just joking I don't think they're actually  capable of thinking outside the group brain) and wander/run off in a random direction. It's prob a 1 in 20 thing. You can confirm by enabling map icons in your admin tools and you'll see 1-3 AI within 2000m of mission center heading away from it and stalking. I've seen this is Jason's WAI as well as other forks. I don't remember seeing it before 1061 dropped last year. Which may make sense there were changes in variables at that time that affected most mission systems as far as spawning and cleanup goes if I remember right - hope my ramblings help in some way..

    I will try to set 50...

    Thanks for the reply... :)

  2. Hi everybody,

    scuse me for intrusion :)

    If I did not make mistakes ... maybe I could create a script to unlock the doors through use of the hotwirekit...

    I did not understand how the system of credits on scripts works ... so I want to clarify that my work was based on a script of @salival to which I wrote in private before publishing this. I waited a week but not having received an answer...i think it is still right to make available to the community as much as I did...
    So all the credits go @salival because i am based on his garagedooropener...

    Now...this is my work:

    -1) custom variable.sqf:

    Spoiler

    below this

    s_player_manageDoor = -1;

    add this

    s_player_hwdoor_opener_ctrl = -1;

    -2) custom fn_selfActions.sqf:

    Spoiler

    below this

    } else {
            player removeAction s_player_manageDoor;
            s_player_manageDoor = -1;
        };

    add this

    //Hotwire doors
        if (DZE_doorManagement && (_typeOfCursorTarget in DZE_DoorsLocked) && (_hasHotwireKit)) then {
        _hasAccess = [player, _cursorTarget] call FNC_check_access;
        if (s_player_hwdoor_opener_ctrl < 0 && (!(_hasAccess select 0) or !(_hasAccess select 2) or !(_hasAccess select 3) or !(_hasAccess select 4) or !(_hasAccess select 5))) then {
        s_player_hwdoor_opener_ctrl = player addAction [format["<t color='#ffffff'>Hotwire Door</t>"],"scripts\hwDoorOpener.sqf",_cursorTarget, 1, false];
        };
        
        } else {
        player removeAction s_player_hwdoor_opener_ctrl;
        s_player_hwdoor_opener_ctrl = -1;
        };

    -3) in custom script folder (under mission folder);

    red text in the script below is needed only if you want to log in .rpt when someone try a hotwiring. If you want this, you have to leave red text in the script and you also have to do step 4

    Spoiler

    create a new sqf file named hwDoorOpener.sqf and paste into it this code

    /*

      Author: Unconditional
      Credits: Based on Garage door opener by salival (https://github.com/oiad)


    */

    if (dayz_actionInProgress) exitWith {"You are already performing an action, wait for the current action to finish." call dayz_rollingMessages;};
    dayz_actionInProgress = true;

    private ["_cursortarget","_hotchance","_rollchance","_combi"];

    _cursortarget = _this select 3;
    _hotchance = 15;
    _rollchance = round(random 100);

    if (isNull _cursortarget) exitWith {dayz_actionInProgress = false; systemChat "Selected door is NULL!";};

    axeDiagLog = format["HOTWIRING tried: %1 at %2 ", (name player), (mapGridPosition getPos player)];
    publicVariable "axeDiagLog";

    if (_rollchance <= _hotchance) then {
    player removeMagazine "ItemHotwireKit";
    _combi = _cursortarget getVariable ["CharacterID","0"];
    sleep 1;
    format ["Lucky, HOTWIRED DOOR, COMBINATION IS: %1", _combi] call dayz_rollingMessages;
    } else {
    player removeMagazine "ItemHotwireKit";
    sleep 1;
    titleText ["DAMN...Your HOTWIRE IT'S BROKEN...", "PLAIN DOWN", 3];
    };

    dayz_actionInProgress = false;

     

    STEP 4 and 5 to do ONLY if you want to see log in .rpt

    -4) in inf.sqf (mission folder);

    Spoiler

    below this

    if (isServer) then {

    add this

    axe_server_log = compile preprocessFileLineNumbers "scripts\logtorpt.sqf";
    "axeDiagLog" addPublicVariableEventHandler {_id = (_this select 1) spawn axe_server_log};

    -5) in custom script folder (under mission folder);

    Spoiler

    create a new sqf file named logtorpt.sqf and paste into it this code

    private ["_targetObj"];
    _targetObj = _this;
    diag_log format["ADVICE: %1",_targetObj];

    - FINISH :-)

    Obviously i think it can be improved and for this reason i make it public, so that those who know more than me can suggest additions or modifications...

    For example ... I added a public variable to know via the .rpt file when a hotwire was used and whether it was successful or not.
    Maybe you can also add a routine to signal in the map or through text message for all the players that someone is trying to force a door...

    I tried it on my server and it seems to work fine.

    I await your observations and suggestions.

    I repeat: ALL CREDITS GO TO @SALIVAL

    Thanks for the attention.

  3. 2 hours ago, Tanita-Corp said:

    its work)))

    erorr rpt:

    
    Error in expression <R_VG_MAINTAIN_GARAGE", vg_maintainCost, _itemText];
    };
    };
    vg_init = true;
    };
    
    pr>
      Error position: <_itemText];
    };
    };
    vg_init = true;
    };
    
    pr>
      Error Undefined variable in expression: _itemtext
    File mpmissions\__CUR_MP.Chernarus\custom\virtualGarage\virtualGarage.sqf, line 22

    after open garage

    And any problem: player can steal other vehicles

    any idea?

    Hi,

    about stealing other players vehicles, if i don't mistake, you have to set in custom variables:

    vg_tiedToPole = false;

    Regards.

  4. On 31/12/2017 at 5:47 PM, theduke said:

    Hi everybody,

    i'm not a coder...but if i don't mistake...it need to add

    publicVariableServer "PVDZ_obj_Publish";

    so ultimately it should be:

    if (DZE_permanentPlot) then {
            _tmpbuilt setVariable ["ownerPUID",dayz_playerUID,true];
            PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,dayz_playerUID],[],player,dayz_authKey];

            } else {
            PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],[],player,dayz_authKey];
        };
        
        publicVariableServer "PVDZ_obj_Publish";

    I tested on my server...without publicVariableServer "PVDZ_obj_Publish"; the buildings disappear at server restart.

    With it...the buildings remain.

    I hope this is correct...

     

  5. 39 minutes ago, lwbuk said:

    Have you added the correct database details in the extdb-conf.ini

    Have you successfully uploaded the extdb.dll file to you server (if on a game host, most do not allow you to upload dll files, you need to ask them to do it)

     If you aren't getting the connected to database message, I would presume you've Inputted the details wrong in the config  

     

    The detail are correct... dbname, username and password of my main database.

    No game host. Server in house.

  6. Hi everybody,

    i'm new in the forum and step by step, with the forum's tutorial, i creating a epoch server 1.0.6.1.

    I'm not a programmer, but after two night without sleep, i think founded a solution for integrate "add/remove coin" in Noxsicarius Admin Tool 1.10.7.

    Maybe someone will have done it already, but i still want to share this my little satisfaction with you and contribute to the forum. :)

    How to proceed:

    Of course it must already be installed the Admin Tools 1.10.7 on Epoch server 1.0.6.1.

    1) Go to the yourmissionfolder\admintools and open (with notepad++) the file AdminToolsMain.sqf

    2) Find the line

    EAT_adminMenu = EAT_adminMenu + [["Humanity Menu >>",[],"#USER:EAT_humanityMenu", -5, [["expression", ""]], "1", "1"]];

    and add below

    EAT_adminMenu = EAT_adminMenu + [["Coin Menu >>",[],"#USER:EAT_coinMenu", -5, [["expression", ""]], "1", "1"]];

    3) Now, find the line

    EAT_humanityMenu = EAT_humanityMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];

    and add below

    //Main menu to handle coin changing
        EAT_coinMenu = [["",true]];
        EAT_coinMenu = EAT_coinMenu + [["-- Coin Change Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
        EAT_coinMenu = EAT_coinMenu + [["Add to self or target", [],"", -5, [["expression", '["add"] execVM "admintools\tools\coinChanger.sqf"']], "1", "1"]];
        EAT_coinMenu = EAT_coinMenu + [["Remove from self or target", [],"", -5, [["expression", '["remove"] execVM "admintools\tools\coinChanger.sqf"']], "1", "1"]];
        EAT_coinMenu = EAT_coinMenu + [["Reset to 0", [],"", -5, [["expression", '["reset"] execVM "admintools\tools\coinChanger.sqf"']], "1", "1"]];
        EAT_coinMenu = EAT_coinMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
        EAT_coinMenu = EAT_coinMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];

    4) Save and close the file.

    5) Go to the yourmissionfolder\admintools\tools and create a new sqf file and rename it coinChanger.sqf.

    6) Now paste into this file this lines

    /*
        Add or remove the selected coin amount from player.
    */

    private ["_target","_player","_Z_MoneyVariable","_addOrRemove"];
    _addOrRemove = _this select 0;
    _target = cursorTarget;
    _player = player;

    if(!isPlayer _target) then {_target = _player;};

    coinGain = -1;
    _Z_MoneyVariable = _target getVariable[Z_MoneyVariable, 0];

    if(_addOrRemove != "reset") then {
        EAT_coinChange = [
            ["",true],
            ["Select coin amount:", [-1], "", 0, [["expression", ""]], "1", "0"],
            ["100", [2], "", -5, [["expression", "coinGain=100;"]], "1", "1"],
            ["500", [3], "", -5, [["expression", "coinGain=500;"]], "1", "1"],
            ["5000", [4], "", -5, [["expression", "coinGain=5000;"]], "1", "1"],
            ["10000", [5], "", -5, [["expression", "coinGain=10000;"]], "1", "1"],
            ["50000", [6], "", -5, [["expression", "coinGain=50000;"]], "1", "1"],
            ["Exit", [8], "", 0, [["expression", ""]], "1", "1"]
        ];

        showCommandingMenu "#USER:EAT_coinChange";
        waitUntil{(commandingMenu == "")};
        if((coinGain == -1)) exitWith {};

        if(_addOrRemove == "remove") then {
            coinGain = coinGain - (coinGain * 2);
        };

        _target setVariable[Z_MoneyVariable, _Z_MoneyVariable + coinGain, true];
        cutText [format["%1 coin has been added (total: %2) for player %3", coinGain, _Z_MoneyVariable + coinGain, name _target],"PLAIN DOWN"]; titleFadeOut 10;

        // Tool use logger
        if(EAT_logMinorTool) then {
            EAT_PVEH_usageLogger = format["%1 %2 -- has added %3 to %4's coin (total %5)",name _player,getPlayerUID _player,coinGain,name _target,_Z_MoneyVariable + coinGain];
            [] spawn {publicVariable "EAT_PVEH_usageLogger";};
        };
    }else{
        coinGain = _Z_MoneyVariable - (_Z_MoneyVariable * 2);
        _target setVariable[Z_MoneyVariable, 0, true];
        cutText [format["Coin reset to 0 for player %1", name _target],"PLAIN DOWN"]; titleFadeOut 10;

        // Tool use logger
        if(EAT_logMinorTool) then {
            EAT_PVEH_usageLogger = format["%1 %2 -- has RESET %3's coin to 0",name _player,getPlayerUID _player,name _target];
            [] spawn {publicVariable "EAT_PVEH_usageLogger";};
        };
    };

    7) Save and close the file.

    8) Start the server.

    Surely the most mindful will have realized that I have not simply duplicated the management of humanity by adapting it to coin. :)

    I hope to have done what you like and above all to have been useful.

×
×
  • Create New...