Skip to content
33 changes: 33 additions & 0 deletions bulwark/MKitToTicket.sqf
Original file line number Diff line number Diff line change
@@ -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;



27 changes: 27 additions & 0 deletions bulwark/MaintainerTraining.sqf
Original file line number Diff line number Diff line change
@@ -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;
2 changes: 2 additions & 0 deletions bulwark/createBase.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ if(BULWARK_MEDIKITS > 0) then {
//Add actions to Bulwark Box
[bulwarkBox, ["<t color='#00ffff'>" + "Pickup", "bulwark\moveBox.sqf","",1,false,false,"true","true",2.5]] remoteExec ["addAction", 0, true];
[bulwarkBox, ["<t color='#00ff00'>" + "Shop", "[] spawn bulwark_fnc_purchaseGui; ShopCaller = _this select 1","",1.5,false,false,"true","true",2.5]] remoteExec ["addAction", 0, true];
[bulwarkBox, ["<t color='#2ECC71'>" + "X Medkits for 5 Tickets", "bulwark\MKitToTicket.sqf"]] remoteExec ["addAction", 0, true];
[bulwarkBox, ["<t color='#F39C12'>" + "Maintainer Training", "bulwark\MaintainerTraining.sqf"]] remoteExec ["addAction", 0, true];
[bulwarkBox, ["<t color='#ff0000'>" + "Heal Yourself: 500p", "
_player = _this select 1;
_points = _player getVariable 'killPoints';
Expand Down
8 changes: 8 additions & 0 deletions description.ext
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

};
17 changes: 14 additions & 3 deletions editMe.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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*/
Expand Down
1 change: 1 addition & 0 deletions revivePlayers.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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];
};
};
Expand Down