-- Quest: C:\QUESTS\WORKING\S0000502.Qbn.
-- Main story quest.
-- QuestId: 502
Messages: 71
Quest: S0000502
DisplayName: Former Student Part II
-- Message panels
QRC:

QuestComplete:  [1004]
<ce>            Here's a little something I've been working on.
<ce>                    See how you like it.  I'm off!

Message:  1020
%qdt:
 _rebel_, the rebel mage
 who was once my quarry, has
 asked me to meet his messenger
 in _tavern_ in __tavern_
 of ____tavern_.

Message:  1021
%qdt:
 An atronach sent by _rebel_
 informed me that he would like me
 to help him explore Direnni Tower
 on the Isle of Balfiera.
 _rebel_ will meet me there,
 somewhere.

Message:  1030
%pcn:  Greetings!
 
 I hope this note finds you well.
 Are you interested in a little
 adventure?  If so, meet my messenger
 at _tavern_ in __tavern_
 in ____tavern_.
 
<ce>                 Your partner in Unsanctioned Magery,
<ce>                                    
<ce>                                _rebel_

Message:  1031
<ce>                 A faint scent of brimstone greets you
<ce>                     as you walk through the door.
<ce>                    Is that an atronach over there?
<ce>                       With a note pinned to its
<ce>                        back saying, "HIT ME"?

Message:  1032
<ce>                     The atronach intones stonily:
<ce>                                    
<ce>                    "Hello %pcn.  I am =atronach_,
<ce>                      humble servant of _rebel_.
<ce>                 He asks if you would like to explore
<ce>                 Direnni Tower on the Isle of Balfiera
<ce>                  with him.  A magical place full of
<ce>                 wonders beyond imagining.  My master
<ce>               will wait inside for =towertime_ days."
<ce>                                    
<ce>                   With that, =atronach_ disappears
<ce>                          in a puff of smoke.

Message:  1040
<ce>                     %pcf, good to see you again!
<ce>                   You seem to have started without
<ce>                   me -- that chest you're carrying
<ce>                  is exactly the thing I was looking
<ce>                   for.  You don't mind if I borrow
<ce>                     it, do you?  Thanks so much!

Message:  1041
<ce>                   %pcf, I'm glad you could join my
<ce>                  little party.  Listen, I'm looking
<ce>                   for one specific thing, a _item_
<ce>                  which I believe is somewhere within
<ce>                 Direnni Tower.  You can keep anything
<ce>                 else we find, all I want is that box.
<ce>               Well then, let's be on our way, shall we?

Message:  1042
<ce>               Ah, this is the _item_ I was looking for.
<ce>              Hmm, I was expecting there to be some kind
<ce>                        of guardian... uh oh...

Message:  1043
<ce>                       Well then, it's been fun.
<ce>                        Perhaps we can do this
<ce>                        again sometime.  Ta ta!

Message:  1050
<ce>                       Take that! and that! you
<ce>                           moldy old thing!

Message:  1051
<ce>                        That's the spirit!  How
<ce>                     about a little of this, too!

Message:  1052
<ce>                      Bloody hell, let's get out
<ce>                        of here!  If I can just
<ce>                       get this spell to work...

Message:  1070
<ce>                A raven circles overhead, then alights
<ce>                 on your shoulder.  Most unusually, it
<ce>               is carrying an engraved card in its beak.
<ce>              It fixes you with one beady eye, tucks the
<ce>                 card into your shirt, and flaps away.


-- Symbols used in the QRC file:
--
--                %g occurs 2 times.
--               %g2 occurs 2 times.
--               %g3 occurs 1 time.
--              %pcf occurs 2 times.
--              %pcn occurs 2 times.
--              %qdt occurs 2 times.
--        =atronach_ occurs 2 times.
--       =towertime_ occurs 2 times.
--       ____tavern_ occurs 6 times.
--            _item_ occurs 2 times.
--           _rebel_ occurs 5 times.
--          _tavern_ occurs 3 times.

QBN:
Item _letter_ letter used 1030
Item _item_ item class 1 subclass 10
Item _reward_ item class 4 subclass 3

Person _rebel_ face 1 named Baltham_Greyman

