Jump to content

[Release] HS Blackmarket 1.6 | 'New' Trader System | Special Trader | Blackmarket


Suppe

Recommended Posts

Hello,

Changed this via page 38

    _player = _this select 0;
    _nr = _this select 1;
    _cIndex = EPOCH_customVars find "Crypto";
    _vars = _player getVariable["VARS", call EPOCH_defaultVars_SEPXVar];
    _current_crypto = _vars select _cIndex;
    _current_cryptoRaw = _current_crypto;
    _playerCryptoLimit = EPOCH_customVarLimits select _cIndex;
    _playerCryptoLimit params ["_playerCryptoLimitMax","_playerCryptoLimitMin"];
    _current_crypto = ((_current_cryptoRaw + _nr) min _playerCryptoLimitMax) max _playerCryptoLimitMin;
    _newcrypt remoteExec ['EPOCH_effectCrypto',(owner _player)];
    _vars set[_cIndex, _current_crypto];
    _player setVariable["VARS", _vars];

 

Even tried both syntax 'VARS' and "Vars" as this is how it is written in the "fix" Still no money changing hands, So i cant even tell if the money comes back after player logs.

***Update: Fixed. Works!

To clarify why the fix. This fixes BM trader from selling and buying items with no crypto exchange taking place.

Change this line

_newcrypt remoteExec ['EPOCH_effectCrypto',(owner _player)];  to _current_crypto remoteExec ['EPOCH_effectCrypto',(owner _player)];

This being said, One of the Masters of the Universe pointed out in my .cfg file that on the last line there was a hidden symbol in the x position. ["VARS",_vats];x

can't see it in notepad++ Rewrote the entire line. Works! I likely added it in that space somehow, somewhere a day or two ago and simply couldn't find it.

Tip: sometimes copy/paste does this.

Link to comment
Share on other sites

Are there any errors in client or server rpt? Normally it should work. 
Someone has posted a while ago, he was using other mods from halv, where also was HALV_takegive_crypto in. Eventually you also use others mods with this variable and you have to also change this file?

Link to comment
Share on other sites

Hello, has anyone tried changing the HS blackmarket trader billboard and flag yet?

I cut and saved out the old dkflagpole and trader .jpg and placing  new image same size/name .jpg for both into the epoch.Altis\trader folder where they are located.

But the old images still remain after i restart the server. I thought perhaps a cache folder on my side is keeping the old files, so i removed the cached missions, then removed both jpg files from the trader folder in the mission.pbo and popped the server...no flag no billboard As expected... because i removed them right?

Now once i replaced the NEW images once again, and only them, the old pics come back.

My question is. How the heck is it reading the old pictures if they don't exist in the folder? Moreover, why is it not showing the .jpg i placed in that very folder?

Link to comment
Share on other sites

  • 2 weeks later...
  On 9/7/2016 at 10:16 AM, Karma_UK said:

It is very simple to fix.

 

Open tradedialog.hpp

Got to line 123.  Assuming you have the default file, the few lines above this should read :

