Natu

Collection of scripts ( Metal Farm / Hide Body )

73 posts in this topic

Two Month ago i startet with a Arma 3 Exile Server and had no idea what i´m doing. So i was reading tons of Post and Threads to Understand how it works because i wanted to do my own Stuff. Here are my first resulst :) I hope there are usefull.

1. Metal Farm :

Install :

Spoiler

1. Open youre Config.CCP in the Mission.sqm

2. Copy this under class Bikes 

class Objects
    {
        targetType = 2;
        target = "Land_Hlaska_ruins"; /// <-- Classnames of the Objects that give you the Options FarmMetal

        class Actions
        {
            class FarmMetal: ExileAbstractAction
            {
                title = "Farm Metal";
                condition = "true";
                action = "_this call NETmonkeys_fnc_FarmMetall";
            };
        };
    };

3. But the Farm.sqf in youre Mission.spm

 

4. Open youre init.sqf and add this

NETmonkeys_fnc_FarmMetall = compileFinal preprocessFileLineNumbers "YourBath\Farm.sqf";

 

 

For People who want that the Objekt get deletet after the Player Farm ones, add this to your Farm.sqf

Spoiler

deleteVehicle (_this select 0);

on Line = 14 & 29

So if have to look like this

private ["_theAction"];
    
    _randChance = random 1;
    _equippedMagazines = magazines player;
    
    
    if ("Exile_Item_Hammer" in _equippedMagazines) then
    {
        if (_randChance <= 0.7) then
        {
        player playMove "AinvPknlMstpSnonWnonDr_medic3";
        sleep 14;
        titleText ["You found nothing!", "PLAIN",1];
        deleteVehicle (_this select 0);
        
        };
    
        if (_randChance > 0.7) then
        {
        player playMove "AinvPknlMstpSnonWnonDr_medic3";
        sleep 14;
        _targetA = player;
        _distA = random 2;
        _dirA = direction player - 180;
        _posA = getpos _targetA;
        _positionsA = [(_posA select 0) + (sin _dirA) * _distA, (_posA select 1) + (cos _dirA) * _distA, 0];
        _weaponHolderA = createVehicle ["GroundWeaponHolder", getPosATL player, [], 0, "CAN_COLLIDE"]; _weaponHolderA addItemCargoGlobal  ["Exile_Item_MetalBoard", 1];
        uiSleep 10;
        deleteVehicle (_this select 0);
        };
    }
    else 
    {
        titleText ["You need a Hammer to do that!", "PLAIN",1];
    };

 

2.Hide Body

Install:

Spoiler

1. Open youre Config.CCP in the Mission.sqm

2. Copy this in the class Player  

class Hide : ExileAbstractAction {
                title = "Hide Body";
                condition = "(!(alive (ExileClientInteractionObject)))";
                action = "_this call NETmonkey_fnc_Hidebody";
            };

3. But the HideBody.sqf in youre Mission.spm

4. Open youre init.sqf and add this

NETmonkey_fnc_Hidebody = compileFinal preprocessFileLineNumbers "YourBath\HideBody.sqf";

Download =  https://www.dropbox.com/s/gi0kijww6ods9ab/Release.rar?dl=0 ty @John for fixing the randchance

 

 

greetings

Xatu

 

 

Edited by Natu
5 people like this

Share this post


Link to post
Share on other sites

Nice Natu, I was looking at doing this.

Inside your farm.sqf however, I think you need to fix the values - see below

private ["_theAction"];
	
	_randChance = random 1;
	_equippedMagazines = magazines player;
	
	// As it is, script will fail if the random chance is say 0.6, nothing at all will happen no title text, no indication, I commented your values and added correct ones	

	if ("Exile_Item_Hammer" in _equippedMagazines) then
	{
		//if (_randChance <= 0.5) then
        if (_randChance <= 0.7) then                        
		{
		player playMove "AinvPknlMstpSnonWnonDr_medic3";
		playSound "sound1";
		sleep 14;
		titleText ["You found nothing!", "PLAIN",1];
		
		};
	
		//if ((_randChance > 0.7) && (_randChance <= 0.9)) then 
        if (_randChance > 0.7) then                                                 
		{
		player playMove "AinvPknlMstpSnonWnonDr_medic3";
		playSound "sound1";
		sleep 14;
		_targetA = player;
		_distA = random 2;
		_dirA = direction player - 180;
		_posA = getpos _targetA;
	    _positionsA = [(_posA select 0) + (sin _dirA) * _distA, (_posA select 1) + (cos _dirA) * _distA, 0];
		_weaponHolderA = createVehicle ["GroundWeaponHolder", getPosATL player, [], 0, "CAN_COLLIDE"]; _weaponHolderA addItemCargoGlobal  ["Exile_Item_MetalBoard", 1];
		player removeAction _search;
		uiSleep 10;
		theAction = false;

		};
	}
	else 
	{
		titleText ["You need a Hammer to do that!", "PLAIN",1];
	};

 

Edited by John
1 person likes this

Share this post


Link to post
Share on other sites
Advertisement
25 minutes ago, Natu said:

Thanks John :) I will Update this asap

the Hide  script ist not working i use your Pfad  and create all folder i create my self path  and not working.  i think in the script is a failer or so.

Share this post


Link to post
Share on other sites
2 hours ago, Its me ZovkT said:

the Hide  script ist not working i use your Pfad  and create all folder i create my self path  and not working.  i think in the script is a failer or so.

Can you send me youre Mission.sqm ? So i can take a look in it ?

Share this post


Link to post
Share on other sites

 

3 minutes ago, John said:

@Natu Have  u tested this and confirmed its working, out of curiosity.

I will test it later :) I´m atm at work so :]

Share this post


Link to post
Share on other sites
1 hour ago, Natu said:

Can you send me youre Mission.sqm ? So i can take a look in it ?

4 Januar ya i an on THe way in my holidays ^^

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.