;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[@Sabuk_Display_Main]
{
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_0

[@SearchingGuild_Sabuk]
#IF
#ACT
ReadValueSql "TBL_SabukGuildQuest" "FLD_SabukQuest='SabukQuest'" "FLD_SabukGuildName,FLD_SabukUserName,FLD_SabukCondition,FLD_SabukStatus,FLD_SabukStatusReady" [@SearchingGuild_Sabuk_0]

[@SearchingGuild_Sabuk_0()]
#IF
#ACT
Mov A1 %ARG(1)
Mov A2 %ARG(2)
Mov A3 %ARG(3)
Mov D1 %ARG(4)
Mov D2 %ARG(5)

#IF
!Equal A1 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_1

#IF
Equal A1 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_2

#IF
!Equal A2 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_3

#IF
Equal A2 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_4

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_5

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_6

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_7

[@admin_menu_Sabuk]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_8

[@@*Admin_passwd_Sabuk]
#ACT
mov A0 %INPUTSTR
#IF

;equal A0 %PASSWD(1)
equal A0 RedAlert

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_9


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_10

[@@InPutGuildName_sabuk]
#IF
#ACT
Mov A8 %INPUTSTR
goto @ChangeGuildName_sabuk
break

[@ChangeGuildName_sabuk]
#IF
#ACT
FormatStr "FLD_SabukUserName='%s'" %A8
Mov A6 %A9
UpdateValueSQL "TBL_SabukGuildQuest" "FLD_SabukQuest='SabukQuest'" %A6

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_11

[@@InPutGuildMaster_Sabuk]
#IF
#ACT
Mov A7 %INPUTSTR
goto @ChangeGuildMaster_sabuk
break

[@ChangeGuildMaster_sabuk]
#IF
#ACT
FormatStr "FLD_SabukUserName='%s'" %A7
Mov A6 %A9
UpdateValueSQL "TBL_SabukGuildQuest" "FLD_SabukQuest='SabukQuest'" %A6

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_12

[@ChangeStatus_Sabuk]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_13

[@@Input_QuestLevel_Sabuk]
#IF
#ACT
Mov D5 %INPUTSTR
goto @Change_QuestLevel_Sabuk_1

[@Change_QuestLevel_Sabuk_1]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_14

[@@Input_QuestLevel_Sabuk_1]
#IF
#ACT
Mov D6 %INPUTSTR
goto @Change_QuestLevelSabuk_Result

[@Change_QuestLevelSabuk_Result]
#IF
#ACT
FormatStr "FLD_SabukStatus='%s',FLD_SabukStatusReady='%s'" %D2 %D3
Mov A6 %A9
UpdateValueSQL "TBL_SabukGuildQuest" "FLD_SabukQuest='SabukQuest'" %A6

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_15

[@Review_SabukQuest]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_16

}



