// creator  : weidu.exe (version 23100)
// argument : MGAPPR02.DLG
// game		 : .
// source	 : ./DATA/DIALOG.BIF
// dialog	 : ./DIALOG.TLK
// dialogF  : (none)

BEGIN ~MGAPPR02~

IF ~~ THEN BEGIN 0 // from: MGTEOS01:27.0
  SAY #40826 /* ~H-hello, <CHARNAME>. It will be an honor to study in your shadow.~ */
  IF ~~ THEN EXTERN ~MGTEOS01~ 28
END

IF ~NumTimesTalkedTo(0)~ THEN BEGIN 1 // from:
  SAY #41058 /* ~Y-yes teacher? Have you valuable instruction to give us?~ */
  IF ~~ THEN REPLY #41401 /* ~There's no need for such formality. What exactly have you been studying?~ */ EXTERN ~MGAPPR01~ 2
  IF ~~ THEN REPLY #41402 /* ~Just stay out of my way. You do that and you'll have it easy.~ */ GOTO 2
  IF ~~ THEN REPLY #41403 /* ~Ahh, the eagerness of youth. I shall give of my wisdom and you shall flourish.~ */ EXTERN ~MGAPPR01~ 1
END

IF ~~ THEN BEGIN 2 // from: 1.1
  SAY #41404 /* ~Very well. Might I ask if there is anything in particular you would want us concentrating on?~ */
  IF ~~ THEN REPLY #41735 /* ~Oh all right. What has your course of study included so far?~ */ EXTERN ~MGAPPR01~ 2
  IF ~~ THEN REPLY #41736 /* ~No. Leave me be. I do not want this little duty and I do not need you here.~ */ EXTERN ~MGAPPR03~ 3
END

IF ~~ THEN BEGIN 3 // from: MGAPPR03:1.0
  SAY #41728 /* ~Yes, well, be that as it may, would you care to direct us in what we should be doing? Our lessons are already covered, but you decide the nature of our assignment.~ */
  IF ~~ THEN REPLY #41737 /* ~Certainly, certainly. What have your studies included so far?~ */ EXTERN ~MGAPPR01~ 2
  IF ~~ THEN REPLY #41738 /* ~No, no, no, you should do this on your own. Best way to learn.~ */ EXTERN ~MGAPPR03~ 3
END

IF ~~ THEN BEGIN 4 // from: MGAPPR01:3.0
  SAY #41733 /* ~Stop it! We have to start somewhere. <CHARNAME>, if you would direct us in what our next assignment should be then we can begin.~ */
  IF ~~ THEN GOTO 13
END

IF ~~ THEN BEGIN 5 // from: MGAPPR03:5.0
  SAY #41744 /* ~Settle down. <CHARNAME>? We really need your help here. I can pull some random lessons from the tomes, but I would prefer your guidance.~ */
  IF ~~ THEN REPLY #41745 /* ~Very well. What is it that you are studying right now?~ */ EXTERN ~MGAPPR01~ 2
  IF ~~ THEN REPLY #41746 /* ~Nonsense. Go your own way and see what comes! Trust me, you'll do fine.~ */ EXTERN ~MGAPPR01~ 6
  IF ~~ THEN REPLY #41747 /* ~I want nothing to do with your 'lessons'. Use what you must but don't bother me.~ */ EXTERN ~MGAPPR01~ 6
END

IF ~~ THEN BEGIN 6 // from: MGAPPR03:6.0
  SAY #41750 /* ~Very well. I shall determine what would be best for our learning environment.~ */
  IF ~~ THEN EXTERN ~MGAPPR01~ 7
END

IF ~~ THEN BEGIN 7 // from: MGAPPR01:9.0
  SAY #41756 /* ~QUIET DOWN! *ahem* I'm sorry Nara, but I think Larz is right.~ */
  IF ~~ THEN EXTERN ~MGAPPR01~ 10
END

IF ~~ THEN BEGIN 8 // from: MGAPPR01:10.0
  SAY #41758 /* ~Yes, well, I think we should really stretch ourselves. We should do something that will really show what we can do. I think we should... I think we should...~ */
  IF ~~ THEN EXTERN ~MGAPPR01~ 11
END

IF ~~ THEN BEGIN 9 // from: MGAPPR01:11.0
  SAY #41760 /* ~I think we should enchant a Ring of Wizardry.~ */
  IF ~~ THEN EXTERN ~MGAPPR01~ 12
END

IF ~~ THEN BEGIN 10 // from: MGAPPR01:12.0
  SAY #41762 /* ~Yes it is, so we should be really careful. Understand? Now get to work. We've read the theory and know the basics. Let's get to it.~ */
  IF ~~ THEN GOTO 11
END

IF ~~ THEN BEGIN 11 // from: 10.0
  SAY #41763 /* ~Thank you, <CHARNAME>, we won't bother you again.~ */
  IF ~~ THEN DO ~SetGlobal("AllGoingToDie","GLOBAL",1)
SetGlobal("DropWizRing","AR0411",1)
SetGlobalTimer("TeolAppear","GLOBAL",FOUR_DAYS)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)~ UNSOLVED_JOURNAL #55633 /* ~Mage Stronghold: Apprentice crap.

Apparently those apprentices that were dumped on me were supposed to take instruction and make what I directed. I have no time to care, so I just cut them loose. Let's see what they can do on their own. Might be a bit dangerous, but they have to learn sometime, right?~ */ EXIT
END

IF ~Global("AllGoingToDie","GLOBAL",1)~ THEN BEGIN 12 // from:
  SAY #41764 /* ~No need for you to worry. We won't bother you at all while here. I think the lesson is going well.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 13 // from: 4.0
  SAY #41767 /* ~We have some choice in this, or rather, you do. You will be the owner of whatever we make. In minor enchantments we have a couple of useful things.~ */
  IF ~~ THEN EXTERN ~MGAPPR01~ 14
END

IF ~~ THEN BEGIN 14 // from: MGAPPR03:10.0
  SAY #41770 /* ~Very good, though I would prefer something a little more practical still. A ring of Protection is a standard test in this discipline. It is... a little risky though. What say you, <CHARNAME>? It would cost 2,000 gold.~ */
  IF ~PartyGoldGT(999)~ THEN REPLY #41771 /* ~I think you should make me the Wand of the Apprenti. I could use that.~ */ DO ~TakePartyGold(1000)~ UNSOLVED_JOURNAL #55634 /* ~Mage Stronghold: Young minds to mold.

The apprentices have given me a unique opportunity. I am to give them instruction, guiding their learning, and they will attempt to make me magical items. Each week they will display their results as they work on their talents. Already it sounds as though the range of items is quite broad. I look forward to seeing what they can do.~ */ EXTERN ~MGAPPR01~ 15
  IF ~PartyGoldGT(249)~ THEN REPLY #41772 /* ~The Dagger of <CHARNAME> sounds really nice.~ */ DO ~TakePartyGold(250)~ UNSOLVED_JOURNAL #55634 /* ~Mage Stronghold: Young minds to mold.

