//Branwen-Tranzig fight
IF
 AreaCheck("AR6752")
 InParty(Myself) CombatCounter(0) !See([ENEMY])
 !StateCheck(Myself,STATE_SLEEPING)
 Global("BranTranzig","GLOBAL",0)
 See("tranzig")
THEN
 RESPONSE #100
 SetGlobal("BranTranzig","GLOBAL",1)
 Dialogue(Player1)
END

IF
 AreaCheck("AR6752")
 InParty(Myself) CombatCounter(0) !See([ENEMY])
 !StateCheck(Myself,STATE_SLEEPING)
 Global("BranTranzig","GLOBAL",2)
 Dead("tranzig")
THEN
 RESPONSE #100
 SetGlobal("BranTranzig","GLOBAL",3)
 Dialogue(Player1)
END

// Branwen Script Modifications
// coder: Rastor <rastor@rpgdungeonmods.tk>

IF
 AreaCheck("AR9400")
 InParty(Myself) CombatCounter(0) !See([ENEMY])
 !StateCheck(Myself,STATE_SLEEPING)
 Global("BranInFW3500","LOCALS",0)
THEN
 RESPONSE #100
 SetGlobal("BranInFW3500","LOCALS",1)
  StartDialogueNoSet(Player1)
END

IF
 PartyHasItem("Misc86")
 InParty(Myself) CombatCounter(0) !See([ENEMY])
 !StateCheck(Myself,STATE_SLEEPING)
 Global("BranwenScalp","LOCALS",0)
THEN
 RESPONSE #100
 SetGlobal("BranwenScalp","LOCALS",1)
  StartDialogueNoSet(Player1)
END

IF
 Allegiance("Doomsayer",ENEMY)
 See("Doomsayer")
 !StateCheck(Myself,STATE_SLEEPING)
 Global("BranwenIdol","LOCALS",0)
THEN
 RESPONSE #100
 SetGlobal("BranwenIdol","LOCALS",1)
  StartDialogueNoSet(Player1)
END

IF
 OR(4)
  See("pridem")
  See("fearm")
  See("avaricem")
  See("lovem")
 OR(4)
  Allegiance("pridem",ENEMY)
  Allegiance("fearm",ENEMY)
  Allegiance("avaricem",ENEMY)
  Allegiance("lovem",ENEMY)
 Global("x#BranwenSlayDwarfs","LOCALS",0)
THEN
 RESPONSE #100
 SetGlobal("BranDurlag","GLOBAL",1)
  StartDialogueNoSet(Player1)
END

IF
 OR(4)
  See("pridem")
  See("fearm")
  See("avaricem")
  See("lovem")
 OR(4)
  Allegiance("pridem",ENEMY)
  Allegiance("fearm",ENEMY)
  Allegiance("avaricem",ENEMY)
  Allegiance("lovem",ENEMY)
 Global("x#BranwenDwarfInterject","GLOBAL",1)
THEN
 RESPONSE #100
 SetGlobal("BranDurlag","GLOBAL",2)
  StartDialogueNoSet(Player1)
END
