Jump to content

[Release] Advanced Trading 2.1 !UPDATED!


Zupa

Recommended Posts

Noticed this tonight testing the updated build at Hero Vendor.   Large block of nothing in between items in the "buy" list.   There were a handfull of items, then this open space, then the rest of the items I could buy.   Is this just representative of the things you can't buy using Advanced Trading, or an issue?  Might have been like that in previous version, I don't play enough to notice. 

 

7Cv6UVZ.jpg

Link to comment
Share on other sites

Noticed this tonight testing the updated build at Hero Vendor.   Large block of nothing in between items in the "buy" list.   There were a handfull of items, then this open space, then the rest of the items I could buy.   Is this just representative of the things you can't buy using Advanced Trading, or an issue?  Might have been like that in previous version, I don't play enough to notice. 

 

7Cv6UVZ.jpg

 

It's an issue. It was adding stuff without getting the info. If you click on them you can see the item classname ( probably vehicles/backpacks).

 

Already fixing it in new branch.

 

 

Also noticed it says Buy: 3 any when using default currency

 

Have you changed the config.sqf ?

 

ANd where are we talking about? systemChat or in dialog?

 

+ In the new branch i'm making the messages a bit nicer. And i'm going to use the money it's image to display it a more clear.

Link to comment
Share on other sites

I had been using Advanced Trading 1.0 along with ZSC 3.0.  Not the last alpha release but the one before that, from a few months ago.  All was working great.  So I replaced everything with version 2.0, verified my description.ext and fn_selfActions.sqf.  Everything seems to work except if I sell something, I get no coins but the trader takes my goods.   I left Z_MoneyVariable = "cashMoney"; in config.sqf since I'm using ZSC 3.0.  There are no errors or warnings in either my client side or server side .rpt files.  Any ideas where to look?

 

Edit - D'oh!   I assumed it defaulted to Z_SingleCurrency = true; and didn't even look a that.  Setting it to true fixed it.   Works great!

Link to comment
Share on other sites

The issue with the open spaces when buying is still there.   Spams my client RPT with this when I click on one of the open spaces.

 

