lwbuk Posted January 3, 2017 Report Share Posted January 3, 2017 Had an interesting one yesterday. I noticed something odd going on and on further investigation noticed a player had either spawned in or duped about 400 briefcases. He never left stary, and seemed to buy just a MTVR, large gunbag and a briefcase before this. In the RPT, it simply says, "player bought 60x briefcase for" but then has no price as it usually would with a trade. He did this about 6 times from what I could see. He then filled up the mtvr and another car that was there and disconnected. Of course before I realized what was happening, people had taken all the briefs, so now the server is quite a bit richer. I have found 2 other players who took the majority and deleted all their gear, but about 120 are unaccounted for. So was this a friendly script kiddie, or is there some huge dupe I dont know about. Its the fact he bought 60 briefs with no payment has me confused. Could it be he spawned them in, but because he was in a trader the anti hack thought they were purchased? Link to comment Share on other sites More sharing options...
icomrade Posted January 3, 2017 Report Share Posted January 3, 2017 Is this with 1.0.6 or 1.0.5.1, standard or advanced trading? Link to comment Share on other sites More sharing options...
lwbuk Posted January 3, 2017 Author Report Share Posted January 3, 2017 It's 1.06. I'll look at the fix, thanks. Link to comment Share on other sites More sharing options...
lwbuk Posted January 3, 2017 Author Report Share Posted January 3, 2017 @ebaydayz Ive applied the fix, but this is still possible to do. I need this fixed asap, as you can get unlimited money for free. My z_at_toBuyingList.sqf looks like this now. This correct for the fix? Do I need to all of the changes in ffef031 too? Spoiler private ["_amount","_index","_index2","_temp"]; #include "defines.hpp" _index = _this select 0; _amount = parseNumber(_this select 1); if (!isNil "_index" && {_index > -1} && {typeName _amount == "SCALAR"} && {_amount > 0}) then { _temp = [] + (Z_BuyableArray select _index); _temp set [9,(ceil _amount)]; Z_BuyingArray set [count(Z_BuyingArray),_temp]; _index2 = lbAdd [Z_AT_BUYINGLIST, format["%1x: %2",_temp select 9,_temp select 3]]; lbSetPicture [Z_AT_BUYINGLIST, _index2, _temp select 4]; call Z_calcPrice; }; Link to comment Share on other sites More sharing options...
salival Posted January 3, 2017 Report Share Posted January 3, 2017 48 minutes ago, lwbuk said: @ebaydayz Ive applied the fix, but this is still possible to do. I need this fixed asap, as you can get unlimited money for free. My z_at_toBuyingList.sqf looks like this now. This correct for the fix? Do I need to all of the changes in ffef031 too? Hide contents private ["_amount","_index","_index2","_temp"]; #include "defines.hpp" _index = _this select 0; _amount = parseNumber(_this select 1); if (!isNil "_index" && {_index > -1} && {typeName _amount == "SCALAR"} && {_amount > 0}) then { _temp = [] + (Z_BuyableArray select _index); _temp set [9,(ceil _amount)]; Z_BuyingArray set [count(Z_BuyingArray),_temp]; _index2 = lbAdd [Z_AT_BUYINGLIST, format["%1x: %2",_temp select 9,_temp select 3]]; lbSetPicture [Z_AT_BUYINGLIST, _index2, _temp select 4]; call Z_calcPrice; }; You will need to copy across the init.sqf from advanced trading and change the path for z_to_buyinglist.sqf and then change the path in your fn_selfActions.sqf to refer to the new advanced trading init.sqf *edit* this fixes it for me. Link to comment Share on other sites More sharing options...
lwbuk Posted January 3, 2017 Author Report Share Posted January 3, 2017 Oh, you mean to the mission. Yeah makes sense as its in dayz code. I knew that hit on the head I had this morning would catch up to me :D Link to comment Share on other sites More sharing options...
salival Posted January 3, 2017 Report Share Posted January 3, 2017 13 minutes ago, lwbuk said: Oh, you mean to the mission. Yeah makes sense as its in dayz code. I knew that hit on the head I had this morning would catch up to me :D @lwbukHere's how I did it: I have a folder in my mission folder called dayz_code to replicate the proper dayz_code.pbo folder structure, so I made this folder structure: dayz_code\actions\advancedTrading\functions Put init.sqf from dayz_code.pbo\actions\advancedTrading\functions into the advancedTrading directory in your mission folder Put defines.hpp from dayz_code.pbo\actions\advancedTrading\functions and z_to_buyingList.sqf (latest fixed version) from github into the functions folder in your missions directory Edit init.sqf in the advancedTrading directory to change this line: Z_toBuyingList = CPP PATH(z_at_toBuyingList.sqf); To this line: Z_toBuyingList = compile preprocessFileLineNumbers "dayz_code\actions\advancedTrading\functions\z_at_toBuyingList.sqf"; Then edit your fn_selfActions (You will need a custom one) and change this line: _buyV = player addAction [localize "STR_EPOCH_PLAYER_289", "\z\addons\dayz_code\actions\AdvancedTrading\init.sqf",(_traderMenu select 0), 999, true, false]; To this line: _buyV = player addAction [localize "STR_EPOCH_PLAYER_289", "dayz_code\actions\AdvancedTrading\init.sqf",(_traderMenu select 0), 999, true, false]; That should be all you need to do. lwbuk 1 Link to comment Share on other sites More sharing options...
lwbuk Posted January 3, 2017 Author Report Share Posted January 3, 2017 Thanks for that. I don't have any custom server files yet, so presumably I need to make a custom of compiles too, to call the fn_selfactions, then change the init call for compiles to my custom one in the mission. Link to comment Share on other sites More sharing options...
salival Posted January 3, 2017 Report Share Posted January 3, 2017 12 minutes ago, lwbuk said: Thanks for that. I don't have any custom server files yet, so presumably I need to make a custom of compiles and variables too, to call the fn_selfactions? Yes, you will. I also have that in the same folder structure mimicking the dayz_code folder structure, for instance: dayz_code\init\variables.sqf dayz_code\init\compiles.sqf Remember, for your variables.sqf and compiles.sqf you only need to copy across what you require, NOT the whole file. *EDIT* You only need to copy variables across from the original variables.sqf if you add mods that do addactions (I.e take clothes or bury body etc for instance: dayz_resetSelfActions = { ... }; call dayz_resetSelfActions; To call your custom compiles and or variables.sqf: Find these lines in your init.sqf in your mission folder root: call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; add this line after it: call compile preprocessFileLineNumbers "dayz_code\init\variables.sqf"; So it looks like this: call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; call compile preprocessFileLineNumbers "dayz_code\init\variables.sqf"; Since we're already calling the original variables.sqf we don't need to copy the whole file across, all the variables we aren't overwriting will still be there and initialized, no point in copying a 40+kb file to the mission when you don't need to. The same goes for your compiles.sqf: Find this line in your init.sqf in your mission folder root: call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; Add this line after it: call compile preprocessFileLineNumbers "dayz_code\init\compiles.sqf"; So it looks like this: call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; call compile preprocessFileLineNumbers "dayz_code\init\compiles.sqf"; Now your compiles.sqf like the previous variables.sqf will only overwrite the specific compiles/variables you require, not the whole 40+kb file. lwbuk 1 Link to comment Share on other sites More sharing options...
salival Posted January 3, 2017 Report Share Posted January 3, 2017 To add your own custom fn_selfActions to this: Copy fn_selfActions.sqf from dayz_code.pbo\compile\ to a new directory in your mission folder called dayz_code\compile (once again mimicking the original pbo folder structure) In your compiles.sqf that you made in the previous post, edit it so it looks like this: if (!isDedicated) then { diag_log "Loading custom client compiles"; // Helpful to see if this is getting initialized. fnc_usec_selfactions = compile preprocessFileLineNumbers "dayz_code\compile\fn_selfActions.sqf"; }; lwbuk 1 Link to comment Share on other sites More sharing options...
lwbuk Posted January 3, 2017 Author Report Share Posted January 3, 2017 Awesome, thanks for the comprehensive reply, One last question. For the Advanced trader init.sqf, I presume need to point the defines.hpp to the new one in my mission folder structure as you said.. Quote Put defines.hpp from dayz_code.pbo\actions\advancedTrading\functions and z_to_buyingList.sqf (latest fixed version) from github into the functions folder in your missions directory So change this #include "\z\addons\dayz_code\actions\AdvancedTrading\functions\defines.hpp" to #include "dayz_code\actions\AdvancedTrading\functions\defines.hpp" Link to comment Share on other sites More sharing options...
salival Posted January 3, 2017 Report Share Posted January 3, 2017 14 minutes ago, lwbuk said: Awesome, thanks for the comprehensive reply, One last question. For the Advanced trader init.sqf, I presume need to point the defines.hpp to the new one in my mission folder structure as you said.. So change this #include "\z\addons\dayz_code\actions\AdvancedTrading\functions\defines.hpp" to #include "dayz_code\actions\AdvancedTrading\functions\defines.hpp" That defines.hpp has not changed, the one we moved across was the one that z_to_buyingList.sqf references lwbuk 1 Link to comment Share on other sites More sharing options...
lwbuk Posted January 3, 2017 Author Report Share Posted January 3, 2017 Cool, that appears to have fixed it and everything else still works, so I didn't mess anything up. Thanks so much @Salival for talking me through it. I would have struggled to get my head round all that at the moment without your help. Link to comment Share on other sites More sharing options...
salival Posted January 3, 2017 Report Share Posted January 3, 2017 2 minutes ago, lwbuk said: Cool, that appears to have fixed it and everything else still works, so I didn't mess anything up. Thanks so much @Salival for talking me through it. I would have struggled to get my head round all that at the moment without your help. No problem, happy to help oldmatechoc 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now