-- Quest: C:\QUESTS\WORKING\A0C0XY04.Qbn.
-- StartsBy: NPC
-- Questee: anyone
-- Questor: peasant
-- Repute: 0X
-- QuestId: 4
-- Edited for Daggerfall Unity by Jay_H
Messages: 36
Quest: A0C0XY04
-- Message panels
QRC:

QuestorOffer:  [1000]
<ce>                         My name is _agent_. I
<ce>                    represent a someone that needs
<ce>                   to... acquire something. Whoever
<ce>                     delivers it will be rewarded
<ce>                          with _artifact_. I
<ce>                    don't know what that is, but I
<ce>                    am told it is an item of power.
<ce>                           Are you willing?

RefuseQuest:  [1001]
<ce>                    Forget you ever saw me. I have
<ce>                    powerful friends. If you cause
<ce>                    me any trouble, they will hunt
<ce>                     you down like a rogue thief.

AcceptQuest:  [1002]
<ce>                       You must get the daedric
<ce>                    _ingredient_ from ___dungeon_.
<ce>                    I don't know where that is, but
<ce>                       I'm sure you can find it.
<ce>                       When you have the daedric
<ce>                       _ingredient_, bring it to
<ce>                     _meetingplace_ here in town.
<ce>                     There you will meet _qgiver_,
<ce>                 and %g will give you the _artifact_.

RumorsDuringQuest:  [1005]
<ce>                     I hear the king is making an
<ce>                   important announcement next week.

RumorsPostfailure:  [1006]
<ce>                 Some poor fool went into ___dungeon_.
<ce>                  I hear the place is full of demons.

RumorsPostsuccess:  [1007]
<ce>                      Stay away from _qgiver_. I
<ce>                    hear %g is a liar and a cheat.

QuestorPostsuccess:  [1008]
<ce>                Sorry about the incident with _qgiver_.
<ce>                 I suppose I ought to help you just to
<ce>                            make up for it.

QuestorPostfailure:  [1009]
<ce>                  That business with _qgiver_ wasn't
<ce>                 my fault. I'm not about to get mixed
<ce>               up with you now, so just leave me alone.

QuestLogEntry:  [1010]
On %qdt,
 I met with _agent_ of ___agent_.
 %g told me that a mysterious client of
 %g3 was looking for daedric _ingredient_.
 If I can find it, I will get the _artifact_.
 The daedric _ingredient_ is somewhere
 in ___dungeon_.  When I find it, I am
 to meet a _qgiver_ at
 _meetingplace_ here in __meetingplace_.

Message:  1011
On %qdt,
 the guardian of the daedric _ingredient_
 told me that _agent_'s mysterious
 client doesn't even have the _artifact_.
 If I hand over the daedric _ingredient_,
 death will be my only reward. The guardian
 gave me a magical token that will render
 _qgiver_ helpless.

Message:  1012
<ce>               I will fight you to the death to protect
<ce>                 the daedric _ingredient_. You should
<ce>                   know that _qgiver_ is not what %g
<ce>                 seems. The _artifact_ is a long lost
<ce>                 item of great power that %g has never
<ce>                  owned. %g means to kill you once %g
<ce>                     has possession of the daedric
<ce>                    _ingredient_. Cease this futile
<ce>                 attack and I will give you a magical
<ce>                    token that can render _qgiver_
<ce>                 helpless. If you kill %g2, I can see
<ce>                   to it that the Mages Guild looks
<ce>                   favorably upon you for quite some
<ce>                     time. Do you accept my offer?

Message:  1013
<ce>                      Fool! Did you really think
<ce>                       that I would give you the
<ce>                          _artifact_ for this
<ce>                    daedric _ingredient_? The only
<ce>                       reward I have for you is
<ce>                       death! See me as I really
<ce>                       am and tremble in fear. I
<ce>                        am =monster_. Kill him!

Message:  1014
<ce>                     Wha... I have been betrayed!
<ce>                     You have broken the illusion
<ce>                      and cast a spell of silence
<ce>                     on me. That cursed _guardian_
<ce>                    =guardian_ put you up to this,
<ce>                     didn't %g? To arms! Help me!
<ce>                               To arms!

