1. This forum is ARCHIVED! Visit the new Cloud Sixteen forums, codename Eden, at https://eden.cloudsixteen.com. These forums will remain archived for a few months before being closed down, so try to encourage plugin developers to begin moving their content across to the new forums.
Dismiss Notice
Hi Guest, you need a Steam account to register and post on these forums. Login with Steam at the top of the forums to get started!
Dismiss Notice
Hi Guest, do you want to buy HL2RP or another Clockwork schema? Visit the Cloud Sixteen Store to get started!

[Clockwork] Free Crafting

Discussion in 'Plugins' started by duck, Jun 28, 2014.

  1. duck

    duck Phant0m Legend

    http://i.imgur.com/3N3IqnC.png

    Adding your own recipes is easy. Create a plugin, and inside of the main plugin folder where sh_plugin is, create a folder called recipes. Inside that folder, you can put all your recipes in.

    Code:
    local RECIPE = Clockwork.recipe:New("Example");
    		RECIPE:Require("ingredient1");
    		RECIPE:Require("ingredient2", 3);
    		RECIPE:Require("ingredient3");
    		RECIPE:Require("ingredient4", 2);
    		RECIPE:Output("final_item");
    		RECIPE.description = "An example recipe!";
    		RECIPE.model = "models/error.mdl";
    RECIPE:Register();
    The Require function takes 3 arguments. The uniqueID of the item you wish for them to have, how many of the item they should have, and how many of the item you want to take from them if the crafting is successful.

    The Output function takes only 2 arguments. The uniqueID of the item you want to give them, and how many of the item they should get. You can use the Output function multiple times to output multiple items.

    You can also simply create a folder called recipes in your schema folder and nicely tuck away all your recipes if you don't want to make a plugin. Go into the recipes folder and create a lua file as so.

    sh_nameofrecipe.lua

    Put your recipe's code inside of that file, restart the server, and it will appear in the crafting menu. Here is the recipe I used in the screenshot.

    Code:
    local RECIPE = Clockwork.recipe:New("Suitcase Melon");
    	RECIPE:Require("melon", 3, 0);
    	RECIPE:Require("cw_suitcase", 3, 1);
    	RECIPE:Output("beer", 2);
    	RECIPE:Output("takeout", 1);
    	RECIPE.model = "models/props_junk/watermelon01.mdl";
    	RECIPE.description = "A mystical melon that doubles as a suitcase.";
    RECIPE:Register();
    This is a plugin for CLOCKWORK, so place the plugin in your clockwork plugin folder.

    Enjoy.

    https://dl.dropboxusercontent.com/u/32687773/recipes.zip
     
    • Good Coder Good Coder x 2
  2. TheHipster

    TheHipster rhenz is a fairly decent fellow

    Holy. Fucking. Shit.

    Duck...I-I think I love you... Like... Wow... Eat your heart out RJ.
     
  3. duck

    duck Phant0m Legend

    wow, thank you.

    if there's somebody I ever want to fuck irl I will definitely come to you.

    Also, this is a work in progress, and was a little rushed. Some features and integrity checks are missing, but nothing major.
     
    • Like Like x 1
  4. TheHipster

    TheHipster rhenz is a fairly decent fellow

    Ill look forward to updates. See if I can't put this on the F:NV Server when it comes out. It'll help a fuck ton.

    Just damn dude. You have all of my thanks. And now all of my love. [member=2001]Monkah[/member] you lost it now. Sorry.
     
  5. Duck shall be forever praised, to death with plugins that cost just as much as a gamemode that has much more coding involved than it itself.
     
  6. Tomo742

    Tomo742 Guest

    Finally, this looks damn awesome. Nice one Duck, I'm sure plenty of people will be using this.
     
  7. Bless you, Duck.
     
  8. The Owl

    The Owl Guest

    I love how it says 'Free' in the title, as if to piss RJ off.
     
  9. Daemon01

    Daemon01 I've covered in wars y'know.

    Who wants RJ's crafting plugin? its stolen lua code.
     
  10. Who wants to teach me lua
     
  11. Holy fuck I thought you died.
     
  12. I want it. *cough already has it cough*

    Sorry RJ I love you bby i r still use your code.
     
  13. Tommy

    Tommy used to be relevant Moderator Clockwork Customer

    didnt you die
     
  14. Adler

    Adler cwSexySaveData:SaveSomePieceOfShit() Clockwork Customer

    DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!DUCK!

    RJ NO 30$!!!!!!
     
  15. No one?

    okay
     
  16. duck

    duck Phant0m Legend

    • Agree Agree x 1
  17. what's cum
     
  18. Daemon01

    Daemon01 I've covered in wars y'know.

    -Snip-

    User was banned for this post by DonScarlet (Leaking of paid plugins).
     
  19. Tomo742

    Tomo742 Guest

    I... Erm... [member=1220]RJ[/member]
     
  20. duck

    duck Phant0m Legend

    you're a rude dude.
     
    • Funny Funny x 1

Previous Readers (Total: 0)