jaxx0rr

Sell Crates at Wastedump [R3F required]

18 posts in this topic

Advertisement

I just did a test selling of the crate and got the poptabs, but respect didn't increase.

Am I missing something?

I am using this

Spoiler

/**
 * Passe la variable R3F_LOG_joueur_deplace_objet à objNull pour informer le script "deplacer" d'arrêter de déplacer l'objet
 */
 
private _foundTrader = false;

if (R3F_LOG_mutex_local_verrou) then
{
    hintC STR_R3F_LOG_mutex_action_en_cours;
}
else
{
    R3F_LOG_mutex_local_verrou = true;
    
    {
        _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;
        
        clearWeaponCargoGlobal         _crate;
        clearItemCargoGlobal         _crate;
        clearMagazineCargoGlobal     _crate;
        clearBackpackCargoGlobal     _crate;
        
        private _cash = _crate getVariable ["ExileMoney", 0];
    
        _crate setVariable ["ExileMoney",_revenue+_cash, true];
        
        R3F_LOG_joueur_deplace_objet = objNull;
        sleep 0.25;
    
        R3F_LOG_mutex_local_verrou = false;
        
        ["SuccessTitleAndText", ["Crate Contents Sold", format["Cargo was sold for %1 Poptabs. You can pick them up from the crate. Crate will delete in 2 minutes", _revenue]]] call ExileClient_gui_toaster_addTemplateToast;
        
        sleep 30;
        deleteVehicle _crate;
    
    } else {
    
        R3F_LOG_joueur_deplace_objet = objNull;
        sleep 0.25;
    
        R3F_LOG_mutex_local_verrou = false;
    };
};

 

Edited by Slider

Share this post


Link to post
Share on other sites
34 minutes ago, Slider said:

I just did a test selling of the crate and got the poptabs, but respect didn't increase.

Am I missing something?

I am using this

  Reveal hidden contents

/**
 * Passe la variable R3F_LOG_joueur_deplace_objet à objNull pour informer le script "deplacer" d'arrêter de déplacer l'objet
 */
 
private _foundTrader = false;

if (R3F_LOG_mutex_local_verrou) then
{
    hintC STR_R3F_LOG_mutex_action_en_cours;
}
else
{
    R3F_LOG_mutex_local_verrou = true;
    
    {
        _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;
        
        clearWeaponCargoGlobal         _crate;
        clearItemCargoGlobal         _crate;
        clearMagazineCargoGlobal     _crate;
        clearBackpackCargoGlobal     _crate;
        
        private _cash = _crate getVariable ["ExileMoney", 0];
    
        _crate setVariable ["ExileMoney",_revenue+_cash, true];
        
        R3F_LOG_joueur_deplace_objet = objNull;
        sleep 0.25;
    
        R3F_LOG_mutex_local_verrou = false;
        
        ["SuccessTitleAndText", ["Crate Contents Sold", format["Cargo was sold for %1 Poptabs. You can pick them up from the crate. Crate will delete in 2 minutes", _revenue]]] call ExileClient_gui_toaster_addTemplateToast;
        
        sleep 30;
        deleteVehicle _crate;
    
    } else {
    
        R3F_LOG_joueur_deplace_objet = objNull;
        sleep 0.25;
    
        R3F_LOG_mutex_local_verrou = false;
    };
};

 

Oh ok....i'm using the R3F mod only for transport and not for selling crates out of the vehicle directly. For me the respect comes at the same time as the poptabs O.o

Share this post


Link to post
Share on other sites
On 6/7/2017 at 1:49 PM, BaroN said:

Thanks to the OP and to you @xstreme for your edit. Works perfectly apart from this error in the client.rpt for me
 


18:49:40 Error in expression <{
_itemClassName = _x select 0;
};
if !(_itemClassName isEqualTo "") then
{
_lis>
18:49:40   Error position: <_itemClassName isEqualTo "") then
{
_lis>
18:49:40   Error Undefined variable in expression: _itemclassname
18:49:40 File exile_client\code\ExileClient_util_containerCargo_list.sqf, line 39

Happens as you release the crate next to the waste dump trader. Everything still works though, the crate exchanges the items for cash, can take the cash from the crate and it deletes after 2 mins. Just the error....any ideas...?

Was there ever a solution for this?  I'm getting this error as well with only certain crates...

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

  • Recently Browsing   0 members

    No registered users viewing this page.