Jump to content

Cramps2

Member
  • Posts

    56
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Cramps2 got a reaction from rss_adm in Player Safe Reset Mission   
    Hi folks,
     
    I on my server and really liked it.  Here's the sql event I used:
    DROP EVENT IF EXISTS resetVaults; CREATE EVENT resetVaults ON SCHEDULE EVERY 1 DAY COMMENT 'Sets safe codes to 0000 if not accessed for 14 days' DO UPDATE `object_data` SET `CharacterID` = 0 WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `CharacterID` > 0 AND `Classname` IN ('VaultStorageLocked') AND `Inventory` <> '[]' AND `Inventory` IS NOT NULL I thought it would be nice to add a mission to reveal the location of abandoned safes so players can fight over them :D
     
    This script does that, just add abandonedvaults.sqf (code below) to your server pbo (dayz_server/modules).
    // Abandoned player safe mission by Cramps (zfclan.org/forum) // Needs an SQL event set up to turn abandoned vault codes to 0000 private ["_rndvault","_curvaultcode","_curvault","_vaultarray","_numvaults","_allvaults","_spawnChance", "_spawnMarker", "_spawnRadius", "_markerRadius", "_item", "_debug", "_start_time", "_loot", "_loot_amount", "_loot_box", "_wait_time", "_spawnRoll", "_position", "_event_marker"]; // First chack if there is a vault available, no point running if not diag_log ("Checking vaults..."); _allvaults = (allmissionobjects "VaultStorageLocked"); _numvaults = (count _allvaults); _vaultarray = []; for "_i" from 0 to _numvaults do { _curvault = _allvaults select _i; _curvaultcode = _curvault getVariable "CharacterID"; if (_curvaultcode == "0000" ) then { _vaultarray = _vaultarray + [_curvault]; }; }; _numvaults = (count _vaultarray); diag_log ("Total open vaults on server: " + str(_numvaults)); // Exit if no safes if (_numvaults == 0) exitWith {}; _rndvault = _vaultarray select (floor (random (count _vaultarray))); _position = getPos _rndvault; diag_log ("Location of randomly picked 0000 vault = " + str(_position)); // Main epoch mission stuff _spawnChance = 0.20; // Percentage chance of event happening _markerRadius = 150; // Radius the loot can spawn and used for the marker _wait_time = 900; _start_time = time; _debug = false; // Ignores the random chance and runs every time. if (isNil "EPOCH_EVENT_RUNNING") then { EPOCH_EVENT_RUNNING = false; }; // Check for another event running if (EPOCH_EVENT_RUNNING) exitWith { diag_log("Event already running"); }; // Random chance of event happening _spawnRoll = random 1; if (_spawnRoll > _spawnChance and !_debug) exitWith {}; // Draw markers & tell players _event_marker = createMarker [ format ["loot_event_marker_%1", _start_time], _position]; _event_marker setMarkerShape "ELLIPSE"; _event_marker setMarkerColor "ColorKhaki"; _event_marker setMarkerSize [(_markerRadius + 100), (_markerRadius + 100)]; _event_marker2 = createMarker [ format ["loot_event_marker_%2", _start_time], _position]; _event_marker2 setMarkerShape "ICON"; _event_marker2 setMarkerType "mil_dot"; _event_marker2 setMarkerColor "ColorBlack"; _event_marker2 setMarkerText "Abandoned Survivor Safe"; if (_debug) then { _debug_marker = createMarker [ format ["loot_event_debug_marker_%1", _start_time], _position]; _debug_marker setMarkerShape "ICON"; _debug_marker setMarkerType "mil_dot"; _debug_marker setMarkerColor "ColorBlack"; _debug_marker setMarkerAlpha 1; }; [nil,nil,"per",rTITLETEXT,"It's rumored there is a survivor safe lost with 0000 as it's code. Go find it!","PLAIN DOWN"] call RE; diag_log(format["Loot event setup, waiting for %1 seconds", _wait_time]); // Wait sleep _wait_time; // Clean up EPOCH_EVENT_RUNNING = false; deleteMarker _event_marker; deleteMarker _event_marker2; Just add it as a mission in the init.sqf the same as you would any other, here's an example:
     
    EpochEvents = [["any","any","any","any",30,"abandonedvault"],["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"],["any","any","any","any",22,"Military"],["any","any","any","any",37,"Treasure"],["any","any","any","any",7,"Supplyitems"],["any","any","any","any",52,"Construction"]];
     
    I just added  ["any","any","any","any",30,"abandonedvault"],  to the line, it gets called at half past the hour every hour.
     
    The script checks for empty vaults, if there are some and the percent chance test is passed, it will spawn a marker on the map revealing the location.
     
    Enjoy!
     
  2. Like
    Cramps2 got a reaction from Just_R in Pictures on big SIGNS / Billboards   
    Yeah I was talking about the big "AD" billboards.  I thought that was what the OP was talking about.
     
    Here's one I made to replace the sunflower man near skalisty:
     
    http://imgur.com/PozLFdc
     
    I did a bunch.  If anyone works them out, I'll post em all.
  3. Like
    Cramps2 reacted to Csus in [RELEASE] TradeFromVehicle - Version 2.0 is here!   
    So version 2.0 is finally here! Woooo :D
     
    It's a giant improvement over the last version, no more manual labour to get it working! Just plug and play.
     
    Features -
        Select to either sell weapons, sell magazines or sell all items from your vehicle.
        Select to either sell weapons, sell magazines or sell all items from your backpack.
        Combine Currency - Takes the player's money and tries to reduce the amount of items while still keep the same value.
            Example, 5 * 10oz Gold would turn into a Briefcase with 5 * 10oz gold inside.
        Safe trading, locks your vehicle during trade and the trade is cancelled if, somehow, the vehicle moves, is entered by a player or the gear is changed.
        It also cancels trading from your backpack if your backpacks gear is changed in some way.
        If a weapon or magazine cannot be sold at that trader normally, it won't be sold using this script either.
        If you don't have the right humanity to trade with a trader normally, you can't trade using this either.
       
    Things you can modify -
        You can disable or enable trading from backpack, trading from vehicle and combine currency.
        You can modify the trading speeds of both magazines and weapons.
        You can disable or enable the trading of toolbelt items. (These are classed as weapons, keys will ALWAYS be safe.)
     
     
    HOTFIX - Now compatible with Piggd's Banking System. Also shaved 7kb from the file size.
     



     
    This will ALWAYS sell weapons and magazines for the correct price, the exact selling price you have in your database.
    A newer video will be uploaded as soon as I can do it.
     
    Download the files here! Installation and setup instructions are in the download, but it's incredibly easy.
     
    -Dwarfer's Version-
    You can also find an 'unofficial' (also, probably better) version of this script here!
    This version adds compatability with both config traders and Zupa's Single Currency. It also adds a 'taxing' mechanic.
    Massive, massive thanks to Dwarfer!  People like him are the reason this community is damn good!
     
    All posts after this one are regarding the current version.
     

    https://www.youtube.com/watch?v=E5gn7-uA7UU
  4. Like
    Cramps2 reacted to RimBlock in [Release] - A Plot for life v2.5. Keep your buildables on death. Take plot ownership   
    Ladies and gentlemen.
     
    vbawol will allow it to be included as part of the standard Epoch build after I have converted it so it can be turned on or off via a variable  :D .
     
    I need to finish the debugging, add the maintenance, optionise it (turn it on or off via a config variable), testing etc and then I will push it to the DayZ Epoch build so everyone will have it as standard and can choose to turn it on or off as they prefer.
     
    There is a bit of work to do so don't hold your breath and please continue with this mod build for now.  It will also help to iron out some of the bugs before merging.
  5. Like
    Cramps2 reacted to OtterNas3 in [RELEASE] Build Snapping - Extended v1.6 (Updated 02/20/2014)   
    Hey Survivors,
     
    i started this new Thread for the Mod so it's easier for players to find it and for me to support it!
    This will also stop the confusion with the mod when you use Maca's or mine and have problems with it.
     
    I got Maca's permission to do it and ALL credits for the idea and the first coding goes to Maca!
    Thanks again Maca for this amazing idea/script!
     
    Ok here we go...
     
    This Mod adds a "Toggle Snapping" function to these Epoch Buildable objects:
    MetalFloor_DZ WoodFloor_DZ CinderWall_DZ CinderWallDoorway_DZ CinderWallDoorLocked_DZ CinderWallDoor_DZ CinderWallSmallDoorway_DZ CinderWallDoorSmallLocked_DZ CinderWallHalf_DZ CinderWallDoorSmall_DZ WoodLargeWall_DZ Land_DZE_LargeWoodDoor WoodLargeWallWin_DZ WoodLargeWallDoor_DZ Land_DZE_GarageWoodDoor Land_DZE_GarageWoodDoorLocked Land_DZE_LargeWoodDoorLocked WoodSmallWallThird_DZ WoodSmallWallDoor_DZ WoodSmallWall_DZ WoodSmallWallWin_DZ Land_DZE_WoodDoor Land_DZE_WoodDoorLocked Sandbag1_DZ MetalPanel_DZ Fence_corrugated_DZ StickFence_DZ Land_HBarrier1_DZ Land_HBarrier3_DZ Land_HBarrier5_DZ Fort_RazorWire Objects can be snapped to another object of the same type like:
    Metal_Floor_DZ <-> Metal_Floor_DZ
    Sandbag1_DZ <-> Sandbag1_DZ
     
    or any Wall combination if its the same Material like:
    WoodSmallWall_DZ <-> WoodSmallWall_DZ
    WoodSmallWall_DZ <-> WoodSmallWallWin_DZ
    CinderWallHalf_DZ <-> CinderWallHalf_DZ
    CinderWallHalf_DZ <-> CinderWallDoorway_DZ
     
    When you start building a new object you will get a "Toggle Snapping" option if the object is supported.
    Hit it to activate the snapping.
     
    Distance between the two objects has to be lower then 1.5m.
    So move your object to almost same height and next to one side, near the top or near the bottom of the object you want to snap it to.
    SNAP!
    This allows you to build a Floor or a Wall on the same height in a perfect line.
     
    It is also possible to make perfect 90° angles with it, for this you also have to bring the object almost in the desired angle to the other object and it will snap to it.
     
    So What makes this version "Extended"?
     
    Well...
    Snapping will work on more then one  Floor Snapping will work while building over Water Snapping a object on Top/Bottom of eachother Snapping with set rotation (for set Door open directions) More objects supported Code for finding snap points redone Demo Video:
    http://youtu.be/j5SXctN8WHA
     
    Download (install instructions included):
    https://www.dropbox.com/s/e1x7mcfuvy7mwyj/Snapping_v1.6.zip
     
    Installation instructions:
     
    1.
    Download and extract Snapping_v1.6.zip
     
    2.
    unpbo MPMissions\YOURMISSIONNAME.pbo
     
    3.
    Copy custom folder from the extracted Snapping_v1.6 to MPMissions\YOURMISSIONNAME\
     
    4.
    Open MPMissions\YOURMISSIONNAME\init.sqf
    Find this line:

    call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; and add this line RIGHT BELOW it:
    call compile preprocessFileLineNumbers "custom\snap_build\compiles.sqf"; so it will look like:
    call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; call compile preprocessFileLineNumbers "custom\snap_build\compiles.sqf"; 5.
    Open MPMissions\YOURMISSIONNAME\description.ext
    Add this line to the VERY BOTTOM of it! (Yeah this means AFTER the last closing bracket!)
    It has to be the VERY LAST LINE of the File!

    #include "custom\snap_build\points.hpp" 6.
    repbo MPMissions\YOURMISSIONNAME\ - upaload - reload - snap - smile!
     
     
    I hope i could clarify the !IMPORTANCE! that you copy the lines i mentioned to the VERY BOTTOM!
    Else:
    No Snap - No Smile - unneded questions
     
     
     
    Have fun with it,
    Otter
    aka Bob der Baumeister
     
     
    - If you like it - Like it - So I can count Downloads - I like that
     

    #####################################
    #                      Support my work                      #
    #                                    &                                #
    #                                Donate                           #
    #####################################

  6. Like
    Cramps2 got a reaction from brokenshadows in Trader Change Tool   
    This looks great! But now I'm worried that it'll steal my soul, put salt in my coffee and delete all my players' trousers.
     
    Thanks Sukkaed :D
  7. Like
    Cramps2 reacted to ZamboniBambino in [WIP] ZFM-FairMission System-Dynamic,Modular & Balanced (Alpha release 90% complete, Test builds frequently available) - Actively developed   
    I'm back! Time to get some bugs killed. Let's see if we can get closer to an alpha release :lol:
  8. Like
    Cramps2 got a reaction from CartoonrBOY in Player Safe Reset Mission   
    Hi folks,
     
    I on my server and really liked it.  Here's the sql event I used:
    DROP EVENT IF EXISTS resetVaults; CREATE EVENT resetVaults ON SCHEDULE EVERY 1 DAY COMMENT 'Sets safe codes to 0000 if not accessed for 14 days' DO UPDATE `object_data` SET `CharacterID` = 0 WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `CharacterID` > 0 AND `Classname` IN ('VaultStorageLocked') AND `Inventory` <> '[]' AND `Inventory` IS NOT NULL I thought it would be nice to add a mission to reveal the location of abandoned safes so players can fight over them :D
     
    This script does that, just add abandonedvaults.sqf (code below) to your server pbo (dayz_server/modules).
    // Abandoned player safe mission by Cramps (zfclan.org/forum) // Needs an SQL event set up to turn abandoned vault codes to 0000 private ["_rndvault","_curvaultcode","_curvault","_vaultarray","_numvaults","_allvaults","_spawnChance", "_spawnMarker", "_spawnRadius", "_markerRadius", "_item", "_debug", "_start_time", "_loot", "_loot_amount", "_loot_box", "_wait_time", "_spawnRoll", "_position", "_event_marker"]; // First chack if there is a vault available, no point running if not diag_log ("Checking vaults..."); _allvaults = (allmissionobjects "VaultStorageLocked"); _numvaults = (count _allvaults); _vaultarray = []; for "_i" from 0 to _numvaults do { _curvault = _allvaults select _i; _curvaultcode = _curvault getVariable "CharacterID"; if (_curvaultcode == "0000" ) then { _vaultarray = _vaultarray + [_curvault]; }; }; _numvaults = (count _vaultarray); diag_log ("Total open vaults on server: " + str(_numvaults)); // Exit if no safes if (_numvaults == 0) exitWith {}; _rndvault = _vaultarray select (floor (random (count _vaultarray))); _position = getPos _rndvault; diag_log ("Location of randomly picked 0000 vault = " + str(_position)); // Main epoch mission stuff _spawnChance = 0.20; // Percentage chance of event happening _markerRadius = 150; // Radius the loot can spawn and used for the marker _wait_time = 900; _start_time = time; _debug = false; // Ignores the random chance and runs every time. if (isNil "EPOCH_EVENT_RUNNING") then { EPOCH_EVENT_RUNNING = false; }; // Check for another event running if (EPOCH_EVENT_RUNNING) exitWith { diag_log("Event already running"); }; // Random chance of event happening _spawnRoll = random 1; if (_spawnRoll > _spawnChance and !_debug) exitWith {}; // Draw markers & tell players _event_marker = createMarker [ format ["loot_event_marker_%1", _start_time], _position]; _event_marker setMarkerShape "ELLIPSE"; _event_marker setMarkerColor "ColorKhaki"; _event_marker setMarkerSize [(_markerRadius + 100), (_markerRadius + 100)]; _event_marker2 = createMarker [ format ["loot_event_marker_%2", _start_time], _position]; _event_marker2 setMarkerShape "ICON"; _event_marker2 setMarkerType "mil_dot"; _event_marker2 setMarkerColor "ColorBlack"; _event_marker2 setMarkerText "Abandoned Survivor Safe"; if (_debug) then { _debug_marker = createMarker [ format ["loot_event_debug_marker_%1", _start_time], _position]; _debug_marker setMarkerShape "ICON"; _debug_marker setMarkerType "mil_dot"; _debug_marker setMarkerColor "ColorBlack"; _debug_marker setMarkerAlpha 1; }; [nil,nil,"per",rTITLETEXT,"It's rumored there is a survivor safe lost with 0000 as it's code. Go find it!","PLAIN DOWN"] call RE; diag_log(format["Loot event setup, waiting for %1 seconds", _wait_time]); // Wait sleep _wait_time; // Clean up EPOCH_EVENT_RUNNING = false; deleteMarker _event_marker; deleteMarker _event_marker2; Just add it as a mission in the init.sqf the same as you would any other, here's an example:
     
    EpochEvents = [["any","any","any","any",30,"abandonedvault"],["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"],["any","any","any","any",22,"Military"],["any","any","any","any",37,"Treasure"],["any","any","any","any",7,"Supplyitems"],["any","any","any","any",52,"Construction"]];
     
    I just added  ["any","any","any","any",30,"abandonedvault"],  to the line, it gets called at half past the hour every hour.
     
    The script checks for empty vaults, if there are some and the percent chance test is passed, it will spawn a marker on the map revealing the location.
     
    Enjoy!
     
  9. Like
    Cramps2 got a reaction from MGT in Player Safe Reset Mission   
    Hi folks,
     
    I on my server and really liked it.  Here's the sql event I used:
    DROP EVENT IF EXISTS resetVaults; CREATE EVENT resetVaults ON SCHEDULE EVERY 1 DAY COMMENT 'Sets safe codes to 0000 if not accessed for 14 days' DO UPDATE `object_data` SET `CharacterID` = 0 WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `CharacterID` > 0 AND `Classname` IN ('VaultStorageLocked') AND `Inventory` <> '[]' AND `Inventory` IS NOT NULL I thought it would be nice to add a mission to reveal the location of abandoned safes so players can fight over them :D
     
    This script does that, just add abandonedvaults.sqf (code below) to your server pbo (dayz_server/modules).
    // Abandoned player safe mission by Cramps (zfclan.org/forum) // Needs an SQL event set up to turn abandoned vault codes to 0000 private ["_rndvault","_curvaultcode","_curvault","_vaultarray","_numvaults","_allvaults","_spawnChance", "_spawnMarker", "_spawnRadius", "_markerRadius", "_item", "_debug", "_start_time", "_loot", "_loot_amount", "_loot_box", "_wait_time", "_spawnRoll", "_position", "_event_marker"]; // First chack if there is a vault available, no point running if not diag_log ("Checking vaults..."); _allvaults = (allmissionobjects "VaultStorageLocked"); _numvaults = (count _allvaults); _vaultarray = []; for "_i" from 0 to _numvaults do { _curvault = _allvaults select _i; _curvaultcode = _curvault getVariable "CharacterID"; if (_curvaultcode == "0000" ) then { _vaultarray = _vaultarray + [_curvault]; }; }; _numvaults = (count _vaultarray); diag_log ("Total open vaults on server: " + str(_numvaults)); // Exit if no safes if (_numvaults == 0) exitWith {}; _rndvault = _vaultarray select (floor (random (count _vaultarray))); _position = getPos _rndvault; diag_log ("Location of randomly picked 0000 vault = " + str(_position)); // Main epoch mission stuff _spawnChance = 0.20; // Percentage chance of event happening _markerRadius = 150; // Radius the loot can spawn and used for the marker _wait_time = 900; _start_time = time; _debug = false; // Ignores the random chance and runs every time. if (isNil "EPOCH_EVENT_RUNNING") then { EPOCH_EVENT_RUNNING = false; }; // Check for another event running if (EPOCH_EVENT_RUNNING) exitWith { diag_log("Event already running"); }; // Random chance of event happening _spawnRoll = random 1; if (_spawnRoll > _spawnChance and !_debug) exitWith {}; // Draw markers & tell players _event_marker = createMarker [ format ["loot_event_marker_%1", _start_time], _position]; _event_marker setMarkerShape "ELLIPSE"; _event_marker setMarkerColor "ColorKhaki"; _event_marker setMarkerSize [(_markerRadius + 100), (_markerRadius + 100)]; _event_marker2 = createMarker [ format ["loot_event_marker_%2", _start_time], _position]; _event_marker2 setMarkerShape "ICON"; _event_marker2 setMarkerType "mil_dot"; _event_marker2 setMarkerColor "ColorBlack"; _event_marker2 setMarkerText "Abandoned Survivor Safe"; if (_debug) then { _debug_marker = createMarker [ format ["loot_event_debug_marker_%1", _start_time], _position]; _debug_marker setMarkerShape "ICON"; _debug_marker setMarkerType "mil_dot"; _debug_marker setMarkerColor "ColorBlack"; _debug_marker setMarkerAlpha 1; }; [nil,nil,"per",rTITLETEXT,"It's rumored there is a survivor safe lost with 0000 as it's code. Go find it!","PLAIN DOWN"] call RE; diag_log(format["Loot event setup, waiting for %1 seconds", _wait_time]); // Wait sleep _wait_time; // Clean up EPOCH_EVENT_RUNNING = false; deleteMarker _event_marker; deleteMarker _event_marker2; Just add it as a mission in the init.sqf the same as you would any other, here's an example:
     
    EpochEvents = [["any","any","any","any",30,"abandonedvault"],["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"],["any","any","any","any",22,"Military"],["any","any","any","any",37,"Treasure"],["any","any","any","any",7,"Supplyitems"],["any","any","any","any",52,"Construction"]];
     
    I just added  ["any","any","any","any",30,"abandonedvault"],  to the line, it gets called at half past the hour every hour.
     
    The script checks for empty vaults, if there are some and the percent chance test is passed, it will spawn a marker on the map revealing the location.
     
    Enjoy!
     
  10. Like
    Cramps2 got a reaction from MatthewK in Player Safe Reset Mission   
    Hi folks,
     
    I on my server and really liked it.  Here's the sql event I used:
    DROP EVENT IF EXISTS resetVaults; CREATE EVENT resetVaults ON SCHEDULE EVERY 1 DAY COMMENT 'Sets safe codes to 0000 if not accessed for 14 days' DO UPDATE `object_data` SET `CharacterID` = 0 WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `CharacterID` > 0 AND `Classname` IN ('VaultStorageLocked') AND `Inventory` <> '[]' AND `Inventory` IS NOT NULL I thought it would be nice to add a mission to reveal the location of abandoned safes so players can fight over them :D
     
    This script does that, just add abandonedvaults.sqf (code below) to your server pbo (dayz_server/modules).
    // Abandoned player safe mission by Cramps (zfclan.org/forum) // Needs an SQL event set up to turn abandoned vault codes to 0000 private ["_rndvault","_curvaultcode","_curvault","_vaultarray","_numvaults","_allvaults","_spawnChance", "_spawnMarker", "_spawnRadius", "_markerRadius", "_item", "_debug", "_start_time", "_loot", "_loot_amount", "_loot_box", "_wait_time", "_spawnRoll", "_position", "_event_marker"]; // First chack if there is a vault available, no point running if not diag_log ("Checking vaults..."); _allvaults = (allmissionobjects "VaultStorageLocked"); _numvaults = (count _allvaults); _vaultarray = []; for "_i" from 0 to _numvaults do { _curvault = _allvaults select _i; _curvaultcode = _curvault getVariable "CharacterID"; if (_curvaultcode == "0000" ) then { _vaultarray = _vaultarray + [_curvault]; }; }; _numvaults = (count _vaultarray); diag_log ("Total open vaults on server: " + str(_numvaults)); // Exit if no safes if (_numvaults == 0) exitWith {}; _rndvault = _vaultarray select (floor (random (count _vaultarray))); _position = getPos _rndvault; diag_log ("Location of randomly picked 0000 vault = " + str(_position)); // Main epoch mission stuff _spawnChance = 0.20; // Percentage chance of event happening _markerRadius = 150; // Radius the loot can spawn and used for the marker _wait_time = 900; _start_time = time; _debug = false; // Ignores the random chance and runs every time. if (isNil "EPOCH_EVENT_RUNNING") then { EPOCH_EVENT_RUNNING = false; }; // Check for another event running if (EPOCH_EVENT_RUNNING) exitWith { diag_log("Event already running"); }; // Random chance of event happening _spawnRoll = random 1; if (_spawnRoll > _spawnChance and !_debug) exitWith {}; // Draw markers & tell players _event_marker = createMarker [ format ["loot_event_marker_%1", _start_time], _position]; _event_marker setMarkerShape "ELLIPSE"; _event_marker setMarkerColor "ColorKhaki"; _event_marker setMarkerSize [(_markerRadius + 100), (_markerRadius + 100)]; _event_marker2 = createMarker [ format ["loot_event_marker_%2", _start_time], _position]; _event_marker2 setMarkerShape "ICON"; _event_marker2 setMarkerType "mil_dot"; _event_marker2 setMarkerColor "ColorBlack"; _event_marker2 setMarkerText "Abandoned Survivor Safe"; if (_debug) then { _debug_marker = createMarker [ format ["loot_event_debug_marker_%1", _start_time], _position]; _debug_marker setMarkerShape "ICON"; _debug_marker setMarkerType "mil_dot"; _debug_marker setMarkerColor "ColorBlack"; _debug_marker setMarkerAlpha 1; }; [nil,nil,"per",rTITLETEXT,"It's rumored there is a survivor safe lost with 0000 as it's code. Go find it!","PLAIN DOWN"] call RE; diag_log(format["Loot event setup, waiting for %1 seconds", _wait_time]); // Wait sleep _wait_time; // Clean up EPOCH_EVENT_RUNNING = false; deleteMarker _event_marker; deleteMarker _event_marker2; Just add it as a mission in the init.sqf the same as you would any other, here's an example:
     
    EpochEvents = [["any","any","any","any",30,"abandonedvault"],["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"],["any","any","any","any",22,"Military"],["any","any","any","any",37,"Treasure"],["any","any","any","any",7,"Supplyitems"],["any","any","any","any",52,"Construction"]];
     
    I just added  ["any","any","any","any",30,"abandonedvault"],  to the line, it gets called at half past the hour every hour.
     
    The script checks for empty vaults, if there are some and the percent chance test is passed, it will spawn a marker on the map revealing the location.
     
    Enjoy!
     
  11. Like
    Cramps2 got a reaction from m3scope in Pictures on big SIGNS / Billboards   
    Yeah I was talking about the big "AD" billboards.  I thought that was what the OP was talking about.
     
    Here's one I made to replace the sunflower man near skalisty:
     
    http://imgur.com/PozLFdc
     
    I did a bunch.  If anyone works them out, I'll post em all.
  12. Like
    Cramps2 got a reaction from matt_d_rat in MF-Tow (a towing script for DayZ Epoch mod)   
    ok I added another check in the loop that keeps the vehicle attached just in case.  I'll post the whole tow_Attachtow.sqf
     
    EDIT: Missed a };  sorry, lost in the cut/paste...
    /** * mf-tow/tow_AttachTow.sqf * The action for attaching the tow to another vehicle. * * Created by Matt Fairbrass (matt_d_rat) * Version: 1.1.1 * MIT Licence **/ private ["_vehicle","_started","_finished","_animState","_isMedic","_abort","_vehicleNameText","_towTruckNameText","_findNearestVehicles","_findNearestVehicle","_IsNearVehicle","_towTruck","_towableVehicles","_towableVehiclesTotal","_vehicleOffsetY","_towTruckOffsetY","_offsetZ","_hasToolbox"]; if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_96") , "PLAIN DOWN"] }; DZE_ActionInProgress = true; player removeAction s_player_towing; s_player_towing = 1; // Tow Truck _towTruck = _this select 3; _towableVehicles = [_towTruck] call MF_Tow_Towable_Array; _towableVehiclesTotal = count (_towableVehicles); _towTruckNameText = [_towTruck] call MF_Tow_Get_Vehicle_Name; // Get all nearby vehicles that can be towed by the towTruck within the minimum tow distance _findNearestVehicles = nearestObjects [_towTruck, _towableVehicles, MF_Tow_Distance]; _findNearestVehicle = []; { if (alive _x && _towTruck != _x) then { _findNearestVehicle set [(count _findNearestVehicle),_x]; }; } foreach _findNearestVehicles; _IsNearVehicle = count (_findNearestVehicle); if(_IsNearVehicle > 0) then { // select the nearest one _vehicle = _findNearestVehicle select 0; _vehicleNameText = [_vehicle] call MF_Tow_Get_Vehicle_Name; _hasToolbox = "ItemToolbox" in (items player); // Check the player has a toolbox if(!_hasToolbox) exitWith { cutText ["Cannot attach tow without a toolbox.", "PLAIN DOWN"]; }; // Check if the vehicle we want to tow is locked if((_vehicle getVariable ["MF_Tow_Cannot_Tow", false])) exitWith { cutText [format["Cannot tow %1 because it is locked.", _vehicleNameText], "PLAIN DOWN"]; }; // Check that the vehicle we want to tow is not already being towed by something else. if((_vehicle getVariable ["MFTowInTow", false])) exitWith { cutText [format["Cannot tow %1 because it is already being towed by another vehicle.", _vehicleNameText], "PLAIN DOWN"]; }; // Check that the vehicle we want to tow is not already towing something else if(!MF_Tow_Multi_Towing && (_vehicle getVariable ["MFTowIsTowing", false])) exitWith { cutText [format["Cannot tow %1 because it is already towing another vehicle.", _vehicleNameText], "PLAIN DOWN"]; }; // Check if the vehicle has anyone in it if ((count (crew _vehicle)) != 0) exitWith { cutText [format["Cannot tow %1 because it has people in it.", _vehicleNameText], "PLAIN DOWN"]; }; }; _finished = false; [_towTruck] call MF_Tow_Animate_Player_Tow_Action; r_interrupt = false; _animState = animationState player; r_doLoop = true; _started = false; while {r_doLoop} do { _animState = animationState player; _isMedic = ["medic",_animState] call fnc_inString; if (_isMedic) then { _started = true; }; if (_started and !_isMedic) then { r_doLoop = false; _finished = true; }; if ((count (crew _vehicle)) != 0) then { detach player; r_doLoop = false; }; if (r_interrupt) then { detach player; r_doLoop = false; }; sleep 0.1; }; r_doLoop = false; if(!_finished) then { r_interrupt = false; if (vehicle player == player) then { [objNull, player, rSwitchMove,""] call RE; player playActionNow "stop"; }; _abort = true; }; if (_finished) then { if(((vectorUp _vehicle) select 2) > 0.5) then { if( _towableVehiclesTotal > 0 ) then { _towTruckOffsetY = 0.8; _vehicleOffsetY = 0.8; _offsetZ = 0.1; // Calculate the offset positions depending on the kind of tow truck switch(true) do { case (_towTruck isKindOf "ArmoredSUV_Base_PMC"); case (_towTruck isKindOf "SUV_Base_EP1") : { _towTruckOffsetY = 0.9; }; case (_towTruck isKindOf "UAZ_Base" && !(_vehicle isKindOf "UAZ_Base")) : { _offsetZ = 1.8; }; }; // Calculate the offset positions depending on the kind of vehicle switch(true) do { case (_vehicle isKindOf "Truck" && !(_towTruck isKindOf "Truck")) : { _vehicleOffsetY = 0.9; }; case (_vehicle isKindOf "UAZ_Base" && !(_towTruck isKindOf "UAZ_Base")) : { _offsetZ = -1.8; }; }; // Attach the vehicle to the tow truck _vehicle attachTo [ _towTruck, [ 0, (boundingBox _towTruck select 0 select 1) * _towTruckOffsetY + (boundingBox _vehicle select 0 select 1) * _vehicleOffsetY, (boundingBox _towTruck select 0 select 2) - (boundingBox _vehicle select 0 select 2) + _offsetZ ] ]; // Detach the player from the tow truck detach player; _vehicle setVariable ["MFTowInTow", true, true]; _towTruck setVariable ["MFTowIsTowing", true, true]; _towTruck setVariable ["MFTowVehicleInTow", _vehicle, true]; cutText [format["%1 has been attached to %2.", _vehicleNameText, _towTruckNameText], "PLAIN DOWN"]; }; } else { cutText [format["Failed to attach %1 to %2.", _vehicleNameText, _towTruckNameText], "PLAIN DOWN"]; }; }; } else { cutText [format["No vehicles nearby to tow. Move within %1m of a vehicle.", MF_Tow_Distance], "PLAIN DOWN"]; }; DZE_ActionInProgress = false; s_player_towing = -1;
  13. Like
    Cramps2 reacted to mysticviperx in Is there some way to clean up (delete) unused locked vehicles?   
    With the immanent release of 1.0.4 and the epoch devs doing the same with the hive.dll and other database settings, I will postpone the Tutorial until the release of 1.0.4 and i have compared their work to our own. Some things in the tutorial will be incompatible with the new hive.dll.
×
×
  • Create New...