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.

Raining Snowballs

Discussion in 'Requests' started by bumpyJake, Jan 11, 2022.

  1. bumpyJake

    bumpyJake Member

    Jan 11, 2022
    Likes Received:
    Category: Weather, magic

    Suggested name: SnowballRain

    Spigot/Skript Version: 1.18.1 / 2.6

    What I want:
    I want to be able to rain snowballs down around a certain radius, but in random locations each time. E.g., when the command is executed, 50 snowballs will appear within the 100 block radius, and the next time, 50 snowballs will appear in different locations within the 100 block radius.

    Ideas for commands:
    /sbcenter - set the center of the radius of snowballs
    /sbradius - set the radius of the snowballs
    /sblaunch - launch the snowballs

    Ideas for permissions:

    When I'd like it by: Within a few days :emoji_slight_smile:
  2. mordrowned

    mordrowned Member

    Apr 22, 2021
    Likes Received:
    NOT TESTED (probs need addons idk)

    also is gonna be laggy with a high radius

    Code (Text):
    1. variables:
    2.     sbradius = 10
    4. command /sbcenter:
    5.     permission: snowball.admin
    6.     trigger:
    7.         set {sbcenter} to player's location
    8.         send "&aSuccesfully set the Snowball Rain center to your location!"
    10. command /sbradius [<int>]:
    11.     permission: snowball.admin
    12.     trigger:
    13.         if arg-1 is set:
    14.             if arg-1 is higher than 0:
    15.                 set {sbradius} to arg-1
    16.                 send "&aSuccesfully set the radius to %arg-1%&a!"
    17.             else:
    18.                 send "&cPlease provide a positive number as a radius!"
    19.         else:
    20.             send "&aReset the Snowball Rain radius back to the default (10)!"
    22. command /sblaunch [<int>]:
    23.     permission: snowball.admin
    24.     trigger:
    25.         if arg-1 is set:
    26.             if arg-1 is higher than 0:
    27.                 if {sbcenter} is set:
    28.                     send "&aSuccesfully launched %arg-1%&a snowballs in a %{sbradius}%&a radius!"
    29.                     set {_snowballs} to 0
    30.                     loop blocks in radius {sbradius} around {sbcenter}:
    31.                         if loop-block is not air:
    32.                             if block above loop-block is air:
    33.                                 add loop-block to {_blocks::*}
    34.                     loop {_blocks::*}:
    35.                         if {_snowballs} is less than arg-1:
    36.                             add 1 to {_snowballs}
    37.                             set {_loc} to random element out of {_blocks::*}
    38.                             remove {_loc} from {_blocks::*}
    39.                             snowballfall({_loc})
    40.                 else:
    41.                     send "&cThe Snowball Rain center is not set!"
    42.             else:
    43.                 send "&cPlease provide a positive number as an amount!"
    44.         else:
    45.             send "&cWrong usage! /sblaunch <amount of snowballs>"
    47. function snowballfall(loc: location):
    48.     shoot snowball from location 100 above {_loc} at speed 3 downwards

Share This Page