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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Announcement 1000 gold

Discussion in 'Requests' started by thomas_nietoke, Feb 27, 2019.

  1. thomas_nietoke

    Joined:
    Feb 26, 2019
    Messages:
    29
    Likes Received:
    0
    Category: automatic system to announce a broadcast

    Suggested name: i don't care

    What I want: i want a script where the broadcast will say (playername) got 1000 gold! i use this skript:
    on first join:
    set {gold.%player%} to 0
    on right click on gold block:
    play sound "" with volume 10 at player
    send player title "&e&lGold" with subtitle "&8&l» &3&l%{gold.%player%}%" for 0.2 seconds
    add 1 to {gold.%player%}
    #
    command /gold [<offline player>]:
    executable by: players
    trigger:
    if argument 1 is not set:
    send " "
    send "&6&lGold &8» &2&l%{gold.%player%}%"
    send " "
    Else:
    send " "
    send "&6&lGold &8» &2&l%{gold.%arg-1%}%"
    send " "


    Ideas for commands: automatic so no command

    Ideas for permissions: no permission

    When I'd like it by: as fast as possible

     
    #1 thomas_nietoke, Feb 27, 2019
    Last edited: Feb 27, 2019
  2. Best Answer:
    Post #8 by TPGamesNL, Feb 28, 2019
  3. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    Use if {gold.%player%} >= 1000. Also, I recommend using list variables ({gold::%player%}) because you can loop them and delete them more easily.
     
  4. thomas_nietoke

    Joined:
    Feb 26, 2019
    Messages:
    29
    Likes Received:
    0
    Thanks could you create a simple code for me for what i want?
     
  5. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    Code (Text):
    1. on first join:
    2.     set {gold::%player%} to 0
    3. on right click on gold block:
    4.     play sound "" with volume 10 at player
    5.     send player title "&e&lGold" with subtitle "&8&l» &3&l%{gold::%player%}%" for 0.2 seconds
    6.     add 1 to {gold::%player%}
    7.     {gold::%player%} >= 1000
    8.     broadcast "%player% has got 1000 gold"
    9. #
    10. command /gold [<offline player>]:
    11.     executable by: players
    12.     trigger:
    13.         if arg- is not set:
    14.             send " "
    15.             send "&6&lGold &8» &2&l%{gold::%player%}%"
    16.             send " "
    17.         else:
    18.             send " "
    19.             send "&6&lGold &8» &2&l%{gold::%arg-1%}%"
    20.             send " "
     
  6. thomas_nietoke

    Joined:
    Feb 26, 2019
    Messages:
    29
    Likes Received:
    0
    Thanks so much but do you also know how to make it so it only broadcasts it once? because when a player gets + 1 gold it will broadcast it again.
     
  7. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    Just change >= to =
     
  8. thomas_nietoke

    Joined:
    Feb 26, 2019
    Messages:
    29
    Likes Received:
    0
    k
    --- Double Post Merged, Feb 28, 2019, Original Post Date: Feb 28, 2019 ---
    and when i reset the gold it still happens could you also make something for that please?
     
  9. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    Try
    Code (Text):
    1. on first join:
    2.     set {gold::%player%} to 0
    3. on right click on gold block:
    4.     play sound "" with volume 10 at player
    5.     send player title "&e&lGold" with subtitle "&8&l» &3&l%{gold::%player%}%" for 0.2 seconds
    6.     add 1 to {gold::%player%}
    7.     {gold::%player%} >= 1000
    8.     {goldbroadcast::%player%} is not set
    9.     set {goldbroadcast::%player%} to true
    10.     broadcast "%player% has got 1000 gold"
    11. #
    12. command /gold [<offline player>]:
    13.     executable by: players
    14.     trigger:
    15.         if arg- is not set:
    16.             send " "
    17.             send "&6&lGold &8» &2&l%{gold::%player%}%"
    18.             send " "
    19.         else:
    20.             send " "
    21.             send "&6&lGold &8» &2&l%{gold::%arg-1%}%"
    22.             send " "
    --- Double Post Merged, Feb 28, 2019, Original Post Date: Feb 28, 2019 ---
    Btw you should also use UUIDs because now, when a player changes their name, they lose their gold
     
  10. thomas_nietoke

    Joined:
    Feb 26, 2019
    Messages:
    29
    Likes Received:
    0

Share This Page

Loading...