Date: 2020/08/06 18:42:03 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
archeryworldscript:
type: world
events:
on player shoots target with arrow in:archeryroom:
- modifyblock <context.location> air
- if <server.flag[archerylevel]> == 1:
- flag <context.shooter> archerypoints:+:1
- if <context.shooter.flag[archerypoints]> = 6:
- flag server archeryreward:100
- else:
- flag server archeryreward:+:16
- else if <server.flag[archerylevel]> == 2:
- flag <context.shooter> archerypoints:+:2
- flag server archeryreward:+:16
- if <context.location.y> > 75:
- flag server toptarget
- if <server.has_flag[toptarget]> && <server.has_flag[bottarget]>:
- flag server endarcherytwo
- else:
- flag server bottarget
- if <server.has_flag[toptarget]> && <server.has_flag[bottarget]>:
- flag server endarcherytwo
- else if <server.flag[archerylevel]> == 3:
- flag <context.shooter> archerypoints:+:3
- else if <server.flag[archerylevel]> == 4:
- flag <context.shooter> archerypoints:+:5
on player enters archeryenter:
- if <server.has_flag[archeryrangeinuse]>:
- determine passively cancelled
- else:
- flag server archeryrangeinuse
on player exits archeryenter:
- flag server archeryrangeinuse:!
- take archerybow
- take archeryarrows quantity:64
alynniaradius:
type: assignment
actions:
on assignment:
- trigger name:proximity state:true radius:2
- trigger name:chat state:true
interact scripts:
- alynnia
alynnia:
type: interact
steps:
1:
proximity trigger:
entry:
script:
- if <player.has_flag[npcengage]>:
- stop
- flag player npcengage
- if !<player.has_flag[archerybegin]>:
- narrate "<&6>[<&f>[<&4>NPC<&f>] <&c>Alynnia <&6>-> <&c>me<&6>]<&r> Welcome to the Arenslas archery range! There are four rounds and it costs c100 to enter. Would you like to play?"
- narrate "<&6>Play the Arenslas archery game? Reply 'yes' to accept."
- flag player archerybegin
exit:
script:
- flag player archerybegin:!
- flag player npcengage:!
- disengage
chat trigger:
1:
trigger: /Yes/.
script:
- if <player.has_flag[archerybegin]>:
- narrate "<&6>[<&f>[<&4>NPC<&f>] <&c>Alynnia <&6>-> <&c>me<&6>]<&r> Okay! Get ready. The game will begin in a moment."
- money take quantity:100
- give archerybow
- give archeryarrows quantity:64
- flag player archerypoints:0
- wait 5s
- run archerygame
archerybow:
type: item
material: bow
archeryarrows:
type: item
material: arrow
archerygame:
type: task
script:
- while <server.has_flag[archeryrangeinuse]>:
- title "title:<gold>Round One..." stay:1s
- wait 1s
- title "title:<gold>3..." stay:1s
- wait 1s
- title "title:<gold>2..." stay:1s
- wait 1s
- title "title:<gold>1..." stay:1s
- wait 1s
- title "title:<gold>Go!" stay:1s
- modifyblock archerytarget1 target
- modifyblock archerytarget2 target
- modifyblock archerytarget3 target
- modifyblock archerytarget4 target
- modifyblock archerytarget5 target
- modifyblock archerytarget6 target
- wait 18s
- modifyblock archeryreset air
- wait 3s
- title "title:<gold>Round Two..." stay:1s
- wait 1s
- title "title:<gold>3..." stay:1s
- wait 1s
- title "title:<gold>2..." stay:1s
- wait 1s
- title "title:<gold>1..." stay:1s
- wait 1s
- title "title:<gold>Go!" stay:1s
- flag server archeryleveltwo duration:15s
- while <server.has_flag[archeryleveltwo]> && !<server.has_flag[endarcherytwo]>:
- run toptarget
- run bottarget
toptarget:
type: task
script:
- while !<server.has_flag[toptarget]>:
- modifyblock archerytarget3 target
- wait 0.5s
- modifyblock archerytarget3 air
- modifyblock archerytarget8 target
- wait 0.5s
- modifyblock archerytarget8 air
- modifyblock archerytarget2 target
- wait 0.5s
- modifyblock archerytarget2 air
- modifyblock archerytarget7 target
- wait 0.5s
- modifyblock archerytarget7 air
- modifyblock archerytarget1 target
- wait 0.5s
- modifyblock archerytarget1 air
- modifyblock archerytarget7 target
- wait 0.5s
- modifyblock archerytarget7 air
- modifyblock archerytarget2 target
- wait 0.5s
- modifyblock archerytarget2 air
- modifyblock archerytarget8 target
- wait 0.5s
- modifyblock archerytarget8 air
- if !<server.has_flag[archeryleveltwo]>:
- stop