hey.. i was thinking start to work in a fluctuating prices for trades cities.
Have think to ways. 1- using sql 2-using sqfs.
I cannot write anything in sql cuz i dont know nothing about it... so i decided the second way.
At first.. i need remove all content on mission.sqf (dayz_server.pbo/missions/instance/).
Second make a unique market..and put the AI traders again. 1 group of marchants for a standar prices and a Second Group for Fluctuating prices.
3- i will need rebuild the server_traders_cherno_11.sqf (coins system) with the new Ai traders and add new items/categories/prices to the .hpp files
into Config/Category/
To call the Ai traders i can use the init.sqf into :
Spoiler
if (isServer) then {
call compile preprocessFileLineNumbers "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\dynamic_vehicle.sqf";
_nil = [] execVM "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf";
if (time > 300) then {
[nil,nil,rTitleText,"Lower Prices at Market", "PLAIN",10] call RE;
call fn_spawntraders;
sleep _timeprice;
deletevehicle all spawned in fn_spawncrate;
};
So my question is: to get all working i need delete all the original traders spawned with this line in init.sqf (_nil = [] execVM "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf";)
and respawn again once server delete the AI spawned with the function fn_spawntraders.
This is possible? (despawn and respawn the original traders).
or maybe just make the buildings for trades cities into this line: _nil = [] execVM "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf";
and into fluctuatingprices.sqf... make 2 functions.. one for Ai traders with lowers prices and other with AI traders with normal prices..
something like this:
Spoiler
fn_spawtraders = {
all codes for spawn traders with normal prices here.
};
fn_spawtraderslowerprices = {
all codes for spawn traders with lower prices here.
};
if (time > 300) then {
[nil,nil,rTitleText,"Normal Prices at Market", "PLAIN",10] call RE;
call fn_spawntraders;
sleep _timeprice;
deletevehicle all spawned in fn_spawncrate;
};
waituntil {(round(time)) > 900};
if (time > 900) then {
[nil,nil,rTitleText,"Lower Prices at Market", "PLAIN",10] call RE;
call fn_spawntraderslowerprices;
sleep _timeprice;
deletevehicle all spawned in fn_spawncratelowerprices;
Question
juandayz
hey.. i was thinking start to work in a fluctuating prices for trades cities.
Have think to ways. 1- using sql 2-using sqfs.
I cannot write anything in sql cuz i dont know nothing about it... so i decided the second way.
At first.. i need remove all content on mission.sqf (dayz_server.pbo/missions/instance/).
Second make a unique market..and put the AI traders again. 1 group of marchants for a standar prices and a Second Group for Fluctuating prices.
3- i will need rebuild the server_traders_cherno_11.sqf (coins system) with the new Ai traders and add new items/categories/prices to the .hpp files
into Config/Category/
To call the Ai traders i can use the init.sqf into :
if (isServer) then {
call compile preprocessFileLineNumbers "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\dynamic_vehicle.sqf";
_nil = [] execVM "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf";
/*FLUCTUATING PRICES*/
_fluctuatingprices = [] execVM "custom\fluctuatingprices.sqf";
/*FLUCTUATING PRICES*/
then into fluctuatingprices.sqf:
fn_spawtraders = {
all codes for spawn traders here.
};
_timeprice = 600;
waituntil {(round(time)) > 300};
if (time > 300) then {
[nil,nil,rTitleText,"Lower Prices at Market", "PLAIN",10] call RE;
call fn_spawntraders;
sleep _timeprice;
deletevehicle all spawned in fn_spawncrate;
};
So my question is: to get all working i need delete all the original traders spawned with this line in init.sqf (_nil = [] execVM "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf";)
and respawn again once server delete the AI spawned with the function fn_spawntraders.
This is possible? (despawn and respawn the original traders).
or maybe just make the buildings for trades cities into this line: _nil = [] execVM "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf";
and into fluctuatingprices.sqf... make 2 functions.. one for Ai traders with lowers prices and other with AI traders with normal prices..
something like this:
fn_spawtraders = {
all codes for spawn traders with normal prices here.
};
fn_spawtraderslowerprices = {
all codes for spawn traders with lower prices here.
};
_timeprice = 600;
waituntil {(round(time)) > 300};
if (time > 300) then {
[nil,nil,rTitleText,"Normal Prices at Market", "PLAIN",10] call RE;
call fn_spawntraders;
sleep _timeprice;
deletevehicle all spawned in fn_spawncrate;
};
waituntil {(round(time)) > 900};
if (time > 900) then {
[nil,nil,rTitleText,"Lower Prices at Market", "PLAIN",10] call RE;
call fn_spawntraderslowerprices;
sleep _timeprice;
deletevehicle all spawned in fn_spawncratelowerprices;
};
Link to comment
Share on other sites
2 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