Paste #46625: Untitled Paste

Date: 2018/02/09 07:02:37 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


##############################
##      dMobs Command       ##
##############################
dMobs_COMMAND:
    type: command
    name: mob
    script:
    - choose "<context.agrs.get[1]>":
        - case "help"
            - narrate "<&4><&l>[<&6>dMobs<&4><&l>]"
            - narrate "<&4>'/mob help' <&6>Shows this page."
            - narrate "<&4>'/mob examples' <&6>Shows examples on how the commands"
            - narrate "<&6>can be used."
            - narrate "<&4>'/mob add <type> <mob name>' <&6>Add a spawn chunk to a mob."
            - narrate "<&4>'/mob remove <type> <mob name>' <&6>Remove a spawn chunk from a mob."

        - case "examples":
            - narrate "<&4><&l>[<&6>dMobs<&4><&l>]"
            - narrate "<&4>'/mob help'"
            - narrate "<&4>'/mob examples'"
            - narrate "<&4>'/mob add PassiveMobs YAK'"
            - narrate "<&4>'/mob remove AggressiveMobs POLAR_BEAR'"
        - case "add":
            - yaml "load:/dMobs/dMobs.yml" id:dMobs
            - yaml id:dMobs set <context.args.get[2]>.<player.location.chunk>:<context.args.get[3]>
            - yaml "savefile:/dMobs/dMobs.yml" id:dMobs
            - narrate "<&4><&l>[<&6>dMobs<&4><&l>] <&6>This chunk has been added to <context.args.get[3]>."

        - case "remove":
            - yaml "load:/dMobs/dMobs.yml" id:dMobs
            - yaml id:dMobs set <context.args.get[2]>.<player.location.chunk>:!
            - yaml "savefile:/dMobs/dMobs.yml" id:dMobs
            - narrate "<&4><&l>[<&6>dMobs<&4><&l>] <&6>This chunk has been removed from <context.args.get[3]>."
        - default:
            - narrate "<&c>There is no such command in dMobs."

dMobs_SPAWN:
    type: world
    events:
        on player steps on block:
        - if <

############################
##       dMobs Mobs       ##
############################

#Water Tribe
#*Buffalo Yak, cattle and wild
#*Polar Bear
#*Wolf
#*Whale
#*Turtle-Seal
#*Caribou-bear
YAK:
    type: entity
    entity_type: e@sheep
    has_ai: true
    fire_time: 2s
    can_breed: false
    remaining_air: 10
    remove_when_far_away: true
    age: adult
    color: BROWN_SHEEP
    max_health: 12
    inventory_contents: i@BUFFALO_YAK_HIDE|i@BUFFALO_YAK_WOOL

POLAR_BEAR:
    type: entity
    entity_type: e@polar_bear
    has_ai: true
    fire_time: 2s
    remaining_air: 20
    remove_when_far_away: true
    age: adult
    max_health: 16
    inventory_contents: i@POLAR_BEAR_BONE