BEGIN ~RU_SMITH~

IF ~~ THEN BEGIN MAKE
  SAY @24
  IF ~~ THEN DO ~StartCutSceneMode()
                 StartCutScene("ru_cutsm")~ EXIT
END

IF ~~ THEN BEGIN NOMONEY
  SAY @25
  IF ~~ THEN EXIT
END

IF ~NumTimesTalkedTo(0)
    InPartySlot(LastTalkedToBy,0)~ THEN BEGIN RU_SMITH_0
  SAY #61555
  IF ~~ THEN REPLY @0 GOTO RU_SMITH_3
  IF ~~ THEN REPLY @1 GOTO RU_SMITH_4
  IF ~~ THEN REPLY @2 GOTO RU_SMITH_2
END

IF ~!InPartySlot(LastTalkedToBy,0)~ THEN BEGIN RU_SMITH_1
  SAY @3
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN RU_SMITH_2
  SAY @4
  IF ~~ THEN DO ~SetNumTimesTalkedTo(0)~ EXIT
END

IF ~~ THEN BEGIN RU_SMITH_3
  SAY @5
  IF ~~ THEN DO ~SetNumTimesTalkedTo(0)~ EXIT
END

IF ~~ THEN BEGIN RU_SMITH_4
  SAY @6 = @7 = @8
  IF ~~ THEN REPLY @9 GOTO RU_SMITH_7
  IF ~~ THEN REPLY @10 EXIT
END

IF ~~ THEN BEGIN RU_SMITH_6
  SAY @12
  IF ~~ THEN EXIT
END

IF ~InPartySlot(LastTalkedToBy,0)~ THEN BEGIN RU_SMITH_5
  SAY @13
  IF ~~ THEN REPLY @9 GOTO RU_SMITH_7
  IF ~~ THEN REPLY @10 EXIT
END

IF ~~ THEN BEGIN RU_SMITH_7
  SAY @11
  IF ~True()~ THEN GOTO RU_SMITH_6
  IF ~PartyHasItem("rukitem2")
      Global("RU_ITEM_TALK3","LOCALS",1)
      Global("RU_ItemMaker3","GLOBAL",0)~ THEN GOTO RU_SMITH_25
  IF ~PartyHasItem("rukitem2")
      Global("RU_ITEM_TALK3","LOCALS",0)
      Global("RU_ItemMaker3","GLOBAL",0)~ THEN DO ~SetGlobal("RU_ITEM_TALK3","LOCALS",1)~ GOTO RU_SMITH_22
  IF ~PartyHasItem("rukitems")
      Global("RU_ITEM_TALK2","LOCALS",1)
      Global("RU_ItemMaker2","GLOBAL",0)~ THEN GOTO RU_SMITH_20
  IF ~PartyHasItem("rukitems")
      Global("RU_ITEM_TALK2","LOCALS",0)
      Global("RU_ItemMaker2","GLOBAL",0)~ THEN DO ~SetGlobal("RU_ITEM_TALK2","LOCALS",1)~ GOTO RU_SMITH_17
  IF ~PartyHasItem("ru_brok1")
      Global("RU_ITEM_TALK1","LOCALS",1)
      Global("RU_ItemMaker1","GLOBAL",0)~ THEN GOTO RU_SMITH_15
  IF ~PartyHasItem("ru_brok1")
      Global("RU_ITEM_TALK1","LOCALS",0)
      Global("RU_ItemMaker1","GLOBAL",0)~ THEN DO ~SetGlobal("RU_ITEM_TALK1","LOCALS",1)~ GOTO RU_SMITH_8
END

IF ~~ THEN BEGIN RU_SMITH_8
  SAY @14
  IF ~~ THEN REPLY @15 GOTO RU_SMITH_9
  IF ~~ THEN REPLY @16 GOTO RU_SMITH_16
END

IF ~~ THEN BEGIN RU_SMITH_9
  SAY @17
  IF ~~ THEN REPLY @18 GOTO RU_SMITH_10
END

IF ~~ THEN BEGIN RU_SMITH_10
  SAY @19
  IF ~PartyHasItem("ru_brok2")
      PartyHasItem("MISC44")~ THEN GOTO RU_SMITH_11
  IF ~PartyHasItem("ru_brok2")
      !PartyHasItem("MISC44")~ THEN GOTO RU_SMITH_13
  IF ~!PartyHasItem("ru_brok2")~ THEN GOTO RU_SMITH_14
END

IF ~~ THEN BEGIN RU_SMITH_11
  SAY @20 = @21 = @22
  IF ~~ THEN GOTO RU_SMITH_12
END

IF ~~ THEN BEGIN RU_SMITH_12
  SAY @23
  IF ~PartyGoldLT(50000)~ THEN REPLY #66594 GOTO NOMONEY
  IF ~PartyGoldGT(49999)~ THEN REPLY #66595 
  DO ~SetGlobal("RU_ItemMaker1","GLOBAL",1)
      TakePartyGold(50000)
      TakePartyItemNum("ru_brok1",1)
      TakePartyItemNum("ru_brok2",1)
      TakePartyItemNum("MISC44",1)
      DestroyItem("ru_brok1")
      DestroyItem("ru_brok2")
      DestroyItem("MISC44")
      DestroyGold(50000)~ GOTO MAKE
  IF ~~ THEN REPLY #66597 GOTO RU_SMITH_16
  IF ~~ THEN REPLY @33 EXIT
