Reference
  Area\Util.txt
  Util\Audio.txt
  Util\Party.txt
  Area\Service.txt
  Util\CommonDialog.txt
End Reference

Procedure Main(startAt)

  Dim ac = Nothing

  RegisterCommonEventHandlers()

  SetZoneOfTown(48, 48, 1, 1, 46, 46, ExitArea_Enter)

  ac = AddActor_MTStopped("EqShopper", 22, 16, 0, [A_Man], ActorMotion.Down, Nothing)
  ac = AddStaticActor("EqShopperEve", 22, 17, 10, [A_Null], EqShopperEve_Contact)

  ac = AddActor_MTStopped("MgShopper", 24, 16, 0, [A_OldMan], ActorMotion.Down, Nothing)
  ac = AddStaticActor("MgShopperEve", 24, 17, 10, [A_Null], MgShopperEve_Contact)

  ac = AddActor_MTStopped("GdShopper", 17, 5, 0, [A_Woman], ActorMotion.Down, Nothing)
  ac = AddStaticActor("GdShopperEve", 17, 6, 10, [A_Null], GdShopperEve_Contact)

  ac = AddActor_MTStopped("InnFront", 15, 5, 0, [A_Man], ActorMotion.Down, Nothing)
  ac = AddStaticActor("InnFrontEve", 15, 6, 10, [A_Null], InnFrontEve_Contact)

  ac = AddActor_MTStopped("AntiqueDealer", 6, 29, 0, [A_Man], ActorMotion.Down, Nothing)
  ac = AddStaticActor("AntiqueDealerEve", 6, 30, 10, [A_Null], AntiqueDealerEve_Contact)
  
  ac = AddActor_MTZonedRandom("Towner1", 6, 17, 0, _
    3, 15, 0, 9, 19, 0, [A_Woman], Towner1_Contact)
  
  ac = AddActor_MTZonedRandom("Towner2", 41, 30, 0, _
    38, 28, 0, 44, 32, 0, [A_OldMan], Towner2_Contact)
    
  DoInsideWarp(startAt, SetEntranceEx({12, 1, 0}, {35, 46, 0}, {1, 12, 0}, {46, 12, 0}), False)
  
  ChangeBGM(Music.Town)
  PutAreaNameLabel()

  NotifyEntered()
  Idle(ProcessInput)
  NotifyExiting()

End Procedure

Procedure ExitArea_Enter()
  BeginOutsideWarp([Field], GetAreaObject().Tag)
End Procedure

Procedure EqShopperEve_Contact()
  DoShop({[Katana], [SonicBoom], [TitanArmor], [ZirconArmor], [TitanShield], [ZirconShield], [TitanHelmet], [ZirconHelmet]})
End Procedure

Procedure MgShopperEve_Contact()
  DoMagicShop({[Heal3], [Fire3], [IntUp], [IntDown], [Berserk], [FireDPUp], [HealAll2], [Cold3], [Elec3], [Charm], [ElecDPUp], [Revive2]})
End Procedure

Procedure GdShopperEve_Contact()
  DoShop({[Heal_T1], [Heal_T2], [CureAll_T], [Revive_T]})
End Procedure

Procedure InnFrontEve_Contact()
  DoInn(240)
End Procedure

Procedure AntiqueDealerEve_Contact()
  Dim p_name = [TheHero].Name + "："
  Dim q_name = "骨董屋："
  If TestFlag("Horoira_1") Then
    DoMsg(q_name, "骨董品なんぞに興味はないだろう？")
  Else
    DoMsg(q_name, "いらっしゃい")
    DoMsg(p_name, "随分　古い物を扱ってるお店ですね")
    DoMsg(q_name, "そうさ　骨董屋だからね", _
      "お客さんみたいな若い人が来るのは珍しいよ")
    Sleep(500)
    DoMsg(p_name, "ん？　これは……")
    DoMsg(q_name, "ああ　この本かい？", _
      "昔　どうしてもって言うので買い取ったんだけど", _
      "なにせ　読めなくてね　何が書いてあるんだか")
    Sleep(500)
    If DoYesNoMsg(q_name, "欲しいのかい？", _
      "なんだったら" + MoneyStr([AuraDocA].Price) + "でどうだい") Then
      If PayMoney([AuraDocA].Price) Then
        DoMsg(q_name, "君も物好きだねえ", _
          "お買い上げありがとうございます")
        GiveUsTool([AuraDocA])
        SetFlag("Horoira_1")
      Else
        DoMsg(p_name, "やっぱりいいです")
      End If
    End If
  End If
End Procedure

Procedure Towner1_Contact()
  DoMsg("峠を越えれば北方自治区よ", _
    "大きな町があるんですって", _
    "いちど行ってみたいな")
End Procedure

Procedure Towner2_Contact()
  DoMsg("都会へのあこがれ", _
    "わしも昔はあったのう……")
End Procedure