[@SinGiSun_Display_Main]
{
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_17

[@@InPutuSERName_SinGiSun]
#IF
#ACT
Mov A8 %INPUTSTR
goto @SearchingUser_SinGiSun
break

[@SearchingUser_SinGiSun]
#IF
#ACT
FormatStr "FLD_SINUSERNAME='%s'" %A8
Mov A6 %A9
ReadValueSql "TBL_SinGiSunQuest" %A6 "FLD_SINUSERNAME,FLD_SINMAINSTEP,FLD_SINSTEP_READY" [@SearchingUser_SinGiSun_0]

[@SearchingUser_SinGiSun_0()]
#IF
#ACT
Mov A1 %ARG(1)
Mov D1 %ARG(2)
Mov D2 %ARG(3)


#IF
!Equal A1 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_18

#IF
Equal A1 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_19

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_20

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_21

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_22

[@admin_menu_SinGiSun]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_23

[@@*Admin_passwd_SinGiSun]
#ACT
mov A0 %INPUTSTR
#IF

;equal A0 %PASSWD(1)
equal A0 RedAlert

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_24


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_25

[@ChangeContent_SinGiSun]
#IF
!Equal A1 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_26


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_27

[@@Input_Content_SinGiSun]
#IF
#ACT
Mov D5 %INPUTSTR
goto @ChangeContent_SinGiSun_1

[@ChangeContent_SinGiSun_1]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_28

[@@Input_Content_SinGiSun_1]
#IF
#ACT
Mov D6 %INPUTSTR
goto @ChangeContent_SinGiSun_2

[@ChangeContent_SinGiSun_2]
#IF

#ACT
FormatStr "FLD_SINUSERNAME='%s'" %A8
Mov A6 %A9
FormatStr "FLD_SINMAINSTEP='%s',FLD_SINSTEP_READY='%s'" %D5 %D6
UpdateValueSQL "TBL_SinGiSunQuest" %A6 %A9

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_29

[@WriteContent_SinGiSun]
#ACT
FormatStr "'%s',%s,%s" %A8 1 0
mov A7 %A9
FormatStr "FLD_SINUSERNAME='%s'" %A8
mov A6 %A9
WriteValueSql "TBL_SinGiSunQuest" %A6 "FLD_SINUSERNAME,FLD_SINMAINSTEP,FLD_SINSTEP_READY" %A7
set [203] 1
set [204] 0

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_30

[@Review_SinGiSun]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_31

}


[@Honchondo_Display_Main]
{
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_32

[@SearchingUsre_Honchondo]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_33

[@@InPutuSERName_Honchondo]
#IF
#ACT
Mov A8 %INPUTSTR
goto @SearchingUser_Honchondo
break

[@SearchingUser_Honchondo]
#IF
#ACT
FormatStr "FLD_MADOUSER='%s'" %A8
Mov A6 %A9
ReadValueSql "TBL_HonChonMadoQuest" %A6 "FLD_MADOUSER,FLD_MADOMAIN,FLD_MADOCONTENT,FLD_MADOQUESTCHECK,FLD_MADOPATTERN,FLD_MADOTEMPQUEST" @SearchingUser_Honchondo_0

[@SearchingUser_Honchondo_0()]
#IF
#ACT
Mov A1 %ARG(1)
Mov D1 %ARG(2)
Mov D2 %ARG(3)
Mov D3 %ARG(4)
Mov D4 %ARG(5)
Mov D5 %ARG(6)


#IF
!Equal A1 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_34

#IF
Equal A1 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_35

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_36

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_37

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_38

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_39

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_40

[@admin_menu_Honchondo]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_41

[@@*Admin_passwd_Honchondo]
#ACT
mov A0 %INPUTSTR
#IF

;equal A0 %PASSWD(1)
equal A0 RedAlert

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_42


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_43

[@ChangeContent_Honchondo]
#IF
!Equal A1 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_44


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_45

[@@Input_Content_Honchondo]
#IF
#ACT
Mov D6 %INPUTSTR
goto @ChangeContent_Honchondo_1

[@ChangeContent_Honchondo_1]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_46

[@@Input_Content_Honchondo_1]
#IF
#ACT
Mov D7 %INPUTSTR
goto @ChangeContent_Honchondo_2

[@ChangeContent_Honchondo_2]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_47

[@@Input_Content_Honchondo_2]
#IF
#ACT
Mov D8 %INPUTSTR
goto @ChangeContent_Honchondo_3

[@ChangeContent_Honchondo_3]
#IF
#ACT
FormatStr "FLD_MADOUSER='%s'" %A8
Mov A6 %A9
FormatStr "FLD_MADOMAIN='%s',FLD_MADOCONTENT='%s',FLD_MADOQUESTCHECK='%s'" %D6 %D7 %D8
Mov A7 %A9
UpdateValueSQL "TBL_HonChonMadoQuest" %A6 %A7

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_48

[@WriteContent_Honchondo]
#ACT
FormatStr "'%s',%s,%s" %A8 1 0
mov A7 %A9
FormatStr ",%s,%s,%s" 0 0 0
AddStr A7 %A9
FormatStr "FLD_MADOUSER='%s'" %A8
Mov A6 %A9
WriteValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOUSER,FLD_MADOMAIN,FLD_MADOCONTENT,FLD_MADOQUESTCHECK,FLD_MADOPATTERN,FLD_MADOTEMPQUEST" %A7
set [205] 1
set [206] 0

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_49

[@Review_Honchondo]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_50

}


