Date: 2017/05/18 19:44:05 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
on player killed:
- if <queue.list.filter[script.name.is[==].to[Ingame]].is_empty> {
- determine cancelled
}
- determine passively cancelled
- adjust <player> fall_distance:0
- teleport <player> <s@Config.yaml_key[spawns.<server.flag[spawns].as_list.find[<player>]>]>
- heal <player>
- ^inject s@Durability instantly
- if <player.has_flag[pvp]> {
- define enemy <player.flag[pvp].as_player>
- choose "<context.cause>" {
- case "block_explosion" {
- announce "<s@Config.yaml_key[deathmessages.BLOCK_EXPLOSION.<util.random.int[1].to[<s@Config.list_keys[deathmessages.PROJECTILE].size>]>]>"
}
- case "contact" {
- announce "<s@Config.yaml_key[deathmessages.CONTACT.<util.random.int[1].to[<s@Config.list_keys[deathmessages.PROJECTILE].size>]>]>"
}
- case "entity_attack" {
- announce "<s@Config.yaml_key[deathmessages.ENTITY_ATTACK.<util.random.int[1].to[<s@Config.list_keys[deathmessages.PROJECTILE].size>]>]>"
}
- case "entity_sweep_attack" {
- announce "<s@Config.yaml_key[deathmessages.ENTITY_SWEEP_ATTACK.<util.random.int[1].to[<s@Config.list_keys[deathmessages.PROJECTILE].size>]>]>"
}
- case "fall" {
- announce "<s@Config.yaml_key[deathmessages.FALL.<util.random.int[1].to[<s@Config.list_keys[deathmessages.PROJECTILE].size>]>]>"
}
- case "fire_tick" {
- announce "<s@Config.yaml_key[deathmessages.FIRE_TICK.<util.random.int[1].to[<s@Config.list_keys[deathmessages.PROJECTILE].size>]>]>"
}
- case "drowning" {
- announce "<s@Config.yaml_key[deathmessages.DROWNING.<util.random.int[1].to[<s@Config.list_keys[deathmessages.PROJECTILE].size>]>]>"
}
- case "hot_floor" {
- announce "<s@Config.yaml_key[deathmessages.HOT_FLOOR.<util.random.int[1].to[<s@Config.list_keys[deathmessages.PROJECTILE].size>]>]>"
}
- case "lava" {
- announce "<s@Config.yaml_key[deathmessages.LAVA.<util.random.int[1].to[<s@Config.list_keys[deathmessages.PROJECTILE].size>]>]>"
}
- case "lightning" {
- announce "<s@Config.yaml_key[deathmessages.LIGHTNING.<util.random.int[1].to[<s@Config.list_keys[deathmessages.PROJECTILE].size>]>]>"
}
- case "magic" {
- announce "<s@Config.yaml_key[deathmessages.MAGIC.<util.random.int[1].to[<s@Config.list_keys[deathmessages.PROJECTILE].size>]>]>"
}
- case "poison" {
- announce "<s@Config.yaml_key[deathmessages.POISON.<util.random.int[1].to[<s@Config.list_keys[deathmessages.PROJECTILE].size>]>]>"
}
- case "projectile" {
- flag <def[enemy]> alltimebowkills:+:1
- announce "<s@Config.yaml_key[deathmessages.PROJECTILE.<util.random.int[1].to[<s@Config.list_keys[deathmessages.PROJECTILE].size>]>]>"
- repeat 3 {
- if <s@Config.yaml_key[classunlock.Archer.<def[value]>].is[EQUALS].to[<def[enemy].flag[alltimebowkills]>]> {
- narrate "<&b><&l>You<&sq>ve just unlocked the <&3><&l>Archer Level <def[value]> <&b><&l>class!" targets:<def[enemy]>
}
}
}
- case "thorns" {
- announce "<s@Config.yaml_key[deathmessages.THORNS.<util.random.int[1].to[<s@Config.list_keys[deathmessages.PROJECTILE].size>]>]>"
}
- case "wither" {
- announce "<s@Config.yaml_key[deathmessages.WITHER.<util.random.int[1].to[<s@Config.list_keys[deathmessages.PROJECTILE].size>]>]>"
}
- flag <def[enemy]> alltimekills:+:1
- repeat 3 {
- if <s@Config.yaml_key[classunlock.Swordsman.<def[value]>].is[EQUALS].to[<def[enemy].flag[alltimekills]>]> {
- narrate "<&b><&l>You<&sq>ve just unlocked the <&3><&l>Swordsman Level <def[value]> <&b><&l>class!" targets:<def[enemy]>
}
}
- flag <def[enemy]> kills:+:1
- flag <def[enemy]> xp:+:<s@Config.yaml_key[XPValues.kill]>
- actionbar targets:<def[enemy]> "<&a>+<s@Config.yaml_key[XPValues.kill]> XP"
- if <s@Config.list_keys[KillKitItems].contains[<def[enemy].flag[kills]>]> {
- define items <s@Config.yaml_key[KillKitItems.<def[enemy].flag[kills]>.item].as_list>
- give <def[items].get[<util.random.int[1].to[<def[items].size>]>]> quantity:<util.random.int[<s@Config.yaml_key[KillKitItems.<def[enemy].flag[kills]>.minq]>].to[<s@Config.yaml_key[KillKitItems.<def[enemy].flag[kills]>.maxq]>]> to:<def[enemy].inventory>
}
}
else {
- announce "<s@Config.yaml_key[suicidemessages.<context.cause>.<util.random.int[1].to[<s@Config.list_keys[deathmessages.<context.cause>].size>]>]>"
}
- flag player alltimedeaths:+:1
- flag player solodeaths:+:1
- flag player respawn duration:<s@Config.yaml_key[respawninvincibility]>