The apprentices have given me a unique opportunity. I am to give them instruction, guiding their learning, and they will attempt to make me magical items. Each week they will display their results as they work on their talents. Already it sounds as though the range of items is quite broad. I look forward to seeing what they can do.~ */ EXTERN ~MGAPPR03~ 11
  IF ~PartyGoldGT(1999(~ THEN REPLY #41773 /* ~You should try for the Ring of Protection. Very useful.~ */ DO ~TakePartyGold(2000)~ UNSOLVED_JOURNAL #55634 /* ~Mage Stronghold: Young minds to mold.

The apprentices have given me a unique opportunity. I am to give them instruction, guiding their learning, and they will attempt to make me magical items. Each week they will display their results as they work on their talents. Already it sounds as though the range of items is quite broad. I look forward to seeing what they can do.~ */ GOTO 16
  IF ~~ THEN REPLY #41916 /* ~This is all too expensive for now. I'll get back to you on this.~ */ UNSOLVED_JOURNAL #55634 /* ~Mage Stronghold: Young minds to mold.

The apprentices have given me a unique opportunity. I am to give them instruction, guiding their learning, and they will attempt to make me magical items. Each week they will display their results as they work on their talents. Already it sounds as though the range of items is quite broad. I look forward to seeing what they can do.~ */ GOTO 78
END

IF ~~ THEN BEGIN 15 // from: MGAPPR01:15.0
  SAY #41775 /* ~It will take a while to do it properly. I think a few days will do it. Yes, that will suffice. In that time you will have your item, <CHARNAME>. Wish us well.~ */
  IF ~~ THEN DO ~SetGlobal("Apprenti","GLOBAL",1)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)~ EXIT
END

IF ~~ THEN BEGIN 16 // from: 79.2 14.2
  SAY #41777 /* ~Very good. Like I said, there is some danger, so Larz will probably like it, but we're sure to have it for you in a reasonable amount of time.~ */
  IF ~RandomNumGT(100,0)
RandomNumLT(100,71)~ THEN GOTO 18
  IF ~RandomNumGT(100,69)
~ THEN GOTO 19
END

IF ~~ THEN BEGIN 17 // from: MGAPPR03:11.0
  SAY #41778 /* ~It will take a while to do it properly. I think a few days will do it. Yes, that will suffice. In that time you will have your item, <CHARNAME>. Wish us well.~ */
  IF ~~ THEN DO ~SetGlobal("Apprenti","GLOBAL",2)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)~ EXIT
END

IF ~~ THEN BEGIN 18 // from: 16.0
  SAY #41779 /* ~It will take a while to do it properly. I think four or five days will do it. Yes, that will suffice. In that time you will have your item, <CHARNAME>. Wish us well.~ */
  IF ~~ THEN DO ~SetGlobal("Apprenti","GLOBAL",3)
SetGlobal("KillLarz","GLOBAL",1)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)~ EXIT
END

IF ~~ THEN BEGIN 19 // from: 16.1
  SAY #41780 /* ~It will take a while to do it properly. I think four days will do it. Yes, that will suffice. In that time you will have your item, <CHARNAME>. Wish us well.~ */
  IF ~~ THEN DO ~SetGlobal("Apprenti","GLOBAL",6)
SetGlobal("KillLarz","GLOBAL",1)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)~ EXIT
END

IF ~~ THEN BEGIN 20 // from: MGAPPR03:11.1
  SAY #41781 /* ~It will take a while to do it properly. I think four days will do it. Yes, that will suffice. In that time you will have your item, <CHARNAME>. Wish us well.~ */
  IF ~~ THEN DO ~SetGlobal("Apprenti","GLOBAL",5)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)~ EXIT
END

IF ~~ THEN BEGIN 21 // from: MGAPPR01:15.1
  SAY #41782 /* ~It will take a while to do it properly. I think four days will do it. Yes, that will suffice. In that time you will have your item, <CHARNAME>. Wish us well.~ */
  IF ~~ THEN DO ~SetGlobal("Apprenti","GLOBAL",4)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)~ EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)
!GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
OR(2)
Global("Apprenti","GLOBAL",1)
Global("Apprenti","GLOBAL",4)
~ THEN BEGIN 22 // from:
  SAY #41783 /* ~That wand will be ready soon enough. Frankly, if it were up to me, we would take longer on all weapons.~ */
  IF ~~ THEN EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)
!GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
OR(2)
Global("Apprenti","GLOBAL",2)
Global("Apprenti","GLOBAL",5)~ THEN BEGIN 23 // from:
  SAY #41784 /* ~The dagger is coming nicely. I would have preferred the ring, but a dagger will teach just as well, I'm sure.~ */
  IF ~~ THEN EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)
!GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
OR(2)
Global("Apprenti","GLOBAL",3)
Global("Apprenti","GLOBAL",6)~ THEN BEGIN 24 // from:
  SAY #41785 /* ~I've got the basics of the ring figured out, but it is still a dangerous bit of magic. I worry about that sometimes.~ */
  IF ~~ THEN REPLY #41802 /* ~You'll do fine, I know it. Just do your best.~ */ GOTO 25
  IF ~~ THEN REPLY #41803 /* ~I don't blame you. Too many mistakes and you'll never make it as a mage.~ */ GOTO 26
END

IF ~~ THEN BEGIN 25 // from: 24.0
  SAY #41804 /* ~I appreciate that, but I still worry.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 26 // from: 24.1
  SAY #41805 /* ~Great. Now I'll never get to sleep.~ */
  IF ~~ THEN EXIT
END

IF ~!InPartySlot(LastTalkedToBy,0)~ THEN BEGIN 27 // from:
  SAY #41806 /* ~I really must get back to my work. I cannot waste time speaking with just anyone. Only <CHARNAME> should be interrupting my studies.~ */
  IF ~~ THEN EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)
GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
Global("ApprentiJob","GLOBAL",0)~ THEN BEGIN 28 // from:
  SAY #41807 /* ~Well, that was an interesting lesson.~ */
  IF ~Global("Apprenti","GLOBAL",1)~ THEN DO ~SetGlobal("ApprentiJob","GLOBAL",1)~ EXTERN ~MGAPPR01~ 22
  IF ~Global("Apprenti","GLOBAL",2)~ THEN DO ~SetGlobal("ApprentiJob","GLOBAL",1)~ EXTERN ~MGAPPR03~ 18
  IF ~OR(2)
Global("Apprenti","GLOBAL",3)
Global("Apprenti","GLOBAL",6)~ THEN DO ~SetGlobal("ApprentiJob","GLOBAL",1)~ EXTERN ~MGAPPR03~ 23
  IF ~Global("Apprenti","GLOBAL",4)~ THEN DO ~SetGlobal("ApprentiJob","GLOBAL",1)~ GOTO 37
  IF ~Global("Apprenti","GLOBAL",5)~ THEN DO ~SetGlobal("ApprentiJob","GLOBAL",1)~ GOTO 38
