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

FistoF

Active Member
Feb 11, 2017
53
0
6
www.planetminecraft.com
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 bubble✅ and 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
 
Last edited:
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/...free-emotes-particles-great-eula-perks.24173/

Code:
# Squad Shield
# Author: LhommeFrancais
# Version: 1.0

# Dependencies: skDragon

options:
    DestroyTime: 30 # This is the amount of time before the Squad Shield breaks in seconds
    ItemName: &5&lShield Emitter&7&o (Place) #-- Name of the Item that you place
    SoundEffect: ZOMBIE_REMEDY #http://docs.codelanx.com/Bukkit/1.8/org/bukkit/Sound.html



# -- Do not edit below line unless you know how to config skript -- #
# ---------------------------------------------------------------------------------------------------- #

on place of a brewing stand:
    if name of tool of player is "{@ItemName}":
        set {active} to true
        play "{@SoundEffect}" to player at volume 1
        send "hi" to player
        set {loc} to location of event-location
        set {loc1} to block above event-location
        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
        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              
        wait {@DestroyTime} seconds
        stopEffect id "shield1.%player%"
        stopEffect id "shield2.%player%"
        set block at {loc} to air
        set {active} to false


on damage:
    set {attacker} to attacker
    set {victim} to victim
    if {active} is true:
        loop players in radius 30 of {loc}:
            if loop-player is attacker:
                set {killing} to false
            if loop-player is victim:
                set {killing2} to true
        loop players in radius 4 of {loc}:
            if loop-player is attacker:
                set {killing} to true
            if loop-player is victim:
                set {killing2} to false
        if {killing} is true:
            if {killing2} is true:
                stop
            if {killing2} is false:
                stop
        if {killing} is false:
            if {killing2} is true:
                stop
            if {killing2} is false:
                cancel event
 
  • Like
Reactions: Georges
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.
 
Last edited:
More features to be added:
  • There can be multiple squad shields at the same time
  • The squad shield also protects mobs and vehicles
  • The bubble and the brewing stand gets destroyed (drops as an item) after the bubble has blocked a certain amount of damage
  • The bubble disappears if someone mines the brewing stand
  • The squad shield has a cooldown before it can be reused.
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