Jump to content

[Tutorial] Radio Tower Hacking


Haduuken
 Share

Recommended Posts

Author: MrKraken (Used The ATM Robbery, Didn't Change A lot.)

Edited By: StonerGaming

First Open Core\functions And Create A File Called fn_hackradio.sqf

/*
file: fn_hackradio.sqf
Author: MrKraken
Made from MrKrakens bare-bones shop robbing tutorial on www.altisliferpg.com forums
Description:
Executes the rob shob action!
Idea developed by PEpwnzya v1.0
*/
private["_robber","_shop","_kassa","_ui","_progress","_pgText","_cP","_rip","_pos"];
_shop = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param; //The object that has the action attached to it is _this. ,0, is the index of object, ObjNull is the default should there be nothing in the parameter or it's broken
_robber = [_this,1,ObjNull,[ObjNull]] call BIS_fnc_param; //Can you guess? Alright, it's the player, or the "caller". The object is 0, the person activating the object is 1
//_kassa = 1000; //The amount the shop has to rob, you could make this a parameter of the call (https://community.bi.../wiki/addAction). Give it a try and post below ;)
_action = [_this,2] call BIS_fnc_param;//Action name
 
if(side _robber != civilian) exitWith { hint "You can not hack this Tower!" };
if(_robber distance _shop > 2) exitWith { hint "You need to be within 2m of the Tower!" };
 
if !(_kassa) then { _kassa = 1000; };
if (_rip) exitWith { hint "Hacking already in progress!" };
if (vehicle player != _robber) exitWith { hint "Get out of your vehicle!" };
 
if !(alive _robber) exitWith {};
if(!([false,"laptop",1] call life_fnc_handleInv)) exitWith {"You dont have a Laptop"};
if (_kassa == 0) exitWith { hint "There is no cash in the register!" };
 
_rip = true;
_kassa = 50000 + round(random 90000);
_shop removeAction _action;
_shop switchMove "AmovPercMstpSsurWnonDnon";
_chance = random(100);
if(_chance >= 85) then { hint "The FBI Has Been Notified, Get Out Of There!"; [[1,format["ALARM! - Radio Tower: %1 is being hacked!", _shop]],"life_fnc_broadcast",west,false] spawn life_fnc_MP; };
 
_cops = (west countSide playableUnits);
if(_cops < 2) exitWith{[[_vault,-1],"disableSerialization;",false,false] spawn life_fnc_MP; hint "There isnt enough Police to hack the Tower!";};
disableSerialization;
5 cutRsc ["life_progress","PLAIN"];
_ui = uiNameSpace getVariable "life_progress";
_progress = _ui displayCtrl 38201;
_pgText = _ui displayCtrl 38202;
_pgText ctrlSetText format["Robbery in Progress, stay close (2m) (1%1)...","%"];
_progress progressSetPosition 0.01;
_cP = 0.01;
 
if(_rip) then
{
while{true} do
{
sleep 0.85;
_cP = _cP + 0.01;
_progress progressSetPosition _cP;
_pgText ctrlSetText format["Hacking in Progress, stay close (2m) (%1%2)...",round(_cP * 100),"%"];
_Pos = position player; // by ehno: get player pos
               _marker = createMarker ["Marker200", _Pos]; //by ehno: Place a Maker on the map
               "Marker200" setMarkerColor "ColorRed";
               "Marker200" setMarkerText "!ATTENTION! hacking !ATTENTION!";
               "Marker200" setMarkerType "mil_warning";
if(_cP >= 1) exitWith {};
if(_robber distance _shop > 2.5) exitWith { };
if!(alive _robber) exitWith {};
};
if!(alive _robber) exitWith { _rip = false; };
if(_robber distance _shop > 2.5) exitWith { deleteMarker "Marker200"; _shop switchMove ""; hint "You need to stay within 2m to hack the Tower! - Now the database is locked down."; 5 cutText ["","PLAIN"]; _rip = false; };
5 cutText ["","PLAIN"];
 
titleText[format["You have stolen $%1, now get away before the FBI arrive!",[_kassa] call life_fnc_numberText],"PLAIN"];
deleteMarker "Marker200"; // by ehno delete maker
life_cash = life_cash + _kassa;
 
_rip = false;
life_use_atm = false;
sleep (30 + random(180));
life_use_atm = true;
if!(alive _robber) exitWith {};
[getPlayerUID _robber,name _robber,"26"]remoteExec["life_fnc_wantedAdd",false,false]
};
sleep 300;
_action = _shop addAction["Hack The Tower",life_fnc_hackradio];
_shop switchMove "";

Now Open functions.hpp and below functions

		class hackradio {};	

Now Open Config_Master.hpp and create a new crime

        {"STR_Crime_26","8000","26"}

Should Look Like

Spoiler

    crimes[] = {
        {"STR_Crime_187V","650","187V"},
        {"STR_Crime_187","2000","187"},
        {"STR_Crime_901","450","901"},
        {"STR_Crime_215","200","215"},
        {"STR_Crime_213","1000","213"},
        {"STR_Crime_211","100","211"},
        {"STR_Crime_207","350","207"},
        {"STR_Crime_207A","200","207A"},
        {"STR_Crime_390","1500","390"},
        {"STR_Crime_487","150","487"},
        {"STR_Crime_488","70","488"},
        {"STR_Crime_480","100","480"},
        {"STR_Crime_481","100","481"},
        {"STR_Crime_482","500","482"},
        {"STR_Crime_483","950","483"},
        {"STR_Crime_459","650","459"},
        {"STR_Crime_666","200","666"},
        {"STR_Crime_667","4500","667"},
        {"STR_Crime_668","1500","668"},
        {"STR_Crime_1","250","1"},
        {"STR_Crime_2","200","2"},
        {"STR_Crime_3","150","3"},
        {"STR_Crime_4","250","4"},
        {"STR_Crime_5","100","5"},
        {"STR_Crime_6","80","6"},
        {"STR_Crime_7","150","7"},
        {"STR_Crime_8","5000","8"},
        {"STR_Crime_9","5000","9"},
        {"STR_Crime_10","15000","10"},
        {"STR_Crime_11","10000","11"},
        {"STR_Crime_12","2500","12"},
        {"STR_Crime_13","1500","13"},
        {"STR_Crime_14","500","14"},
        {"STR_Crime_15","2500","15"},
        {"STR_Crime_16","1500","16"},
        {"STR_Crime_17","100","17"},
        {"STR_Crime_18","1500","18"},
        {"STR_Crime_19","2500","19"},
        {"STR_Crime_20","500","20"},
        {"STR_Crime_21","500","21"},
        {"STR_Crime_22","2000","22"},
        {"STR_Crime_23","5000","23"},
        {"STR_Crime_24","10000","24"},
        {"STR_Crime_25","20000","25"},
        {"STR_Crime_26","8000","26"}  
    };
};