Place _tavern_ remote tavern
Place _direni1_ permanent DirenniTower2
Place _direni2_ permanent DirenniTower3
--Place aide remote dungeon
--changed _L.00_ and _L.01_. Quest system could not compile those symbols.
--using _direni1_ and _direni2_ now.
--"aide" concept useful in Daggerfall but obsolete for DFU.

Clock _S.00_ 31.06:00 93.18:00
Clock _S.03_ 30.00:00 0 flag 1 range 0 1
Clock _towertime_ 31.06:00 0 flag 1 range 0 1
Clock _S.18_ 00:01 0 flag 1 range 0 1
Clock _outgoing_ 62.12:00 97.05:20
--moving the delay from the start of Part 3 to the end of Part 2.
--The engine could not find a place to put Baltham Greyman
--in Isle of Balfiera. Hopefully in 2-3 months the player
--moves to a region compatible with Part 3.

Foe _atronach_ is Iron_atronach
Foe _guardian_ is Fire_daedra
Foe _monster1_ is Mummy
Foe _monster2_ is Zombie

--	Quest start-up:
	start timer _S.00_ 
	pc at _direni1_ set _S.10_ 

_S.00_ task:
	pc at _tavern_ set _S.05_ 
	_letter_ used do _readletter_ 
	place item _item_ at _direni2_ 
	start timer _S.03_ 
	give pc _letter_ notify 1070 
	place npc _rebel_ at _direni1_ 

_S.01_ task:
	injured _atronach_ 
	start timer _towertime_ 
	log 1021 step 1 
	reveal _direni1_ in province 9 at 204718 
	say 1032 
	remove foe _atronach_ 
	--replaced "place foe at remote dungeon" with "remove foe." Always cleaner implementation.

_readletter_ task:
	log 1020 step 0 

variable _S.03_
_S.04_ task:
	clicked npc _rebel_ 

_S.05_ task:
	say 1031 
	restrain foe _atronach_ 
	place foe _atronach_ at _tavern_ 

_S.06_ task:
	clicked item _item_ 
	place foe _guardian_ at _direni2_ 

_S.07_ task:
	when _S.04_ and not _S.06_ 
	hide npc _rebel_ 
	say 1041 
	add _rebel_ face 
	start task _accompany_

variable _accompany_
--S.07 is a tremendously faulty task here, so I have to add "accompany"
--as a permanent countermeasure.

_S.08_ task:
	toting _item_ and _rebel_ clicked 
	hide npc _rebel_
	say 1040 
	give pc _reward_ 
	start task _goout_

_outgoing_ task:
	start quest 503 503 
	end quest 
--moved sequel quest to here from "atronach injured" above.
--DFU considered the Baltham Greyman from 502 to also be the
--one from 503, mixing the quests together. 503 will now only
--start when 502 is successfully finished.

_S.09_ task:
	when _S.06_ and _accompany_ 
--	place item _item_ at aide 
	start timer _S.18_ 
	say 1042
--action to move item to hidden dungeon is obsolete in DFU. 

variable _S.10_
_S.11_ task:
	when _S.10_ and _accompany_ and not _goout_
	create foe _monster2_ every 7 minutes 10 times with 20% success 
	create foe _monster1_ every 5 minutes 10 times with 20% success 

_S.12_ task:
	injured _monster1_ 
	say 1050 
	cast Gods'_Fire spell on _monster1_ 
	unset _S.12_ 

_S.13_ task:
	injured _monster2_ 
	say 1051 
	cast Lightning spell on _monster2_ 
	unset _S.13_ 

_S.14_ task:
	when _S.03_ and not _S.01_ 
	end quest 

variable _towertime_
_S.16_ task:
	when not _S.10_ and _accompany_ 
	when _towertime_ and _accompany_ 
	say 1043 

_S.17_ task:
	when _S.16_ and _S.09_ 
	give pc _reward_ 
	start task _goout_

_goout_ task:
	remove log step 0
	remove log step 1
	drop _rebel_ face
	take _item_ from pc
	start timer _outgoing_
--go out task added to ensure you can fail the quest without triggering Part 3.
--any time you're victorious and leave the tower, Part 3 should trigger.

_S.18_ task:
	say 1052 
	cast Banish_Daedra spell on _guardian_

_timeup_ task:
	when _towertime_ and not _goout_
	when _S.16_ and not _goout_
	end quest
