Jump to content

rss_adm

Member
  • Posts

    48
  • Joined

  • Last visited

Reputation Activity

  1. Like
    rss_adm reacted to f3cuk in [Release] Wicked AI 2.2.0   
    @rss_adm: See above + you don't need to set random positions like that. The spawn_group does that by default now.
     
    --

    @ATRealMaster: Please post your server or client RPT
  2. Like
    rss_adm reacted to Halvhjearne in Delete vehicles parked in safezones on restart   
    A guy on opendayz.net gave me this brilliant idea for a script, big thanks to titan!
     
    IMPORTANT:
    This can delete vehicles completely from the database!
    beware that if not set correctly you can end up deleteing vehicles un-intended, wich is mainly the reason why i made a log of vehicle type,pos,cargo and so on when it is triggered
     
    HOWEVER i can not stress this enough, backup, backup, backup ... before you use this!!!
     
    after that warning, heres what i did ...
     
    in server_monitor.sqf find this:
    // total each vehicle serverVehicleCounter set [count serverVehicleCounter,_type]; }; add the line like this:
    serverVehicleCounter set [count serverVehicleCounter,_type]; }; [_object] execVM "\z\addons\dayz_server\compile\Server_DeleteObjInsafezone.sqf"; now make a text file and call it server_deleteObjInsafezone.sqf and add this code:
    /* VEHICLE CLEANUP ZONE Script by HALV */ _obj = _this select 0; if (!isServer) exitWith {diag_log "Server_DeleteObjInsafezone.sqf - ERROR: NOT SERVER?"}; //\\\\\\\\\\\\\\\\\\\\ Setup Area ////////////////////\\ //vehicle types to Check for _delVeh = ["Air","Landvehicle","Ship","Tank"]; //Action to take when vehicle is detected in a [VEHICLE CLEANUP ZONE] //0 Delete vehicles ingame but keep in database. NOTE: This will stack vehicles in database if not cleaned propper //1 Tp vehicles outside [VEHICLE CLEANUP ZONE] ("radius" + 50 meter to 4x "radius" from VEHICLE CLEANUP ZONE pos eg: if radius is 100 vehicles are moved 150-400 meter away) //2 Tp vehicles to a position within 125m of _safespot (remember to set a position below) //3 will delete vehicles completly from database _Action = 1; //if _Action = 2 then enter the position you desire here (default is by grozovoy pass around 022010) _safespot = [2283.19,14255,0]; //how large radius to spread them in this area in meters (default 125m) _radius = 125; //damaged above this amoun, vehicle is deleted (set to 1 to only delete completely destroyed vehicles) _dam = 0.90; //if true will delete vehicles matching array below by default _delbikmot = true; //if above is true will delete these by default _defdelar = ["Bicycle","Motorcycle","CSJ_GyroC","CSJ_GyroCover","CSJ_GyroP"];//,"ATV_Base_EP1" //set to true, to unlock vehicles by default when TP'ed _unlock = true; //log text, this is what you want to look for in the logs, if you need to know something about a moved vehicle _txt = "[VEHICLE CLEANUP ZONE]"; //Update vehicles to the hive, and make sure they are not moved each restart? _updateHIVE = true; //VEHICLE CLEANUP ZONE's/areas switch choosing the map name for cleanup location purposes if(isNil "HALV_VEHICLE_CLEANUPZONES")then{ diag_log format["%1: selecting world to cleanup ...",_txt]; _WorldName = toLower format ["%1", worldName]; switch (_WorldName)do { //NAPF case "napf":{ // diag_log format["%2: Cleanup zones for napf selected! (check: %1)",_WorldName,_txt]; //logging if right worldname was selected, if uncommented HALV_VEHICLE_CLEANUPZONES = [ //position //radius //cityname/text [[8246.3184,15485.867,0], 125, "Trader City Lenzburg"], [[15506.952,13229.368,0], 125, "Trader city Emmen"], [[12399.751,5074.5273,0], 125, "Trader City Schratten"], [[10398.626,8279.4619,0], 125, "Bandit Vendor"], [[5149.9814,4864.1191,0], 125, "Hero Vendor"], [[2122.7954,7807.9878,0], 100, "West Wholesaler"], [[5379.0342,16103.187,0], 100, "North Wholesaler"], [[6772.8877,16983.27,0], 100, "Nordic Boats"], [[16839.973,5264.0566,0], 100, "Pauls Boats"], [[15128.379,16421.879,0], 100, "AWOLs Airfield"] ]; }; //chernarus case "chernarus":{ // diag_log format["%2: Cleanup zones for chernarus selected! (check: %1)",_WorldName,_txt]; //logging if right worldname was selected, if uncommented HALV_VEHICLE_CLEANUPZONES = [ //position radius cityname/text [[6325.6772,7807.7412,0], 125, "Trader City Stary"], [[4063.4226,11664.19,0], 125, "Trader City Bash"], [[11447.472,11364.504,0], 125, "Trader City Klen"], [[1606.6443,7803.5156,0], 125, "Bandit Camp"], [[12944.227,12766.889,0], 125, "Hero Camp"], [[13441.16,5429.3013,0], 100, "Wholesaler East"], [[4510.7773,10774.518,0], 100, "Aircraft Dealer"], [[7989.3354,2900.9946,0], 100, "Boat Dealer South"], [[13532.614,6355.9497,0], 100, "Boat Dealer East"], [[4361.4937,2259.9526,0], 100, "Wholesaler South"] ]; }; //tavi case "tavi":{ // diag_log format["%2: Cleanup zones for tavi selected! (check: %1)",_WorldName,_txt]; //logging if right worldname was selected, if uncommented HALV_VEHICLE_CLEANUPZONES = [ //position //radius //cityname/text [[11698.81,15210.121,0], 75, "Trader City Lyepestok"], [[15309.663,9278.4912,0], 75, "Trader City Sabina"], [[5538.7354,8762.2695,0], 75, "Trader City Bilgrad"], [[7376.6084,4296.5879,0], 75, "Trader City Branibor"], [[10948.426,654.90265,0], 75, "Bandit Vendor"], [[15587.822,16394.049,0], 75, "Hero Vendor"], [[16555.732,10159.68,0], 75, "Aircraft Dealer"], [[6815.0776,8534.1504,0], 75, "Aircraft Dealer 2"], [[4066.3528,7265.0024,0], 75, "Misc. Vendor"], [[17497.631,7159.0879,0], 75, "Misc. Vendor 2"], [[17332.115,12930.239,0], 75, "Boat Dealer"], [[10570.494,16772.477,0], 75, "Boat Dealer 2"], [[10698.463,5983.665,0], 75, "Boat Dealer 3"], [[5419.2437,9503.5479,0], 75, "Boat Dealer 4"], [[13342.758,8611.9932,0], 75, "Wholesaler"], [[9859.4209,7471.5684,0], 75, "Wholesaler"] // <-- no comma for last entry ]; }; /* //myworldname case "myworldnameinlowercase":{ // diag_log format["%2: Cleanup zones for myworldnameinlowercase selected! (check: %1)",_WorldName,_txt]; //logging if right worldname was selected, if uncommented HALV_VEHICLE_CLEANUPZONES = [ //position //radius //cityname/text [[7839.60,8414.73,381.33], 150, "my custom zone marker"], [[7839.60,8414.73,381.33], 75, "my custom location"] // <-- no comma for last entry ]; }; */ //default default{ diag_log format["%2: Cleanup zones for %1 not availible ...",_WorldName,_txt]; //logging if right worldname was selected, if uncommented HALV_VEHICLE_CLEANUPZONES = [ //position //radius //cityname/text [[0,0,0], 1, "DEBUG"] ]; }; }; }; //\\\\\\\\\\\\\\\\\\\\ End Setup Area ////////////////////\\ /////////////// dont touch anything below this line unless you know what you are doing \\\\\\\\\\\\\\\ _possiblematch = false; {if(_obj isKindOf _x)then{_possiblematch=true;};}forEach _delVeh; if(_possiblematch)then{ { _Spos = _x select 0; _Rad = _x select 1; _name = _x select 2; _radats = _Rad+50; _radx4 = _Rad+_Rad+_Rad+_Rad; if(_obj distance _Spos < _Rad)then{ _defdel = false; _typeOf = typeOf _obj; _pos = getpos _obj; _mags = getmagazinecargo _obj; _weaps = getweaponcargo _obj; _packs = getbackpackcargo _obj; _objID = _obj getVariable["ObjectID","0"]; _objUID = _obj getVariable["ObjectUID","0"]; _objname = (gettext (configFile >> 'CfgVehicles' >> _typeOf >> 'displayName')); diag_log format["%1: %2 (%3) by %4 @%5 %6 [ID:%7,UID:%8] Cargo: [%9,%10,%11]",_txt,_typeOf,_objname,_name,mapgridposition _pos,_pos,_objID,_objUID,_weaps,_mags,_packs]; if(_delbikmot)then{{if(_obj isKindOf _x)then{_defdel = true};}forEach _defdelar;}; if(_defdel)then{_Action=3;diag_log format["%2: %1 is Model to delete by default!",_typeOf,_txt];}; if(getDammage _obj > _dam)then{_Action=3;diag_log format["%2: %1 too damaged",_typeOf,_txt];}; if(_unlock and !_defdel and (locked _obj))then{_obj setVehicleLock "UNLOCKED";_obj setVariable ["R3F_LOG_disabled",false,true];diag_log format["%2: %1 Un-Locked",_typeOf,_txt];}; switch(_Action)do{ case 0:{deleteVehicle _obj;diag_log format["%2: %1 Deleted, but remains in DB (Dont forget to clean this up)",_typeOf,_txt];}; case 1:{ _newPos = [_Spos, _radats, _radx4, 10, 0, 2000, 0] call BIS_fnc_findSafePos; _obj setpos _newPos; //update to HIVE? if(_updateHIVE)then{ private["_position","_worldspace","_fuel","_key"]; _position = getPosATL _obj; _worldspace = [ round(direction _obj), _position ]; _fuel = fuel _obj; _key = format["CHILD:305:%1:%2:%3:",_objID,_worldspace,_fuel]; diag_log ("HIVE: WRITE: "+ str(_key)); _key call server_hiveWrite; }; diag_log format["%6: %5 TP from %1 %2 to %3 %4",_pos,mapgridposition _pos,_newPos,mapgridposition _newPos,_typeOf,_txt]; }; case 2:{ _newPos = [_safespot, 0, _radius, 10, 0, 2000, 0] call BIS_fnc_findSafePos; _obj setpos _newPos; //update to HIVE? if(_updateHIVE)then{ private["_position","_worldspace","_fuel","_key"]; _position = getPosATL _obj; _worldspace = [ round(direction _obj), _position ]; _fuel = fuel _obj; _key = format["CHILD:305:%1:%2:%3:",_objID,_worldspace,_fuel]; diag_log ("HIVE: WRITE: "+ str(_key)); _key call server_hiveWrite; }; diag_log format["%6: %5 TP from %1 %2 to %3 %4",_pos,mapgridposition _pos,_newPos,mapgridposition _newPos,_typeOf,_txt]; }; default{_msg = format["%2: %1",_typeOf,_txt];deleteVehicle _obj;[_objID,_objUID,_msg] call server_deleteObj;}; }; }; }forEach HALV_VEHICLE_CLEANUPZONES; }; script can do quite a few options now:
     
    Delete (not from database, will still require cleanup or it will clonk up db at some point)
    Delete (als from database)
    TP outside safezone TP to "safe" location   you can edit what to delete, areas, distance to areas
    can be set to always delete certain vehicles (like bikes/motorcycle/ATV) by default
    can be set to delete damaged vehicles by default
    can be set to unlock vehicles when moved
     
    will work out of the box on chernarus, napf and taviana
     
    i tried to comment for easy edit
     
    after your edits, put this file in the complie folder of your server pbo and restart server.
     
    all vehicles in safezones when server restarts are now only a small notice in the rpt file with info on city name, where it came from, type, current position and cargo [weapons,mags,bags].
     
     
    enjoy ;)
  3. Like
    rss_adm got a reaction from 31_D!4b10 in [RELEASE] Vehicle Key Changer - For making Masterkey - V 1.4 (Updated 06/15/2014)   
    Thank you! You helped me a lot!
  4. Like
    rss_adm reacted to TwizzCD in [Release] Enhanced Vehicle Deployment (with right click option)   
    I was also having the same issue, but figured out my problem.
     
    Change the 'false' in your EVD_common.sqf to 'true'. So it will look like this:
     
    // Do you want vehicles to be sold at traders?
    EVDSellVehicles = true; 
     
     
    Infistar deletes vehicles that do not have an ID... When you switch to true, the deployed vehicles now have an ID.
     
    Hope this helps!
     
    Twizz
  5. Like
    rss_adm reacted to Tricks in [Release] Enhanced Vehicle Deployment (with right click option)   
    It was working perfectly find until I updated InfiSTAR to 332Z. First the bike would disappear after 10 seconds but I fixed that. Now its killing the player :(
  6. Like
    rss_adm reacted to Cinjun in [RELEASE] Vehicle Key Changer - For making Masterkey - V 1.4 (Updated 06/15/2014)   
    There is no need for a fn_SelfAction, you will only get the scroll option when scrolling on the vehicle itself, it's not an action on the key. Also you have to have all required items in your inventory:
    Two keys (the key to the vehicle you're wanting to change too and the key to the vehicle your changing). A keymasters kit, if you have that enabled in the config. And the exact monetary item (e.g. ItemGoldBar10oz); this does not support the new return change feature so the exact classname it what it is looking for (unless you have it disabled in the config obviously). If these items are not in your inventory/toolbelt you will not get the scroll option on the vehicle.
     
    Also are you seeing any errors in your RPT?
  7. Like
    rss_adm reacted to TheFarix in [Release] Enhanced Vehicle Deployment (with right click option)   
    There are many deployable vehicle scripts out there; however, every single one of them that I've come across used multiple scripts for the deployment and packing of each vehicle. Thinking that there was a better way to do it, I started working to create "one set of scripts to rule them all". The goal was to reduce the overall size of the script by consolidating everything into a single deploy and packing script and make it a little easier to modify by server admins. I also took the opportunity to fix what I felt where exploits that players could abuse.
     
    Features
    Deployable mountain bike, motorcycle, and Mozzie. Easy to configure required materials for each vehicle. Right click on toolbox to deploy vehicles. Stop deployment/packing of vehicles by moving. Prevent packing of destroyed deployable vehicles. Prevent packing of locked vehicles. Allow for selling of deployable vehicles (configurable by the admin). Remove deployable vehicles from hive to prevent them from respawning on reset. (Infinite parts exploit) Materials are dropped on the ground when packing like the other remove actions (workbench, wreckage, weapons crates) instead of automatically added to the player's inventory. Remove ammo from all vehicles when deployed. (Infinite grenades exploit with Mozzie) Credits
    oOSmokyOo for on which this one was developed from. maca134 for his wonderful Right Click Options To Items script. TheVampire whose DZMS gave me plenty of ideas on how to rework this script. [VB]AWOL whose code in player_craftItem.sqf and remove.sqf I referenced for some parts of the deployment script. Requirements
    Knowledge of how to unpacking pbo's. A text editor (Notepad++ recommended) Installation
     
    Step 1: Custom variables.sqf
     
    If you do not have a custom variables.sqf, create an empty file in the custom scripts directory of your mission folder. Edit it to include the following:
    EVDVehicleArray = ["MMT_Civ","TT650_Civ","CSJ_GyroC"]; dayz_allowedObjects = dayz_allowedObjects + EVDVehicleArray; if(isServer) then { DZE_safeVehicle = DZE_safeVehicle + EVDVehicleArray; }; If you already have a custom variables.sqf, then add the above code to the bottom.
     
    Step 2: Custom compiles.sqf
     
    If you do not have a custom compiles.sqf, create an empty file the custom scripts directory of your mission folder. Edit it to include the following:
    if (!isDedicated) then { fnc_usec_selfActions = compile preprocessFileLineNumbers "SCRIPT_PATH\fn_selfActions.sqf"; player_selectSlot = compile preprocessFileLineNumbers "SCRIPT_PATH\ui_selectSlot.sqf"; }; Where "SCRIPT_PATH" is the path of you custom scripts folder from your mission folder. If you already have a custom compiles.sql, then add/modify fnc_usec_selfActions and player_selectSlot depending on the style of custom compiles.sql you are using.
     
    Step 3: Modify init.sqf
     
    Next open the mission's init.sqf and search for the following:
    call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; Below it, add:
    call compile preprocessFileLineNumbers "SCRIPT_PATH\variables.sqf"; Next, find the following:
    call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; Below it, add:
    call compile preprocessFileLineNumbers "SCRIPT_PATH\compiles.sqf"; //Compile custom functions You now have a custom variable.sqf and compiles.sqf, which will be used by other scripts and modifications.
     
    Step 4:  Custom ui_selectSlot.sqf
     
    Unpack dayz_code.pbo and copy dayz_code\compile\ui_selectSlot.sqf to your custom scripts folder. Open your copied ui_selectSlot.sqf and search for the following around line 57:
    _pos set [3,_height]; Above it add the following:
    // Add extra context menus _erc_cfgActions = (missionConfigFile >> "ExtraRc" >> _item); _erc_numActions = (count _erc_cfgActions); if (isClass _erc_cfgActions) then { for "_j" from 0 to (_erc_numActions - 1) do { _menu = _parent displayCtrl (1600 + _j + _numActions); _menu ctrlShow true; _config = (_erc_cfgActions select _j); _text = getText (_config >> "text"); _script = getText (_config >> "script"); _height = _height + (0.025 * safezoneH); uiNamespace setVariable ['uiControl', _control]; _menu ctrlSetText _text; _menu ctrlSetEventHandler ["ButtonClick",_script]; }; }; Step 5: Modify description.ext
     
    Open description.ext in your mission folder. At the very bottom of description.ext, add:
    #include "SCRIPT_PATH\extra_rc.hpp" Step 6: Create extra_rc.hpp
     
    Next, create an empty file named extra_rc.hpp in your custom scripts folder. Inside the file, add the following:
    class ExtraRc { class ItemToolbox { class BuildBike { text = "Deploy Bike"; script = "['MMT_Civ'] execVM 'SCRIPT_PATH\EVD\EVD_deploy.sqf'"; }; class BuildMotorcycle { text = "Deploy Motorcycle"; script = "['TT650_Civ'] execVM 'SCRIPT_PATH\EVD\EVD_deploy.sqf'"; }; class BuildMozzie { text = "Deploy Mozzie"; script = "['CSJ_GyroC'] execVM 'SCRIPT_PATH\EVD\EVD_deploy.sqf'"; }; }; }; If you already have Right Click Options To Items installed and have other scripts that use it, your extra_rc.hpp will look similar to this:
    class ExtraRc { class ItemBloodbag { class Use { text = "Use Bloodbag"; script = "execVM 'SCRIPT_PATH\SelfBB\SelfBB.sqf'"; }; }; class ItemToolbox { class BuildBike { text = "Deploy Bike"; script = "['MMT_Civ'] execVM 'SCRIPT_PATH\EVD\EVD_deploy.sqf'"; }; class BuildMotorcycle { text = "Deploy Motorcycle"; script = "['TT650_Civ'] execVM 'SCRIPT_PATH\EVD\EVD_deploy.sqf'"; }; class BuildMozzie { text = "Deploy Mozzie"; script = "['CSJ_GyroC'] execVM 'SCRIPT_PATH\EVD\EVD_deploy.sqf'"; }; }; }; Step 7: Custom fn_selfActions.sqf
     
    Copy dayz_code\compile\fn_selfActions.sqf to your custom scripts folder. Open your copied fn_selfActions.sqf and search for the following:
    // All Traders if (_isMan and !_isPZombie and _traderType in serverTraders) then { Above it, add the following:
    //Pack Vehicles if (_typeOfCursorTarget in EVDVehicleArray and _hasToolbox and !(locked _cursorTarget) and (damage _cursorTarget < 1)) then { if (s_player_packvehicle < 0) then { s_player_packvehicle = player addAction ["Pack Vehicle", "SCRIPT_PATH\EVD\EVD_pack.sqf",_cursorTarget, 0, false, true, "",""]; }; } else { player removeAction s_player_packvehicle; s_player_packvehicle = -1; }; Step 8: The finishing touches
     
    Download the attached file and unzip it into your custom scripts directory. Edit EVD\EVD_deploy.sqf and EVD\EVD_pack.sqf and change SCRIPT_PATH to the path of your custom scripts directory. Finally, edit EVD\EVD_common.sqf to configure the script to suit your tastes. If you add more vehicles as deplorable, you will need to add the class names to EVDVehicleArray in your custom variables.sqf, modify extra_rc.hpp to add an additional option, and add the required materials to the EVDGetMaterials function in EVD\EVD_common.sqf.
     
    Future plans
     
    A few features that did not make it into this release are the ability to save deployable vehicles to the hive, a check to make sure the vehicle is unoccupied when packed, and the option to turn on or off the able to deploy/pack a vehicle while in combat (the latter gave me a bugger of a time despite it appearing to be a simple matter).
    EVD.zip
×
×
  • Create New...