# Repeatable 24h kill spider quest
#
# For now, shoot command is in comment because it doesn't work (to spawn some spider around, or
# spawn it with an other npc), i will add it when it's fixed
#
# /!\ Op pass throught quest cooldown, it's normal to let you try it without wait 24 hours,
# you could simply get a timer for op by removing - -valueof "<player.is_op>"
"quest":
type: assignment
interact scripts:
- 0 quest interact
- 10 quest expire interact
actions:
on assignment:
- trigger name:chat toggle:true
"quest expire interact":
Requirements:
Mode: All
List:
- valueof "<flag.p:quest repeatTimer || false>"
- -valueof "<player.is_op>"
type: interact
steps:
"1":
click Trigger:
script:
- ^narrate "Hey dude ! You have to wait <flag.p:quest repeatTimer.expiration> before you could do this epic quest again !"
"quest interact":
type: interact
steps:
"*meet":
click trigger:
script:
- if "<player.is_op>" == true && "<flag.p:quest repeatTimer || false>" == true
narrate " <&nl><red>You are on cd but you are op and you pass throught it
<&nl> A normal player have to wait <flag.p:quest repeatTimer.expiration>"
- ^narrate "<gold><npc.name><white> <&co> Help me ! My entire house is completly full of hairy spiders !
<&nl>Could you <red>kill<white> them for me ?
<&nl><dark_purple> Answer by <green>yes<white><dark_purple> or <green>no<white>"
chat trigger:
'yes':
trigger: '/yes/, i really like to be hurt by a bunch of hairy spiders'
script:
- ^flag player "quest spider:0"
- ^narrate "<gold><npc.name><white> <&co> Good news ! Kill 10 spiders, it will be enought !"
- ^listen kill "ID:<player.name>_quest" "SCRIPT:quest continue" type:entity target:spider qty:1
- ^runtask "script:quest respawn"
- ^zap 'step:hunt'
'no':
trigger: '/no/'
script:
- ^narrate "<gold><npc.name><white> <&co> Really ?! Go away !"
'hunt':
click trigger:
script:
- ^narrate "You have already kill <gold><flag.p:quest spider>/10 hairy spiders"
'reward':
click trigger:
script:
- ^narrate "<gold><npc.name><white> <&co> Good job <player.name>, Take this for the help."
# reward money
# here is a random coin between 3 and 12
- ^flag npc "money:<util.random.int[3].to[12]>"
- ^give money "qty:<^flag.npc:money>"
- ^narrate "<dark_purple>You were reward by <red><^flag.npc:money><dark_purple> $"
- ^flag npc money:!
# setup timer request (86400s = 24h)
- ^flag player "quest repeatTimer:true" duration:86400
- ^zap 'step:*meet'
'quest continue':
type: task
script:
- ^flag player "quest spider:+"
- ^narrate "<gold><npc.name><white> <&co> Vous avez tué <flag.p:quest spider.asint>/10 hairy spiders !"
- ^if "<flag.p:quest spider>" > 9 runtask "script:quest finish"
else listen kill "ID:<player.name>_quest" "SCRIPT:quest continue" type:entity target:spider qty:1
"quest finish":
type: task
script:
- ^narrate "You have erased all hairy spiders, come back to me for a little reward !"
- ^zap "step:reward" "script:quest interact"
- ^flag player "quest spider:!"
"quest respawn":
type: task
Script:
# - ^shoot npcid:307 entity:spider "location:361,68,53,quest"
# - ^shoot npcid:307 entity:spider "location:361,68,53,quest"
# - ^shoot npcid:307 entity:spider "location:361,68,53,quest"
# - ^shoot npcid:307 entity:spider "location:361,68,53,quest"
# - ^shoot npcid:307 entity:spider "location:361,68,53,quest"
# - ^shoot npcid:307 entity:spider "location:361,68,53,quest"
# - ^shoot npcid:307 entity:spider "location:361,68,53,quest"
# - ^shoot npcid:307 entity:spider "location:361,68,53,quest"
# - ^shoot npcid:307 entity:spider "location:361,68,53,quest"
# - ^shoot npcid:307 entity:spider "location:361,68,53,quest"
# - ^shoot npcid:307 entity:spider "location:361,68,53,quest"
# - ^shoot npcid:307 entity:spider "location:361,68,53,quest"
# - ^shoot npcid:307 entity:spider "location:361,68,53,quest"
# - ^shoot npcid:307 entity:spider "location:361,68,53,quest"
# - ^shoot npcid:307 entity:spider "location:361,68,53,quest"