Jump to content

[Release] Advanced Trading 2.1 !UPDATED!


Zupa

Recommended Posts

Maybe you should look at your RPT log and see what error is given when they click the option in scroll menu. Might have to look at a client RPT log.

No because it works for admins. There is no error in the server RPT and the menu works for me so there wouldn't be an error in the client RPT either. This is not an error with installation, this is an antihack issue. I just dont know how to get around it

 

Untested, but the fix is here

 

InfiSTAR blocks lbsetpicture by default. Find and remove from the AH.sqf

lbsetpicture='no';

and

'lbsetpicture',
Link to comment
Share on other sites

So what you mean is you've already looked at your RPT, battleye, or antihack logs and have nothing relevant? Because there's no way someone would ask for help but be unwilling to take try the advice given.

If you don't have your anti hack setup to log when it blocks stuff, maybe you should.

Link to comment
Share on other sites

So what you mean is you've already looked at your RPT, battleye, or antihack logs and have nothing relevant? Because there's no way someone would ask for help but be unwilling to take try the advice given.

Ive already resolved the issue and posted the fix.

There weren't any errors in the RPT's, I said that. I checked the RPT's before I asked for help, otherwise I would have posted the errors.

 

If you don't have your anti hack setup to log when it blocks stuff, maybe you should.

Idk how, if thats possible, to do that, but as it's set up now it doesn't do that.

Link to comment
Share on other sites

Ive already resolved the issue and posted the fix.

There weren't any errors in the RPT's, I said that. I checked the RPT's before I asked for help, otherwise I would have posted the errors.

Idk how, if thats possible, to do that, but as it's set up now it doesn't do that.

Ah, I was assuming you had already tried the previous fix. Glad it works, as some people were saying it didn't fix it.

 

I couldn't actually say if its possible to have it log things like that for infistar, because I don't actually use it. I was just assuming there would be options in the configuration file for it to log that sort of thing. I just use BE currently, and it has always logged anything I needed to know (at least so far, fingers crossed), so I figured a mod that tries to force people to pay for it, would have decent config options. Guess I'm probably wrong. So anyway, my mistake. Wasn't trying to be rude when I said you should change it to do that, was just suggesting to have it log more if possible.

Link to comment
Share on other sites

It logs more antihack related stuff, like if it blocks a player for something it logs it. Logs suspicious stuff. Doesn't log everything it blocks though, you'll just notice it's not working, or it works for you and not for regular players.  No big deal I figured it out. Where there's a will there's a way.

 

Small bug to report, and I also have this problem with just regular config trader... If RPG weapon and ammo have the same classname, you can't sell the ammo. For example.

RPG18 has the exact same classname for the weapon and the magazine. Obviously it differentiates one by calling it a weapon and the other a magazine, but for some reason the traders can't figure this out.  When you use advanced trading, it shows the magazine as the weapon itself. You can sell it but won't receive any money for it. With the config traders it just says "something went wrong..."    Interesting little bug.

Link to comment
Share on other sites

Building supply is not blocked. If they don't show up, you did something wrong. You can purchase weapons into a vehicle, just not into a backpack. So, if you looked at the code, I'm sure you could copy some of the code from buy into vehicle into the backpack code.

What I would like to know is what is the "security" issue?

Link to comment
Share on other sites

Every trader that is in the server_traders.sqf list has advanced trading.

 

There are only limits on buying into gear/backpack for some stuff, Buying into vehicle sjhould be fine.

 

well is there a way to disable the limits? cause im running an overpoch origins server so its on Tavi. My trader config is "server_traders_tavi_13.sqf" but only a couple of the traders in the city have advanced trading like the doctor and the food trader but not the weapons guy, ammo guy,the building supplies guy, and the vehicle trader.

Link to comment
Share on other sites

As previously mentioned, make sure they are listed in the server traders list, in the server_traders.sqf. (In your case the file you mentioned above)

i am..my weapons guy is 

menu_Soldier_Sniper_KSVK_PMC for example is in there and when i go up to him it says "tactical specialist (KSVK)" 

 

 

Edit: also this is in my root init.sqf:

call compile preprocessFileLineNumbers "server_traders_tavi_13.sqf"; //Compile trader configs

 

so i know its pointed at the right traders sqf

Link to comment
Share on other sites

i am..my weapons guy is 

menu_Soldier_Sniper_KSVK_PMC for example is in there and when i go up to him it says "tactical specialist (KSVK)" 

I don't think you understand what we are saying. At the top of your server_traders_tavi_13.sqf, is a server traders list. It contains ONLY the skin names for traders (does not have skins prefixed with menu_). That is the list you need to have them in. Even if they are listed in the server_traders_tavi_13.sqf as menu_Soldier_Sniper_KSVK_PMC, for example, with all their menu listings, they will not show as a trader using the Advanced Trading, if they are not also listed in the server trader list. So, essentially, you will have two locations in server_traders_tavi_13.sqf where the skin name is listed. One location has the skin name, the second location has the skin name, with the prefix menu_ added to it. Post your server_traders_tavi_13.sqf and I'll tell you if it is correct.

Link to comment
Share on other sites

I don't think you understand what we are saying. At the top of your server_traders_tavi_13.sqf, is a server traders list. It contains ONLY the skin names for traders (does not have skins prefixed with menu_). That is the list you need to have them in. Even if they are listed in the server_traders_tavi_13.sqf as menu_Soldier_Sniper_KSVK_PMC, for example, with all their menu listings, they will not show as a trader using the Advanced Trading, if they are not also listed in the server trader list. So, essentially, you will have two locations in server_traders_tavi_13.sqf where the skin name is listed. One location has the skin name, the second location has the skin name, with the prefix menu_ added to it. Post your server_traders_tavi_13.sqf and I'll tell you if it is correct.

 

here is my cfg file.

/*

CUSTOM TRADERS FOR TAVIANA EPOCH

(Credits: DayZ Epoch Devs for their original traders.)

AUTHOR: AVendettaForYou

Date: 12/11/2013

*/

serverTraders = [

"GUE_Worker2",

"Soldier_Sniper_KSVK_PMC",

"Soldier_GL_PMC",

"GUE_Soldier_Pilot",

"GUE_Woodlander3",

"Worker4",

"Reynolds_PMC",

"Soldier_Sniper_PMC",

"GUE_Soldier_3",

"RU_Doctor",

"Doctor",

"UN_CDF_Soldier_Pilot_EP1",

"RU_Worker4",

"RU_Woodlander4",

"Citizen3",

"RU_Damsel5",

"Dr_Hladik_EP1",

"GUE_Commander",

"GUE_Soldier_CO",

"Profiteer2_EP1",

"RU_Farmwife5",

"GUE_Woodlander1",

"RU_Worker1",

"GUE_Soldier_2"];

/*---------------------------------------------------------------------------

HERO VENDORS

---------------------------------------------------------------------------*/

//COMBINATION VENDOR

menu_Soldier_Sniper_PMC = [

[["Ammunition",478],["Clothes",575],["Helicopter Armed",493],["Military Armed",562],["Trucks Armed",479],["Weapons",477],["Money",700]],

[],

"hero"

];

//SUPPLIES

menu_GUE_Woodlander3 = [

[["Building Supplies",508],["Toolbelt Items",510],["Vehicle Parts",509],["Money",700]],

[],

"neutral"

];

//MEDICAL

menu_RU_Doctor = [

[["Chem-lites/Flares",669],["Medical Supplies",670],["Smoke Grenades",671]],

[["FoodBioMeat","ItemZombieParts",1,1,"buy","Zombie Parts","Bio Meat",101]],

"neutral"

];

//FOOD & DRINK

menu_RU_Damsel5 = [

[["Backpacks",496],["Clothes",497],["Cooked Meats",580],["Drinks",498],["Packaged Food",579]],

[["ItemCopperBar","TrashJackDaniels",1,1,"buy","Empty Whiskey Bottle","Copper Bar",101]],

"neutral"

];

/*---------------------------------------------------------------------------

BANDIT VENDORS

---------------------------------------------------------------------------*/