Now Open Config_Vitems.hpp and add

    class laptop {
        variable = "laptop";
        displayName = "STR_Item_Laptop";
        weight = 5;
        buyPrice = 5000;
        sellPrice = -1;
        illegal = true;
        edible = -1;
        icon = "";
    };

 

Now Open stringtable.xml and add

		<Key ID="STR_Crime_26">
            <Original>Cyber Terrorism</Original>
        </Key>
		<Key ID="STR_Item_Laptop">
			<Original>Laptop</Original>
		</Key>

To Change The Crime Just Edit

[getPlayerUID _robber,name _robber,"26"]remoteExec["life_fnc_wantedAdd",false,false]

Now Go Into EDEN Editor And Place A Object (Will Not Work On Tower)

this addAction["Hack The Tower",life_fnc_hackradio];

 

Edited by StonerGaming
  • Like 1
Link to comment
Share on other sites

  • 2 months later...

What the actually fuck have you done, all you've done is edited half the hints. Some are still the old shit robbery hints 

example 

if (_kassa == 0) exitWith { hint "There is no cash in the register!" }; 
if (vehicle player != _robber) exitWith { hint "Get out of your vehicle!" };

 

You a joke mate

  • Like 1
Link to comment
Share on other sites

Just now, DJTrb said:

What the actually fuck have you done, all you've done is edited half the hints. Some are still the old shit robbery hints 

example 

if (_kassa == 0) exitWith { hint "There is no cash in the register!" }; 
if (vehicle player != _robber) exitWith { hint "Get out of your vehicle!" };

 

You a joke mate

Haha roasted

  • Like 1
Link to comment
Share on other sites

12 hours ago, DJTrb said:

What the actually fuck have you done, all you've done is edited half the hints. Some are still the old shit robbery hints 

example 

if (_kassa == 0) exitWith { hint "There is no cash in the register!" }; 
if (vehicle player != _robber) exitWith { hint "Get out of your vehicle!" };

 

You a joke mate

Author: MrKraken (Used The ATM Robbery, Didn't Change A lot.)

I put that at the top and read the rules mate.

Link to comment
Share on other sites

12 hours ago, DJTrb said:

What the actually fuck have you done, all you've done is edited half the hints. Some are still the old shit robbery hints 

example 

if (_kassa == 0) exitWith { hint "There is no cash in the register!" }; 
if (vehicle player != _robber) exitWith { hint "Get out of your vehicle!" };

 

You a joke mate

lol Salty ? 

Link to comment
Share on other sites

21 hours ago, DJTrb said:

What the actually fuck have you done, all you've done is edited half the hints. Some are still the old shit robbery hints 

example 

if (_kassa == 0) exitWith { hint "There is no cash in the register!" }; 
if (vehicle player != _robber) exitWith { hint "Get out of your vehicle!" };

 

You a joke mate

You're calling someone a joke yet you haven't released anything?

Link to comment
Share on other sites

@DJTrb Also, he actually did add a useful line if you actually read the code.

if(!([false,"laptop",1] call life_fnc_handleInv)) exitWith {"You dont have a Laptop"};

He taught people how to make it so that you need an item to rob a store.

Personally, I have already added needing an item to hack the bank. But... for a newer person this would've actually been useful.

 

Think before you post. ;)

Link to comment
Share on other sites

On 18/07/2017 at 4:00 PM, 14e_Senator_Walter said:

@DJTrb Also, he actually did add a useful line if you actually read the code.

if(!([false,"laptop",1] call life_fnc_handleInv)) exitWith {"You dont have a Laptop"};

He taught people how to make it so that you need an item to rob a store.

Personally, I have already added needing an item to hack the bank. But... for a newer person this would've actually been useful.

 

Think before you post. ;)

1

    if(!([false,"breachingcharge",1] call life_fnc_handleInv)) exitWith {};

Hmm Anyways who cares get over it.

Link to comment
Share on other sites

  • 3 weeks later...
if(side _robber != civilian) exitWith { hint "You can not hack this Tower!" };

Change the line on line 23 as follows!

if(!([false,"laptop",1] call life_fnc_handleInv)) exitWith { hint "You dont have a Laptop" };
Edited by lina
Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.