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


[@Basic5_Bichunkanli_20]
{
#IF
#ACT
FormatStr "FLD_CHAR='%s'" %USERNAME
ReadValueSql "TBL_BasicCharQuest" %A9 "FLD_CHAR,FLD_STATUS1,FLD_STATUS1_RDY,FLD_MAKEIDX" [@Bichunkanli_Next]

[@Bichunkanli_Next()]
#IF
#ACT
mov A0 %ARG(1)
mov D0 %ARG(2)
mov D1 %ARG(3)

#IF
Equal A0 %USERNAME
Equal D0 20
Equal D1 16
#ACT
GOTO @Bichunkanli_STEP5
BREAK

#IF
Equal A0 %USERNAME
Equal D0 20
Equal D1 4
#ACT
GOTO @Bichunkanli_STEP4
BREAK

#IF
Equal A0 %USERNAME
Equal D0 20
Equal D1 3
#ACT
GOTO @Bichunkanli_STEP3
BREAK

#IF
Equal A0 %USERNAME
Equal D0 20
Equal D1 2
#ACT
GOTO @Bichunkanli_STEP2
BREAK

#IF
Equal A0 %USERNAME
Equal D0 20
Equal D1 1
#ACT
GOTO @Bichunkanli_STEP1
BREAK

#IF
Equal A0 %USERNAME

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_0

#ACT
BREAK

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_1

#ACT
BREAK

[@Bichunkanli_STEP1]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_2

[@Bichunkanli_STEP1_1]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_3

[@Bichunkanli_STEP1_2]
#IF
#ACT
FormatStr "FLD_CHAR='%s'" %USERNAME
UpdateValueSql "TBL_BasicCharQuest" %A9 "FLD_STATUS1_RDY=2"

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_4

[@Bichunkanli_STEP2]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_5

[@Bichunkanli_STEP3]
#IF
#ACT
FormatStr "FLD_CHAR='%s'" %USERNAME
UpdateValueSql "TBL_BasicCharQuest" %A9 "FLD_STATUS1_RDY=4"

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_6

[@Bichunkanli_STEP4]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_7

[@Bichunkanli_STEP5]
#IF
checkitem 不死牌 1
#ACT
SET [304] 1
take 不死牌 1
Mov A0 "AreaQuest4"
Mov D0 2
Mov D1 0
Mov D2 0
Mov D3 0
Goto @EverythingReward
FormatStr "FLD_CHAR='%s'" %USERNAME
UpdateValueSql "TBL_BasicCharQuest" %A9 "FLD_STATUS1_RDY=0"
UpdateValueSql "TBL_BasicCharQuest" %A9 "FLD_STATUS1=21"

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_8


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_9

#ELSEACT
break

}





[@Basic5_Unbal_20]
{
#IF
#ACT
FormatStr "FLD_CHAR='%s'" %USERNAME
ReadValueSql "TBL_BasicCharQuest" %A9 "FLD_CHAR,FLD_STATUS1,FLD_STATUS1_RDY,FLD_MAKEIDX" [@Unbal_Next]

[@Unbal_Next()]
#IF
#ACT
mov A0 %ARG(1)
mov D0 %ARG(2)
mov D1 %ARG(3)

#IF
Equal A0 %USERNAME
Equal D0 20
Equal D1 14
#ACT
GOTO @Unbal_STEP4
BREAK

#IF
Equal A0 %USERNAME
Equal D0 20
Equal D1 13
#ACT
GOTO @Unbal_STEP3
BREAK

#IF
Equal A0 %USERNAME
Equal D0 20
Equal D1 5
#ACT
GOTO @Unbal_STEP2
BREAK

#IF
Equal A0 %USERNAME
Equal D0 20
Equal D1 4
#ACT
GOTO @Unbal_STEP1
BREAK


#IF
Equal A0 %USERNAME

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_10

#ACT
BREAK

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_11

#ACT
BREAK

[@Unbal_STEP1]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_12

[@Unbal_STEP1_1]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_13

[@Unbal_STEP1_2]
#IF
#ACT
FormatStr "FLD_CHAR='%s'" %USERNAME
UpdateValueSql "TBL_BasicCharQuest" %A9 "FLD_STATUS1_RDY=5"

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_14

[@Unbal_STEP2]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_15

[@Unbal_STEP3]
#IF
checkitem 半块不死牌 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_16


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_17

#ELSEACT
break

[@Unbal_STEP3_1]
#IF
#ACT
FormatStr "FLD_CHAR='%s'" %USERNAME
UpdateValueSql "TBL_BasicCharQuest" %A9 "FLD_STATUS1_RDY=14"

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_18

[@Unbal_STEP4]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_19

}



