Jump to content

[Release] Advanced Trading 2.1 !UPDATED!


Zupa

Recommended Posts

Thanks Soo Much Man,

Im making a Napf Server...So does that change anything?

Also Zupa would you be able to give me a written tutorial on how to put the guns in thanks man :)

yes the SC is made for chernarus.  You will need to change  a few things like the map markers, the trader locations and more.  If you dont know  what you are doing. id suggest stick with chernarus if you want to learn, if you want the banks that is... as for adding guns, again that falls in the single currency hpp files.  Not the database with briefs.

Link to comment
Share on other sites

Hello

Sorry for my bad English

Same Problem like JOCELIN  .. also with Briefcase   ..i do 5 Bc into a Truck then i go trade into the truck  after this i have 10 Bc in my Gear ..... 10Bc into the truck after Trade 20 Bc in my gear and and and

need help

Update : I check a lot of Vehicle ...same Problem with all .... the Briefcase doubled when there are in the Gear from the Vehicle  have anybody  a patch for this Problem  Please 

 

Wallnuss

 

Edited by Wallnuss
Link to comment
Share on other sites

Zupa or someone with more scripting skill will need to piece this together, but could you add something to this

 

in z_at_returnChange.sqf: Line 11

    if (!Z_Selling) then {
    _return_change = _total_currency - _trade_total;
} else {
    _return_change = _total_currency + _trade_total;
};

 

from this in z_at_sellItems.sqf: Line 39

    if(Z_SellingFrom == 0)then{
        _outcome = [unitBackpack player,_itemsArray,_weaponsArray] call ZUPA_fnc_removeWeaponsAndMagazinesCargo;
    };
    if(Z_SellingFrom == 1)then{
        _outcome = [Z_vehicle,_itemsArray,_weaponsArray,_bpArray] call ZUPA_fnc_removeWeaponsAndMagazinesCargo;
    };

Possibly force trades from vehicles "Z_SellingFrom == 1" to _return_change to "Z_SellingFrom"

Edited by HeroeZGaming
Link to comment
Share on other sites

  • 2 weeks later...

Hello to all, I get this error in RPT. I have checked the code many times :(

Error in expression <jNull,objNull,objNull,objNull];
{player removeAction _x} count s_player_parts;s_>
  Error position: <removeAction _x} count s_player_parts;s_>
  Error Type Nothing, expected Bool
File fn_selfActions.sqf, line 885

Can anyone see the cause of this error?

 
 
 
 
 
 
 
 
 
Link to comment
Share on other sites

I'm running this on my server, works great but not all of my traders get the 'Advanced Trading' option. The few traders that do get the option works perfectly. Is there some where I have to add my other traders, as I've looked through the files and cannot find anything.

Link to comment
Share on other sites

---FIXED SOME TRADERS NOT WORKING---

 

Hey Everyone!
 
 I have been trying to get this script to work on my server and I was having some of the same issues as Scinester is. Only the traders that deal in food/water and medical had the advanced trading option, no other traders. What is the weirdest is that I have a custom trade city with the Delta Force skins added in and again, only the food/water and medical traders there offer advanced trading. I went back and looked in my fn_selfactions and I found the problem. 

