Date: 2018/05/16 20:45:56 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
"Super YAML Handler":
type: world
events:
on server start:
- yaml create id:super-counter
on shutdown:
- yaml unload id:super-counter
"Super Reset on Equip":
type: world
events:
on player equips chestplate:
- if <context.armor.contains[SuperIndicatorPhrase]>
{
- yaml id:super-counter set energy.<player.uuid>:0
- yaml id:super-counter set super-ready.<player.uuid>:0
- yaml id:super-counter set super-activated.<player.uuid>:0
- narrate "Super energy reset"
- narrate "Super energy is <yaml[super-counter].read[energy.<player.uuid>]>"
}
"Super Enable on Login":
type: world
events:
on player joins:
- wait 20t
- if <player.equipment.chestplate.contains[SuperIndicatorPhrase]>
{
- wait 100t
- yaml id:super-counter set energy.<player.uuid>:0
- bossbar create super-bar.<player.uuid> players:<player> "title:Super Energy" progress:0 color:BLUE style:SEGMENTED_10
- yaml id:super-counter set super-ready.<player.uuid>:0
- yaml id:super-counter set super-activated.<player.uuid>:0
- narrate "Super energy reset"
- narrate "Super energy is <yaml[super-counter].read[energy.<player.uuid>]>"
}
on player quits:
- if <context.armor.contains[SuperIndicatorPhrase]>
{
- bossbar remove super-bar.<player.uuid>
}
"Damage Super Charge":
type: world
events:
on player damages entity:
- if <context.damager.equipment.chestplate.contains[SuperIndicatorPhrase]>
{
- if <yaml[super-counter].read[energy.<player.uuid>]||0> < 300
{
- narrate "Damage logged as <context.final_damage>"
- narrate "Super energy calculated as <context.final_damage.div[5.0].add[<yaml[super-counter].read[energy.<player.uuid>]||0>]>"
- yaml id:super-counter set energy.<player.uuid>:<context.final_damage.div[5.0].add[<yaml[super-counter].read[energy.<player.uuid>]||0>]>
- narrate "Super energy is <yaml[super-counter].read[energy.<player.uuid>]>"
- narrate "Bossbar updated to <yaml[super-counter].read[energy.<player.uuid>].div[300.0]>"
- bossbar update super-bar.<player.uuid> "title:Super Energy" "progress:<yaml[super-counter].read[energy.<player.uuid>].div[300.0]>"
}
- if <yaml[super-counter].read[energy.<player.uuid>]||0> > 300
{
- yaml id:super-counter set energy.<player.uuid>:300
- bossbar update super-bar.<player.uuid> "title:<yellow>SUPER CHARGED!" progress:1.0 color:YELLOW style:SOLID
- yaml id:super-counter set super-ready.<player.uuid>:1
- yaml id:super-counter set super-activated.<player.uuid>:0
}
- if <yaml[super-counter].read[energy.<player.uuid>]||0> = 300
{
- yaml id:super-counter set energy.<player.uuid>:300
- bossbar update super-bar.<player.uuid> "title:<yellow>SUPER CHARGED!" progress:1.0 color:YELLOW style:SOLID
- yaml id:super-counter set super-ready.<player.uuid>:1
- yaml id:super-counter set super-activated.<player.uuid>:0
}
}
"Super Bossbar":
type: world
events:
on player equips chestplate:
- if <context.armor.contains[SuperIndicatorPhrase]>
{
- bossbar create super-bar.<player.uuid> players:<player.name> "title:Super Energy" progress:0.0 color:BLUE style:SEGMENTED_10
}
on player unequips chestplate:
- if <context.armor.contains[SuperIndicatorPhrase]>
{
- bossbar remove super-bar.<player.uuid> players:<player.name>
}
"Super Charged Condition":
type: world
events:
on mm denizen condition:
- if <context.condition> == "super-charged"
{
- if <yaml[super-counter].read[super-ready.<context.entity.uuid>]||0> < 1
{
- determine false
}
}
"Super Activation Mechanic":
type: world
events:
on mm denizen mechanic:
- narrate "<context.skill>"
- narrate "<context.args>"
- if <context.skill> = "super-activate"
{
- if <yaml[super-counter].read[super-activated.<context.entity.uuid>]> = 0
{
- bossbar update super-bar.<context.entity.uuid> "title:<yellow>SUPER ACTIVE!" progress 1.0 color:YELLOW style:SOLID
- yaml id:super-counter set super-activated.<context.entity.uuid>:1
- if <yaml[super-counter].read[energy.<context.entity.uuid>]> = 0
{
- bossbar update super-bar.<context.entity.uuid> "title:Super Energy" "progress:0.0" color:BLUE style: SEGMENTED_10
- yaml id:super-counter set energy.<player.uuid>:0
- yaml id:super-counter set super-ready.<player.uuid>:0
- yaml id:super-counter set super-activated.<player.uuid>:0
}
- while <yaml[super-counter].read[energy.<context.entity.uuid>]> > 0
{
- bossbar update super-bar.<context.entity.uuid> "title:<yellow>SUPER ACTIVE!" "progress:<yaml[super-counter].read[energy.<player.uuid>].div[300.0]>"
- yaml id:super-counter set energy.<player.uuid>:<yaml[super-counter].read[energy.<player.uuid>].sub[1.0]>
- wait 5t
}
}
}
- if <context.skill> = "super-swing"
{
- yaml id:super-counter set energy.<player.uuid>:<yaml[super-counter].read[energy.<player.uuid>].sub[<context.args>]>
}