Following code prevents Player1 Dreams from clashing with BTL Rest-scenes
You may wish to use a variable other than "Z#GotGameDream","GLOBAL"
Using a LOCALS variable is fine if you have only one NPC.
Its a bit cumbersome but should function fine.
// Check for Imoen and Irenicus Dreams
IF
GlobalTimerExpired("ImoenDream1","GLOBAL")
Global("HadImoenDream1","GLOBAL",0)
GlobalLT("Chapter","GLOBAL",4)
Global("Z#GotGameDream","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("Z#GotGameDream","GLOBAL",1)
END
IF GlobalLT("Chapter","GLOBAL",4)
Global("HadImoenDream1","GLOBAL",1)
!GlobalTimerExpired("JonDream1","GLOBAL")
Global("Z#GotGameDream","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("Z#GotGameDream","GLOBAL",0)
END
IF
GlobalTimerExpired("JonDream1","GLOBAL")
Global("HadJonDream1","GLOBAL",0)
GlobalLT("Chapter","GLOBAL",4)
Global("Z#GotGameDream","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("Z#GotGameDream","GLOBAL",1)
END
IF GlobalLT("Chapter","GLOBAL",4)
Global("HadImoenDream1","GLOBAL",1)
Global("HadJonDream1","GLOBAL",1)
!GlobalTimerExpired("JonDream2","GLOBAL")
Global("Z#GotGameDream","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("Z#GotGameDream","GLOBAL",0)
END
IF
GlobalTimerExpired("JonDream2","GLOBAL")
Global("HadJonDream2","GLOBAL",0)
GlobalLT("Chapter","GLOBAL",4)
Global("Z#GotGameDream","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("Z#GotGameDream","GLOBAL",1)
END
IF GlobalLT("Chapter","GLOBAL",4)
Global("HadImoenDream1","GLOBAL",1)
Global("HadJonDream1","GLOBAL",1)
Global("HadJonDream2","GLOBAL",1)
Global("Z#GotGameDream","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("Z#GotGameDream","GLOBAL",0)
END
// Check for Slayer and Ellesime dreams
IF !GlobalLT("Chapter","GLOBAL",4)
OR(2)
!GlobalTimerExpired("EllesimeDream1","GLOBAL")
!Global("HadEllesimeDream1","GLOBAL",0)
OR(3)
!GlobalGT("DrowTalk","GLOBAL",3)
!Global("HadSlayerDream","GLOBAL",0)
!GlobalGT("AsylumPlot","GLOBAL",54)
Global("Z#GotGameDream","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("Z#GotGameDream","GLOBAL",0)
END
IF GlobalGT("DrowTalk","GLOBAL",3)
Global("HadSlayerDream","GLOBAL",0)
GlobalGT("AsylumPlot","GLOBAL",54)
Global("Z#GotGameDream","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("Z#GotGameDream","GLOBAL",1)
END
IF !GlobalLT("Chapter","GLOBAL",4)
GlobalTimerExpired("EllesimeDream1","GLOBAL")
Global("HadEllesimeDream1","GLOBAL",0)
Global("Z#GotGameDream","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("Z#GotGameDream","GLOBAL",1)
END
Edited by Zyraen, 25 November 2007 - 11:08 PM.