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.

Solved Im so confused, It was working

Discussion in 'Skript' started by mrclipse, Sep 18, 2021.

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

    mrclipse Member

    Joined:
    Sep 18, 2021
    Messages:
    11
    Likes Received:
    0
    I had a simple factions plugin working but I wanted to add the ability to /fconfirm delete and /fdelete but it just stopped is there anyone who can help me?

    Also I have no idea what "lists" are I just thought that something like {factions::%uuid of player%::factionname} would be one single variable.

    Code (Text):
    1.  
    2. command /fcreate <string>:
    3.     description: Creates a faction
    4.     executable by: players
    5.     trigger:
    6.         set {factions::%uuid of player%::factionlocation} to location of player
    7.         set {factions::%uuid of player%::factionname} to "%arg-1%"
    8.         set {factions::factionname} to "%arg-1%"
    9.         set {factions::%uuid of player%::isowner} to 1
    10.         set {factions::%uuid of player%::hasfaction} to 1
    11.         message "Created the faction <green>%arg-1%<reset> at <grey>%location of player%<reset>"
    12.  
    13. command /fdelete:
    14.     description: Deletes your faction
    15.     executable by: players
    16.     trigger:
    17.         if {factions::%uuid of player%::isowner} is 1:
    18.             set {factions::factionname} to {factions::%uuid of player%::factionname}
    19.             message "are you sure you want to <red><bold>delete<reset> %{factions::factionname}%?"
    20.             message "this action <red><bold>cannot be undone<reset>"
    21.             message "type /fconfirm delete <faction name> if you are sure"
    22.         else:
    23.             message "you are not the owner of this faction"
    24.  
    25. command /fconfirm <string> <string>:
    26.     description: Confirms the deletion of your faction
    27.     executable by: players
    28.     trigger:
    29.         message "%arg-1%", "%arg-2%"
    30.         if "%arg-1%" is "delete":
    31.             message "delete"
    32.                 if {factions::%uuid of player%::hasfaction} is 1:
    33.                     if {factions::%uuid of player%::is owner} is 1:
    34.                         set {factions::%uuid of player%::hasfaction} to 0
    35.                         set {factions::%uuid of player%::factionname} to 0
    36.                         set {factions::%uuid of player%::isowner} to 0
    37.  
    38.  
    39. command /fsethome:
    40.     description: Sets your faction home
    41.     executable by: players
    42.     trigger:
    43.         if {factions::%uuid of player%::hasfaction} is 1:
    44.             if {factions::%uuid of player%::isowner} is 1:
    45.                 if "%block below player%" is not "air" or "lava":
    46.                     set {factions::%uuid of player%::faction location} to location of player
    47.                     message "set <lime>{factions::%uuid of player%::factionlocation}'s<reset> home to <grey>%location of player%<reset>"
    48.  
    49. command /fhome:
    50.     description: Teleports you to your faction home
    51.     executable by: players
    52.     trigger:
    53.         if {factions::%uuid of player%::hadfaction} is 1:
    54.             message "Hello world"
    55.  
    --- Double Post Merged, Sep 18, 2021, Original Post Date: Sep 18, 2021 ---
    I think it works but gives me 5 error messages
    --- Double Post Merged, Sep 18, 2021 ---
    I fixed it!
    --- Double Post Merged, Sep 18, 2021 ---
    Code (Text):
    1. command /fcreate <string>:
    2.     description: Creates a faction
    3.     executable by: players
    4.     trigger:
    5.         set {factions::%uuid of player%::factionlocation} to location of player
    6.         set {factions::%uuid of player%::factionname} to "%arg-1%"
    7.         set {factions::%uuid of player%::isowner} to 1
    8.         set {factions::%uuid of player%::hasfaction} to 1
    9.         message "Created the faction <green>%arg-1%<reset> at <grey>%location of player%<reset>"
    10.  
    11. command /fdelete:
    12.     description: Deletes your faction
    13.     executable by: players
    14.     trigger:
    15.         if {factions::%uuid of player%::isowner} is 1:
    16.             message "are you sure you want to <red><bold>delete<reset> %{factions::%uuid of player%::factionname}%?"
    17.             message "this action <red><bold>cannot be undone<reset>"
    18.             message "type /fconfirm delete <faction name> if you are sure"
    19.         else:
    20.             message "you aren't the owner of this faction!"
    21.  
    22. command /fconfirm <string> <string>:
    23.     description: Confirms the deletion of your faction
    24.     executable by: players
    25.     trigger:
    26.         message "1:%arg-1% 2:%arg-2%"
    27.         if "%arg-1%" is "delete":
    28.             message "delete"
    29.             if {factions::%uuid of player%::hasfaction} is 1:
    30.                 if {factions::%uuid of player%::is owner} is 1:
    31.                     set {factions::%uuid of player%::hasfaction} to 0
    32.                     set {factions::%uuid of player%::factionname} to 0
    33.                     set {factions::%uuid of player%::isowner} to 0
    34.  
    35.  
    36. command /fsethome:
    37.     description: Sets your faction home
    38.     executable by: players
    39.     trigger:
    40.         if {factions::%uuid of player%::hasfaction} is 1:
    41.             if {factions::%uuid of player%::isowner} is 1:
    42.                 if "%block below player%" is not "air" or "lava":
    43.                     set {factions::%uuid of player%::faction location} to location of player
    44.                     message "set <lime>{factions::%uuid of player%::factionlocation}'s<reset> home to <grey>%location of player%<reset>"
    45.  
    46. command /fhome:
    47.     description: Teleports you to your faction home
    48.     executable by: players
    49.     trigger:
    50.         if {factions::%uuid of player%::hasfaction} is 1:
    51.             message "Teleporting you to %{factions::factionname}%"
    52.  
    53. command /finfo:
    54.     description: Prevides you with information about your current faction
    55.     executable by: players
    56.     trigger:
    57.         message "name: %{factions::%uuid of player%::factionname}%"
    working code
     
Thread Status:
Not open for further replies.

Share This Page

Loading...