#Can a some more experienced person help me with something? I need help with my Craftingforge..
1 messages · Page 1 of 1 (latest)
heck, use function example(result: item, ingredients: items).
and, with skbee can you not just use the recipe section?
I didn't made this. It was made by a colleague who no longer skripts and can't tell me how it works.
what the bomboclaat is this bro
two snippets of a custom crafting system
I would re-write using this honestly
im not entirely sure what this system needs to do, but it looks overcomplicated
Yea. Seems like it. I would rewrite it but I don't know how because I didn't make it..
Based on the functions, I don't think it even utilizes the vanilla crafting table, so converting it to such would take a bit (but honestly, maybe 20 minutes or less)
Major difference: you can only use 1 item in each crafting slot (so all of the 64 items would become 1), but the result item can be more than 1 (i have no idea what max is, but it's greater than 64)
Using SkBee's recipes, you can set a variable to the item you want, then use it as an ingredient in another recipe
It doesnt work with a vanilla crafting table
that's what I figured
Because it isn't supposed to
without seeing the rest of the code that checks for the items in whatever gui or block you craft with, we really can't help any further as I agree with x8ight, it's a very complicated recipe system your friend made
You add items, and then there's a GUI that displays the items. Then you can craft them if you have the necessary items.
local function showForgeRecipe(p: player, id: text):
create a gui with virtual chest inventory with 5 rows named "Schmiede":
set {_loop-value::*} to {craftingitems::%{_id}%} split at "/"
format gui slot (integers between 0 and 11),13,17,18,20,21,22,26,27,28,29,31,(integers between 35 and 44) with gray stained glass pane named "&8"
format gui slot 19,12,30 with air
loop 18 times:
format next gui slot with ({_loop-value::%loop-value%} parsed as int) of redstone block
{_loop-value::%loop-value+1%} parsed as item isn't air
add ({_loop-value::%loop-value%} parsed as int) of ({_loop-value::%loop-value+1%} parsed as item) to {_items::*}
format gui slot 19 with {guiheads::seitezurück} named "&8› &cZurück" with lore " &8&l» &7Klicke&8, &7um zur Schmiede zurückzukehren&8.":
openForgeGUI({_p})
format gui slot 12 with {forgeitems::%{_id}%}
format gui slot 30 with player head with nbt nbt compound from HeadConvert("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOWI0MjVhYTNkOTQ2MThhODdkYWM5Yzk0ZjM3N2FmNmNhNDk4NGMwNzU3OTY3NGZhZDkxN2Y2MDJiN2JmMjM1In19fQ==") named "&8› &aHerstellen" with lore " &8&l» &7Klicke&8, &7um den Gegenstand herzustellen&8.":
if {level::level::%uuid of {_p}%} is higher or equal to {craftingrecipe::%{_id}%::level}:
if {craftingqueue::%uuid of {_p}%} isn't set:
confirmCrafting({_p},{_id})
playSound({_p},"click",2,1)
else:
send "{@prefix} &7{@already_craft}"
playSound({_p},"fail")
else:
send "{@prefix} &7Du benötigst &cLevel %{craftingrecipe::%{_id}%::level}%&8, &7um diesen Gegenstand herzustellen&8." to {_p}
playSound({_p},"fail")
open last created gui to {_p}```
Thats the gui which showcases the items you need. And that's where the Item which I used as variable because it's saved in there won't show up.
But I think as you said I rewrite it completely
please tell me this uses skript-gui and not TuSke
In your other functions, it's setting a single variable to a list of items separated by commas. I would change it so it actually uses lists (then, loop the list). This way, you can use items directly in the list and set the slots accordingly instead of having to parse the slots as items (because they will already be items)
for example: {craftingitems::my_sword::*} is a list of your crafting ingredients. You can set the index of the list value to your slot number for an easier time placing the items in the gui.
Then ask the guy who made it
huh
Just ask the creator or just start from ground up
Trying to complete half done scripts is hard when you don't have the basics down
He stopped skripting or is no longer interested in helping me
I'll look into rewriting it.
Definitely think you should rewrite it. Based on what I have seen in your code, it really shouldn't be that difficult to convert it to crafting table.
It shouldn't have anything to do with a crafting table.
tf you tryna make