Basic Examples

This page contains examples for different ways you can utilize some of the parameters of OtherDrops. For more detailed information about the parameters being used please take a look at the Parameters page.


Useful Snowballs

In this example we will take a look at the potioneffect and damage parameters and turn snowballs into a useful weapons against mobs.

    ANY_CREATURE:
        - action: HIT
          tool: PROJECTILE_SNOW_BALL
          potioneffect.victim: SLOW@100@2

This is really straightforward, in this example we are targeting all mobs(ANY_CREATURE) when a mob is hit by a THROWN snowball(it is important that you use PROJECTILE_SNOW_BALL and not SNOW_BALL) they are afflicted with the SLOW potion effect for 5 seconds(100 ticks). Now, lets add a damage value to it so it can actually hurt mobs.

    ANY_CREATURE:
        - action: HIT
          tool: PROJECTILE_SNOW_BALL
          potioneffect.victim: SLOW@100@2
          damage.victim: 2

Now, these examples excludes PLAYERS, I did this because the damage parameter doesn't take a players armor into consideration and will do damage regardless of it which can lead to a lot of players complaining. You can choose to add it to players if you want, you can also add this to individual mobs instead of using ANY_CREATURE which would have the added benefit of being able to set different damage values per mob(make nether creatures take extra damage for example.).


Nether-warts Bonemeal Growth

Lets start off with something fairly simple, we are going to make it so bonemeal can affect the growth of nether warts.

    NETHER_WARTS@0:
        - action: RIGHT_CLICK
          tool: INK_SACK@15
          consumetool: 1
          replaceblock: NETHER_WARTS@3

Alright, so the block we are changing is NETHER_WARTS, notice the @0 on it, that is telling OtherDrops that we want to modify freshly planted nether warts(growth stage 0). We set the action trigger to RIGHT_CLICK, and, the tool to INK_SACK@15(Bonemeal). The consumetool parameter is set to 1 so each time you grow a nether wart it consumes one bonemeal. The replaceblock parameter is used to change the freshly planted nether wart to its fully grown, harvest-able state.

Now that we have it set up, lets make it so you can apply bonemeal to all stages of nether wart. Same way as before, just change the block-type from NETHER_WART@0 to @1 and @2. Like this:

    NETHER_WARTS@0:
        - action: RIGHT_CLICK
          tool: INK_SACK@15
          consumetool: 1
          replaceblock: NETHER_WARTS@3
    NETHER_WARTS@1:
        - action: RIGHT_CLICK
          tool: INK_SACK@15
          consumetool: 1
          replaceblock: NETHER_WARTS@3
    NETHER_WARTS@2:
        - action: RIGHT_CLICK
          tool: INK_SACK@15
          consumetool: 1
          replaceblock: NETHER_WARTS@3

And there you have it. Bonemeal can instantly grow nether warts.


Enchantment Enhancer

This next one is really simple too. We are going to give the Looting enchantment the extra effect of giving players money when they kill a mob with a sword that has the enchantment.

    ZOMBIE:
        - tool: DIAMOND_SWORD@!LOOT_BONUS_MOBS#1
          drop: MONEY
          chance: 25
          quantity: 5-10
        - tool: DIAMOND_SWORD@!LOOT_BONUS_MOBS#2
          drop: MONEY
          chance: 30
          quantity: 10-15
        - tool: DIAMOND_SWORD@!LOOT_BONUS_MOBS#3
          drop: MONEY
          chance: 35
          quantity: 15-20

In this example we have extended the function of the looting enchantment to make it cause mobs to drop money(assuming you have an economy plugin). Each level of looting gives a different amount of money and has a slightly higher chance of dropping money.


Grass Seeds

In this next example we will make use of the recently added lorename condition to create a new type of seed that turns dirt into grass when applied to it.

    DIRT:
        - action: RIGHT_CLICK
          tool: SEEDS@2
          consumetool: 1
          lorename: '&rGrass Seeds'
          replacementblock: 2

Alright, as you can see the block we are affecting this time is dirt, this setup will make it so right clicking dirt while holding SEEDS with a data value of TWO that have been renamed to "Grass Seeds" either by this plugin or another plugin will turn the dirt block into a grass block.


Special Mobs

In this example we are going to use the recently added features of the MOBSPAWN action and the ability to spawn mobs with equipment. The following example will create a skeleton that appears as a floating pumpkin head carrying a golden hoe(scythe) I call them Reapers. This same example can be used to naturally spawn Giants, Baby Zombies, Witches, Charged Creepers or any other mob that you want. Just adjust the parameters to match the mob.

    SKELETON:
        - action: MOBSPAWN
          drop: SKELETON@eq:head:PUMPKIN%0!!eq:hands:GOLDEN_HOE%0
          potioneffect.drop: INVISIBILITY@20000@1
          chance: 10
          biome: [PLAINS, FOREST]
          flag: UNIQUE

Alright, so, the MOBSPAWN action triggers when a mob spawns(in this case when skeletons spawn) in this example I have also added the chance parameter so instead of replacing every skeleton that spawns it will only replace 10% of them, in addition the biome parameter is present so only skeletons that spawn in a plains biome or a forest biome will have a chance of spawning a Reaper. The potioneffect.drop parameter is used to apply the invisibility potion effect to the Reaper as soon as it spawns, I use a really high duration to make sure it stays invisible for a long time.

The %0 after the pumpkin and after the golden hoe is the equipment "drop chance" and 0% means it wont drop the equipment when killed.

Super Creeper

Like the previous example we will be spawning a special mob using the MOBSPAWN action. This time, we will be spawning Charged Creepers that have a speed boost. For those server owners who have an evil streak in them.

    CREEPER:
        - action: MOBSPAWN
          drop: CREEPER@POWERED
          chance: 10
          weather: STORM
          potioneffect.drop: SPEED@12000@2
          flag: UNIQUE

So, this example is much simpler, all we are doing here is making it so 10% of creeper spawns will become a charged creeper with a speed boost during a storm. I don't recommend doing this unless you want to hear your chat filled with death messages. ;)


Elemental Dragons

In this final example we are going to be truly evil and give Ender Dragons some new powers by using the newly added HIT action.

    PLAYER:
        - action: HIT
          tool: ENDER_DRAGON
          damage.victim: [LIGHTNING]
          message.victim: "&aThe dragon strikes you with a bolt of lightning!"
          chance: 5
          exclusive: 1
        - action: HIT
          tool: ENDER_DRAGON
          damage.victim: [FIRE@400]
          message.victim: "&aThe dragon hits you with its fire breath!"
          chance: 5
          exclusive: 1
        - action: HIT
          tool: ENDER_DRAGON
          damage.victim: [FIRE@200]
          event: EXPLOSION
          message.victim: "&aThe dragon hits you with an exploding fireball!"
          chance: 5
          exclusive: 1
        - action: HIT
          tool: ENDER_DRAGON
          potioneffect.victim: POISON@200@2
          message.victim: "&aThe dragon bites you with its poisonous fangs!"
          chance: 5
          exclusive: 1

This is all pretty straight-forward stuff so I won't go into too much detail, basically this is giving the dragon a chance to use one of these different attacks each time it hits a player. The exclusive parameter is present so multiple attacks can't trigger at the same time(would likely result in instant death) as you can see we are taking advantage of many different parameters including: potioneffect, damage, and, effect in order to create these attacks. The chance is kept low in these examples because an ender dragon usually scores multiple hits if it connects.


Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes