Date: 2016/07/27 19:39:47 UTC-07:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#####################
# 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