diff --git a/bulwark/MKitToTicket.sqf b/bulwark/MKitToTicket.sqf new file mode 100644 index 00000000..385f67f7 --- /dev/null +++ b/bulwark/MKitToTicket.sqf @@ -0,0 +1,33 @@ +/** +* dropBox +* +* converts Medikits into tickets +* +* Domain: Client +**/ +call killPoints_fnc_updateHud; +_Medikit_per_Ticket = ("Medikit_per_Ticket" call BIS_fnc_getParamValue); + +_bulwarkContents = itemCargo bulwarkBox; + +_countMediKits = {_x == "Medikit"} count _bulwarkContents; + +if (_countMediKits >= _Medikit_per_Ticket ) then { + _bulwarkContents = _bulwarkContents - ["Medikit"]; + clearItemCargoGlobal bulwarkBox; + + _Remaining_Medikits = _countMediKits - _Medikit_per_Ticket ; + bulwarkBox addItemCargoGlobal ["Medikit", _Remaining_Medikits]; + + [west, 5] call BIS_fnc_respawnTickets; + + { + bulwarkBox addItemCargoGlobal [_x, 1]; + } forEach _bulwarkContents; + hint "Medikits traded for Tickets"; +}; + +call killPoints_fnc_updateHud; + + + diff --git a/bulwark/MaintainerTraining.sqf b/bulwark/MaintainerTraining.sqf new file mode 100644 index 00000000..d985171a --- /dev/null +++ b/bulwark/MaintainerTraining.sqf @@ -0,0 +1,27 @@ +/** +* dropBox +* +* train player as maintainer +* +* Domain: Client +**/ +_bulwarkContents = itemCargo bulwarkBox; +_countToolKit = {_x == "ToolKit"} count _bulwarkContents; + + +if ( _countToolKit >= 1 ) then { + _bulwarkContents = _bulwarkContents - ["ToolKit"]; + clearItemCargoGlobal bulwarkBox; + + _Remaining_ToolKit = _countToolKit - 1 ; + bulwarkBox addItemCargoGlobal ["ToolKit", _Remaining_ToolKit]; + + player setUnitTrait ["Engineer", True]; + + { + bulwarkBox addItemCargoGlobal [_x, 1]; + } forEach _bulwarkContents; + hint "Player trained as Maintainer"; +}; + +call killPoints_fnc_updateHud; diff --git a/bulwark/createBase.sqf b/bulwark/createBase.sqf index 8d7de9de..e2ce7690 100644 --- a/bulwark/createBase.sqf +++ b/bulwark/createBase.sqf @@ -50,6 +50,8 @@ if(BULWARK_MEDIKITS > 0) then { //Add actions to Bulwark Box [bulwarkBox, ["" + "Pickup", "bulwark\moveBox.sqf","",1,false,false,"true","true",2.5]] remoteExec ["addAction", 0, true]; [bulwarkBox, ["" + "Shop", "[] spawn bulwark_fnc_purchaseGui; ShopCaller = _this select 1","",1.5,false,false,"true","true",2.5]] remoteExec ["addAction", 0, true]; +[bulwarkBox, ["" + "X Medkits for 5 Tickets", "bulwark\MKitToTicket.sqf"]] remoteExec ["addAction", 0, true]; +[bulwarkBox, ["" + "Maintainer Training", "bulwark\MaintainerTraining.sqf"]] remoteExec ["addAction", 0, true]; [bulwarkBox, ["" + "Heal Yourself: 500p", " _player = _this select 1; _points = _player getVariable 'killPoints'; diff --git a/description.ext b/description.ext index 2a6f5bb6..67e9276b 100644 --- a/description.ext +++ b/description.ext @@ -515,5 +515,13 @@ class Params texts[] = {"Off", "On"}; default = 1; }; + + class Medikit_per_Ticket + { + title = "Medikits per 5 Tickets"; + values[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 99}; + texts[] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "99"}; + default = 5; + }; }; diff --git a/editMe.sqf b/editMe.sqf index a3083bd3..a67ce32f 100644 --- a/editMe.sqf +++ b/editMe.sqf @@ -134,12 +134,23 @@ BULWARK_BUILDITEMS = [ [1000, "Hallogen Lamp", "Land_LampHalogen_F", 90, 1], [1000, "Double H Barrier", "Land_HBarrierWall4_F", 0, 4], [1000, "Concrete Platform", "BlockConcrete_F", 0, 3.5], + [1000, "Dragons Tooth", "Land_DragonsTeeth_01_1x1_new_F", 0, 1.5], + [1000, "Metal Hedgehog", "Land_CzechHedgehog_01_new_F", 0, 1.5], + [1000, "Concrete Hedgehog", "Land_ConcreteHedgehog_01_F", 180, 1.5], [1200, "Storage box large", "Box_NATO_AmmoVeh_F", 0, 1], [2500, "Static HMG", "B_HMG_01_high_F", 0, 1], [3000, "Small Bunker", "Land_BagBunker_Small_F", 180, 3], - [4500, "Pillbox", "Land_PillboxBunker_01_hex_F", 90, 2.5], - [6000, "Guard Tower", "Land_Cargo_Patrol_V3_F", 0, 3.5], - [9500, "Modular Bunker", "Land_Bunker_01_Small_F", 180, 3.5] + [4000, "Small Dome", "Land_Dome_Small_F", 0, 10], + [4500, "Pillbox", "Land_PillboxBunker_01_hex_F", 90, 5], + [4500, "Rectangle Pillbox", "Land_PillboxBunker_01_rectangle_F",90, 5], + [5000, "Airstrip Platform", "Land_AirstripPlatform_01_F", 0, 10], + [6000, "Guard Tower", "Land_Cargo_Patrol_V3_F", 0, 5], + [6000, "Large Dome", "Land_Dome_Big_F", 180, 20], + [8000, "Big Pillbox", "Land_PillboxBunker_01_big_F", 180, 10], + [9500, "Modular Bunker", "Land_Bunker_01_Small_F", 180, 10], + [9500, "HQ Mod. Bunker", "Land_Bunker_01_HQ_F", 180, 10], + [10000,"Tall Mod. Bunker", "Land_Bunker_01_tall_F", 180, 10], + [10000,"Big Mod. Bunker", "Land_Bunker_01_big_F", 180, 10] ]; /* Time of Day*/ diff --git a/revivePlayers.sqf b/revivePlayers.sqf index 4392d102..27ed1a7a 100644 --- a/revivePlayers.sqf +++ b/revivePlayers.sqf @@ -11,6 +11,7 @@ while {true} do { [ "#rev", 1, _playerInvToCheck ] remoteExecCall ["BIS_fnc_reviveOnState", _playerInvToCheck]; _playerInvToCheck switchMove "PlayerStand"; _playerInvToCheck removeItem "Medikit"; + systemChat "Player Revived, Medikit removed"; [_playerInvToCheck] remoteExec ["bulwark_fnc_revivePlayer", 2]; }; };