3 void RunDayZBat(
string filepath,
bool wait =
false)
5 if (filepath.Length() < 2)
return;
7 filepath.Replace(
"\\",
"/");
9 if (filepath[1] !=
":")
13 filepath = cwd +
"/" + filepath;
16 int index = filepath.IndexOf(
"/");
17 int last_index = index;
22 index = filepath.IndexOfFrom(last_index + 1,
"/");
25 if (last_index == -1)
return;
27 string path = filepath.Substring(0, last_index);
28 string bat = filepath.Substring(last_index + 1, filepath.Length() - last_index - 1);
32 Workbench.RunCmd(
"cmd /c \"cd " +
path +
" & call " + bat +
"\"", wait);
35 override void Configure()
37 Workbench.ScriptDialog(
"Mission directory",
"",
this);
49 [
Attribute(
"day_z_data_missions/killDayZ.bat",
"fileeditbox",
"Path to missions dir",
"")]
52 [
Attribute(
"day_z_data_missions/_default_single/default_SampleMap3_Empty.bat",
"fileeditbox",
"Path to missions dir",
"")]
65 [
Attribute(
"day_z_data_missions/_default_single/default_SampleMap3_Empty.bat",
"fileeditbox",
"Path to missions dir",
"")]
77 [
Attribute(
"day_z_data_missions/killDayZ.bat",
"fileeditbox",
"Path to missions dir",
"")]