Pato

Items cost pop tabs and respect

9 posts in this topic

Hello All 

 

I was wondering if anyone knew a way to make items and or Vehicles cost both pop tabs and respect  to purchase?

Share this post


Link to post
Share on other sites
Advertisement

Mission config.cpp 

Care to elaborate, I think your lieing.

 

1 person likes this

Share this post


Link to post
Share on other sites

Care to elaborate, I think your lieing.

 

What a strange thing to say lol. Anyway, I think he is correct, I am no Arma programmer but you would need to add a 'respect' data member to config.cpp:

class U_B_GhillieSuit	{ quality = 2; price = 100; };

//Add respect:
class U_B_GhillieSuit	{ quality = 2; price = 100; respect = 5; };

 

Then probably edit quite a few scripts, first that comes to mind is "ExileServer_system_trading_network_purchaseItemRequest.sqf", add something like:

	_salesRespect = getNumber (missionConfigFile >> "CfgExileArsenal" >> _itemClassName >> "respect");
	if (_salesRespect <= 0) then
	{
		throw 6;
	};
	_playerRespect = _playerObject getVariable ["ExileScore", 0];
	if (_playerRespect < _salesRespect) then
	{
		throw 7;
	};
	_playerRespect = _playerRespect - _salesRespect;
	_playerObject setVariable ["ExileScore", _playerRespect]

I dunno, as I say I'm not massively familiar with Arma scripting, but I'd imagine its something like that.

Then you would have to edit quite a few other scripts to display the price etc etc. 

Edited by Dredd

Share this post


Link to post
Share on other sites

What a strange thing to say lol. Anyway, I think he is correct, I am no Arma programmer but you would need to add a 'respect' data member to config.cpp:

class U_B_GhillieSuit	{ quality = 2; price = 100; };

//Add respect:
class U_B_GhillieSuit	{ quality = 2; price = 100; respect = 5; };

 

Then probably edit quite a few scripts, first that comes to mind is "ExileServer_system_trading_network_purchaseItemRequest.sqf", add something like:

	_salesRespect = getNumber (missionConfigFile >> "CfgExileArsenal" >> _itemClassName >> "respect");
	if (_salesRespect <= 0) then
	{
		throw 6;
	};
	_playerRespect = _playerObject getVariable ["ExileScore", 0];
	if (_playerRespect < _salesRespect) then
	{
		throw 7;
	};
	_playerRespect = _playerRespect - _salesRespect;
	_playerObject setVariable ["ExileScore", _playerRespect]

I dunno, as I say I'm not massively familiar with Arma scripting, but I'd imagine its something like that.

Then you would have to edit quite a few other scripts to display the price etc etc. 

care to test it?

Share this post


Link to post
Share on other sites

Well, I guess I could give it a crack. I will have a go in 4 or so hours when I get a chance. Probably good to get some practical experience. I will report back with my findings unless someone more competent puts their hand up.

Share this post


Link to post
Share on other sites

Well, I guess I could give it a crack. I will have a go in 4 or so hours when I get a chance. Probably good to get some practical experience. I will report back with my findings unless someone more competent puts their hand up.

cheers let me know

Share this post


Link to post
Share on other sites

Hey I had a quick play around, managed to edit the mission config.cpp with a 'respect' data member no problems.

Implemented some changes to ExileServer_system_trading_network_purchaseItemRequest.sqf, and a few others. As a bare bones test, it makes the appropriate changes to the database (removing both money and respect). So it works and is quite possible.

However, it really is not working as it should. I have made so many errors and this is my first 'proper' look at the Exile code. I need to sift through it and work out what I am doing wrong.

Finally, MrWhite mentioned in a topic about the currency system (/topic/3510-limit-pop-tabs-to-3000-and-add-commodities/) that there would be changes to the currency system in the near future. So I don't know how much time I will burn on this because, obviously there are going to be some new ideas coming forth and I would tip that they may implement something similar to what you are suggesting.

I will have another look tomorrow, but I wouldn't hold your breath on anything from me too soon.

Share this post


Link to post
Share on other sites

Has any body been working on this or did u get this working Dredd?

Edited by DIamond

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.