Date: 2018/05/16 17:03:43 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
"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]>
{
# - mmcastplayer caster:<player.entity> skill:SuperReset target:<player.entity> repeat:0 delay:0
- yaml id:super-counter set energy.<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
- 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 "YAML super energy below 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[3.0]>"
- bossbar update super-bar.<player.uuid> "title:Super Energy" "progress:<yaml[super-counter].read[energy.<player.uuid>].div[3.0]>"
- narrate "bossbar update super-bar.<player.uuid> title:Super Energy progress:<yaml[super-counter].read[energy.<player.uuid>].div[3.0]>"
}
- if <yaml[super-counter].read[energy.<player.uuid>]||0> > 300
{
- yaml id:super-counter set energy.<player.uuid>:300
}
- if <yaml[super-counter].read[energy.<player.uuid>]||0> > 300
{
- yaml id:super-counter set energy.<player.uuid>:300
}
}
"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[energy.<context.entity.uuid>]||0> < 300
{
- narrate "<red>Your Super isn't ready yet!"
- determine false
}
}