Jump to content

Your craft


tamirlan_sky
 Share

Recommended Posts

Good people I welcome you! I want to make a primitive script for crafting... but to implement my ideas, I need to learn how to undermine progress in a non-conventional way. Example:

this enableSimulation false;  this allowDamage false;  this addAction[localize"STR_Process_rad",life_fnc_processAction,"rad",0,false,false,"",' life_inv_onrad > 0 && !life_is_processing && !life_action_inUse'];  this addAction[format ["%1 ($%2)",localize (getText(missionConfigFile >> "Licenses" >> "rad" >> "displayName")), [(getNumber(missionConfigFile >> "Licenses" >> "rad" >> "price"))] call life_fnc_numberText],life_fnc_buyLicense,"rad",0,false,false,"",' !license_civ_rad && playerSide isEqualTo civilian '];

What would that above, it was possible to undermine from ...sqf

In the General idea. I want to make a lot of scripts for processing this or that, and all this stuff in one plate. That would be in the table all referred to the scripts

example

this addAction ["Крафт", {[] spawn life_fnc_craftAction;}]; this addAction ......

There are those who know how to implement it? and excuse me for my english)

Link to comment
Share on other sites

The English on this one is a little too broken to get the idea across. Are you trying to use the processing with multiple parts to make a crafting system and then make a function you can call that checks for what items you have and does the correct processing? Are you trying to make your own version of the processing system for crafting?

Link to comment
Share on other sites

I have a version like a working script crafting... But this under old version of. What I can I change that would it work on 5.0?

#include "..\..\script_macros.hpp"
private["_craft","_return"];
_craft = [_this,0,"",[""]] call BIS_fnc_param;
if(_craft == "") exitWith {closeDialog 0}; //Bad shop type passed.

switch(_craft) do
{
	case "weapon":
	{
		_return = [
				//[Object classname, [item #1,quantity item #1,item #2,quantity item #2]],]
				["hgun_P07_F", ["life_inv_goldbar",2,"life_inv_copperr",1]]

			];
		if(__GETC__(life_adminlevel) > 0) then
		{
			_return pushBack
			["SMG_01_F", ["life_inv_goldbar",6,"life_inv_copperr",3,"life_inv_ironr",3,"life_inv_diamondr",1]];
		};
	};

	case "uniform":
	{
		_return = [
				//[Object classname, [item #1,quantity item #1,item #2,quantity item #2]],]
				["U_IG_Guerilla1_1", ["life_inv_goldbar",1]]
			];
	};

	case "backpack":
	{
		_return = [
				//[Object classname, [item #1,quantity item #1,item #2,quantity item #2]],]
				["B_Carryall_oli", ["life_inv_goldbar",1]]
			];
	};

	case "item":
	{
		_return = [
				//[Object classname, [item #1,quantity item #1,item #2,quantity item #2]],]
				["life_inv_pickaxe", ["life_inv_goldbar",1]],
				["life_inv_goldbar", ["life_inv_goldbar",1,"life_inv_copperr",1]]
		];
	};
};

_return; 

 

Link to comment
Share on other sites

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.