DangerRuss Posted February 27, 2015 Report Share Posted February 27, 2015 Im trying to just use an event, forget the mission, to reset the safe codes AND lockbox codes. Ive tried this query UPDATE FROM `object_data` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `CharacterID` > 0 AND `Classname` LIKE '%vault%' OR Classname LIKE '%box%' AND `Inventory` IS NOT NULL When I use Select * FROM `object_data` to test it, it returns lock boxes that have a last updated entry from today.. any ideas? I think I fixed this by changing it like so UPDATE `object_data` SET `CharacterID` = 0 WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `CharacterID` > 0 AND `Classname` IN ('VaultStorageLocked','LockboxStorageLocked') AND `Inventory` <> '[]' AND `Inventory` IS NOT NULL Link to comment Share on other sites More sharing options...
Tech_Support Posted March 1, 2015 Report Share Posted March 1, 2015 I use these Events with this mission working really good CREATE EVENT unlockAbandonedVehicles ON SCHEDULE EVERY 1 DAY DO UPDATE `object_data` SET `CharacterID` = 0 WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY) AND `CharacterID` > 0 AND `Classname` NOT IN ('VaultStorage','LockboxStorage','VaultStorageLocked','LockboxStorageLocked','WoodShack_DZ','StorageShed_DZ','TentStorageDomed','TentStorageDomed2','TentStorage') AND `Inventory` <> '[]' AND `Inventory` IS NOT NULL ; CREATE EVENT deleteAbandonedVehicles ON SCHEDULE EVERY 1 DAY DO DELETE FROM `object_data` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `CharacterID` > 0 AND `Classname` NOT IN ('VaultStorage','LockboxStorage','VaultStorageLocked','LockboxStorageLocked','WoodShack_DZ','StorageShed_DZ','TentStorageDomed','TentStorageDomed2','TentStorage') AND `Inventory` <> '[]' AND `Inventory` IS NOT NULL ; CREATE EVENT unlockAbandonedSafes ON SCHEDULE EVERY 1 DAY DO UPDATE `object_data` SET `CharacterID` = 0 WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 30 DAY) AND `Inventory` <> '[]' AND `Inventory` IS NOT NULL ; CREATE EVENT deleteAbandonedSafes ON SCHEDULE EVERY 1 DAY DO DELETE FROM `object_data` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 28 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 30 DAY) AND `CharacterID` > 0 AND `Inventory` <> '[]' AND `Inventory` IS NOT NULL ; Link to comment Share on other sites More sharing options...
DangerRuss Posted March 1, 2015 Report Share Posted March 1, 2015 yea but what do you do for lockboxes? mine works but you dont want to set the character ID to zero for lockboxes I think it's 10000 Link to comment Share on other sites More sharing options...
Gr8 Posted March 3, 2015 Report Share Posted March 3, 2015 anybody got a working copy of this mission? Link to comment Share on other sites More sharing options...
seelenapparat Posted March 4, 2015 Report Share Posted March 4, 2015 the script in the startpost still works fine, even if t throws some errors in the server.rpt. I have it running as it is for a year now. players love this ;) Gr8 1 Link to comment Share on other sites More sharing options...
Bandit Posted March 12, 2015 Report Share Posted March 12, 2015 need to test 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"]; diag_log ("Checking vaults..."); _allvaults = (allmissionobjects "VaultStorageLocked") + (allmissionobjects "LockboxStorageLocked"); _vaultarray = []; { _curvault = _x; _curvaultcode = parseNumber (_curvault getVariable "CharacterID"); if (_curvaultcode == 0 ) then { _vaultarray = _vaultarray + [_curvault]; }; }forEach _allvaults; _numvaults = (count _vaultarray); diag_log ("Total open vaults on server: " + str(_numvaults)); if (_numvaults == 0) exitWith {}; _counter = 0; { if(_counter < 5)then{ _position = getPos _x; _markerRadius = 250; _iPosX = _position select 0; _iPosY = _position select 1; _positionOffset = Random(_markerRadius); _randomMath = Random(4); if (_randomMath < 1 ) then { _randomPosition = [_iPosX - _positionOffset,_iPosY - _positionOffset,0 ]; } else { if (_randomMath < 2 ) then { _randomPosition = [_iPosX + _positionOffset,_iPosY + _positionOffset,0 ]; } else{ if (_randomMath < 3 ) then { _randomPosition = [_iPosX - _positionOffset,_iPosY + _positionOffset,0 ]; } else { _randomPosition = [_iPosX + _positionOffset,_iPosY - _positionOffset,0 ]; }; }; }; _event_marker = createMarker [ format ["loot_event_marker_%1", _start_time], _randomPosition]; _event_marker setMarkerShape "ELLIPSE"; _event_marker setMarkerColor "Color4_FD_F"; _event_marker setMarkerSize [_markerRadius, _markerRadius]; _event_marker setMarkerText "Abandoned Safe: 0000"; /* _event_marker2 = createMarker [ format ["loot_event_marker_%2", _start_time], _position]; _event_marker2 setMarkerShape "ICON"; _event_marker2 setMarkerType "mil_dot"; _event_marker2 setMarkerColor "ColorBlack"; */ _counter = _counter + 1; }; }forEach _vaultarray; Link to comment Share on other sites More sharing options...
Petite Posted May 10, 2015 Report Share Posted May 10, 2015 Works fine for me thanks. Link to comment Share on other sites More sharing options...
SmokeyBR Posted May 26, 2015 Report Share Posted May 26, 2015 Bandit i tested your event it threw undefined variable erros but its easy fix it needs to be defined _start_time _randomPosition once i defined it worked with the exception of _event_marker setMarkerText "Abandoned Safe: 0000"; the text doesn't show on the marker and your color for the marker is misspelled or it doesn't exist its been a while but hope you can still work on it, the random location inside the marker is awesome. Link to comment Share on other sites More sharing options...
rss_adm Posted May 26, 2015 Report Share Posted May 26, 2015 Bandit i tested your event it threw undefined variable erros but its easy fix it needs to be defined _start_time _randomPosition once i defined it worked with the exception of _event_marker setMarkerText "Abandoned Safe: 0000"; the text doesn't show on the marker and your color for the marker is misspelled or it doesn't exist its been a while but hope you can still work on it, the random location inside the marker is awesome. How defined? : _start_time _randomPosition Link to comment Share on other sites More sharing options...
SmokeyBR Posted May 26, 2015 Report Share Posted May 26, 2015 _start_time = time; _ramdomPosition = true; under _randomMath = Random(4); this might not be the right way of doing it, but it works. Link to comment Share on other sites More sharing options...
Buck0 Posted May 27, 2015 Report Share Posted May 27, 2015 I dont understand why you would want this, if you ban a duper but dont catch everything they have put into the game you run the risk of having legit players find safes full of briefs Link to comment Share on other sites More sharing options...
SmokeyBR Posted May 27, 2015 Report Share Posted May 27, 2015 hey legit players having fun at the "expenses" of cheaters, why not ? ofc is not perfect a player that just started could end up having thousands of briefcases but it gives a different dynamic on "kill bots take loots" but not enough people interested in it, it seems. Link to comment Share on other sites More sharing options...
Buck0 Posted May 27, 2015 Report Share Posted May 27, 2015 yeah its a good concept, however the flood of 1000's of duped briefcases can very quickly destroy a server Link to comment Share on other sites More sharing options...
roachyuk Posted August 19, 2015 Report Share Posted August 19, 2015 Can this be run on its own or do you need DZMS\WAI\EMS for it to work thanks Link to comment Share on other sites More sharing options...
Hux Posted August 20, 2015 Report Share Posted August 20, 2015 Can this be run on its own or do you need DZMS\WAI\EMS for it to work thanks This runs as an event and has nothing to do with those mission systems. Link to comment Share on other sites More sharing options...
roachyuk Posted August 20, 2015 Report Share Posted August 20, 2015 Thanks i know that its working now thanks for the reply. Link to comment Share on other sites More sharing options...
TheCloud Posted November 14, 2016 Report Share Posted November 14, 2016 To fix the bug: Error in expression <curvault getVariable "CharacterID"; Change: for "_i" from 0 to _numvaults do { _curvault = _allvaults select _i; _curvaultcode = _curvault getVariable "CharacterID"; if (_curvaultcode == "0000" ) then { _vaultarray = _vaultarray + [_curvault]; }; }; To: { _curvaultcode = (_x getVariable ["CharacterID","0"]); if (_curvaultcode == "0000" ) then { _vaultarray = _vaultarray + [_x]; }; } forEach (allmissionobjects "VaultStorageLocked"); Link to comment Share on other sites More sharing options...
Thoron Posted February 25, 2017 Report Share Posted February 25, 2017 On 14.11.2016 at 6:37 PM, TheCloud said: To fix the bug: Error in expression <curvault getVariable "CharacterID"; Change: for "_i" from 0 to _numvaults do { _curvault = _allvaults select _i; _curvaultcode = _curvault getVariable "CharacterID"; if (_curvaultcode == "0000" ) then { _vaultarray = _vaultarray + [_curvault]; }; }; To: { _curvaultcode = (_x getVariable ["CharacterID","0"]); if (_curvaultcode == "0000" ) then { _vaultarray = _vaultarray + [_x]; }; } forEach (allmissionobjects "VaultStorageLocked"); I wanne run this event on epoch 1.0.6, but I get this error again: Quote 1:15:07 Error in expression <["CharacterID","0"]); if (_curvaultcode == "0000" ) then { _vaultarray = _vaulta> 1:15:07 Error position: <== "0000" ) then { _vaultarray = _vaulta> 1:15:07 Error Allgemeiner Fehler in Ausdruck 1:15:07 File z\addons\dayz_server\modules\abandonedvaults.sqf, line 16 Link to comment Share on other sites More sharing options...
Thoron Posted March 3, 2017 Report Share Posted March 3, 2017 On 25.2.2017 at 1:34 AM, Thoron said: I wanne run this event on epoch 1.0.6, but I get this error again: Fixed. Had to do some code changes. Link to comment Share on other sites More sharing options...
nova Posted June 12, 2017 Report Share Posted June 12, 2017 @Thoron how did you fix it? Link to comment Share on other sites More sharing options...
SKS.Goliath Posted July 17, 2017 Report Share Posted July 17, 2017 diesen script gibt es schon für 1.0.6 Link to comment Share on other sites More sharing options...
Richie Posted July 17, 2017 Report Share Posted July 17, 2017 44 minutes ago, SKS.Goliath said: diesen script gibt es schon für 1.0.6 English only please. salival 1 Link to comment Share on other sites More sharing options...
Relentless Posted July 17, 2017 Report Share Posted July 17, 2017 33 minutes ago, Richie said: English only please. He said that this script already exists for 1.0.6.1 Link to comment Share on other sites More sharing options...
Hooty Posted July 17, 2017 Report Share Posted July 17, 2017 2 hours ago, DAmNRelentless said: He said that this script already exists for 1.0.6.1 I have not seen it for 1.0.6.1 my players liked it on 1.0.5.1 kinda added a new mission the way it marks unlocked safes. Never thought about updating since I have base raiding and safe raiding now. Link to comment Share on other sites More sharing options...
kingpapawawa Posted July 18, 2017 Report Share Posted July 18, 2017 works in 1061 with no errors - if my memory is correct the error happens if there is no 0000 safe 17:55:06 "RUNNING EVENT: 0000safe on [2017,7,18,12,55]" 17:55:06 "Checking vaults..." 17:55:06 "Total open vaults on server: 17" 17:55:06 "Location of randomly picked 0000 vault = [8864.98,15135.8,0.000671387]" 17:55:06 "Loot event setup, waiting for 900 seconds" Spoiler // 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 = []; _curvault = 0; { _curvaultcode = (_x getVariable ["CharacterID","0"]); if (_curvaultcode == "0000" ) then { _vaultarray = _vaultarray + [_x]; }; } forEach (allmissionobjects "VaultStorageLocked"); _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.50; // Percentage chance of event happening _markerRadius = 150; // Radius the loot can spawn and used for the marker _wait_time = 900; _start_time = time; _debug = true; // 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 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; }; RemoteMessage = ["radio","There is a safe with 0000 as it's code. Check your map!"]; publicVariable "RemoteMessage"; 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; Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now