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.

Custom Spawners

Discussion in 'Skript' started by Rebel100, Dec 12, 2020.

Tags:
Thread Status:
Not open for further replies.
  1. Rebel100

    Rebel100 Member

    Joined:
    Sep 17, 2020
    Messages:
    12
    Likes Received:
    0
    I want to make a plugin that loops the blocks around a player and has a very small chance of them becoming spawners. I am having 2 issues one whenever I do this it uses the default spawners which is pig and I was wondering how to make that something else and I want it to only loop blocks that are not already spawners.

    Skript Version: 2.5.3

    Code:
    command /spawner:
    trigger:
    loop all blocks in radius 50 around players:
    if loop block is not spawner:
    chance of 0.0051%:
    set loop-block to zombie spawner

    Errors: It says that it can't compare loop block with an item type and zombie spawner doesn't work saying that it is also an item type
     
  2. Dogloverblue17

    Joined:
    Sep 2, 2020
    Messages:
    28
    Likes Received:
    1
    Well, ¨Zombi Spawner¨ isnt an item, you just need to add NBT, Like This
    Code (Text):
    1. command /spawner:
    2.   trigger:
    3.     loop all blocks in radius 50 around players:
    4.       if loop block is not spawner:
    5.         chance of 0.0051%:
    6.         set loop-block to spawner with nbt ¨{SpawnData:{id:"minecraft:zombie"}}¨
     
  3. Rebel100

    Rebel100 Member

    Joined:
    Sep 17, 2020
    Messages:
    12
    Likes Received:
    0
    Thanks for the help but this still does not work it says that spawner with nbt ¨{SpawnData:{id:"minecraft:zombie"}}¨ is neither an item type or a block data. Any idea on how to fix this?
     
  4. Dogloverblue17

    Joined:
    Sep 2, 2020
    Messages:
    28
    Likes Received:
    1
    hmm, thats weird, it might be different wording for the NBT, becuase i use Skbee, for NBT. im Sorry :emoji_frowning:
     
  5. Rebel100

    Rebel100 Member

    Joined:
    Sep 17, 2020
    Messages:
    12
    Likes Received:
    0
    That's okay. Thanks for trying to help!
     
Thread Status:
Not open for further replies.

Share This Page

Loading...