Message:  1015
<ce>                      In your mind, you hear the
<ce>                       soft whisper of an alien
<ce>                          voice, "Well done,
<ce>                             %pcn. Slaying
<ce>                        _qgiver_, or =monster_
<ce>                       as %g is known to %g3 own
<ce>                       people, has earned you a
<ce>                        reward. Members of the
<ce>                      Mage's Guild now trust you
<ce>                        far more than before."

Message:  1020
<ce>                       You have a truly devious
<ce>                       mind. I admire that. But
<ce>                       you should know that I am
<ce>                        not to be trifled with.
<ce>                       I take back my token and
<ce>                      curse you to be mistrusted
<ce>                         by my closest allies.

Message:  1025
The Chrysamere is an ancient artifact of great power.
<--->
It is a legendary magical artifact.

Message:  1030
Take this token then.

Message:  1035
Prepare to die!


-- Symbols used in the QRC file:
--
--                %g occurs 13 times.
--               %g2 occurs 1 time.
--               %g3 occurs 2 times.
--              %pcn occurs 1 time.
--              %qdt occurs 2 times.
--        =guardian_ occurs 1 time.
--         =monster_ occurs 3 times.
--         ___agent_ occurs 1 time.
--       ___dungeon_ occurs 3 times.
--   __meetingplace_ occurs 3 times.
--           _agent_ occurs 3 times.
--        _artifact_ occurs 7 times.
--        _guardian_ occurs 1 time.
--      _ingredient_ occurs 9 times.
--    _meetingplace_ occurs 2 times.
--          _qgiver_ occurs 9 times.

QBN:
Item _artifact_ artifact Chrysamere anyInfo 1025
Item _ingredient_ lodestone
Item _token_ pearl

Person _qgiver_ face 1 group Chemist
Person _agent_ group Questor male
Person _dummymage_ face 1 faction The_Mages_Guild
Person _dummyorc_ face 1 named Gortwog
Person _dummydarkb_ face 49 faction The_Dark_Brotherhood

Place _dungeon_ remote dungeon
Place _meetingplace_ local apothecary

Clock _extratime_ 00:30 0 flag 1 range 0 1
Clock _totaltime_ 90.00:00 0 flag 17 range 0 2

Foe _guardian_ is Daedra_seducer
Foe _monster_ is Orc_shaman
Foe _orc_ is Orc_warlord
Foe _daedras_ is Daedroth

--	Quest start-up:
	start timer _totaltime_ 
	reveal _dungeon_ 
	log 1010 step 0 
	give item _ingredient_ to _guardian_ 
	place foe _guardian_ at _dungeon_ 
	place npc _qgiver_ at _meetingplace_ 

_giveingredient_ task:
	toting _ingredient_ and _qgiver_ clicked saying 1013 
	give item _ingredient_ to _monster_ 
	cast Shield spell on _monster_ 
	cast Spell_Reflection spell on _monster_ 

_hitguardian_ task:
	injured _guardian_ 
	prompt 1012 yes _yes_ no _no_ 
--a task yes without underscores is a prima facie danger, though it hasn't caused any problems yet. tasks, items, and so forth should have underscores for style and execution

_yes_ task:
	log 1011 step 1 
	get item _token_ 
	say 1030 
	restrain foe _guardian_ 

_no_ task:
	say 1035 

--unused variable _clickonqgiver_
variable _clickonqgiver_
_givetoken_ task:
	toting _token_ and _qgiver_ clicked saying 1014 
	cast Silence spell on _monster_ 

_shamandead_ task:
	killed 1 _monster_ 
	start timer _extratime_ 

_givereward_ task:
	when _givetoken_ and _shamandead_ 
	change repute with _dummymage_ by +25
	change repute with _dummyorc_ by -10 
	say 1015
	--"saying ###" as an argument here is unsupported, I gave it its own line

_extratime_ task:
	make _ingredient_ permanent 
	end quest 

_totaltime_ task:
	make _ingredient_ permanent 
	end quest 

_revealmonsters_ task:
	when _giveingredient_ or _givetoken_ 
	create foe _orc_ every 1 minutes 1 times with 100% success 
	hide npc _qgiver_ 
	place foe _monster_ at _meetingplace_ 

_S.11_ task:
	killed 1 _guardian_ 

_betrayguardian_ task:
	when _yes_ and _S.11_ 
	create foe _daedras_ every 1 minutes 3 times with 100% success 
	take _token_ from pc saying 1020 
	change repute with _dummydarkb_ by -75 
