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 Variables help

Discussion in 'Skript' started by GiorgixPRO, Dec 29, 2017.

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

    GiorgixPRO Member

    Joined:
    Jul 29, 2017
    Messages:
    44
    Likes Received:
    0
    Hello, how do I make that every 100 blocks mined from the player, the console execute the command?

    Code (Skript):
    1. variables:
    2.     {minedblocks.%player%} = 0
    3.  
    4. on first join:
    5.     set {minedblocks.%player%} to 0
    6.  
    7.  
    8. on mine:
    9.          add 1 to {minedblocks.%player%}
    10.        #every 100 blocks mined from the player:
    11.         chance of 50%:
    12.             execute console command "giveminebomb %player% 1"
    13.             send "&aHai scavato 100 blocchi! Ti abbiamo regalato una &6Minebomb&a!"
    14.             stop
    15.         chance of 50%:
    16.             send "&aHai scavato 100 blocchi! Ma purtroppo non hai vinto una &6Minebomb&a!"
    17.             stop
     
  2. MusicManSK

    MusicManSK Active Member

    Joined:
    Nov 30, 2017
    Messages:
    232
    Likes Received:
    11
    Code (Skript):
    1. on mine:
    2.     if {minedblocks.%player%} is not set:
    3.         set {minedblocks.%player%} to 0
    4.     add 1 to {minedblocks.%player%}
    5.     if {minedblocks.%player%} is 100:
    6.         set {minedblocks.%player%} to 0
    7.         if random integer between 0 and 1 is 0:
    8.             execute console command "giveminebomb %player% 1"
    9.             send "&aHai scavato 100 blocchi! Ti abbiamo regalato una &6Minebomb&a!"
    10.             stop
    11.         else:
    12.             send "&aHai scavato 100 blocchi! Ma purtroppo non hai vinto una &6Minebomb&a!"
    13.             stop
     
  3. GiorgixPRO

    GiorgixPRO Member

    Joined:
    Jul 29, 2017
    Messages:
    44
    Likes Received:
    0
  4. MusicManSK

    MusicManSK Active Member

    Joined:
    Nov 30, 2017
    Messages:
    232
    Likes Received:
    11
    ú are welcome :emoji_grinning:
     
Thread Status:
Not open for further replies.

Share This Page

Loading...