'newtravel1':
type: assignment
default constants:
# Time until quest can be repeated.
questrepeatlockout: 60
# Time until the quest restarts.
questresettimeout: 86400
# First location to travel to.
location1: 39,65,-123,bigcity
# Compass locations need spaces. Sorry.
compass1: 39 65 -123
# Second location, scripted as the quest givers location.
location2: 73,63,194,bigcity
# Stupid Compass.
compass2: 73 63 194
# Reward Amount for the quest
reward: 50
actions:
on assignment:
- trigger name:chat toggle:true
- trigger name:click toggle:true
- trigger name:proximity toggle:true
interact scripts:
- 10 newtravel1_script
newtravel1_script:
type: interact
steps:
'1':
click trigger:
script:
- if "<player.flag[newtravel1]>" == "complete" run "script:newtravel1_reward"
else if "<player.flag[newtravel1]>" == "claimed" chat "I don't need any help for <flag.p:newtravel1.expiration>."
else if "<player.flag[newtravel1]>" == "started" chat "Come back when you are done."
else run "script:newtravel1_presentquest"
'2':
chat trigger:
'Yes':
trigger: /Yes/, I'll go there for you.
script:
- engage
- flag player "newtravel1:started" "duration:<cons:questresettimeout>"
- listen travel "id:newtravel1a Listener" type:tolocation location:<cons:location1> radius:10 "script:newtravel1_arrived1"
- narrate "Travel to <red><cons:location1>"
- chat "Thanks <player.name>. I owe you my life."
- chat "Take this compass, it points the way."
- give compass
- execute as_op "compass <cons:compass1>"
- disengage
'No':
trigger: /No/, I can't do that right now.
script:
- chat "That's a shame, it's so hard not knowing."
proximity trigger:
exit:
script:
- zap "newtravel1_script" 1
'3':
chat trigger:
'Yes':
trigger: /Yes/, they are alive and well.
script:
- chat "Thank God! I was so worried!"
- run "script:newtravel1_complete"
- zap "newtravel1_script" 1
'No':
trigger: /No/, they were all dead...
script:
- chat "NOOOOOOO!"
- execute as_server "playsound mob.ghast.scream <player.name>"
- run "script:newtravel1_complete"
- zap "newtravel1_script" 1
newtravel1_presentquest:
type: task
script:
- chat "Hi <player.name> I need someone to go to find out if my family is still alive."
- chat "I'm not strong enough to survive out there at night, can you check on my family and let me know if they are ok?"
- narrate "<red>Yes <white>or <blue>No"
- zap "newtravel1_script" 2
newtravel1_arrived1:
type: task
script:
- narrate "<red>You have arrived"
- narrate "Check on <npc.name>'s family and return to <npc.name>."
- listen travel "id:newtravel1b Listener" type:tolocation location:<cons:location2> radius:10 "script:newtravel1_arrived2"
- execute as_op "compass <cons:compass2>"
newtravel1_arrived2:
type: task
script:
- narrate "<red>You have arrived"
- flag player "newtravel1:complete"
newtravel1_reward:
type: task
script:
- chat "Are they ok?"
- narrate "<red>Yes <white>or <blue>No"
- zap "newtravel1_script" 3
newtravel1_complete:
type: task
script:
- chat "Thankyou for checking for me."
- narrate "<red> You have been paid <cons:reward> gold."
- give money "qty:<cons:reward>"
- execute as_op "compass reset"
- flag player "newtravel1:claimed" "duration:<cons:questrepeatlockout>"