Date: 2016/02/09 10:12:58 UTC-08: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
153
154
155
156
157
158
159
160
161
162
CustomQuestGUI:
type: assignment
actions:
on click:
- inventory open d:in@QuestGUI
- flag server "currentplayeropen:<player>"
QuestGUI:
type: inventory
inventory: chest
title: "<&6><&l>Quest Master"
size: 63
definitions:
border: i@border_item
return_button: i@return_button
CreeperQuest: i@CreeperQuest
PlayerQuest: i@Playerquest
DailyPlayerQuest: i@DailyPlayerQuest
slots:
- "[border] [border] [border] [border] [border] [border] [border] [border] [border]"
- "[border] [] [DailyPlayerQuest] [] [PlayerQuest] [] [] [] [border]"
- "[border] [] [] [] [] [] [] [] [border]"
- "[border] [] [CreeperQuest] [] [] [] [] [] [border]"
- "[border] [] [] [] [] [] [] [] [border] "
- "[border] [] [] [] [] [] [] [] [border] "
- "[border] [border] [border] [border] [border] [border] [border] [border] [return_button]"
GUI_Inventory_World:
type: world
events:
on player clicks in QuestGUI:
- determine cancelled
on player clicks PlayerQuest in QuestGUI:
- if <player.flag[kill_player_quest_weekly_cooldown].is_expired.not> {
- narrate "<&7><&o>You can repeat this quest in <player.flag[kill_player_quest_weekly_cooldown].expiration.formatted>"
- queue clear
}
- if <player.flag[kill_player_quest_weekly_count]||0> >= 30 {
- narrate "<&6>Highlord: <&7><&o>Great work! Here's your reward!"
- give xp quantity:1000
- narrate "<&2>$5000 has been added to your account."
- give money qty:5000
- flag <player> kill_player_quest_weekly_count:!
- flag <player> kill_player_quest_weekly:!
- flag <player> kill_player_quest_weekly_cooldown duration:168h
- queue clear
}
- if <player.flag[kill_player_quest_weekly_cooldown]||false> {
- queue clear
}
- flag player kill_player_quest_weekly
- flag player kill_player_quest_weekly_count:0
- narrate "<&6>-=+ Kill <&c>30 <&6>Players +=-"
- narrate "<&a><player.flag[kill_player_quest_weekly_count].round||0> players!"
on player kills player:
- flag <context.damager.as_player> kill_player_quest_weekly_count:++
- narrate "<&a>You have killed <player.flag[kill_player_quest_weekly_count].round> players!"
- if <context.damager.as_player.flag[kill_player_quest_weekly_count]> >= 30 {
- narrate "[<&b>Return to the Quest Master]" targets:<context.damager.as_player>
- flag <context.damager.as_player> kill_player_quest_weekly:!
}
on player clicks DailyPlayerQuest in QuestGUI:
- if <player.flag[kill_player_quest_daily_cooldown].is_expired.not> {
- narrate "<&7><&o>You can repeat this quest in <player.flag[kill_player_quest_daily_cooldown].expiration.formatted>"
- queue clear
}
- if <player.flag[kill_player_quest_daily_count]||0> >= 5 {
- narrate "<&6>Highlord: <&7><&o>Great work! Here's your reward!"
- give xp quantity:100
- narrate "<&2>$5000 has been added to your account."
- give money qty:1000
- flag <player> kill_player_quest_daily_count:!
- flag <player> kill_player_quest_daily:!
- flag <player> kill_player_quest_daily_cooldown duration:24h
- queue clear
}
- if <player.flag[kill_player_quest_daily_cooldown]||false> {
- queue clear
}
- flag player kill_player_quest_daily
- flag player kill_player_quest_daily_count:0
- narrate "<&6>-=+ Kill <&c>5 <&6>Players +=-"
- narrate "<&a><player.flag[kill_player_quest_daily_count].round||0> players!"
on player kills player:
- flag <context.damager.as_player> kill_player_quest_daily_count:++
- narrate "<&a>You have killed <player.flag[kill_player_quest_daily_count].round> players!"
- if <context.damager.as_player.flag[kill_player_quest_daily_count]> >= 5 {
- narrate "[<&b>Return to the Quest Master]" targets:<context.damager.as_player>
- flag <context.damager.as_player> kill_player_quest_daily:!
}
on player clicks CreeperQuest in QuestGUI:
- if <player.flag[kill_creeper_quest_cooldown].is_expired.not> {
- narrate "<&7><&o>You can repeat this quest in <player.flag[kill_creeper_quest_cooldown].expiration.formatted>"
- queue clear
}
- if <player.flag[kill_creeper_quest_count]||0> >= 5 {
- give xp quantity:150
- narrate "<&2>$1000 has been added to your account."
- give money qty:1000
- flag player kill_creeper_quest_count:!
- flag player kill_creeper_quest_cooldown duration:24h
- queue clear
}
- if <player.flag[kill_creeper_quest_cooldown]||false> {
- queue clear
}
- flag player kill_creeper_quest
- flag player kill_creeper_quest_count:0.round
- narrate "<&6>-=+ Kill <&a>5 <&6>Creepers +=-"
- narrate "<&a><player.flag[kill_creeper_quest_count].round||0> Creepers!"
on player kills creeper:
- flag <context.damager.as_player> kill_creeper_quest_count:++
- narrate "<&a>You have killed <player.flag[kill_creeper_quest_count].round> Creepers!"
- if <context.damager.as_player.flag[kill_creeper_quest_count]> >= 5 {
- narrate "<&b>[Return to the Quest Master]" targets:<context.damager.as_player>
- flag <context.damager.as_player> kill_creeper_quest:!
}
on player clicks return_button IN QuestGUI:
- inventory close
border_item:
type: item
material: i@black_stained_glass_pane
display name: <white><&sp>
return_button:
type: item
material: i@redstone_torch_on
display name: "<&6><&l>Close Menu"
CreeperQuest:
type: item
material: i@383,50
display name: "<&a>Creeper Quest"
lore:
- "<&a>Kill <&c>5 <&7> <&a>Creepers!"
- "<&6>Cooldown:<&7><&o> <server.flag[currentplayeropen].as_player.flag[kill_creeper_quest_cooldown].expiration.formatted.replace[forever].with[0 seconds]||7 Days>"
PlayerQuest:
type: item
material: i@diamond_chestplate[flags=Hide_Attributes]
display name: "<&c>Player Quest"
enchantments:
- Durability:1
lore:
- "<&a>Kill <&c>5 <&7> <&a>Players!"
- "<&6>Cooldown:<&7><&o> <server.flag[currentplayeropen].as_player.flag[kill_player_quest_weekly_cooldown].expiration.formatted.replace[forever].with[0 seconds]||24 Hours>"
DailyPlayerQuest:
type: item
material: i@diamond_chestplate
display name: "<&c>Player Quest"
enchantments:
lore:
- "<&a>Kill <&c>5 <&7> <&a>Players!"
- "<&6>Cooldown:<&7><&o> <server.flag[currentplayeropen].as_player.flag[kill_player_quest_daily_cooldown].expiration.formatted.replace[forever].with[0 seconds]||24 Hours>"