Jump to content

[Release] Mortar Strike v1.1


Spodermayt

Recommended Posts

Mortar Strike

Status: Release

 

What it does:

*insert video here when u lazy fk make it*

 

You need maca's right click system, which can be found HERE.

 

Insert this into ExtraRC.hpp

class ExtraRc {
    class ItemRadio {
        class Mortar1 {
            text = "HE Mortar";
            script = "execVM 'custom\mortar_strikes\small_mortar.sqf'";
        };
        class Mortar2 {
            text = "AT Mortar";
            script = "execVM 'custom\mortar_strikes\at_mortar.sqf'";
        };
        class Mortar3 {
            text = "SABOT Mortar";
            script = "execVM 'custom\mortar_strikes\sabot_mortar.sqf'";
        };
        class Mortar4 {
            text = "Cluster Mortar";
            script = "execVM 'custom\mortar_strikes\cluster_mortar.sqf'";
        };
    };
}; 

Download the zip and extract "mortar_strikes" to your custom folder

There are 3 types of strikes:

1 HE Mortar - 5 10oz Gold

2 AT Mortar - 2 Briefcases

3 SABOT Mortar - 4 Briefcases

4 Cluster Mortar - 8 Briefcases

 

No idea on Infistar, i do have it. But i don't use it. nor do i know anything about its filters and all...

 

I don't use BattlEye but if you do, add this to createvehicle.txt

5 !"Sh_125_SABOT"
5 !"M_Hellfire_AT"
5 !"M_Maverick_AT"
5 !"G_40mm_HE"

(You may have some of these already blacklisted, if so, delete them.) 

Enjoy m8's

mortar_strikes.zip

Link to comment
Share on other sites

There are far more powerful bombs you could use. I use the sabot version of this shell in the bullet changing script in my admin menu. If you want a copy of it just PM me and promise not to hack with it :)

Oh yeah, i chose to use the non-good bombs just because everyone can call it. This is the reason, if you for example have a really good AI Mission then someone can just call an airstrike to that location :P Thought it would be kinda cool. Just updated the script to include a bit more expensive Hellfire mortar.

Link to comment
Share on other sites

I think you need to proofread this code.  I'm not a coding whiz by any stretch but you had it looking in magazines for GPS and MAP and they are in 'weapons'.  I changed that and got a little further but now even with 2 BC in my inventory and/or a 10oz gold bar it still bitches that they aren't there and I haven't figured out how to fix that.

Link to comment
Share on other sites

I think you need to proofread this code.  I'm not a coding whiz by any stretch but you had it looking in magazines for GPS and MAP and they are in 'weapons'.  I changed that and got a little further but now even with 2 BC in my inventory and/or a 10oz gold bar it still bitches that they aren't there and I haven't figured out how to fix that.

Yea his code is all sorts of jacked up, I simplified it and changed a few things, here is my mortar script and another one I made called mortar barrage:

Mortar Strike:

private ["_done"];

_done = false;

strike = {

    _pos = [_this select 0, _this select 1, 100];

    player removeMagazine 'ItemGoldBar10oz';

    TitleText [format["Deploying a mortar strike now"], "PLAIN DOWN"]; titleFadeOut 3;

    sleep 1;

    createVehicle ["SH_125_HE", _pos,[], 0, "NONE"];

    openMap [false, false];

    TitleText [format[""], "PLAIN DOWN"];

    _done = true;

};

closedialog 0;

sleep 0.5;

        if (!("ItemGoldBar10oz" in magazines player)) then {

        TitleText [format["You need 1 10oz gold bar for payment you cheap motherfucker!"], "PLAIN DOWN"]; titleFadeOut 3;

        openMap [false, false];

        } else {

        TitleText [format["Click on the map to call a mortar strike"], "PLAIN DOWN"]; titleFadeOut 3;

        if(!(visibleMap)) then {

            openMap [true, false];

        };

        onMapSingleClick '[_pos select 0, _pos select 1, _pos select 2] call strike';

        };

waitUntil{_done};

onMapSingleClick "";

 

Mortar Barrage:

private ["_done"];

_done = false;