END

IF ~~ THEN BEGIN 29 // from: MGAPPR01:22.0
  SAY #41808 /* ~What Larz means, teacher, is that we were successful in our studies. I present to you the Wand of the Apprenti. Just... keep it pointed somewhere else.~ */
  IF ~~ THEN DO ~CreateItem("wand15",50,0,0)
GiveItem("wand15",Player1)~ EXTERN ~MGAPPR01~ 25
END

IF ~~ THEN BEGIN 30 // from: MGAPPR03:18.0
  SAY #41809 /* ~What Nara is trying to say is that we successfully made the dagger you requested. It was certainly a challenge, and we are all pleased of the results.~ */
  IF ~~ THEN EXTERN ~MGAPPR03~ 19
END

IF ~~ THEN BEGIN 31 // from: MGAPPR03:23.0
  SAY #41810 /* ~I... I am sorry, Nara. <CHARNAME>, we had a... little accident.~ */
  IF ~~ THEN EXTERN ~MGAPPR03~ 24
END

IF ~~ THEN BEGIN 32 // from: MGAPPR03:24.0
  SAY #41811 /* ~Larz is dead. There, I've said it. It's not as if you couldn't tell, what with the stain where he...~ */
  IF ~Global("Apprenti","GLOBAL",3)~ THEN GOTO 33
  IF ~Global("Apprenti","GLOBAL",6)~ THEN GOTO 34
END

IF ~~ THEN BEGIN 33 // from: 32.0
  SAY #41812 /* ~We made the ring. That's good, isn't it? Have to break some eggs, and all that?~ */
  IF ~~ THEN DO ~CreateItem("ring06",0,0,0)
GiveItem("ring06",[PC])~ EXTERN ~MGAPPR03~ 25
END

IF ~~ THEN BEGIN 34 // from: 32.1
  SAY #41813 /* ~We... we also failed to make the ring. Larz was trying to infuse the metal and...~ */
  IF ~~ THEN EXTERN ~MGAPPR03~ 26
END

IF ~~ THEN BEGIN 35 // from: MGAPPR03:25.0 MGAPPR03:22.0 MGAPPR03:20.0 36.0 MGAPPR01:31.0 MGAPPR01:29.0
  SAY #41816 /* ~Regardless, we must now move on to another lesson and task. If you would be so good, <CHARNAME>, as to approve the next project?~ */
  IF ~~ THEN EXTERN ~MGAPPR03~ 30
END

IF ~~ THEN BEGIN 36 // from: MGAPPR03:26.0
  SAY #41829 /* ~Look, magic is dangerous! He knew it! You know it! I... I know it too. Let's... I'm sorry. There's nothing I can do.~ */
  IF ~~ THEN GOTO 35
END

IF ~~ THEN BEGIN 37 // from: 28.3
  SAY #41831 /* ~I'm afraid we did not succeed in making the wand.~ */
  IF ~~ THEN EXTERN ~MGAPPR03~ 27
END

IF ~~ THEN BEGIN 38 // from: 28.4
  SAY #41832 /* ~The... the dagger didn't work out the way it should have, <CHARNAME>.~ */
  IF ~~ THEN EXTERN ~MGAPPR01~ 30
END

IF ~~ THEN BEGIN 39 // from: MGAPPR03:28.0
  SAY #41836 /* ~It doesn't matter! What matters is that we learned from it.~ */
  IF ~~ THEN EXTERN ~MGAPPR01~ 29
END

IF ~~ THEN BEGIN 40 // from: MGAPPR03:30.0
  SAY #41838 /* ~If we fall behind we'll never catch up. You know that. No, we've got to keep the pressure up. <CHARNAME>, here is what we must work on next.~ */
  IF ~~ THEN GOTO 41
END

IF ~~ THEN BEGIN 41 // from: 40.0
  SAY #41843 /* ~We'll be inscribing new spells this tenday. This is the most basic function of working with magic. The only question really is how difficult of a task should we try?~ */
  IF ~~ THEN GOTO 42
END

IF ~~ THEN BEGIN 42 // from: 41.0
  SAY #41844 /* ~There is a Mislead scroll which will cost 250 gold in supplies, Abi Dalzim's Horrid Wilting at 1,000 gold, and Meteor Swarm at 2,500 gold. That is also the order of difficulty.~ */
  IF ~PartyGoldGT(249)~ THEN REPLY #41845 /* ~I imagine this will be the safest one.  Try to make the Mislead scroll.~ */ DO ~TakePartyGold(250)~ GOTO 43
  IF ~PartyGoldGT(999)~ THEN REPLY #41846 /* ~This is a good middle ground for difficulty. Horrid Wilting is the scroll to make.~ */ DO ~TakePartyGold(1000)~ GOTO 44
  IF ~PartyGoldGT(2499)~ THEN REPLY #41847 /* ~Go for the hard one. What's life without risk... besides long. Meteor Swarm.~ */ DO ~TakePartyGold(2500)~ GOTO 45
  IF ~~ THEN REPLY #41925 /* ~Wait for a bit until I raise enough gold. I don't want you using cheap supplies.~ */ GOTO 80
END

IF ~~ THEN BEGIN 43 // from: 82.0 42.0
  SAY #41848 /* ~Very well.  We'll start working on the Mislead scroll.~ */
  IF ~~ THEN EXTERN ~MGAPPR03~ 31
END

IF ~~ THEN BEGIN 44 // from: 82.1 42.1
  SAY #41849 /* ~Horrid Wilting it is then.~ */
  IF ~~ THEN EXTERN ~MGAPPR03~ 32
END

IF ~~ THEN BEGIN 45 // from: 82.2 42.2
  SAY #41850 /* ~We shall try and make Meteor Swarm for you.~ */
  IF ~~ THEN EXTERN ~MGAPPR03~ 33
END

IF ~~ THEN BEGIN 46 // from: MGAPPR03:31.0
  SAY #41854 /* ~Yes, we'll be done before we know it. A few days I think.~ */
  IF ~~ THEN DO ~SetGlobal("Apprenti","GLOBAL",7)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)~ EXIT
END

IF ~~ THEN BEGIN 47 // from: MGAPPR03:31.1
  SAY #41855 /* ~Yes, we'll be done before we know it. Another four days I think.~ */
  IF ~~ THEN DO ~SetGlobal("Apprenti","GLOBAL",8)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)~ EXIT
END

IF ~~ THEN BEGIN 48 // from: MGAPPR03:32.0
  SAY #41856 /* ~We'll be okay. We've got to learn this stuff sooner or later. Four or five days from now and we'll be laughing about how hard we thought it was.~ */
  IF ~~ THEN DO ~SetGlobal("Apprenti","GLOBAL",9)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)~ EXIT
END

