Jump to content

[RELEASE] Processing script (RP)


Recommended Posts

Hello,

 

Since we stopped working on our "Epoch Life", I decided to throw one of our scripts live: "Processing script". This script allows people to process (i.e gold ore into goldbar). 

 

Installation:

 

Same as our good old friend "Bank Robbery". I used the same piece of code and changed it a bit. You need to edit the classname, since I wasn't able to find a nice themed item with this!  Add this piece of code in "fn_selfactions.sqf".

// Processing
_processing = cursorTarget isKindOf "CHANGE ITEM HERE";
if ((speed player <= 1) && _processing && (player distance cursorTarget < 5)) then {
if (s_player_processing < 0) then {
s_player_processing = player addAction ["Process Item","scripts\process.sqf",cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_processing;
s_player_processing = -1;
};
// Processing

Add this above:

~ line 73

} else {
//Engineering
dayz_myCursorTarget = objNull;
......
.....

 

Download: http://pastebin.com/xeZuXHpJ

Link to comment
Share on other sites

have a few questions for you.. I cant get any scroll option

I want to allow players to create a notebook as output for the cctv script I use

then I will add the camera as a buildable  and players can set up a CCTV at where they want.. at least thats the plan...

 

///////////////////////////// 
// Processing
_processing = cursorTarget isKindOf "ItemTopaz";
if ((speed player <= 1) && _processing && (player distance cursorTarget < 5)) then {
if (s_player_processing < 0) then {
s_player_processing = player addAction ["Process Item","custom\process.sqf",cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_processing;
s_player_processing = -1;
};
///////////////////////////// 
// Processing


/////////////////////////////
// CCTV Custom self actions
_isLaptop = _cursorTarget isKindOf "Notebook";
if (_isLaptop && _canDo) then {
if (s_player_laptop < 0) then {
        s_player_laptop = player addAction ["Activate Laptop", "cctv\init.sqf",_cursorTarget, 1, true, true, "", ""];
    }
} else {
player removeAction s_player_laptop;
s_player_laptop = -1;
};
/////////////////////////////
} else {
//Engineering
private ["_ELItem","_ELEx","_ELLicense"];
// Exchange Script
// Configuration:
_ELItem = "ItemTopaz";
_ELEx = "Notebook";
_ELLicense = "ItemFlashlight";
//

so I have dropped the topaz and tried scrolling on it, I also tried scroll with it in my inventory and I get no new process option

I would like the topaz to be processed into a notebook

I have a flashlight as tool needed in inventory and topaz needed as part needed to process.

Link to comment
Share on other sites

yah I show it it last post  at the top..

 

added like this....

maybe the ItemTopaz just wont work as a scoll item

 

///////////////////////////// 
// Processing
_processing = cursorTarget isKindOf "ItemTopaz";
if ((speed player <= 1) && _processing && (player distance cursorTarget < 5)) then {
if (s_player_processing < 0) then {
s_player_processing = player addAction ["Process Item","custom\process.sqf",cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_processing;
s_player_processing = -1;
};
///////////////////////////// 
// Processing


/////////////////////////////
// CCTV Custom self actions
_isLaptop = _cursorTarget isKindOf "Notebook";
if (_isLaptop && _canDo) then {
if (s_player_laptop < 0) then {
        s_player_laptop = player addAction ["Activate Laptop", "cctv\init.sqf",_cursorTarget, 1, true, true, "", ""];
    }
} else {
player removeAction s_player_laptop;
s_player_laptop = -1;
};
/////////////////////////////
} else {
//Engineering
{dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
s_player_repair_crtl = -1;
Link to comment
Share on other sites

  • 2 months later...

Not 100% sure but if you add a trigger It may work

Something like this maybe?

 

 

private ["_inRange","_trigger","_pos","_usable","_inRange"]

 
_trigger = ["Building name"];
_pos = getPosATL player;
_usable = (nearestObjects [_pos, _trigger, 5]); // 5 is distance from.
_inRange = count _usable > 0;
 
if (_inRange) then {

 

That should allow you to run the specific script only when in range and/or in the specific building.

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...