Cool thing to help creating custom items easier.

  • 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.

ryanrox333

Member
Jul 6, 2019
17
0
1
22
oneiq.live
Basically, it's just a function that allows you to input 4 things and will return an item based on that.

The First Argument - Item (String)
The first argument is where you put your item, this is in a string format and is converted into an item. This is used to make it easier to make a command from this function.

The Second Argument - Name (String)
The second argument is where you put the name of the item. This set the name of the item that you are making. The character "_" is used as a space incase if you are making a command from this function.

The Third Argument - Lore (String)
The third argument is the lore of the item. This can be as long as you want it to be. The character "_" is used as a space and the character "|" is used to create a new line.

The Fourth Argument - Glow (Boolean)
The final argument is if you want the item to glow or not. Setting it to true will cause the item to glow, and putting false will cause the opposite.

Examples:
upload_2022-3-16_18-1-27.png

upload_2022-3-16_18-1-44.png

Both were created using the function.


Code:
Code:
function createItem(i: string, n: string, lore: string, g: boolean) :: item:
    replace all "_" with " " in {_i}
    if {_g} is true:
        set {_item} to glowing {_i} parsed as item
    else:
        set {_item} to {_i} parsed as item
    replace all "_" with " " in {_n}
    set name of {_item} to colored {_n}
    set {_l} to colored {_lore}
    replace all "_" with " " in {_l}
    replace all "|" with "%nl%" in {_l}
    set lore of {_item} to {_l}
    return {_item}
 
Status
Not open for further replies.