END

IF ~~ THEN BEGIN RU_SMITH_13
  SAY @20 = @21 = @26 = @27
  IF ~~ THEN REPLY #66554 GOTO RU_SMITH_16
END

IF ~~ THEN BEGIN RU_SMITH_14
  SAY @28
  IF ~~ THEN REPLY #66554 GOTO RU_SMITH_16
END

IF ~~ THEN BEGIN RU_SMITH_15
  SAY @29
  IF ~~ THEN REPLY #66554 GOTO RU_SMITH_10
END

IF ~~ THEN BEGIN RU_SMITH_16
  SAY @34
  IF ~True()~ THEN GOTO RU_SMITH_6
  IF ~PartyHasItem("rukitem2")
      Global("RU_ITEM_TALK3","LOCALS",1)
      Global("RU_ItemMaker3","GLOBAL",0)~ THEN GOTO RU_SMITH_25
  IF ~PartyHasItem("rukitem2")
      Global("RU_ITEM_TALK3","LOCALS",0)
      Global("RU_ItemMaker3","GLOBAL",0)~ THEN DO ~SetGlobal("RU_ITEM_TALK3","LOCALS",1)~ GOTO RU_SMITH_22
  IF ~PartyHasItem("rukitems")
      Global("RU_ITEM_TALK2","LOCALS",1)
      Global("RU_ItemMaker2","GLOBAL",0)~ THEN GOTO RU_SMITH_20
  IF ~PartyHasItem("rukitems")
      Global("RU_ITEM_TALK2","LOCALS",0)
      Global("RU_ItemMaker2","GLOBAL",0)~ THEN DO ~SetGlobal("RU_ITEM_TALK2","LOCALS",1)~ GOTO RU_SMITH_17
END

IF ~~ THEN BEGIN RU_SMITH_17
  SAY @30
  IF ~PartyHasItem("ru_com01")~ THEN GOTO RU_SMITH_18
  IF ~!PartyHasItem("ru_com01")~ THEN GOTO RU_SMITH_19
END

IF ~~ THEN BEGIN RU_SMITH_18
  SAY @31 = @32
  IF ~PartyGoldLT(15000)~ THEN REPLY #66594 GOTO NOMONEY
  IF ~PartyGoldGT(14999)~ THEN REPLY #66595
  DO ~SetGlobal("RU_ItemMaker2","GLOBAL",1)
      TakePartyGold(15000)
      TakePartyItemNum("rukitems",1)
      TakePartyItemNum("ru_com01",1)
      DestroyItem("rukitems")
      DestroyItem("ru_com01")
      DestroyGold(15000)~ GOTO MAKE
  IF ~~ THEN REPLY #66597 GOTO RU_SMITH_21
  IF ~~ THEN REPLY @33 EXIT
END

IF ~~ THEN BEGIN RU_SMITH_19
  SAY @35
  IF ~~ THEN GOTO RU_SMITH_21
END

IF ~~ THEN BEGIN RU_SMITH_20
  SAY @36
  IF ~PartyHasItem("ru_com01")~ THEN GOTO RU_SMITH_18
  IF ~!PartyHasItem("ru_com01")~ THEN GOTO RU_SMITH_19
END

IF ~~ THEN BEGIN RU_SMITH_21
  SAY @42
  IF ~True()~ THEN GOTO RU_SMITH_6
  IF ~PartyHasItem("rukitem2")
      Global("RU_ITEM_TALK3","LOCALS",1)
      Global("RU_ItemMaker3","GLOBAL",0)~ THEN GOTO RU_SMITH_25
  IF ~PartyHasItem("rukitem2")
      Global("RU_ITEM_TALK3","LOCALS",0)
      Global("RU_ItemMaker3","GLOBAL",0)~ THEN DO ~SetGlobal("RU_ITEM_TALK3","LOCALS",1)~ GOTO RU_SMITH_22
END

IF ~~ THEN BEGIN RU_SMITH_22
  SAY @37
  IF ~PartyHasItem("ru_com02")~ THEN GOTO RU_SMITH_23
  IF ~!PartyHasItem("ru_com02")~ THEN GOTO RU_SMITH_24
END

IF ~~ THEN BEGIN RU_SMITH_23
  SAY @38 = @39
  IF ~PartyGoldLT(20000)~ THEN REPLY #66594 GOTO NOMONEY
  IF ~PartyGoldGT(19999)~ THEN REPLY #66595
  DO ~SetGlobal("RU_ItemMaker3","GLOBAL",1)
      TakePartyGold(20000)
      TakePartyItemNum("rukitem2",1)
      TakePartyItemNum("ru_com02",1)
      DestroyItem("rukitem2")
      DestroyItem("ru_com02")
      DestroyGold(20000)~ GOTO MAKE
  IF ~~ THEN REPLY #66597 GOTO RU_SMITH_6
  IF ~~ THEN REPLY @33 EXIT
END

IF ~~ THEN BEGIN RU_SMITH_24
  SAY @40
  IF ~~ THEN GOTO RU_SMITH_6
END

IF ~~ THEN BEGIN RU_SMITH_25
  SAY @41
  IF ~PartyHasItem("ru_com02")~ THEN GOTO RU_SMITH_23
  IF ~!PartyHasItem("ru_com02")~ THEN GOTO RU_SMITH_24
END


