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

BEGIN ~MGAPPR03~

IF ~~ THEN BEGIN 0 // from: MGTEOS01:29.0
  SAY #40824 /* ~I will serve as best I can, <CHARNAME>.~ */
  IF ~~ THEN EXTERN ~MGTEOS01~ 30
END

IF ~~ THEN BEGIN 1 // from: MGAPPR01:1.0
  SAY #41730 /* ~Shhh, <PRO_HESHE>'s being thoughtful and prosaic.~ */
  IF ~~ THEN EXTERN ~MGAPPR02~ 3
END

IF ~~ THEN BEGIN 2 // from: MGAPPR01:2.0
  SAY #41732 /* ~Oh hush! At least we are getting instruction.~ */
  IF ~~ THEN EXTERN ~MGAPPR01~ 3
END

IF ~~ THEN BEGIN 3 // from: MGAPPR02:3.1 MGAPPR02:2.1
  SAY #41739 /* ~But we need guidance. We do not yet know the limits of these gifts of magic we have received.~ */
  IF ~~ THEN EXTERN ~MGAPPR01~ 4
END

IF ~~ THEN BEGIN 4 // from: MGAPPR01:4.0
  SAY #41741 /* ~Is that before or after you fix the hole you burned in Teos' roof?~ */
  IF ~~ THEN EXTERN ~MGAPPR01~ 5
END

IF ~~ THEN BEGIN 5 // from: MGAPPR01:5.0
  SAY #41743 /* ~Exactly. We need direction so we don't slip even worse.~ */
  IF ~~ THEN EXTERN ~MGAPPR02~ 5
END

IF ~~ THEN BEGIN 6 // from: MGAPPR01:6.0
  SAY #41749 /* ~This isn't going to go well at all.~ */
  IF ~~ THEN EXTERN ~MGAPPR02~ 6
END

IF ~~ THEN BEGIN 7 // from: MGAPPR01:7.0
  SAY #41752 /* ~Couldn't I work on my cantrips and minor spells?~ */
  IF ~~ THEN EXTERN ~MGAPPR01~ 8
END

IF ~~ THEN BEGIN 8 // from: MGAPPR01:8.0
  SAY #41754 /* ~Or maybe a little basic levitation?~ */
  IF ~~ THEN EXTERN ~MGAPPR01~ 9
END

IF ~Global("AllGoingToDie","GLOBAL",1)~ THEN BEGIN 9 // from:
  SAY #41765 /* ~I don't like this at all. I can barely understand the runes in the tomes. Still, it is fun to know that we are on our own. Very exciting.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 10 // from: MGAPPR01:14.0
  SAY #41769 /* ~No, no, I suggest we make a dagger for our new teacher. We'll call it the 'Dagger of <CHARNAME>'. How about that? It would only cost about 250 gold for supplies.~ */
  IF ~~ THEN EXTERN ~MGAPPR02~ 14
END

IF ~~ THEN BEGIN 11 // from: MGAPPR02:79.1 MGAPPR02:14.1
  SAY #41776 /* ~M-mine? Well, I am flattered... that you would want to be flattered. I'll try to have it as soon as possible.~ */
  IF ~RandomNumGT(100,0)
RandomNumLT(100,96)~ THEN EXTERN ~MGAPPR02~ 17
  IF ~RandomNumGT(100,95)
RandomNumLT(100,101)~ THEN EXTERN ~MGAPPR02~ 20
END

IF ~InPartySlot(LastTalkedToBy,0)
!GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
OR(2)
Global("Apprenti","GLOBAL",1)
Global("Apprenti","GLOBAL",4)~ THEN BEGIN 12 // from:
  SAY #41786 /* ~We'll have that nasty little wand ready as soon as possible. The Dagger would have been nicer, though.~ */
  IF ~~ THEN EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)
!GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
OR(2)
Global("Apprenti","GLOBAL",2)
Global("Apprenti","GLOBAL",5)~ THEN BEGIN 13 // from:
  SAY #41787 /* ~I've got the form of your dagger all worked out in my head already, <CHARNAME>. It's going to be beautiful.~ */
  IF ~~ THEN REPLY #41797 /* ~Just as long as it is functional. That's all that matters.~ */ GOTO 15
  IF ~~ THEN REPLY #41798 /* ~What powers will it have? Its enchantment should match the beauty.~ */ GOTO 16
