Kill Quest - Repeatable
Author: jrbudda
Created: 2012-10-01T18:00:18-0400
Edited: 2013-09-21T16:11:04-0400
Denizen Version: 0.76
Views: 340
Downloads: 1203
Likes: 1
Description: ////////
WARNING! This script is outdated. Using this script may require modifications for recent versions of Denizen.
If you are the script owner, simply update your script and remove this warning. This script has also been marked private as to avoid the front page.
////////
this is a template for a 'kill x of y - get reward - repeat" quest. instructions for making it non-repeatable are in the endkill comments.
--- assignments.yml ----
Denizens:
John Q QuestGiver:
Interact Scripts:
- 0 StartKill
- 1 EndKill
--- RepeatableKillQuest.yml ----
StartKill:
Type: Interact
Requirements:
Mode: None
Steps:
1:
Proximity Trigger:
Script:
- CHAT "Hey, you there! You look strong, can you help me kill some things?"
Click Trigger:
Script:
- CHAT "Can you help me?"
Chat Trigger:
1:
Trigger: /Yes/. I can.
Script:
#Tell the player what to do.
- CHAT "I have a zombie problem! Zombies! everywhere!"
- WAIT 1
- CHAT "Zombies in the closet, zombie in the hall.. They're thick as flies on poo."
- WAIT 1
- CHAT "I'll pay you to clear them out for me. Kill 10 and come talk to me."
#Start the Denizen listening for the killed Zombies, the KillComplete script will run once done.
- LISTEN KILL TYPE:ENTITY NAME:ZOMBIE QTY:10 SCRIPT:KillComplete
#set this script to step 2. So the player gets the hint message.
- ZAP
2:
Trigger: /No/. I cannot.
Script:
- CHAT "Are you sure? OK. maybe later?"
2:
Click Trigger:
Script:
- CHAT "Kill 10 zombies please!"
KillComplete:
Type: Task
Script:
- FINISH
- NARRATE "You have killed 10 zombie, return to John Q QuestGiver for your reward"
EndKill:
Type: Trigger
Requirements:
Mode: All
List: #Check if they finished the kill.
- FINISHED KillComplete
Steps:
'1':
Click Trigger:
Script:
#Engage is used to keep the player from clicking twice.
- ENGAGE
- CHAT "Thank you so much! Here, take this as a reward!"
- GIVE DIAMOND_AXE QTY:1
- WAIT 1
- CHAT "They'll be back soon enough, let me know if you want to kill some more!"
#These next 2 commands reset the quest so it can be repeated. If you don't want it repeatable make a step 2 on this script and call ZAP instead.
- ZAP 1 SCRIPT:StartKill
- RESET FINISHED SCRIPT:KillComplete
#Always disengagae after an Engage
- DISENGAGE