Jump to content

[RELEASE] TradeFromVehicle - Version 2.0 is here!


Csus

Recommended Posts

Csus,

Maybe this is just on my end, but i will do my best to explain..

When trading magazines from vehicle, the count of items, and items sold per stage do not add up..... Just say 100 total magazines, in 5 different categories, INIT set to sell 10 per stage-----The trader tells you 28 stages.....

Also,

Going to any trader that sells items (not wepons) Like the medic guy, building, magazine guy---- It will tell you the same number of stages as stated above, even if you dont have an item they will buy from you, and will let you go through the motion of selling the items, but they dont sell... So if you have a truck full of ammo, and a few food items, and go to the food guy first, it will count all the items in truck, but only sell the 2 food items, 50 stages later..

 

Yuck, I certainly did not experience that and beyond sympathy I unfortunately have nothing to offer you. Do you get any errors in client/server RPT?

Link to comment
Share on other sites

@poweredbypot & fireplace. As I was only pulling PVDZE_plr_TradeMenuResult I assumed it would work for cobfig traders also, I'll see what I can do to make it compatible with them for you guys.

 

@poweredbypot. No, there is no way to turn trade from vehicle off. I figured that is what people would be wanting most considering the name. I could implement a way to turn that off also.

 

@williamv1999. I designed it so that any weapons or magazines that can't be sold at the current trader don't count toward the total amount of stages, they are ignored.

Could you tell me the settings you have in the init.sqf, this will help me testing for a cause to the issue.

Link to comment
Share on other sites

/* TradeFromVehicle Variables.                                                                                                                         */
/* Modify these variables as you see fit.                                                                                                            */

if ((isServer) || (isDedicated)) exitWith {diag_log "TFV, ERROR :: Tried to launch serverside where it does not belong!";};
waitUntil {!isNil "dayz_animalCheck"};

TFV_ATFB = true;   // Allow trading from backpack?
TFV_ACC =  true;   // Allow combining currency? This attempts to resort the player's money into as few items as possible, e.g. 10 * 10oz Gold into 1 * Gold Briefcase.
TFV_WIPS =   10;   // 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 =    10;   // 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.

call compile preprocessFileLineNumbers "TradeFromVehicle Version 2.0\system\functions.sqf";
call compile preprocessFileLineNumbers "TradeFromVehicle Version 2.0\system\variables.sqf";

sleep 0.5;

ExecVM "TradeFromVehicle Version 2.0\monitor.sqf";

 

Ok so here is the last test i did, just to check the staging... Items i used in the test in the Ural are below..

hatchet

M14 aim

m4a3 cco

MK 48 Mod O

 

Bandit Baklava

Bandit Mask

Bandit Sniper

Takistana Warlord

 

Morphine auto injector

2 Water Bottles empty

Coyote backpack

2 Gunbag

2 Survival ACU

 

The trade stages were tested at the Trader Bash on the building Supply trader (He sells Building Supplies, Toolbelt Items, Vehicle Parts)

Clicking the Trade weapons came up with one stage

trade magazines= 1 stage

trade all items= 3 stages

Link to comment
Share on other sites

@williamv1999. Thankyou for the information, it helps quite a lot. If I'm right in presuming, he should only buy the hatchet? If that is the case I believe I know where the issue is coming from. I'll work on a fix right away.

Link to comment
Share on other sites

@poweredbypot & fireplace. I've found the solution to adding compatability with config traders, I just have to implement it. A fix should be not too far away!

 

You're a beast, and I'm on the fence about trading from vehicles and will probably eventually cave and allow it. My goal is realism and I feel it detracts just a tiny bit, while backpack trading is something I feel should have always been a reality.

Link to comment
Share on other sites

@Csus , hello!

I have a question about changing the script. How to make sure that instead of taking information from a database, he took it out from custom traders and items files, like SQFs? 
And how to change gold and bc to Zupa Coins?

Thx u very much! Rly perfect work! :)
 

Link to comment
Share on other sites

@GaspArt, I'll answer you in 2 parts. 1 for each question.

 

#1. Are you meaning config traders? If so, I'm already working on getting that implemented.

