Solved Repeat Loop

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

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

TheBlazeTuber

New Member
Jul 6, 2018
8
0
0
Skript Version: Skript 2.2 bensku-dev36
Skript Author: TheBlazeTuber
Minecraft Version: 1.12.2


code_language.skript:
if player is holding blaze rod named "&4Nether Wand: &5Blaze Aura" with lore "&5Blaze Aura":
        set line 1 of lore of player's tool to "&5Blaze Aura: &4Off"
        stop
if player is holding blaze rod named "&4Nether Wand: &5Blaze Aura" with lore "&5Blaze Aura: &4Off":
        set action bar of player to coloured "&5>>Blaze Aura &2On<<"
        set line 1 of lore of player's tool to "&5Blaze Aura: &2On"
        drawSimpleHalo particle "redstone", center player, id "%player%", rainbowMode true, visibleRange 32
        every 1 tick:
            loop all entities in radius 5 around player:
                if loop-entity is not player:
                    make player damage loop-entity by 2
        stop
 if player is holding blaze rod named "&4Nether Wand: &5Blaze Aura" with lore "&5Blaze Aura: &2On":
        stop all particle effects
        set action bar of player to coloured "&5>>Blaze Aura: &4Off<<"
        wait 4 seconds
        set line 1 of lore of player's tool to "&5Blaze Aura"
        stop
Addons using:
skDragon-0.14.0
Skellett 1.9.6b
sklib 1.1.0
SkQuery 3.6.0-Lime
SkRayFall 1.9.12
SkStuff 1.6.4.1

Problem:

I want to damage all the loop entities in a radius of 5 around the player every time so that if there is one in the way it would get damaged.
 
code_language.skript:
if player is holding blaze rod named "&4Nether Wand: &5Blaze Aura" with lore "&5Blaze Aura":
        set line 1 of lore of player's tool to "&5Blaze Aura: &4Off"
        stop
if player is holding blaze rod named "&4Nether Wand: &5Blaze Aura" with lore "&5Blaze Aura: &4Off":
        set action bar of player to coloured "&5>>Blaze Aura &2On<<"
        set line 1 of lore of player's tool to "&5Blaze Aura: &2On"
        drawSimpleHalo particle "redstone", center player, id "%player%", rainbowMode true, visibleRange 32
        while player is holding blaze rod named "&4Nether Wand: &5Blaze Aura" with lore "&5Blaze Aura: &4Off":
            loop all entities in radius 5 around player:
                loop-entity is not player
                make player damage loop-entity by 2
            wait a tick
 if player is holding blaze rod named "&4Nether Wand: &5Blaze Aura" with lore "&5Blaze Aura: &2On":
        stop all particle effects
        set action bar of player to coloured "&5>>Blaze Aura: &4Off<<"
        wait 4 seconds
        set line 1 of lore of player's tool to "&5Blaze Aura"
        stop
 
  • Like
Reactions: TheBlazeTuber
Status
Not open for further replies.