IF ~~ THEN BEGIN 49 // from: MGAPPR03:32.1
  SAY #41857 /* ~We'll be okay. We've got to learn this stuff sooner or later. A few days from now and we'll be laughing about how hard we thought it was.~ */
  IF ~~ THEN DO ~SetGlobal("Apprenti","GLOBAL",9)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)~ EXIT
END

IF ~~ THEN BEGIN 50 // from: MGAPPR03:33.0
  SAY #41858 /* ~Scary or not, we've got to do it. We have to learn. That's all there is to it.~ */
  IF ~~ THEN DO ~SetGlobal("Apprenti","GLOBAL",11)
SetGlobal("KillNara","GLOBAL",1)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)~ EXIT
END

IF ~~ THEN BEGIN 51 // from: MGAPPR03:33.1
  SAY #41859 /* ~Scary or not, we've got to do it. We have to learn. That's all there is to it.~ */
  IF ~~ THEN DO ~SetGlobal("Apprenti","GLOBAL",12)
SetGlobal("KillNara","GLOBAL",1)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)~ EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)
!GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
OR(2)
Global("Apprenti","GLOBAL",7)
Global("Apprenti","GLOBAL",8)
~ THEN BEGIN 52 // from:
  SAY #41860 /* ~This isn't much of a challenge, but perhaps it is best we go the safe route.~ */
  IF ~~ THEN EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)
!GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
OR(2)
Global("Apprenti","GLOBAL",9)
Global("Apprenti","GLOBAL",10)
~ THEN BEGIN 53 // from:
  SAY #41861 /* ~I'm comfortable with this. I think everything will be all right.~ */
  IF ~~ THEN EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)
!GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
OR(2)
Global("Apprenti","GLOBAL",11)
Global("Apprenti","GLOBAL",12)~ THEN BEGIN 54 // from:
  SAY #41862 /* ~This really makes me nervous, but if you want to be a powerful mage I guess you have to work with powerful magic.~ */
  IF ~~ THEN EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)
GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
Global("ApprentiJob","GLOBAL",1)
!Global("PoorMage","GLOBAL",2)
~ THEN BEGIN 55 // from:
  SAY #41869 /* ~Hello <CHARNAME>. I am ready to tell you exactly what happened with our last task.~ */
  IF ~Global("Apprenti","GLOBAL",7)~ THEN DO ~SetGlobal("ApprentiJob","GLOBAL",2)~ GOTO 56
  IF ~Global("Apprenti","GLOBAL",8)~ THEN DO ~SetGlobal("ApprentiJob","GLOBAL",2)~ GOTO 57
  IF ~Global("Apprenti","GLOBAL",9)~ THEN DO ~SetGlobal("ApprentiJob","GLOBAL",2)~ GOTO 58
  IF ~Global("Apprenti","GLOBAL",10)~ THEN DO ~SetGlobal("ApprentiJob","GLOBAL",2)~ GOTO 59
  IF ~OR(2)
Global("Apprenti","GLOBAL",11)
Global("Apprenti","GLOBAL",12)~ THEN DO ~SetGlobal("ApprentiJob","GLOBAL",2)~ GOTO 60
END

IF ~~ THEN BEGIN 56 // from: 55.0
  SAY #41870 /* ~We did pretty good, if I might say so.~ */
  IF ~~ THEN DO ~CreateItem("scrl7k",1,1,0)
GiveItem("scrl7k",LastTalkedToBy())~ EXTERN ~MGAPPR03~ 37
END

IF ~~ THEN BEGIN 57 // from: 55.1
  SAY #41871 /* ~The result was less than I had expected, but it still taught us something.~ */
  IF ~~ THEN EXTERN ~MGAPPR03~ 38
END

IF ~~ THEN BEGIN 58 // from: 55.2
  SAY #41872 /* ~We did quite well!~ */
  IF ~~ THEN DO ~CreateItem("scrl9G",1,1,0)
GiveItem("scrl9G",LastTalkedToBy())~ EXTERN ~MGAPPR03~ 39
END

IF ~~ THEN BEGIN 59 // from: 55.3
  SAY #41873 /* ~We... did not do as well as I had hoped, though it was a difficult task to ask for.~ */
  IF ~~ THEN EXTERN ~MGAPPR03~ 40
END

IF ~~ THEN BEGIN 60 // from: 55.4
  SAY #41874 /* ~I'm afraid... I'm afraid that Nara...~ */
  IF ~!Dead("mgappr01")~ THEN EXTERN ~MGAPPR01~ 39
  IF ~Dead("mgappr01")~ THEN GOTO 61
END

IF ~~ THEN BEGIN 61 // from: 60.1 MGAPPR01:39.0
  SAY #41875 /* ~No use dancing about the subject. An explosion took her. She is dead and there is nothing that can be done. Such force...~ */
  IF ~Global("Apprenti","GLOBAL",12)~ THEN GOTO 63
  IF ~Global("Apprenti","GLOBAL",11)~ THEN GOTO 64
END

IF ~~ THEN BEGIN 62 // from: MGAPPR03:40.1 MGAPPR03:39.0 MGAPPR03:38.0 MGAPPR03:37.1 64.0 63.0 MGAPPR01:41.0 MGAPPR01:40.0 MGAPPR01:38.0 MGAPPR01:37.0 MGAPPR01:36.0 MGAPPR01:35.0
  SAY #41878 /* ~Yes, well, that said, it is time to move on to the final leg of the tasks set out in the tomes. There are no more preparatory lessons. Now comes the real test.~ */
  IF ~Dead("mgappr01")~ THEN GOTO 65
  IF ~!Dead("mgappr01")~ THEN EXTERN ~MGAPPR01~ 42
END

IF ~~ THEN BEGIN 63 // from: 61.0
  SAY #41886 /* ~All for naught. All for naught. The inscription failed... violently... No spell, and no more Nara. I... I don't know... what went wrong...~ */
  IF ~Dead("mgappr01")~ THEN GOTO 62
  IF ~!Dead("mgappr01")~ THEN EXTERN ~MGAPPR01~ 40
END

IF ~~ THEN BEGIN 64 // from: 61.1
  SAY #41887 /* ~We made the spell. It worked. It all seemed good, and then a slip of the tongue... a twitch in a casting finger...~ */
  IF ~Dead("mgappr01")~ THEN DO ~CreateItem("scrl9t",1,1,0)
GiveItem("scrl9t",LastTalkedToBy())~ GOTO 62
  IF ~!Dead("mgappr01")~ THEN DO ~CreateItem("scrl9t",1,1,0)
GiveItem("scrl9t",LastTalkedToBy())~ EXTERN ~MGAPPR01~ 41
END

IF ~~ THEN BEGIN 65 // from: 62.0 MGAPPR01:42.0
  SAY #41891 /* ~The pace must be kept up if the lessons are to properly teach the rigors of magic. <CHARNAME>, here are the details of the next lesson.~ */
  IF ~~ THEN GOTO 66
END

