Fixed / updated and added Trader Missions

Ported to run it on Events instead fsm
This commit is contained in:
He-Man 2017-04-21 19:03:58 +02:00
parent e098a78b4f
commit eede62bd38
14 changed files with 1076 additions and 673 deletions

View File

@ -1,3 +1,3 @@
5 "" !="I_UAV_01_F" !="(I|B|O)_UAV_AI" !"_EPOCH" !="B_65x39_Minigun_Caseless_Red_splash" !="B_762x51_Minigun_Tracer_Yellow_splash" !="B_(Swing|Stick)" !"^SmokeShell" !"^G_40mm_" !"^F_40mm_" !"Sub_F_" !"^F_Signal_" !="mini_Grenade" !="GrenadeHand" !="LaserTarget(C|W|E)" !"^Chemlight_" !="(ClaymoreDirectionalMine|DemoCharge|SatchelCharge)_Remote_Ammo" !="SLAMDirectionalMine_Wire_Ammo" !="(CMflare_Chaff|Sapper_Charge|SapperB_Charge|ATMine_Range)_Ammo" !="APERS(TripMine_Wire|BoundingMine_Range|Mine_Range)_Ammo" !="Epoch_(Sapper|Sapper(B|G)|Cloak)_F" !="EPOCH_RyanZombie_[1-5](|_(C|Sp|B|W|M|P))" !="GreatWhite_F" !="groundWeaponHolder" !="WeaponHolderSimulated" !="Epoch_(Male|Female)_F" !"Supply[0-9]" !"Steerable_Parachute_F" !="Epoch_Female_CamoRed_F" !="Land_Cages_F" !="(O|I|B)_UAV_01_backpack_F" !="I_(helipilot|helicrew)_F" !="#smokesource" !="SmokeLauncherAmmo" 5 "" !="Construct_f" !="I_UAV_01_F" !="(I|B|O)_UAV_AI" !"_EPOCH" !="B_65x39_Minigun_Caseless_Red_splash" !="B_762x51_Minigun_Tracer_Yellow_splash" !="B_(Swing|Stick)" !"^SmokeShell" !"^G_40mm_" !"^F_40mm_" !"Sub_F_" !"^F_Signal_" !="mini_Grenade" !="GrenadeHand" !="LaserTarget(C|W|E)" !"^Chemlight_" !="(ClaymoreDirectionalMine|DemoCharge|SatchelCharge)_Remote_Ammo" !="SLAMDirectionalMine_Wire_Ammo" !="(CMflare_Chaff|Sapper_Charge|SapperB_Charge|ATMine_Range)_Ammo" !="APERS(TripMine_Wire|BoundingMine_Range|Mine_Range)_Ammo" !="Epoch_(Sapper|Sapper(B|G)|Cloak)_F" !="EPOCH_RyanZombie_[1-5](|_(C|Sp|B|W|M|P))" !="GreatWhite_F" !="groundWeaponHolder" !="WeaponHolderSimulated" !="Epoch_(Male|Female)_F" !"Supply[0-9]" !"Steerable_Parachute_F" !="Epoch_Female_CamoRed_F" !="Land_Cages_F" !="(O|I|B)_UAV_01_backpack_F" !="I_(helipilot|helicrew)_F" !="#smokesource" !="SmokeLauncherAmmo"
5 "_EPOCH" !="(SapperHead|Jack|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower)_EPOCH" !="(Tipi|Workbench|StorageShelf|CinderWallHalf|Foundation|Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower))_Ghost_EPOCH" !="(Tipi|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen|Jack|Freezer|Tarp|CinderWallHalf|Bobber)_EPOCH" !="I_(Soldier[1-3]|Soldier)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Shoebox|Bunk|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|Workbench|LockBox|CinderWall|CinderWallGarage|CinderWallHalf|PlotPole|Tipi|StorageShelf|Fireplace|TankTrap)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorL|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_SIM_EPOCH" !="(Hesco3|Metal)(_Ghost|_SIM|)_EPOCH" !="(Spike|Metal)_TRAP_SIM_EPOCH" !="(WoodFoundation|Foundation)_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH" 5 "_EPOCH" !="(SapperHead|Jack|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower)_EPOCH" !="(Tipi|Workbench|StorageShelf|CinderWallHalf|Foundation|Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower))_Ghost_EPOCH" !="(Tipi|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen|Jack|Freezer|Tarp|CinderWallHalf|Bobber)_EPOCH" !="I_(Soldier[1-3]|Soldier)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Shoebox|Bunk|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|Workbench|LockBox|CinderWall|CinderWallGarage|CinderWallHalf|PlotPole|Tipi|StorageShelf|Fireplace|TankTrap)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorL|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_SIM_EPOCH" !="(Hesco3|Metal)(_Ghost|_SIM|)_EPOCH" !="(Spike|Metal)_TRAP_SIM_EPOCH" !="(WoodFoundation|Foundation)_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"
5 SeaGull 5 SeaGull

View File

@ -17,7 +17,6 @@ private ["_allowTask","_doTask","_fnc_path","_itemCompile","_menuCondition","_mi
//[[[end]]] //[[[end]]]
_missionIndex = lbCurSel 1500; _missionIndex = lbCurSel 1500;
_missionAllowed = true; _missionAllowed = true;
//systemChat format ["Mission Acepted: %1",_missionIndex];
_missionClasses = getArray(getMissionConfig "EpochMissionList" >> "traderMissionClasses"); _missionClasses = getArray(getMissionConfig "EpochMissionList" >> "traderMissionClasses");
_nrEnts = player nearEntities ["Man", 20]; _nrEnts = player nearEntities ["Man", 20];
@ -29,90 +28,55 @@ _trader = objNull;
}forEach _nrEnts; }forEach _nrEnts;
if !(isNull _trader) then { if !(isNull _trader) then {
_menuCondition = getText(getMissionConfig "epochMissions" >> (_missionClasses select _missionIndex) >> "missionDeny");
if!(_menuCondition=="")then{
if(call compile _menuCondition)then{_missionAllowed = false;};
};
if(_missionAllowed)then{
_selectedMission = _missionClasses select _missionIndex; _selectedMission = _missionClasses select _missionIndex;
_missionTasks = getArray(getMissionConfig "epochMissions" >> _selectedMission >> "tasksList"); _epochmissionsconfig = getMissionConfig "epochMissions";
_menuCondition = getText (_epochmissionsconfig >> _selectedMission >> "missionDeny");
_simpleTask = getNumber (getMissionConfig "inGameTasks" >> (_missionTasks select 0) >> "simpleTask"); if!(_menuCondition == "")then{
if(call compile _menuCondition) then {
//systemChat format ["Simple Task: %1 | Mission: %2 from %3",_simpleTask,_selectedMission,_missionTasks]; _missionAllowed = false;
if(_simpleTask > 0)then{//Simple Task
_simpleTaskFSM = getText (getMissionConfig "inGameTasks" >> (_missionTasks select 0) >> "initfsm");
_simpleTaskSQF = getText (getMissionConfig "inGameTasks" >> (_missionTasks select 0) >> "initsqf");
_simpleTaskFNC = getText (getMissionConfig "inGameTasks" >> (_missionTasks select 0) >> "initcall");
if!(_simpleTaskSQF == "")then{//Compile and store SQF Function
_tag = getText (getMissionConfig "CfgClientFunctions" >> "A3E" >> "tag");
_path = getText (getMissionConfig "inGameTasks" >> "file");
_taskNS = _tag + "_" + ((_simpleTaskSQF splitString ".") select 0);
_fnc_path = _path + "\" +_simpleTaskSQF;
if!((typeName _taskNS)=="CODE")then{
_itemCompile = compileFinal preprocessFileLineNumbers _fnc_path;
missionNamespace setvariable [_taskNS,_itemCompile];
}else{
_itemCompile = missionNamespace getVariable ["_taskNS",""];
};
//Emulating CfgClientFunctions - Is this required ?
[] call _itemCompile;
};
if!(_simpleTaskFSM == "")then{
_simpleTaskFSM = _path + "\" + _simpleTaskFSM;
epochSimpleTaskHandle = [] execFSM _simpleTaskFSM;
};
if!(_simpleTaskFNC == "")then{
call compile _simpleTaskFNC;
};
}else{//Run Task / Mission Monitor
_doTask = (_missionTasks select 0);
_allowTask = true;
_plyrVar = missionNamespace getVariable ["EPOCH_playerMissionArray",[]] select {_x find "axeTask" > -1;};
_uiNSTask = "";
if(count _plyrVar > 0)then{
_uiNSTask = _plyrVar select 0 select 1;
};
_miNSTask = missionNameSpace getVariable ["axeTask",""];
//Allow continuation of mission from Cached Task
if!(_uiNSTask == "")then{
if(_miNSTask == "")then{
_doTask = _uiNSTask;
}else{
_allowTask = false;
[format ["Already on a mission - %1",selectRandom ['Chop Chop !','Get on With It !','What are you waiting for ?','No bonuses for tardiness !']], 5] call Epoch_message;
};
};
if(_allowTask)then{
epochTaskHandle = [_doTask] execFSM "epoch_code\System\task_control.fsm"
};
}; };
}else{
[format["Mission Not Allowed !",_menuCondition], 5] call Epoch_message; //Not formatting, is this intended?
}; };
if(_missionAllowed)then{
_missionTasks = getArray (_epochmissionsconfig >> _selectedMission >> "tasksList");
} else { _missionname = getText (_epochmissionsconfig >> _selectedMission >> "missionName");
//systemChat format ["Trader Not Found",""]; _inGameTasksconfig = getMissionConfig "inGameTasks";
["Trader Lost. Goodbye.", 5] call Epoch_message; _taskname = _missionTasks select 0;
_simpleTask = getNumber (_inGameTasksconfig >> _taskname >> "simpleTask");
if (_selectedMission isequalto "debugResetMission") exitwith {
EPOCH_ResetTraderMission = true;
};
if !(EPOCH_ActiveTraderMission isequalto []) exitwith {
EPOCH_ActiveTraderMission params ['','',['_missionname','ERROR']];
_msg = format ['You are already running %1. Finish or cancel it first',_missionname];
[_msg, 5] call Epoch_message;
};
if (_simpleTask > 0) then { //Simple Task
_taskSQF = getText ( _inGameTasksconfig >> _taskName >> "initsqf");
if !(_taskSQF isequalto '') then {
call compile format ["[_taskName,player,_unit,_taskItem] execVM ""%1""",_taskSQF];
};
_taskCall = getText ( _inGameTasksconfig >> _taskName >> "initcall");
if !(_taskCall isequalto '') then {
call compile _taskCall
};
_nexttask = getArray ( _inGameTasksconfig >> _taskName >> "nextTask");
if !(_nexttask isequalto []) then {
_newtask = selectrandom _nexttask;
EPOCH_mission_startTime = diag_ticktime;
EPOCH_ActiveTraderMission = [_inGameTasksconfig,_newtask,_missionname];
};
}
else {
EPOCH_mission_startTime = diag_ticktime;
EPOCH_ActiveTraderMission = [_inGameTasksconfig,_taskname,_missionname];
};
}
else {
[format["Mission Not Allowed !",_menuCondition], 5] call Epoch_message; //Not formatting, is this intended?
};
}
else {
["Trader Lost. Goodbye.", 5] call Epoch_message;
}; };

View File

