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

BEGIN ~TTXANJ~

IF ~Global("TutorialLesson","GLOBAL",14)
~ THEN BEGIN 0 // from:
  SAY #39243 /* ~My first lesson for you is on how to cast spells.~ [TTXAN02] */
  IF ~~ THEN GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #39244 /* ~Select my (Xan's) Cast Spell button, choose a spell, and Left-Click on your target.  My Cast Spell button is the Spell icon on the bottom of the screen.  You need to have me (Xan) selected for you to have access to my spells.~ */
  IF ~~ THEN GOTO 2
END

IF ~~ THEN BEGIN 2 // from: 1.0
  SAY #39245 /* ~You can also configure Quick Spells by Right-Clicking on a Quick Spell slot. This summons a list of memorized spells to choose. If no spells are listed, the character either does not have any spells memorized or cannot cast until higher levels.~ */
  IF ~~ THEN GOTO 3
END

IF ~~ THEN BEGIN 3 // from: 2.0
  SAY #39246 /* ~To cast the Quick Spell, Left-Click on the appropriate Quick Spell slot and then select your target.~ */
  IF ~~ THEN GOTO 4
END

IF ~~ THEN BEGIN 4 // from: 3.0
  SAY #39247 /* ~I want you to try and cast a spell now.  Select any spell in your repertoire and cast it on Belt.~ */
  IF ~~ THEN DO ~SetGlobal("TutorialLesson","GLOBAL",15)
SetGlobalTimer("TutorialWait","GLOBAL",20)
ClickLButtonObject(Myself,0)
~ EXIT
END

IF ~Global("TutorialLesson","GLOBAL",15)
~ THEN BEGIN 5 // from:
  SAY #39251 /* ~You haven't cast a spell on Belt yet.  Select my (Xan's) Cast Spell button, choose a spell, and Left-Click on your target.~ [TTXAN03] */
  IF ~~ THEN DO ~SetGlobalTimer("TutorialWait","GLOBAL",20)
ClickLButtonObject(Myself,0)
~ EXIT
END

IF ~Global("TutorialLesson","GLOBAL",16)
~ THEN BEGIN 6 // from:
  SAY #39252 /* ~Good job.  I am now going to teach you how to memorize spells.~ [TTXAN04] */
  IF ~~ THEN GOTO 7
END

IF ~~ THEN BEGIN 7 // from: 6.0
  SAY #39254 /* ~Any mage (or other spellcaster) must memorize spells using the Rest button on the Left Panel, Mage Book or Priest Scroll pages. Select the Wizard Book (hotkey 'W') or Priest Scroll (hotkey 'P') icon that appears on the left.~ */
  IF ~~ THEN GOTO 8
END

IF ~~ THEN BEGIN 8 // from: 7.0
  SAY #39255 /* ~Choose the spells you want to memorize and then click on the Rest button.  Once your rest is completed, you will have memorized all of your spells.~ */
  IF ~~ THEN GOTO 9
END

IF ~~ THEN BEGIN 9 // from: 8.0
  SAY #39256 /* ~I want you to try and memorize some spells right now.~ */
  IF ~~ THEN DO ~SetGlobal("TutorialLesson","GLOBAL",17)
SetGlobalTimer("TutorialWait","GLOBAL",15)
ClickLButtonObject(Myself,0)
~ EXIT
END

IF ~Global("TutorialLesson","GLOBAL",17)
~ THEN BEGIN 10 // from:
  SAY #39257 /* ~You haven't slept yet.  You can access your Rest button from either your Memorization screen, or your Inventory screen (or the main screen.)~ [TTXAN05] */
  IF ~~ THEN DO ~SetGlobalTimer("TutorialWait","GLOBAL",15)
ClickLButtonObject(Myself,0)
~ EXIT
END

IF ~Global("TutorialLesson","GLOBAL",18)
~ THEN BEGIN 11 // from:
  SAY #39259 /* ~Good job!  I'm now going to teach you how to LEARN spells.  I have a Flame Arrow scroll in my inventory.~ [TTXAN06] */
  IF ~~ THEN GOTO 12
