Jump to content

Calling Your Banker


Grahame

Recommended Posts

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 :laugh:

That's it. RePBO the mission and upload to your server.

Link to comment
Share on other sites

  • 2 years later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...