Date: 2019/06/08 08:11:32 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
"Guard":
type: assignment
default constants:
# List of all weapon ID numbers used in the script for guard recognition
weapons: i@wooden_sword|i@stone_sword|i@iron_sword|i@golden_sword|i@diamond_sword|i@bow
originallocation: <npc.location>
interact scripts:
- 10 GuardInteract
actions:
on assignment:
- trigger name:click toggle:true
- trigger name:proximity toggle:true
- trigger name:damage toggle:true
"GuardInteract":
type: interact
steps:
'1':
proximity trigger:
move:
script:
- run weaponcheck instantly
click trigger:
script:
- random 18
- chat "Do I look like I want to stand and have a chat with you, <player.name>?"
- chat "Move along inmate"
- chat "Scumbag prisoners..."
- chat "<player.name>, what are you starting at?"
- chat "Looks like everything's in order here..."
- chat "Any trouble and you'll be seeing the other side of my baton."
- chat "Enjoying your stay inmate? Pahaha."
- chat "Why are you sucking up? There are no reduced sentences for good behaviour here..."
- chat "Have you learned your lesson yet?"
- chat "Quit wasting my time"
- chat "I've got my eye on you"
- chat "You think you're so slick, like I don't know everything that's going on in this prison."
- chat "You pleaded innocent? Who were you kidding?"
- chat "What did I tell you? Move along."
- chat "You think you've got friends in here? We'll see..."
- chat "I don't care what this correctional facility is called; we'll have no riots. Got it?"
- chat "You've got some nerve standing this close to me."
- chat "You looking for trouble? Cause I'll give it to ya."
"weaponcheck":
type: task
script:
- if <npc.constant[weapons]> contains <player.item_in_hand>:
- trigger name:proximity toggle:false
- chat "You've got 5 seconds to put that weapon away."
- chat "5"
- follow
- repeat 4:
- if <npc.constant[weapons]> contains <player.item_in_hand>:
- wait 1s
- chat "<el@5.sub[<def[value]>]>"
- else:
- inject thank
- inject stopweaponcheck
- queue clear
- if <npc.constant[weapons]> contains <player.item_in_hand>:
- wait 1s
- execute as_server "jail <player.name> jail 1m"
- inject stopweaponcheck
- else:
- inject thank
- inject stopweaponcheck
"thank":
type: task
script:
- random 4
- chat "Was that so hard?"
- chat "Wave that thing at me again and you'll know about it."
- chat "Darn, that cell had your name on it too."
- chat "I almost wanted an excuse to throw you in a cell."
"stopweaponcheck":
type: task
script:
- trigger name:proximity toggle:true
- follow followers:<npc> target:<player> stop
- narrate <npc>
- narrate <npc.constant[originallocation]>
- walk <npc> <npc.constant[originallocation]>