strike = {

    _pos = [_this select 0, _this select 1, 100];

    _pos1 = [((_this select 0)+15), ((_this select 1)-15), 100];

    _pos2 = [((_this select 0)+30), ((_this select 1)+30), 100];

    _pos3 = [((_this select 0)-15), ((_this select 1)+15), 100];

    _pos4 = [((_this select 0)-30), ((_this select 1)-30), 100];

    _pos5 = [((_this select 0)-15), ((_this select 1)-15), 100];

    _pos6 = [((_this select 0)+30), ((_this select 1)-30), 100];

    _pos7 = [((_this select 0)+15), ((_this select 1)+15), 100];

    _pos8 = [((_this select 0)-30), ((_this select 1)+30), 100];

    player removeMagazine 'ItemBriefcase100oz';

    TitleText [format["Deploying mortar barrage now"], "PLAIN DOWN"]; titleFadeOut 3;

    sleep 1;

    createVehicle ["SH_125_HE", _pos,[], 0, "NONE"];

    sleep 2;

    createVehicle ["SH_125_HE", _pos,[], 0, "NONE"];

    sleep 2;

    createVehicle ["SH_125_HE", _pos1,[], 0, "NONE"];

    sleep 2;

    createVehicle ["SH_125_HE", _pos2,[], 0, "NONE"];

    sleep 2;

    createVehicle ["SH_125_HE", _pos3,[], 0, "NONE"];

    sleep 2;

    createVehicle ["SH_125_HE", _pos4,[], 0, "NONE"];

    sleep 2;

    createVehicle ["SH_125_HE", _pos5,[], 0, "NONE"];

    sleep 2;

    createVehicle ["SH_125_HE", _pos6,[], 0, "NONE"];

    sleep 2;

    createVehicle ["SH_125_HE", _pos7,[], 0, "NONE"];

    sleep 2;

    createVehicle ["SH_125_HE", _pos8,[], 0, "NONE"];

    openMap [false, false];

    TitleText [format[""], "PLAIN DOWN"];

    _done = true;

};

closedialog 0;

sleep 0.5;

        if (!("ItemBriefcase100oz" in magazines player)) then {

        TitleText [format["You need 1 full briefcase for payment you cheap motherfucker!"], "PLAIN DOWN"]; titleFadeOut 3;

        openMap [false, false];

        } else {

        TitleText [format["Click on the map to call for a mortar barrage"], "PLAIN DOWN"]; titleFadeOut 3;

        if(!(visibleMap)) then {

            openMap [true, false];

        };

        onMapSingleClick '[_pos select 0, _pos select 1, _pos select 2] call strike';

        };

waitUntil{_done};

onMapSingleClick "";

 

 

Both work perfectly on my sever.

 

Link to comment
Share on other sites


Yea his code is all sorts of jacked up, I simplified it and changed a few things, here is my mortar script and another one I made called mortar barrage:

Yea his code is all sorts of jacked up, I simplified it and changed a few things, here is my mortar script and another one I made called mortar barrage:
Mortar Strike:
private ["_done"];

_done = false;

strike = {
    _pos = [_this select 0, _this select 1, 100];

    player removeMagazine 'ItemGoldBar10oz';
    TitleText [format["Deploying a mortar strike now"], "PLAIN DOWN"]; titleFadeOut 3;
    sleep 1;

    createVehicle ["SH_125_HE", _pos,[], 0, "NONE"];

    openMap [false, false];
    TitleText [format[""], "PLAIN DOWN"];
    _done = true;
};

closedialog 0;
sleep 0.5;

        if (!("ItemGoldBar10oz" in magazines player)) then {
        TitleText [format["You need 1 10oz gold bar for payment you cheap motherfucker!"], "PLAIN DOWN"]; titleFadeOut 3;
        openMap [false, false];
        } else {
        TitleText [format["Click on the map to call a mortar strike"], "PLAIN DOWN"]; titleFadeOut 3;
        if(!(visibleMap)) then {
            openMap [true, false];
        };
        onMapSingleClick '[_pos select 0, _pos select 1, _pos select 2] call strike';
        };

waitUntil{_done};
onMapSingleClick "";
 
Mortar Barrage:
private ["_done"];

_done = false;

strike = {
    _pos = [_this select 0, _this select 1, 100];
    _pos1 = [((_this select 0)+15), ((_this select 1)-15), 100];
    _pos2 = [((_this select 0)+30), ((_this select 1)+30), 100];
    _pos3 = [((_this select 0)-15), ((_this select 1)+15), 100];
    _pos4 = [((_this select 0)-30), ((_this select 1)-30), 100];
    _pos5 = [((_this select 0)-15), ((_this select 1)-15), 100];
    _pos6 = [((_this select 0)+30), ((_this select 1)-30), 100];
    _pos7 = [((_this select 0)+15), ((_this select 1)+15), 100];
    _pos8 = [((_this select 0)-30), ((_this select 1)+30), 100];

    player removeMagazine 'ItemBriefcase100oz';
    TitleText [format["Deploying mortar barrage now"], "PLAIN DOWN"]; titleFadeOut 3;
    sleep 1;

    createVehicle ["SH_125_HE", _pos,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos1,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos2,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos3,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos4,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos5,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos6,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos7,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos8,[], 0, "NONE"];

    openMap [false, false];
    TitleText [format[""], "PLAIN DOWN"];
    _done = true;
};