END

IF ~~ THEN BEGIN 12 // from: 11.0
  SAY #39262 /* ~Right click on the scroll and it will bring you to the Item History screen.  On the bottom of the screen you will find a button that says 'Write Magic'.  Press this and your mage (me) will now be able to cast Flame Arrow (once I memorize it that is.)~ */
  IF ~~ THEN GOTO 20
END

IF ~Global("TutorialLesson","GLOBAL",19)
~ THEN BEGIN 13 // from:
  SAY #39264 /* ~You haven't had me learn the spell yet.  Remember; just Right-Click on the scroll, then on the learn spell ('Write Magic') button on the bottom of the Item History page.~ [TTXAN07] */
  IF ~~ THEN DO ~SetGlobalTimer("TutorialWait","GLOBAL",20)
ClickLButtonObject(Myself,0)
~ EXIT
END

IF ~Global("TutorialLesson","GLOBAL",20)
~ THEN BEGIN 14 // from:
  SAY #39268 /* ~Good job.  Now I'm going to teach you how to Identify items.  When you find a magical item, you won't automatically know what it does.  To find out, you must first Right-Click on the item.~ [TTXAN08] */
  IF ~~ THEN GOTO 15
END

IF ~~ THEN BEGIN 15 // from: 14.0
  SAY #39271 /* ~On the bottom of the item's history screen you will find a button labeled 'Identify'.  Click on this.  If whoever has the item in their inventory has an Identify Spell memorized, or has an Identify Scroll, then the item will be identified.~ */
  IF ~~ THEN GOTO 16
END

IF ~~ THEN BEGIN 16 // from: 15.0
  SAY #39272 /* ~Bards, and very intelligent characters can sometimes automatically identify an item when they pick it up.~ */
  IF ~~ THEN GOTO 17
END

IF ~~ THEN BEGIN 17 // from: 16.0
  SAY #39274 /* ~I have an unidentified shield in my inventory.  I also have an Identify spell memorized.  I will give you a moment to try and identify the shield.~ */
  IF ~~ THEN DO ~CreateItem("TTSHLD01",0,0,0)
SetGlobal("TutorialLesson","GLOBAL",21)
SetGlobalTimer("TutorialWait","GLOBAL",20)
ClickLButtonObject(Myself,0)
~ EXIT
END

IF ~PartyHasItem("ttscrl02")
Global("GotScroll","LOCALS",0)
~ THEN BEGIN 18 // from:
  SAY #39501 /* ~A scroll of Monster Summoning.  You should have me learn the spell.~ [TTXAN09] */
  IF ~~ THEN DO ~SetGlobal("GotScroll","LOCALS",1)
~ EXIT
END

IF ~HPPercentLT(Myself,50)
Global("Hurt","LOCALS",0)
~ THEN BEGIN 19 // from:
  SAY #39502 /* ~I'm wounded.  Ow. You should use Branwen's Cure Wounds spells to heal me.~ [TTXAN10] */
  IF ~~ THEN DO ~SetGlobal("Hurt","LOCALS",1)
~ EXIT
END

IF ~~ THEN BEGIN 20 // from: 12.0
  SAY #39750 /* ~There is a chance for failure when trying to learn a new spell. Failure means that the scroll is used up and the mage does not learn the spell. I will not fail with this one, but in the real world, your Intelligence stat will determine whether you succeed or not.~ */
  IF ~~ THEN DO ~CreateItem("TTSCRL01",0,0,0)
SetGlobal("TutorialLesson","GLOBAL",19)
SetGlobalTimer("TutorialWait","GLOBAL",20)
~ EXIT
END

IF ~Global("TutorialLesson","GLOBAL",21)~ THEN BEGIN 21 // from:
  SAY #62028 /* ~You have not identified the shield yet.  To identify the shield please Right-Click on it and then choose the identify option.~ */
  IF ~~ THEN DO ~SetGlobalTimer("TutorialWait","GLOBAL",20)
ClickLButtonObject(Myself,0)~ EXIT
END