END

IF ~InPartySlot(LastTalkedToBy,0)
!GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
OR(2)
Global("Apprenti","GLOBAL",3)
Global("Apprenti","GLOBAL",6)~ THEN BEGIN 14 // from:
  SAY #41788 /* ~One Ring of Protection, just as you asked. I still think the dagger would have been better though.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 15 // from: 13.0
  SAY #41799 /* ~What? Oh sure, it will do something. I think.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 16 // from: 13.1
  SAY #41800 /* ~Oh, I always leave such things to the last. It seems so much more... magical to me that way.~ */
  IF ~~ THEN EXIT
END

IF ~!InPartySlot(LastTalkedToBy,0)~ THEN BEGIN 17 // from:
  SAY #41801 /* ~I really must apologize, but apprentice mages are not allowed to speak with the friends of the master. Please, I can only talk to <CHARNAME>.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 18 // from: MGAPPR02:28.1
  SAY #41817 /* ~We did it! Hurrah!~ */
  IF ~~ THEN DO ~CreateItem("dagg19")
GiveItem("dagg19",Player1)~ EXTERN ~MGAPPR02~ 30
END

IF ~~ THEN BEGIN 19 // from: MGAPPR02:30.0
  SAY #41818 /* ~The name! Tell <PRO_HIMHER> about the name!~ */
  IF ~~ THEN EXTERN ~MGAPPR01~ 24
END

IF ~~ THEN BEGIN 20 // from: MGAPPR01:24.0
  SAY #41820 /* ~I'm just happy. Leave me alone.~ */
  IF ~~ THEN EXTERN ~MGAPPR02~ 35
END

IF ~~ THEN BEGIN 21 // from: MGAPPR01:25.0
  SAY #41822 /* ~I don't like it. It came out ugly.~ */
  IF ~~ THEN EXTERN ~MGAPPR01~ 26
END

IF ~~ THEN BEGIN 22 // from: MGAPPR01:26.0
  SAY #41824 /* ~You be quiet.~ */
  IF ~~ THEN EXTERN ~MGAPPR02~ 35
END

IF ~~ THEN BEGIN 23 // from: MGAPPR02:28.2
  SAY #41826 /* ~Is that what you call it? Interesting? It was horrible!~ */
  IF ~~ THEN EXTERN ~MGAPPR02~ 31
END

IF ~~ THEN BEGIN 24 // from: MGAPPR02:31.0
  SAY #41827 /* ~Little? Spilled milk is little. A wet baby is little. This is... is...~ */
  IF ~~ THEN EXTERN ~MGAPPR02~ 32
END

IF ~~ THEN BEGIN 25 // from: MGAPPR02:33.0
  SAY #41828 /* ~Oh, that's very funny. Larz is vaporized and you're making jokes. That's real sweet.~ */
  IF ~~ THEN EXTERN ~MGAPPR02~ 35
END

IF ~~ THEN BEGIN 26 // from: MGAPPR02:34.0
  SAY #41830 /* ~Like that's important at all. He's dead! Who cares about your stupid ring! This isn't supposed to happen. It's not!~ */
  IF ~~ THEN EXTERN ~MGAPPR02~ 36
END

IF ~~ THEN BEGIN 27 // from: MGAPPR02:37.0
  SAY #41833 /* ~It was Larz. He dropped the tome with the incantation while in the middle of infusing the metal of the shaft.~ */
  IF ~~ THEN EXTERN ~MGAPPR01~ 28
END

IF ~~ THEN BEGIN 28 // from: MGAPPR01:28.0
  SAY #41835 /* ~It... it was a good one... I was sure...~ */
  IF ~~ THEN EXTERN ~MGAPPR02~ 39
END

IF ~~ THEN BEGIN 29 // from: MGAPPR01:30.0
  SAY #41840 /* ~Working it? Is that what you call what you were doing? Check the wall, <CHARNAME>. It may as well be a dartboard.~ */
  IF ~~ THEN EXTERN ~MGAPPR01~ 31
