Paste #35073: Untitled Paste

Date: 2016/07/27 19:39:47 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


#####################
# default wolf
#####################
dpets_wolf:
  type: yaml data
  is_dpet: true
  pet_id: wolf
  name: Wolf
  entity: e@wolf
  item_icon: i@bone
  actions:
    on spawn:
    - narrate "Woof woof!" format:dpets_format2
    - repeat 2:
      - playsound sound:ENTITY_WOLF_AMBIENT <def[pet].location>
      - wait 5t
    on left click:
    - playsound sound:ENTITY_WOLF_pant <def[pet].location>
    - playeffect effect:heart <def[pet].location> qty:5 offset:0.5 visibility:50
    on right click:
    - playsound sound:ENTITY_WOLF_AMBIENT <def[pet].location>
    - playeffect effect:heart <def[pet].location> qty:5 offset:0.5 visibility:50
    on call:
    - adjust <def[pet]> sitting:false
    - narrate "Woof!" format:dpets_format2
    - playsound sound:ENTITY_WOLF_AMBIENT <def[pet].location>
  abilities:
    growl:
      item_icon: i@bone
      name: Growl
      script:
      - narrate "Grrrrr!" format:dpets_format2
      - playsound sound:ENTITY_WOLF_growl <def[pet].location>
      - playeffect effect:MOBSPAWNER_FLAMES <def[pet].location> qty:5 offset:0.5 visibility:50
    fetch:
      item_icon: i@snow_ball
      name: Fetch
      script:
      - adjust <def[pet]> sitting:false
      - shoot e@snowball save:ball
      - define ball <entry[ball].shot_entities.get[1]>
      - playsound sound:ENTITY_WOLF_AMBIENT <def[pet].location>
      - while <def[ball].is_spawned||false>:
        - define location <def[ball].location>
        - wait 5t
      - repeat 2:
        - playsound sound:ENTITY_WOLF_AMBIENT <def[pet].location>
        - wait 5t
      - define location <def[location].find.surface_blocks.within[5].sort_by_number[distance_squared].get[1].above||<def[location]>>
      - while <def[pet].location.distance_squared[<def[location]>].is[more].than[10]||true>:
        - walk <def[pet]> <def[location]> auto_range speed:1.5
        - wait 1s
        - if <def[loop_index]> > 25 {
          - while stop
          }
      - wait 10t
      - walk <def[pet]> <player.location> auto_range speed:1.5
      - wait 3s
    shake:
      item_icon: i@water_bucket
      name: Shake
      script:
      - playsound sound:ENTITY_WOLF_SHAKE <def[pet].location>
      - animate <def[pet]> animation:wolf_shake
      - wait 1s
      - repeat 2:
        - playsound sound:ENTITY_WOLF_ambient <def[pet].location>
        - wait 5t
    sit:
      item_icon: i@bed
      name: Sit
      script:
      - adjust <def[pet]> sitting:true
      - repeat 2:
        - playsound sound:ENTITY_WOLF_ambient <def[pet].location>
        - wait 5t
    stand:
      item_icon: i@bed
      name: Stand
      script:
      - adjust <def[pet]> sitting:false
      - repeat 2:
        - playsound sound:ENTITY_WOLF_ambient <def[pet].location>
        - wait 5t
    dig:
      item_icon: i@wood_spade
      name: Dig
      script:
      - repeat 2:
        - playsound sound:ENTITY_WOLF_ambient <def[pet].location>
        - wait 5t
      - define location <def[pet].location.add[<def[pet].location.direction.vector>].sub[0,1.1,0]>
      - repeat 20:
        - playsound sound:BLOCK_grass_HIT <def[location]>
        - playsound sound:BLOCK_sand_HIT <def[location]> pitch:0.5
        - playeffect effect:blockcrack_2 qty:15 visibility:40 offset:0.1 <def[location]>
        - wait 2t
      - displayitem <li@i@bone|i@snow_ball|i@slime_ball|i@skeleton_skull|i@leather_boots.random> <def[location]> duration:5s