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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Enchant fail

Discussion in 'Skript' started by HedgeCrumbs65, Jan 26, 2023.

  1. HedgeCrumbs65

    HedgeCrumbs65 Member

    Joined:
    Jan 26, 2023
    Messages:
    3
    Likes Received:
    0
    I'm trying to make a custom enchants plugin and I tried to make an enchant that breaks all blocks in a 3x3 radius. It doesn't give me any errors but doesn't do anything. My code's below.

    Code (Text):
    1. on block break:
    2.     if lore of player's held item contains "&8- &eBlast I &8-":
    3.         loop all blocks around player in radius 3:
    4.             if {@cant-break} contains loop-block:
    5.                 send "&cYou can't use Blast on %loop-block%!"
    6.             else:
    7.                 break block at location of loop-block
    The addons I have installed are skRayFall and skUtilities.
     
  2. xdh

    xdh Active Member

    Joined:
    Apr 15, 2020
    Messages:
    78
    Likes Received:
    4
    is the skript detecting the lore? / if someone has that enchantment?
     
  3. HedgeCrumbs65

    HedgeCrumbs65 Member

    Joined:
    Jan 26, 2023
    Messages:
    3
    Likes Received:
    0
    Yeah it's supposed to
     
  4. foxyplush

    foxyplush Member

    Joined:
    Apr 25, 2022
    Messages:
    14
    Likes Received:
    1
    From personal testing, you code seems to work, granted, I have another addon (SkBee) installed.
    I would suggest that you change the initial location of the radius to the broken block (changing "loop all blocks around player in radius 3:" to "loop all blocks around target block in radius 3:").
    I have also seen that this creates a sphere around the location you're looping around instead of a 3x3 area. I'm in the process of modifying your code to adjust to these changes (I did make it a 3x3x3 as that's what most are used for, but if you want me to change it, I will be happy to).

    You could also attempt to implement this yourself, but if you would rather just getting the pre-written code, just reply, Hope this helps!
     
  5. HedgeCrumbs65

    HedgeCrumbs65 Member

    Joined:
    Jan 26, 2023
    Messages:
    3
    Likes Received:
    0

Share This Page

Loading...