closedialog 0;
sleep 0.5;

        if (!("ItemBriefcase100oz" in magazines player)) then {
        TitleText [format["You need 1 full briefcase for payment you cheap motherfucker!"], "PLAIN DOWN"]; titleFadeOut 3;
        openMap [false, false];
        } else {
        TitleText [format["Click on the map to call for a mortar barrage"], "PLAIN DOWN"]; titleFadeOut 3;
        if(!(visibleMap)) then {
            openMap [true, false];
        };
        onMapSingleClick '[_pos select 0, _pos select 1, _pos select 2] call strike';
        };

waitUntil{_done};
onMapSingleClick "";
 
 
Both work perfectly on my sever. 

 

can blow up everythink unlimit6ed times without money so your code are broken

Link to comment
Share on other sites

Yea his code is all sorts of jacked up, I simplified it and changed a few things, here is my mortar script and another one I made called mortar barrage:
Mortar Strike:
private ["_done"];

_done = false;

strike = {
    _pos = [_this select 0, _this select 1, 100];

    player removeMagazine 'ItemGoldBar10oz';
    TitleText [format["Deploying a mortar strike now"], "PLAIN DOWN"]; titleFadeOut 3;
    sleep 1;

    createVehicle ["SH_125_HE", _pos,[], 0, "NONE"];

    openMap [false, false];
    TitleText [format[""], "PLAIN DOWN"];
    _done = true;
};

closedialog 0;
sleep 0.5;

        if (!("ItemGoldBar10oz" in magazines player)) then {
        TitleText [format["You need 1 10oz gold bar for payment you cheap motherfucker!"], "PLAIN DOWN"]; titleFadeOut 3;
        openMap [false, false];
        } else {
        TitleText [format["Click on the map to call a mortar strike"], "PLAIN DOWN"]; titleFadeOut 3;
        if(!(visibleMap)) then {
            openMap [true, false];
        };
        onMapSingleClick '[_pos select 0, _pos select 1, _pos select 2] call strike';
        };

waitUntil{_done};
onMapSingleClick "";
 
Mortar Barrage:
private ["_done"];

_done = false;

strike = {
    _pos = [_this select 0, _this select 1, 100];
    _pos1 = [((_this select 0)+15), ((_this select 1)-15), 100];
    _pos2 = [((_this select 0)+30), ((_this select 1)+30), 100];
    _pos3 = [((_this select 0)-15), ((_this select 1)+15), 100];
    _pos4 = [((_this select 0)-30), ((_this select 1)-30), 100];
    _pos5 = [((_this select 0)-15), ((_this select 1)-15), 100];
    _pos6 = [((_this select 0)+30), ((_this select 1)-30), 100];
    _pos7 = [((_this select 0)+15), ((_this select 1)+15), 100];
    _pos8 = [((_this select 0)-30), ((_this select 1)+30), 100];

    player removeMagazine 'ItemBriefcase100oz';
    TitleText [format["Deploying mortar barrage now"], "PLAIN DOWN"]; titleFadeOut 3;
    sleep 1;

    createVehicle ["SH_125_HE", _pos,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos1,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos2,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos3,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos4,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos5,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos6,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos7,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos8,[], 0, "NONE"];

    openMap [false, false];
    TitleText [format[""], "PLAIN DOWN"];
    _done = true;
};

closedialog 0;
sleep 0.5;

        if (!("ItemBriefcase100oz" in magazines player)) then {
        TitleText [format["You need 1 full briefcase for payment you cheap motherfucker!"], "PLAIN DOWN"]; titleFadeOut 3;
        openMap [false, false];
        } else {
        TitleText [format["Click on the map to call for a mortar barrage"], "PLAIN DOWN"]; titleFadeOut 3;
        if(!(visibleMap)) then {
            openMap [true, false];
        };
        onMapSingleClick '[_pos select 0, _pos select 1, _pos select 2] call strike';
        };

waitUntil{_done};
onMapSingleClick "";
 
 
Both work perfectly on my sever. 

 

can blow up everythink unlimit6ed times without money so your code are broken

Omfg. Haha i actually knew about these problems. I freakin uploaded the wrong version xD. Sorry so much, uploading the fixed version in a few sec's
Link to comment
Share on other sites

I think you need to proofread this code.  I'm not a coding whiz by any stretch but you had it looking in magazines for GPS and MAP and they are in 'weapons'.  I changed that and got a little further but now even with 2 BC in my inventory and/or a 10oz gold bar it still bitches that they aren't there and I haven't figured out how to fix that.

m8, fixed it. easy peasy lemon squeezy

Link to comment
Share on other sites

