BEGIN IMDREAM

// **********************1st DREAM************************

IF ~~ THEN BEGIN MRDR0
  SAY @0 
  =
  @1
  IF ~~ THEN EXTERN PLAYER1 STIM12
END

IF ~~ THEN BEGIN MRDR1
  SAY @2
  =
  @3
  =
  @4
  IF ~Gender(Player1,MALE)~ THEN DO ~SetGlobal("ImoenDream1MR","GLOBAL",3)
	ClearAllActions()
	StartCutSceneMode()
	StartCutScene("Cutim01")~
	EXIT
  IF ~Gender(Player1,FEMALE)~ THEN DO ~SetGlobal("ImoenDream1MR","GLOBAL",3)
	ClearAllActions()
	StartCutSceneMode()
	StartCutScene("CutiF01")~
	EXIT
END

IF ~Global("ImoenDream1MR","GLOBAL",3)
~ THEN BEGIN MRDR2 // from:
  SAY @5
	=
@6
=	
@7
=
@8
=
@9
=
@10
=
@11
=
@12
IF ~Gender(Player1,MALE)~ THEN DO ~SetGlobal("ImoenDream1MR","GLOBAL",4)
ClearAllActions()
StartCutSceneMode()
StartCutScene("Cutim02")~
EXIT
IF ~Gender(Player1,FEMALE)~ THEN DO ~SetGlobal("ImoenDream1MR","GLOBAL",4)
ClearAllActions()
StartCutSceneMode()
StartCutScene("CutiF02")~
EXIT
END

IF ~Global("ImoenDream1MR","GLOBAL",5)~ 
THEN BEGIN MRDR4
	SAY @13
	=
	@14
	=
	@15
	=
	@16
	IF ~Gender(Player1,MALE)~ THEN GOTO MRDR4Mal
	IF ~Gender(Player1,FEMALE)~ THEN GOTO MRDR4Fem
END

	IF ~~ THEN BEGIN MRDR4Mal
	SAY @17 
	IF ~~ THEN DO ~SetGlobal("ImoenDream1MR","GLOBAL",6)
	ClearAllActions()
	StartCutSceneMode()
	StartCutScene("Cuti03a")~
	EXIT
	END

	IF ~~ THEN BEGIN MRDR4Fem
	SAY @18
	IF ~~ THEN DO ~SetGlobal("ImoenDream1MR","GLOBAL",6)
	ClearAllActions()
	StartCutSceneMode()
	StartCutScene("CuiF03a")~
	EXIT
	END	


IF ~Global("ImoenDream1MR","GLOBAL",6)~ BEGIN MRDR5
	SAY  @19
	=
	@20
	=
	@21
	IF ~Gender(Player1,MALE)~ THEN DO ~SetGlobal("ImoenDream1MR","GLOBAL",7)
	ClearAllActions()
	StartCutSceneMode()
	StartCutScene("Cutim04")~
	EXIT
	IF ~Gender(Player1,FEMALE)~ THEN DO ~SetGlobal("ImoenDream1MR","GLOBAL",7)
	ClearAllActions()
	StartCutSceneMode()
	StartCutScene("CutiF04")~
	EXIT
END


// *****************************2nd DREAM*******************************


IF ~Global("ImoenDream2Talk","GLOBAL",1)~ THEN BEGIN MRDR20
  SAY @22
  IF ~~ THEN DO ~SG("ImoenRomanceActive",1) SetGlobal("WeWillTalkofIt","GLOBAL",1)~ GOTO MRDR20ada
END

IF ~~ THEN BEGIN MRDR20ada
	SAY @23
	=
	@24 
	=
	@25
	=
	@26
	=
	@27 // yes, it's from Planescape:Torment, so what!?
	=
	@28
	=
	@29
	=
	@30
	=
	@31
	=
	@32
	=
	@33
	=
	@34
	=
	@35
	=
	@36
	IF ~Gender(Player1,MALE)~ THEN DO ~ClearAllActions()
	StartCutSceneMode()
	StartCutScene("cutim06")~
	EXIT
	IF ~Gender(Player1,FEMALE)~ THEN DO ~ClearAllActions()
	StartCutSceneMode()
	StartCutScene("cutiF06")~
	EXIT
END

IF ~Global("ImoenDream2Talk","GLOBAL",2)~ THEN BEGIN MRDR21
	SAY @37
	=
	@38
	IF ~Gender(Player1,MALE)~ THEN DO ~ClearAllActions()
	StartCutSceneMode()
	StartCutScene("cutim07")~
	EXIT
	IF ~Gender(Player1,FEMALE)~ THEN DO ~ClearAllActions()
	StartCutSceneMode()
	StartCutScene("cutiF07")~
	EXIT
END

IF ~Global("ImoenDream2Talk","GLOBAL",5)~
	THEN BEGIN MRDR24
	SAY @13
	IF ~Gender(Player1,MALE)~ THEN DO ~ClearAllActions()
	StartCutSceneMode()
	StartCutScene("cuti07a")~
	EXIT
	IF ~Gender(Player1,FEMALE)~ THEN DO ~ClearAllActions()
	StartCutSceneMode()
	StartCutScene("cuiF07a")~
	EXIT