class HS_trader_tree: HALV_CT_TREE
        {
            idc = 9997;
            text = "";
            x = 0.458763 * safezoneW + safezoneX;
            y = 0.225069 * safezoneH + safezoneY;
            w = 0.247423 * safezoneW;
            h = 0.549862 * safezoneH;
            onTreeDblClick = "_this call HS_additemtolb;false";
            onTreeSelChanged = "_this call Halv_onlbtreeselected;false";

 

If not, then the end of this block of code is where you want to be, BEFORE the curly bracket that closes off the section. Cut and paste the following to that location:

 

            colorPicture[] = {0,0,0,0};
            colorPictureSelected[] = {0,8,0,0,8};
            colorPictureDisabled[] = {0,8,0,0,8};
            colorPictureRight[] = {0,8,0,0,8};
            colorPictureRightSelected[] = {0,8,0,0,8};
           colorPictureRightDisabled[] = {0,8,0,0,8};
          

All you are doing is defining colours for items as called for by the script. The (0,8,0,0,8} can be changed to any colour you wish but for now I suggest you check that it works before you start changing it. 

Hope that is clear enough. Shout if you have any questions. 

PS I only just read back through the thread and saw you asked these questions before. Wish I had said something sooner. Sorry to leave you hanging like that bro. Hope you get it sorted now anyway

 

 

Expand  

My server refuses to load with this fix. Could there be an issue with the HALV_CT_TREE itself in the Halv_defines.hpp? I haven't modified that file but the tradedialog.hpp calls for the tree from that file yes?

class HALV_CT_TREE
{
    access = 0; // Control access (0 - ReadAndWrite, 1 - ReadAndCreate, 2 - ReadOnly, 3 - ReadOnlyVerified)
    type = CT_TREE; // Type is 12
    style = ST_LEFT; // Style
    x = 0.35567 * safezoneW + safezoneX;
    y = 0.137091 * safezoneH + safezoneY;
    w = 0.438144 * safezoneW;
    h = 0.725818 * safezoneH;
    colorBorder[] = {0,.5,1,.8}; // Frame color
    colorBackground[] = {0.2,0.2,0.2,0.6}; // Fill color
    colorSelect[] = {1,0.5,0,1}; // Selected item fill color (when multiselectEnabled is 0)
    colorMarked[] = {1,0.5,0,0.5}; // Marked item fill color (when multiselectEnabled is 1)
    colorMarkedSelected[] = {1,0.5,0,1}; // Selected item fill color (when multiselectEnabled is 1)
    sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";// Text size
    font = "EtelkaMonospacePro"; // Font from CfgFontFamilies
    shadow = 1; // Shadow (0 - none, 1 - N/A, 2 - black outline)
    colorText[] = {1,1,1,1}; // Text color
    colorSelectText[] = {1,1,1,1}; // Selected text color (when multiselectEnabled is 0)
    colorMarkedText[] = {1,1,1,1}; // Selected text color (when multiselectEnabled is 1)
    tooltip = ""; // Tooltip text
    tooltipColorShade[] = {0,0,0,1}; // Tooltip background color
    tooltipColorText[] = {1,1,1,1}; // Tooltip text color
    tooltipColorBox[] = {1,1,1,1}; // Tooltip frame color
    multiselectEnabled = 0; // Allow selecting multiple items while holding Ctrl or Shift
    expandOnDoubleclick = 1; // Expand/collapse item upon double-click
    hiddenTexture = "A3\ui_f\data\gui\rsccommon\rsctree\hiddenTexture_ca.paa"; // Expand icon
    expandedTexture = "A3\ui_f\data\gui\rsccommon\rsctree\expandedTexture_ca.paa"; // Collapse icon
    maxHistoryDelay = 1; // Time since last keyboard type search to reset it
    // Scrollbar configuration
    class ScrollBar
    {
        width = 0; // width of ScrollBar
        height = 0; // height of ScrollBar
//        scrollSpeed = 0.01; // scroll speed of ScrollBar
        arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; // Arrow
        arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; // Arrow when clicked on
        border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; // Slider background (stretched vertically)
        thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; // Dragging element (stretched vertically)
        color[] = {1,1,1,1}; // Scrollbar color
    };
    colorDisabled[] = {0,0,0,0}; // Does nothing, but must be present, otherwise an error is shown
    colorArrow[] = {0,0,0,0}; // Does nothing, but must be present, otherwise an error is shown
};

 

Any ideas?

Link to comment
Share on other sites

  On 9/28/2018 at 4:50 PM, He-Man said:

YOu should provide us your server rpt log to check for errors

Expand  

 7:38:20 Error context ] = {0,0,0,0};
 7:38:20 Warning Message: File mpmissions\__cur_mp.Altis\trader\tradedialog.hpp, line 115: '/HS_trader_dialog/controls/HS_trader_tree.colorPicture': '[' encountered instead of '='
 7:38:20 Warning Message: Config : some input after EndOfFile.

Link to comment
Share on other sites

  Quote

 7:38:20 Error context ] = {0,0,0,0};
 7:38:20 Warning Message: File mpmissions\__cur_mp.Altis\trader\tradedialog.hpp, line 115: '/HS_trader_dialog/controls/HS_trader_tree.colorPicture': '[' encountered instead of '='
 7:38:20 Warning Message: Config : some input after EndOfFile.

Expand  
  Quote

If there is a typo somewhere in that line, I'll have to unpack the PBO and have a go at it. I'll know for sure once I get home from work.

Expand  