After i pay first time, money from inventory disappear but i can open map unlimited times and click on it and blow up everything! So still not working (

Add this:

if (!isServer) exitWith {
TitleText [format["Bombing Completed"], "PLAIN DOWN"]; titleFadeOut 2;
};

To the end of all the files in mortar_strikes folder. Should work if it exits the code completely. I think the problem with your case is that the script keeps looping. Try it.

Link to comment
Share on other sites

Yea his code is all sorts of jacked up, I simplified it and changed a few things, here is my mortar script and another one I made called mortar barrage:
Mortar Strike:
private ["_done"];

_done = false;

strike = {
    _pos = [_this select 0, _this select 1, 100];

    player removeMagazine 'ItemGoldBar10oz';
    TitleText [format["Deploying a mortar strike now"], "PLAIN DOWN"]; titleFadeOut 3;
    sleep 1;

    createVehicle ["SH_125_HE", _pos,[], 0, "NONE"];

    openMap [false, false];
    TitleText [format[""], "PLAIN DOWN"];
    _done = true;
};

closedialog 0;
sleep 0.5;

        if (!("ItemGoldBar10oz" in magazines player)) then {
        TitleText [format["You need 1 10oz gold bar for payment you cheap motherfucker!"], "PLAIN DOWN"]; titleFadeOut 3;
        openMap [false, false];
        } else {
        TitleText [format["Click on the map to call a mortar strike"], "PLAIN DOWN"]; titleFadeOut 3;
        if(!(visibleMap)) then {
            openMap [true, false];
        };
        onMapSingleClick '[_pos select 0, _pos select 1, _pos select 2] call strike';
        };

waitUntil{_done};
onMapSingleClick "";
 
Mortar Barrage:
private ["_done"];

_done = false;

strike = {
    _pos = [_this select 0, _this select 1, 100];
    _pos1 = [((_this select 0)+15), ((_this select 1)-15), 100];
    _pos2 = [((_this select 0)+30), ((_this select 1)+30), 100];
    _pos3 = [((_this select 0)-15), ((_this select 1)+15), 100];
    _pos4 = [((_this select 0)-30), ((_this select 1)-30), 100];
    _pos5 = [((_this select 0)-15), ((_this select 1)-15), 100];
    _pos6 = [((_this select 0)+30), ((_this select 1)-30), 100];
    _pos7 = [((_this select 0)+15), ((_this select 1)+15), 100];
    _pos8 = [((_this select 0)-30), ((_this select 1)+30), 100];

    player removeMagazine 'ItemBriefcase100oz';
    TitleText [format["Deploying mortar barrage now"], "PLAIN DOWN"]; titleFadeOut 3;
    sleep 1;

    createVehicle ["SH_125_HE", _pos,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos1,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos2,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos3,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos4,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos5,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos6,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos7,[], 0, "NONE"];
    sleep 2;
    createVehicle ["SH_125_HE", _pos8,[], 0, "NONE"];

    openMap [false, false];
    TitleText [format[""], "PLAIN DOWN"];
    _done = true;
};

closedialog 0;
sleep 0.5;

        if (!("ItemBriefcase100oz" in magazines player)) then {
        TitleText [format["You need 1 full briefcase for payment you cheap motherfucker!"], "PLAIN DOWN"]; titleFadeOut 3;
        openMap [false, false];
        } else {
        TitleText [format["Click on the map to call for a mortar barrage"], "PLAIN DOWN"]; titleFadeOut 3;
        if(!(visibleMap)) then {
            openMap [true, false];
        };
        onMapSingleClick '[_pos select 0, _pos select 1, _pos select 2] call strike';
        };

waitUntil{_done};
onMapSingleClick "";
 
 
Both work perfectly on my sever. 

 

can blow up everythink unlimit6ed times without money so your code are broken

Don't know what to tell you man, on my server that code works perfectly, something on your server is jacked up.

Oh and Spodermayt I see you like my Mortar Barrage script so much you decided to include it in the update :p.

Link to comment
Share on other sites

I fix it for admn mode!

	BOOM_BOOM =
	{
private ["_done"];
_done = false;

strike = {
	_pos = [_this select 0, _this select 1, 100];	
	createVehicle ["Bo_GBU12_LGB", _pos,[], 0, "NONE"];
	openMap [false, false];
	TitleText [format[""], "PLAIN DOWN"];
	_done = true;
	waitUntil{_done};
        onMapSingleClick "";	
    };
   closedialog 0;
   sleep 0.5;
		 if(!(visibleMap)) then {
		 openMap [true, false];
		};
		onMapSingleClick '[_pos select 0, _pos select 1, _pos select 2] call strike';
	if (!isServer) exitWith {
    TitleText [format["Bombing Completed"], "PLAIN DOWN"]; titleFadeOut 2;
    };	
  };

I integrate it into my ifistart admin tools

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...