Paste #37544: Edit of P#37543 - Untitled Paste

Date: 2016/11/11 13:50:07 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


# TODO: Event drop on mob being killed

# Use this task to spawn a custom mob from the config
MobSystem_SpawnMob:
  type: task
  definitions: mob|location
  script:
  - define type <s@MobSystem_config[config.mobs.<def[mob]>.MobType]||PIG>
  - define name <s@MobSystem_config[config.mobs.<def[mob]>.Display]||NoNameGiven>
  - define health <s@MobSystem_config[config.mobs.<def[mob]>.Health]||20>
  - define speed <s@MobSystem_config[config.mobs.<def[mob]>.MovementSpeed]||0.3>
  - spawn <def[type]>[display_name=<def[name]>;max_health=<def[health]>;health=<def[health]>;speed=<def[speed]>] <def[location]>

MobSystem_config:
  type: yaml data
  config:
    mobs:
      Zombie:
        # Mob type is required.
        # Check https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
        # Or for a quick list: 
        # BLAZE, CAVE_SPIDER, CREEPER, ENDERMAN, GHAST, GIANT, GUARDIAN, PIG_ZOMBIE, SLIME, SILVERFISH, SKELETON, SPIDER, WITCH, WOLF, ZOMBIE
        MobType: ZOMBIE
        Health: 100
        # TODO
        # Damage: 10
        MovementSpeed: 0.3
        # TODO <mob.level>
        Display: 'Zombie'
        # Display: '&5Zombie Lvl - <mob.level>'
        # TODO
        # Drops:
         #- GOLD_NUGGET 1 1
        # TODO
        # DropsPerLevel:
        # - GOLD_NUGGET 1 0.5
        # TODO
        # LevelModifiers:
        #   Health: 5
        #   Damage: 0.5