#2. That's not something I can help you with. I never intended and I never do intend for this to be compatible with single currency scripts.

Link to comment
Share on other sites

@GaspArt. Yes, I'm in the process of making it work with config traders. It shouldn't be too long until it's done. But, I would recommend you use Zupa's Advanced Trading.

 TFV will never support single currencies, I intend on keeping it as simple and easy to use/install as possible. Also, it looks amazing!

 

@SadBoy1981. That's strange, I'll take a look into it and see if I can get it to do the same to me. I've never experienced it before though.

 

@P0ker_OF_Sm0t. No, it doesn't interact with the quantities. I tried to reduce the amount of calls to/for critical variables, to reduce any lag that could occur clientside. It only accesses trader info once, on startup, then it leaves it alone.

 

@Zupa. Can't wait to try out a version that supports default Epoch currencies! Damn fine work!

Link to comment
Share on other sites

loaded this on my test server and it seems great only thing I wish it had was to be able to chose which weapons to sell. If I chose sell from car and then sell weapons it sells everything in there.

 

while that is technically a limitation of this script, it does make the overall process much easier. I found a simple repeating announcement on the server that states:

 

"When using the vehicle/backpack trade option please be sure you intend to sell ALL items of a particular type, it does not discriminate!"

 

Otherwise Zupa is soon to release a complete re-work of traders that I would keep an eye on, this is intended as a more light-weight and simplistic option.

Link to comment
Share on other sites

Yes, it was designed primarily around the idea of people or groups taking large amount of weapons to the trader in one go with the aim to sell them all. But atleast with the ability to trade from your backpack you can (in a fashion) choose which guns to sell and still get the benefit of faster trading. Just chuck the ones you wanna sell in your backpack and go trade, it's not a perfect solution but it's a, by far, better alternative than to sell weapons one by one.

As poweredbypot just stated, this is intended to be a very simple script to use by the players and to install by server admins. With a lot of people running servers who don't yet have much confidence in their abilities to modify files I wanted to cater this towards them, it is literally a one liner. As he also stated, Zupa is working on a great piece which will give you exactly what you want, so look out for that if you're wanting more in-depth trading.

 

As for the main reason why I posted today; I just wanted to let you guys know I'm going to be away for a few days, maybe 3 or 4 I think. I'll continue with the config traders stuff once I'm back. Enjoy the rest of your weekend guys!

Link to comment
Share on other sites

Using the previous version and will use the new one when config traders are added. Loving the sell from backpack option.

 

Btw, getting a script error.

Error in expression < 1) select 1),_intPrice]];
};
} forEach _typeOfHumanityWeaponsMagazinesPricesRaw>
  Error position: <_typeOfHumanityWeaponsMagazinesPricesRaw>
  Error Undefined variable in expression: _typeofhumanityweaponsmagazinespricesraw
File mpmissions\__CUR_MP.Chernarus\custom\TradeFromVehicle\system\functions.sqf, line 78
Link to comment
Share on other sites

Wow I just looked at zupa's soon to be released version and it does look amazing. Sadly only for single currency so for now I'm gonna run with this lightweight version and let my players work it out. It's way better than the default system. thank you for sharing the script.

Link to comment
Share on other sites

Csus,

Just a question for an addition, or if you would tell me how to do it??? BTW, We are loving this script man... BIG PROPS TO YOU>>>>>

 

When clicking sell items from back pack, or vehicle, and you click sell it says starting trade in countdown..

How can it be changed to say___ Warning: All items (if selling items) / All weapons (if weapons) / All magazines (If mags) in Backpack (if from backpack) in Vehicle (if vehicle) will be sold to this trader... Move to cancel trade..........

 

Just thought it may help for guys joining sever first time at trader with TFVB...

Link to comment
Share on other sites

Testing today latest version.

Still bug with server restart! If you sell from vehicle before restart, and dont use vehicle after you sell all, after restart all items and weapons spawn back to vehicle and also u have money from selled items before restart! Good dupe for everyone...

How to fix this???

 Maybe add code that kick all vehicles  out of trader zone after restart and delete all items inside vehicle?

 

b_560_95_1.png

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