Error in expression <{
(findDisplay 711197 displayCtrl 7445) ctrlSetStructuredText "<t color='#ffffff>
  Error position: <ctrlSetStructuredText "<t color='#ffffff>
  Error ctrlsetstructuredtext: Type String, expected Text
File mpmissions\__CUR_MP.chernarus\zupa\advancedTrading\functions\z_at_getItemConfig.sqf, line 25

 

Line 25 in my z_at_getItemConfig.sqf is:

default {
        (findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_ITEMINFO) ctrlSetStructuredText parseText "<t color='#ffffff'>No info found</t>";
    }

Link to comment
Share on other sites

The issue with the open spaces when buying is still there.   Spams my client RPT with this when I click on one of the open spaces.

 

Error in expression <{

(findDisplay 711197 displayCtrl 7445) ctrlSetStructuredText "<t color='#ffffff>

  Error position: <ctrlSetStructuredText "<t color='#ffffff>

  Error ctrlsetstructuredtext: Type String, expected Text

File mpmissions\__CUR_MP.chernarus\zupa\advancedTrading\functions\z_at_getItemConfig.sqf, line 25

 

Line 25 in my z_at_getItemConfig.sqf is:

default {

        (findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_ITEMINFO) ctrlSetStructuredText parseText "<t color='#ffffff'>No info found</t>";

    }

 

U sure u uploaded the new pbo to the server? The error and the line you post look different

Link to comment
Share on other sites

I stand corrected.  Rebuilding my overpoch server, accidentally placed the updated files in the actual server and not the Test version I was debugging in.   Just went through and made a few sales, purchased a few items, and even tried buying a vehicle.  All works as it should.  Nothing in Client or Server RPT.  Nice work.

Link to comment
Share on other sites

Zupa

Hi! I fully translated into Russian AdvancedTrading 2.0 (yesterday was the release), works well, thank you very much for the work, not only displays information about weapons, mags and backpacks to buy cars and weapons and mags to buy a backpack.
Can I fix it? All screenshots attached.
 
By the way, you can simply do a separate language file? It is easier to translate into other languages by replacing the file.
Maybe we should add animation in the trade, which can optionally on \ off in config.sqf?
 
config:
Z_AT_FolderLocation = 'custom\ATrade';
Z_VehicleDistance = 30; // Distance that a vehicle needs to be to see it's content or to sell it.
Z_SingleCurrency = true; // Does your server use a single currency system.
Z_AllowTakingMoneyFromBackpack = false; // When buying items with DEFAULT CURRENCY to any inventory. Do you allow the trader to take money from your backpack.
Z_AllowTakingMoneyFromVehicle = false; // When buying items with DEFAULT CURRENCY to any inventory. Do you allow the trader to take money from your vehicle.


//-----------------------------------------------------------------------------------------------
Z_MoneyVariable = "cashMoney"; // If using a Single currency system, change this to whatever currency you are using.
_transportMaxWeapons = 0;
_transportMaxMagazines = 0;
_transportmaxBackpacks = 0;

//----------------------------------------------------------------------------------------------- 
if ( isText (configFile >> 'CfgVehicles' >> _class >> 'transportMaxWeapons')) then { _transportMaxWeapons = getText (configFile >> 'CfgVehicles' >> _class >> 'transportMaxWeapons'); }; 
if ( isText (configFile >> 'CfgVehicles' >> _class >> 'transportMaxMagazines')) then { _transportMaxMagazines = getText (configFile >> 'CfgVehicles' >> _class >> 'transportMaxMagazines'); }; 
if ( isText (configFile >> 'CfgVehicles' >> _class >> 'transportMaxBackpacks')) then { _transportmaxBackpacks = getText (configFile >> 'CfgVehicles' >> _class >> 'transportMaxBackpacks'); }; 
//-----------------------------------------------------------------------------------------------
if (Z_SingleCurrency) then {
_formattedText = format [
"<img image='%1' size='3' /><br />" +
"<t color='#33BFFF'>Название: </t><t color='#ffffff'>%2</t><br />" +
"<t color='#33BFFF'>Класс: </t><t color='#ffffff'>%3</t><br />" +
"<t color='#33BFFF'>Куплю за: </t><t color='#ffffff'>%5 %7</t><br />" +
"<t color='#33BFFF'>Продам за: </t><t color='#ffffff'>%6 %7</t><br />" +
"<t color='#33BFFF'>Магазинов: </t><t color='#ffffff'>%9</t><br />" +
"<t color='#33BFFF'>Оружия: </t><t color='#ffffff'>%8</t><br />" +
"<t color='#33BFFF'>Рюкзаков: </t><t color='#ffffff'>%4</t><br />"
, _picture, _display, _class, _transportmaxBackpacks, _sellPrice, _buyPrice, CurrencyName, _transportMaxWeapons,_transportMaxMagazines
];
 

 

0ysy1d6.png
l1vKLSB.png
Link to comment
Share on other sites

 

Zupa

 

Hi! I fully translated into Russian AdvancedTrading 2.0 (yesterday was the release), works well, thank you very much for the work, not only displays information about weapons, mags and backpacks to buy cars and weapons and mags to buy a backpack.

 

Fixed @ master.

 

Changes:

 

https://github.com/DevZupa/AdvancedTrading/commit/9c9780df0303973f966a5e1678e281776d106a74

Link to comment
Share on other sites

in some files:

_formattedText = format [
"<img image='%1' size='3'/><br />" +

​changed

_formattedText = format [
"<img image='%1' size='3' align='center'/><br />" +

above screenshot vehicle "Ural".

Thank's!

Link to comment
Share on other sites

Not showing the total value of items and when I buy an item he does not deliver my money any help me

 

 

2mrz790.jpg

 

You did not change the config.sqf for your server. Sine you are using single currency. But the config in AT is probably said to default currency.

Link to comment
Share on other sites

I do not understand my version 1.0 running smoothly

disableSerialization;

Z_traderData = (_this select 3); // gets the trader data ( menu_Functionary1 )

Z_Selling = true;
Z_SellingFrom = 2;

if( isNil "Z_traderData" || count (Z_traderData) == 0)exitWith{
	cutText [format["There went something wrong."], "PLAIN DOWN"];
};

if(isNil "Z_AdvancedTradingInit")then{
// initiate the functions and variables for advanced trading -- easier for the people :) otherwise it would be in compiles or different file.
	Z_SellableArray = [];
	Z_SellArray = [];
	Z_BuyArray = [];
	Z_BuyingArray = [];
	Z_vehicle = objNull;
	Z_VehicleDistance = 50;
	Z_MoneyVariable = "cashMoney"; // Change this to whichever currency You are using.
	Z_NormalCurrency = false; // No effect yet. Not supported yet
	
	if(isNil 'CurrencyName')then{
		CurrencyName = 'Coins';
	};
...

My config.sqf version 2.1

Z_AT_FolderLocation = 'custom\advancedTrading';
Z_VehicleDistance = 50; // Distance that a vehicle needs to be to see it's content or to sell it.
Z_SingleCurrency = false; // Does your server use a single currency system.
Z_AllowTakingMoneyFromBackpack = true; // When buying items with DEFAULT CURRENCY to any inventory. Do you allow the trader to take money from your backpack.
Z_AllowTakingMoneyFromVehicle = true; // When buying items with DEFAULT CURRENCY to any inventory. Do you allow the trader to take money from your vehicle.
Z_MoneyVariable = "cashMoney"; // If using a Single currency system, change this to whatever currency you are using.
Link to comment
Share on other sites

Zupa, hello.
After the change:
Anyway it does not display information about weapons, magazines and backpacks with the purchase of cars and weapons and magazines, when buying a backpack.
Can I fix it? All screenshots attached.
 
Configs:

z_at_displayVehicleInfo.sqf:
if ( isText (configFile >> 'CfgVehicles' >> _class >> 'transportMaxWeapons')) then {
	_transportMaxWeapons = getNumber (configFile >> 'CfgVehicles' >> _class >> 'transportMaxWeapons');
};

if ( isText (configFile >> 'CfgVehicles' >> _class >> 'transportMaxMagazines')) then {
	_transportMaxMagazines  = getNumber (configFile >> 'CfgVehicles' >> _class >> 'transportMaxMagazines');
};

if ( isText (configFile >> 'CfgVehicles' >> _class >> 'transportMaxBackpacks')) then {
	_transportmaxBackpacks  = getNumber (configFile >> 'CfgVehicles' >> _class >> 'transportMaxBackpacks');
};

z_at_displayBackpackInfo.sqf:

if ( isText (configFile >> 'CfgVehicles' >> _class >> 'transportMaxWeapons')) then {
	_transportMaxWeapons = getNumber (configFile >> 'CfgVehicles' >> _class >> 'transportMaxWeapons');
};

if ( isText (configFile >> 'CfgVehicles' >> _class >> 'transportMaxMagazines')) then {
	_transportMaxMagazines  = getNumber (configFile >> 'CfgVehicles' >> _class >> 'transportMaxMagazines');
};

and cfgVehicles.hpp (any example)^

    class Fishing_Boat: Ship
	{
        displayName = "Fishing boat";
		maxSpeed = 40;
        transportMaxMagazines = 400;
        transportMaxWeapons = 40;
        transportMaxBackpacks = 8;
	};
class UralOpen_Base;
class UralCivil2_DZE : UralOpen_Base {
	displayName = "Ural (Civil 2)";
	model = "\ca\wheeled\Ural_Open";
	accuracy = 0.22;
	scope = 2;
	side = 3;
	faction = "CIV";
	vehicleClass = "Car";
	crew = "";
	typicalCargo[] = {};
	class TransportMagazines{};
	class TransportWeapons{};
	picture = "\Ca\wheeled\data\ico\ural_civil1_CA.paa";
	rarityUrban = 0.22;
	hiddenSelectionsTextures[] = {
		"\ca\wheeled\data\ural_kabina_civ2_co.paa",
		"\ca\wheeled\data\ural_korba_civ2_co.paa"
	};
};
class Mi17_Civilian;
class Mi17_Civilian_DZ: Mi17_Civilian	 {
	displayname = "Mi-17 (Civilian)";
	displaynameshort = "Mi-17 (Civ)";
	scope = 2;
	side = 3;
	crew = "";
	typicalCargo[] = {};
	class TransportMagazines{};
	class TransportWeapons{};
	commanderCanSee = 2+16+32;
	gunnerCanSee = 2+16+32;
	driverCanSee = 2+16+32;
	transportMaxWeapons = 10;
	transportMaxMagazines = 50;
	transportmaxbackpacks = 10;
};
class DZ_CivilBackpack_EP1: Bag_Base_EP1    
{
	scope = 2;
	displayName = $STR_EPOCH_PACK_CZECH;
	picture = "\ca\weapons_e\data\icons\backpack_ACR_CA.paa";
	icon = "\ca\weapons_e\data\icons\mapIcon_backpack_CA.paa";
	mapsize = 2;
	model = "\ca\weapons_e\AmmoBoxes\backpack_acr.p3d";
	transportMaxWeapons = 4;
	transportMaxMagazines = 40;
	class eventHandlers
	{
		init="[(_this select 0),'CfgVehicles','DZ_CivilBackpack_EP1'] execVM '\z\addons\dayz_code\init\object_BackpackAction.sqf';";
	};
};

 

all images:

This is the normal display and sale:

ak.md.png

 

There are always slots = 0:

alice.md.png

acu.md.png

 
There are always slots = 0:
mi17.md.png
There are always slots not= 0:
mi17gear.md.png
 
There are always slots = 0:
ural.md.png
There are always slots not= 0:

uralgear.md.png

 

Here the seller of boats. Do not display the names and general weirdness:

boats.md.png

boatstrade.md.png

 

In none of these examples does not display information about the capacity of the weapons and magazines.

As I understand it, for the Urals is no information on roominess? Then how does it come into play?

 

 

 

Well, that transport can not buy is as it should be, as I understand it?)

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...