BEGIN ~LHSPC1~

IF ~Global("SpcKg1","AR0810",0)
~ THEN BEGIN 0
  SAY @0
  IF ~~ THEN REPLY @1 GOTO 1
END

IF ~~ THEN BEGIN 1
  SAY @2
  IF ~~ THEN REPLY @3 GOTO 2
  IF ~~ THEN REPLY @4 GOTO 6
END

IF ~~ THEN BEGIN 2
  SAY @5
  IF ~~ THEN REPLY @6 GOTO 3
END

IF ~~ THEN BEGIN 3
  SAY @7
  IF ~~ THEN REPLY @8 GOTO 4
  IF ~PartyHasItem("miscaj")~ THEN REPLY @9 GOTO 5
END

IF ~~ THEN BEGIN 4
  SAY @10
  IF ~~ THEN DO ~SetGlobal("SpcKg1","AR0810",2)
SetGlobal("SpKAlly","GLOBAL",0)
AddJournalEntry(99999,1)~ EXIT
END

IF ~~ THEN BEGIN 5
  SAY @11
  IF ~~ THEN REPLY @12 DO ~TakePartyItemAll("miscaj")
DestroyItem("miscaj")
SetGlobal("SpKAlly","GLOBAL",1)
SetGlobal("SpcKg1","AR0810",1)
ForceSpell(Myself,ILLUSION_DEATH)
Deactivate(Myself)
DestroySelf()
AddJournalEntry(99998,2)~ EXIT
END

IF ~~ THEN BEGIN 6
  SAY @13
  IF ~~ THEN DO ~SetGlobal("SpKAlly","GLOBAL",0)
SetGlobal("SpcKg1","AR0810",1)
EscapeArea()~ EXIT
END

IF ~Global("SpcKg1","AR0810",2)
!PartyHasItem("miscaj")~ THEN BEGIN 7
  SAY @14
  IF ~~ THEN DO ~SetGlobal("SpKAlly","GLOBAL",0)~ EXIT
END

IF ~Global("SpcKg1","AR0810",2)
PartyHasItem("miscaj")~ THEN BEGIN 8
  SAY @15
  IF ~~ THEN REPLY @12 DO ~TakePartyItemAll("miscaj")
DestroyItem("miscaj")
SetGlobal("SpKAlly","GLOBAL",1)
SetGlobal("SpcKg1","AR0810",1)
ForceSpell(Myself,ILLUSION_DEATH)
Deactivate(Myself)
DestroySelf()
EraseJournalEntry(99999)
AddJournalEntry(99998,2)~ EXIT
END