Here is line 114-130. I am unable to figure out why the error is triggering:

        class HS_trader_tree: HALV_CT_TREE
        { <---line 115
            idc = 9997;
            text = "";
            x = 0.458763 * safezoneW + safezoneX;
            y = 0.225069 * safezoneH + safezoneY;
            w = 0.247423 * safezoneW;
            h = 0.549862 * safezoneH;
            onTreeDblClick = "_this call HS_additemtolb;false";
            onTreeSelChanged = "_this call Halv_onlbtreeselected;false";
            colorPicture [] = {0,0,0,0};
            colorPictureSelected [] = {0,8,0,0,8};
            colorPictureDisabled [] = {0,8,0,0,8};
            colorPictureRight [] = {0,8,0,0,8};
            colorPictureRightSelected [] = {0,8,0,0,8};
            colorPictureRightDisabled [] = {0,8,0,0,8};
        };

 

Link to comment
Share on other sites

I am not 100% sure, but it seems you have some weird (invisible) symbols in the text.
Replace these lines please and try again:
 

        class HS_trader_tree: HALV_CT_TREE
        {
            idc = 9997;
            text = "";
            x = 0.458763 * safezoneW + safezoneX;
            y = 0.225069 * safezoneH + safezoneY;
            w = 0.247423 * safezoneW;
            h = 0.549862 * safezoneH;
            onTreeDblClick = "_this call HS_additemtolb;false";
            onTreeSelChanged = "_this call Halv_onlbtreeselected;false";
            colorPicture[] = {0,0,0,0};
            colorPictureSelected[] = {0,8,0,0,8};
            colorPictureDisabled[] = {0,8,0,0,8};
            colorPictureRight[] = {0,8,0,0,8};
            colorPictureRightSelected[] = {0,8,0,0,8};
            colorPictureRightDisabled[] = {0,8,0,0,8};
        };

 

Link to comment
Share on other sites

  On 9/29/2018 at 1:59 PM, He-Man said:

I am not 100% sure, but it seems you have some weird (invisible) symbols in the text.
Replace these lines please and try again:
 

        class HS_trader_tree: HALV_CT_TREE
        {
            idc = 9997;
            text = "";
            x = 0.458763 * safezoneW + safezoneX;
            y = 0.225069 * safezoneH + safezoneY;
            w = 0.247423 * safezoneW;
            h = 0.549862 * safezoneH;
            onTreeDblClick = "_this call HS_additemtolb;false";
            onTreeSelChanged = "_this call Halv_onlbtreeselected;false";
            colorPicture[] = {0,0,0,0};
            colorPictureSelected[] = {0,8,0,0,8};
            colorPictureDisabled[] = {0,8,0,0,8};
            colorPictureRight[] = {0,8,0,0,8};
            colorPictureRightSelected[] = {0,8,0,0,8};
            colorPictureRightDisabled[] = {0,8,0,0,8};
        };

 

Expand  

Please make a note that the original post for this fix has a space before the double brackets for lines 124-129. That was the issue. Server started immediately using the above text and the error no longer appears. Many Thanks He-Man! Spot on!

Now for the colors.

The following code will allow the original item icons to show in the menu instead of being transparent until you click on them.

            colorPicture[] = {1,1,1,1};
            colorPictureSelected[] = {1,1,1,1};
            colorPictureDisabled[] = {1,1,1,0.25};
            colorPictureRight[] = {1,1,1,1};
            colorPictureRightSelected[] = {1,1,1,1};
            colorPictureRightDisabled[] = {1,1,1,0.25};

The above code is the correct color scheme.

 

Thanks to everyone who has contributed to this post and the original fix. Brilliant minds!

Link to comment
Share on other sites

Hello People, I have a issue that keeps poping up : Player finds a vehicle and tries to sell but get a error message :    ERROR Attempt to sell (name of Vehicle) twice, and does not give Crypto and does not remove the vehicle. I look at the script and say this  which refers to it, but not a clue if or how to fix.

          ( HS_playertraderequest.sqf)

      if(_isrental > 0)then{
                        _message = _message + format[" || %1 'Rental' is OK to sell, dam: %2 pricemod: %3",_x select 4,damage _obj,_damagepricereduction];
                        removeFromRemainsCollector[_obj];
                        _obj setVariable["VEHICLE_SLOT","ABORT",true];
                        _obj setVariable["HSHALFPRICE",0,true];
                        _obj call HALV_PurgeObject;
                        _cost = ((_x select 1)/_damagepricereduction);
                        _return = _return + _cost;
                    }else{
                        _message = _message + format[" || - ERROR Attempt to sell %1 twice -",_x select 4,_player];
                    };