@ -169,3 +169,108 @@ for "_i" from _hudIndex to 9 do {
_c ctrlSetText ""; _c ctrlSetText "";
}; };
missionNamespace setVariable [format["EPOCH_dynHUD_%1","topRight"], nil]; missionNamespace setVariable [format["EPOCH_dynHUD_%1","topRight"], nil];
// EPOCH TraderMissions
if (!isnil "EPOCH_ResetTraderMission") then {
if (!isNil "EPOCH_taskMarker") then{
EPOCH_taskMarker params ["_mkrName","_taskMarkerVis"];
[player,_taskMarkerVis,_mkrName] remoteExec ["EPOCH_server_removeMarker",2];
EPOCH_taskMarker = nil;
};
if !(_EPOCH_TraderMissionArray isequalto []) then {
_EPOCH_TraderMissionArray params ["_mainblock"];
_mainblock params ["","","","","",["_missionCleanUpCall",""]];
call _missionCleanUpCall;
};
EPOCH_ActiveTraderMission = [];
_EPOCH_TraderMissionArray = [];
_LastMissionTrigger = 0;
["Mission sucessfully resettet", 5] call Epoch_message;
EPOCH_ResetTraderMission = nil;
};
if !(EPOCH_ActiveTraderMission isequalto []) then {
if (_EPOCH_TraderMissionArray isequalto []) then {
_EPOCH_TraderMissionArray = EPOCH_ActiveTraderMission call _EPOCH_BuildTraderMisson;
};
_EPOCH_TraderMissionArray params ["_mainblock","_taskDelay","_triggerintervall","_taskDialogues","_taskEvents","_taskFailed","_taskComplete"];
if (diag_ticktime < _taskDelay) exitwith {};
if (diag_ticktime < _LastMissionTrigger + _triggerintervall) exitwith {};
_LastMissionTrigger = diag_ticktime;
_mainblock params ["_inGameTasksconfig","_taskName","_unit","_taskItem","_taskTitle","_missionCleanUpCall","_taskCleanup"];
_taskComplete params ["_taskCompleteCond","_taskReward","_taskCompleteDiags","_taskCompleteCall","_taskNextTrigger"];
_taskFailed params ['_taskFailedCond','_taskFailTime','_taskFailedDiags','_taskFailedSQF','_taskFailedCall'];
if (diag_ticktime > _taskFailTime || call _taskFailedCond) exitwith {
if (count _taskFailedDiags > 0) then {
_diag = selectRandom _taskFailedDiags;
[format ["%1",_diag], 5] call Epoch_message;
};
if !(_taskFailedSQF isequalto '') then {
call compile format ["[_taskName,_plyr,_unit,_taskItem] execVM ""%1""",_taskFailedSQF];
};
if !(str(_taskFailedCall) == "{}") then {
call _taskFailedCall;
};
if (!isNil "EPOCH_taskMarker") then{
EPOCH_taskMarker params ['_mkrName','_taskMarkerVis'];
[player,_taskMarkerVis,_mkrName] remoteExec ["EPOCH_server_removeMarker",2];
EPOCH_taskMarker = nil;
};
call _missionCleanUpCall;
EPOCH_ActiveTraderMission = [];
_EPOCH_TraderMissionArray = [];
_LastMissionTrigger = 0;
};
if (call _taskCompleteCond) exitwith {
if (count _taskCompleteDiags > 0) then {
_diag = selectrandom _taskCompleteDiags;
[format ["%1",_diag], 5] call Epoch_message;
};
if(count _taskReward > 0) then {
_retTaskWH = objNull;
_retTaskWH = createVehicle ["GroundWeaponHolder",getPosATL player,[],0,"CAN_COLLIDE"];
[player,Epoch_personalToken,_taskReward,[],_retTaskWH,false] remoteExec ["EPOCH_Server_createObject",2];
};
if !(str(_taskCompleteCall) == "{}") then {
call _taskCompleteCall;
};
if (_taskCleanup isequalto 1) then {
if (!isNil "EPOCH_taskMarker") then{
EPOCH_taskMarker params ['_mkrName','_taskMarkerVis'];
[player,_taskMarkerVis,_mkrName] remoteExec ["EPOCH_server_removeMarker",2];
EPOCH_taskMarker = nil;
};
call _missionCleanUpCall;
};
if (count _taskNextTrigger > 0) then {
_nexttask = selectrandom _taskNextTrigger;
_EPOCH_TraderMissionArray = [_inGameTasksconfig,_nexttask] call _EPOCH_BuildTraderMisson;
}
else {
EPOCH_ActiveTraderMission = [];
_EPOCH_TraderMissionArray = [];
};
_LastMissionTrigger = 0;
};
{
_x params ["_taskEventCond","_taskEventCALL","_taskEventTasks"];
if (call _taskEventCond) exitwith {
call _taskEventCALL;
if (count _taskEventTasks > 0) exitwith {
_task = selectrandom _taskEventTasks;
_EPOCH_TraderMissionArray = [_inGameTasksconfig,_task] call _EPOCH_BuildTraderMisson;
};
_taskEvents deleteat _foreachindex;
};
} foreach _taskEvents;
{
_x params ['_taskDiagCond','_taskDiag'];
if (call _taskDiagCond) exitwith {
_diag = selectRandom _taskDiag;
if !(_diag isequalto "") then {
[format ["%1",_diag], 5] call Epoch_message;
};
_taskDialogues deleteat _foreachindex;
};
} foreach _taskDialogues;
};

View File

@ -133,3 +133,99 @@ _cursorTarget = objNull;
// init cfgBaseBuilding config var // init cfgBaseBuilding config var
_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; _cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig;
_cfgObjectInteractions = 'CfgObjectInteractions' call EPOCH_returnConfig; _cfgObjectInteractions = 'CfgObjectInteractions' call EPOCH_returnConfig;
_EPOCH_BuildTraderMisson = {
params ['_inGameTasksconfig','_taskName',['_unit',objnull],['_taskItem',objnull]];
_taskTitle = getText ( _inGameTasksconfig >> _taskName >> "title");
_taskSQF = getText ( _inGameTasksconfig >> _taskName >> "initsqf");
if !(_taskSQF isequalto '') then {
call compile format ["[_taskName,player,_unit,_taskItem] execVM ""%1""",_taskSQF];
};
_taskCall = getText ( _inGameTasksconfig >> _taskName >> "initcall");
if !(_taskCall isequalto '') then {
call compile _taskCall;
};
_taskDelay = diag_ticktime + (getNumber ( _inGameTasksconfig >> _taskName >> "triggerDelay"));
_triggerintervall = getNumber ( _inGameTasksconfig >> _taskName >> "triggerintervall");
_taskItems = getArray ( _inGameTasksconfig >> _taskName >> "items");
if !(_taskItems isequalto []) then {
_wh = objNull;
_wh = createVehicle ["GroundWeaponHolder",getPosATL player,[],0,"CAN_COLLIDE"];
[player,Epoch_personalToken,_taskItems,[],_wh,false] remoteExec ["EPOCH_Server_createObject",2];
};
_taskMarkerType = getnumber (_inGameTasksconfig >> _taskName >> 'markerType');
if (_taskMarkerType > 0) then {
_taskMarkerVis = getNumber ( _inGameTasksconfig >> _taskName >> "markerVisible");
_markerPos = [0,0,0];
if (isNil "EPOCH_taskMarkerPos") then {
if !(isNull _trgt) then {
_markerPos = getPos _trgt;
};
if !(isNull _unit) then{
_markerPos = getPos _unit;
};
if !(isNull _taskItem) then {
_markerPos = getPos _taskItem;
};
}
else {
_markerPos = EPOCH_taskMarkerPos;
};
_mkrName = format ["EPOCHTaskMark%1%2",_taskName,diag_tickTime];
EPOCH_taskMarker = [_mkrName,_taskMarkerVis];
_taskMarkerText = getText ( _inGameTasksconfig >> _taskName >> "markerText");
_taskMarkerRad = getNumber ( _inGameTasksconfig >> _taskName >> "markerRadius");
if(_taskMarkerType == 2)then{
_markerPos set [0, (_markerPos select 0) + (floor (random _taskMarkerRad) - (_taskMarkerRad / 2))];
_markerPos set [1, (_markerPos select 1) + (floor (random _taskMarkerRad) - (_taskMarkerRad / 2))];
};
[[_taskMarkerVis,player],_markerPos,"ELLIPSE","mil_dot",_taskMarkerText,"ColorYellow",[_taskMarkerRad,_taskMarkerRad], "SolidBorder", 42, 0.6,_mkrName] remoteExec ["EPOCH_server_makeMarker",2];
};
_taskDialogues = [];
{
_x params [["_condition",""],["_dialogue",""]];
if !(_condition isequalto "" || _dialogue isequalto "") then {
_taskDialogues pushback [compile _condition,_dialogue];
};
} foreach (getarray (_inGameTasksconfig >> _taskName >> 'dialogues'));
_taskEvents = [];
{
_x params [["_condition",""],["_taskEventCALL",""],["_taskEventTasks",[]]];
if !(_condition isequalto "") then {
_taskEvents pushback [compile _condition,compile _taskEventCALL,_taskEventTasks];
};
} foreach (getarray (_inGameTasksconfig >> _taskName >> 'callevents'));
_taskFailedCond = compile getText ( _inGameTasksconfig >> _taskName >> "failedCondition");
_taskFailTime = (getNumber ( _inGameTasksconfig >> _taskName >> "abandonTime"));
if (_taskFailTime < 1) then {_taskFailTime=999999} else {_taskFailTime = _taskFailTime + diag_ticktime};
_taskFailedDiags = getArray ( _inGameTasksconfig >> _taskName >> "faileddialogues");
_taskFailedSQF = getText ( _inGameTasksconfig >> _taskName >> "failedSQF");
_taskFailedCall = compile getText ( _inGameTasksconfig >> _taskName >> "failedCall");
_nextTask = getArray ( _inGameTasksconfig >> _taskName >> "failedTask");
_taskCompleteCond = compile getText ( _inGameTasksconfig >> _taskName >> "completeCondition");
_taskReward = getArray ( _inGameTasksconfig >> _taskName >> "reward");
_taskCompleteDiags = getArray ( _inGameTasksconfig >> _taskName >> "completedialogues");
_taskCompleteCall = compile getText ( _inGameTasksconfig >> _taskName >> "completedCALL");
_taskNextTrigger = getArray ( _inGameTasksconfig >> _taskName >> "nextTask");
_missionCleanUpCall = compile getText ( _inGameTasksconfig >> _taskName >> "cleanUpCall");
_taskCleanup = getNumber ( _inGameTasksconfig >> _taskName >> "cleanUp");
_return = [
[_inGameTasksconfig,_taskName,_unit,_taskItem,_taskTitle,_missionCleanUpCall,_taskCleanup],
_taskDelay,
_triggerintervall,
_taskDialogues,
_taskEvents,
[_taskFailedCond,_taskFailTime,_taskFailedDiags,_taskFailedSQF,_taskFailedCall,_nextTask],
[_taskCompleteCond,_taskReward,_taskCompleteDiags,_taskCompleteCall,_taskNextTrigger]
];
EPOCH_task_startTime = diag_ticktime;
_return
};
_epoch_tradermissionarray = [];
EPOCH_ActiveTraderMission = [];
_LastMissionTrigger = 0;

View File

@ -12,24 +12,19 @@
Github: Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/scripts/missions/EPOCH_mission_refresh.sqf https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/gui/scripts/missions/EPOCH_mission_refresh.sqf
*/ */
private ["_lbl","_missionClasses","_missionName","_menuCondition","_toolTip","_plyrVar","_uiNSTask"]; private ["_lbl","_missionClasses","_missionName","_menuCondition","_toolTip","_uiNSTask"];
params [["_currentTask",""]]; params [["_currentTask",""]];
_missionClasses = getArray(getMissionConfig "EpochMissionList" >> "traderMissionClasses"); _missionClasses = getArray(getMissionConfig "EpochMissionList" >> "traderMissionClasses");
_plyrVar = missionNamespace getVariable ["EPOCH_playerMissionArray",[]] select {_x find "axeTask" > -1;};
_uiNSTask = ""; _uiNSTask = "";
if(count _plyrVar > 0)then{ if (count EPOCH_ActiveTraderMission > 0) then {
_uiNSTask = _plyrVar select 0 select 1; _uiNSTask = EPOCH_ActiveTraderMission select 1;
}; };
{ {
_missionName = getText(getMissionConfig "epochMissions" >> _x >> "missionName"); _missionName = getText(getMissionConfig "epochMissions" >> _x >> "missionName");
if!(_missionName == "")then{ if!(_missionName == "")then{
_lbl = lbAdd[1500, _missionName]; _lbl = lbAdd[1500, _missionName];
lbSetValue[1500, _lbl, _forEachIndex]; lbSetValue[1500, _lbl, _forEachIndex];
_toolTip = getText(getMissionConfig "epochMissions" >> _x >> "missionToolTip"); _toolTip = getText(getMissionConfig "epochMissions" >> _x >> "missionToolTip");
_menuCondition = getText(getMissionConfig "epochMissions" >> _x >> "missionDeny"); _menuCondition = getText(getMissionConfig "epochMissions" >> _x >> "missionDeny");
if!(_menuCondition=="")then{ if!(_menuCondition=="")then{
if(call compile _menuCondition)then{ if(call compile _menuCondition)then{
@ -37,17 +32,10 @@ _uiNSTask = _plyrVar select 0 select 1;
_toolTip = getText(getMissionConfig "epochMissions" >> _x >> "missionDenyToolTip"); _toolTip = getText(getMissionConfig "epochMissions" >> _x >> "missionDenyToolTip");
}; };
}; };
if(_uiNSTask in getArray(getMissionConfig "epochMissions" >> _x >> "tasksList"))then{ if(_uiNSTask in getArray(getMissionConfig "epochMissions" >> _x >> "tasksList"))then{
lbSetColor [1500, _lbl, [0.98,0.98,0.33,1]] ; lbSetColor [1500, _lbl, [0.98,0.98,0.33,1]] ;
_toolTip = "CONTINUE - " + _toolTip; _toolTip = "CONTINUE - " + _toolTip;
}; };
lbSetTooltip [1500, _lbl, _toolTip]; lbSetTooltip [1500, _lbl, _toolTip];
}; };
}forEach _missionClasses; }forEach _missionClasses;

