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.

Weather and time only 4 one player

Discussion in 'Skript' started by dusn38d, Feb 18, 2018.

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

    dusn38d Member

    Joined:
    Feb 18, 2018
    Messages:
    2
    Likes Received:
    0
    I want do do a simple settings GUI where users (in SkyPvP) can set only there Own Weather and time.

    Code (Skript):
    1. on npc right click:
    2.     if citizen is named "&8&cEinstellungen &8●":
    3.         make player execute command "/§893424"
    4.         stop
    5.        
    6. command /§893424:
    7.     trigger:
    8.         wait 1 tick
    9.         open chest with 2 rows named "&8» &cEinstellungen" to player
    10.         wait 1 tick
    11.         set {settings.%player%} to true
    12.         wait 1 tick
    13.         format slot 0 of player with gray glass named "&8" to be unstealable
    14.         format slot 1 of player with nether star named "&8&3Wetter &8●" to close then run [execute player command "§wetter"]
    15.         format slot 2 of player with gray glass named "&8" to be unstealable
    16.         format slot 3 of player with nether star named "&8&eZeit &8●" to be unstealable
    17.         format slot 4 of player with gray glass named "&8" to be unstealable
    18.         format slot 5 of player with nether star named "&8&cCrates &8●" to be unstealable
    19.         format slot 6 of player with gray glass named "&8" to be unstealable
    20.         format slot 7 of player with nether star named "&8&cComming soon &8●" to be unstealable
    21.         format slot 8 of player with gray glass named "&8" to be unstealable
    22.         format slot 9 of player with gray glass named "&8" to be unstealable
    23.        
    24.         if {settings.Wetter.%player%} is "sun":
    25.             format slot 10 of player with light green dye named "&8&cSonne &8●" to run [execute player command "/§48344"]
    26.         if {settings.Wetter.%player%} is "rain":
    27.             format slot 10 of player with gray dye named "&8&cRegen &8●" to run [execute player command "/§48273723"]
    28.            
    29.         format slot 11 of player with gray glass named "&8" to be unstealable
    30.                
    31.  
    32. on inventory click:
    33.     if {settings.%player%} is true:
    34.         cancel event
    35.         stop
    36. on join:      
    37.     if {settings.Wetter.%player%} is not set:
    38.         set {settings.Wetter.%player%} to "sun"
    39.                
    40. on inventory close:
    41.     if {settings.%player%} is true:
    42.         set {settings.%player%} to false
    43.         stop
    44.        
    45. command /§48344:
    46.     trigger:
    47.         set {settings.Wetter.%player%} to "rain"
    48.         SPACEHOLDER
    49.         execute player command "/§893424"
    50.        
    51. command /§48273723:
    52.     trigger:
    53.         set {settings.Wetter.%player%} to "sun"
    54.         SPACEHOLDER
    55.         execute player command "/§893424"
    By SPACEHOLDER I want do do something like "set weather of %player% to sun" or "set weather of %player% to rain"
    It must be in every world untill it gets toggled in the GUI

    Thanks 4 help
     
  2. TPGamesNL

    Moderator Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    108
    Medals:
    #2 TPGamesNL, Mar 4, 2018
    Last edited: Mar 4, 2018
Thread Status:
Not open for further replies.

Share This Page

Loading...