BEGIN ~7XBRANP~

IF ~Global("BranInParty","LOCALS",1)~ THEN BEGIN KickOutBranwen
SAY @0
IF ~~ THEN REPLY @1 GOTO OUT1
IF ~~ THEN REPLY @2 GOTO OUT1
IF ~~ THEN REPLY @3 GOTO REGRET1
END

IF ~Global("BranInParty","LOCALS",3)~ THEN BEGIN JOINPARTY2
SAY @4
=
@5
IF ~~ THEN REPLY @6 GOTO WAITHERE2
IF ~~ THEN REPLY @7 DO ~SetGlobal("BranInParty","LOCALS",1)~ GOTO REGRET1
END

IF ~~ THEN BEGIN WAITHERE2
SAY @8
IF ~~ THEN EXIT
END




 IF ~~ THEN BEGIN OUT1
SAY @9
=
@10
IF ~~ THEN REPLY @11 DO ~SetGlobal("BranInParty","LOCALS",3)EscapeAreaMove("AR0901",1240,824,3)~ EXIT 
IF ~~ THEN REPLY @12 DO ~SetGlobal("BranInParty","LOCALS",4)~ GOTO WAITHERE1
END

IF ~~ THEN BEGIN WAITHERE1
SAY @13
IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN REGRET1
SAY @14
IF ~~ THEN DO ~JoinParty() SetGlobal("BranInParty","LOCALS",1)~ EXIT
END


IF ~Global("BranInParty","LOCALS",4)~ THEN BEGIN KickedOutBranwenX
SAY @15
IF ~~ THEN REPLY @16 GOTO WAITHERE1
IF ~~ THEN REPLY @17 DO ~SetGlobal("BranInParty","LOCALS",1) JoinParty()~ EXIT
END


// Reputation 
IF WEIGHT #-100 ~Global("KickedOut","LOCALS",0) HappinessLT(Myself,-290)~ THEN BEGIN ReputationBranwenOut
SAY @51
IF ~~ THEN DO ~LeaveParty() SetGlobal("KickedOut","LOCALS",1) EscapeArea() SetGlobal("BranInParty","LOCALS",0)~ EXIT
END



BEGIN ~7XBRAN~

IF ~~ THEN BEGIN OKAY1
SAY @18
IF ~~ THEN EXIT
END

IF ~NumTimesTalkedTo(0)~ THEN BEGIN GetBranPC
 SAY @19
=
@20
=
@21
IF ~~ THEN REPLY @22 GOTO GETBRAN3
IF ~~ THEN REPLY @23 GOTO GETBRAN2
IF ~~ THEN REPLY @24 GOTO FUNNY1
END

IF ~~ THEN BEGIN FUNNY1
 SAY @25
=
@26
IF ~~ THEN GOTO GETBRAN3
END

IF ~~ THEN BEGIN JOINPARTY
 SAY @27
=
@28 
IF ~~ THEN DO ~SetGlobal("TranzigE","GLOBAL",1)SetGlobal("BranInParty","LOCALS",1)JoinParty()~ EXIT 
END


IF ~~ THEN BEGIN MaybeNextTime
SAY @9
=
@29
IF ~~ THEN DO ~SetGlobal("BranInParty","LOCALS",2)EscapeAreaMove("AR0901",1240,824,3)~ EXIT
END  

IF ~~ THEN BEGIN PAST1
SAY @30
=
@31  
IF ~~ THEN REPLY @32 GOTO MaybeNextTime
IF ~~ THEN REPLY @33 GOTO JOINPARTY
END

IF ~~ THEN BEGIN GETBRAN2
 SAY @34
IF ~~ THEN GOTO GETBRAN3
END

IF~~ BEGIN GETBRAN3
SAY @35
=
@36
=
@37
=
@38
=
@39
=
@40
=
@41
IF ~~ THEN REPLY @42 GOTO PAST1
IF ~~ THEN REPLY @43 GOTO PAST2
END

IF ~~ THEN BEGIN PAST2
 SAY @44
IF ~~ THEN REPLY @45 GOTO MaybeNextTime
IF ~~ THEN REPLY @46 GOTO PAST1
END

IF ~Global("BranInParty","LOCALS",2)~ THEN BEGIN GotBran
SAY @47
=
@48
IF ~~ THEN REPLY @33 GOTO JOINPARTY
IF ~~ THEN REPLY @49 GOTO WAITHERE2b
IF ~~ THEN REPLY @50 GOTO JOINPARTY
END

IF ~~ THEN BEGIN WAITHERE2b
SAY @8
IF ~~ THEN EXIT
END
