Date: 2016/03/21 15:21:04 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
# Add announcement?
PvpGuildDailyQuest:
type: assignment
actions:
on click:
# check if the npc is busy, if not flag him (2 minute time out)
- if <npc.has_flag[busy]> queue clear
- flag <npc> busy duration:2m
- if <player.has_flag[GuildRank]> && !<player.has_flag[DailyQuestAccess]> flag <player> DailyQuestAccess:1
- choose <player.flag[DailyQuestAccess]||0>:
# The player hasnt gained access to
# the daily quests of the PVP guild.
# We can decide the criteria later on.
# Player must have flag DailyQuestAccess
# set to 1 for access.
- case 0:
- narrate f:npcchat "Im sorry, you do not have access to the daily quests."
- wait 1
- narrate f:npcchat "You can speak to the Guild clerk to inquire about admission."
# Player has access. NPC checks if
# DQCurrent flag (which stores the
# the daily quest being tracked) exists.
- case 1:
- narrate f:npcchat "Welcome to the Guild dispatch office <player.name>."
- wait 3
- narrate f:npcchat "I gather reports from all of our outposts around Dreadcraft and send Guild members out to keep the world safe."
- wait 5
- narrate f:npcchat "You can report back here once a day to be given a task."
- wait 5
- narrate f:npcchat "We take this very seriously and pay accordingly. You will be compensated with a wide range of rewards for your participation."
- wait 5
- narrate f:npcchat "Let me know when you'd like to get started."
- flag <player> DailyQuestAccess:2
- case 2:
- if <player.has_flag[DQCurrent]> && <player.has_flag[DQCooldown]> flag <player> DQCurrent:!
- if <player.has_flag[DQCurrent].not> {
# No daily quest active. Check if the player is ready
# for a new quest. If not, tell them how long.
# DQCooldown will be active for 12 hours after a
# quest is completed.
- if <player.has_flag[DQCooldown].not> {
# Player does not have the flag, give them a new quest
# First do a random intro
- inject s@randomintro
# Search list of server scripts, find scripts starting with DQ_,
# randomly set one as the players DQCurrent flag.
- flag <player> DQCurrent:<server.list_scripts.filter[starts_with[s@DQ_]].random>
} else {
- narrate f:npcchat "We currently have members out handling all of today's issues."
- wait 2
- narrate f:npcchat "Check back tomorrow for an update."
- queue clear
}
}
# Inject in the quest chosen, switching control
# to seperate script.
- inject <player.flag[DQCurrent]>
#- announce "<light_purple><player.name> has started a daily quest for the PVP Guild!"
- flag <npc> busy:!
randomintro:
type: task
script:
- choose <util.random.int[1].to[1]>
- narrate f:npcchat "Welcome back recruit."
- wait 3
- narrate f:npcchat "Let me check today's reports..."
- wait 1
- equip <npc> hand:i@340
- wait 3
- narrate f:npcchat "Hmmm..."
- wait 4
- equip <npc> hand:i@0