Weather and time only 4 one player

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

dusn38d

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

code_language.skript:
on npc right click:
    if citizen is named "&8● &cEinstellungen &8●":
        make player execute command "/§893424"
        stop
        
command /§893424:
    trigger:
        wait 1 tick
        open chest with 2 rows named "&8» &cEinstellungen" to player
        wait 1 tick
        set {settings.%player%} to true
        wait 1 tick
        format slot 0 of player with gray glass named "&8" to be unstealable
        format slot 1 of player with nether star named "&8● &3Wetter &8●" to close then run [execute player command "§wetter"]
        format slot 2 of player with gray glass named "&8" to be unstealable
        format slot 3 of player with nether star named "&8● &eZeit &8●" to be unstealable
        format slot 4 of player with gray glass named "&8" to be unstealable
        format slot 5 of player with nether star named "&8● &cCrates &8●" to be unstealable
        format slot 6 of player with gray glass named "&8" to be unstealable
        format slot 7 of player with nether star named "&8● &cComming soon &8●" to be unstealable
        format slot 8 of player with gray glass named "&8" to be unstealable
        format slot 9 of player with gray glass named "&8" to be unstealable
        
        if {settings.Wetter.%player%} is "sun":
            format slot 10 of player with light green dye named "&8● &cSonne &8●" to run [execute player command "/§48344"]
        if {settings.Wetter.%player%} is "rain":
            format slot 10 of player with gray dye named "&8● &cRegen &8●" to run [execute player command "/§48273723"]
            
        format slot 11 of player with gray glass named "&8" to be unstealable
                

on inventory click:
    if {settings.%player%} is true:
        cancel event
        stop
on join:       
    if {settings.Wetter.%player%} is not set:
        set {settings.Wetter.%player%} to "sun"
                
on inventory close:
    if {settings.%player%} is true:
        set {settings.%player%} to false
        stop
        
command /§48344:
    trigger:
        set {settings.Wetter.%player%} to "rain"
        SPACEHOLDER
        execute player command "/§893424"
        
command /§48273723:
    trigger:
        set {settings.Wetter.%player%} to "sun"
        SPACEHOLDER
        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
 
Status
Not open for further replies.