Jump to content

P0k3r_OF_Sm0t

Member
  • Posts

    92
  • Joined

  • Last visited

Posts posted by P0k3r_OF_Sm0t

  1. Hey Guys,

     

    I have a fresh overpoch server ONLY plotmanagement i tried to add i got this error->

     

    18:44:15 Error in expression <then
    {
    _dir = _worldspace select 0;
    if (count (_worldspace select 1) == 3) then >
    18:44:15   Error position: <count (_worldspace select 1) == 3) then >
    18:44:15   Error count: Type String, expected Array,Config entry
    18:44:15 File z\addons\dayz_server\system\server_monitor.sqf, line 105
    

    Dunno why.

     

    here my server_monitor.sqf:

    private ["_nul","_result","_pos","_wsDone","_dir","_isOK","_countr","_objWpnTypes","_objWpnQty","_dam","_selection","_totalvehicles","_object","_idKey","_type","_ownerID","_worldspace","_intentory","_hitPoints","_fuel","_damage","_key","_vehLimit","_hiveResponse","_objectCount","_codeCount","_data","_status","_val","_traderid","_retrader","_traderData","_id","_lockable","_debugMarkerPosition","_vehicle_0","_bQty","_vQty","_BuildingQueue","_objectQueue","_superkey","_shutdown","_res","_hiveLoaded"];
    
    dayz_versionNo =         getText(configFile >> "CfgMods" >> "DayZ" >> "version");
    dayz_hiveVersionNo =     getNumber(configFile >> "CfgMods" >> "DayZ" >> "hiveVersion");
    
    _hiveLoaded = false;
    
    waitUntil{initialized}; //means all the functions are now defined
    
    diag_log "HIVE: Starting";
    
    waituntil{isNil "sm_done"}; // prevent server_monitor be called twice (bug during login of the first player)
        
    // Custom Configs
    if(isnil "MaxVehicleLimit") then {
        MaxVehicleLimit = 50;
    };
    
    if(isnil "MaxDynamicDebris") then {
        MaxDynamicDebris = 100;
    };
    if(isnil "MaxAmmoBoxes") then {
        MaxAmmoBoxes = 3;
    };
    if(isnil "MaxMineVeins") then {
        MaxMineVeins = 50;
    };
    // Custon Configs End
    
    if (isServer && isNil "sm_done") then {
    
        serverVehicleCounter = [];
        _hiveResponse = [];
    
        for "_i" from 1 to 5 do {
            diag_log "HIVE: trying to get objects";
            _key = format["CHILD:302:%1:", dayZ_instance];
            _hiveResponse = _key call server_hiveReadWrite;  
            if ((((isnil "_hiveResponse") || {(typeName _hiveResponse != "ARRAY")}) || {((typeName (_hiveResponse select 1)) != "SCALAR")})) then {
                if ((_hiveResponse select 1) == "Instance already initialized") then {
                    _superkey = profileNamespace getVariable "SUPERKEY";
                    _shutdown = format["CHILD:400:%1:", _superkey];
                    _res = _shutdown call server_hiveReadWrite;
                    diag_log ("HIVE: attempt to kill.. HiveExt response:"+str(_res));
                } else {
                    diag_log ("HIVE: connection problem... HiveExt response:"+str(_hiveResponse));
                
                };
                _hiveResponse = ["",0];
            }
            else {
                diag_log ("HIVE: found "+str(_hiveResponse select 1)+" objects" );
                _i = 99; // break
            };
        };
        
        _BuildingQueue = [];
        _objectQueue = [];
        
        if ((_hiveResponse select 0) == "ObjectStreamStart") then {
        
            // save superkey
            profileNamespace setVariable ["SUPERKEY",(_hiveResponse select 2)];
            
            _hiveLoaded = true;
        
            diag_log ("HIVE: Commence Object Streaming...");
            _key = format["CHILD:302:%1:", dayZ_instance];
            _objectCount = _hiveResponse select 1;
            _bQty = 0;
            _vQty = 0;
            for "_i" from 1 to _objectCount do {
                _hiveResponse = _key call server_hiveReadWriteLarge;
                //diag_log (format["HIVE dbg %1 %2", typeName _hiveResponse, _hiveResponse]);
                if ((_hiveResponse select 2) isKindOf "ModularItems") then {
                    _BuildingQueue set [_bQty,_hiveResponse];
                    _bQty = _bQty + 1;
                } else {
                    _objectQueue set [_vQty,_hiveResponse];
                    _vQty = _vQty + 1;
                };
            };
            diag_log ("HIVE: got " + str(_bQty) + " Epoch Objects and " + str(_vQty) + " Vehicles");
        };
        
        // # NOW SPAWN OBJECTS #
        _totalvehicles = 0;
        {
            _idKey =         _x select 1;
            _type =            _x select 2;
            _ownerID =         _x select 3;
    
            _worldspace =     _x select 4;
            _intentory =    _x select 5;
            _hitPoints =    _x select 6;
            _fuel =            _x select 7;
            _damage =         _x select 8;
            
            _dir = 0;
            _pos = [0,0,0];
            _wsDone = false;
            if (count _worldspace >= 2) then
            {
                _dir = _worldspace select 0;
                if (count (_worldspace select 1) == 3) then {
                    _pos = _worldspace select 1;
                    _wsDone = true;
                }
            };            
            
            if (!_wsDone) then {
                if (count _worldspace >= 1) then { _dir = _worldspace select 0; };
                _pos = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos;
                if (count _pos < 3) then { _pos = [_pos select 0,_pos select 1,0]; };
                diag_log ("MOVED OBJ: " + str(_idKey) + " of class " + _type + " to pos: " + str(_pos));
            };
            
    
            if (_damage < 1) then {
                //diag_log format["OBJ: %1 - %2", _idKey,_type];
                
                //Create it
                _object = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];
                _object setVariable ["lastUpdate",time];
                _object setVariable ["ObjectID", _idKey, true];
                if (typeOf (_object) == "Plastic_Pole_EP1_DZ") then {
                _object setVariable ["plotfriends", _intentory, true];
                };
    
                _lockable = 0;
                if(isNumber (configFile >> "CfgVehicles" >> _type >> "lockable")) then {
                    _lockable = getNumber(configFile >> "CfgVehicles" >> _type >> "lockable");
                };
    
                // fix for leading zero issues on safe codes after restart
                if (_lockable == 4) then {
                    _codeCount = (count (toArray _ownerID));
                    if(_codeCount == 3) then {
                        _ownerID = format["0%1", _ownerID];
                    };
                    if(_codeCount == 2) then {
                        _ownerID = format["00%1", _ownerID];
                    };
                    if(_codeCount == 1) then {
                        _ownerID = format["000%1", _ownerID];
                    };
                };
    
                if (_lockable == 3) then {
                    _codeCount = (count (toArray _ownerID));
                    if(_codeCount == 2) then {
                        _ownerID = format["0%1", _ownerID];
                    };
                    if(_codeCount == 1) then {
                        _ownerID = format["00%1", _ownerID];
                    };
                };
    
                _object setVariable ["CharacterID", _ownerID, true];
                
                clearWeaponCargoGlobal  _object;
                clearMagazineCargoGlobal  _object;
                // _object setVehicleAmmo DZE_vehicleAmmo;
                
                _object setdir _dir;
                _object setposATL _pos;
                _object setDamage _damage;
                
                if ((typeOf _object) in dayz_allowedObjects) then {
                    if (DZE_GodModeBase) then {
                        _object addEventHandler ["HandleDamage", {false}];
                    } else {
                        _object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}];
                    };
                    // Test disabling simulation server side on buildables only.
                    _object enableSimulation false;
                    // used for inplace upgrades && lock/unlock of safe
                    _object setVariable ["OEMPos", _pos, true];
                    
                };
    
                if ((count _intentory > 0) && !(typeOf( _object) == "Plastic_Pole_EP1_DZ")) then {
                    if (_type in DZE_LockedStorage) then {
                        // Fill variables with loot
                        _object setVariable ["WeaponCargo", (_intentory select 0),true];
                        _object setVariable ["MagazineCargo", (_intentory select 1),true];
                        _object setVariable ["BackpackCargo", (_intentory select 2),true];
                    } else {
    
                        //Add weapons
                        _objWpnTypes = (_intentory select 0) select 0;
                        _objWpnQty = (_intentory select 0) select 1;
                        _countr = 0;                    
                        {
                            if(_x in (DZE_REPLACE_WEAPONS select 0)) then {
                                _x = (DZE_REPLACE_WEAPONS select 1) select ((DZE_REPLACE_WEAPONS select 0) find _x);
                            };
                            _isOK =     isClass(configFile >> "CfgWeapons" >> _x);
                            if (_isOK) then {
                                _object addWeaponCargoGlobal [_x,(_objWpnQty select _countr)];
                            };
                            _countr = _countr + 1;
                        } count _objWpnTypes;
                    
                        //Add Magazines
                        _objWpnTypes = (_intentory select 1) select 0;
                        _objWpnQty = (_intentory select 1) select 1;
                        _countr = 0;
                        {
                            if (_x == "BoltSteel") then { _x = "WoodenArrow" }; // Convert BoltSteel to WoodenArrow
                            if (_x == "ItemTent") then { _x = "ItemTentOld" };
                            _isOK =     isClass(configFile >> "CfgMagazines" >> _x);
                            if (_isOK) then {
                                _object addMagazineCargoGlobal [_x,(_objWpnQty select _countr)];
                            };
                            _countr = _countr + 1;
                        } count _objWpnTypes;
    
                        //Add Backpacks
                        _objWpnTypes = (_intentory select 2) select 0;
                        _objWpnQty = (_intentory select 2) select 1;
                        _countr = 0;
                        {
                            _isOK =     isClass(configFile >> "CfgVehicles" >> _x);
                            if (_isOK) then {
                                _object addBackpackCargoGlobal [_x,(_objWpnQty select _countr)];
                            };
                            _countr = _countr + 1;
                        } count _objWpnTypes;
                    };
                };    
                
                if (_object isKindOf "AllVehicles") then {
                    {
                        _selection = _x select 0;
                        _dam = _x select 1;
                        if (_selection in dayZ_explosiveParts && _dam > 0.8) then {_dam = 0.8};
                        [_object,_selection,_dam] call object_setFixServer;
                    } count _hitpoints;
    
                    _object setFuel _fuel;
    
                    if (!((typeOf _object) in dayz_allowedObjects)) then {
                        
                        //_object setvelocity [0,0,1];
                        _object call fnc_veh_ResetEH;        
                        
                        if(_ownerID != "0" && !(_object isKindOf "Bicycle")) then {
                            _object setvehiclelock "locked";
                        };
                        
                        _totalvehicles = _totalvehicles + 1;
    
                        // total each vehicle
                        serverVehicleCounter set [count serverVehicleCounter,_type];
                    };
                };
    
                //Monitor the object
                PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
            };
        } count (_BuildingQueue + _objectQueue);
        // # END SPAWN OBJECTS #
    
        // preload server traders menu data into cache
        if !(DZE_ConfigTrader) then {
            {
                // get tids
                _traderData = call compile format["menu_%1;",_x];
                if(!isNil "_traderData") then {
                    {
                        _traderid = _x select 1;
    
                        _retrader = [];
    
                        _key = format["CHILD:399:%1:",_traderid];
                        _data = "HiveEXT" callExtension _key;
    
                        //diag_log "HIVE: Request sent";
                
                        //Process result
                        _result = call compile format ["%1",_data];
                        _status = _result select 0;
                
                        if (_status == "ObjectStreamStart") then {
                            _val = _result select 1;
                            //Stream Objects
                            //diag_log ("HIVE: Commence Menu Streaming...");
                            call compile format["ServerTcache_%1 = [];",_traderid];
                            for "_i" from 1 to _val do {
                                _data = "HiveEXT" callExtension _key;
                                _result = call compile format ["%1",_data];
                                call compile format["ServerTcache_%1 set [count ServerTcache_%1,%2]",_traderid,_result];
                                _retrader set [count _retrader,_result];
                            };
                            //diag_log ("HIVE: Streamed " + str(_val) + " objects");
                        };
    
                    } forEach (_traderData select 0);
                };
            } forEach serverTraders;
        };
    
        if (_hiveLoaded) then {
            //  spawn_vehicles
            _vehLimit = MaxVehicleLimit - _totalvehicles;
            if(_vehLimit > 0) then {
                diag_log ("HIVE: Spawning # of Vehicles: " + str(_vehLimit));
                for "_x" from 1 to _vehLimit do {
                    [] spawn spawn_vehicles;
                };
            } else {
                diag_log "HIVE: Vehicle Spawn limit reached!";
            };
        };
        
        //  spawn_roadblocks
        diag_log ("HIVE: Spawning # of Debris: " + str(MaxDynamicDebris));
        for "_x" from 1 to MaxDynamicDebris do {
            [] spawn spawn_roadblocks;
        };
        //  spawn_ammosupply at server start 1% of roadblocks
        diag_log ("HIVE: Spawning # of Ammo Boxes: " + str(MaxAmmoBoxes));
        for "_x" from 1 to MaxAmmoBoxes do {
            [] spawn spawn_ammosupply;
        };
        // call spawning mining veins
        diag_log ("HIVE: Spawning # of Veins: " + str(MaxMineVeins));
        for "_x" from 1 to MaxMineVeins do {
            [] spawn spawn_mineveins;
        };
    
        if(isnil "dayz_MapArea") then {
            dayz_MapArea = 10000;
        };
        if(isnil "HeliCrashArea") then {
            HeliCrashArea = dayz_MapArea / 2;
        };
        if(isnil "OldHeliCrash") then {
            OldHeliCrash = false;
        };
    
        // [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire]
        if(OldHeliCrash) then {
            _nul = [3, 4, (50 * 60), (15 * 60), 0.75, 'center', HeliCrashArea, true, false] spawn server_spawnCrashSite;
        };
        if (isDedicated) then {
            // Epoch Events
            _id = [] spawn server_spawnEvents;
            // server cleanup
            [] spawn {
                private ["_id"];
                sleep 200; //Sleep Lootcleanup, don't need directly cleanup on startup + fix some performance issues on serverstart
                waitUntil {!isNil "server_spawnCleanAnimals"};
                _id = [] execFSM "\z\addons\dayz_server\system\server_cleanup.fsm";
            };
    
            // spawn debug box
            _debugMarkerPosition = getMarkerPos "respawn_west";
            _debugMarkerPosition = [(_debugMarkerPosition select 0),(_debugMarkerPosition select 1),1];
            _vehicle_0 = createVehicle ["DebugBox_DZ", _debugMarkerPosition, [], 0, "CAN_COLLIDE"];
            _vehicle_0 setPos _debugMarkerPosition;
            _vehicle_0 setVariable ["ObjectID","1",true];
    
            // max number of spawn markers
            if(isnil "spawnMarkerCount") then {
                spawnMarkerCount = 10;
            };
            actualSpawnMarkerCount = 0;
            // count valid spawn marker positions
            for "_i" from 0 to spawnMarkerCount do {
                if (!([(getMarkerPos format["spawn%1", _i]), [0,0,0]] call BIS_fnc_areEqual)) then {
                    actualSpawnMarkerCount = actualSpawnMarkerCount + 1;
                } else {
                    // exit since we did not find any further markers
                    _i = spawnMarkerCount + 99;
                };
                
            };
            diag_log format["Total Number of spawn locations %1", actualSpawnMarkerCount];
            
            endLoadingScreen;
        };
    
        allowConnection = true;    
        sm_done = true;
        publicVariable "sm_done";
    };
    
    

    What version of epoch are you using? Your server monitor is quite different than mine.

     

    Your section from the if (count_worldspace>=2)then is:

    Yours:

     

            if (count _worldspace >= 2) then
            {
                _dir = _worldspace select 0;
                if (count (_worldspace select 1) == 3) then {
                    _pos = _worldspace select 1;
                    _wsDone = true;
                }
            };

     

     

    Mine:

     

        if (count _worldspace >= 2) then
            {
                if(count _worldspace == 3) then{
                    _vector = _worldspace select 2;
                    if(typename _vector == "ARRAY")then{
                        if(count _vector == 2)then{
                            if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{
                                _vecExists = true;
                            };
                        };
     
                    };
     
                };
                _dir = _worldspace select 0;
                if (count (_worldspace select 1) == 3) then {
                    _pos = _worldspace select 1;
                    _wsDone = true;
                }
            };

     
    There's a lot more code between my opening and closing bracket (in red) for that if statement than yours. Since mine works and your's doesn't I'm guessing that you have an older server_monitor.sqf & that will have something to do with it.
    The extra code in mine could have something to do with some mods I have installed but can't say for sure since it's been a long time since I have altered my server_monitor. I usually add a comment to the areas that I edit and there is no comment for this section so most likely it is stock.
     
    After some checking, it looks like that section of my server_monitor has been edited by build vectors so not sure what to tell ya now. Sorry
  2. Hi, was wondering if anyone know's if it's possible to create a static loot "pile" without using a crate. Like with a weaponHolder maybe? 

    The idea is: I run Napf, the large surehnfield array has been taken over by bandit pirates and instead of crates loaded with gems and gold I'd like to just make random piles in various locations. Make it look more like pirate loot just laying about.

    Possible?

  3.  

    rSay is to broadcast the sound over network, so other players also can hear it.

    so if that is not important for you you could try to simply use:

    playSound "bury";

    only the player who executed this script will here that, but maybe its enough.

     

     

    for the rSay command like you already have it:

     

    first of all you dont need to define _nul

    [objNull, player, rSAY, "bury"] call RE;
    

    this should be enough

     

    next thing would be

     

    try it this way:

    [nil,player,rSAY,["bury", 10]] call RE;

    Thanks I'll give it a shot. I just copied the line for the sound from the drink water script so I'm assuming that means that is broadcast server wide as well? Don't need nor want that so I'll see what happens and if it works,  I'll have to edit the drink script as well to keep it local.

    Thanks SchwEde, I'll let you know if works.

     

    Update. Works great with the playSound "bury" every time right when I want it to. Thanks a lot!! My hero lol!

  4. So I'm trying to add a sound that plays at the end of Sewaduk's bury corpse script. I have it working but it is very random.  Sometimes the sound will play as soon as I click bury, other times it will play 2 minutes after the body has been buried and you're 300M away, other times it will play right when I want it to which is when you stand up and salute. I have clark17's adapted version of mamu1234's drink water script and that script plays the drink sound everytime at the right time. I did some testing which involved swapping the sound call for each script and the drink water script played my custom sound everytime right on the money but the bury script played drink sounds totally random so I know it has nothing to do with the sound file itself. I will tell you right now that I know very little about scripting, most of what i have done in the past is cut here, paste there until it works so please don't reply with something like: "Oh you just need an "if I had a clue" statement after the 22nd variable on the 4th dimension" or something like that because I'll be just as stuck as I am now. :P Please just show me what I need to add and where.  If someone could help me get this working I'd greatly appreciate it and you'd be forever my hero. :wub:  LOL

    This is what done so far:

     

    I used this line: _nul = [objNull, player, rSAY, "bury"] call RE;

     

    and put it here:

     

            _deathMessage = format["Rest in Peace, %1...",_name];
            cutText [_deathMessage, "PLAIN DOWN"];
            [player,25] call player_humanityChange;
            _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
            _nul = [objNull, player, rSAY, "bury"] call RE;
            player playMove "AmovPercMstpSlowWrflDnon_Salute";
            
        } else {
            cutText ["The poor bastards been eaten, there's not much left to bury", "PLAIN DOWN"];
                    
        };
    };

     

    This is my class cfgsounds from description.ext:

     

    class CfgSounds
    {
        sounds[] = {siren,drink_water,bury};
        
        class siren {
            name = "siren";
            sound[] = {custom\sirens\siren.ogg,0.5,1};
            titles[] = {};
        };
        class drink_water {
            name="drink_water";
            sound[]={custom\drink\drink_water.ogg,1,1};
            titles[] = {};
       };
           class bury {
            name="bury";
            sound[]={fixes\bury.ogg,1,1};
            titles[] = {};
       };

    };

     

    Again, it works but at totally random times.

    Also, I got my sound file down to 22kb which is less than 1/4 the size of the drink_water sound file so I'm pretty sure it's not that it's just taking awhile for the sound to load or the drink sound would be even more delayed.

    Thanks

  5. What version of WAI are you running? If I remember correctly I think the static crates broke with version 2.1.4. I don't know if I have the beta version 2.2.0 or not. If they worked in 2.1.4 and broke with 2.2.0 then I have it working for 2.2.0. How would I find out for sure what version i do have?

    Anyways, It took me like 2 weeks to get all the static ai and crates working just a week or so before whatever version it was that broke the crates came out so I was pretty pissed that it was broke and made it a mission to make them work. It was a while ago but all I think I did was copy the code from the static crates file and paste it into default.sqf in the static folder. Again, it was awhile ago so there may have been a few other things that had to be copied. I am no scripter and I don't remember it being too difficult.

     

    Also, instead of using WAI couldn't you just use the dynamic_crate.sqf from WAI, make a whatever.sqf with an array:

    This is an example from my WAI/config.sqf:

     

    if (isServer) then {

     

            crate_weapons_launchers     = [["M136","M136"],["Javelin","Javelin"],["Stinger","Stinger"],["RPG7V","PG7V"],["Strela","Strela"],["Igla","Igla"],["MetisLauncher","AT13"],["BAF_NLAW_Launcher","NLAW"],["RPG18","RPG18"],["SMAW","SMAW_HEAA"]];
            crate_weapons_twsweaps1     = ["FHQ_MSR_TWS_DESERT","FHQ_MSR_TWS_SD_DESERT","FHQ_RSASS_TWS_SD_TAN","FHQ_RSASS_TWS_TAN","FHQ_XM2010_TWS_SD_DESERT","m107_TWS_EP1","BAF_AS50_TWS","PMC_AS50_TWS","M110_TWS_EP1","BAF_L85A2_RIS_CWS","M249_TWS_EP1","SCAR_L_STD_EGLM_TWS","SCAR_H_STD_TWS_SD","m8_tws_sd","m8_tws"];
          

            crate_items_lowvalgems      = [["ItemObsidian",10],["ItemCitrine",10],["ItemGoldBar10oz",5],["ItemAmethyst",2]];
            crate_items_midvalgems      = [["ItemBriefcase100oz",5],["ItemAmethyst",10],["ItemTopaz",10],["ItemSapphire",2]];
            crate_items_hivalgems       = ["ItemVault",["ItemRuby",5],["ItemEmerald",5],["ItemSapphire",10],["ItemTopaz",10]];

    };

    then call the array from where you spawn the box?

    This is an example from my WAI/static/default.sqf

     

    if (isServer) then {

    _crate76 = createVehicle ["GuerillaCacheBox",[17212.5,17841.7,0.001],[],0,"CAN_COLLIDE"];
    _crate76 setVariable ["ObjectID","1",true];
    _crate76 setVariable ["permaLoot",true];

    [_crate76,[8,crate_weapons_launchers],0,[20,crate_items_hivalgems],0] call dynamic_crate;

    _crate75 = createVehicle ["GuerillaCacheBox",[16824.9,18029.1,0.260857],[],0,"CAN_COLLIDE"];
    _crate75 setVariable ["ObjectID","1",true];
    _crate75 setVariable ["permaLoot",true];

    [_crate75,[4,crate_weapons_launchers],0,[8,crate_items_midvalgems],0] call dynamic_crate;

    };

     

    Then obviously call them from the server_functions?

    I was going to mess around with this a little later after I fix another thing that's bugging the hell out of me so I'll let you know the results.

  6. I got it working. It was an issue with the vechicle flip that I forgot I had installed prior to installing the plot management. I am having 2 problems now though. One: I get a scroll option for plot maintencene, checking boundaries and so on. I cant however see anything that would let me "manage" the plot. It says theres nothing within the area so I attempted to build a wall and it tells me that there is no plot pole? I am spawning in the large box from the Infistar AH menu. Two: Like I said I am spawning these things in from the admin panel but I just noticed that when I use a plot pole it doesnt remove it from my inventory? Is this because I am admin? I havent had anyone that could test it for me thats not an admin so I have no idea if this is for everyone or just admin.

    Go back over your plot management install and management forums, pay much attention to the part about inventory vs intentory. Im guessing that is probably your issue

  7. I think a quick and easy solution may just be to remove/comment out:

    	// remove all magazines
    	_magazines = _vehicle magazinesTurret _turret;
    	{
    		_vehicle removeMagazineTurret [_x, _turret];
    	} forEach _magazines;
    

    from service_point_rearm.sqf

    I haven't had a lot of time to test this yet, but it seems to work.

    This will allow people to have more ammo than what the vehicle allows though; mor

     

    It does work, it's not perfect but it works. You can load up to 6 mags but  it's 1,000,000 coins to reload 1 mag on my server so if they want to spend 6 mil that's fine. I can live with that. Thanks

     

    UPDATE:

    After a little more testing, I have gotten it working perfectly.

    You only need to comment out or remove this line:   _magazines = _vehicle magazinesTurret _turret; in service_point_rearm.sqf right under: // remove all magazines (for the bigger noobs than me, make it look like below)

     

    // remove all magazines

    //_magazines = _vehicle magazinesTurret _turret;

        {

            _vehicle removeMagazineTurret [_x, _turret];

        } forEach _magazines;

     

    Now can rearm any weapon with however many magazines you specify in the: _rearm_magazineCount = 1; line in service_point.sqf

    This will not allow you to reload any more magazines than what is specified in the magazine count as well. Which is friggin awesome! You can click rearm a 2nd time and it will take your coins but it not add any more ammo to the vehicle :)  Unless of course the vehicles magazine is not full.

     

    Enjoy! And thanks Outlander too!

     

    AGAIN, in case anyone missed it,  This will allow you to reload any vehicles ammo and it does not take away from the other magaizes on the vehicle. IE: Relaod hydras on your heli and still keep your flares!!!, Reload bombs on your jet and still have a cannon!!<-- Haven't actually tested jet yet but see no reason why it would be any different.

     

     

  8.  

    Your Issue is a Comma. Change this:

     

    _inventory = [
    			getWeaponCargo _object,
    			getMagazineCargo _object,
    			getBackpackCargo _object
    			/*ZSC*/
    			, _object getVariable["bankMoney",0]
    			/*ZSC*/
    		];
    

    To this:

     

    _inventory = [
    			getWeaponCargo _object,
    			getMagazineCargo _object,
    			getBackpackCargo _object,
    			/*ZSC*/
    			, _object getVariable["bankMoney",0]
    			/*ZSC*/
    		];
    

    It already has the comma - , _object getVariable["bankMoney",0]

    I had this issue at first too and it was because I did not see that comma the first time. The way his is is correct, it's something else causing it. I don't know what though. Mine is exactly like his and works fine. When it was like this:

    _inventory = [

                getWeaponCargo _object,

                getMagazineCargo _object,

                getBackpackCargo _object

                /*ZSC*/

                 _object getVariable["bankMoney",0]

                /*ZSC*/

            ];

     

     The inventories got wiped, when it was like this:

     

    _inventory = [

                getWeaponCargo _object,

                getMagazineCargo _object,

                getBackpackCargo _object,

                /*ZSC*/

                , _object getVariable["bankMoney",0]

                /*ZSC*/

            ];

    It would not even boot.

     

    Once I noticed the comma and changed it to:

     

    _inventory = [

                getWeaponCargo _object,

                getMagazineCargo _object,

                getBackpackCargo _object

                /*ZSC*/

                , _object getVariable["bankMoney",0]

                /*ZSC*/

            ];

    Everything worked perfectly.

  9. Im new to this but where do i find the compiler.sqf and the variable.sqf and those files at?

    Those files are already on your PC. Just go to your steam directory & find @DayZ_Epoch\addons. In that folder you'll see dayz_code.pbo. You'll need pbo manager or the other one (can't remeber what called) to un-zip the dayz_code.pbo. Inside dayz_code.pbo will be variables.sqf & compiles.sqf along with a bunch of others you'll need eventually. Variables & compiles are both in the init folder.  I'd recommend leaving an un-pbo'd copy of the dayz_code.pbo somewhere on your PC so you can get more files out of it later for other mods when you need to.

  10. Well I didn't forget any step, I'm trying to figure out how to do it. It's always been one of my original questions. The directions say that once you move these files to your mission folder, be sure to change the file path.... that's great, where do I go to do that?

    The way you change is like so: You would copy and move the player_build.sqf into your custom folder in the root directory of your mission PBO then make the necessary edits.  Once that is done, look in your compiles.sqf and find the line that has player_build in it. like so: (I'm at work and do not have  a compiles.sqf so it may not be exactly like this. Important thing is just look for player_build.sqf)

    player_build = compile preprocessFileLineNumbers "z\server\DayZ_Code\other_directory\blah_blah\player_build.sqf";

     

    Change it to the following in compiles.sqf: player_build = compile preprocessFileLineNumbers "custom\player_build.sqf"

     

    Got it?

     

    Also weezul if your still having the issue with wiping safes, answer me this. Do you use Zupa's coins 3.0? I had the same issue because Zupa does not explain anything about installing this if using coins. There is one edit that goes into the server_updateObject.sqf that is in the same spot as plot management..

     

    In coins, it says change this:

            _inventory = [

                getWeaponCargo _object,

                getMagazineCargo _object,

                getBackpackCargo _object

            ];

     

    To this: 

            _inventory = [

                getWeaponCargo _object,

                getMagazineCargo _object,

                getBackpackCargo _object

                /*ZSC*/

                , _object getVariable["bankMoney",0]

                /*ZSC*/       

            ];

     

    Then in the setup for plot management, it says change this:

    _inventory = [

    getWeaponCargo _object,

    getMagazineCargo _object,

    getBackpackCargo _object

    ];

     

    To this:

    if (typeOf (_object) == "Plastic_Pole_EP1_DZ") then{

    _inventory = _object getVariable ["plotfriends", []]; //We're replacing the inventory with UIDs for this item

    } else {

    _inventory = [

    getWeaponCargo _object,

    getMagazineCargo _object,

    getBackpackCargo _object

    ];

    };

     

    Doesn't say where to put the coins code, not a big deal I figured it out however I did not notice the comma in front of , _object getVariable["bankMoney",0] and forgot to add it in when I edited it for plot management and, that comma was causing my safes to get wiped. I should say the lack of that comma..

  11. Hi all, little help please, after adding this system it all shows fine in trader menus but all items are insufficient stock?

     

     any ideas?

     

    Thanks in advance.

     

    Getting the below message in my console, animation goes through the motions but then messages insufficient stock

     

    EPOCH SERVERTRADE: Player: Charles Bronson (000000) bought a BAF_IED_V4 in/at Unknown Trader City for 2x ItemBriefcase100oz

    Is there no fix for this yet? Zupa said to increase stock in database but I thought this did not use the database??? It seems to only be vehicles I am having the issue with.

     

    Update: Seems the config traders was set to false not true so I am no longer getting insufficient stock. However, when I purchase a vehcile, it says you have purchased such and such, key added to toolbelt and the red arrow appears but no vehicle ever spawns. Any suggestions?

  12. Hi everyone,

    I've got a problem with the door management. I don't use Plot 4 Life but I've added the additional lines to the player_upgrade.sqf so that the builder always will be added to the manage door list by default. This entry is also been saved to the database in the inventory but after restart the door says: You do not have the rights to manage. It is possible to use eye scan but not to manage the door anymore. Does anyone know how that could be fixed?

    Best regards,

    GudrunGisela

    I'm having a similar issue. Everything works great untill the server is restarted. Can eye scan and manage after door is built and lock is added but when the server restarts, the eye scan fails and manage door says you don't have rights. Not using P4L or Plot Manage if that makes a difference. Can not get manage plot to work, server sticks on wait for host. Tried P4L as well and could not get to work either.

    Did all the "fixes" previously posted for non P4L users with no change. Can manage and eye scan right after door built but once the server reboots, I get the menu, but as said eye scan fails and no rights to manage. Would really like to get this working properly.

  13. Hello zupa.

     

    with this gold coin currency added to axecop's script, it's definitely easy for my players to go around and wreck shop without worrying about running out of ammo.

     

    i have come across a problem though.

     

    let's take for instance the Lynx Wildcat heli.

     

    rearm cvrpg = flares gone

    rearm he rounds = cvrpg AND flared gone

     

    i though this was due to the amount of magazines it allows you to rearm (default 3), so i changed it to one magazine per 20k coins, and it still bugs in the same way.

     

    any ideas guys?

    On the original script from axecop before single currency was released, this problem existed also but someone made a fix for it. I have gone back to the original script that requires gold bars for now untill there is a fix for this issue. I have no clue what to look for to fix so hopefully someone with more knowledge can produce a fix.

  14. Hi,

    How can i disable hero and special missions?

    Or can i change the humanity loss to gain or something?

     

    Thanks in advance,

    Caliber

    To set the amount of humanity, open your config.sqf for wai and find this:

            ai_kills_gain                = true;            // add kill to bandit/human kill score

            ai_humanity_gain            = true;            // gain humanity for killing AI

            ai_add_humanity                = 50;            // amount of humanity gained for killing a bandit AI

            ai_remove_humanity            = 150;            // amount of humanity lost for killing a hero AI

            ai_special_humanity            = 150;            // amount of humanity gain or loss for killing a special AI dependant on player alignment

    Not sure if you can use negative numbers (ai_remove_humanity            = -150;) here or not, you would just have to try and see.

     

    The special mission are disabled by default and I'd imagine you disable the other missions the same way, by commenting them out.

     

    Make this:

            wai_bandit_missions            = [

                                            ["armed_vehicle",12],

                                            ["black_hawk_crash",14],

                                            ["captured_mv22",6],

                                            ["broken_down_ural",14],

                                            ["hero_base",6],

                                            ["ikea_convoy",18],

                                            ["medi_camp",6],

                                            ["presidents_mansion",6],

                                            ["sniper_extraction",8],

                                            ["weapon_cache",10]

                                        ];

     

    Like this:

           

    /*

    wai_bandit_missions            = [

                                            ["armed_vehicle",12],

                                            ["black_hawk_crash",14],

                                            ["captured_mv22",6],

                                            ["broken_down_ural",14],

                                            ["hero_base",6],

                                            ["ikea_convoy",18],

                                            ["medi_camp",6],

                                            ["presidents_mansion",6],

                                            ["sniper_extraction",8],

                                            ["weapon_cache",10]

                                        ];        

    */

    Or like this:

            wai_bandit_missions            = [

    /*

                                            ["armed_vehicle",12],

                                            ["black_hawk_crash",14],

                                            ["captured_mv22",6],

                                            ["broken_down_ural",14],

                                            ["hero_base",6],

                                            ["ikea_convoy",18],

                                            ["medi_camp",6],

                                            ["presidents_mansion",6],

                                            ["sniper_extraction",8],

                                            ["weapon_cache",10]

    */

                                        ];

    I also remember someone posting a few pages back that you can move all the hero missions into the bandit folder or something like that.

  15. Thanks for the answer!

    I have not tested it but I believe this line:

    diag_log format ["WAI: [Mission:[Hero] Bandit Base]: Starting... %1",_position];

    is only used in the console/rpt.

     

    I experimented with changing this line though:

    from

    _mission = [_position,"Hard","Bandit Base","MainHero",true] call mission_init;

    to

    _mission = [_position,"Hard","MY CUSTOM NAME","MainHero",true] call mission_init;

    for hero missions only.

     

    This resulted in no hero missions spawning, only the un-edited banditmissions.

     

    I really don't get it. Please help!

    On my edited ikea convoy mission, I have it here: _mission = [_position,"Hard","Stolen Ikea truck","MainBandit",true] call mission_init;

    Also, I have it here: diag_log format ["WAI: [Mission:[bandit] Stolen Ikea truck]: Ended at %1",_position]; <--Don't know if it needs to be here or not but it is and "Stolen Ikea Truck" is what it says on the map.

  16. Hi I am running wicked ai 2.1.4 on my napf server and I really like it! The difficulty is awesome and there is alot of cool features!

    I was wondering how to change the text on the map marker? I have looked through many of the files but since i am a rookie at this I have not managed to find a solution.

    Regards Monegaskeren

    I believe it's this line here: diag_log format ["WAI: [Mission:[Hero] Bandit Base]: Starting... %1",_position];

     

    Or in here _mission = [_position,"Hard","Bandit Base","MainHero",true] call mission_init;

×
×
  • Create New...