[@Honchonmado_Display_Main]
{
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_51

[@SearchingUsre_Honchonmado]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_52

[@@InPutuSERName_Honchonmado]
#IF
#ACT
Mov A8 %INPUTSTR
goto @SearchingUser_Honchonmado
break

[@SearchingUser_Honchonmado]
#IF
#ACT
FormatStr "FLD_MADOHAVEUSER='%s'" %A8
Mov A7 %A9
ReadValueSql "TBL_MadoHaveUserQuest" %A7 "FLD_MADOHAVEUSER,FLD_MADOUSERCONTENT,FLD_MADOUSERCHECK,FLD_MADOUSERPATTERN" [@SearchingUser_Honchonmado_0]

[@SearchingUser_Honchonmado_0()]
#IF
#ACT
Mov A1 %ARG(1)
Mov D1 %ARG(2)
Mov D2 %ARG(3)
Mov D3 %ARG(4)



#IF
!Equal A1 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_53

#IF
Equal A1 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_54

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_55

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_56

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_57

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_58

[@admin_menu_Honchonmado]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_59

[@@*Admin_passwd_Honchonmado]
#ACT
mov A0 %INPUTSTR
#IF

;equal A0 %PASSWD(1)
equal A0 RedAlert

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_60


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_61

[@ChangeContent_Honchonmado]
#IF
!Equal A1 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_62


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_63

[@@Input_Content_Honchonmado]
#IF
#ACT
Mov D5 %INPUTSTR
goto @ChangeContent_Honchonmado_1

[@ChangeContent_Honchonmado_1]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_64

[@@Input_Content_Honchonmado_1]
#IF
#ACT
Mov D6 %INPUTSTR
goto @ChangeContent_Honchonmado_2

[@ChangeContent_Honchonmado_2]
#IF
#ACT
FormatStr "FLD_MADOHAVEUSER='%s'" %A8
Mov A6 %A9
FormatStr "FLD_MADOUSERCONTENT='%s',FLD_MADOUSERCHECK='%s'" %D5 %D6
Mov A7 %A9
UpdateValueSQL "TBL_HonChonMadoQuest" %A6 %A7

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_65

[@WriteContent_Honchonmado]
#ACT
FormatStr "'%s',%s,%s" %A8 1 0
mov A7 %A9
FormatStr ",%s" 0
AddStr A7 %A9
FormatStr "FLD_MADOHAVEUSER='%s'" %A8
Mov A6 %A9
WriteValueSql "TBL_MadoHaveUserQuest" %A6 "FLD_MADOHAVEUSER,FLD_MADOUSERCONTENT,FLD_MADOUSERCHECK,FLD_MADOUSERPATTERN" %A7
set [207] 1
set [208] 0

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_66

[@Review_Honchonmado]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_67

}



