Jump to content

[RELEASE] TradeFromVehicle - Version 2.0 is here!


Csus

Recommended Posts

Can confirm that this script is causing the issues with the plane dealer. Sometimes, you'll get weapons, other times you'll get armed land vehicles (that the hero would sell).. I turned the script off and everything is working again.

 

 

Edit: Turning off the ability to sell from vehicle has fixed this issue for me.  Maybe that will help you narrow down the actual cause? I'm assuming this is no longer a database latency issue ?

Link to comment
Share on other sites

Yes, Works on Lingor and any other MAP.

Again from my test (only test) CFGTraders (mission files) works flawlessly on my 3 servers. I believe the wrong traders if due to the DB latency.

But i install it on lingor 1.5 dosnt work and on cherno work him can you help me

Link to comment
Share on other sites

Ive just tried this again, (newest version with cfg and tax) 

 

I do not get any gold (using TFV_COINS = false;)

 

The trade from menu disappears and have to relog to get it back. (usually after one time using or moving distance to different safezone)

 

--

is this still being worked on, or should i go back to the old version and try to get cfgtraders working with that one?

Link to comment
Share on other sites

I personally only run CFGTrader and coins. I have Tax disabled. I have zero problems with any traders (only when you use the same skin for AI's as your traders do or for players). Cherno, Tavi, Lingor, Namalsk, Napf and any other DO work as long as you have your traders setup correctly with my version.

 

From what i Know the SQL does take time to load in. and apparently if you run into a tarder zone wait 2mins ish then try it all works fine. That tells me its the load time for the SQL. CFGTraders are instant and thus no problems.

 

A couple of people have said with the Coins set to FALSE and TAX true it does fail sometimes. so I would try without TAX on. 

 

I don't have time to test every possible combination all I can tell you is if you have your traders setup 100% correct, you have coins setup 100% correct the script works 100% of the time (minus if your using same skins). With this setup I have it working on Chern, Napf, Lingor 1.x and Tavi no problems at all

Link to comment
Share on other sites

I personally only run CFGTrader and coins. I have Tax disabled. I have zero problems with any traders (only when you use the same skin for AI's as your traders do or for players). Cherno, Tavi, Lingor, Namalsk, Napf and any other DO work as long as you have your traders setup correctly with my version.

 

From what i Know the SQL does take time to load in. and apparently if you run into a tarder zone wait 2mins ish then try it all works fine. That tells me its the load time for the SQL. CFGTraders are instant and thus no problems.

 

A couple of people have said with the Coins set to FALSE and TAX true it does fail sometimes. so I would try without TAX on. 

 

I don't have time to test every possible combination all I can tell you is if you have your traders setup 100% correct, you have coins setup 100% correct the script works 100% of the time (minus if your using same skins). With this setup I have it working on Chern, Napf, Lingor 1.x and Tavi no problems at all

but i setup a Cherno Server Vanilla Epoch and Lingor ... on Cherno works but dont on lingor ...... well i have a Backpack nevertheless come the Menu ...

Link to comment
Share on other sites

  • 4 weeks later...

so its a fine script , but i have only the menu for Trade from Backpack & Vehicle

where i can use the trader for buy anywhere ?

 

 

EDIT okay its fixed:

 

but an new question....... 

 

when i sell from backpack or vehicle (coins disabled) i dont become money for my equipment :/

 

EDIT ok i thinks i have fixed...... i have disabled Trade from vehicle, now i become money for trade

Link to comment
Share on other sites

  • 3 weeks later...

hi there great script.

1 problem comes up with the ItemKeyKit i have in trader.

If you sell it from backpack and vehicle it does not disapear. You get the money so can keep on selling the item.

If i sell it from my inventory it is ok it sells and is gone.

I tried to delete the ItemKeyKit from the functions from bad items and did not work. 

Any idea what the problem is with the ItemKeyKit?

Thx

configtrader i tried and database like below

6828	["ItemKeyKit",3]	1000	[1,"ItemBriefcase100oz",1]	[5,"ItemGoldBar10oz",1]	0	679	trade_weapons

Link to comment
Share on other sites

I personally only run CFGTrader and coins. I have Tax disabled. I have zero problems with any traders (only when you use the same skin for AI's as your traders do or for players). Cherno, Tavi, Lingor, Namalsk, Napf and any other DO work as long as you have your traders setup correctly with my version.

 

From what i Know the SQL does take time to load in. and apparently if you run into a tarder zone wait 2mins ish then try it all works fine. That tells me its the load time for the SQL. CFGTraders are instant and thus no problems.

 

A couple of people have said with the Coins set to FALSE and TAX true it does fail sometimes. so I would try without TAX on. 

 

I don't have time to test every possible combination all I can tell you is if you have your traders setup 100% correct, you have coins setup 100% correct the script works 100% of the time (minus if your using same skins). With this setup I have it working on Chern, Napf, Lingor 1.x and Tavi no problems at all

Got it working with settings below with configtrader and gold

TFV_ATFV = true;   // Allow trading from vehicles?
TFV_ATFB = true;   // Allow trading from backpack?
TFV_ACC =  false;   // Allow combining currency? This attempts to sort the player's money into as few items as possible, e.g. 10 * 10oz Gold into 1 * Gold Briefcase.
TFV_WIPS =    5;   // *How many weapons can be sold per stage of trading? Each stage of trading is the length of time to perform the standard trading animation.
TFV_MIPS =    8;   // *How many magazines can be sold per stage of trading?
TFV_ATIS = true;   // Allow toolbelt items to be sold? Toolbelt items are classed as weapons and will be sold without warning when weapons are sold. Keys will ALWAYS be safe.
TFV_COINS = false;  //Coins System
TFV_DEBUG = false;  //Debug


// This is in a * Multiplier to 100*1 = 100, 100*0.5 = 50, 100*0.75 = 75 25% Tax,100*0.25 = 25 75% Tax.
TFV_TAX = false;
TFV_TAXFV = 0.75; // Tax From Veichle 25%
TFV_TAXFVT = "25"; // Dispay Tax Veichle (lazy code TBH)
TFV_TAXFB= 0.85; // Tax From Backpack 15%
TFV_TAXFBT= "15"; // Dispay Tax Backpack (lazy code TBH)

Only thing is the itemkeykit will not go it keep on giving you money but stays were it stays like i said in post #414

Link to comment
Share on other sites

Ive just tried this again, (newest version with cfg and tax) 

 

I do not get any gold (using TFV_COINS = false;)

 

The trade from menu disappears and have to relog to get it back. (usually after one time using or moving distance to different safezone)

 

--

is this still being worked on, or should i go back to the old version and try to get cfgtraders working with that one?

 

I have the same problem.. Is there any solution?

Link to comment
Share on other sites

  • 2 weeks later...

I have this running on Napf Overpoch, with CfgTraders, gold. It works with most traders, but I added a few traders that carry just the overpoch items, and the sell from vehicle/bag options do not appear for the new traders. But I do get both options at the other traders. Is it something to do with them being overwatch items? Or maybe the specific skins used (Graves, Graves_light, Herrera_Light)?

 

I'm not really sure how it determines if the vehicle has items the vendor would buy, and to show the menu if it does. So, maybe I am missing something obvious. Any help would be appreciated.

 

The only errors I get in my server RPT (get this error for every menu #)

 
 4:13:21 Error in expression <ServerTcache_519;>
 4:13:21   Error position: <ServerTcache_519;>
 4:13:21   Error Undefined variable in expression: servertcache_519
Link to comment
Share on other sites

Hi I added this on a new Overpoch Taviana server and it only works on the Trader city vendors, not hero bandit or misc vendors.

Any way to fix this?

 

 Allready using it on an epoch Chernarus map and there it even works on some extra traders I addes myself.

Link to comment
Share on other sites

I have this running on Overpoch Lingor with config traders and it works just fine.

Does it show the sell from backpack/vehicle for the traders carrying overwatch items though? It works for all traders on my server, except for the traders that are selling the overwatch/overpoch items. Its on Overpoch Napf though.

Link to comment
Share on other sites

This was working fine then I changed to CfgServerTrader so it's out of the mission file.  Now this does not work.   I found this on one of the pages, you replace the TFV_traderGetWeaponsMagazinesPrices =

with this one(sorry don't know how to do the spoiler thing)

 

TFV_traderGetWeaponsMagazinesPrices =
{
    private ["_trader","_traderData","_tids","_typeOfHumanityWeaponsMagazinesPrices","_typeOfHumanityWeaponsMagazinesPricesRAW","_physicalPrice","_intPrice","_currencyItem","_currencyItemWorth","_humanityNeed","_typeOfTrader","_badItems"];
    _trader = _this select 0;
    _intPrice = 0;
    _traderData = call TFV_tradersGetTypeOfTIDSHumanity;
    _badItems = ["USBasicBag","Tripod_Bag","M2StaticMG_US_Bag_EP1","M2HD_mini_TriPod_US_Bag_EP1","DSHKM_TK_GUE_Bag_EP1","DSHKM_TK_INS_Bag_EP1","DSHkM_Mini_TriPod_TK_GUE_Bag_EP1",
                 "DSHkM_Mini_TriPod_TK_INS_Bag_EP1","KORD_high_TK_Bag_EP1","KORD_high_UN_Bag_EP1","KORD_TK_Bag_EP1","KORD_UN_Bag_EP1","MK19_TriPod_US_Bag_EP1",
                 "AGS_TK_Bag_EP1","AGS_TK_GUE_Bag_EP1","AGS_TK_INS_Bag_EP1","AGS_UN_Bag_EP1","M252_US_Bag_EP1","2b14_82mm_TK_Bag_EP1","2b14_82mm_TK_GUE_Bag_EP1",
                 "2b14_82mm_TK_INS_Bag_EP1","Metis_TK_Bag_EP1","TOW_TriPod_US_Bag_EP1","SPG9_TK_GUE_Bag_EP1","SPG9_TK_INS_Bag_EP1","US_UAV_Pack_EP1","US_Assault_Pack_EP1",
                 "US_Patrol_Pack_EP1","US_Backpack_EP1","CZ_Backpack_EP1","CZ_VestPouch_EP1","TK_RPG_Backpack_EP1","TK_ALICE_Pack_EP1","TK_Assault_Pack_EP1","DZ_Patrol_Pack_EP1",
                 "DZ_Assault_Pack_EP1","DZ_Czech_Vest_Puch","DZ_ALICE_Pack_EP1","DZ_TK_Assault_Pack_EP1","DZ_British_ACU","DZ_CivilBackpack_EP1","DZ_Backpack_EP1",
                 "DZ_LargeGunBag_EP1","DZ_GunBag_EP1","DZ_CompactPack_EP1","DZ_TerminalPack_EP1","BAF_L2A1_ACOG_tripod_bag","BAF_L2A1_ACOG_minitripod_bag",
                 "BAF_GPMG_Minitripod_D_bag","BAF_GMG_ACOG_minitripod_bag"];
    
    if (!isNil "TFV_ATIS") then {
        if (!TFV_ATIS) then {
            _badItems = (_badItems + ["ItemToolbox","ItemEtool","ItemMatchbox","ItemHatchet","ItemKnife","ItemFlashlight","ItemFlashlightRed","Binocular","NVGoggles","Laserdesignator","Kostey_photos","Kostey_map_case","Kostey_notebook","CDF_dogtags","Moscow_Bombing_File","Cobalt_File","ItemWatch","ItemCompass","ItemGPS","ItemRadio","ItemMap","EvPhoto","EvMap","EvMoscow","EvKobalt","EvMoney","EvDogTags","ItemMatchbox_DZE","ItemMachete","ItemHatchet_DZE","ItemCrowbar","ItemMap_Debug","ItemShovel","ItemFishingPole","ItemSledge","ItemKeyKit","Binocular_Vector"]);
        };
    };
    
    {
     if ((_x select 0) == _trader) exitWith {
         _tids = _x select 1;
            _typeOfTrader = _x select 0;
            _humanityNeed = _x select 2;
        };
    } forEach _traderData;
    
    _typeOfHumanityWeaponsMagazinesPrices = [_typeOfTrader,_humanityNeed,[]];    

    {
    
    _cfgTraderCategory = missionConfigFile >> "CfgTraderCategory" >> (format["Category_%1",_x]);    

    PVDZE_plr_TradeMenuResult = [];
    
    for "_i" from 0 to ((count _cfgTraderCategory) - 1) do {
        _class = configName (_cfgTraderCategory select _i);
                    
        _type = getText ((_cfgTraderCategory select _i) >> "type");    
        _buy = getArray ((_cfgTraderCategory select _i) >> "buy");    
        _sell = getArray ((_cfgTraderCategory select _i) >> "sell");
        
        _buy set [2,1];
        _sell set [2,1];

        _typeNum = 1;
        if (_type == "trade_weapons") then {
            _typeNum = 3;
        } else {
            if (_type in ["trade_backpacks", "trade_any_vehicle", "trade_any_vehicle_free", "trade_any_boat", "trade_any_bicycle"]) then {
                _typeNum = 2;
            };
        };
        
        _data = [9999,[_class,_typeNum],99999,_buy,_sell,0,_trader_id,_type];
        
        PVDZE_plr_TradeMenuResult set [count PVDZE_plr_TradeMenuResult, _data];
    };
        
        if ((count(PVDZE_plr_TradeMenuResult)) > 0) then {
         _typeOfHumanityWeaponsMagazinesPricesRAW = PVDZE_plr_TradeMenuResult;
        };
    
        {
         if (!(((_x select 1) select 0) isKindOf 'AllVehicles') && !(((_x select 1) select 0) in _badItems)) then {
                _physicalPrice = [];
                _intPrice = 0;
                for "_i" from 0 to (((_x select 4) select 0) - 1) do {
                    _physicalPrice set [(count _physicalPrice),((_x select 4) select 1)];
                };            
        
                {
                    _currencyItem = (configFile >> "CfgMagazines" >> _x);
                    _currencyItemWorth = (_currencyItem >> "worth");
                    if (isNumber _currencyItemWorth) then {
                        _intPrice = (_intPrice + getNumber(_currencyItemWorth));
                    };
                } forEach _physicalPrice;
            
                (_typeOfHumanityWeaponsMagazinesPrices select 2) set [(count (_typeOfHumanityWeaponsMagazinesPrices select 2)),[((_x select 1) select 0),((_x select 1) select 1),_intPrice]];
         };
        } forEach _typeOfHumanityWeaponsMagazinesPricesRaw;
    } forEach _tids;

    _typeOfHumanityWeaponsMagazinesPrices
};

 

I deleted the old one and replaced it with this one, it still did not work.  Any ideas, must be missing something.

 

Thanks

 

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...