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.

How to solve this :( plz help me

Discussion in 'Skript' started by LUYA, Apr 11, 2018.

Thread Status:
Not open for further replies.
  1. LUYA

    LUYA Member

    Joined:
    Oct 22, 2017
    Messages:
    20
    Likes Received:
    0
    I need to make a skript when player has a dye named "&9pride" a command "/pride on <player's name> <player's team>" executes (only 1 time)

    I thought about trying with 'every 1 seconds'
    but if I use this I think this will make the command executes every 1 seconds if the player has the item...
    So I need a another way to make this.

    And another problem is about the player's team..
    The command("/pride on <player's name> <player's team>") needs to know the player's team. And I made a command saving the player's name in a variable
    the team setting code:
    Code (Skript):
    1. command /[<text>] [<text>] [<text>]:
    2.     trigger:
    3.         if arg 1 is not set:
    4.             message "{@@} 팀 이름 입력 안하냐?"
    5.          
    6.         else:
    7.             if arg 1 is "주작":
    8.                 add arg 2 to {주작팀}
    9.                 add arg 3 to {주작팀}
    10.                 broadcast "{@@} &c%arg 2%&f, &c%arg 3%&f님이 주작팀으로 설정되었습니다!"
    11.          
    12.             if arg 1 is "청룡":
    13.                 add arg 2 to {청룡팀}
    14.                 add arg 3 to {청룡팀}
    15.                 broadcast "{@@} &c%arg 2%&f, &c%arg 3%&f님이 청룡팀으로 설정되었습니다!"
    16.              
    17.             if arg 1 is "백호":
    18.                 add arg 2 to {백호팀}
    19.                 add arg 3 to {백호팀}
    20.                 broadcast "{@@} &c%arg 2%&f, &c%arg 3%&f님이 백호팀으로 설정되었습니다!"
    21.              
    22.             if arg 1 is "현무":
    23.                 add arg 2 to {현무팀}
    24.                 add arg 3 to {현무팀}
    25.                 broadcast "{@@} &c%arg 2%&f, &c%arg 3%&f님이 현무팀으로 설정되었습니다!"
    26.              
    27.             if arg 1 is "삭제":
    28.                 delete {주작팀}
    29.                 delete {청룡팀}
    30.                 delete {백호팀}
    31.                 delete {현무팀}
    32.                 broadcast "{@@} 팀 초기화!"
    but the command doesn't work I don't know what is the matter.
    there is no errors in the bukkit and it reloads it very well. It just doesn't work as I planed.
    Can anybody help me with this?

    the code I need to fix:
    Code (Skript):
    1. every 1 second in "world":
    2.     loop all players:
    3.         if loop-player is not op:
    4.             if loop-player has light blue dye named "&9pride":
    5.                 set {_교만} to loop-player's name
    6.                 if {청룡팀} contains {_교만}:
    7.                     execute console command "/pride on %{_교만}% 청룡"
     
  2. CharcoalToast

    CharcoalToast Member

    Joined:
    Mar 10, 2018
    Messages:
    23
    Likes Received:
    4
    Please translate this to English.
     
  3. LUYA

    LUYA Member

    Joined:
    Oct 22, 2017
    Messages:
    20
    Likes Received:
    0
    It's just variable's name or additional explanation sentences. No problems in understanding the code's content.
    If you still need translation to help me, tell me the specific part. I'll do it for you.
     
  4. CharcoalToast

    CharcoalToast Member

    Joined:
    Mar 10, 2018
    Messages:
    23
    Likes Received:
    4
    You can make a variable like {%player%.hasalreadythecommandexecuted}. You set it to false, and when the command is executed you set it to true.
    And the translation are handy because now we don't know for what you are using the variables and what the arguments are.
     
    • Agree Agree x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...