1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help me with this

Discussion in 'Skript' started by stxftb, Jan 17, 2022.

Tags:
Thread Status:
Not open for further replies.
  1. stxftb

    stxftb Member

    Joined:
    Jan 17, 2022
    Messages:
    1
    Likes Received:
    0
    Hi i wnat to make that when someone crafts for the first time an anvil to get one special item and when they craft it the second time to not get anything i used this skript

    variables:
    {_times} = "0"


    on craft:
    if event-item is anvil:
    if {_times} is "1":
    send ""
    if {_times} is "0":
    set {_times} to "1"
    give player 1 amethyst shard named "&6&lFirst Join" with lore "&fAcesta este un badge [&7COMUN&f], pentru mai multe informati scrie /badge"
     
  2. WoolBoy

    WoolBoy Member

    Joined:
    Sep 16, 2021
    Messages:
    15
    Likes Received:
    0
    First of all, you need to *tab* in each line after the "on craft:".

    Second, you must use an player instanced version of the variable. Replace each case of "{_times}" with "{%player%.times}"

    Thirdly, I would use boolean variables instead of the numbers one and zero in the original variable. Replace "if {_times is} 1" with "if {_times} is true", and do the same for the second case.

    Also, I would suggest using a more descriptive name for each variable such as "{%player%.joinitemclaimed}" to help you out when you go over your code later!
     
Thread Status:
Not open for further replies.

Share This Page

Loading...