[@TodayQuest_Display_Main]
{
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_68

[@admin_menu_TodayQuest]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_69

[@@*Admin_passwd_TodayQuest]
#ACT
mov A0 %INPUTSTR
#IF

;equal A0 %PASSWD(1)
equal A0 RedAlert

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_70


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_71

[@@InPutUser_TodayQuest]
#ACT
Mov A8 %INPUTSTR
goto @SearchingUserName_TodayQuest
break

[@SearchingUserName_TodayQuest]
#ACT
FormatStr "FLD_USERNAME='%s'" %A8
ReadValueSql "TBL_DairyQuestUser" %A9 "FLD_USERNAME,FLD_QuestIdx,FLD_Step,FLD_TQCASE,FLD_Condition1,FLD_Condition1Amount" [@SearchingUserName_TodayQuest_0]

[@SearchingUserName_TodayQuest_0()]
#ACT
Mov A1 %ARG(1)
Mov D1 %ARG(2)
Mov A2 %ARG(3)
Mov D2 %ARG(4)
Mov A3 %ARG(5)
Mov D3 %ARG(6)
ReadValueSql "TBL_DairyQuestUser" %A9 "FLD_Condition2,FLD_Condition2Amount,FLD_Condition3,FLD_Condition3Amount,FLD_TQNPC" [@SearchingUserName_TodayQuest_1]

[@SearchingUserName_TodayQuest_1()]
#ACT
Mov A4 %ARG(1)
Mov D4 %ARG(2)
Mov A5 %ARG(3)
Mov D5 %ARG(4)
Mov A6 %ARG(5)

#IF
!Equal A1 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_72

#IF
Equal A1 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_73

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_74

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_75

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_76

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_77

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_78

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_79

[@@InPutNumber_TodayQuest]
#ACT
Mov D9 %INPUTSTR
goto @SearchingUser_TodayQuest
break

[@SearchingUser_TodayQuest]
#ACT
RandSetDailyQuest %D9 %D9
Set [209] 1
Set [210] 0
Set [409] 0
Formatstr "FLD_TQIDX=%s" %D9
Mov A8 %A9
ReadValueSql "TBL_DairyQuestSet" %A8 "FLD_TQCASE,FLD_TQCondition1,FLD_TQCondition1Amount,FLD_TQCondition2,FLD_TQCondition2Amount,FLD_TQCondition3" [@SearchingUser_TodayQuest]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_80

[@SearchingUser_TodayQuest()]
#ACT
Mov D1 %ARG(1)
Mov A2 %ARG(2)
Mov D2 %ARG(3)
Mov A3 %ARG(4)
Mov D3 %ARG(5)
Mov A4 %ARG(6)

Formatstr "FLD_TQIDX=%s" %D9
Mov A8 %A9
ReadValueSql "TBL_DairyQuestSet" %A8 "FLD_TQCondition3Amount,FLD_TQFame,FLD_TQNPC,FLD_TQPosition" [@SearchingUser_User_TodayQuest]

[@SearchingUser_User_TodayQuest()]
#ACT
Mov D4 %ARG(1)
Mov D5 %ARG(2)
Mov A5 %ARG(3)
Mov A6 %ARG(4)
Set [409] 0

FormatStr "'%s',%s,'%s'" %USERNAME %D9 "Ready"
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
Mov A7 %A9
WriteValueSql "TBL_DairyQuestUser" %A7 "FLD_UserName,FLD_QuestIdx,FLD_Status" %A8

FormatStr "FLD_Step='%s',FLD_TQCASE=%s,FLD_Condition1='%s'" "NULL" %D1 %A2
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
Mov A7 %A9
UpdateValueSql "TBL_DairyQuestUser" %A7 %A8

FormatStr "FLD_Condition1Amount=%s,FLD_Condition2='%s',FLD_Condition2Amount=%s" %D2 %A3 %D3
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
Mov A7 %A9
UpdateValueSql "TBL_DairyQuestUser" %A7 %A8

FormatStr "FLD_Condition3='%s',FLD_Condition3Amount=%s,FLD_TQFame=%s" %A4 %D4 %D5
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
Mov A7 %A9
UpdateValueSql "TBL_DairyQuestUser" %A7 %A8

FormatStr "FLD_TQNPC='%s',FLD_TQPosition='%s'" %A5 %A6
Mov A8 %A9
FormatStr "FLD_UserName='%s'" %USERNAME
Mov A7 %A9
UpdateValueSql "TBL_DairyQuestUser" %A7 %A8

goto @Call_TodayQuest_Setting

[@Call_TodayQuest_Setting]
#CALL [TodayQuest\QT_ReadyBook.txt] @Ready_QuestDairyToday
}