END

IF ~~ THEN BEGIN 30 // from: MGAPPR02:35.0
  SAY #41842 /* ~Already? Are you sure we shouldn't take some time...?~ */
  IF ~~ THEN EXTERN ~MGAPPR02~ 40
END

IF ~~ THEN BEGIN 31 // from: MGAPPR02:43.0
  SAY #41851 /* ~We should be able to handle that.~ */
  IF ~RandomNumGT(100,0)
RandomNumLT(100,91)~ THEN EXTERN ~MGAPPR02~ 46
  IF ~RandomNumGT(100,90)
RandomNumLT(100,101)~ THEN EXTERN ~MGAPPR02~ 47
END

IF ~~ THEN BEGIN 32 // from: MGAPPR02:44.0
  SAY #41852 /* ~Alright, but we need to take our time.~ */
  IF ~RandomNumGT(100,0)
RandomNumLT(100,76)~ THEN EXTERN ~MGAPPR02~ 48
  IF ~RandomNumGT(100,75)
RandomNumLT(100,101)~ THEN EXTERN ~MGAPPR02~ 49
END

IF ~~ THEN BEGIN 33 // from: MGAPPR02:45.0
  SAY #41853 /* ~Ok, this is getting scary. That's no small task.~ */
  IF ~RandomNumGT(100,0)
RandomNumLT(100,61)~ THEN EXTERN ~MGAPPR02~ 50
  IF ~RandomNumGT(100,60)
RandomNumLT(100,101)~ THEN EXTERN ~MGAPPR02~ 51
END

IF ~InPartySlot(LastTalkedToBy,0)
!GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
OR(2)
Global("Apprenti","GLOBAL",7)
Global("Apprenti","GLOBAL",8)~ THEN BEGIN 34 // from:
  SAY #41863 /* ~I like this. Nice and safe, I think. I may not learn about powerful magics today, but I'll certainly live to learn it in the future.~ */
  IF ~~ THEN EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)
!GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
OR(2)
Global("Apprenti","GLOBAL",9)
Global("Apprenti","GLOBAL",10)~ THEN BEGIN 35 // from:
  SAY #41864 /* ~I hope this works. I know you'll put our efforts to good use.~ */
  IF ~~ THEN EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)
!GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
OR(2)
Global("Apprenti","GLOBAL",11)
Global("Apprenti","GLOBAL",12)~ THEN BEGIN 36 // from:
  SAY #41865 /* ~I... I have a really bad feeling about this. Everything is going to be all right, isn't it? It's hard to concentrate when you know it's so dangerous.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 37 // from: MGAPPR02:56.0
  SAY #41876 /* ~I would agree. A nice result to a nice safe task. I could do this again.~ */
  IF ~!Dead("mgappr01")~ THEN EXTERN ~MGAPPR01~ 35
  IF ~Dead("mgappr01")~ THEN EXTERN ~MGAPPR02~ 62
END

IF ~~ THEN BEGIN 38 // from: MGAPPR02:57.0
  SAY #41879 /* ~It taught me that we should respect failure and accept it as a learning tool.~ */
  IF ~Dead("mgappr01")~ THEN EXTERN ~MGAPPR02~ 62
  IF ~!Dead("mgappr01")~ THEN EXTERN ~MGAPPR01~ 36
END

IF ~~ THEN BEGIN 39 // from: MGAPPR02:58.0
  SAY #41881 /* ~Yes indeed! I was worried, but we managed to create the spell with only a few bumps and bruises. I am amazed at how competent we seem.~ */
  IF ~Dead("mgappr01")~ THEN EXTERN ~MGAPPR02~ 62
  IF ~!Dead("mgappr01")~ THEN EXTERN ~MGAPPR01~ 37
END

IF ~~ THEN BEGIN 40 // from: MGAPPR02:59.0
  SAY #41883 /* ~And there was danger as well. I could have lost a finger, or gotten some sort of rash.~ */
  IF ~!Dead("mgappr01")~ THEN EXTERN ~MGAPPR01~ 38
  IF ~Dead("mgappr01")~ THEN EXTERN ~MGAPPR02~ 62
END