pics below

https://imgur.com/a/UsOXJ81

https://imgur.com/a/4WMLhhL

 

Link to comment
Share on other sites

  On 10/2/2018 at 3:54 PM, megaz said:

Hello People, I have a issue that keeps poping up : Player finds a vehicle and tries to sell but get a error message :    ERROR Attempt to sell (name of Vehicle) twice, and does not give Crypto and does not remove the vehicle. I look at the script and say this  which refers to it, but not a clue if or how to fix.

          ( HS_playertraderequest.sqf)

      if(_isrental > 0)then{
                        _message = _message + format[" || %1 'Rental' is OK to sell, dam: %2 pricemod: %3",_x select 4,damage _obj,_damagepricereduction];
                        removeFromRemainsCollector[_obj];
                        _obj setVariable["VEHICLE_SLOT","ABORT",true];
                        _obj setVariable["HSHALFPRICE",0,true];
                        _obj call HALV_PurgeObject;
                        _cost = ((_x select 1)/_damagepricereduction);
                        _return = _return + _cost;
                    }else{
                        _message = _message + format[" || - ERROR Attempt to sell %1 twice -",_x select 4,_player];
                    };

pics below

https://imgur.com/a/UsOXJ81

https://imgur.com/a/4WMLhhL

 

Expand  

I believe the answer to this is back on page 38. I had a similar issue but with buying vehicles from the HS Traders.

 

Link to comment
Share on other sites

Thank for the reply

I already have that see below ?

  Reveal hidden contents

 

Or should it be like this ?

//he-mans fix
_player = _this select 0;
_nr = _this select 1;
_cIndex=EPOCH_customVars find 'Crypto';
_vars = _player getVariable['VARS', call EPOCH_defaultVars_SEPXVar];
_curcrypt = _vars select _cIndex;
_newcrypt = _curcrypt+_nr;
_newcrypt remoteExec ['EPOCH_effectCrypto',(owner _player)];
_vars set[_cIndex,_newcrypt];
_player setVariable["VARS",_vars];

Link to comment
Share on other sites

I had more lines than what was posted. The lines that were similar I corrected to match He-Mans fix. I'll post my file after I get home from work. But what he posted did in fact work for me. I'll update with specifics so you can see the difference.

This is the original file:

_player = _this select 0;
_nr = _this select 1;
_cIndex=EPOCH_customVars find 'Crypto';
_vars = _player getVariable['VARS',[]+EPOCH_defaultVars_SEPXVar];
_curcrypt = _vars select _cIndex;
_newcrypt = _curcrypt+_nr;
[['effectCrypto',_newcrypt],(owner _player)]call EPOCH_sendPublicVariableClient;
_vars set[_cIndex,_newcrypt];
_player setVariable["VARS",_vars];

This is what I had to change it to:

_player = _this select 0;
_nr = _this select 1;
_cIndex=EPOCH_customVars find 'Crypto';
_vars = _player getVariable['VARS', call EPOCH_defaultVars_SEPXVar];
_curcrypt = _vars select _cIndex;
_newcrypt = _curcrypt+_nr;
_newcrypt remoteExec ['EPOCH_effectCrypto',(owner _player)];
_vars set[_cIndex,_newcrypt];
_player setVariable["VARS",_vars];

Also make sure your init.sqf for your mission.pbo contains these:

[] execVM "trader\init.sqf";
[] execVM "trader\resetvehicleammo.sqf";
[] execVM "trader\HALV_takegive_crypto_init.sqf";

 

Link to comment
Share on other sites

Thanks for the reply C4- Added the same as you have in HALV_takegive_crypto.sqf

 

//he-mans fix
_cryptolimit = 250000;  (This is the only difference)
_player = _this select 0;
_nr = _this select 1;
_cIndex=EPOCH_customVars find 'Crypto';
_vars = _player getVariable['VARS', call EPOCH_defaultVars_SEPXVar];
_curcrypt = _vars select _cIndex;
_newcrypt = _curcrypt+_nr;
_newcrypt remoteExec ['EPOCH_effectCrypto',(owner _player)];
_vars set[_cIndex,_newcrypt];
_player setVariable["VARS",_vars];

got these at top of my init:

