Date: 2015/03/14 14:16:57 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
"helpful citizens config":
type: task
"giver":
type: giver
items:
- i@Iron_Sword/It's dangerous to go alone, take this!
cooldown: 12h
cooldown text:
- "It's dangerous to go alone!"
- "I am here to lend an ear."
- "It is very cold out, please feel welcome to stay <player.name>!"
"helpful citizens":
type: assignment
default constants:
configuration: giver
on click:
- engage duration:3s
- look <npc> <player.eye_location>
- define type '<proc[helpful citizen helper].context[type]>'
- if '%type%' == 'giver' {
- if !<player.flag[helpful_<npc.constant[configuration]>_<npc.id>_cooldown]> {
- define items '<proc[helpful citizen helper].context[items]>'
- flag <npc> helpful_citizen_items:!
- flag <npc> helpful_citizen_items:|:%items%
- define item <npc.flag[helpful_citizen_items].as_list.random.split[/].get[1]>
- chat '<el@val[%items%].split[/].get[2]>'
- animate <npc> arm_swing
- give '%item%'
- narrate '<yellow>[!]<blue> You have recieved <%item%.qty>
"<t[<%item%.has_display>]:<%item%.display> || <%item%.material.name>>"!'
- flag <player> helpful_<npc.constant[configuration]>_<npc.id>_cooldown:true
'duration:<proc[helpful citizen helper].context[cooldown] || 5s>'
} else {
- chat '<proc[helpful citizen helper].context[cooldown text]>'
}
- queue clear
- if <player.is_op>
narrate 'I need a configuration!'
else look <player.eye_location>