IF ~~ THEN BEGIN 66 // from: 65.0
  SAY #41892 /* ~Now comes serious enchantment. These items are powerful, and also potentially deadly if not constructed properly. They show the true benefits of magical infusion.~ */
  IF ~~ THEN GOTO 67
END

IF ~~ THEN BEGIN 67 // from: 66.0
  SAY #41893 /* ~I don't know if they are appropriate for apprentices to make, but it is time to find out. The first is the Robe of the Apprenti, and uses many principles of magic. It will cost 250 gold to make.~ */
  IF ~~ THEN GOTO 68
END

IF ~~ THEN BEGIN 68 // from: 67.0
  SAY #41894 /* ~The second is the Ring of Wizardry. Such rings are legendary in their usefulness. Usually only masters make them, but I would like to try. It will cost 3,000 gold to make.~ */
  IF ~~ THEN GOTO 69
END

IF ~~ THEN BEGIN 69 // from: 68.0
  SAY #41895 /* ~The third is... is from the advanced class. I borrowed a tome from a friend of mine who said no one has attempted it in years. It is armor for a mage. It is a Staff of Power, and will cost... 10,000 gold.~ */
  IF ~Dead("mgappr01")
Dead("mgappr03")~ THEN GOTO 70
  IF ~!Dead("mgappr01")~ THEN EXTERN ~MGAPPR01~ 43
  IF ~!Dead("mgappr03")
Dead("mgappr01")~ THEN EXTERN ~MGAPPR03~ 41
END

IF ~~ THEN BEGIN 70 // from: MGAPPR03:41.0 69.0 MGAPPR01:43.0
  SAY #41896 /* ~There is risk in all of these, particularly the last one. I think they are doable, but the making will be difficult, almost assuredly deadly.~ */
  IF ~~ THEN GOTO 71
END

IF ~~ THEN BEGIN 71 // from: 70.0
  SAY #41897 /* ~Which will it be, <CHARNAME>? Which should it be?~ */
  IF ~PartyGoldGT(249)~ THEN REPLY #41900 /* ~Well, if it does prove deadly, I should like the Robe of the Apprenti to remember you by.~ */ DO ~TakePartyGold(250)~ GOTO 75
  IF ~PartyGoldGT(2999)~ THEN REPLY #41901 /* ~The Ring of Wizardry is a must. I just know you can do it.~ */ DO ~TakePartyGold(3000)~ GOTO 76
  IF ~PartyGoldGT(9999)~ THEN REPLY #41902 /* ~If you are willing, then I say go for the Staff of Power. It will be glorious.~ */ DO ~TakePartyGold(10000)~ GOTO 77
  IF ~~ THEN REPLY #41903 /* ~This is all too risky. The best lesson to learn is when to back away. Stop this.~ */ GOTO 72
  IF ~~ THEN REPLY #41933 /* ~Wait, wait! I must raise the gold for these things.~ */ GOTO 83
END

IF ~~ THEN BEGIN 72 // from: 84.3 71.3
  SAY #41904 /* ~Are you sure of this? I imagine this will not be viewed as a failure, but it is certainly an anticlimactic way to end an apprenticeship.~ */
  IF ~~ THEN REPLY #41905 /* ~I am resolute in this. I'll not have you risk it.~ */ GOTO 73
  IF ~PartyGoldGT(249)~ THEN REPLY #41906 /* ~Then make the Robe of the Apprenti, and it shall serve as your legacy.~ */ DO ~TakePartyGold(250)~ GOTO 75
  IF ~PartyGoldGT(2999)~ THEN REPLY #41907 /* ~Then make me the ring of Wizardry. I know you can do it.~ */ DO ~TakePartyGold(3000)~ GOTO 76
  IF ~PartyGoldGT(9999)~ THEN REPLY #41908 /* ~Then go for the glory. Attempt the Staff of Power, and may the Fates be damned!~ */ DO ~TakePartyGold(10000)~ GOTO 77
  IF ~~ THEN REPLY #41941 /* ~Wait, I will return when I have enough gold for these things.~ */ GOTO 83
END

IF ~~ THEN BEGIN 73 // from: 72.0
  SAY #41909 /* ~Then the apprenticeship is over. I... I thank you for the opportunity to study under you.~ */
  IF ~!Dead("mgappr01")~ THEN EXTERN ~MGAPPR01~ 44
  IF ~!Dead("mgappr03")
Dead("mgappr01")~ THEN EXTERN ~MGAPPR03~ 42
  IF ~Dead("mgappr03")
Dead("mgappr01")~ THEN GOTO 74
END

IF ~~ THEN BEGIN 74 // from: 73.2 MGAPPR01:44.1
  SAY #41912 /* ~Teos will tell you if there are to be graduation ceremonies. I hope you will come if there are.~ */
  IF ~~ THEN DO ~SetGlobal("ApprentiOver","GLOBAL",1)
SetGlobalTimer("TeolAppear","GLOBAL",ONE_DAY)
ActionOverride("mgappr01",ForceSpell(Myself,DRYAD_TELEPORT))
ActionOverride("mgappr03",ForceSpell(Myself,DRYAD_TELEPORT))
EscapeArea()~ EXIT
END

IF ~~ THEN BEGIN 75 // from: 84.0 72.1 71.0
  SAY #41913 /* ~Then the Robe of the Apprenti is what it shall be. This may take another tenday to figure out, but I'm sure you will be pleased in the end.~ */
  IF ~RandomNumGT(100,0)
RandomNumLT(100,21)~ THEN GOTO 85
  IF ~RandomNumGT(100,20)~ THEN GOTO 86
END

IF ~~ THEN BEGIN 76 // from: 84.1 72.2 71.1
  SAY #41914 /* ~A Ring of Wizardry. This shall be the hardest thing I have ever attempted to construct. It will be a fine... conclusion to an apprenticeship. It will take a few days.~ */
  IF ~RandomNumGT(100,0)
RandomNumLT(100,51)~ THEN GOTO 91
  IF ~RandomNumGT(100,50)~ THEN GOTO 92
END

IF ~~ THEN BEGIN 77 // from: 84.2 72.3 71.2
  SAY #41915 /* ~Then... then the Staff of Power it shall be. A half-week. Check back then. You'll know in a few days if it worked.~ */
  IF ~RandomNumGT(100,0)
RandomNumLT(100,60)~ THEN GOTO 95
  IF ~RandomNumGT(100,60)~ THEN GOTO 96
END

IF ~~ THEN BEGIN 78 // from: 79.3 14.3
  SAY #41917 /* ~Very well, but do not take too long. We have academic deadlines we must meet.~ */
  IF ~~ THEN DO ~SetGlobal("PoorMage","GLOBAL",1)~ EXIT
END

IF ~Global("PoorMage","GLOBAL",1)~ THEN BEGIN 79 // from:
  SAY #41918 /* ~Ready to direct our lessons, <CHARNAME>? The choices available were the Wand of the Apprenti for 1,000, the Dagger of <CHARNAME> for 250, and the Ring of Protection for 2,000.~ */
  IF ~PartyGoldGT(999)~ THEN REPLY #41919 /* ~I think you should make me the Wand of the Apprenti. I could use that.~ */ DO ~TakePartyGold(1000)
