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.

Squad Shield

Discussion in 'Requests' started by FistoF, May 24, 2019.

  1. FistoF

    FistoF Active Member

    Joined:
    Feb 11, 2017
    Messages:
    53
    Likes Received:
    0
    Category:
    PvP

    Suggested name:
    Squad Shield

    Spigot/Skript Version:
    Whichever is the newest at the time of making this script

    What I want:
    The Squad Shield from Star Wars Battlefront
    1. A player places down a brewing stand
    2. It starts smoothly❌ emitting particles in a shape of a one big bubble
    3. The players inside the bubble are protected from damage caused by the players outside the bubbleand vice versa ❌
    4. The bubble disappears after withstanding a certain amount of damage❌ or if the brewing stand gets destroyed
    6. There can be multiple squad shields at the same time

    Demonstration:

    Starts at 0:22
     
    #1 FistoF, May 24, 2019
    Last edited: Apr 15, 2021
  2. LhommeFrancais

    Joined:
    Mar 29, 2019
    Messages:
    15
    Likes Received:
    1
    Try this?
    Tell me if there are any problems with the whole damage thing or if there is anything you want me to add.
    Also you are going to need skDragon for the particles
    https://www.spigotmc.org/resources/skript-addon-skdragon-free-emotes-particles-great-eula-perks.24173/

    Code (Text):
    1. # Squad Shield
    2. # Author: LhommeFrancais
    3. # Version: 1.0
    4.  
    5. # Dependencies: skDragon
    6.  
    7. options:
    8.     DestroyTime: 30 # This is the amount of time before the Squad Shield breaks in seconds
    9.     ItemName: &5&lShield Emitter&7&o (Place) #-- Name of the Item that you place
    10.     SoundEffect: ZOMBIE_REMEDY #http://docs.codelanx.com/Bukkit/1.8/org/bukkit/Sound.html
    11.  
    12.  
    13.  
    14. # -- Do not edit below line unless you know how to config skript -- #
    15. # ---------------------------------------------------------------------------------------------------- #
    16.  
    17. on place of a brewing stand:
    18.     if name of tool of player is "{@ItemName}":
    19.         set {active} to true
    20.         play "{@SoundEffect}" to player at volume 1
    21.         send "hi" to player
    22.         set {loc} to location of event-location
    23.         set {loc1} to block above event-location
    24.         drawSphere style 1, particle "redstone", RGB 221, 110, 223, center location of {loc}, id "shield1.%player%", rainbowMode false, radius 4, density 300, visibleRange 32, pulseDelay 1
    25.         drawLine particle redstone, RGB 223, 110, 225, center {loc}, target location of {loc1}, id "shield2.%player%", rainbowMode false, solid true, density 50, length 4, zigZag count 0, height 0, visibleRange 32, displacementXYZ 0, 1, 0, pulseDelay 1              
    26.         wait {@DestroyTime} seconds
    27.         stopEffect id "shield1.%player%"
    28.         stopEffect id "shield2.%player%"
    29.         set block at {loc} to air
    30.         set {active} to false
    31.  
    32.  
    33. on damage:
    34.     set {attacker} to attacker
    35.     set {victim} to victim
    36.     if {active} is true:
    37.         loop players in radius 30 of {loc}:
    38.             if loop-player is attacker:
    39.                 set {killing} to false
    40.             if loop-player is victim:
    41.                 set {killing2} to true
    42.         loop players in radius 4 of {loc}:
    43.             if loop-player is attacker:
    44.                 set {killing} to true
    45.             if loop-player is victim:
    46.                 set {killing2} to false
    47.         if {killing} is true:
    48.             if {killing2} is true:
    49.                 stop
    50.             if {killing2} is false:
    51.                 stop
    52.         if {killing} is false:
    53.             if {killing2} is true:
    54.                 stop
    55.             if {killing2} is false:
    56.                 cancel event
    57.  
    58.        
     
    • Like Like x 1
    • Useful Useful x 1
  3. FistoF

    FistoF Active Member

    Joined:
    Feb 11, 2017
    Messages:
    53
    Likes Received:
    0
    More features to be added:
    • There can be multiple squad shields at the same time
    • The squad shield also protects vehicles
    • The bubble and the brewing stand gets destroyed (drops as an item) after the squad shield has blocked a certain amount of damage
    • The squad shield has a cooldown before it can be reused.
     
    #3 FistoF, Apr 6, 2021
    Last edited: Apr 15, 2021
  4. Shadow501pl

    Shadow501pl Active Member

    Joined:
    Dec 19, 2020
    Messages:
    62
    Likes Received:
    2
    I don't think it's that hard to add _ to every variable so that multiple will work and damage can be added with a variable
     

Share This Page

Loading...