Jump to content
  • 0

Little help with return change on epoch 106


Th3-Hunter333

Question

Ok if you use the default currency of epoch 106 (gold/briefcases) It returns gems back to you when purchasing things from traders.

Anyone know a way to disable this?

Second question is does anyone know a way to get the coin system working for 106 (similar to zupa coins system 3.0 without banking)?

Any help would be greatly appreciated

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

I checked config variables and found both lines there so i edited it out which well it worked perfectly, I now just have another issue on hand which is why i was trying to do this.

I basically have gems setup in traders under their own prices (no single currency, just basic gold/briefs)

Essentially instead of using a certain amount of gold to buy things at traders, we have the ability to buy a tank with a ruby for example

class BMP2_INS { type = "trade_any_vehicle"; buy[] = {1, "ItemRuby"}; sell[] = {1, "ItemSapphire"};};

This is not working at all and is throwing an error 

Error zero divisor
Line 57 file z\addons\dayz_code\actions\Advancedtrading\functions\z_at_calcbuyablelist.sqf,

Clearly this error is being throw because of the blanked out variable for gemwortharray under configvariables which i cant seem to figure out what to change to get this all working out?

Again thanks for all the help guys, its very appreciated

Link to comment
Share on other sites

  • 0

Hey,

 

As @LunatikCH mentioned, if you want to disabled gems, you need to set this array to [] as he mentioned:

DZE_GemWorthArray = [];

I have tested buying and selling items with gems hardcoded into the traders and it works as expected:

	class Attachment_BELT {
		type = "trade_items";
		buy[] = {1,"ItemRuby"};
		sell[] = {1,"ItemTopaz"};
	};

You do need to have gems enabled for this to work though, since the script actually needs the "worth" of the items to use as currency. The silver, gold bars and briefcases all have an internal "worth" in the config files, all the DZE_GemWorthArray does is enable the specific items you put in that array to have a "worth" as well. So technically you could also add for instance, ItemHemp or plot_pole_kit to have a "worth"

*PLEASE NOTE* I did notice that buying works as expected but selling did not work correctly, It sold it using the same currency as the first item (Ruby) instead of Topaz.

Link to comment
Share on other sites

  • 0
8 hours ago, salival said:

Hey,

 

As @LunatikCH mentioned, if you want to disabled gems, you need to set this array to [] as he mentioned:


DZE_GemWorthArray = [];

I have tested buying and selling items with gems hardcoded into the traders and it works as expected:


	class Attachment_BELT {
		type = "trade_items";
		buy[] = {1,"ItemRuby"};
		sell[] = {1,"ItemTopaz"};
	};

You do need to have gems enabled for this to work though, since the script actually needs the "worth" of the items to use as currency. The silver, gold bars and briefcases all have an internal "worth" in the config files, all the DZE_GemWorthArray does is enable the specific items you put in that array to have a "worth" as well. So technically you could also add for instance, ItemHemp or plot_pole_kit to have a "worth"

*PLEASE NOTE* I did notice that buying works as expected but selling did not work correctly, It sold it using the same currency as the first item (Ruby) instead of Topaz.

you cannot use items other than gems in that config value. I did think about adding this feature, but it required too many SQF evaluations and too much time to be worth it.

Link to comment
Share on other sites

  • 0

Thanks again for the major help on this guys, Ill post here my findings so everyone can see it and know how to fix it.

DZE_GemWorthArray = [["ItemObsidian",9600000],["ItemRuby",4800000],["ItemSapphire",2400000],["ItemEmerald",1200000],["ItemAmethyst",600000]]; // Array of gem prices, only works with config traders.

This is the respective values that I had to use to have the correct prices that we need on our server.

I can confirm that when you sell it back it gives you back the gem that is in the buying variable instead of selling variable which is really strange.

For example it will give back a ruby when selling the vehicle instead of a sapphire which is what its set up to sell for in the trader configs (Strange one but it will work for now until i can find a way to fixing that one)

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
  • Discord

×
×
  • Create New...