• Hey! Register here to create your account, engage with the community, and talk about what is new!

Custom Crafting for Nons

HackerDragon9999

Forum adept
Joined
Jan 18, 2023
Messages
112
Reaction score
20
First, make sure your plot crafting table is replaced with a barrel. This can be ignored if you have emperor and can use chest menus, but this is FOR NONS!

Make sure to create a "recipe" item that will be used in the crafting "table" to craft your item.

Then, add the following code to your player loop:
--
Set Container: (wherever your crafting "table" is), (recipe item)
Call Function: (result item's name)
--


Of course, we need to define that function!
Function: (result item's name) >
If Player Has Item: (recipe item) {
Remove Items: (recipe item)
If Player Has Item: (ingredient items) [Has All Items] {
Remove Items: (ingredient items)
Give Items: (result item)
-- (Indicate that the craft succeeded.)
} else {
-- (Indicate that the craft failed.)
}
}
 
Top Bottom