Jump to content
Creep

Release Auction House (MMO Style)

Recommended Posts

tested your new version. got the same problem, sell items button won't do anything. no errors whatsoever.

but...

I think I found a solution:

 

in itemstore.hpp change:

 

onButtonClick = "[(ctrlText 15003)] spawn player_sellitem;";

 

to

 

onButtonClick = "[(ctrlText 15003)] execVM 'custom\scripts\auctionhouse\player_sellitem.sqf'";

 

this works. also the same has to be done for player_buyitem I guess. but Im not there yet. :) will inform you abou that too.

 

€: @ Creep: check the server_sellitem. there is a misspelling:

 

pice instead of price.

Share this post


Link to post
Share on other sites

Thats just a variable Name not a Problem :D

I know what I forgot to add,there was a part you need a custom compiles for, I will change it today:

Do this and everything will work with the normal version.

Compiles.sqf

Add:

player_claimmoney = compile preprocessFileLineNumbers "custom\scripts\auctionhouse\claimmoney.sqf";

player_sellitem = compile preprocessFileLineNumbers "custom\scripts\auctionhouse\player_sellitem.sqf";

player_buyitem = compile preprocessFileLineNumbers "custom\scripts\auctionhouse\player_buyitem.sqf";

Under this block of code (this might look a bit different)

if (DZE_ConfigTrader) then {

call compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_traderMenuConfig.sqf";

}else{

call compile preprocessFileLineNumbers "ZSC\gold\player_traderMenu.sqf";

};

Sorry for the mistake, haven't remembered about this one :S

Share this post


Link to post
Share on other sites

np so far. I figured it out somehow. ;)

also I got my non sc version working.

if its ok, I will release it. maybe you can put it in the maintopic as an alternative for non sc users.

 

and another note:

 

} else {
    _emptySlots = [player] call BIS_fnc_invSlotsEmpty;
    _free_magazine_slots = _emptySlots select 4;

    if(_free_magazine_slots < 1) exitWith {
        cutText [(localize "STR_DAYZ_CODE_2"), "PLAIN DOWN"];
    };
};

 

should be changed to:

 

} else {
    _emptySlots = [player] call BIS_fnc_invSlotsEmpty;
    _free_magazine_slots = _emptySlots select 4;

    if(_free_magazine_slots < 1) exitWith {
        cutText [(localize "STR_DAYZ_CODE_2"), "PLAIN DOWN"];
    };
    _abort = false;
};

 

else you get clientlogs for undefined variable _abort if the item is not a weapon but an item.

Share this post


Link to post
Share on other sites

Thanks for the report, gonna add that later :)

And yes, if you want to you can message me the NON-SC version and I will add it to the main post asap (including credits) I guess there is no instruction change needed?

Share this post


Link to post
Share on other sites

Im getting

ErrorMessage: File mpmissions\DayZ_Overpoch_1.Chernarus\custom\scripts\auctionhouse\itemstore.hpp, line 28: /itemstore/controlsBackground.Life_RscTitleBackground: Undefined base class 'Life_RscText'

Any clues as to where I should start looking with this?

Share this post


Link to post
Share on other sites

I can sell items just fine and they show up in the database, but when i want to view the buy list it doesnt show any items.

 

I checked all the logs and they all look fine, so im at a lose why it's doing it.

 

If anyone can show me the right way that would be great.

Share this post


Link to post
Share on other sites
Guest

Hi,

 

i can't understand this.. This script is what, for arma2 or arma3 ? Because this is the arma2 forum and the extDB is just for arma3 :huh: or did i get that wrong?

Share this post


Link to post
Share on other sites
Guest

Smal Note:

Found in the server_sellitem.sqf "_price" - In that file it should be "_pice" :)

 

//EDIT:

Also a suggestion:

_query = "SELECT id, classname, price, type, PlayerUID FROM store WHERE PlayerUID != '0' ORDER BY Datestamp ASC";
{
	if ((_x select 3) == 0) then {
		_displayName = getText(configFile >> "CfgMagazines" >> (_x select 1) >> "displayName");
	} else {
		_displayName = getText(configFile >> "CfgWeapons" >> (_x select 1) >> "displayName");
	};
	if (_x select 4 == (getPlayerUID player) then {
		_displayName = _displayName + " (MY ITEM)";
	} else {
		_displayName = _displayName + " (For: " + str(_x select 2) + ")";
	};
	_control lbAdd _displayName;
	_tmp = str(_x);
	_control lbSetData [(lbSize _control)-1,_tmp];
} count _items;

Share this post


Link to post
Share on other sites
Guest
private ["_playerUID","_itemList","_randList","_query","_result"];

_playerUID	=	1;
_itemList	= 	[
					["cinder_door_kit",40000],
					["cinder_garage_kit",40000],
					["cinder_wall_kit",40000],
					["ItemWoodFloor",40000],
					["metal_floor_kit",40000]
				];
_randList	=	[];

while {count _randList < 15} do {
	private ["_temp"];
	_temp = [];
	_temp = _itemList select floor random count _itemList;
	_randList set [count _randList,_temp];
};

_query	=	"DELETE * FROM store WHERE PlayerUID = '1'";
_result	=	[_query, 1, true] call fn_asyncCall;

_query	=	"DELETE * FROM store_user WHERE PlayerUID = '1'";
_result	=	[_query, 1, true] call fn_asyncCall;

{
	_query = format["INSERT INTO store (PlayerUID, Classname, price, type) VALUES ('%1', '%2', '%3', '1')",_playerUID,(_x select 0),(_x select 1)];
	diag_log format ["[STORE] Inserting %1 for %2",(_x select 0),(_x select 1)];
	_result =	[_query, 1, true] call fn_asyncCall;
} count _randList;

Share this post


Link to post
Share on other sites
Guest

Nice thing there, thanks for sharing

 

No problem, that was actually not tested, you might have to Update the Querys, because the last time i worked with querys was pff ages ago xD

Share this post


Link to post
Share on other sites

Everything seems to be in place, but I don't get any new options at the traders. I'm using Zupas ZSC 3.0 for single currency. No idea why none of the auction house buttons are showing up.

 

I'm waiting on someone to give me a little help with the extDB. I have it in my OA directory with the database field filled out. Is everyone who joins supposed to ad the @extDB to the launch parameters? I use Vilayer for hosting if that helps.

 

Thanks in advance!! ;-)

 

UPDATE: The overwrite files from ZUPA's 3.0 Single Currency were loading his fn_selfactions file. That why i didn't get the scroll options. extDB is setup and working on Vilayer.

 

Do you think it would be possible to add a way to look at what you have in the auction house and make a way that you can take it back if you later decide you don't want to sell it?

 

Thanks for the awesome mod!!!! ;-)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...