Solved saving lines of code

  • 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 community!

    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!

ThunderPierce

Member
Jul 15, 2024
15
0
1
Belgium
im making a shop for my server and i want it to have a glass pane border, do i need to paste the code everywhere or is there a way to make a shortcut for it:

set slot 0 of player's current inventory to red stained glass pane
set slot 1 of player's current inventory to red stained glass pane
set slot 2 of player's current inventory to red stained glass pane
set slot 3 of player's current inventory to red stained glass pane
set slot 4 of player's current inventory to red stained glass pane
set slot 5 of player's current inventory to red stained glass pane
set slot 6 of player's current inventory to red stained glass pane
set slot 7 of player's current inventory to red stained glass pane
set slot 8 of player's current inventory to red stained glass pane
set slot 9 of player's current inventory to red stained glass pane
set slot 17 of player's current inventory to red stained glass pane
set slot 18 of player's current inventory to red stained glass pane
set slot 26 of player's current inventory to red stained glass pane
set slot 27 of player's current inventory to red stained glass pane
set slot 35 of player's current inventory to red stained glass pane
set slot 36 of player's current inventory to red stained glass pane
set slot 37 of player's current inventory to red stained glass pane
set slot 38 of player's current inventory to red stained glass pane
set slot 39 of player's current inventory to red stained glass pane
set slot 40 of player's current inventory to red stained glass pane
set slot 41 of player's current inventory to red stained glass pane
set slot 42 of player's current inventory to red stained glass pane
set slot 43 of player's current inventory to red stained glass pane
set slot 44 of player's current inventory to red stained glass pane
 
Hey, only solution i can think of rn is this:
Code:
loop integers from 0 to 44:
    if loop-value is not 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33 or 34:
        set slot loop-value of player's current inventory to red stained glass pane
 
  • Like
Reactions: Luke_Sky_Walker
Would
Code:
set slot [slot], [slot], [you get the jest] of player's current inventory to [item]
work?