IF ~~ THEN BEGIN 41 // from: MGAPPR02:69.2 MGAPPR01:43.1
  SAY #41899 /* ~Are... are you sure about this, Morul? That's pretty... extreme. It's part of the discipline, I know, but if the advanced classes won't even try it...~ */
  IF ~~ THEN EXTERN ~MGAPPR02~ 70
END

IF ~~ THEN BEGIN 42 // from: MGAPPR02:73.1 MGAPPR01:44.0
  SAY #41911 /* ~Farewell <CHARNAME>. I thank you for this. All of it.~ */
  IF ~~ THEN DO ~SetGlobal("ApprentiOver","GLOBAL",1)
SetGlobalTimer("TeolAppear","GLOBAL",ONE_DAY)
ActionOverride("mgappr01",ForceSpell(Myself,DRYAD_TELEPORT))
ActionOverride("mgappr02",ForceSpell(Myself,DRYAD_TELEPORT))
ForceSpell(Myself,DRYAD_TELEPORT)~ EXIT
END

IF ~OR(3)
Global("PoorMage","GLOBAL",1)
Global("PoorMage","GLOBAL",2)
Global("PoorMage","GLOBAL",31)~ THEN BEGIN 43 // from:
  SAY #41924 /* ~I understand your hesitation about the price of the item, but certainly it is much less than actually trying to buy it.~ */
  IF ~~ THEN EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)
!GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
GlobalGT("Apprenti","GLOBAL",12)
GlobalLT("Apprenti","GLOBAL",21)~ THEN BEGIN 44 // from:
  SAY #41966 /* ~I hope you enjoy the robe when it is done. I put much of myself into it. I hope it will be worth it.~ */
  IF ~~ THEN EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)
!GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
GlobalGT("Apprenti","GLOBAL",20)
GlobalLT("Apprenti","GLOBAL",25)~ THEN BEGIN 45 // from:
  SAY #41967 /* ~This ring will be beautiful. I really wish I understood it better though. I'm going through the motions, but I don't understand them.~ */
  IF ~~ THEN EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)
!GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")
GlobalGT("Apprenti","GLOBAL",28)
GlobalLT("Apprenti","GLOBAL",31)~ THEN BEGIN 46 // from:
  SAY #41968 /* ~I'm really worried, <CHARNAME>. I feel like I am in way over my head, and I keep getting dragged further. This is really scary stuff we're working with.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 47 // from: MGAPPR02:102.0
  SAY #41979 /* ~What happened? We overreached ourselves, that's what happened. And now he's dead. He's dead!~ */
  IF ~~ THEN EXTERN ~MGAPPR02~ 104
END

IF ~~ THEN BEGIN 48 // from: MGAPPR02:104.0
  SAY #41981 /* ~Don't talk to me. Nobody talk to me.~ */
  IF ~~ THEN EXTERN ~MGAPPR02~ 105
END

IF ~~ THEN BEGIN 49 // from: MGAPPR02:110.1
  SAY #41989 /* ~Yes, I thank you for allowing me to stay here. It was... certainly educational... if I must call it something.~ */
  IF ~~ THEN EXTERN ~MGAPPR02~ 111
END

IF ~~ THEN BEGIN 50 // from: MGAPPR01:49.0
  SAY #42918 /* ~Oh shush. <CHARNAME>, we certainly appreciate this.~ */
  IF ~~ THEN EXTERN ~MGBILL01~ 6
END

IF ~~ THEN BEGIN 51 // from: MGAPPR01:50.0
  SAY #42924 /* ~Can I... use you for a reference? Sorry, sorry, just thinking ahead. Thanks, <CHARNAME>.~ */
  IF ~~ THEN EXTERN ~MGBILL01~ 9
END

IF ~~ THEN BEGIN 52 // from: MGBILL01:16.1
  SAY #42938 /* ~I really don't feel like celebrating today. Could we just go?~ */
  IF ~~ THEN EXTERN ~MGBILL01~ 17
END

IF ~GlobalTimerExpired("ApprentiBuildTimer","GLOBAL")~ THEN BEGIN 53 // from:
  SAY #61251 /* ~Morul needs to speak with you about the task you assigned us.~ */
  IF ~~ THEN EXIT
END
