euphoria^ Posted March 15, 2015 Report Share Posted March 15, 2015 How would I go about having a Trader that moves to a different location after server restart. Random or predetrimed. Link to comment Share on other sites More sharing options...
0 AlexLawson Posted March 15, 2015 Report Share Posted March 15, 2015 http://epochservers.com/viewtopic.php?f=14&t=33 euphoria^ 1 Link to comment Share on other sites More sharing options...
0 euphoria^ Posted March 15, 2015 Author Report Share Posted March 15, 2015 http://epochservers.com/viewtopic.php?f=14&t=33 thank you very much! Link to comment Share on other sites More sharing options...
0 hamthejam Posted July 27, 2015 Report Share Posted July 27, 2015 Link doesn't work, anybody have a similar script for random traders (On Napf map) ? Link to comment Share on other sites More sharing options...
0 ElDubya Posted July 27, 2015 Report Share Posted July 27, 2015 I got a copy of this. Let me upload it and I'll give you the link. Link to comment Share on other sites More sharing options...
0 ElDubya Posted July 27, 2015 Report Share Posted July 27, 2015 https://mega.co.nz/#!UIZUQKwK!r08SxvU4nId-fIFfjKIMXRRhq-wlyiw-2e5Q8wENjXM Link to comment Share on other sites More sharing options...
0 hamthejam Posted July 27, 2015 Report Share Posted July 27, 2015 https://mega.co.nz/#!UIZUQKwK!r08SxvU4nId-fIFfjKIMXRRhq-wlyiw-2e5Q8wENjXM :rolleyes: Thanks ElDubya! ElDubya 1 Link to comment Share on other sites More sharing options...
0 Longshot03XX Posted August 15, 2015 Report Share Posted August 15, 2015 This trader sometimes spawns off the map of chernarus. Is there a way to fix this that way it stays inside chernarus? Link to comment Share on other sites More sharing options...
0 Longshot03XX Posted August 17, 2015 Report Share Posted August 17, 2015 The trader spawns in debug sometimes, how do i fix this? /* Epoch Dynamic Traders my maca134http://www.epochservers.com You will need to go into each file in the traders file and change the model/skin to the relevent trader for the map you are using. Look in server_traders.sqf in the mission pbo for more information. */ private ["_trader_config", "_markers"]; DT_fnc_ObjectsMapper = compile preprocessFileLineNumbers "\z\addons\dayz_server\roamingTrader\objectMapper.sqf"; DT_fnc_CreateTrader = compile preprocessFileLineNumbers "\z\addons\dayz_server\roamingTrader\createTrader.sqf"; _trader_config = [ [1, "vehicles.sqf", "Roaming Trader", "ColorRed"] ]; _markers = []; waitUntil { sleep 1; !isNil "sm_done" }; { for [{_i=0}, {_i<(_x select 0)}, {_i=_i+1}] do { private ["_position", "_found_position", "_j", "_near_trader"]; waitUntil { !isNil "BIS_fnc_findSafePos" }; _found_position = false; _j = 0; while {!_found_position} do { _j = _j + 1; if ((_x select 1) == "boat.sqf") then { _position = [getMarkerPos 'center',0,DynamicVehicleArea,20,0,2000,1] call BIS_fnc_findSafePos; } else { if (!isNil "RoadList" and {(random 1) > 0.5}) then { waitUntil{!isNil "BIS_fnc_selectRandom"}; _position = RoadList call BIS_fnc_selectRandom; _position = _position modelToWorld [0,0,0]; waitUntil{!isNil "BIS_fnc_findSafePos"}; _position = [_position,5,40,20,0,2000,0] call BIS_fnc_findSafePos; } else { waitUntil{!isNil "BIS_fnc_findSafePos"}; _position = [getMarkerPos 'center',0,DynamicVehicleArea,20,0,2000,0] call BIS_fnc_findSafePos; }; }; { if (((_x select 0) distance _position) < 1000) exitWith { _position = []; }; true } count _markers; if ((count _position) == 2 or _j > 10) then { _found_position = true; }; }; if ((count _position) == 2) then { diag_log format["Trader Caravans: Spawning %1 at %2 (%3)", _x select 1, _position, mapGridPosition _position]; _position execVM format["\z\addons\dayz_server\roamingTrader\traders\%1", _x select 1]; _markers set [count _markers, [_position, _x select 2, _x select 3]]; }; }; true } count _trader_config; PV_TraderMarkers = _markers; publicVariable "PV_TraderMarkers"; Link to comment Share on other sites More sharing options...
0 Longshot03XX Posted August 17, 2015 Report Share Posted August 17, 2015 Here is screenshot http://steamcommunity.com/sharedfiles/filedetails/?id=501240673 Link to comment Share on other sites More sharing options...
0 Antichrist Posted August 17, 2015 Report Share Posted August 17, 2015 You could use BIS_fnc_findSafePos function or limit the possibility of him spawning outside the map by checking dayzmaparea and setting min&max distance to roads Link to comment Share on other sites More sharing options...
0 Longshot03XX Posted August 17, 2015 Report Share Posted August 17, 2015 How would I do that? I'm fairly new to scripting/editing Link to comment Share on other sites More sharing options...
0 Antichrist Posted August 17, 2015 Report Share Posted August 17, 2015 What i have for location selection is _spawnarea = (dayz_MapArea/2); _coords = [getMarkerPos 'Center',0,_spawnarea,20,0,2000,0] call BIS_fnc_findSafePos; And just in case you might aswell add this somewhere at the top of your file if(isNil "dayz_MapArea")then{dayz_MapArea = 20000}; Link to comment Share on other sites More sharing options...
0 Kimzer Posted August 17, 2015 Report Share Posted August 17, 2015 Any of u have a roaming bank trader made for this? =) Link to comment Share on other sites More sharing options...
0 Kimzer Posted August 20, 2015 Report Share Posted August 20, 2015 Bump.. Nobody has a premade banker for this? Just want the sqf for the actual banker trader =) Link to comment Share on other sites More sharing options...
Question
euphoria^
How would I go about having a Trader that moves to a different location after server restart. Random or predetrimed.
Link to comment
Share on other sites
14 answers to this question
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