Date: 2015/10/21 17:04:29 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
ZombieLv1:
type: assignment
actions:
on assignment:
- trigger name:proximity state:true radius:4
- vulnerable state:true
- health state:true
- health 20 <npc>
- heal <npc>
- flag npc Str:3
- flag npc Dex:3
- rename <yellow>Zombie<&sp><gold>Lv.1
- adjust <npc> speed:0.9
- flag npc NpcLocation:<npc.location>
on enter proximity:
- run script:MeleeAttackCheck1
on complete navigation:
- heal <npc>
- flag npc Combat:false
- adjust <npc> speed:0.9
MeleeAttackCheck1:
type: task
script:
- if <npc.flag[Combat]> == true queue clear
- define Target <npc.location.find.players.within[5]||false>
- if %Target% == false
{
- queue clear
}
- attack
- flag npc Combat:true
- run script:MeleeReturnCheck1 delay:5s
MeleeReturnCheck1:
type: task
script:
- if <npc.flag[Combat]> != true
{
- attack cancel
- flag npc Combat:false
- adjust <npc> speed:1.1
- walk <npc.flag[NpcLocation]>
- queue clear
}
- if <npc.location.find.players.within[4].size> < 1 && <player.location.distance[<npc.flag[NpcLocation]>]> > 20
{
- attack cancel
- flag npc Combat:false
- adjust <npc> speed:1.1
- walk <npc.flag[NpcLocation]>
- queue clear
}
- if <npc.location.find.players.within[5].size> > 0 && <player.location.distance[<npc.flag[NpcLocation]>]> < 20
{
- flag npc Combat:false
- run script:MeleeAttackCheck1
- queue clear
}
else
{
- attack cancel
- flag npc Combat:false
- adjust <npc> speed:1.1
- walk <npc.flag[NpcLocation]>
- queue clear
}