[@Basic5_Whanpc_20]
{
#IF
#ACT
FormatStr "FLD_CHAR='%s'" %USERNAME
ReadValueSql "TBL_BasicCharQuest" %A9 "FLD_CHAR,FLD_STATUS1,FLD_STATUS1_RDY,FLD_MAKEIDX" [@Whanpc_Next]

[@Whanpc_Next()]
#IF
#ACT
mov A0 %ARG(1)
mov D0 %ARG(2)
mov D1 %ARG(3)

#IF
Equal A0 %USERNAME
Equal D0 20
Equal D1 10
#ACT
GOTO @Whanpc_STEP4
BREAK

#IF
Equal A0 %USERNAME
Equal D0 20
Equal D1 9
#ACT
GOTO @Whanpc_STEP3
BREAK

#IF
Equal A0 %USERNAME
Equal D0 20
Equal D1 6
#ACT
GOTO @Whanpc_STEP2
BREAK

#IF
Equal A0 %USERNAME
Equal D0 20
Equal D1 5
#ACT
GOTO @Whanpc_STEP1
BREAK

#IF
Equal A0 %USERNAME

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_20

#ACT
BREAK

[@Whanpc_STEP1]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_21

[@Whanpc_STEP1_1]
#IF
#ACT
FormatStr "FLD_CHAR='%s'" %USERNAME
UpdateValueSql "TBL_BasicCharQuest" %A9 "FLD_STATUS1_RDY=6"

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_22

[@Whanpc_STEP2]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_23

[@Whanpc_STEP3]
#IF
#ACT
SET [199] 1
FormatStr "FLD_CHAR='%s'" %USERNAME
UpdateValueSql "TBL_BasicCharQuest" %A9 "FLD_STATUS1_RDY=10"

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_24

[@Whanpc_STEP4]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_25

}





[@Basic5_Taekuon_20]
{
#IF
#ACT
FormatStr "FLD_CHAR='%s'" %USERNAME
ReadValueSql "TBL_BasicCharQuest" %A9 "FLD_CHAR,FLD_STATUS1,FLD_STATUS1_RDY,FLD_MAKEIDX" [@Taekuon_Next]

[@Taekuon_Next()]
#IF
#ACT
mov A0 %ARG(1)
mov D0 %ARG(2)
mov D1 %ARG(3)

#IF
Equal A0 %USERNAME
Equal D0 20
Equal D1 9
#ACT
GOTO @Taekuon_STEP4
BREAK

#IF
Equal A0 %USERNAME
Equal D0 20
Equal D1 8
#ACT
GOTO @Taekuon_STEP3
BREAK

#IF
Equal A0 %USERNAME
Equal D0 20
Equal D1 7
#ACT
GOTO @Taekuon_STEP2
BREAK

#IF
Equal A0 %USERNAME
Equal D0 20
Equal D1 6
#ACT
GOTO @Taekuon_STEP1
BREAK

#IF
Equal A0 %USERNAME

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_26

#ACT
BREAK


[@Taekuon_STEP1]
#IF
#ACT
SET [199] 1
FormatStr "FLD_CHAR='%s'" %USERNAME
UpdateValueSql "TBL_BasicCharQuest" %A9 "FLD_STATUS1_RDY=7"

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_27

[@Taekuon_STEP2]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_28

[@Taekuon_STEP3]
#IF
checkitem 王铁匠的铁锤 1
#ACT
SET [199] 0
take 王铁匠的铁锤 1
Mov A0 "AreaQuest4"
Mov D0 1
Mov D1 0
Mov D2 0
Mov D3 0
Goto @EverythingReward
FormatStr "FLD_CHAR='%s'" %USERNAME
UpdateValueSql "TBL_BasicCharQuest" %A9 "FLD_STATUS1_RDY=9"

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_29


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_30

#ELSEACT
break

[@Taekuon_STEP4]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\AreaQuest\ChoBoGuide4\ChoBoGuide4.txt] @Convert_ChoBoGuide4_31

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