[@Mainquest_Display_Main]
{
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_81

[@Mainquest_UserName]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_82

[@@InPutUserName]
#IF
#ACT
Mov A8 %INPUTSTR
goto @InPutMain_UserName
break

[@InPutMain_UserName]
#IF
#ACT
FormatStr "FLD_CHAR='%s'" %A8
Mov A7 %A9
ReadValueSql "TBL_BasicCharQuest" %A7 "FLD_CHAR,FLD_STATUS1,FLD_STATUS1_RDY" [@UserName_call]

[@UserName_call()]
#IF
#ACT
Mov A1 %ARG(1)
Mov D1 %ARG(2)
Mov D2 %ARG(3)

#IF
!Equal A1 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_83

#IF
Equal A1 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_84

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_85

#IF
Equal D1 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_86

#IF
Equal D1 2

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_87

#IF
Equal D1 3

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_88

#IF
Equal D1 4

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_89

#IF
Equal D1 5

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_90

#IF
Equal D1 6

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_91

#IF
Equal D1 7

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_92

#IF
Equal D1 8

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_93

#IF
Equal D1 9

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_94

#IF
Equal D1 10

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_95

#IF
Equal D1 11

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_96

#IF
Equal D1 12

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_97

#IF
Equal D1 13

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_98

#IF
Equal D1 14

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_99

#IF
Equal D1 15

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_100

#IF
Equal D1 16

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_101

#IF
Equal D1 17

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_102

#IF
Equal D1 18

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_103

#IF
Equal D1 19

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_104

#IF
Equal D1 20

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_105

#IF
Equal D1 21

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_106

#IF
Equal D1 22

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_107

#IF
Equal D1 23

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_108

#IF
Equal D1 24

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_109

#IF
Equal D1 25

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_110

#IF
Equal D1 26

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_111

#IF
Equal D1 27

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_112

#IF
Equal D1 28

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_113

#IF
Equal D1 29

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_114

#IF
Equal D1 30

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_115

#IF
Equal D1 31

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_116

#IF
Equal D1 32

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_117

#IF
Equal D1 33

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_118

#IF
Equal D1 34

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_119

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_120

[@admin_menu_Mainquest]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_121

[@@*Admin_passwd_Mainquest]
#ACT
mov A0 %INPUTSTR
#IF

;equal A0 %PASSWD(1)
equal A0 RedAlert

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_122


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_123

[@Change_Mainquest]
#IF
!Equal A1 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_124


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_125

#ELSEACT
break

[@@Change_Mainquest_1]
#IF
#ACT
Mov D4 %INPUTSTR
goto @Change_Mainquest_1_1

[@@Change_Mainquest_2]
#IF
#ACT
Mov D3 %INPUTSTR
goto @Change_Mainquest_2_1

[@Change_Mainquest_2_1]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_126

[@@Change_Mainquest_2_2]
#IF
#ACT
Mov D4 %INPUTSTR
goto @Change_Mainquest_2_3

[@Change_Mainquest_2_3]
#IF
#ACT
FormatStr "FLD_CHAR='%s'" %A8
Mov A6 %A9
FormatStr "FLD_STATUS1='%s',FLD_STATUS1_RDY='%s'" %D3 %D4
Mov A7 %A9
UpdateValueSQL "TBL_BasicCharQuest" %A6 %A7


#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_127

[@Change_Mainquest_1_1]
#IF
#ACT
FormatStr "FLD_CHAR='%s'" %A8
Mov A6 %A9
FormatStr "FLD_STATUS1_RDY='%s'" %D4
Mov A7 %A9
UpdateValueSQL "TBL_BasicCharQuest" %A6 %A7


#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_128

}