SetGlobal("PoorMage","GLOBAL",0)~ EXTERN ~MGAPPR01~ 15
  IF ~PartyGoldGT(249)~ THEN REPLY #41920 /* ~The Dagger of <CHARNAME> sounds really nice.~ */ DO ~TakePartyGold(250)
SetGlobal("PoorMage","GLOBAL",0)~ EXTERN ~MGAPPR03~ 11
  IF ~PartyGoldGT(1999)~ THEN REPLY #41921 /* ~You should try for the Ring of Protection. Very useful.~ */ DO ~TakePartyGold(2000)
SetGlobal("PoorMage","GLOBAL",0)~ GOTO 16
  IF ~~ THEN REPLY #41922 /* ~This is all too expensive for now. I'll get back to you on this.~ */ GOTO 78
END

IF ~~ THEN BEGIN 80 // from: 82.3 42.3
  SAY #41926 /* ~Very well, but please hurry. We do not want to fall behind in our lessons.~ */
  IF ~~ THEN DO ~SetGlobal("PoorMage","GLOBAL",2)~ EXIT
END

IF ~Global("PoorMage","GLOBAL",2)~ THEN BEGIN 81 // from:
  SAY #41927 /* ~Hello again, <CHARNAME>. Do you wish to continue our studies into the researching and scribing of spells?~ */
  IF ~~ THEN GOTO 82
END

IF ~~ THEN BEGIN 82 // from: 81.0
  SAY #41928 /* ~There is Mislead which will cost 250 gold in supplies, Horrid Wilting at 1,000 gold, and Meteor Swarm at 2,500 gold. That is also the order of difficulty.~ */
  IF ~PartyGoldGT(249)~ THEN REPLY #41929 /* ~I imagine this will be the safest one. Mislead.~ */ DO ~TakePartyGold(250)
SetGlobal("PoorMage","GLOBAL",0)~ GOTO 43
  IF ~PartyGoldGT(999)~ THEN REPLY #41930 /* ~This is a good middle ground for difficulty. Horrid Wilting.~ */ DO ~TakePartyGold(1000)
SetGlobal("PoorMage","GLOBAL",0)~ GOTO 44
  IF ~PartyGoldGT(2499)~ THEN REPLY #41931 /* ~Go for the hard one. What's life without risk... besides long. Meteor Swarm.~ */ DO ~TakePartyGold(2500)
SetGlobal("PoorMage","GLOBAL",0)~ GOTO 45
  IF ~~ THEN REPLY #41932 /* ~Wait for a bit until I raise enough gold. I don't want you using cheap supplies.~ */ GOTO 80
END

IF ~~ THEN BEGIN 83 // from: 84.4 72.4 71.4
  SAY #41934 /* ~Very well. Please, return before I regain my senses and decide these things are better left to archmagi.~ */
  IF ~~ THEN DO ~SetGlobal("PoorMage","GLOBAL",3)~ EXIT
END

IF ~Global("PoorMage","GLOBAL",3)~ THEN BEGIN 84 // from:
  SAY #41935 /* ~Well, <CHARNAME>? Are you able to supply the needed gold? 250 for the Robe of the Apprenti, 3,000 for the Ring of Wizardry, or... or 10,000 for the Staff of Power.~ */
  IF ~PartyGoldGT(249)~ THEN REPLY #41936 /* ~Well, if it does prove deadly, I should like the Robe of the Apprenti to remember you by.~ */ DO ~TakePartyGold(250)
SetGlobal("PoorMage","GLOBAL",0)~ GOTO 75
  IF ~PartyGoldGT(2999)~ THEN REPLY #41937 /* ~The Ring of Wizardry is a must. I just know you can do it.~ */ DO ~TakePartyGold(3000)
SetGlobal("PoorMage","GLOBAL",0)~ GOTO 76
  IF ~PartyGoldGT(9999)~ THEN REPLY #41938 /* ~If you are willing, then I say go for the Staff of Power. It will be glorious.~ */ DO ~TakePartyGold(10000)
SetGlobal("PoorMage","GLOBAL",0)~ GOTO 77
  IF ~~ THEN REPLY #41939 /* ~This is all too risky. The best lesson to learn is when to back away. Stop this.~ */ DO ~SetGlobal("PoorMage","GLOBAL",0)~ GOTO 72
  IF ~~ THEN REPLY #41940 /* ~Wait, wait! I must still raise the gold for these things.~ */ GOTO 83
END

IF ~~ THEN BEGIN 85 // from: 75.0
  SAY #41942 /* ~I assure you that it shall be a work worthy of you. Despite its low cost it is sure to be of exceptional quality.~ */
  IF ~!Dead("mgappr01")
!Dead("mgappr03")~ THEN DO ~SetGlobal("Apprenti","GLOBAL",13)~ GOTO 88
  IF ~Dead("mgappr01")
!Dead("mgappr03")~ THEN DO ~SetGlobal("Apprenti","GLOBAL",13)~ GOTO 87
  IF ~!Dead("mgappr01")
Dead("mgappr03")~ THEN DO ~SetGlobal("Apprenti","GLOBAL",15)~ GOTO 88
  IF ~Dead("mgappr01")
Dead("mgappr03")~ THEN DO ~SetGlobal("Apprenti","GLOBAL",16)~ GOTO 89
END

IF ~~ THEN BEGIN 86 // from: 75.1
  SAY #41943 /* ~I assure you that it shall be a work worthy of you. Despite its low cost it is sure to be of exceptional quality.~ */
  IF ~!Dead("mgappr01")
!Dead("mgappr03")~ THEN DO ~SetGlobal("Apprenti","GLOBAL",17)~ GOTO 88
  IF ~Dead("mgappr01")
!Dead("mgappr03")~ THEN DO ~SetGlobal("Apprenti","GLOBAL",18)~ GOTO 87
  IF ~!Dead("mgappr01")
Dead("mgappr03")~ THEN DO ~SetGlobal("Apprenti","GLOBAL",19)~ GOTO 88
  IF ~Dead("mgappr01")
Dead("mgappr03")~ THEN DO ~SetGlobal("Apprenti","GLOBAL",20)~ GOTO 90
END

IF ~~ THEN BEGIN 87 // from: 86.1 85.1
  SAY #41945 /* ~Now, if you will excuse me? There is work to be done.~ */
  IF ~~ THEN DO ~SetGlobal("KillNara","GLOBAL",1)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)~ EXIT
END

IF ~~ THEN BEGIN 88 // from: 86.2 86.0 85.2 85.0
  SAY #41946 /* ~Now, if you will excuse me? There is work to be done.~ */
  IF ~~ THEN DO ~SetGlobal("KillLarz","GLOBAL",1)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)~ EXIT
