I need help with format slot

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Stefqnutz

Active Member
Sep 23, 2019
67
1
8
19
command /crafting:
trigger:
open chest with 2 rows named "&bCrafting" to player
wait 1 tick
if player has 1 Stick:
if player has 1 Flint:
format slot 0 of player with arrow named "&cArrow &bCraftable: &aTrue &2Recipes: 1 Stick and 1 Flint"
else:
format slot 0 of player with arrow named "&cArrow &bCraftable: &cFalse &2Recipes: 1 Stick and 1 Flint"
please help!
it says that "player with arrow is not an item stack"
what should i do?
 
Try to add „to be unstealable“ behind format slot 0 of player with arrow named "&cArrow &bCraftable: &aTrue &2Recipes: 1 Stick and 1 Flint"

Like this:
Code:
command /crafting:
 trigger:
  open chest with 2 rows named "&bCrafting" to player
  wait 1 tick
  if player has 1 Stick:
   if player has 1 Flint:
    format slot 0 of player with arrow named "&cArrow &bCraftable: &aTrue &2Recipes: 1 Stick and 1 Flint" to be unstealable
   else:
    format slot 0 of player with arrow named "&cArrow &bCraftable: &cFalse &2Recipes: 1 Stick and 1 Flint" to be unstealable
 
Here you go i modified it a little so that it actually crafts an arrow for you. I haven't tested it but it should work

Code:
command /crafting:
    trigger:
        open chest with 2 rows named "&bCrafting" to player
        wait 1 tick
        if player has 1 Stick:
            if player has 1 Flint:
                format slot 0 of player with 1 arrow named "&cArrow &bCraftable: &aTrue &2Recipes: 1 Stick and 1 Flint" to close then run [give player 1 arrow]
        else:
            format slot 0 of player with 1 arrow named "&cArrow &bCraftable: &cFalse &2Recipes: 1 Stick and 1 Flint" to close then run [&cYou don't have the required items to craft this!]
 
Status
Not open for further replies.