Solved Prison Bombs

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

Mattllama987

Supporter
Aug 5, 2018
225
7
18
Hello, I have a small issue. I have a prison server, and im making bombs. When you throw one at the ground, it will explode. I want it to give the player the blocks that the explosion created, but im not sure how? I don't want to loop the blocks around the explosion. The reason why, is because I did the loop, and when the bomb hit ANY block it would give it to the player. It gave bedrock..... I don't want that. Is there any other way I can make this happen? Here is what I have now for the bombs.

Thanks!


code_language.skript:
on projectile hit:
    if name of shooter's tool contains "&c&lBomb LvL: &c1":
        if "%region at event-location%" contains "spawn" or "sword":
            delete projectile
            wait 1 tick
            create safe explosion of force 1 at location
on right click:
    if player's held item is fire charge of unbreaking 10 named "&c&lBomb LvL: &c3" with lore "&6&m--------------------||&7Right click to throw the bomb!||&6&m--------------------":
        cancel event
        if "%region at player%" contains "pvpmine":
            shoot a small fire ball  from player at speed 0.075
            remove 1 fire charge of unbreaking 10 named "&c&lBomb LvL: &c3" with lore "&6&m--------------------||&7Right click to throw the bomb!||&6&m--------------------" from player
        else:
            cancel event
on projectile hit:
    if shooter's held item is fire charge of unbreaking 10 named "&c&lBomb LvL: &c3" with lore "&6&m--------------------||&7Right click to throw the bomb!||&6&m--------------------":
        if projectile is a small fire ball:
            create an explosion of force 4 at the location
on right click:
    if player's held item is fire charge of unbreaking 10 named "&c&lBomb LvL: &c2" with lore "&6&m--------------------||&7Right click to throw the bomb!||&6&m--------------------":
        cancel event
        if "%region at player%" contains "pvpmine":
            shoot a small fire ball  from player at speed 0.075
            remove 1 fire charge of unbreaking 10 named "&c&lBomb LvL: &c2" with lore "&6&m--------------------||&7Right click to throw the bomb!||&6&m--------------------" from player
        else:
            cancel event
on projectile hit:
    if shooter's held item is fire charge of unbreaking 10 named "&c&lBomb LvL: &c2" with lore "&6&m--------------------||&7Right click to throw the bomb!||&6&m--------------------":
        if projectile is a small fire ball:
            create an explosion of force 3 at the location
on right click:
    if player's held item is fire charge of unbreaking 10 named "&c&lBomb LvL: &c1" with lore "&6&m--------------------||&7Right click to throw the bomb!||&6&m--------------------":
        cancel event
        if "%region at player%" contains "pvpmine":
            shoot a small fire ball  from player at speed 0.075
            remove 1 fire charge of unbreaking 10 named "&c&lBomb LvL: &c1" with lore "&6&m--------------------||&7Right click to throw the bomb!||&6&m--------------------" from player
        else:
            cancel event
on projectile hit:
    if shooter's held item is fire charge of unbreaking 10 named "&c&lBomb LvL: &c1" with lore "&6&m--------------------||&7Right click to throw the bomb!||&6&m--------------------":
        if projectile is a small fire ball:
            create an explosion of force 2 at the location
command /bomb <player> <text>:
    permission: bomb.*
    trigger:
        if arg-2 is "1":
            give player a fire charge of unbreaking 10 named "&c&lBomb LvL: &c1" with lore "&6&m--------------------||&7Right click to throw the bomb!||&6&m--------------------"
        if arg-2 is "2":
            give player a fire charge of unbreaking 10 named "&c&lBomb LvL: &c2" with lore "&6&m--------------------||&7Right click to throw the bomb!||&6&m--------------------"
        if arg-2 is "3":
            give player a fire charge of unbreaking 10 named "&c&lBomb LvL: &c3" with lore "&6&m--------------------||&7Right click to throw the bomb!||&6&m--------------------"
on right click:
    player is holding a fire charge:
        make the player shoot a enderdragon at speed 5
 
Status
Not open for further replies.