Grahame Posted April 1, 2018 Report Share Posted April 1, 2018 Sometimes you are going to be caught short in the wild; maybe you found a trader in the wilderness or just did a GTA job on a roaming AI truck and nicked their crypto. Well, if you allow ATMs and phones, here's a little bit of code to let you call the bank when you cannot find them... (1) Add the particular items that you want to allow people to call on to your loot tables and trader configs. Choices include: ItemMobilePhone_old, ItemMobilePhone_smart, ItemPortableLongRangeRadio, ItemSatellitePhone, ItemSurvivalRadio (2) For each of the items you want to use for remote calling the bank add the lines below for it to epoch_config/Configs/CfgItemInteractions.hpp: class ItemMobilePhone_old : Default { interactAction = 18; interactText = "CALL BANKER"; }; class ItemMobilePhone_smart : Default { interactAction = 18; interactText = "CALL BANKER"; }; class ItemPortableLongRangeRadio : Default { interactAction = 18; interactText = "CALL BANKER"; }; class ItemSatellitePhone : Default { interactAction = 18; interactText = "CALL BANKER"; }; class ItemSurvivalRadio : Default { interactAction = 18; interactText = "CALL BANKER"; }; (3) Before these lines at the end of epoch_code/compile/EPOCH_consumeItem.sqf: default { ["Found nothing", 5] call Epoch_message; }; Add: case 18: { // Call banker if (isNil "EPOCH_bankTransferActive") then { if (random 1 > 0.5) then { [player, [], Epoch_personalToken] remoteExec ["EPOCH_server_storeCrypto",2]; closeDialog 0; createDialog "InteractBank"; lbClear 21500; { _index = lbAdd[21500, name _x]; lbSetData[21500, _index, netId _x]; } forEach(allPlayers - [player]); } else { ["You cannot get a signal, please try again", 5] call Epoch_message; }; }; }; Note that there's a bit of randomization so the players only have a 50% chance of getting through. You can reduce this further to make their lives more interesting That's it. RePBO the mission and upload to your server. Ghostrider-GRG, natoed, Drokz and 1 other 4 Link to comment Share on other sites More sharing options...
Ghostrider-GRG Posted July 23, 2020 Report Share Posted July 23, 2020 I have to say that the idea is uber cool and illustrates the flexibility of the EPOCH platform. Anything you like could be added as an item that can be clicked to start an action or consume an item. Just realized how much one could do with this feature. Grahame 1 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