END

IF ~~ THEN BEGIN 89 // from: 85.3
  SAY #41947 /* ~Now, if you will excuse me? There is work to be done.~ */
  IF ~~ THEN DO ~SetGlobal("Apprenti","GLOBAL",16)
SetGlobal("KillMorul","GLOBAL",1)
SetGlobal("DropRobeApprenti","AR0411",1)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)
SetGlobalTimer("TeolAppear","GLOBAL",ONE_DAY)~ EXIT
END

IF ~~ THEN BEGIN 90 // from: 86.3
  SAY #41951 /* ~Now, if you will excuse me? There is work to be done.~ */
  IF ~~ THEN DO ~SetGlobal("Apprenti","GLOBAL",20)
SetGlobal("KillMorul","GLOBAL",1)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)
SetGlobalTimer("TeolAppear","GLOBAL",ONE_DAY)~ EXIT
END

IF ~~ THEN BEGIN 91 // from: 76.0
  SAY #41952 /* ~I assure you that it will be everything you wish it to be. Such rings are always in demand, and likely always will be.~ */
  IF ~!Dead("mgappr01")
!Dead("mgappr03")~ THEN DO ~SetGlobal("Apprenti","GLOBAL",21)~ GOTO 100
  IF ~OR(2)
Dead("mgappr01")
Dead("mgappr03")~ THEN GOTO 93
END

IF ~~ THEN BEGIN 92 // from: 76.1
  SAY #41953 /* ~I assure you that it will be everything you wish it to be. Such rings are always in demand, and likely always will be.~ */
  IF ~!Dead("mgappr01")
!Dead("mgappr03")~ THEN DO ~SetGlobal("Apprenti","GLOBAL",21)~ GOTO 100
  IF ~OR(2)
Dead("mgappr01")
Dead("mgappr03")~ THEN GOTO 94
END

IF ~~ THEN BEGIN 93 // from: 91.1
  SAY #41954 /* ~Now, if you will excuse me? There is work to be done.~ */
  IF ~~ THEN DO ~SetGlobal("Apprenti","GLOBAL",22)
SetGlobal("DropWizRing","GLOBAL",1)
SetGlobal("KillLarz","GLOBAL",1)
SetGlobal("KillNara","GLOBAL",1)
SetGlobal("KillMorul","GLOBAL",1)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)
SetGlobalTimer("TeolAppear","GLOBAL",ONE_DAY)~ EXIT
END

IF ~~ THEN BEGIN 94 // from: 92.1
  SAY #41955 /* ~Now, if you will excuse me? There is work to be done.~ */
  IF ~~ THEN DO ~SetGlobal("Apprenti","GLOBAL",24)
SetGlobal("KillLarz","GLOBAL",1)
SetGlobal("KillNara","GLOBAL",1)
SetGlobal("KillMorul","GLOBAL",1)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)
SetGlobalTimer("TeolAppear","GLOBAL",ONE_DAY)~ EXIT
END

IF ~~ THEN BEGIN 95 // from: 77.0
  SAY #41956 /* ~If this gambit succeeds the accomplishment will be nothing short of legendary. Send a good word towards Tymora, will you?~ */
  IF ~~ THEN DO ~SetGlobal("KillLarz","GLOBAL",1)
SetGlobal("DropElvenChain","AR0411",1)
SetGlobal("KillNara","GLOBAL",1)
SetGlobal("KillMorul","GLOBAL",1)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)
SetGlobalTimer("TeolAppear","GLOBAL",ONE_DAY)~ EXIT
END

IF ~~ THEN BEGIN 96 // from: 77.1
  SAY #41957 /* ~If this gambit succeeds the accomplishment will be nothing short of legendary. Send a good word towards Tymora, will you?~ */
  IF ~~ THEN DO ~SetGlobal("KillLarz","GLOBAL",1)
SetGlobal("KillNara","GLOBAL",1)
SetGlobal("KillMorul","GLOBAL",1)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)
SetGlobalTimer("TeolAppear","GLOBAL",ONE_DAY)~ EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)
!GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
GlobalGT("Apprenti","GLOBAL",12)
GlobalLT("Apprenti","GLOBAL",21)~ THEN BEGIN 97 // from:
  SAY #41960 /* ~Please don't disturb me. The robe may seem basic, but it is actually quite tricky~ */
  IF ~~ THEN EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)
!GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
GlobalGT("Apprenti","GLOBAL",20)
GlobalLT("Apprenti","GLOBAL",25)~ THEN BEGIN 98 // from:
  SAY #41961 /* ~Rings such as this are delicate and dangerous. Please leave me to my efforts.~ */
  IF ~~ THEN EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)
!GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
GlobalGT("Apprenti","GLOBAL",28)
GlobalLT("Apprenti","GLOBAL",31)~ THEN BEGIN 99 // from:
  SAY #41962 /* ~This is difficult enough without your interruptions. Please, leave me until the Staff is complete..~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 100 // from: 92.0 91.0
  SAY #41969 /* ~Now, if you will excuse me? There is work to be done.~ */
  IF ~~ THEN DO ~SetGlobal("KillLarz","GLOBAL",1)
SetGlobal("KillNara","GLOBAL",1)
SetGlobalTimer("ApprentiBuildTimer","GLOBAL",FOUR_DAYS)~ EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)
Global("ApprentiJob","GLOBAL",2)
!Global("PoorMage","GLOBAL",3)
Global("MageStrongHoldDone","AR0411",0)~ THEN BEGIN 101 // from:
  SAY #41970 /* ~Well... I must say I am relieved to be talking to you. I wish I could say the same for all of my compatriots.~ */
  IF ~!Dead("mgappr03")~ THEN DO ~SetGlobal("ApprentiJob","GLOBAL",3)~ GOTO 102
  IF ~Dead("mgappr03")
Dead("mgappr01")~ THEN DO ~SetGlobal("ApprentiJob","GLOBAL",3)~ GOTO 103
END

IF ~~ THEN BEGIN 102 // from: 101.0
  SAY #41971 /* ~Larz is dead. The energies we were dealing with overwhelmed him. I wish I could say I fully understand what happened.~ */
  IF ~~ THEN EXTERN ~MGAPPR03~ 47
END

IF ~~ THEN BEGIN 103 // from: 101.1
  SAY #41972 /* ~Nara and Larz are both dead, leaving me alone. Head of the class now, I guess... I... guess.~ */
  IF ~GlobalGT("Apprenti","GLOBAL",12)
GlobalLT("Apprenti","GLOBAL",16)~ THEN GOTO 106
  IF ~GlobalGT("Apprenti","GLOBAL",16)
GlobalLT("Apprenti","GLOBAL",20)~ THEN GOTO 107
  IF ~Global("Apprenti","GLOBAL",21)
~ THEN GOTO 108
  IF ~Global("Apprenti","GLOBAL",23)
~ THEN GOTO 109
END

