Jump to content

[Release] Adding higher end currency to traders. v1.1 -working


NAIL

Recommended Posts

could I just replace itemgold with ItemRuby in my database to make it the only form of payment for a certain item like a tws weapon ???

 

like this

 

INSERT INTO Traders_DATA (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES
('["SCAR_H_STD_TWS_SD",3]', 200, '[2,"ItemRuby",1]', '[1,"ItemRuby",1]', 526, 'trade_weapons');
 
 
i TRIED THIS BUT IT DIDNT CHARGE FOR THE GUN. JUST GAVE IT TOO ME FOR FREE
I guess I need to run the scripts you posted to get the traders to take ruby as payment
Link to comment
Share on other sites

sooo all I need to do I can skip all the code and go to part B 
looks like all I need to do is add _old ????
INSERT INTO Traders_DATA (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES
('["SCAR_H_STD_TWS_SD",3]', 200, '[2,"ItemRuby",1]', '[1,"ItemRuby",1]', 526, 'trade_weapons_old');
 
 
edit....
works great thankz.....
Link to comment
Share on other sites

  • 1 month later...

What needs to be done is the ability to read whats in the backpack this would make briefs up to 72 briefs. Large gunbag + full inventory = 72. This would alleviate a lot as well. The bottom line is which is every the easiest for the epoch guys should be taken. I don't know how hard it would be to add a scan for the backpack on a player vs stacking items. Stacking might be easier?

Either way I agree we need to expand past the 12 brief limit. All the gem bases servers seem to have issues with lag, database not always updating properly. At least the one's ive been on.

Or have it so the brief need a larger amount to be added: instead of 1 10oz, make it 1 - 100oz, and a brief can hold 10 of these.

Honestly the best solution would be for the devs to add a new form of currency stacking: stacked briefcases. It doesn't mess with their auto-stack/auto change making feature, but it allows the 12 brief limit to be exceeded. For instance, player has 1 brief and sells a heli for a 2nd. Instead of having 2 briefs, they now have 2 full briefcases as a stacked item. Selling/buying adjusts the currency to the correct amount.

Link to comment
Share on other sites

Yes you could use trade ruby for briefcases. Also you could add "Gems" category to trader. And trade Gems for Briefcase in normal trading. But be carefull, Veins drop Ruby as well, so your player could find a jackpot in a mine.

 

On my server, AI missions drop Topaz, and 5 topaz could trade for Ruby. And for ruby you could get premium vehicles.

 

Also ItemTopaz is used for Rearm vehicles at service point. And for Topaz you could buy m107 bullets at traders.

 

I only use the trick of "_old" category names.

The only problem with this, is that all Gems have the same drop rate. There is no type of gem that is more rare than another.

Link to comment
Share on other sites

  • 2 weeks later...

I added a vehicle ammo strip script but it only works for vehicles that spawn via traders. If I spawn them in with the admin tool they have full ammo and every restart replenish ammo which is a problem.

 

I also have the ArmoredSUV_PMC (20,000 slot SUV) available for donators in our donation store. In an attempt to make this vehicle follow suit with the ammo strip script, I added the vehicle to all neutral and friendly traders (also get get people talking about it) as so...

item qty buy sell order tid afile
["ArmoredSUV_PMC",2] 20 [1,"ItemRuby",1] [1,"TrashTinCan",1] 0 701 trade_any_vehicle_old 

I did the same for another vehicle with a ItemTopaz as the buy, everything else is the same as above. This is the first time I tried to use gems as currency. I figured it was the easiest way since gems don't naturally spawn on my server and in an attempt to maintain control, only my admins can spawn gems.

 

The problem is, players can purchase these vehicles WITHOUT having a ruby or topaz in their inventory. When they DO have a ruby or topaz, the gem is taken as it normally would be, but when they don't have these items, the vehicle is STILL sold to them.

 

How do I fix this? Just a heads up, I don't know if this matters, but I don't have any types of gold/metal/silver/gem veins on my server. If this was answered above in the three pages on this thread, please direct me to it. I am at work and have limited time to read three pages of text.

Link to comment
Share on other sites

I added a vehicle ammo strip script but it only works for vehicles that spawn via traders. If I spawn them in with the admin tool they have full ammo and every restart replenish ammo which is a problem.

 

I also have the ArmoredSUV_PMC (20,000 slot SUV) available for donators in our donation store. In an attempt to make this vehicle follow suit with the ammo strip script, I added the vehicle to all neutral and friendly traders (also get get people talking about it) as so...

item qty buy sell order tid afile
["ArmoredSUV_PMC",2] 20 [1,"ItemRuby",1] [1,"TrashTinCan",1] 0 701 trade_any_vehicle_old 

I did the same for another vehicle with a ItemTopaz as the buy, everything else is the same as above. This is the first time I tried to use gems as currency. I figured it was the easiest way since gems don't naturally spawn on my server and in an attempt to maintain control, only my admins can spawn gems.

 

The problem is, players can purchase these vehicles WITHOUT having a ruby or topaz in their inventory. When they DO have a ruby or topaz, the gem is taken as it normally would be, but when they don't have these items, the vehicle is STILL sold to them.

 

How do I fix this? Just a heads up, I don't know if this matters, but I don't have any types of gold/metal/silver/gem veins on my server. If this was answered above in the three pages on this thread, please direct me to it. I am at work and have limited time to read three pages of text.

Im probably not the best help you're gonna get, but I'll give it a shot. Did you include the _old on the end of the afile in both the trader_items and the Traders_DATA tables on whatever item you're attempting to purchase/sell gems for?

 

I should clarify, is it set  _old  in BOTH of those places?

Link to comment
Share on other sites

Guys im trying to do it so that you pay 4 breifcases to buy one item that you cant get in game, e.g "ItemKiloHemp" 

Then you buy a tank with 5 hemps, so thats 20 breifcases?

But when you go to buy one of these with hemp, the vehicle spawns, but the trader doesnt take payment?

Even thought the classname is right, i replaced breifcases with hemp, etc it shows up?

 

Any ideas?

Link to comment
Share on other sites

  • 2 months later...
  • 4 weeks later...

0:57:09 "EPOCH SERVERTRADE: Player: AHappyTeddyBear (76561198092997456) bought a ItemAmethyst in/at Unknown Trader City for <null>x <null>"
0:57:09 Error in expression <urrency = _this select 5;
_qty = _this select 6;
_clientID = owner _player;
_p>
0:57:09 Error position: <select 6;
_clientID = owner _player;
_p>
0:57:09 Error Zero divisor

Gettint that error, eventhough it seems to be working fine. I can buy and sell gems

Link to comment
Share on other sites

  • 2 months later...

I am adding these to my traders, since I use single coin now I had to modify it to work.

class ItemObsidian 	{	type = "trade_items";	buy[] ={ 60000,"Coins"};sell[] = {40000,"Coins"};};
class ItemTopaz 	{	type = "trade_items";	buy[] ={ 60000,"Coins"};sell[] = {40000,"Coins"};};
class ItemRuby 	        {	type = "trade_items";	buy[] ={ 120000,"Coins"};sell[] = {100000,"Coins"};};
class ItemSapphire 	{	type = "trade_items";	buy[] ={ 120000,"Coins"};sell[] = {100000,"Coins"};};
class ItemEmerald 	{	type = "trade_items";	buy[] ={ 120000,"Coins"};sell[] = {100000,"Coins"};};	
class ItemAmethyst 	{	type = "trade_items";	buy[] ={ 80000,"Coins"};sell[] = {40000,"Coins"};};	
class ItemCitrine 	{	type = "trade_items";	buy[] ={ 40000,"Coins"};sell[] = {20000,"Coins"};};	
Link to comment
Share on other sites

  • 4 weeks later...

 

I am adding these to my traders, since I use single coin now I had to modify it to work.

class ItemObsidian 	{	type = "trade_items";	buy[] ={ 60000,"Coins"};sell[] = {40000,"Coins"};};
class ItemTopaz 	{	type = "trade_items";	buy[] ={ 60000,"Coins"};sell[] = {40000,"Coins"};};
class ItemRuby 	        {	type = "trade_items";	buy[] ={ 120000,"Coins"};sell[] = {100000,"Coins"};};
class ItemSapphire 	{	type = "trade_items";	buy[] ={ 120000,"Coins"};sell[] = {100000,"Coins"};};
class ItemEmerald 	{	type = "trade_items";	buy[] ={ 120000,"Coins"};sell[] = {100000,"Coins"};};	
class ItemAmethyst 	{	type = "trade_items";	buy[] ={ 80000,"Coins"};sell[] = {40000,"Coins"};};	
class ItemCitrine 	{	type = "trade_items";	buy[] ={ 40000,"Coins"};sell[] = {20000,"Coins"};};	

you dont have to modify anything if you're editing the trader configs. Just add them like a normal item. The _old thing is only for adding them to the database.

Link to comment
Share on other sites

  • 2 weeks later...

So I follow everything and I cant error when using the menu it says cannot find Complies/trade_metals.sqf. This is in the mission pbo under dayz_1.chernarus\EpochMods\Compiles not sure what I am doing incorrectly.

 

Okay correct script error now when clicking the Gems Menu nothing happens? 

Link to comment
Share on other sites

So I follow everything and I cant error when using the menu it says cannot find Complies/trade_metals.sqf. This is in the mission pbo under dayz_1.chernarus\EpochMods\Compiles not sure what I am doing incorrectly.

 

Okay correct script error now when clicking the Gems Menu nothing happens? 

Are you just trying to add them to the database or are you editing the trader configs?  If you're adding them to the database, you dont need to edit any server files besides the server_traders.sqf, the rest is done in the database. Read the whole thread, the beginning of this thread is from 2 versions or so ago and isn't applicable to 1.0.5.1

Link to comment
Share on other sites

  • 3 months later...

When i buy a thing in the trader for Sapphire it dont take the Sapphire from inventory

and dont give Sapphire if i sell

 

in my database a have made this

 

Item                                     qty           buy                             sell                         order          tid              afile

["M1A1_US_DES_EP1",2]   10   [3,"ItemSapphire",1]   [1,"ItemSapphire",1]           0           700        trade_any_vehicle

 

also tried

 

"M1A1_US_DES_EP1",2]   10   [3,"ItemSapphire",1]   [1,"ItemSapphire",1]              0          700       trade_any_vehicle_old

 

but it dont work 

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