Date: 2015/01/19 16:47:26 UTC-08: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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
"Kurisok":
type: assignment
interact scripts:
- 1 Boss
default constants:
WarningRange: 35
WarningMessage: "Any closer and I will kill you."
Health: 100
MeleeEquipment: Diamond_Sword
RangeEquipment: book
Helmet: 310
ChestPlate: 311
Leggins: 312
Boots: 313
Retaliate: true
Strength: 4
Armor: 8
MeleeRange: 3
RangeAttackRange: 15
AttackSpeed: 1
Speed: 1
RegenRate: 1
Respawn: 120
Nightvision: 5
Drop Loot on Death: "Yes"
Loot Quantity: 1
Loot Distribution: player
actions:
on assignment:
- ^execute as_npc "npc select <npc.id>"
- ^execute as_npc "Trait Sentry"
- trigger name:chat toggle:true
- trigger name:click toggle:true
- trigger name:damage toggle:true
- trigger name:proximity toggle:true radius:<cons:MeleeRange>
- execute as_npc "sentry Health <cons:Health>"
- execute as_npc "sentry Armor <cons:Armor>"
- execute as_npc "sentry Strength <cons:Strength>"
- execute as_npc "sentry Range <cons:RangeAttackRange>"
- execute as_npc "sentry Speed <cons:Speed>"
- execute as_npc "sentry Attackrate <cons:AttackSpeed>"
- execute as_npc "sentry HealRate <cons:RegenRate>"
- execute as_npc "sentry Nightvision <cons:Nightvision>"
- execute as_npc "sentry Respawn <cons:Respawn>"
- execute as_npc "sentry equip <cons:Helmet>"
- execute as_npc "sentry equip <cons:Leggins>"
- execute as_npc "sentry equip <cons:ChestPlate>"
- execute as_npc "sentry equip <cons:Boots>"
- execute as_npc "sentry retaliate <cons:Retaliate>"
- execute as_npc "sentry Warning <cons:WarningMessage>"
- execute as_npc "sentry target add entity:player"
- execute as_npc "npc vulnerable"
- execute as_npc "sentry invincible false"
on death:
- chat "Arrgghhh!"
- flag npc in_pursuit:!
- if "<cons:Drop Loot on Death>" == "Yes" run "BossName Drop the Loot" instantly
on enter proximity:
- lookclose toggle:true
- if <flag.npc[inpursuit]> queue clear
- flag npc in_pursuit:true
- attack
"Kurisok Drop the Loot":
type: task
script:
- if "<cons:Loot Distribution>" == "player" {
- flag <npc> Looter:%value%
- repeat "<cons:Loot Quantity>" {
- give to:<player[<npc.flag[looter]>].inventory> "i@<proc:Kurisok Determine Loot>"
}
}
}
"Kurisok Determine Loot":
type: procedure
script:
- define roll <util.random.int[1].to[100]>
- if %roll% >= 0 && %roll% < 40 define quality "Common"
else if %roll% >= 40 && %roll% < 70 define quality "Uncommon"
else if %roll% >= 70 && %roll% < 85 define quality "Rare"
else if %roll% >= 85 && %roll% < 95 define quality "Epic"
else if %roll% >= 95 define quality "Legendary"
- if %quality% == Common random 1{
- determine "Kurisok Bow" }
else if %quality% == Uncommon random 1{
- determine "Kurisok Bow" }
else if %quality% == Rare random {
- determine "Kurisok Bow" }
else if %quality% == Epic random 3{
- determine "Kurisok Bow" }
else if %quality% == Legendary random 5{
- determine "Kurisok Bow" }
"Kurisok Bow":
type: item
material: bow
display name: "Kurisok's Bow"
lore:
- Coated arrow tips set alight even
- with the slightest wind friction.
- Epic Item
enchantments:
- arrow_fire:2
- damage_all:5
- durability:3
on exit proximity:
- if !<flag.npc[in_pursuit]> queue clear
- lookclose toggle:false
on despawn:
- flag npc in_pursuit:!
on spawn:
- announce "<&4><npc.name.nickname> has respawned."
- execute as_npc "sentry Health <cons:Health>"
'Boss':
type: interact
steps:
'1':
proximity trigger:
entry:
script:
- ^Execute as_npc "Sentry equip <Cons:MeleeEquipment>"
- run Cast delay:<cons:SpellTimeOut>
- attack
#If player is out of range the Boss will switch to a ranged weapon specified above to start attacking
exit:
script:
- ^Execute as_npc "Sentry equip <Cons:RangeEquipment>"
#If you add more spells please make sure to edit the 7 to the new count.
'Cast':
type: task
script:
- run Spell "context:<util.random.int[1].to[7]>"
'Spell':
type: task
context: id
script:
- narrate "<&c><npc.name.nickname> has casted <cons:spell<context.id>> on you."
- cast <cons:spell<context.id>> duration:<cons:Spell<context.id>Duration> Power:<cons:Spell<context.id>Power>