[@Samak_Display_Main]
{
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_129

[@@InPutGuildName]
#IF
#ACT
Mov A8 %INPUTSTR
goto @SearchingGuild
break

[@SearchingGuild]
#IF
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %A8
Mov A7 %A9
ReadValueSQL "TBL_SamakCastleQuest" %A7 "FLD_SAMAKGUILD,FLD_SAMAKGUILDMASTER,FLD_SAMAKCONDITION,FLD_SAMAKSTATUS,FLD_SAMAKSTATUSRDY" [@SearchingGuild_Read]

[@SearchingGuild_Read()]
#IF
#ACT
Mov A1 %ARG(1)
Mov A2 %ARG(2)
Mov A3 %ARG(3)
Mov D0 %ARG(4)
Mov D1 %ARG(5)

#IF
Equal A1 %A8
#ACT
goto @Display_SamakCastleQuest
break

#ELSEACT
goto @NonQuestGuild
break

[@NonQuestGuild]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_130

[@ImportNewQuestGuild]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_131

[@@ImportNewQuestGuildName]
#IF
#ACT
Mov A1 %INPUTSTR
goto @ImportNewQuestGuildMaster

[@ImportNewQuestGuildMaster]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_132

[@@ImportNewQuestGuildMaster_1]
#IF
#ACT
Mov A2 %INPUTSTR
goto @ImportNewQuestGuild_Check

[@ImportNewQuestGuild_Check]
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %A1
Mov A7 %A9
ReadValueSQL "TBL_SamakCastleQuest" %A7 "FLD_SAMAKGUILD" [@ImportNewQuestGuild_CheckRead]

[@ImportNewQuestGuild_CheckRead()]
#IF
#ACT
Mov A3 %ARG(1)

#IF
Equal A1 %A3

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_133

#IF
Equal A3 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_134

[@ImportNewQuestGuild_SQL]
#IF
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %A1
Mov A6 %A9
FormatStr "FLD_SAMAKGUILDMASTER='%s'" %A2
Mov A7 %A9
WriteValueSQL "TBL_SamakCastleQuest" %A6 %A7

[@Display_SamakCastleQuest]
#IF
Equal A3 "Complete"

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_135

#ACT
break

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_136

[@Amendment_GuildMaster]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_137

[@@Input_Amendment_GuildMaster]
#IF
#ACT
Mov A7 %INPUTSTR
goto @Amendment_GuildMaster_Result

[@Amendment_GuildMaster_Result]
#IF
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %A1
Mov A6 %A9
FormatStr "FLD_SAMAKGUILDMASTER='%s'" %A7
Mov A8 %A9
UpdateValueSQL "TBL_SamakCastleQuest" %A6 %A8

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_138

[@Amendment_QuestLevel]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_139

[@@Input_Amendment_QuestLevel]
#IF
#ACT
Mov D2 %INPUTSTR
goto @Amendment_QuestLevel_1

[@Amendment_QuestLevel_1]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_140

[@@Input_Amendment_QuestLevel_1]
#IF
#ACT
Mov D3 %INPUTSTR
goto @Amendment_QuestLevel_Result

[@Amendment_QuestLevel_Result]
#IF
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %A1
Mov A6 %A9
FormatStr "FLD_SAMAKSTATUS='%s',FLD_SAMAKSTATUSRDY='%s'" %D2 %D3
Mov A7 %A9
UpdateValueSQL "TBL_SamakCastleQuest" %A6 %A7

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_141

[@Amendment_Complete]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_142

[@Amendment_Complete_Confirm]
#IF
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %A1
Mov A6 %A9
FormatStr "FLD_SAMAKCONDITION='%s'" "Complete"
Mov A7 %A9
UpdateValueSQL "TBL_SamakCastleQuest" %A6 %A7

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_143

[@Review_SamakQuest]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\Display.txt] @Convert_Display_144

}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;