Naturally spawning giant slimes(configurable spawnrate)

Discussion in 'Archived: Plugin Requests' started by ogedi, Sep 10, 2012.

  1. Offline

    ogedi

    Hello, I am owner of the large roleplay server Heroes of Galderon! We strive to bring a new experience to the world of Galderon by adding unheard of elements to the game! After having custom giants and dragons, we are implementing custom slimes as well! However as I have never done anything like this before, I will turn to the bukkit community for help!

    Basically slimes and magmacubes are hard programmed from sizes 1-256. sizes 2-4-6 spawn naturally. What i need is a plugin that will allow me to set the spawn rate for sizes from 1-50. They should also spawn in the normal world, at any y cordinate (like normal mobs).

    Id prefer if this plugin was private :)
     
  2. Offline

    RingOfStorms

    Format ;) much better chances for a private plugin if you format...
     
  3. Offline

    np98765

    Magma cubes and slimes will get messed up and glitchy if you spawn them at size 50. They'll start disappearing and doing all kind of crazy stuff.

    I'd recommend going from 1-40 -- From my testing, at least.
     
  4. Offline

    Vandrake

    np98765 I hope I'm not going over the line here but could you show me a little of the code about the slimes? :3 I wanna learn.If you can't just say so I'll understand no questions asked
     
  5. Offline

    np98765

    /me shrugs

    I've never tried working with slimes. I only know that information because of the /spawnmob command. ^_^
     
    izak12345678910 likes this.
  6. Offline

    WarmakerT

  7. Offline

    JayzaSapphire

    Example :3
    Code:
    @EventHandler
    public void onEntityDamage(EntityDamageEvent event) {
    Entity ent = event.getEntity();
     
    if (ent instanceof Slime) {
    Slime slime = (Slime)ent;
     
    Random r = new Random();
    int size = r.nextInt(32) + 1;
     
    slime.setSize(size);
    }
    }
    
     
  8. Offline

    Vandrake

    JayzaSapphire I am looking through your code and million ideas poppingĀ« up xD i was wondering if i could use this code another evente for example mobspawnevent?and set the size of newly born slimes o.o?
     
  9. Offline

    JayzaSapphire

    Probably any event you want, can be done by command aswell.
     
    Vandrake likes this.
  10. Offline

    raXas

    I could also use a plugin like this. I am putting together an rpg based server, and I was looking for a plugin that does exactly this, but I couldn't find one
     
  11. Offline

    Zarius

    OtherDrops can do this by replacing any other natural spawn at a certain percentage rate, eg:

    Code:
      SLIME:  # for any slime
        - action: MOBSPAWN  # on the spawning of the mob
          chance: 10%  # with a 10% chance
          drop: SLIME@HUGE  # replace with a giant slime
    
    You could also use the data value, eg. SLIME@4 or even bigger, SLIME@32 (don't go too big, they get glitchy).
     
  12. Offline

    raXas

    the thing is with this code, whenever you kill a huge slime, it will split, and other drops might spawn another huge slime because of it. I tried out the code, and thats what happened
     
  13. Offline

    Zarius

    raXas

    Good point - I'll think about whether to ignore the slimesplit event however the following should work:

    PHP:
      SLIME:  # for any slime
        
    actionMOBSPAWN  # on the spawning of the mob
          
    chance10%  # with a 10% chance
          
    dropSLIME@HUGE  # replace with a giant slime
          
    spawnedbyNATURAL  # work for natural spawns only, not slime split
     
  14. Offline

    raXas

  15. Offline

    Zarius

    raXas Doesn't work as in no huge slimes spawn any more or they still spawn with slimesplitevent? I'll test it out later when I'm at my computer.
     
  16. Offline

    sehrgut42

    Zarius: I'd love to see SLIMESPLIT as a separate cause in OtherDrops. I use OD on my private server, and it lets me completely alter the game mechanics. SLIMESPLIT@SIZE would be great too, because I could stack likelihood of spawning different things from different sizes.
     
  17. Offline

    Zarius

    sehrgut42 Yeah, I've been thinking about adding this trigger (was initially hesitant to add too many triggers - but this should be easy enough to add). When I do it'll automatically support different sizes :)
     
  18. Offline

    sehrgut42

    Sweet! I can't wait . . . I can't tell you how many individual plugins OD has replaced for me . . .
     
  19. Offline

    raXas

    Zarius They still spawn at the slimesplitevent
     
  20. Offline

    Zarius

    raXas That last config I posted (will repost below) works fine for me - perhaps try it using the latest dev build of OtherDrops?

    PHP:
      SLIME:  # for any slime
        
    actionMOBSPAWN  # on the spawning of the mob
          
    chance100%  # with a 10% chance
          
    dropSLIME@2  # replace with a giant slime
          
    spawnedbyNATURAL  # work for natural spawns only, not slime split
     
  21. Offline

    raXas

    Zarius I did this:
    Code:
    SLIME:
      - action: MOBSPAWN
      - chance: 10%
      - drop: SLIME@32
      - spawnedby: NATURAL 
     
  22. Offline

    Zarius

    Too many dashes!! :\ That really just means that slimes will drop slimes. Each dash starts a new drop section... eg:

    PHP:
      SLIME:
        - 
    dropegg
     
        
    actionMOBSPAWN
          drop
    SLIME@32  # replace with large slime
          
    spawnedbyNATURAL
     
        
    actionHIT  # when you hit the slime
          
    dropdirt
     
        
    actionRIGHTCLICK  # if you rightclick the mob
          
    dropGRASS
     
  23. Offline

    raXas

  24. Offline

    Zarius

    raXas No probs :) Is it working ok now?
     
  25. Offline

    raXas

    Zarius No, it still doesn't work. It happens a lot less, but it still happens
     

Share This Page