[] execVM "trader\init.sqf";
[] execVM "trader\resetvehicleammo.sqf";
[] execVM "trader\HALV_takegive_crypto_init.sqf";
[] execVM "R3F_LOG\init.sqf";
_igiload = execVM "IgiLoad\IgiLoadInit.sqf";
[] execVM "addons\halv_spawn\init.sqf";

 

but still getting : Cant sell vehicle twice error 

Seems to be random - if i sell say a box truck first one will sell and then the 2nd - 3rd or 4th wont sell with that error ?

any one have any idea what to check ?

thanks

MegaZ


 

 

Link to comment
Share on other sites

Hi C4 logs below

I could not see where it was not sold.

Client RPT

  Reveal hidden contents

 

Link to comment
Share on other sites

Server RPT

  Reveal hidden contents

Link to comment
Share on other sites

The first line here is followed by an entire list of everything listed twice. Sell/Buy Items? This may be the issue.

10:01:16 Unexpected stringtable format inside <Text ID="STR_CUP_lib_cz805"><Russian>

You have another error unrelated (WAI ERROR) that you might want to look into

10:03:56 Error in expression <5 = [                 
    false,               
   Mission,            
         18,       >
10:03:56   Error position: <Mission,            
         18,       >
10:03:56   Error Undefined variable in expression: mission
10:03:56 File epochz\init\fn_init.sqf [epochz_fnc_init], line 995

This is my best guess. Hopefully someone else can respond that has more experience.

Link to comment
Share on other sites

  • 2 weeks later...

I am having trouble installing this script to my server.

I have followed the instructions contained in the readme disregarding the exec edit to befilters, as an earlier post said to do.

I have changed my HALV_takegive_crypto to match the post by C4

I am getting kicked for a script restriction #32.

 

scripts.log

  Reveal hidden contents

scripts.txt befilter

  Reveal hidden contents

server.rpt

  Reveal hidden contents

client.rpt

  Reveal hidden contents

 

Link to comment
Share on other sites

  On 10/15/2018 at 11:13 PM, Tuhjay said:

I am having trouble installing this script to my server.

I have followed the instructions contained in the readme disregarding the exec edit to befilters, as an earlier post said to do.

I have changed my HALV_takegive_crypto to match the post by C4

I am getting kicked for a script restriction #32.

 

scripts.log

  Reveal hidden contents

scripts.txt befilter

  Reveal hidden contents

server.rpt

  Reveal hidden contents

client.rpt

  Reveal hidden contents

 

Expand  

Are you using the BEM BattlEye Filter tool to update your .txt files?

Link for tool: http://bem.themeq.xyz/index.php

Line #32, this is where all script restriction #32's go:

5 createAgent !="bis_revive_ratioLethal = createAgent [\"Logic\", [10,10,0], [], 0, \"CAN_COLLIDE\"];" !="_unit = createAgent[_unitClass, _targetPos, [], 256, \"FORM\"];" !="_unit = createAgent [_unitClass, _targetPos, [], 120, \"FORM\"];" !="_animal = createAgent[_randomAIClass, _animalPos, [], 5, \"NONE\"];" !="_unit = createAgent [\"Epoch_Cloak_F\", _pos, [], 0, \"CAN_COLLIDE\"];" !="_unit = createAgent [\"Epoch_Sapper_F\", _targetPos, [], 180, \"FORM\"];" !="_sapper = createAgent [\"Epoch_Sapper_F\", getPos _cage2, [], 0, \"FORM\"];" !="_unit = createAgent[_unitClass, position player, [], _zRange, \"FORM\"];" !="_animal = createAgent[_randomAIClass, _animalPos, [], 0, \"CAN_COLLIDE\"];" !="_axeSapper = createAgent [\"Epoch_Sapper_F\", _pos, [], 12, \"FORM\"];" !="_nestMate = createAgent [\"Epoch_Sapper_F\", _garrPos, [], 0, \"FORM\"];"

Your script restriction #32. You need to use the BEM tool to add this to the above line:

"pos0 = [(_coords select 0),(_coords select 1),0];
_unit = createAgent [_agent, _pos0, [], 0, "CAN_COLLIDE"];
_unitdir = _objects"

Download the .log and .txt file to your PC. The edit takes place on your PC in the BattlEye folder where you installed Arma3. You will upload the updated file to your server and restart for it to take effect or wait until your server restarts if its scheduled to do so.

Edited by C4-timah
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...