// creator  : weidu.exe (version 23600)
// argument : BORDA.DLG
// game     : .
// source   : ./override/BORDA.DLG
// dialog   : lang\en_us/dialog.tlk
// dialogF  : (none)

BEGIN ~BORDA~

IF ~  True()
~ THEN BEGIN 0 // from:
  SAY #18292 /* ~Why, looky here. A finer bunch of adventurers, I don't think I've ever seen. Hmm, though from the looks of it, you don't seem to be that well equipped. Well, you're in a lot of luck, I can solve all of your problems. I have a huge collection of potions and scrolls, all for a cheap price. Right now I can give you a potion of extra healing for 25 gold, a scroll of protection from petrification for 25 gold, or a scroll of protection from magic for 100 gold. So what do ya say?~ */
  IF ~~ THEN REPLY #18298 /* ~Sorry, but we're not really needing to stock up right now.~ */ GOTO 1
  IF ~  PartyGoldGT(24)
~ THEN REPLY #18299 /* ~How about the potion of extra healing?~ */ GOTO 2
  IF ~  PartyGoldGT(24)
~ THEN REPLY #18302 /* ~The scroll of protection from petrification looks good.~ */ GOTO 3
  IF ~  PartyGoldGT(99)
~ THEN REPLY #18303 /* ~Protection from magic! Say no more, we want that.~ */ GOTO 4
  IF ~~ THEN REPLY #18304 /* ~I don't think we really need to buy anything from you. You hand over all of your precious potions and scrolls, or we'll take them from you by force.~ */ GOTO 5
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #18306 /* ~You don't know what you're missing.~ */
  IF ~~ THEN DO ~EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 2 // from: 0.1
  SAY #18308 /* ~This potion can be a lifesaver, trust me.~ */
  IF ~~ THEN DO ~GiveItem("POTN25",LastTalkedToBy)
TakePartyGold(25)
EscapeArea()
~ EXIT
  IF ~Global("X#ImoenBorda1","GLOBAL",0)
InParty("imoen")
InMyArea("imoen")
!StateCheck("imoen",CD_STATE_NOTVALID)
!Class(Player1,THIEF_ALL)
~ THEN DO ~SetGlobal("X#ImoenBorda1","GLOBAL",1)~ EXTERN ~IMOEN2~ 169
  IF ~Global("X#ImoenBorda2","GLOBAL",0)
InParty("imoen")
InMyArea("imoen")
!StateCheck("imoen",CD_STATE_NOTVALID)
Class(Player1,THIEF_ALL)
~ THEN DO ~SetGlobal("X#ImoenBorda2","GLOBAL",1)~ EXTERN ~IMOEN2~ 172
END

IF ~~ THEN BEGIN 3 // from: 0.2
  SAY #18310 /* ~Great protection against basilisks. See you later.~ */
  IF ~~ THEN DO ~GiveItem("SCRL16",LastTalkedToBy)
TakePartyGold(25)
EscapeArea()
~ EXIT
  IF ~Global("X#ImoenBorda1","GLOBAL",0)
InParty("imoen")
InMyArea("imoen")
!StateCheck("imoen",CD_STATE_NOTVALID)
!Class(Player1,THIEF_ALL)
~ THEN DO ~SetGlobal("X#ImoenBorda1","GLOBAL",1)~ EXTERN ~IMOEN2~ 170
  IF ~Global("X#ImoenBorda2","GLOBAL",0)
InParty("imoen")
InMyArea("imoen")
!StateCheck("imoen",CD_STATE_NOTVALID)
Class(Player1,THIEF_ALL)
~ THEN DO ~SetGlobal("X#ImoenBorda2","GLOBAL",1)~ EXTERN ~IMOEN2~ 173
END

IF ~~ THEN BEGIN 4 // from: 0.3
  SAY #18311 /* ~This scroll is a dandy. If you ever find yourself in a battle against magic users, just read this one off, and you'll have no worries.~ */
  IF ~~ THEN DO ~GiveItem("SCRL10",LastTalkedToBy)
TakePartyGold(100)
EscapeArea()
~ EXIT
  IF ~Global("X#ImoenBorda1","GLOBAL",0)
InParty("imoen")
InMyArea("imoen")
!StateCheck("imoen",CD_STATE_NOTVALID)
!Class(Player1,THIEF_ALL)
~ THEN DO ~SetGlobal("X#ImoenBorda1","GLOBAL",1)~ EXTERN ~IMOEN2~ 171
  IF ~Global("X#ImoenBorda2","GLOBAL",0)
InParty("imoen")
InMyArea("imoen")
!StateCheck("imoen",CD_STATE_NOTVALID)
Class(Player1,THIEF_ALL)
~ THEN DO ~SetGlobal("X#ImoenBorda2","GLOBAL",1)~ EXTERN ~IMOEN2~ 174
END

IF ~~ THEN BEGIN 5 // from: 0.4
  SAY #18313 /* ~Holy bloodthirsty! You guys obviously don't calm down often to think about things. Okay now, let me explain: I'm selling magic items for cheap. Therefore, I have easy access to said items. Therefore, you just called out the wrong guy.~ */
  IF ~~ THEN DO ~Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 6 // from:
  SAY #46978 /* ~Gotta go!~ */
  IF ~~ THEN DO ~GiveItem("POTN25",LastTalkedToBy)
TakePartyGold(25)
EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 7 // from:
  SAY #46978 /* ~Gotta go!~ */
  IF ~~ THEN DO ~GiveItem("SCRL16",LastTalkedToBy)
TakePartyGold(25)
EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 8 // from:
  SAY #46978 /* ~Gotta go!~ */
  IF ~~ THEN DO ~GiveItem("SCRL10",LastTalkedToBy)
TakePartyGold(100)
EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 9 // from:
  SAY #46978 /* ~Gotta go!~ */
  IF ~~ THEN DO ~GiveItem("POTN25",LastTalkedToBy)
TakePartyGold(25)
EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 10 // from:
  SAY #46978 /* ~Gotta go!~ */
  IF ~~ THEN DO ~GiveItem("SCRL16",LastTalkedToBy)
TakePartyGold(25)
EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 11 // from:
  SAY #46978 /* ~Gotta go!~ */
  IF ~~ THEN DO ~GiveItem("SCRL10",LastTalkedToBy)
TakePartyGold(100)
EscapeArea()
~ EXIT
END
