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

    What do you mean? Can you post the recipe here?
     
  2. Tomo742

    Tomo742 Guest

    Here you go -

    Code:
    local RECIPE = Clockwork.recipe:New("Colt Python Clip");
    	RECIPE:Require("Empty Colt Python Clip", 1, 1);
    	RECIPE:Require("Box of .357 Cartridges", 1, 1);
    	RECIPE:Output(".357 speed clip", 1);
    	RECIPE:Output("Half Box of .357 Cartridges", 1);
    	RECIPE.model = "models/Items/357ammobox.mdl";
    	RECIPE.description = "A full colt python clip.";
    RECIPE:Register();
    It works and allows me to craft it but the "Require" things stay red.
     
  3. duck

    duck Phant0m Legend

    You are using the item's name instead of the uniqueID. Go to the file for the item and search for ITEM.uniqueID = "whatever";

    If it is not there, then it is usually the name of the item, in all lowercase, with spaces replaced with _

    Example
     
  4. Tomo742

    Tomo742 Guest

    Right, I kind of thought it might be that. Well, thanks for the help.
     
  5. duck

    duck Phant0m Legend

    Mhm. Well, Atebite just added support for using the item's actual name instead of the uniqueID. I'll update the download soon.
     
  6. Tomo742

    Tomo742 Guest

    Oh great, that would actually be perfect. Adds much more user functionality too. Oh also, perhaps another cool update would be to add an "or" function for the recipes? So instead of having to have two recipes that create the same thing, allow it to have different things for just that one recipe.
     
  7. duck

    duck Phant0m Legend

    On top of requiring a certain amount of the item and taking away a certain amount as well, I'm not sure how that'd work out. If you want, you could do it with the hooks that are available in the plugin.
     
  8. duck

    duck Phant0m Legend

    https://dl.dropboxusercontent.com/u/32687773/recipes.zip

    You can now use item names instead of uniqueIDs if you want.

    [member=5522]Atebite[/member] the god.
     
  9. Sixxicles

    Sixxicles Guest

    I fucking idolize you, Duck.

    This is definitely going into Fall Of Man.
     
  10. Fuck pulse-rifles, sometimes I wish pattern matching wasn't a thing.

    But yeah, feel free to do RECIPE:Require("9mM pIsToL bUlLeTs") if you want to now, no more case sensitivity anymore either!
     
  11. Tomo742

    Tomo742 Guest

    Hey [member=5482]duck[/member] and [member=5522]Atebite[/member] Is it possible to increase the abilities used for crafting? Perhaps I have a custom ability called "Crafting" or "Science" How would I go about increasing these permanently by a small random amount per each crafting?
     
  12. duck

    duck Phant0m Legend

    Code:
    -- Called when a player crafts a recipe.
    function PLUGIN:PlayerCraftedRecipe(player, recipeTable)
    	-- Stuff
    end;
     
  13. Additionally, use math.random() if you want the attribute boost amount to be random.
     
  14. Tomo742

    Tomo742 Guest

    Thank you, again sorry to bother you again but. How do you change attributes correctly? Whenever i Have tried it has not worked well.
     
  15. Code:
    Clockwork.attributes:Progress(player, attribute, amount, gradual)
     
  16. duck

    duck Phant0m Legend

    • Added automatic update checking.
    • Removed unnecessary table creation upon creating a new recipe.
    https://dl.dropboxusercontent.com/u/32687773/recipes.zip
     
  17. Could you add a way so recipes done show unless they have a certain item?

    Like with upgrading weapons, you need the lower version in your inventory before the recipe can show.
     
  18. duck

    duck Phant0m Legend

    clientside

    Code:
    -- Called to check whether or not the player can see the recipe in the menu.
    function PLUGIN:PlayerCanSeeRecipe(recipeTable) end;
     
  19. I don't mean to hide it all together.

    Say there's a recipe for a Combine Ball. It would remain hidden until the player has the most key component of it in his inventory, a plasma shield core or whatever. Once they lose the item by either crafting or dropping it, the recipe would disappear again
     
  20. duck

    duck Phant0m Legend

    Yes. You can do that with the hook I posted.
     

Previous Readers (Total: 0)