Date: 2014/07/07 18:44:14 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
Sam:
type: Assignment
actions:
on assignment:
- flag npc mobprox_range:20
interact scripts:
- 10 SamAI
SamAI:
type: Interact
steps:
1:
chat trigger:
1:
trigger: /Come/!
script:
- follow target:<player>
2:
trigger: /Stay/!
script:
- follow stop
3:
trigger: /Attack/!
script:
- attack <npc.location.find.living_entities.within[10].replace[chicken|cow|sheep|pig].random>
- run SamDamage
4:
trigger: /Sit boy/!
script:
- Narrate "Sam has stopped guarding."
- attack stop
SamDamage:
Type: Task
Script:
- narrate "Sam is now guarding!"
- if <npc.location.find.living_entities.within[10].replace[chicken|cow|sheep|pig].random> == <player> {
- Attack stop
} else {
- hurt 5 <npc.location.find.living_entities.within[10].replace[chicken|cow|sheep|pig].random>
- run SamAI step:3 delay:5t
}