Date: 2017/08/19 11:09:08 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
PETS:
type: world
events:
on player right clicks entity:
- choose <context.entity.entity_type>:
- case POLAR_BEAR:
- if <player.item_in_hand> == i@raw_fish[quantity=64] {
- if !<player.has_flag[pets.current_pet]> {
- narrate "THIS IS A BEAR"
- take i@raw_fish quantity:64
- playeffect <context.entity.location> effect:HEART visibility:500 quantity:10 offset:2
- flag player pets.current_pet:<context.entity.uuid>
}
else {
- narrate "<&7>[<&b>Pets<&7>] <&c>You already have a pet!"
}
}
- case WOLF:
- if <player.item_in_hand> == i@bone[quantity=16] {
- if !<player.has_flag[pets.current_pet]> {
- narrate "THIS IS A WOLF"
- take i@bone quantity:16
- playeffect <context.entity.location> effect:HEART visibility:500 quantity:10 offset:2.0
- flag player pets.current_pet:<context.entity.uuid>
}
else {
- narrate "<&7>[<&b>Pets<&7>] <&c>You already have a pet!"
}
}
- case OCELOT:
- if <player.item_in_hand> == i@raw_fish[quantity=16] {
- if !<player.has_flag[pets.current_pet]> {
- narrate "THIS IS A CAT"
- take i@raw_fish quantity:16
- playeffect <context.entity.location> effect:HEART visibility:500 quantity:10 offset:2.0
- flag player pets.current_pet:<context.entity.uuid>
}
else {
- narrate "<&7>[<&b>Pets<&7>] <&c>You already have a pet!"
}
}
PETS_ABILITIES:
type: world
events:
on player chats:
- if <player.has_tag[pets.current_pet]> {
- if <li@call|whistle|whistles|*whistles*.contains[<context.message>]> {
- run 'PETS_CALL'
}
- if <li@call|go|*points*.contains[<context.message>]> {
- run 'PETS_GOTO'
}
- if <li@call|attack|harm|attack <server.list_online_players>|get <server.list_online_players>.contains[<context.message>]> {
- run 'PETS_ATTACK'
}
- if <li@call|defend|protect.contains[<context.message>]> {
- run 'PETS_DEFEND'
}
- if <li@call|get|retrieve|fetch.contains[<context.message>]> {
- run 'PETS_RETRIEVE'
}
}
PETS_ATTACK_OVERRIDE:
type: world
events:
on entity damages entity:
- choose <context.entity>
- case !player {
- if <player.has_flag[pets.current_pet]> {
- attack <player.flag[pets.current_pet]> target:<context.entity>
}
}
- case player {
- if <player.has_flag[pets.current_pet]> {
- attack <player.flag[pets.current_pet]> target:<context.damager>
}
}
PETS_CALL:
type: task
script:
- define pet <player.flag[pets.current_pet_UUID]||null>
- if <player.location.distance[<def[value]>.location]> < 201 {
- walk <def[value]> <player.location>
}
else {
- teleport <def[value]> <player.location>
- playeffect <def[value].location> effect:CLOUD visibility:500 quantity:40 offset:0.5
}
PETS_ATTACK:
# CHECKER:
# type: world
# events:
# on player steers entity:
# - narrate <context.entity>
# - narrate <context.sideways>
# - narrate <context.forward>
# - narrate <context.jump>
# - narrate <context.dismount>
#Anyone aware of a way to adjust the durability of an item in hand?
#NEW MESSAGES
#Mergu - Today at 12:56 AM
#@Kaiyoko use <context.forward> to move the entity towards the player's direction
#suspic - Today at 12:57 AM
#- adjust <player.item_in_hand> durability:# save:result
#- inventory set o:<entry[result].result> d:<player.inventory> slot:<player.item_in_hand.slot>
#more like if <entity.flag[owner].is[==].to[<player.uuid>]>
#STEAL AN EGG FROM DRAGONS TO TAME