Jump to content
  • 0

[Help] custom right click crafting


orodreth

Question

Hey!

 

I got my own private test server I like to practice on and Im trying to add options for additional crafting on a few items.

What Ive tried first is crafting 1/4 wood floor from plywood pack using 1 plywoodpack and 1 lumberpack as ingredients. I got the right click to work with maca's extra_rc script and I can "craft" a wood floor using this script:

if (("PartPlywoodPack" in magazines player) && ("PartPlankPack" in magazines player)) then {
	player playActionNow "Medic";
	sleep 3;
	if (("PartPlywoodPack" in magazines player) && ("PartPlankPack" in magazines player)) then {
	player removeMagazine "PartPlywoodPack";
	player removeMagazine "PartPlankPack";
	sleep 2;
	player addMagazine "ItemWoodFloorQuarter";
	} else {
	};
	titleText ["You have crafted a 1/4 wood floor!","PLAIN DOWN"]; titleFadeOut 3;
	} else {
	titleText ["You don't have the required items!","PLAIN DOWN"]; titleFadeOut 3;
	};

but what I would really like was to use the epoch crafting script but I cant get that to work...

 

It looks something like this but doesnt work:

script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
neednearby[] = {"workshop"};
requiretools[] = {"ItemToolbox","ItemCrowbar"};
output[] = {{"ItemWoodFloorQuarter",1}};
input[] = {{"PartPlywoodPack",1},{"PartPlankPack",1}};

Anyone got any pointers on how I could get that to work? :)

 

Thanks!

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Dont know if thats right or wrong but it doesnt work without it either :)

 

That code I just took from the cfgmagazines.hpp in the dayz_code

class PartWoodPlywood: CA_Magazine
	{
		scope = 2;
		count = 1;
		type = 256;
		displayName = "Plywood";
		model = "\z\addons\dayz_epoch\models\plywood.p3d";
		picture="\z\addons\dayz_epoch\pictures\equip_plywood_CA.paa";
		descriptionShort = "Plywood: Used for building many structures.";
		class ItemActions {
			class Crafting
			{
				text = $STR_EPOCH_PLAYER_260;
				script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
				neednearby[] = {};
				requiretools[] = {"ItemToolbox"};
				output[] = {{"workbench_kit",1}};
				input[] = {{"PartWoodPlywood",1},{"PartWoodLumber",2}};

			};
Link to comment
Share on other sites

  • 0

Hello. Nobody knows how to make craft gold of gold ingots? There are scripts, don't know how to connect. Yours faithfully, Boris.

you should be able to smelt them into gold bars at fire...

 

If you have not yet fixed the endless loop when smelting

 

https://github.com/vbawol/DayZ-Epoch/commit/8af00ef28429a8751e0ad619dbf5e7e278b28087

 

 

or are you looking to do something else ???

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...