Date: 2016/06/20 08:17:54 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
## ZS_Round
ZS_Rounds_config:
type: yaml data
debug: false
config:
stats:
zombies:
health: 20
speed: 0.5
spawns:
start:
zombies:
amount: 5
round: 1
rounds:
zombies:
amount: 2
# Rounds
# Round 1:
# 5 Zombies
# Round 2:
# 7 Zombies
# 1 Skeleton
ZS_Rounds_SpawnRound:
type: task
definitions: ArenaName|round
script:
## Zombies
- announce "<&c>Runde <def[round]>:"
- define type zombies
- define start <s@ZS_Rounds_config.yaml_key[config.spawns.start.<def[type]>.amount]>
- define multiplied <def[round].sub_int[<s@ZS_Rounds_config.yaml_key[config.spawns.start.<def[type]>.round]>]>
- define amount <def[multiplied].mul_int[<s@ZS_Rounds_config.yaml_key[config.spawns.rounds.<def[type]>.amount]>].add_int[<def[start]>]>
- run ZS_SpawnZombies context:<def[ArenaName]>|<def[amount]>|<def[round]> instantly
# ZS_Spawn_Tank:
# ZS_Spawn_Fast:
# ZS_Spawn_Skeleton:
# ZS_Spawn_Wither:
# ZS_Spawn_Spider:
# ZS_Spawn_CaveSpider:
ZS_SpawnZombies:
type: task
definitions: ArenaName|Amount|<def[round]>
script:
- announce "<&7><def[amount]> <&8>Zombier er spawned!"
- define locs <yaml[ZS_config].read[Arenas.<def[ArenaName]>.SpawnLocs]>
- repeat <def[Amount]> {
- define Randomloc <def[locs].random>
- inject ZS_Spawn_Zombie
}
ZS_Spawn_Zombie:
type: task
definitions: Randomloc|<def[round]>
script:
- define speed <s@ZS_Rounds_config.yaml_key[config.stats.zombies.speed]>
- define health <s@ZS_Rounds_config.yaml_key[config.stats.zombies.health]>
- define Players <def[Randomloc].as_location.find.players.within[8].filter[has_flag[ZS_Survivor]]||null>
- define Nearby <def[Randomloc].as_location.find.players.within[100].filter[has_flag[ZS_Survivor]].random||null>
- spawn e@zombie[max_health=<def[health]>;health=<def[health]>;speed=<def[speed]>] <def[Randomloc]> persistent save:created
# - follow followers:<entry[created].spawned_entities> lead:1.0 max:2.0
- attack <entry[created].spawned_entities> target:<def[Nearby]>
# - define locs <def[Randomloc].as_location.points_between[<def[Nearby].location>].distance[10]>
# # <l@location.points_between[<location>].distance[<#.#>]>
# - foreach <entry[created].spawned_entities> {
# # - run ZS_Spawn_Walk context:<entry[created].spawned_entities>|<def[locs]>
# }
# - walk <entry[created].spawned_entities> <def[Nearby].location> auto_range radius:500
# - spawn e@zombie[max_health=2;health=2;speed=0.5;equipment=leather_boots|air|air|air] <context.location>
# ZS_Spawn_Walk:
# type: task
# definitions: entity|locs
# script:
# - wait 5t
# - walk <def[entity]> <def[locs].as_list.get[<def[locs].as_list.size>]>