//COMBINATION VENDOR

menu_GUE_Woodlander1 = [

[["Ammunition",478],["Clothes",575],["Helicopter Armed",493],["Military Armed",562],["Trucks Armed",479],["Weapons",477],["Money",700]],

[],

"hostile"

];

//SUPPLIES

menu_RU_Worker1 = [

[["Building Supplies",508],["Toolbelt Items",510],["Vehicle Parts",509],["Money",700]],

[],

"neutral"

];

//MEDICAl

menu_Dr_Hladik_EP1 = [

[["Chem-lites/Flares",669],["Medical Supplies",670],["Smoke Grenades",671]],

[["FoodBioMeat","ItemZombieParts",1,1,"buy","Zombie Parts","Bio Meat",101]],

"neutral"

];

//FOOD & DRINK

menu_RU_Farmwife5 = [

[["Backpacks",496],["Clothes",497],["Cooked Meats",580],["Drinks",498],["Packaged Food",579]],

[["ItemCopperBar","TrashJackDaniels",1,1,"buy","Empty Whiskey Bottle","Copper Bar",101]],

"neutral"

];

/*---------------------------------------------------------------------------

NEUTRAL VENDORS

---------------------------------------------------------------------------*/

//MEDICAL

menu_Doctor = [

[["Chem-lites/Flares",669],["Medical Supplies",670],["Smoke Grenades",671]],

[["FoodBioMeat","ItemZombieParts",1,1,"buy","Zombie Parts","Bio Meat",101]],

"neutral"

];

//SUPPLIES

menu_RU_Worker4 = [

[["Building Supplies",508],["Toolbelt Items",510],["Vehicle Parts",509],["Money",700]],

[],

"neutral"

];

//WEAPONS

menu_Soldier_Sniper_KSVK_PMC = [

[["Assault Rifle",637],["Light Machine Gun",638],["Pistols",674],["Shotguns and Single-shot",641],["Sniper Rifle",640],["Submachine Guns",642],["Overwatch VIL",1002],["Overwatch TAR",1003],["Overwatch Sniper",1011],["Overwatch SCAR",1004],["Overwatch sidearm",1001],["Overwatch MAS",1007],["Overwatch HK417",1009],["Overwatch HK416",1008],["Overwatch G3",1006],["Overwatch DMR",1010],["Overwatch ACR",1005]],

[],

"neutral"

];

//AMMUNITION

menu_Soldier_GL_PMC = [

[["Assault Rifle Ammo",609],["Light Machine Gun Ammo",610],["Pistol Ammo",611],["Shotguns and Single-shot Ammo",613],["Sniper Rifle Ammo",614],["Submachine Gun Ammo",612],["Overwatch Pistol Ammo",1012],["Overwatch Gun Ammo",1013]],

[],

"neutral"

];

//FOOD & DRINK

menu_Citizen3 = [

[["Backpacks",496],["Clothes",497],["Cooked Meats",580],["Drinks",498],["Packaged Food",579]],

[["ItemCopperBar","TrashJackDaniels",1,1,"buy","Empty Whiskey Bottle","Copper Bar",101]],

"neutral"

];

/*---------------------------------------------------------------------------

NEUTRAL VEHICLE VENDORS

---------------------------------------------------------------------------*/

menu_GUE_Soldier_3 = [

[["Bikes and ATV",587],["Buses and Vans",588],["Cargo Trucks",586],["Fuel Trucks",589],["Military Unarmed",598],["Trucks",590],["Used Cars",520],["Utility Vehicles",591],["Overwatch SP-Car",1015],["Overwatch S-Car",1016]],

[],

"neutral"

];

menu_RU_Woodlander4 = [

[["Bikes and ATV",587],["Buses and Vans",588],["Cargo Trucks",586],["Fuel Trucks",589],["Military Unarmed",598],["Trucks",590],["Used Cars",520],["Utility Vehicles",591],["Overwatch SP-Car",1015],["Overwatch S-Car",1016]],

[],

"neutral"

];

