JasonTM Posted January 16, 2018 Report Share Posted January 16, 2018 This is a reworked and updated version of JAEM originally from @OtterNas3 This version is compatible with DayZ Epoch 1.0.7. A complete set of install instructions is provided on my github repository Download Here Let me know if you have trouble understanding them or if I made a mistake. New Features ZSC support - you can choose between Epoch currency or ZSC to pay for your evac chopper. Deploy Anything - you can use Mudzereli's right-click actions to call the evac chopper instead of using the built in self-action loop. Plot pole and plot friends restriction - to prevent players from placing evac helipads in obnoxious places, they have to build them on their own plots or their friends plots. I have placed all of the config variables in one place in varables.sqf. The variables all have explanatory comments. Adjust them to your preferred settings: // Evac Chopper Config Variables evac_chopperPrice = 1; // This is the price players pay in full briefcases to set up an evac chopper (between 1-12 briefcases). Players must have the briefcases in their inventory. evac_chopperUseZSC = false; // If you have ZSC installed you can set this to true and have players pay the amount below to set up an evac chopper. evac_chopperPriceZSC = 100000; // Price for evac chopper if you have ZSC Installed and evac_chopperUseZSC set to true. evac_chopperMinDistance = 500; // Minimum distance for player to call evac chopper. Do not set this lower than 500. evac_chopperZoneMarker = 0; // Evac zone marker type (0 = Landingpad | 1 = Smoke). evac_chopperNeedRadio = 0; // 1 - Require player to have a radio in gear to call evac chopper | 0 - Doesn't require radio to call evac chopper. evac_chopperUseClickActions = false; // If you have Mudzereli's Deploy Anything installed and are going to use click actions to call the evac chopper, set this to true (disables call chopper self-action loop). Functionality Instructions if you have any other mods which save classname "HeliHRescue" to the database, be aware that this particular classname is used along with ownerID to make this mod work. If you already have an instance of HeliHRescue saved to the database with your playerUID, then you will get a message stating that you cannot create another when trying to set an evac chopper. To create an evac chopper you need a keyed helicopter, a plot pole, and the money to make the purchase. You have to have the key in your inventory to set and clear the evac chopper field. Walk up to the helicopter and you will get blue self actions for setting and clearing the evac chopper field. You do not have to have the key on you to call the evac chopper. There is a flight status monitor that appears in the same place as the debug monitor, so you will want to have the debug toggled off to view it. If you use Mudzereli's right click actions, make sure to set variable evac_chopperUseClickActions to true to disable the built in self action loop. If your helicopter is destroyed simply place a new one on the rescue helipad. The call evac chopper function finds the nearest heli (within 10 meters) of your rescue helipad. It does not return your money when you disable the evac chopper. Known Issues There is only one known issue at this time. If the player is killed while the evac chopper is in route, the helicopter will not return to base. The pilot lands at the evac zone, gets out of the heli and just stands there. The helicopter remains locked. The way the code is written, it looks like it should work, but everything I have tried thus hasn't fixed it. I might try using some diagnostic logs to try to find where the breakdown is later. As long as you don't die before it gets there, it's smooth sailing. Enjoy! OtterNas3's original release topic Hooty, Kimarik, Cubitron and 7 others 7 3 Link to comment Share on other sites More sharing options...
Cubitron Posted January 16, 2018 Report Share Posted January 16, 2018 Nice one, works but i can set the helipad without money after placement i have -100000 coins Link to comment Share on other sites More sharing options...
JasonTM Posted January 16, 2018 Author Report Share Posted January 16, 2018 6 hours ago, Cubitron said: Nice one, works but i can set the helipad without money after placement i have -100000 coins Thank you for testing. The problem is that the exitWith clause was nested in an if - then scope so it did not exit the script, just the original scope. The fix is to find this line in SetEvacChopper.sqf format["Making an Evac-Chopper costs %1 Coins", evac_chopperPriceZSC] call dayz_rollingMessages; and place this below it breakOut "exit"; I have updated this in github. Thanks again for the testing. Hooty and Cubitron 2 Link to comment Share on other sites More sharing options...
_Lance_ Posted January 18, 2018 Report Share Posted January 18, 2018 Tested/Working/awesome - so ballerscript - I saw this by coincidence when checking for wai updates on your github - thank you so much man, this is one of the coolest community mods. theduke 1 Link to comment Share on other sites More sharing options...
Cyrus Posted January 18, 2018 Report Share Posted January 18, 2018 I have installed the mob, line for line, checked against your files supplied with the download, and rechecked 2 more times. Everything is exactly the same as yours. But now i cannot access any helicopters. Edit: I can access vehicles but not traders either Link to comment Share on other sites More sharing options...
kingpapawawa Posted January 18, 2018 Report Share Posted January 18, 2018 5 hours ago, Cyrus said: I have installed the mob, line for line, checked against your files supplied with the download, and rechecked 2 more times. Everything is exactly the same as yours. But now i cannot access any helicopters. Edit: I can access vehicles but not traders either you have an error in selfactions check your client side rpt. Link to comment Share on other sites More sharing options...
kingpapawawa Posted January 19, 2018 Report Share Posted January 19, 2018 Ive tried all the tricks I know to make it so AI do not attack the heli and tried to prevent damage but cant seem to make it immune. Any thoughts? Link to comment Share on other sites More sharing options...
JasonTM Posted January 19, 2018 Author Report Share Posted January 19, 2018 14 minutes ago, kingpapawawa said: Ive tried all the tricks I know to make it so AI do not attack the heli and tried to prevent damage but cant seem to make it immune. Any thoughts? You might try to change evacChopperGroup = createGroup WEST; To evacChopperGroup = createGroup EAST; The ai won't shoot at the heli if the pilot is on the same side. Link to comment Share on other sites More sharing options...
kingpapawawa Posted January 19, 2018 Report Share Posted January 19, 2018 I tried civilian and east and still got blown up. evacChopperPilot setCaptive true; <-- works, landed in a mission with 4 igla pods and an a10. Using ClickActions, you can call evac multiple times, 1st time pilot gets in chopper and comes to evac (he landed at a HeliH about 100m from where I called from) Second Click caused a pilot to spawn and run toward evac. Heli Pilot did not get out of chopper. Have not looked into that yet and calling it a night! Link to comment Share on other sites More sharing options...
JasonTM Posted January 19, 2018 Author Report Share Posted January 19, 2018 19 hours ago, kingpapawawa said: I tried civilian and east and still got blown up. evacChopperPilot setCaptive true; <-- works, landed in a mission with 4 igla pods and an a10. Using ClickActions, you can call evac multiple times, 1st time pilot gets in chopper and comes to evac (he landed at a HeliH about 100m from where I called from) Second Click caused a pilot to spawn and run toward evac. Heli Pilot did not get out of chopper. Have not looked into that yet and calling it a night! Thanks for reporting this problem. Here is the solution I came up with. Change your click actions entry to this ["ItemGPS","Call Evac Chopper","if(!evac_chopperInProgress) then {execVM 'scripts\JAEM\callEvacChopper.sqf';} else {'You have already called an Evac Chopper' call dayz_rollingmessages;};","true"] Open your variables.sqf and add this line with your other evac chopper variables evac_chopperInProgress = false; I updated my github with the fix. Download a fresh copy and replace your CallEvacChopper.sqf with a new one from the download. Link to comment Share on other sites More sharing options...
CrDraggin Posted January 20, 2018 Report Share Posted January 20, 2018 Thanks Jason! This has been extremely missed in my community. Much appreciated and will start testing and deployment this week. Link to comment Share on other sites More sharing options...
Kimarik Posted January 20, 2018 Report Share Posted January 20, 2018 Hi Jason. I have installed the script like instructions. Now i have the problem if someone is buying a vehicle, the vehicle don´t spawn at the Trader. When i uninstall the script the vehicle will spawn. RPT´s (Server and Player) has no errors. What did i do wrong. Sry for my bad english Link to comment Share on other sites More sharing options...
JasonTM Posted January 21, 2018 Author Report Share Posted January 21, 2018 19 hours ago, Kimarik said: Hi Jason. I have installed the script like instructions. Now i have the problem if someone is buing a vehicle, the vehicle don´t spawn. If i uninstall the script the vehicle will spawn. RPT´s (Server and Player) has no errors. What did i do wrong. Sry for my bad english You must have made a mistake in the fn_selfactions.sqf part. Post that file in a pastebin. What other mods do you have installed which modify that file? Link to comment Share on other sites More sharing options...
Kimarik Posted January 21, 2018 Report Share Posted January 21, 2018 This is the entry of my fn_selfaction. Spoiler // Allow Owner to lock and unlock vehicle if (_player_lockUnlock_crtl) then { _totalKeys = call epoch_tempKeys; _temp_keys = _totalKeys select 0; _temp_keys_names = _totalKeys select 1; _hasKey = _characterID in _temp_keys; if (s_player_lockUnlock_crtl < 0) then { _oldOwner = (_characterID == _uid); if (_isLocked) then { if (_hasKey || {_oldOwner}) then { _temp_key_name = (_temp_keys_names select (_temp_keys find _characterID)); _unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[_cursorTarget,_temp_key_name], 2, true, true]; s_player_lockunlock set [count s_player_lockunlock,_unlock]; s_player_lockUnlock_crtl = 1; } else { if (_hasHotwireKit) then { _unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_HOTWIRE",_text], "\z\addons\dayz_code\actions\hotwire_veh.sqf",_cursorTarget, 2, true, true]; } else { _unlock = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_VEHLOCKED"], "",_cursorTarget, 2, false, true]; }; s_player_lockunlock set [count s_player_lockunlock,_unlock]; s_player_lockUnlock_crtl = 1; }; } else { if (_hasKey || _oldOwner) then { _lock = player addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_text], "\z\addons\dayz_code\actions\lock_veh.sqf",_cursorTarget, 1, true, true]; s_player_lockunlock set [count s_player_lockunlock,_lock]; s_player_lockUnlock_crtl = 1; }; }; }; if (s_player_copyToKey < 0) then { if ((_hasKey && {"ItemKeyKit" in weapons player} && {(count _temp_keys) > 1} && {!_isLocked}) || {_cursorTarget getVariable ["hotwired",false]}) then { s_player_copyToKey = player addAction ["<t color=""#0096FF"">Change vehicle key</t>","scripts\vkc\vehicleKeyChanger.sqf",[_cursorTarget,_characterID,if (_cursorTarget getVariable ["hotwired",false]) then {"claim"} else {"change"}],5,false,true]; }; }; } else { {player removeAction _x} count s_player_lockunlock;s_player_lockunlock = []; s_player_lockUnlock_crtl = -1; player removeAction s_player_copyToKey; s_player_copyToKey = -1; }; maybe i did the merg wrong. Can you help me please? Link to comment Share on other sites More sharing options...
JasonTM Posted January 21, 2018 Author Report Share Posted January 21, 2018 The evac chopper entry is not in there. Look at step 7 in the instructions. Link to comment Share on other sites More sharing options...
Kimarik Posted January 21, 2018 Report Share Posted January 21, 2018 Spoiler // Allow Owner to lock and unlock vehicle if (_player_lockUnlock_crtl) then { _totalKeys = call epoch_tempKeys; _temp_keys = _totalKeys select 0; _temp_keys_names = _totalKeys select 1; _hasKey = _characterID in _temp_keys; if (s_player_lockUnlock_crtl < 0) then { _oldOwner = (_characterID == _uid); if (_isLocked) then { if (_hasKey || {_oldOwner}) then { _temp_key_name = (_temp_keys_names select (_temp_keys find _characterID)); _unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[_cursorTarget,_temp_key_name], 2, true, true]; s_player_lockunlock set [count s_player_lockunlock,_unlock]; s_player_lockUnlock_crtl = 1; } else { if (_hasHotwireKit) then { _unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_HOTWIRE",_text], "\z\addons\dayz_code\actions\hotwire_veh.sqf",_cursorTarget, 2, true, true]; } else { _unlock = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_VEHLOCKED"], "",_cursorTarget, 2, false, true]; }; s_player_lockunlock set [count s_player_lockunlock,_unlock]; s_player_lockUnlock_crtl = 1; }; } else { if (_hasKey || _oldOwner) then { _lock = player addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_text], "\z\addons\dayz_code\actions\lock_veh.sqf",_cursorTarget, 1, true, true]; s_player_lockunlock set [count s_player_lockunlock,_lock]; s_player_lockUnlock_crtl = 1; }; }; //Evac Chopper if (s_player_evacChopper_ctrl < 0) then { private ["_setEvac","_clearEvac"]; if (_hasKey || _oldOwner) then { if ((_cursorTarget isKindOf "Helicopter") && (!playerHasEvacField)) then { _setEvac = player addAction [("<t color=""#0000FF"">" + ("Set Evac-Chopper") + "</t>"),"scripts\JAEM\SetEvacChopper.sqf",_cursorTarget,3,false,false]; s_player_evacChopper set [count s_player_evacChopper,_setEvac]; s_player_evacChopper_ctrl = 1; }; if ((_cursorTarget isKindOf "Helicopter") && playerHasEvacField && (player distance playersEvacField < 10)) then { _clearEvac = player addAction [("<t color=""#0000FF"">" + ("Clear Evac-Chopper") + "</t>"),"scripts\JAEM\ClearEvacChopper.sqf",_cursorTarget,4,false,false]; s_player_evacChopper set [count s_player_evacChopper,_clearEvac]; s_player_evacChopper_ctrl = 1; }; }; }; }; if (s_player_copyToKey < 0) then { if ((_hasKey && {"ItemKeyKit" in weapons player} && {(count _temp_keys) > 1} && {!_isLocked}) || {_cursorTarget getVariable ["hotwired",false]}) then { s_player_copyToKey = player addAction ["<t color=""#0096FF"">Change vehicle key</t>","scripts\vkc\vehicleKeyChanger.sqf",[_cursorTarget,_characterID,if (_cursorTarget getVariable ["hotwired",false]) then {"claim"} else {"change"}],5,false,true]; }; }; } else { {player removeAction _x} count s_player_lockunlock;s_player_lockunlock = []; s_player_lockUnlock_crtl = -1; player removeAction s_player_copyToKey; s_player_copyToKey = -1; {player removeAction _x} count s_player_evacChopper;s_player_evacChopper = []; s_player_evacChopper_ctrl = -1; }; I will try now . OK it works. i found the mistake i did. Link to comment Share on other sites More sharing options...
server steve21k Posted January 30, 2018 Report Share Posted January 30, 2018 hi, looking for some help with HeliHRescue, after restart I cant use or clear HeliHRescue. Link to comment Share on other sites More sharing options...
JasonTM Posted January 30, 2018 Author Report Share Posted January 30, 2018 4 hours ago, server steve21k said: hi, looking for some help with HeliHRescue, after restart I cant use or clear HeliHRescue. If you were able to create the HeliHRescue and then can't clear it, then you must have missed the server side steps in server_monitor.sqf. That is where it stores and retrieves the owners of the helipads. You should also have the option to create another evac chopper. Link to comment Share on other sites More sharing options...
Cyrus Posted January 30, 2018 Report Share Posted January 30, 2018 All working perfectly now. One question.. How do i delete an instance of the Heli rescue that is linked to a players UID? Like say if i want to move my Heli Rescue pad elsewhere? I found in the object_data table my UID is linked to HeliHRescue Link to comment Share on other sites More sharing options...
JasonTM Posted January 30, 2018 Author Report Share Posted January 30, 2018 23 minutes ago, Cyrus said: All working perfectly now. One question.. How do i delete an instance of the Heli rescue that is linked to a players UID? Like say if i want to move my Heli Rescue pad elsewhere? I found in the object_data table my UID is linked to HeliHRescue If you have the key for the heli in your gear, you should get the option to clear the evac chopper when you point at it. That will remove the rescue heli pad. Link to comment Share on other sites More sharing options...
Cyrus Posted January 30, 2018 Report Share Posted January 30, 2018 1 hour ago, JasonTM said: If you have the key for the heli in your gear, you should get the option to clear the evac chopper when you point at it. That will remove the rescue heli pad. Thanks. but what if the key is lost due to death? Link to comment Share on other sites More sharing options...
server steve21k Posted January 30, 2018 Report Share Posted January 30, 2018 5 hours ago, JasonTM said: If you were able to create the HeliHRescue and then can't clear it, then you must have missed the server side steps in server_monitor.sqf. That is where it stores and retrieves the owners of the helipads. You should also have the option to create another evac chopper. I can create and clear, bu after restart I cant use HeliHRescue or clear, I have to put a new 1 down. Link to comment Share on other sites More sharing options...
JasonTM Posted January 30, 2018 Author Report Share Posted January 30, 2018 55 minutes ago, server steve21k said: I can create and clear, bu after restart I cant use HeliHRescue or clear, I have to put a new 1 down. Post your server_monitor.sqf in a pastebin. Do you have DZE_permanentPlot set to false? Link to comment Share on other sites More sharing options...
JasonTM Posted January 30, 2018 Author Report Share Posted January 30, 2018 3 hours ago, Cyrus said: Thanks. but what if the key is lost due to death? Make copies of your keys. You don't have to have the key on you to call the evac chopper. Also, I think that one of the database events unlocks vehicles when there is no key on restart. Link to comment Share on other sites More sharing options...
server steve21k Posted January 30, 2018 Report Share Posted January 30, 2018 15 minutes ago, JasonTM said: Post your server_monitor.sqf in a pastebin. Do you have DZE_permanentPlot set to false? https://pastebin.com/XNAzEvJQ DZE_permanentPlot = true; 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