View File

@ -14,14 +14,34 @@
*/ */
class EpochMissionList{ class EpochMissionList{
traderMissionClasses[] = {"missionDelivery","missionEscort","missionUav","missionSapper","missionSkull","missionMilitary","gameCaptureTheJammer","gameCarRace","infoTime","infoName","infoNews","infoVehicles","infoPeople","helpAirDrop","debugResetMission"}; //Exclude from here to remove from menu and trigger // traderMissionClasses[] = {"missionMonster","missionDelivery","missionEscort","missionUav","missionSapper","missionSkull","missionMilitary","gameCaptureTheJammer","gameCarRace","infoTime","infoName","infoNews","infoVehicles","infoPeople","helpAirDrop","debugResetMission"}; //Exclude from here to remove from menu and trigger
traderMissionClasses[] = {"missionfishing","missionMonster","missionDelivery","missionUav","infoTime","infoName","infoNews","infoVehicles","infoPeople","debugResetMission"}; //Exclude from here to remove from menu and trigger
traderMissionActiveNames[] = {}; //Not currently used (WIP) traderMissionActiveNames[] = {}; //Not currently used (WIP)
traderMissionLongDesc[] = {}; //Not currently used (WIP) traderMissionLongDesc[] = {}; //Not currently used (WIP)
traderMissionActiveLongDesc[] = {}; //Not currently used (WIP) traderMissionActiveLongDesc[] = {}; //Not currently used (WIP)
}; };
class epochMissions { class epochMissions {
class missionfishing{
missionName = "Bring me a fresh Fish"; //Name of mission as it appears in trader list
missionToolTip= "Bring the Trader a fresh Fish from the Water."; //Tooltip for trader menu
missionDesc = "You must went to the Water and catch a Fish for the Trader and bring it to him."; //Misison description as it appears in trader menu.
missionDeny = "!(""MeleeRod"" in weapons player)"; //Specify a call compile condition. If it returns true the mission will be dis-allowed. Title will be rust coloured and prefixed with NOT ALLOWED.
missionDenyToolTip = "You need a Fishing-Rod for this Mission"; //Provides a tooltip explaining why the mission is denied. prefixed with NOT ALLOWED.
tasksList[] = {"StartFishMission"}; //Must contain a list of tasks used for this mission, in order. Used to control trader menu when mission is active. WIP - To control mission from this array alone.
missionTrigger = ""; //A dynamic trigger that sets off the mission anywhere in-game. e.g. player != vehicle player Not currently used (WIP)
missionTriggerDialog[] = {""}; //Randomly selected dialogue that is shown when mission is dynamically triggered. Not currently used (WIP)
};
class missionMonster{
missionName = "Escort my Monster (Experimental)"; //Name of mission as it appears in trader list
missionToolTip= "Escort a Monster."; //Tooltip for trader menu
missionDesc = "You must escort the Traders Monster to another Trader somewhere else on the map."; //Misison description as it appears in trader menu.
missionDeny = ""; //Specify a call compile condition. If it returns true the mission will be dis-allowed. Title will be rust coloured and prefixed with NOT ALLOWED.
missionDenyToolTip = ""; //Provides a tooltip explaining why the mission is denied. prefixed with NOT ALLOWED.
tasksList[] = {"prepForMonsterEscort"}; //Must contain a list of tasks used for this mission, in order. Used to control trader menu when mission is active. WIP - To control mission from this array alone.
missionTrigger = ""; //A dynamic trigger that sets off the mission anywhere in-game. e.g. player != vehicle player Not currently used (WIP)
missionTriggerDialog[] = {""}; //Randomly selected dialogue that is shown when mission is dynamically triggered. Not currently used (WIP)
};
class missionDelivery{ class missionDelivery{
missionName = "Pikes Peak Express"; //Name of mission as it appears in trader list missionName = "Pikes Peak Express"; //Name of mission as it appears in trader list
missionToolTip= "Courier."; //Tooltip for trader menu missionToolTip= "Courier."; //Tooltip for trader menu

View File

@ -15,185 +15,61 @@
//Built in useful vars that can be used in code based conditions / responses etc. //Built in useful vars that can be used in code based conditions / responses etc.
//N.B. Local vars can not be used as they are not in scope when call compiled. //N.B. Local vars can not be used as they are not in scope when call compiled.
// //
//EPOCH_task_startTime - task start diag_tickTime | Usage: diag_tickTime - EPOCH_task_startTime > _someDelayTime; // EPOCH_task_startTime - task start diag_tickTime | Usage: diag_tickTime - EPOCH_task_startTime > _someDelayTime;
//EPOCH_taskMarkerPos - Will override the built in marker position. Must be set at init stage, i.e. before marker is created. // EPOCH_mission_starttime - mission start diag_ticktime
//EPOCH_taskTitle - As set by title in each task class. // EPOCH_taskMarker - Array for Marker, if set [markername,markerType]. "markerType" see in task description
//EPOCH_taskLastLoop - is the diag_tickTime at the last loop start (based on taskCheckTime). Set to start time until loop starts. // EPOCH_taskMarkerPos - Markerposition, if set.
//EPOCH_taskItem - Weaponholder object used to hold task item. Is null object until items are spawned in.
//EPOCH_taskMarkerName - Name for the marker generated automatically by the task system.
//
//Stand alone missions can be called by triggering the first task class with: epochTaskHandle = ["myTaskClass"] execFSM "epoch_code\System\task_control.fsm";
//
class taskWithComments{ class sampletask {
//Task Author author = "My Name";
author = "axeman"; title = "Mission Title";
//Task Title as appears in (Accept / Decline) dialogue box. Leave as "" to trigger code only. simpleTask = 0;
//title, desc and img are WIP and will be used for future dialogue GUIs. items[] = {"B_UavTerminal"}; // Items will be dropped on the Ground next to Player
title = "Find the Backpack."; triggerDelay = 2; // Before this time (in sec) the task will not Start
//Description on task. For dialogue box. taskCheckTime = 3; // Intervall (in sec) for the triggers
desc = "Our new friend has lost his backpack. Find it in a nearby house. It will be within 50m and looks like a white package. He needs the contents to continue on his way."; markerType = 0; // Place a marker on task target (0 = No Marker, 1 = Marker, with text, exactly on target, 2 = radial marker with target somewhere random inside marker)
//Task Image. For dialogue box. markerVisible = 0; // Marker visible for: 0 = Only Player (default), 1 = Group of Player, 2 = Global
img = "\A3\Characters_F_EPA\Data\ui\Icon_V_plate_carrier_snake_ca.paa"; markerRadius = 0; // Set marker radius for radial marker (markerType = 2)
//Simple tasks are used for one off calls, e.g. Ask the trader the time. initfsm, initsqf and/or initcall will be triggered and the task will exit with no monitoring. markerText = ""; // Marker Text - Add text to marker, leave "" for no text. No text available for Marker type 2 yet.
simpleTask = 0; initcall = ""; // Code to call on task-start
//Trigger this task. Use this condition to trigger the task (WIP - Mission and Individual Task Triggers from the Main Loop) cleanUpCall = ""; // Code to call on task failed or when cleanUp = 1 on finished
triggerCondition = "count nearestObjects [player,[""house""],250] > 8"; dialogues[] = { // Array to make dialogues while task is running
//Limit the number of times this task can run for player per life or server restart. (WIP - Part of client / server mission & task monitoring) - Leave as default ! {
taskLimit = 3; "alive player", // Condition 1
//Pause time in the task loop. This figure is also applied before triggering completion of mission and again before cleanup / reminder / next task. {"Text 1","Text 2","Text 3"} // Array of random dialogues when condition 1 = true
taskCheckTime = 16; },
//A pause at the start of the task after collecting variables, before anything is created. TODO: maybe remove.. {
triggerDelay = 16; "alive player", // Condition 2
//Spawn helper objects at start of task / mission (e.g. a hatchet for a tree chopping task). Array will accept any object classes which will be positioned appropriately (WIP - Mainly to support vehicle spawning). {"Text 1","Text 2","Text 3"} // Array of random dialogues when condition 2 = true
items[] = {"ItemSodaOrangeSherbet","itemGPS"}; }
//Item Spawn (0 - Do not spawn, 1 - Nearby in House, 2 - Nearby Hidden, 3 - Near Player) };
itemSpawn = 1; callevents[] = { // Array to call codes and / or start a nex task
{
//Call these functions at init of task, after item spawn but before marker creation. Allows setting EPOCH_taskMarkerPos "(diag_tickTime - StartTime > 30)", // Condition 1
initfsm = ""; "", // String with code to call when condition 1 = true
initsqf = ""; {"uavMission1"} // Array of random selected tasks to switch to when condition 1 = true
initcall = "systemChat 'STARTING FROM CONFIG'"; },
{
//Place a marker on task target (0 = No Marker, 1 = Marker, with text, exactly on target, 2 = radial marker with target somewhere random inside marker) "!alive player", // Condition 2
markerType = 2; "player setdamage 1", // String with code to call when condition 2 = true
//Set marker radius for radial marker (markerType = 2) {"uavMission2"} // Array of random selected tasks to switch to when condition 2 = true
markerRadius = 50; },
//Marker Text - Add text to marker, leave "" for no text. No text available for Marker type 2 yet. };
markerText = "Last seen here somewhere."; abandonTime = 240; // Timeout for task
//task fsm / sqf. Call an sqf or FSM, designed to manage the mission locally. Will trigger at task start (After specified delay) failedCondition = "false"; // Failed Condition for Task
//All FSM & SQF Calls pass default variables. e.g. [player ,EPOCH_taskItem] execVM "yourSQF.sqf"; faileddialogues[] = {"Text1","Text2"}; // Array of random dialogues when task failed
//Both options (SQF or FSM) will be presented when a script call is available. Both will be called if value is not "" completeCondition = "'B_UavTerminal' in assignedItems player"; // Condition to complete the task succesfully
//All sqf, fsm files are stored, by default, in <Mission Folder>\epoch_code\compile\missions\tasks\ (WIP - Can be edited with the task setting in CfgMissionTasks.hpp) completedialogues[] = {"Text1","Text2"}; // Array of random dialogues when task completed successfully
//TODO - Reduce to just call so these can all be pre-CompileFinaled completedCALL = ""; // Code to call when task completed successfully
reward[] = {}; // Array of items, that spawn next to the Player when completed successfully
//Call additional functions based on condition, e.g. air drop, antagonist spawn, or custom code. cleanUp = 0; // Set to 1 to call cleanupcall on success
//Conditions must return a boolean. e.g. player distance player < 12; nextTask[] = {"doUAVSpawn"}; // Array of next selected random tasks
callEventBinTask = 0;//If calling another task (callEventTask1 etc.) then bin this task before starting the new one ? - WIP
callEventCondition1 = "true"; // Not used atm
callEventCondition2 = "EPOCH_taskItem distance player < 50"; taskLimit = 3;
callEventCondition3 = ""; itemSpawn = 3;
callEventBinTask = 0;
//All sqf, fsm files are stored, by default, in <Mission Folder>\epoch_code\compile\missions\tasks\ (WIP - Can be edited with the task setting above) diagSquelch = 30;
callEventCALL1 = ""; abandonDist = 100;
callEventFSM1 = "";
callEventSQF1 = "triggerAirDrop.sqf";
//Call another task class from the same mission.
callEventTask1 = "";
callEventCALL2 = "hint 'You are getting warm'";
callEventFSM2 = "";
callEventSQF2 = "";
callEventTask2 = "";
callEventCALL3 = "";
callEventFSM3 = "";
callEventSQF3 = "";
callEventTask3 = "";
//dialogues. One of the array will be selected randomly upon each trigger
//Dialogue 1 will trigger only one time upon it's condition, designed to be a welcome message.
diag1Condition = "true";
dialogue1[] = {"Ok, first thing I need to do is find my rucksack","Help me find my rucksack first.","I need to find my rucksack."};
//Delay between triggering dialogue, to stop flooding.
diagSquelch = 60;
//Dialogue 2 and 3 will repeat everytime the condition is met and the squelch time has elapsed. Designed as warnings / hint dialogues. Again, a random message will be chosen from the array.
diag2Condition = "diag_tickTime - EPOCH_task_startTime > 20";
dialogue2[] = {"I dropped it in one of these buildings. Some.. thing was chasing me.","It is in a house nearby, I have a map that I need in it.","Search the nearby houses until you find it."};
diag3Condition = "EPOCH_taskItem distance player < 12";
dialogue3[] = {"Wow, you are really close now.","Keep looking, it is right near you.","Smoking hot, you are practically standing on it."};
//FAILED / ABANDONED
//Apply a condition to detect mission failure. e.g. '!alive _unit' if escorting a NPC. Task will bin upon player death anyway.
failedCondition = "!alive player";
//Abandon Distance - Player moves this far from 'task trigger position' causes abandonment of mission (0 = unlimited)
abandonDist = 100;
//Time Limit - Once time limit is reached, and completed condition is not met, the mission has failed and will be disposed. 0 = No Limit.
abandonTime = 240;
//Failed Message (triggered by timeLimit or abandon distance) - Display random message from array upon task failure.
failed[] = {"You blew it.","Don't give up your day job pal..","That's you finished mate, bring on the pain."};
//Run a command to punish failure of task (triggered by timeLimit or failure condition).
failedFSM = "";
failedSQF = "";
failedCall = "[] call EPOCH_callSapperMigration;";
//Add failure task. Can be multiple tasks that are picked at random.
failedTask[] = {""};
//Dispose of task item at failure 0 = No, 1 = Yes. Cleans up any spawned weaponholders.
cleanUp = 1;
//Upon FSM disposal call compile each piece of code. Designed to cleanup namespace(s).
cleanUpCalls[] = {""};
//COMPLETED
//Condition met to trigger completion of task.
completeCondition = "EPOCH_taskItem distance player < 2";
//Drop reward for player - Currently always nearby, on the floor.
reward[] = {"ItemSodaOrangeSherbet","ItemSodaPurple","ItemSodaMocha"};
//Completed dialogues, selected randomly from each array. With pause in-between completed1 and completed2.
completed1[] = {"Well done, that was quick. Let me have it, and here's something for you.","You've found it, good job. I have something in here you can have.","Well found, you're a natural. Here, this is yours, thank you."};
completed2[] = {"Now let's head out of town, you lead the way !","It's time to leave this area, let's go !","Do you think we should get out of this area now ?"};
//Remind / hint to the player to get them onto the NEXT task. Displays after longer pause
reminder[] = {"It's about time we headed out of town.","We need to get away from these houses.","Let's move away from these built up areas."};
//Trigger next task at disposal of this one. Allows tasks to be strung together. If more than one a task is selected at random. Leave blank to end mission and reset menu item at trader.
nextTask[] = {"findHouseItem"};
};
class blankTaskWithDefaults{
author = "axeman";
title = "";
desc = "";
img = "";
simpleTask = 0;
triggerCondition = "";
taskLimit = 3;
taskCheckTime = 16;
triggerDelay = 16;
items[] = {""};
itemSpawn = 1;
markerType = 2;
markerRadius = 50;
markerText = "";
initfsm = "";
initsqf = "";
initcall = "";
callEventBinTask = 0;
callEventCondition1 = "";
callEventCondition2 = "";
callEventCondition3 = "";
callEventCALL1 = "";
callEventFSM1 = "";
callEventSQF1 = "";
callEventTask1 = "";
callEventCALL2 = "";
callEventFSM2 = "";
callEventSQF2 = "";
callEventTask2 = "";
callEventCALL3 = "";
callEventFSM3 = "";
callEventSQF3 = "";
callEventTask3 = "";
diag1Condition = "";
dialogue1[] = {""};
diagSquelch = 60;
diag2Condition = "";
dialogue2[] = {""};
diag3Condition = "";
dialogue3[] = {""};
failedCondition = "";
abandonDist = 100;
abandonTime = 240;
failed[] = {""};
failedFSM = "";
failedSQF = "";
failedCall = "";
failedTask[] = {""};
cleanUp = 1;
cleanUpCalls[] = {};
completeCondition = "";
reward[] = {""};
completed1[] = {""};
completed2[] = {""};
completedCALL = "";
reminder[] = {""};
nextTask[] = {""};
}; };

View File

@ -3,7 +3,7 @@ author = "axeman";
title = "Trader Time"; title = "Trader Time";
//Simple task will skip all monitoring and run the provided code (call, fsm, sqf) only. //Simple task will skip all monitoring and run the provided code (call, fsm, sqf) only.
simpleTask = 1; simpleTask = 1;
initsqf = "traderDiag_timePlease.sqf"; initsqf = "epoch_code\compile\missions\tasks\traderDiag_timePlease.sqf";
initfsm = ""; initfsm = "";
initcall = ""; initcall = "";
//Next task is allowed to trigger a task if required. //Next task is allowed to trigger a task if required.
@ -14,7 +14,7 @@ class traderDiagNearby{
author = "axeman"; author = "axeman";
title = "Trader Near By Players"; title = "Trader Near By Players";
simpleTask = 1; simpleTask = 1;
initsqf = "traderDiag_nearPlayers.sqf"; initsqf = "epoch_code\compile\missions\tasks\traderDiag_nearPlayers.sqf";
initfsm = ""; initfsm = "";
initcall = ""; initcall = "";
nextTask[] = {}; nextTask[] = {};
@ -24,7 +24,7 @@ class traderDiagNews{
author = "axeman"; author = "axeman";
title = "Trader News"; title = "Trader News";
simpleTask = 1; simpleTask = 1;
initsqf = "traderDiag_news.sqf"; initsqf = "epoch_code\compile\missions\tasks\traderDiag_news.sqf";
initfsm = ""; initfsm = "";
initcall = ""; initcall = "";
nextTask[] = {}; nextTask[] = {};
@ -34,7 +34,7 @@ class traderDiagName{
author = "axeman"; author = "axeman";
title = "Traders Name"; title = "Traders Name";
simpleTask = 1; simpleTask = 1;
initsqf = "traderDiag_name.sqf"; initsqf = "epoch_code\compile\missions\tasks\traderDiag_name.sqf";
initfsm = ""; initfsm = "";
initcall = ""; initcall = "";
nextTask[] = {}; nextTask[] = {};
@ -44,7 +44,7 @@ class traderNearVehicles{
author = "axeman"; author = "axeman";
title = "Trader Nearby Vehicles"; title = "Trader Nearby Vehicles";
simpleTask = 1; simpleTask = 1;
initsqf = "traderDiag_nearVehicles.sqf"; initsqf = "epoch_code\compile\missions\tasks\traderDiag_nearVehicles.sqf";
initfsm = ""; initfsm = "";
initcall = ""; initcall = "";
nextTask[] = {}; nextTask[] = {};
@ -54,7 +54,7 @@ class traderTriggerAirDrop{
author = "axeman"; author = "axeman";
title = "Trigger AirDrop"; title = "Trigger AirDrop";
simpleTask = 1; simpleTask = 1;
initsqf = "traderDiag_triggerAirDrop.sqf"; initsqf = "epoch_code\compile\missions\tasks\traderDiag_triggerAirDrop.sqf";
initfsm = ""; initfsm = "";
initcall = ""; initcall = "";
nextTask[] = {}; nextTask[] = {};
@ -64,7 +64,7 @@ class traderMissionReset{
author = "axeman"; author = "axeman";
title = "Reset Missions"; title = "Reset Missions";
simpleTask = 1; simpleTask = 1;
initsqf = "traderDebug_resetMissions.sqf"; initsqf = "epoch_code\compile\missions\tasks\traderDebug_resetMissions.sqf";
initfsm = ""; initfsm = "";
initcall = ""; initcall = "";
nextTask[] = {}; nextTask[] = {};

View File

@ -1,232 +1,158 @@
class prepForDelivery{ class prepForDelivery {
author = "axeman"; author = "axeman";
title = "Prep for Delivery"; title = "Prep for Delivery";
desc = ""; simpleTask = 0;
img = ""; items[] = {"ItemDocumentMission"};
simpleTask = 0; triggerDelay = 2;
triggerCondition = ""; triggerintervall = 8;
taskLimit = 3; markerType = 0;
taskCheckTime = 16; markerVisible = 0;
triggerDelay = 0; markerRadius = 0;
items[] = {"ItemDocumentMission"}; markerText = "";
itemSpawn = 3; initcall = "";
markerType = 0; cleanUpCall = "uiNameSpace setVariable ['axeStartTraders', nil]";
markerRadius = 0; dialogues[] = { // {{ARRAY1},{ARRAY2},... }
markerText = ""; { // {"condition",{"Message1","Message2", ...}}
initfsm = ""; "true",
initsqf = ""; {"Pick up the Document to Start."}
initcall = "axeDocDeliveryStart = diag_tickTime"; },
callEventBinTask = 0; {
callEventCondition1 = "(""ItemDocumentMission"" in magazines player)"; "!(""ItemDocumentMission"" in magazines player)",
callEventCondition2 = ""; {"Come on Buddy, Pick it up !","It's right next to you on the floor, pick it up to start."}
callEventCondition3 = ""; }
callEventCALL1 = "uiNameSpace setVariable ['axeStartTraders',(player nearentities [[""C_Man_1""],500]) apply {_x getVariable [""AI_SLOT"",-1]}]"; };
callEventFSM1 = ""; callevents[] = { // {{ARRAY1},{ARRAY2},... }
callEventSQF1 = ""; };
callEventTask1 = ""; abandonTime = 240;
callEventCALL2 = ""; failedCondition = "false";
callEventFSM2 = ""; faileddialogues[] = {"I guess you have better things to do.","Try again later.","You didn't pick up the document. Misison Failed !"};
callEventSQF2 = ""; completeCondition = "('ItemDocumentMission' in magazines player)";
callEventTask2 = ""; completedialogues[] = {"That's great, let's get out of here.","Good, you have the document, let's move on.","Ok, well done. We can start now."};
callEventCALL3 = ""; completedCALL = "uiNameSpace setVariable ['axeStartTraders',(player nearentities [[""C_Man_1""],500]) apply {_x getVariable [""AI_SLOT"",-1]}]";
callEventFSM3 = ""; reward[] = {};
callEventSQF3 = ""; cleanUp = 0;
callEventTask3 = ""; nextTask[] = {"doDelivery"};
diag1Condition = "true";
dialogue1[] = {"Pick up the Document to Start."}; // Not used atm
diagSquelch = 60; taskLimit = 3;
diag2Condition = "!(""ItemDocumentMission"" in magazines player)"; itemSpawn = 3;
dialogue2[] = {"Come on Buddy, Pick it up !","It's right next to you on the floor, pick it up to start."}; callEventBinTask = 0;
diag3Condition = ""; diagSquelch = 30;
dialogue3[] = {""}; abandonDist = 100;
failedCondition = "";
abandonDist = 100;
abandonTime = 240;
failed[] = {"I guess you have better things to do.","Try again later.","You didn't pick up the document. Misison Failed !"};
failedFSM = "";
failedSQF = "";
failedCall = "";
failedTask[] = {""};
cleanUp = 1;
cleanUpCalls[] = {"uiNameSpace setVariable ['axeStartTraders', nil]"};
completeCondition = "('ItemDocumentMission' in magazines player)";
reward[] = {};
completed1[] = {"That's great, let's get out of here.","Good, you have the document, let's move on.","Ok, well done. We can start now."};
completed2[] = {""};
reminder[] = {""};
nextTask[] = {"doDelivery"};
}; };
class doDelivery{ class doDelivery {
author = "axeman"; author = "axeman";
title = "Do Delivery"; title = "Do Delivery";
desc = ""; simpleTask = 0;
img = ""; items[] = {};
simpleTask = 0; triggerDelay = 8;
triggerCondition = "(""ItemDocumentMission"" in magazines player)"; triggerintervall = 8;
taskLimit = 3; markerType = 0;
taskCheckTime = 16; markerVisible = 0;
triggerDelay = 3; markerRadius = 0;
items[] = {""}; markerText = "";
itemSpawn = 0; initcall = "";
markerType = 0; cleanUpCall = "uiNameSpace setVariable ['axeStartTraders', nil]";
markerRadius = 0; dialogues[] = { // {{ARRAY1},{ARRAY2},... }
markerText = ""; { // {"condition",{"Message1","Message2", ...}}
initfsm = ""; "(""ItemDocumentMission"" in magazines player)",
initsqf = ""; {"Ok, head off to another trader, you can't deliver to any nearby.","All set. Now take that document to another trader further away.","Take that message to another trader or trader city."}
initcall = ""; },
callEventBinTask = 0; {
callEventCondition1 = "(axeDocDeliveryStart + 480 < diag_tickTime) && ((player nearentities [[""C_Man_1""],500]) apply {_x getVariable [""AI_SLOT"",-1]} isEqualTo (uiNameSpace getVariable [""axeStartTraders"",[]]))"; "!('ItemDocumentMission' in magazines player)",
callEventCondition2 = ""; {"Don't leave that document anywhere.","If you lose that document you will fail the mission."}
callEventCondition3 = ""; },
callEventCALL1 = "[""Hey, what are you doing here ? Get on with your task !"", 5] call Epoch_message"; {
callEventFSM1 = ""; "(count (player nearentities [[""C_Man_1""],42]) > 0) && (count (((player nearentities [[""C_Man_1""],42]) apply {_x getVariable [""AI_SLOT"",-1]}) select {_x in (uiNameSpace getVariable [""axeStartTraders"",[]])}) < 1)",
callEventSQF1 = ""; {"Well done, you have a trader nearby, go see him","Looks like you found another trader, well done, deliver the message.","UAV has spotted another trader nearby, go deliver the message."}
callEventTask1 = ""; }
callEventCALL2 = ""; };
callEventFSM2 = ""; callevents[] = { // {{ARRAY1},{ARRAY2},... }
callEventSQF2 = ""; { // {"condition",{"Message1","Message2", ...},{"NextTask1","NextTask2", ...}}
callEventTask2 = ""; "(EPOCH_task_startTime + 480 < diag_tickTime) && ((player nearentities [[""C_Man_1""],500]) apply {_x getVariable [""AI_SLOT"",-1]} isEqualTo (uiNameSpace getVariable [""axeStartTraders"",[]]))",
callEventCALL3 = ""; "[""Hey, what are you doing here ? Get on with your task !"", 5] call Epoch_message",
callEventFSM3 = ""; {}
callEventSQF3 = ""; }
callEventTask3 = ""; };
diag1Condition = "(""ItemDocumentMission"" in magazines player)"; abandonTime = 1800;
dialogue1[] = {"Ok, head off to another trader, you can't deliver to any nearby.","All set. Now take that document to another trader further away.","Take that message to another trader or trader city."}; failedCondition = "false";
diagSquelch = 40; faileddialogues[] = {"Looks like you took too long buddy, Mission Over.","You need to be quicker next time, Mission Over !","Misison Failed - You took too long, better luck next time."};
diag2Condition = "!('ItemDocumentMission' in magazines player)"; completeCondition = "(count (player nearentities [[""C_Man_1""],6]) > 0) && (count (((player nearentities [[""C_Man_1""],6]) apply {_x getVariable [""AI_SLOT"",-1]}) select {_x in (uiNameSpace getVariable [""axeStartTraders"",[]])}) < 1)";
dialogue2[] = {"Don't leave that document anywhere.","If you lose that document you will fail the mission."}; completedialogues[] = {"Hey there pal, it looks like you have something for me ?","Great Job there. Step into my office traveller.","You made it, time to take a look at that message."};
diag3Condition = "(count (player nearentities [[""C_Man_1""],42]) > 0) && (count (((player nearentities [[""C_Man_1""],42]) apply {_x getVariable [""AI_SLOT"",-1]}) select {_x in (uiNameSpace getVariable [""axeStartTraders"",[]])}) < 1)"; completedCALL = "";
dialogue3[] = {"Well done, you have a trader nearby, go see him","Looks like you found another trader, well done, deliver the message.","UAV has spotted another trader nearby, go deliver the message."}; reward[] = {};
failedCondition = ""; cleanUp = 0;
abandonDist = 0; nextTask[] = {"finishDelivery"};
abandonTime = 1800;
failed[] = {"Looks like you took too long buddy, Mission Over.","You need to be quicker next time, Mission Over !","Misison Failed - You took too long, better luck next time."};
failedFSM = "";
failedSQF = "";
failedCall = "";
failedTask[] = {""};
cleanUp = 0;
cleanUpCalls[] = {"uiNameSpace setVariable ['axeStartTraders', nil]"};
completeCondition = "(count (player nearentities [[""C_Man_1""],6]) > 0) && (count (((player nearentities [[""C_Man_1""],6]) apply {_x getVariable [""AI_SLOT"",-1]}) select {_x in (uiNameSpace getVariable [""axeStartTraders"",[]])}) < 1)";
reward[] = {};
completed1[] = {"Hey there pal, it looks like you have something for me ?","Great Job there. Step into my office traveller.","You made it, time to take a look at that message."};
completed2[] = {""};
reminder[] = {""};
nextTask[] = {"finishDelivery"};
}; };
class finishDelivery{ class finishDelivery {
author = "axeman"; author = "axeman";
title = "Finish Delivery"; title = "Finish Delivery";
desc = ""; simpleTask = 0;
img = ""; items[] = {};
simpleTask = 0; triggerDelay = 8;
triggerCondition = "(""ItemDocumentMission"" in magazines player)"; triggerintervall = 8;
taskLimit = 3; markerType = 0;
taskCheckTime = 16; markerVisible = 0;
triggerDelay = 3; markerRadius = 0;
items[] = {""}; markerText = "";
itemSpawn = 0; initcall = "axeRndBadNews = floor random 100";
markerType = 0; cleanUpCall = "uiNameSpace setVariable ['axeStartTraders', nil];axeRndBadNews = nil";
markerRadius = 0; dialogues[] = { // {{ARRAY1},{ARRAY2},... }
markerText = ""; { // {"condition",{"Message1","Message2", ...}}
initfsm = ""; "axeRndBadNews > 5",
initsqf = ""; {"That's interesting news. Thanks for bringing this.","Great news, you did well to bring this to me."}
initcall = "axeRndBadNews = floor random 100"; }
callEventBinTask = 1; };
callEventCondition1 = "(""ItemDocumentMission"" in magazines player)"; callevents[] = { // {{ARRAY1},{ARRAY2},... }
callEventCondition2 = "axeRndBadNews < 6"; { // {"condition",{"Message1","Message2", ...},{"NextTask1","NextTask2", ...}}
callEventCondition3 = ""; "(""ItemDocumentMission"" in magazines player)",
callEventCALL1 = "player removeMagazine ""ItemDocumentMission"""; "player removeMagazine ""ItemDocumentMission""",
callEventFSM1 = ""; {}
callEventSQF1 = ""; },
callEventTask1 = ""; { // {"condition",{"Message1","Message2", ...},{"NextTask1","NextTask2", ...}}
callEventCALL2 = ""; "axeRndBadNews < 6",
callEventFSM2 = ""; "",
callEventSQF2 = ""; {"deliveryMissionBadNews"}
callEventTask2 = "deliveryMissionBadNews"; }
callEventCALL3 = ""; };
callEventFSM3 = ""; abandonTime = 240;
callEventSQF3 = ""; failedCondition = "false";
callEventTask3 = ""; faileddialogues[] = {};
diag1Condition = "axeRndBadNews > 5"; completeCondition = "diag_ticktime - EPOCH_task_startTime > 16 && axeRndBadNews > 5";
dialogue1[] = {"That's interesting news. Thanks for bringing this.","Great news, you did well to bring this to me."}; completedialogues[] = {"Take your reward, you have earnt it","Here is your reward, you are a great courier.","Any time you need work, come and see me, great job."};
diagSquelch = 60; completedCALL = "_wh = createVehicle[""groundWeaponHolder"",getPosATL player,[],0,""CAN_COLLIDE""];[_wh,""Pelican_EPOCH""] remoteExec [""EPOCH_serverLootObject"",2];";
diag2Condition = ""; reward[] = {};
dialogue2[] = {""}; cleanUp = 1;
diag3Condition = ""; nextTask[] = {};
dialogue3[] = {""};
failedCondition = "";
abandonDist = 0;
abandonTime = 240;
failed[] = {""};
failedFSM = "";
failedSQF = "";
failedCall = "";
failedTask[] = {};
cleanUp = 0;
cleanUpCalls[] = {"uiNameSpace setVariable ['axeStartTraders', nil]"};
completeCondition = "axeRndBadNews > 5";
reward[] = {};
completed1[] = {"Take your reward, you have earnt it","Here is your reward, you are a great courier.","Any time you need work, come and see me, great job."};
completedCALL = "axeRewardWH = createVehicle[""groundWeaponHolder"",getPosATL player,[],0,""CAN_COLLIDE""];[axeRewardWH,""Pelican_EPOCH""] remoteExec [""EPOCH_serverLootObject"",2];";
reminder[] = {""};
nextTask[] = {};
}; };
class deliveryMissionBadNews{ class deliveryMissionBadNews {
author = "axeman"; author = "axeman";
title = "Delivery Gone Bad"; title = "Delivery Gone Bad";
desc = ""; simpleTask = 0;
img = ""; items[] = {};
simpleTask = 0; triggerDelay = 0;
triggerCondition = ""; triggerintervall = 8;
taskLimit = 3; markerType = 0;
taskCheckTime = 4; markerVisible = 0;
triggerDelay = 3; markerRadius = 0;
items[] = {""}; markerText = "";
itemSpawn = 0; initcall = "[player,6] call EPOCH_callSapperMigration";
markerType = 0; cleanUpCall = "uiNameSpace setVariable ['axeStartTraders', nil]";
markerRadius = 50; dialogues[] = { // {{ARRAY1},{ARRAY2},... }
markerText = ""; { // {"condition",{"Message1","Message2", ...}}
initfsm = ""; "true",
initsqf = ""; {"Oh my, that's terrible, why did you bring me this news ?","No no no, why would you do this to me, this is awful news."}
initcall = "[player,6] call EPOCH_callSapperMigration"; }
callEventBinTask = 0; };
callEventCondition1 = ""; callevents[] = { // {{ARRAY1},{ARRAY2},... }
callEventCondition2 = ""; };
callEventCondition3 = ""; abandonTime =240;
callEventCALL1 = ""; failedCondition = "false";
callEventFSM1 = ""; faileddialogues[] = {};
callEventSQF1 = ""; completeCondition = "diag_ticktime - EPOCH_task_startTime > 8";
callEventTask1 = ""; completedialogues[] = {"You are going to pay for that, get out of my sight","Nobody does that to me, go away.","I would run buddy, I am not pleased."};
callEventCALL2 = ""; completedCALL = "";
callEventFSM2 = ""; reward[] = {};
callEventSQF2 = ""; cleanUp = 1;
callEventTask2 = ""; nextTask[] = {};
callEventCALL3 = "";
callEventFSM3 = "";
callEventSQF3 = "";
callEventTask3 = "";
diag1Condition = "true";
dialogue1[] = {"Oh my, that's terrible, why did you bring me this news ?","No no no, why would you do this to me, this is awful news."};
diagSquelch = 60;
diag2Condition = "";
dialogue2[] = {""};
diag3Condition = "";
dialogue3[] = {""};
failedCondition = "";
abandonDist = 100;
abandonTime = 240;
failed[] = {""};
failedFSM = "";
failedSQF = "";
failedCall = "";
failedTask[] = {""};
cleanUp = 1;
cleanUpCalls[] = {"uiNameSpace setVariable ['axeStartTraders', nil]"};
completeCondition = "true";
reward[] = {""};
completed1[] = {"You are going to pay for that, get out of my sight","Nobody does that to me, go away.","I would run buddy, I am not pleased."};
completed2[] = {""};
reminder[] = {""};
nextTask[] = {};
}; };

View File

@ -0,0 +1,139 @@
class StartFishMission {
author = "He-Man";
title = "Start Fish Mission";
simpleTask = 0;
items[] = {};
triggerDelay = 2;
triggerintervall = 5;
markerType = 0;
markerVisible = 0;
markerRadius = 0;
markerText = "";
initcall = "uiNameSpace setVariable ['axeStartTraders',(player nearentities [[""C_Man_1""],20]) apply {_x getVariable [""AI_SLOT"",-1]}]; EPOCH_Mission_StartPos = getpos player";
cleanUpCall = "uiNameSpace setVariable ['axeStartTraders', nil];EPOCH_Mission_StartPos = nil";
dialogues[] = { // {{ARRAY1},{ARRAY2},... }
{ // {"condition",{"Message1","Message2", ...}}
"true",
{"I really need a fresh Fish. Can you fish me one?","Go to the Water and catch me a fresh Fish. I will reward you"}
},
{ // {"condition",{"Message1","Message2", ...}}
"true",
{"But don't bring me a Fish from this region. Go a bit away","The Fishes from this region are boring. Please go a bit farther"}
},
{
"!(""MeleeRod"" in weapons player)",
{"Hey, you need your Fishin Rod for fishing! Don't throw it away"}
},
{
"(surfaceiswater (getpos player) || (surfaceiswater (player modelToWorld[0, 5 + (random 5), 0]))) && player distance EPOCH_Mission_StartPos < 1000",
{"The Fishes in this region taste awful. Go to another Spot.","Don't bring me a fish frome here! They taste terrible..."}
},
{
"(surfaceiswater (getpos player) || (surfaceiswater (player modelToWorld[0, 5 + (random 5), 0]))) && player distance EPOCH_Mission_StartPos > 1000",
{"Oh nice, here is an excellent spot for fishing...","Use your Fishing-Rod to catch me a fresh Fish"}
}
};
callevents[] = { // {{ARRAY1},{ARRAY2},... }
};
abandonTime = 1200;
failedCondition = "!alive player";
faileddialogues[] = {"I guess you have better things to do. - Mission Failed","Mission Failed - Try again later."};
completeCondition = "player distance (missionNamespace getVariable [""EPOCH_myBobber"", objNull]) < 40 && player distance EPOCH_Mission_StartPos > 900";
completedialogues[] = {"Okay, now catch a Fish","Let's wait now..."};
completedCALL = "";
reward[] = {};
cleanUp = 0;
nextTask[] = {"CatchFish"};
// Not used atm
taskLimit = 3;
itemSpawn = 3;
callEventBinTask = 0;
diagSquelch = 30;
abandonDist = 100;
};
class CatchFish {
author = "He-Man";
title = "Catch the Fish";
simpleTask = 0;
items[] = {};
triggerDelay = 8;
triggerintervall = 5;
markerType = 0;
markerVisible = 0;
markerRadius = 0;
markerText = "";
initcall = "";
cleanUpCall = "uiNameSpace setVariable ['axeStartTraders', nil];EPOCH_Mission_StartPos = nil";
dialogues[] = { // {{ARRAY1},{ARRAY2},... }
};
callevents[] = { // {{ARRAY1},{ARRAY2},... }
};
abandonTime = 600;
failedCondition = "!alive player";
faileddialogues[] = {"I guess you have better things to do. - Mission Failed","Mission Failed - You took to long."};
completeCondition = "{_x in magazines player} count ([""CfgEpochClient"", ""fishLoots"", [""ItemTuna"",""ItemSeaBass"",""ItemSeaBass"",""ItemSeaBass"",""ItemTrout"",""ItemTrout"",""ItemTrout"",""ItemTrout"",""ItemTrout"",""ItemTrout""]] call EPOCH_fnc_returnConfigEntryV2) > 0";
completedialogues[] = {"YEAH! You got one. Bring it to me","Wow, bring the Fish to me!"};
completedCALL = "";
reward[] = {};
cleanUp = 0;
nextTask[] = {"BringTheFish"};
};
class BringTheFish {
author = "He-Man";
title = "Bring the Fish";
simpleTask = 0;
items[] = {};
triggerDelay = 8;
triggerintervall = 8;
markerType = 0;
markerVisible = 0;
markerRadius = 0;
markerText = "";
initcall = "";
cleanUpCall = "uiNameSpace setVariable ['axeStartTraders', nil];EPOCH_Mission_StartPos = nil";
dialogues[] = { // {{ARRAY1},{ARRAY2},... }
{ // {"condition",{"Message1","Message2", ...}}
"diag_ticktime - EPOCH_task_startTime > 180",
{"Hurry up, I am really hungry.","Hey, where is my Fish? Bring it to me!","Why does it take so long to bring me a Fish?"}
}
};
callevents[] = { // {{ARRAY1},{ARRAY2},... }
};
abandonTime = 1200;
failedCondition = "!alive player";
faileddialogues[] = {"I guess you have better things to do. - Mission Failed","Mission Failed - You took to long."};
completeCondition = "((player nearentities [[""C_Man_1""],20]) apply {_x getVariable [""AI_SLOT"",-1]} isEqualTo (uiNameSpace getVariable [""axeStartTraders"",[]])) && {_x in magazines player} count ([""CfgEpochClient"", ""fishLoots"", [""ItemTuna"",""ItemSeaBass"",""ItemSeaBass"",""ItemSeaBass"",""ItemTrout"",""ItemTrout"",""ItemTrout"",""ItemTrout"",""ItemTrout"",""ItemTrout""]] call EPOCH_fnc_returnConfigEntryV2) > 0";
completedialogues[] = {"Hey, you bring me my Fish? - THANKS!!!","Great Job there. Step into my office traveller.","You made it, thanks for bringing me the Fish."};
completedCALL = "{if (_x in magazines player) exitwith {player removeMagazine _x}} foreach ([""CfgEpochClient"", ""fishLoots"", [""ItemTuna"",""ItemSeaBass"",""ItemSeaBass"",""ItemSeaBass"",""ItemTrout"",""ItemTrout"",""ItemTrout"",""ItemTrout"",""ItemTrout"",""ItemTrout""]] call EPOCH_fnc_returnConfigEntryV2)";
reward[] = {};
cleanUp = 0;
nextTask[] = {"FinishFishMission"};
};
class FinishFishMission {
author = "He-Man";
title = "Finish Fish Mission";
simpleTask = 0;
items[] = {};
triggerDelay = 8;
triggerintervall = 8;
markerType = 0;
markerVisible = 0;
markerRadius = 0;
markerText = "";
initcall = "";
cleanUpCall = "uiNameSpace setVariable ['axeStartTraders', nil];EPOCH_Mission_StartPos = nil";
dialogues[] = { // {{ARRAY1},{ARRAY2},... }
};
callevents[] = { // {{ARRAY1},{ARRAY2},... }
};
abandonTime = 240;
failedCondition = "false";
faileddialogues[] = {};
completeCondition = "true";
completedialogues[] = {"Take your reward, you have earnt it","Here is your reward, you are a great fisher man.","Any time you need work, come and see me, great job."};
completedCALL = "_WH = createVehicle[""groundWeaponHolder"",getPosATL player,[],0,""CAN_COLLIDE""];[_WH,""Mission_Fishing_Payout""] remoteExec [""EPOCH_serverLootObject"",2];";
reward[] = {};
cleanUp = 1;
nextTask[] = {};
};

View File

@ -0,0 +1,134 @@
class prepForMonsterEscort {
author = "He-Man";
title = "Prep for Monster Escort";
simpleTask = 0;
items[] = {};
triggerDelay = 2;
triggerintervall = 8;
markerType = 0;
markerVisible = 0;
markerRadius = 0;
markerText = "";
initcall = "EPOCH_Monster = objnull";
cleanUpCall = "uiNameSpace setVariable ['axeStartTraders', nil]";
dialogues[] = { // {{ARRAY1},{ARRAY2},... }
{ // {"condition",{"Message1","Message2", ...}}
"true",
{"Hey, thanks for helping me to take my Monster to a friend"}
},
{
"true",
{"I will call my monster. Bring him to another Trader"}
}
};
callevents[] = { // {{ARRAY1},{ARRAY2},... }
{ // {"condition",{"Message1","Message2", ...},{"NextTask1","NextTask2", ...}}
"true",
"uiNameSpace setVariable ['axeStartTraders',(player nearentities [[""C_Man_1""],500]) apply {_x getVariable [""AI_SLOT"",-1]}]",
{}
},
{ // {"condition",{"Message1","Message2", ...},{"NextTask1","NextTask2", ...}}
"true",
"_animalPos = [getposatl player, 150, 250, 5, 0, 2000, 0] call BIS_fnc_findSafePos;_randomAIClass = ""Construct_F"";_animal = createAgent[_randomAIClass, _animalPos, [], 5, ""NONE""];EPOCH_Monster = _animal;[EPOCH_Monster] remoteExec [""EPOCH_localCleanup"",2]",
{}
}
};
abandonTime = 240;
failedCondition = "false";
faileddialogues[] = {"I guess you have better things to do.","Try again later.","You didn't pick up the document. Misison Failed !"};
completeCondition = "!isnull EPOCH_Monster";
completedialogues[] = {};
completedCALL = "[] spawn {_pos = getpos player;_stay = false;while {!isnull EPOCH_Monster && alive EPOCH_Monster && alive player} do {if (EPOCH_Monster distance2d player > 35) then {_stay = false;_pos = getposatl player;}else {if (!_stay) then {_pos = getposatl EPOCH_Monster;_stay = true;};};EPOCH_Monster moveto _pos;_time = diag_ticktime;uisleep 3;waituntil {diag_ticktime - _time > 15 || EPOCH_Monster distance _pos < 25 || isnull EPOCH_Monster};};};";
reward[] = {};
cleanUp = 0;
nextTask[] = {"EscortMonster"};
// Not used atm
taskLimit = 3;
itemSpawn = 3;
callEventBinTask = 0;
diagSquelch = 30;
abandonDist = 100;
};
class EscortMonster {
author = "He-Man";
title = "Escort Monster";
simpleTask = 0;
items[] = {};
triggerDelay = 5;
triggerintervall = 8;
markerType = 0;
markerVisible = 0;
markerRadius = 0;
markerText = "";
initcall = "";
cleanUpCall = "uiNameSpace setVariable ['axeStartTraders', nil]; deletevehicle EPOCH_Monster";
dialogues[] = { // {{ARRAY1},{ARRAY2},... }
{ // {"condition",{"Message1","Message2", ...}}
"true",
{"That's great, look for the Monster outside.","Good, now search my Monster outside","Ok, well done. We can start now."}
},
{
"true",
{"Ok, head off to another trader, you can't deliver to any nearby.","All set. Now take the Monster to another trader further away.","Take that Monster to another trader or trader city."}
},
{
"EPOCH_task_startTime + 60 < diag_ticktime",
{"Sorrz, he is an old Man and not very fast...","My Monster is very old a bit lazy"}
},
{
"EPOCH_task_startTime + 120 < diag_ticktime && EPOCH_Monster distance player > 350",
{"Don't go to far away or you loose the Monster","Hey, wait for my Monster!"}
},
{
"EPOCH_Monster distance player < 20",
{"Go forward, my Monster will follow you!","Hurry up a bit. My Monster is hungry..."}
},
{
"(count (player nearentities [[""C_Man_1""],42]) > 0) && (count (((player nearentities [[""C_Man_1""],42]) apply {_x getVariable [""AI_SLOT"",-1]}) select {_x in (uiNameSpace getVariable [""axeStartTraders"",[]])}) < 1)",
{"Well done, you have a trader nearby, go see him","Looks like you found another trader, well done, deliver the Monster.","UAV has spotted another trader nearby, go deliver the Monster."}
},
{
"(EPOCH_task_startTime + 480 < diag_tickTime) && ((player nearentities [[""C_Man_1""],500]) apply {_x getVariable [""AI_SLOT"",-1]} isEqualTo (uiNameSpace getVariable [""axeStartTraders"",[]]))",
{"Hey, what are you doing here ? Get on with your task!"}
}
};
callevents[] = { // {{ARRAY1},{ARRAY2},... }
};
abandonTime = 2000;
failedCondition = "!alive EPOCH_Monster || !alive player || EPOCH_Monster distance player > 500";
faileddialogues[] = {"Oh no, you lost my Monster - Mission Failed","My Monster ist gone, Mission Over!"};
completeCondition = "player distance EPOCH_Monster < 50 && (count (player nearentities [[""C_Man_1""],20]) > 0) && (count (((player nearentities [[""C_Man_1""],20]) apply {_x getVariable [""AI_SLOT"",-1]}) select {_x in (uiNameSpace getVariable [""axeStartTraders"",[]])}) < 1)";
completedialogues[] = {"Hey, you bring me my friends Monster?","Great Job there. Step into my office traveller.","You made it, thanks for bringing me the Monster."};
completedCALL = "";
reward[] = {};
cleanUp = 0;
nextTask[] = {"finishMonsterEscort"};
};
class finishMonsterEscort {
author = "He-Man";
title = "Finish Monster Escort";
simpleTask = 0;
items[] = {};
triggerDelay = 8;
triggerintervall = 8;
markerType = 0;
markerVisible = 0;
markerRadius = 0;
markerText = "";
initcall = "";
cleanUpCall = "uiNameSpace setVariable ['axeStartTraders', nil]; deletevehicle EPOCH_Monster";
dialogues[] = { // {{ARRAY1},{ARRAY2},... }
};
callevents[] = { // {{ARRAY1},{ARRAY2},... }
};
abandonTime = 240;
failedCondition = "false";
faileddialogues[] = {};
completeCondition = "true";
completedialogues[] = {"Take your reward, you have earnt it","Here is your reward, you are a great courier.","Any time you need work, come and see me, great job."};
completedCALL = "_WH = createVehicle[""groundWeaponHolder"",getPosATL player,[],0,""CAN_COLLIDE""];[_WH,""Mission_Monster_Payout""] remoteExec [""EPOCH_serverLootObject"",2];";
reward[] = {};
cleanUp = 1;
nextTask[] = {};
};

View File

@ -1,166 +1,263 @@
class uavMissionAccepted{ class uavMissionAccepted{
author = "axeman"; author = "axeman";
title = "UAV Mission Accepted"; title = "UAV Mission Accepted";
simpleTask = 0; simpleTask = 0;
taskLimit = 3; items[] = {};
taskCheckTime = 3; triggerDelay = 1;
triggerDelay = 2; triggerintervall = 8;
items[] = {"B_UavTerminal"}; markerType = 0;
itemSpawn = 3; markerVisible = 0;
markerType = 0; markerRadius = 0;
markerRadius = 0; markerText = "";
callEventBinTask = 0; initcall = "";
diag1Condition = "true"; cleanUpCall = "";
dialogue1[] = {"The UAV terminal is at your feet, Equip it !","Pick up the terminal and equip yourself with it.","Grab the UAV terminal and put it in your GPS slot."}; dialogues[] = {};
diagSquelch = 30; callevents[] = {};
diag2Condition = "!('B_UavTerminal' in assignedItems player)"; abandonTime = 240;
dialogue2[] = {"Hurry it up, pick up and equip the terminal.","Come on, Equip yourself with the terminal.","We don't have all day, get that terminal equipped."}; failedCondition = "missionNameSpace getVariable [""InSafeZone"",false]";
abandonDist = 100; faileddialogues[] = {"Mission not allowed in Safe Zone"};
abandonTime = 240; completeCondition = "true";
failed[] = {"I guess you have better things to do.","Try again later.","You didn't pick up the terminal. Misison Failed !"}; completedialogues[] = {};
cleanUp = 0; completedCALL = "";
completeCondition = "'B_UavTerminal' in assignedItems player"; reward[] = {};
completed1[] = {"That's great, you have 30 seconds to find a safe position.","Find a hidden spot to operate from, take off in 30 seconds.","Find yourself a concealed position to work from, taking off in half a minute."}; cleanUp = 0;
nextTask[] = {"doUAVSpawn"}; nextTask[] = {"uavMissionStart"};
// Not used atm
taskLimit = 3;
itemSpawn = 3;
callEventBinTask = 0;
diagSquelch = 30;
abandonDist = 100;
};
class uavMissionStart{
author = "axeman";
title = "UAV Mission Start";
simpleTask = 0;
items[] = {"B_UavTerminal"};
triggerDelay = 1;
triggerintervall = 8;
markerType = 0;
markerVisible = 0;
markerRadius = 0;
markerText = "";
initcall = "";
cleanUpCall = "";
dialogues[] = {
{
"true",
{"The UAV terminal is at your feet, Equip it !","Pick up the terminal and equip yourself with it.","Grab the UAV terminal and put it in your GPS slot."}
},
{
"!('B_UavTerminal' in assignedItems player)",
{"Hurry it up, pick up and equip the terminal.","Come on, Equip yourself with the terminal.","We don't have all day, get that terminal equipped."}
}
};
callevents[] = {
{
"missionNameSpace getVariable [""InSafeZone"",false]",
"['Mission not allowed in Safe Zone',5] call Epoch_Message",
{}
}
};
abandonTime = 240;
failedCondition = "false";
faileddialogues[] = {"I guess you have better things to do.","Try again later.","You didn't pick up the terminal. Misison Failed !"};
completeCondition = "'B_UavTerminal' in assignedItems player";
completedialogues[] = {"That's great, you have 30 seconds to find a safe position.","Find a hidden spot to operate from, take off in 30 seconds.","Find yourself a concealed position to work from, taking off in half a minute."};
completedCALL = "";
reward[] = {};
cleanUp = 0;
nextTask[] = {"doUAVSpawn"};
// Not used atm
taskLimit = 3;
itemSpawn = 3;
callEventBinTask = 0;
diagSquelch = 30;
abandonDist = 100;
}; };
class doUAVSpawn{ class doUAVSpawn{
author = "axeman"; author = "axeman";
title = "UAV Spawn"; title = "UAV Spawn";
simpleTask = 0; simpleTask = 0;
taskLimit = 3; items[] = {};
taskCheckTime = 8; triggerDelay = 30;
triggerDelay = 30; triggerintervall = 2;
itemSpawn = 0; markerType = 0;
markerType = 0; markerVisible = 0;
markerRadius = 0; markerRadius = 0;
initcall = "axeUAV = objNull"; markerText = "";
callEventBinTask = 0; initcall = "axeUAV = objNull";
callEventCondition1 = "(diag_tickTime - EPOCH_task_startTime) > 6"; cleanUpCall = "";
callEventCALL1 = "_targetPos = (getPosATL player) findEmptyPosition [25,250,""I_UAV_01_F""];axeUAV = createVehicle[""I_UAV_01_F"", _targetPos, [], 10, ""CAN_COLLIDE""];axeUAV disableTIEquipment true;_driver = (group player) createUnit[""I_UAV_AI"", position axeUAV, [], 0, ""CAN_COLLIDE""];_driver moveInAny axeUAV;"; dialogues[] = {
diag1Condition = "true"; {
dialogue1[] = {"UAV is ready, get prepared !","Here it comes, connecting you now. 10 seconds..","Nice spot, connecting you to the UAV !"}; "true",
diagSquelch = 60; {"UAV is ready, get prepared! Connecting in 10 seconds","Here it comes, connecting you in 10 seconds..","Nice spot, connecting you to the UAV in 10 seconds!"}
failedCondition = "!('B_UavTerminal' in assignedItems player)"; }
abandonDist = -1; };
abandonTime = 1200; callevents[] = {
failed[] = {"Lost it already.. Mission Over","Not a willing pilot eh ? Try again later.","Equipment Lost.. Mission Failed !"}; {
cleanUp = 0; "(diag_tickTime - EPOCH_task_startTime) > 40",
completeCondition = "!(isNull axeUAV)"; "_targetPos = (getPosATL player) findEmptyPosition [25,250,""I_UAV_01_F""];axeUAV = createVehicle[""I_UAV_01_F"", _targetPos, [], 10, ""CAN_COLLIDE""];axeUAV disableTIEquipment true;_driver = (group player) createUnit[""I_UAV_AI"", position axeUAV, [], 0, ""CAN_COLLIDE""];_driver moveInAny axeUAV;[axeUAV] remoteExec [""EPOCH_localCleanup"",2]",
nextTask[] = {"doUAVAttach"}; {}
}
};
abandonTime = 240;
failedCondition = "!('B_UavTerminal' in assignedItems player) || !(alive player)";
faileddialogues[] = {"Lost it already.. Mission Over","Not a willing pilot eh ? Try again later.","Equipment Lost.. Mission Failed !"};
completeCondition = "!(isNull axeUAV)";
completedialogues[] = {};
completedCALL = "";
reward[] = {};
cleanUp = 0;
nextTask[] = {"doUAVAttach"};
}; };
class doUAVAttach{ class doUAVAttach{
author = "axeman"; author = "axeman";
title = "UAV Spawn"; title = "UAV Spawn";
simpleTask = 0; simpleTask = 0;
taskLimit = 3; items[] = {};
taskCheckTime = 16; triggerDelay = 2;
triggerDelay = 6; triggerintervall = 8;
itemSpawn = 0; markerType = 0;
markerType = 0; markerVisible = 0;
markerRadius = 0; markerRadius = 0;
initcall = "player connectTerminalToUAV axeUAV;player action [""SwitchToUAVDriver"", axeUAV];addToRemainsCollector[axeUAV];"; markerText = "";
callEventBinTask = 0; initcall = "player action [""SwitchToUAVDriver"", axeUAV];addToRemainsCollector[axeUAV];";
diag1Condition = "true"; cleanUpCall = "[(driver axeUAV)] joinSilent grpNull; removeFromRemainsCollector [axeUAV]; deletevehicle axeUAV";
dialogue1[] = {"Woohoo, here we go.. Get it in the air.","Get it in the air, no time to waste","You are a natural kid. Let's fly."}; dialogues[] = {
diagSquelch = 60; {
failedCondition = "!('B_UavTerminal' in assignedItems player) || !(alive axeUAV)"; "true",
abandonDist = -1; {"Woohoo, here we go.. Get it in the air.","Get it in the air, no time to waste","You are a natural kid. Let's fly."}
abandonTime = 1200; }
failed[] = {"Lost it already.. Mission Over","Not a natural pilot. Try again later.","Mission Failed !"}; };
cleanUp = 0; callevents[] = {};
completeCondition = "(getPosATL axeUAV select 2) > 10"; abandonTime = 1200;
completedCALL = "if(SunOrMoon < 1)then{player action [""lightOn"", axeUAV];};"; failedCondition = "!('B_UavTerminal' in assignedItems player) || !(alive axeUAV) || !(alive player) || cameraon != axeUAV";
nextTask[] = {"takeOffUAV"}; faileddialogues[] = {"Lost it already.. Mission Over","Not a natural pilot. Try again later.","Mission Failed !"};
completeCondition = "(getPosATL axeUAV select 2) > 10";
completedialogues[] = {};
completedCALL = "if(SunOrMoon < 1)then{player action [""lightOn"", axeUAV];};";
reward[] = {};
cleanUp = 0;
nextTask[] = {"takeOffUAV"};
}; };
class takeOffUAV{ class takeOffUAV{
author = "axeman"; author = "axeman";
title = "Pilot the UAV"; title = "Pilot the UAV";
simpleTask = 0; simpleTask = 0;
taskLimit = 3; items[] = {};
taskCheckTime = 8; triggerDelay = 8;
triggerDelay = 6; triggerintervall = 8;
itemSpawn = 0; markerType = 0;
markerType = 0; markerVisible = 0;
markerRadius = 0; markerRadius = 0;
initcall = "axeUAVRndMission = floor random 2;"; markerText = "";
callEventBinTask = 1; initcall = "";
callEventCondition1 = "(diag_tickTime - EPOCH_task_startTime > 30) && axeUAVRndMission == 0"; cleanUpCall = "[(driver axeUAV)] joinSilent grpNull; removeFromRemainsCollector [axeUAV]; deletevehicle axeUAV";
callEventCondition2 = "(diag_tickTime - EPOCH_task_startTime > 30) && axeUAVRndMission == 1"; dialogues[] = {
callEventTask1 = "uavMission1"; {
callEventTask2 = "uavMission2"; "alive axeUAV",
diag1Condition = "alive axeUAV"; {"Great start.. Lets take this thing for a ride.","We're off, get some practice, I am finding you a target.","Get clear of this area, I am calculating your target."}
dialogue1[] = {"Great start.. Lets take this thing for a ride.","We're off, get some practice, I am finding you a target.","Get clear of this area, I am calculating your target."}; },
diagSquelch = 60; {
diag2Condition = "alive axeUAV"; "alive axeUAV",
dialogue2[] = {"Keep it up, you are doing a great job.","Try and find some targets on your way.","Don't get shot down now !"}; {"Keep it up, you are doing a great job.","Try and find some targets on your way.","Don't get shot down now !"}
failedCondition = "!('B_UavTerminal' in assignedItems player) || !(alive axeUAV)"; }
abandonDist = -1; };
abandonTime = 1280; callevents[] = {
failed[] = {"Oh dear, that didn't go well..","Try again later.","Misison Failed !"}; {
cleanUp = 0; "diag_tickTime - EPOCH_task_startTime > 30",
completeCondition = "false"; "",
completedCALL = "player connectTerminalToUAV objNull;"; {"uavMission1","uavMission2"}
nextTask[] = {}; }
};
abandonTime = 240;
failedCondition = "!('B_UavTerminal' in assignedItems player) || !(alive axeUAV) || !(alive player) || cameraon != axeUAV";
faileddialogues[] = {"Oh dear, that didn't go well..","Try again later.","Misison Failed !"};
completeCondition = "false";
completedialogues[] = {};
completedCALL = "";
reward[] = {};
cleanUp = 0;
nextTask[] = {};
}; };
class uavMission1{ class uavMission1{
author = "axeman"; author = "axeman";
title = "Trader House Recon"; title = "Trader House Recon";
simpleTask = 0; simpleTask = 0;
taskLimit = 3; items[] = {};
taskCheckTime = 16; triggerDelay = 0;
triggerDelay = 8; triggerintervall = 8;
items[] = {""}; markerType = 2;
itemSpawn = 0; markerVisible = 0;
markerType = 2; markerRadius = 180;
markerRadius = 180; markerText = "Trader House Recon";
markerText = "Trader House Recon"; initcall = "_obj = selectRandom (nearestObjects [axeUAV,[""HOUSE""],2500]);EPOCH_taskMarkerPos = getPosATL _obj;";
initcall = "[] spawn {uavMission1Obj = selectRandom (nearestObjects [axeUAV,[""HOUSE""],2500]);EPOCH_taskMarkerPos = getPosATL uavMission1Obj;};"; cleanUpCall = "[(driver axeUAV)] joinSilent grpNull; removeFromRemainsCollector [axeUAV]; deletevehicle axeUAV";
callEventBinTask = 0; dialogues[] = {
diag1Condition = "true"; {
dialogue1[] = {"I need some recon on a nearby house","We need intelligence on a potential trader location.","Help us gather intel on a trader house !"}; "true",
diagSquelch = 60; {"I need some recon on a nearby house","We need intelligence on a potential trader location.","Help us gather intel on a trader house !"}
diag2Condition = "EPOCH_taskMarkerPos distance axeUAV > 450"; },
dialogue2[] = {"I have marked your map, it will be nearby.","Check you map, there is a marker near a safehouse","Search your map for the landing zone, near a traders safehouse."}; {
diag3Condition = "EPOCH_taskMarkerPos distance axeUAV < 450"; "EPOCH_taskMarkerPos distance axeUAV > 450",
dialogue3[] = {"Land it nearby and switch off the engine.","You need to land by the house, quietly.","Drop the UAV in the marker, then keep quiet."}; {"I have marked your map, it will be nearby.","Check you map, there is a marker near a safehouse","Search your map for the landing zone, near a traders safehouse."}
failedCondition = "!('B_UavTerminal' in assignedItems player) || !(alive axeUAV)"; },
abandonDist = -1; {
abandonTime = 2200; "EPOCH_taskMarkerPos distance axeUAV < 450",
failed[] = {"Oh dear, Mission Over !","Mission Failed !"}; {"Land it nearby and switch off the engine.","You need to land by the house, quietly.","Drop the UAV in the marker, then keep quiet."}
cleanUp = 1; }
completeCondition = "!(isengineOn axeUAV) && EPOCH_taskMarkerPos distance axeUAV < 275"; };
reward[] = {"ItemGoldBar","ItemGoldBar"}; callevents[] = {};
completed1[] = {"Great work, here's your reward."}; abandonTime = 900;
completedCALL = "player connectTerminalToUAV objNull;[(driver axeUAV)] joinSilent grpNull;"; failedCondition = "!('B_UavTerminal' in assignedItems player) || !(alive axeUAV) || !(alive player) || cameraon != axeUAV";
faileddialogues[] = {"Oh dear, Mission Over !","Mission Failed !"};
completeCondition = "!(isengineOn axeUAV) && EPOCH_taskMarkerPos distance axeUAV < 275";
completedialogues[] = {"Great work, here's your reward."};
completedCALL = "[(driver axeUAV)] joinSilent grpNull; removeFromRemainsCollector [axeUAV]; deletevehicle axeUAV";
reward[] = {"ItemGoldBar","ItemGoldBar"};
cleanUp = 1;
nextTask[] = {};
}; };
class uavMission2{ class uavMission2{
author = "axeman"; author = "axeman";
title = "Deliver UAV To Trader"; title = "Deliver UAV To Trader";
simpleTask = 0; simpleTask = 0;
taskLimit = 3; items[] = {};
taskCheckTime = 16; triggerDelay = 0;
triggerDelay = 8; triggerintervall = 8;
itemSpawn = 0; markerType = 2;
markerType = 2; markerVisible = 0;
markerRadius = 220; markerRadius = 220;
markerText = "UAV Trader"; markerText = "UAV Trader";
initcall = "[] spawn {EPOCH_taskUAVTrader = selectRandom (player nearentities [[""C_Man_1""],10500] select {_x getVariable [""AI_SLOT"",-1] > -1 && player distance _x > 50});EPOCH_taskMarkerPos = getPosATL EPOCH_taskUAVTrader;};"; initcall = "_obj = selectRandom (player nearentities [[""C_Man_1""],10500] select {_x getVariable [""AI_SLOT"",-1] > -1 && player distance _x > 50});EPOCH_taskMarkerPos = getPosATL _obj;";
callEventBinTask = 0; cleanUpCall = "[(driver axeUAV)] joinSilent grpNull; removeFromRemainsCollector [axeUAV]; deletevehicle axeUAV";
diag1Condition = "true"; dialogues[] = {
dialogue1[] = {"I need this UAV delivering to my buddy","Recon a rogue trader, land this near his location.","Land this UAV near the target trader."}; {
diagSquelch = 60; "true",
diag2Condition = "EPOCH_taskMarkerPos distance axeUAV > 450"; {"I need this UAV delivering to my buddy","Recon a rogue trader, land this near his location.","Land this UAV near the target trader."}
dialogue2[] = {"Check your map for his location, you will need to land nearby.","I have marked your map with his location.","Fly to the location marked on your map, then land."}; },
diag3Condition = "EPOCH_taskMarkerPos distance axeUAV < 450"; {
dialogue3[] = {"Get this thing down and the engine off.","Land in the zone and switch your engine off quickly.","Find a landing spot in the area and keep quiet."}; "EPOCH_taskMarkerPos distance axeUAV > 450",
failedCondition = "!('B_UavTerminal' in assignedItems player) || !(alive axeUAV)"; {"Check your map for his location, you will need to land nearby.","I have marked your map with his location.","Fly to the location marked on your map, then land."}
abandonDist = -1; },
abandonTime = 2600; {
failed[] = {"Oh dear, Mission Over !","Mission Failed !"}; "EPOCH_taskMarkerPos distance axeUAV < 450",
cleanUp = 1; {"Get this thing down and the engine off.","Land in the zone and switch your engine off quickly.","Find a landing spot in the area and keep quiet."}
cleanUpCalls[] = {"player connectTerminalToUAV objNull"}; }
completeCondition = "!(isengineOn axeUAV) && EPOCH_taskMarkerPos distance axeUAV < 275"; };
reward[] = {"ItemGoldBar","ItemGoldBar"}; callevents[] = {};
completed1[] = {"Great work, here's your reward."}; abandonTime = 900;
completedCALL = "player connectTerminalToUAV objNull;[(driver axeUAV)] joinSilent grpNull;"; failedCondition = "!('B_UavTerminal' in assignedItems player) || !(alive axeUAV) || !(alive player) || cameraon != axeUAV";
faileddialogues[] = {"Oh dear, Mission Over !","Mission Failed !"};
completeCondition = "!(isengineOn axeUAV) && EPOCH_taskMarkerPos distance axeUAV < 275";
completedialogues[] = {"Great work, here's your reward."};
completedCALL = "[(driver axeUAV)] joinSilent grpNull; removeFromRemainsCollector [axeUAV]; deletevehicle axeUAV";
reward[] = {"ItemGoldBar","ItemGoldBar"};
cleanUp = 1;
nextTask[] = {};
}; };

View File

@ -17,4 +17,6 @@ class inGameTasks {
#include "CfgMissions\CfgmissionDelivery.hpp" #include "CfgMissions\CfgmissionDelivery.hpp"
#include "CfgMissions\CfgmissionUav.hpp" #include "CfgMissions\CfgmissionUav.hpp"
#include "CfgMissions\CfgmissionMilitary.hpp" #include "CfgMissions\CfgmissionMilitary.hpp"
#include "CfgMissions\CfgmissionMonster.hpp"
#include "CfgMissions\CfgmissionFish.hpp"
}; };

View File

@ -561,6 +561,62 @@ class CfgMainTable
LootMax = 10; LootMax = 10;
tables[] = { "Mission_Payout1" }; tables[] = { "Mission_Payout1" };
}; };
class Mission_Monster_Payout
{
lootMin = 12;
LootMax = 20;
tables[] = {
{ "Tools", 8 },
{ "BaseBuilding", 6 },
{ "Food", 11 },
{ "Equipment", 5 },
{ "SniperRifle", 5 },
{ "SniperRifleAmmo", 6 },
{ "Rifle", 6 },
{ "RifleAmmo", 8 },
{ "Machinegun", 6 },
{ "MachinegunAmmo", 8 },
{ "Pistols", 5 },
{ "PistolAmmo", 7 },
{ "Scopes", 8 },
{ "Muzzles", 5 },
{ "Hand", 10 },
{ "Explosives", 5 },
{ "Backpack", 7 },
{ "Uniforms", 7 },
{ "Vests", 7 },
{ "HeadgearArmored", 8 },
{ "GenericAuto", 3 }
};
};
class Mission_Fishing_Payout
{
lootMin = 8;
LootMax = 16;
tables[] = {
{ "Tools", 8 },
{ "BaseBuilding", 6 },
{ "Food", 11 },
{ "Equipment", 5 },
{ "SniperRifle", 5 },
{ "SniperRifleAmmo", 6 },
{ "Rifle", 6 },
{ "RifleAmmo", 8 },
{ "Machinegun", 6 },
{ "MachinegunAmmo", 8 },
{ "Pistols", 5 },
{ "PistolAmmo", 7 },
{ "Scopes", 8 },
{ "Muzzles", 5 },
{ "Hand", 10 },
{ "Explosives", 5 },
{ "Backpack", 7 },
{ "Uniforms", 7 },
{ "Vests", 7 },
{ "HeadgearArmored", 8 },
{ "GenericAuto", 3 }
};
};
class Sheep_random_EPOCH class Sheep_random_EPOCH
{ {
lootMin = 2; lootMin = 2;