menu_Worker4 = [

[["Boats Armed",673],["Boats Unarmed",672]],

[],

"neutral"

];

menu_Profiteer2_EP1 = [

[["Boats Armed",673],["Boats Unarmed",672]],

[],

"neutral"

];

menu_GUE_Soldier_Pilot = [

[["Airplanes",517],["Helicopter Unarmed",519],["Overwatch Camel",1014]],

[],

"neutral"

];

menu_UN_CDF_Soldier_Pilot_EP1 = [

[["Airplanes",517],["Helicopter Unarmed",519],["Overwatch Camel",1014]],

[],

"neutral"

];

/*---------------------------------------------------------------------------

FRIENDLY VENDORS

---------------------------------------------------------------------------*/

//WEAPONS

menu_GUE_Commander = [

[["Assault Rifle",637],["Light Machine Gun",638],["Pistols",674],["Shotguns and Single-shot",641],["Sniper Rifle",640],["Submachine Guns",642],["Overwatch VIL",1002],["Overwatch TAR",1003],["Overwatch Sniper",1011],["Overwatch SCAR",1004],["Overwatch sidearm",1001],["Overwatch MAS",1007],["Overwatch HK417",1009],["Overwatch HK416",1008],["Overwatch G3",1006],["Overwatch DMR",1010],["Overwatch ACR",1005]],

[],

"neutral"

];

//AMMUNITION

menu_GUE_Soldier_CO = [

[["Assault Rifle Ammo",609],["Light Machine Gun Ammo",610],["Pistol Ammo",611],["Shotguns and Single-shot Ammo",613],["Sniper Rifle Ammo",614],["Submachine Gun Ammo",612],["Overwatch Pistol Ammo",1012],["Overwatch Gun Ammo",1013]],

[],

"neutral"

];

//HELICOPTERS

menu_GUE_Worker2 = [

[["Helicopter Unarmed",519]],

[],

"neutral"

];

/*---------------------------------------------------------------------------

WHOLESALE VENDORS

---------------------------------------------------------------------------*/

//EAST BRIDGE

menu_GUE_Soldier_2 = [

[["Wholesale",636]],

[],

"neutral"

];

//WEST BRIDGE

menu_Reynolds_PMC = [

[["Wholesale",636]],

[],

"neutral"

];

Link to comment
Share on other sites

Also, this may sound like a dumb question, but I have to ask, do all your traders show the normal trader menu? Or do the ones missing the Advanced menu also not have the normal menu?

 

Which traders don't have the Advanced menu?

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.

Link to comment
Share on other sites

Now what is still a problem for me is the "rabbit" for a vehicle. Each time I select vehicle at the trader it will first state my actual vehicle last driven "baf_offroad_d" and then immediately states "rabbit" and will always default to the rabbit and I am unable to do any trading in or out of a vehicle because of this. Anyone have a fix? Thanks.

Link to comment
Share on other sites

Well, until we come up with a fix, killing the Rabbit should work. I'm looking at the code right now that checks close vehicles. So far though, I don't think my ideas for how to fix it will work. Below is the code for one of my thoughts. Basically thinking it would check all vehicles and not Rabbit. If there is a way to exclude certain vehicle types, then that would be the way to do it. I am just not familiar enough with the coding.

Also, thought about doing it as an IF statement, first checking if its a Rabbit, then continuing the rest of the code if it isn't. But, that would probably just end up never running the rest of the code for some people.

 

Z_CheckCloseVehicle = {
Z_vehicle = objNull;
_vehicle = objNull;
_list = nearestObjects [(getPosATL player), (["AllVehicles"] && !"Rabbit"), Z_VehicleDistance];
{
if(!isNull _x && local _x && !isPlayer _x && alive _x && !(_x isKindOf "zZombie_base"))then{
systemChat format["Selected %1",typeOf _x];
_vehicle = _x;
};
}count _list;
_result = false;
if(!isNull _vehicle)then{
Z_vehicle = _vehicle;
_result = true;
[format["Buying in %1.", typeOf Z_vehicle]] call Z_filleTradeTitle;
};
_result
};

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