END

IF ~Global("ImoenDream2Talk","GLOBAL",6)~ THEN BEGIN MRDR25
	SAY @39
	=
	@40
	=
	@41
	=
	@42
	=
	@43
	=
	@44
	IF ~Gender(Player1,MALE)~ THEN DO ~ClearAllActions()
	StartCutSceneMode()
	StartCutScene("cutim10")~
	EXIT
	IF ~Gender(Player1,FEMALE)~ THEN DO ~ClearAllActions()
	StartCutSceneMode()
	StartCutScene("cutiF10")~
	EXIT
END


// **********************************3rd Dream*************************************


IF ~Global("ImoenDream3Talk","GLOBAL",1)~ THEN BEGIN MRDR30
	SAY @45
	=
	@46
	=
	@47
	=
	@48
	=
	@49 
	=
	@50
	=
	@51 
	=
	@52
	=
	@53
	=
	@54
	=
	@55
	=
	@56
	=
	@57
	=
	@58
	=
	@59
	=
	@60
	=
	@61
	=
	@62
	IF ~OR(5)
		Alignment(Player1,LAWFUL_GOOD)
		Alignment(Player1,NEUTRAL_GOOD)
		Alignment(Player1,CHAOTIC_GOOD)
		Alignment(Player1,LAWFUL_NEUTRAL)
		Alignment(Player1,NEUTRAL)
	~ THEN GOTO MRDR31a
	IF ~OR(4)
		Alignment(Player1,CHAOTIC_NEUTRAL)
		Alignment(Player1,LAWFUL_EVIL)
		Alignment(Player1,NEUTRAL_EVIL)
		Alignment(Player1,CHAOTIC_EVIL)
	~ THEN GOTO MRDR31b
END

IF ~~ THEN BEGIN MRDR31a
	SAY @63
	IF ~~ THEN GOTO MRDR32
END

IF ~~ THEN BEGIN MRDR31b
	SAY @64
	=
	@65
	IF ~~ THEN GOTO MRDR32
END

IF ~~ THEN BEGIN MRDR32
	SAY @66
	=
	@67
	=
	@68
	=
	@69
	=	
	@70
	IF ~Gender(Player1,MALE)~ THEN GOTO MRDR33a
	IF ~Gender(Player1,FEMALE)~ THEN GOTO MRDR33b
END

IF ~~ THEN BEGIN MRDR33a
	SAY @71
	IF ~~ THEN GOTO MRDR34
END

IF ~~ THEN BEGIN MRDR33b
	SAY @72
	IF ~~ THEN GOTO MRDR34
END

IF ~~ THEN BEGIN MRDR34
	SAY @73
	=
	@74
	=
	@75
	=
	@76
	=
	@77
	=
	@78
	=
	@79
	=
	@80
	IF ~Gender(Player1,MALE)~ THEN DO ~ClearAllActions()
	StartCutSceneMode()
	StartCutScene("Cutim12")~
	EXIT
	IF ~Gender(Player1,FEMALE)~ THEN DO ~ClearAllActions()
	StartCutSceneMode()
	StartCutScene("cutiF12")~
	EXIT
END


IF ~Global("ImoenDream3Talk","GLOBAL",2)~ THEN BEGIN MRDR35
	SAY @81 
	=
	@82
	=
	@83 
	=
	@84
	=
	@85 
	=
	@86
	IF ~Gender(Player1,MALE)~ THEN DO ~ClearAllActions()
	StartCutSceneMode()
	StartCutScene("Cutim13")~
	EXIT
	IF ~Gender(Player1,FEMALE)~ THEN DO ~ClearAllActions()
	StartCutSceneMode()
	StartCutScene("cutiF13")~
	EXIT
END

IF ~Global("ImoenDream3Talk","GLOBAL",5)~ THEN BEGIN MRDR36
	SAY @13 
	=
	@88
	=
	@89
	=
	@90
	=
	@91
	=
	@92
	=
	@93
	=
	@94
	=
	@95
	=
	@96
	IF ~Gender(Player1,MALE)~ THEN DO ~ClearAllActions()
	StartCutSceneMode()
	StartCutScene("Cuti15a")~
	EXIT
	IF ~Gender(Player1,FEMALE)~ THEN DO ~ClearAllActions()
	StartCutSceneMode()
	StartCutScene("cuiF15a")~
	EXIT
END


IF ~Global("ImoenDream3Talk","GLOBAL",6)~ THEN BEGIN MRDR37
	SAY @97
	=
	@98
	=
	@99
	=
	@100
	=
	@101
	=
	@102
	=
	@103
	=
	@104
	=	
	@105
	=
	@106
	=
	@107
	=
	@108
	IF ~Gender(Player1,MALE)~ THEN DO ~ClearAllActions()
	StartCutSceneMode()
	StartCutScene("Cutim16")~
	EXIT
	IF ~Gender(Player1,FEMALE)~ THEN DO ~ClearAllActions()
	StartCutSceneMode()
	StartCutScene("cutiF16")~
	EXIT
END