Mine looked like this:

    
    // Static Menu
    {
     _buyV = player addAction ["<t color=#0059FF'>Advanced Trading</t>", "zupa\advancedTrading\init.sqf",(_traderMenu select 0), 999, true, false, "","];
     s_player_parts set [count s_player_parts,_buyV];
     //diag_log format["DEBUG TRADER: %1", _x];
     _buy = player addAction [format["Trade %1 %2 for %3 %4",(_x select 3),(_x select 5),(_x select 2),(_x select 6)], "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",[(_x select 0),(_x select 1),(_x select 2),(_x select 3),(_x select 4),(_x select 5),(_x select 6)], (_x select 7), true, true, "",""];
     s_player_parts set [count s_player_parts,_buy];
    
    } count (_traderMenu select 1);
    // Database menu
    _buy = player addAction [localize "STR_EPOCH_PLAYER_289", "\z\addons\dayz_code\actions\show_dialog.sqf",(_traderMenu select 0), 999, true, false, "",""];
 

 

Now you see how I had erroneously placed it inside the brackets for trade_items... I then moved it down to just above the "//Database menu" area and voila!! All traders then had the menu.

 

This worked for me and I hope it worked for you as well.
 
 
Also, I too get the error of the vehicle "Rabbit" being one of my vehicles.

This fixed the issue I had above!

Link to comment
Share on other sites

  • 2 weeks later...

i'm trying to get this working, i updated my infistart, but even as admin, it shows up empty... i have managed to locate the problem to this:

_cfgtraders = missionConfigFile >> "CfgTraderCategory"  >> _cat;

This returns nothing

 
 
 
 
 
 

Pretty sure u are using database traders then. 

You should use config traders. Which is simply added the following in your init.sqf

DZE_ConfigTrader = true;
Edited by Zupa
Link to comment
Share on other sites

Hi guys

A question

Zupa doesnt answer to this bug  :-(

Does anyone has an idea to deactivate the trading into the vehicle?

MfG

Wallnuss

 

 

https://github.com/DevZupa/AdvancedTrading/blob/master/zupa/advancedTrading/functions/z_at_getContainer.sqf

Remove the 'case 1: {' block from the code. Pressing the button will not do anything then.

SO the following must be deleted

case 1: {
			Z_SellingFrom = 1;
			["Buying in vehicle."] call Z_filleTradeTitle;
			_canBuyInVehicle = call Z_checkCloseVehicle;
			if(_canBuyInVehicle)then{
				[1] call Z_calculateFreeSpace;
			}else{
				systemChat format["Get in the driver seat to be able to trade to your vehicle."];
				(findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_SLOTSDISPLAY) ctrlSetText format["%1 / %2 / %3",0,0,0];
			};
		};

 

Link to comment
Share on other sites

Hi Zupa Thanks for this .... but the BC dub bug are always aktiv ..... it was my mistake i througt so when i dont can buy in a vehicle the BC can not be dubbt

at the moment i put the 2 BC in a Vehicle and buy one (tanktrap or a other item) in the vehicle the Tanktrap despawn but the 2 BC  are in my gear  and 2 Bc are in the Vehicle....... :-(

Wallnuss

Link to comment
Share on other sites

Hi Zupa Thanks for this .... but the BC dub bug are always aktiv ..... it was my mistake i througt so when i dont can buy in a vehicle the BC can not be dubbt

at the moment i put the 2 BC in a Vehicle and buy one (tanktrap or a other item) in the vehicle the Tanktrap despawn but the 2 BC  are in my gear  and 2 Bc are in the Vehicle....... :-(

Wallnuss

It's really hard to understand your english. Because i think u mean 'selling' items not 'buying'?

Link to comment
Share on other sites

Hi sorry my shool englisch are 30 years ago

I pack a BC into a vehicle then go one to the reseller and buy a part into the vehicle i have 1 gold there after having one Bc in my gear and one in the vehicle

I thought one can that buy to the vehicle to switch off I fixed  the problem get there duplicate BC .... no way

the buying item despawn and i have allways 1 bc in my gear and one in the vehicle

German.

Ich versuche das mal in Deutsch ...Hallo Zupa ...das Problem ist nur bei den BC .

Man packt sich ein BC in ein Fahrzeug dann geht man mit einem Silber oder Gold zum Händler und kauft ein Item in das Fahrzeug danach hat man die menge an BC die im Fahrzeug liegt in seinem Gear und die BC bleiben im Fahrzeug also verdoppelt

meine Idee war das traden in das Fahrzeug komplett zu unterbinden damit der Fehler weg ist ..... leider bewirkt dein Fix das nicht ,man kann weiterhin in das Fahrzeug kaufen ...das Item kommt zwar da nicht an die BC verdoppeln sich aber trotzdem

ich hoffe das ich das verständlich rübergebracht habe ....und hoffe jemand mit besseren Englischkenntnissen kann dir das übersetzen

MfG

Wallnuss

 

Link to comment
Share on other sites

Hi Zupa, we seem to have the same issue. I updated infistar to the newest, but only admins can see the inventory listed. I made sure that the exceptions were added in the AHconfig. It does not show my inventory or the trader inventory. 

 

- verified we are not using database trader. 

- updated infistar to version 9/24 ( are you referring to a newer version?)

- verified added 

AdvancedTrading
711197

- updated to 2.1 files. Still same result. 

- verified pbo was packed with edits. 

 

Any help is appreciated and thank you for your awesome mods!

Link to comment
Share on other sites

@zupa

Can you tell me why when a player has 25-30 slots used in there backpack and they try to buy into backpack it does not let them?

Get this message

Total space succeeded: Mag=1, Tool=1, Side=5, Primary=10 slots and your bag capacity is 21 where you tried 1 slots.

This is with a 50 slot coyote backpack as a example for the message. 30 slots used and 20 remain but it says your backpack is only a 21 slot and will not let you buy anything else into the backpack.

If everyone else can try this out and tell me if it is like this for you also would be nice. I have talked to over 8 server owners that run this script and for everyone it is the same outcome. Once you have a backpack half full you cannot buy into it anymore.

Link to comment
Share on other sites

I was going to test this out on mine to try and see if it is specific items or just a numbers thing but I haven't had time to get into the game and try it out.

You can't buy into vehicles if you have a backpack stored into so I was thinking it may be something along those lines. Maybe a weapon or a toolbelt item or just any 30 slots with whatever in it. If I get some time Monday or Tuesday of this next week I try and check into it more

Link to comment
Share on other sites

@zupa

Can you tell me why when a player has 25-30 slots used in there backpack and they try to buy into backpack it does not let them?

Get this message

Total space succeeded: Mag=1, Tool=1, Side=5, Primary=10 slots and your bag capacity is 21 where you tried 1 slots.

This is with a 50 slot coyote backpack as a example for the message. 30 slots used and 20 remain but it says your backpack is only a 21 slot and will not let you buy anything else into the backpack.

If everyone else can try this out and tell me if it is like this for you also would be nice. I have talked to over 8 server owners that run this script and for everyone it is the same outcome. Once you have a backpack half full you cannot buy into it anymore.

I fixed that and some other bugs with the code, I gave zupa what I fixed so he may have an update for that at some point. I figured I'd let him take a look and decide if he wanted to incorporate the changes.

The main changes were separating out the vision toolbelt items (binoculars, rangefinders, night vision) because if your toolbelt is full, and those slots are filled it would think you had -2 slots available and would prevent all buying. There was also a section where its looking at the total items vs total space but it was using total space after it had been altered, so I added an extra variable to track the original total space determination.

There's also a problem for people who don't use coins that I fixed in there too.

Link to comment
Share on other sites

On the first page it says it doesn't support selling / buying vehicles. What does that mean exactly, doesn't that break the Epoch trading system? Maybe I misread what you said?

Also , can you let us know when you've made the changes gOthic_ice_cream sent you, as we don't use coins and I'd like to install this relatively bug free :)

Edited by MatthewK
Link to comment
Share on other sites

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
×
×
  • Create New...