IF ~~ THEN BEGIN 104 // from: MGAPPR03:47.0
  SAY #41980 /* ~And nothing will change that! Nara...~ */
  IF ~~ THEN EXTERN ~MGAPPR03~ 48
END

IF ~~ THEN BEGIN 105 // from: MGAPPR03:48.0
  SAY #41982 /* ~She will be all right, <CHARNAME>. It will just take time.~ */
  IF ~GlobalGT("Apprenti","GLOBAL",12)
GlobalLT("Apprenti","GLOBAL",17)~ THEN GOTO 106
  IF ~GlobalGT("Apprenti","GLOBAL",16)~ THEN GOTO 107
END

IF ~~ THEN BEGIN 106 // from: 105.0 103.0
  SAY #41983 /* ~All is not lost today. The robe was constructed as planned. The cost just involved more... more blood than I had planned. Here.~ */
  IF ~~ THEN DO ~CreateItem("clck29",0,0,0)
GiveItem("clck29",[PC])~ GOTO 110
END

IF ~~ THEN BEGIN 107 // from: 105.1 103.1
  SAY #41984 /* ~I fear the day was a total loss. Friends gave their blood for an enchantment that fouled in their absence. The robe did not come to be.~ */
  IF ~~ THEN GOTO 110
END

IF ~~ THEN BEGIN 108 // from: 103.2
  SAY #41985 /* ~At least their deaths have been for something. The Ring of Wizardry turned out wonderful. It cost... 3,000 gold... and two lives. I suppose that is a bargain.~ */
  IF ~~ THEN DO ~CreateItem("ring08",0,0,0)
GiveItem("ring08",[PC])~ GOTO 110
END

IF ~~ THEN BEGIN 109 // from: 103.3
  SAY #41986 /* ~Their deaths... their deaths were for nothing. The ring fouled when I lost their voices from the incantations. 3,000 gold and... and two lives. Gone.~ */
  IF ~~ THEN GOTO 110
END

IF ~~ THEN BEGIN 110 // from: 109.0 108.0 107.0 106.0
  SAY #41987 /* ~Well... this ends the apprenticeship. I must say that... that I enjoyed my time here. I wish things could have turned out differently, I really do.~ */
  IF ~Dead("mgappr03")~ THEN GOTO 111
  IF ~!Dead("mgappr03")~ THEN EXTERN ~MGAPPR03~ 49
END

IF ~~ THEN BEGIN 111 // from: MGAPPR03:49.0 110.0
  SAY #41988 /* ~Safe travels to you, <CHARNAME>. I will have Teos send word if there are to be graduation ceremonies.~ */
  IF ~~ THEN DO ~SetInterrupt(FALSE)
SetGlobal("ApprentiOver","GLOBAL",1)
SetGlobalTimer("TeolAppear","GLOBAL",ONE_DAY)
ActionOverride("mgappr01",ForceSpell(Myself,DRYAD_TELEPORT))
ActionOverride("mgappr03",ForceSpell(Myself,DRYAD_TELEPORT))
SetInterrupt(TRUE)
ForceSpell(Myself,DRYAD_TELEPORT)~ EXIT
END

IF ~~ THEN BEGIN 112 // from: MGBILL01:5.0
  SAY #42916 /* ~I just want to thank <CHARNAME> for helping guide us. Without <PRO_HIMHER> we would have not had this opportunity.~ */
  IF ~~ THEN EXTERN ~MGAPPR01~ 49
END

IF ~~ THEN BEGIN 113 // from: MGBILL01:8.0
  SAY #42922 /* ~Thank you again, <CHARNAME>. We wouldn't have had a chance without you.~ */
  IF ~~ THEN EXTERN ~MGAPPR01~ 50
END

IF ~~ THEN BEGIN 114 // from: MGBILL01:11.0
  SAY #42929 /* ~Very well. <CHARNAME>, thank you for not getting me killed as well. Is that good enough. Can I go now?~ */
  IF ~~ THEN EXTERN ~MGBILL01~ 13
END

IF ~~ THEN BEGIN 115 // from: MGBILL01:16.2 MGBILL01:14.0
  SAY #42932 /* ~Happy day. Happy, happy day. Is it over yet?~ */
  IF ~~ THEN EXTERN ~MGBILL01~ 15
END

IF ~~ THEN BEGIN 116 // from: MGBILL01:12.0
  SAY #42934 /* ~Uh, sure. Thank you <CHARNAME> for not getting me killed as well.~ */
  IF ~~ THEN EXTERN ~MGBILL01~ 16
END

IF ~InPartySlot(LastTalkedToBy,0)
Global("MageStrongHoldDone","AR0411",2)~ THEN BEGIN 117 // from:
  SAY #59841 /* ~Master <CHARNAME>, I come to ask a favor.  I am in need of a laboratory to continue my own magical studies.  Since I learned so much from you during my time here, I had hoped that you would permit me to study here.~ */
  IF ~~ THEN GOTO 120
END

IF ~InPartySlot(LastTalkedToBy,0)
Global("MageStrongHoldDone","AR0411",3)
Global("mgPotionReady","AR0411",1)~ THEN BEGIN 118 // from:
  SAY #59842 /* ~I've just completed a batch of potions <SIRMAAM>.  Here you go.~ */
  IF ~~ THEN DO ~SetGlobal("mgPotionReady","AR0411",0)
SetGlobal("mgPotionMade","AR0411",1)~ EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)
Global("MageStrongHoldDone","AR0411",3)
Global("mgPotionReady","AR0411",0)~ THEN BEGIN 119 // from:
  SAY #59843 /* ~A few more days and the potions will be ready, I promise.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 120 // from: 117.0
  SAY #59852 /* ~I'll try and keep out of your hair and to pay my way I intend to create potions and oils for you to use.  Will you accept me as your apprentice?~ */
  IF ~~ THEN REPLY #59853 /* ~And what?  Accept a spy of the Cowled Wizards under my own roof?  I think not.  Go.~ */ GOTO 121
  IF ~~ THEN REPLY #59854 /* ~You may stay but one mistake and you're out.~ */ GOTO 122
  IF ~~ THEN REPLY #59855 /* ~Yes Morul, I'd be pleased to have you as an apprentice.~ */ GOTO 122
END

IF ~~ THEN BEGIN 121 // from: 120.0
  SAY #59856 /* ~Very well.  I will find another sponsor.  I won't forget this insult, <CHARNAME>.~ */
  IF ~~ THEN DO ~ForceSpell(Myself,DRYAD_TELEPORT)~ EXIT
END

IF ~~ THEN BEGIN 122 // from: 120.2 120.1
  SAY #59857 /* ~Thank you, <SIRMAAM>, I won't disappoint you.  Return every week and I'll give you the potions that I've made.~ */
  IF ~~ THEN DO ~SetGlobal("MageStrongHoldDone","AR0411",3)
SetGlobalTimer("MorulMaking","GLOBAL",SEVEN_DAYS)~ EXIT
END
