Date: 2014/02/04 01:45:19 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
"damageFX":
type: world
debug: false
events:
on entity damaged by entity:
- if li@ARROW|PRIMED_TNT|FALLING_BLOCK|DROPPED_ITEM|ENDER_CRYSTAL|WITHER_SKULL|COMPLEX_PART|EXPERIENCE_ORB|FIREBALL|SMALL_FIREBALL contains <context.entity.entity_type> queue clear
- if <el@val[<context.entity.custom_name>].starts_with[-]> queue clear
- if <global.flag[damageFXcooldown]> queue clear
- flag server damageFXcooldown duration:2t
- if <context.damager.entity_type> == PLAYER {
- if <player.has_flag[damageFXcooldown]> queue clear
- flag <context.damager> damageFXcooldown duration:10t
- run scoreboardcombat def:<context.entity>|<context.damage> delay:1t
}
- if li@PLAYER|ENDER_CRYSTAL|ENDER_DRAGON|WITHER !contains <context.entity.entity_type> run delayeddamageFX def:<context.entity>|<context.damage> delay:1t
- playeffect <context.entity.location> effect:iconcrack_14 qty:<context.damage.mul[100].as_int> offset:0.1
- playeffect <context.entity.location> effect:red_dust qty:50 offset:0.12
delayeddamageFX:
type: task
debug: false
script:
- ^if !<util.entity_is_spawned[%1%]> queue clear
- ^if '<el@val[<%1%.custom_name>].strip_color||0>' == 0 || <el@val[<%1%.custom_name>].strip_color.contains[<&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt>]> {
- ^adjust %1% custom_name:<&4>-<el@val[%2%].as_int>
- wait 10t
- ^adjust %1% custom_name:<&2><el@val[<&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt>].substring[1,<%1%.health.percentage.div[10].round_up>]><&4><el@val[<&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt>].substring[<%1%.health.percentage.div[10].round_up.add[1].as_int>,10]>
}
"scoreboardcombat":
type: task
debug: false
script:
- ^if <player.flag[currentsidebar]> == off queue clear
- ^if <player.has_flag[<player.name>ismuted]> || <player.has_flag[<player.name>isghosted]> queue clear
- ^flag <player> combatscoreboard:->:true
- ^scoreboard remove id:<player.name>combat
- ^scoreboard add viewers:<player> id:<player.name>combat 'obj:<&4>Combat Log'
- ^scoreboard add id:<player.name>combat 'obj:<&4>Combat Log' 'lines:<&4>--------------' score:7
- ^scoreboard add id:<player.name>combat 'obj:<&4>Combat Log' 'lines:<&c>Target<&co>' score:6
- ^if <%1%.entity_type> !contains 'entity' {
- ^scoreboard add id:<player.name>combat 'obj:<&4>Combat Log' 'lines:<&e><def[1].entity_type.to_lowercase>' score:5
} else {
- ^scoreboard add id:<player.name>combat 'obj:<&4>Combat Log' 'lines:<&a><&e>/' score:5
}
- ^scoreboard add id:<player.name>combat 'obj:<&4>Combat Log' 'lines:<&c>Target HP<&co> ' score:4
- ^if <%1%.entity_type> !contains 'entity' {
- ^scoreboard add id:<player.name>combat 'obj:<&4>Combat Log' 'lines:<&2><el@val[<&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt>].substring[1,<%1%.health.percentage.div[10].round_up>]><&4><el@val[<&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt><&hrt>].substring[<%1%.health.percentage.div[10].round_up.add[1].as_int>,10]>' score:3
} else {
- ^scoreboard add id:<player.name>combat 'obj:<&4>Combat Log' 'lines:<&e>/' score:3
}
- ^scoreboard add id:<player.name>combat 'obj:<&4>Combat Log' 'lines:<&c>Damage<&co>' score:2
- ^if <def[2]||0> != 0 {
- ^scoreboard add id:<player.name>combat 'obj:<&4>Combat Log' 'lines:<&e><el@val[%2%].as_int>' score:1
} else {
- ^scoreboard add id:<player.name>combat 'obj:<&4>Combat Log' 'lines:<&b><&e>/' score:1
}
- ^scoreboard add id:<player.name>combat 'obj:<&4>Combat Log' 'lines:<&4>______________' score:0
- ^adjust <player> 'fake_experience:<%1%.health.percentage.div[100]>|<el@val[%2%].as_int>'
- wait 5s
- wait 10s
- ^flag <player> combatscoreboard:<-:true
- ^if <player.flag[combatscoreboard].as_list> == li@null {
- ^adjust <player> fake_experience
- ^if <player.has_flag[<player.name>isghosted]> {
- ^scoreboard add viewers:<player> id:ghosted
} else if <player.has_flag[<player.name>ismuted]> {
- ^scoreboard add viewers:<player> id:muted
} else {
- ^scoreboard add viewers:<player> id:<player.flag[currentsidebar]>
}
}