Jump to content
Grahame

Calling Your Banker

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...