Date: 2014/07/23 21:28:34 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
BodyguardSpawn:
type: task
debug: true
speed: 0
script:
- ^engage
- ^execute as_op "npc create BodyGuard"
- ^execute as_op "npc select <npc>"
- ^execute as_op "trait sentry"
- ^execute as_op "sentry strength 6"
- ^execute as_op "sentry armor 5"
- ^execute as_op "sentry equip DIAMOND_SWORD"
- ^execute as_op "sentry equip IRON_HELMET"
- ^execute as_op "sentry equip IRON_CHESTPLATE"
- ^execute as_op "sentry equip IRON_LEGGINGS"
- ^execute as_op "sentry equip IRON_BOOTS"
- ^execute as_op "sentry health 20"
- ^execute as_op "sentry invincible false"
- ^execute as_op "sentry respawn 60"
- ^execute as_op "sentry speed 1.2"
- ^execute as_op "sentry follow 4"
- ^execute as_op "npc owner <player.name>"
- ^execute as_op "npc skin knight8"
- ^execute as_op 'npc assign --set "BodyGuardSpawnAssignment"'
- ^execute as_op "sentry guard <player.name>"
- ^disengage
# - trigger name:click state:true
BodyGuardSpawnAssignment:
type: assignment
debug: true
actions:
on player quits:
- remove <npc.id>
on assignment:
- trigger name:proximity state:true radius:10
on click:
- if <npc.owner> != <player> {
- chat "<yellow>I'm sorry <yellow><player.name><green>, but I'm guarding <yellow><npc.owner><green> so I'm not going to take orders from you."
}
else if "<npc.flag[Guarding]>" == "true" {
- random {
- ^chat "<yellow>Oh all right <player.name>, I'll wait back here for you."
- ^chat "<yellow>Don't worry about me, I'll stay back here. Please don't forget about me."
- ^chat "<yellow>I'll wait around for you..but please don't forget about me."
- ^chat "<yellow>You want me to hang back? Ok, no problem."
- ^chat "<yellow>Ok, I'll guard this spot."
- ^chat "<yellow>I'll stand here and wait until you come get me again."
}
- ^execute as_npc "npc sel <npc.id>"
- ^execute as_npc "sentry guard"
- ^flag npc "Guarding:false"
}
else {
- random {
- ^chat "<yellow>Ok, I'm following you."
- ^chat "<yellow>Great <white><player.name><yellow>, I'm right behind you."
- ^chat "<yellow>You lead the way boss."
- ^chat "<yellow>Watching your back. Let's go."
- ^chat "<yellow>Great, let's go for a walk."
- ^chat "<yellow>Hope we're going to crush some zombie skulls. Let's move."
}
- ^execute as_npc "npc sel <npc.id>"
- ^execute as_npc "sentry guard <player.name>"
- ^flag npc "Guarding:true"
}
interact scripts:
- 10 BodyGuardSpawnAssignment1
BodyGuardSpawnAssignment1:
type: interact
debug: true
steps:
1:
proximity trigger:
entry:
script:
- if <player> == <npc.owner> {
- narrate "Hello!"
}