Sign in to follow this  
Followers 0
jaxx0rr

Sell Crates at Wastedump [R3F required]

3 posts in this topic

Ok so I made a little something.. it will not sell the crate from within the vehicle but it will sell its contents when you place it next to the trader. Then you can just grab the money out of it..

like so

 

Only downside is.. the crate will stay there.. it is kinda realistic I guess.. I could make it dissapear after a minute..

Instructions

First you need to have R3F installed and working

Then make sure you have the DMS crate (or any other crate) setup in R3F_LOG\config.sqf under

R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player + [
	"I_CargoNet_01_ammo_F",

and optionally under

R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo + [
	["I_CargoNet_01_ammo_F", 100]

then open up R3F_LOG\objet_deplacable\relacher.sqf and after

R3F_LOG_mutex_local_verrou = true;

put this in
 

	private _foundTrader = false;
	{
		_foundTrader = true;
	} forEach nearestObjects [player, ["Exile_Trader_WasteDump"], 12];

	if (_foundTrader) then {
	
		private _crate = R3F_LOG_joueur_deplace_objet;
		private _cargo = _crate call ExileClient_util_containerCargo_list;	
		private _revenue = _cargo call ExileClient_util_gear_calculateTotalSellPrice;
		hint format ["Cargo was sold for %1 Poptabs. You can pick them up from the crate.", _revenue];
		//str(_revenue);
		
		clearWeaponCargoGlobal 		_crate;
		clearItemCargoGlobal 		_crate;
		clearMagazineCargoGlobal 	_crate;
		clearBackpackCargoGlobal 	_crate;
		
		private _cash = _crate getVariable ["ExileMoney", 0];
	
		_crate setVariable ["ExileMoney",_revenue+_cash, true];
	};

thats it.

EDIT: updated script so you wont lose the money inside the crate if you take the crate a second time and place it down.

 

 

Edited by jaxx0rr
Updated script

Share this post


Link to post
Share on other sites

I like your script. But can i ask where do i find R3F for Exile. So i can change my towing script with this one.

Share this post


Link to post
Share on other sites
15 hours ago, Mike Nan said:

I like your script. But can i ask where do i find R3F for Exile. So i can change my towing script with this one.

 

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.