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

[@NPCSet_QuestDairyToday]

{

#IF

!StartDailyQuest

Check [209] 1

Check [409] 0

#ACT

FormatStr "FLD_USERNAME='%s'" %USERNAME

ReadValueSql "TBL_DairyQuestUser" %A9 "FLD_QuestIdx,FLD_TQCASE" [@NPCSet_QuestDairyToday_Next]



#SAY

#INCLUDE [..\Convert_Def\QuestDiary\TodayQuest\QT_NPCReady.txt] @Convert_QT_NPCReady_0



[@NPCSet_QuestDairyToday_Next()]

#ACT

mov D0 %ARG(1)

mov D1 %ARG(2)

FormatStr "FLD_TQIDX=%s" %D0

ReadStringSql "TBL_DairyQuestSet" %A9 "FLD_TQNPCContent1" [@NPCSet_QuestDairyToday_Next1]



[@NPCSet_QuestDairyToday_Next1]

#ACT

mov A0 %ARG(1)



#IF

Equal D1 10

#ACT

close

Set [210] 0

Set [409] 1

goto @NPCACT_QuestDairyToday_Result

break



#IF



#SAY

#INCLUDE [..\Convert_Def\QuestDiary\TodayQuest\QT_NPCReady.txt] @Convert_QT_NPCReady_1



[@NPCSet_QuestDairyToday_Next3]

#IF

Equal D1 0

#ACT

close

FormatStr "FLD_USERNAME='%s'" %USERNAME

UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Status='Act',FLD_Step='NULL'"

break



#IF

Equal D1 1

#ACT

close

Set [210] 1

FormatStr "FLD_USERNAME='%s'" %USERNAME

UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Status='Act',FLD_Step='Progress',FLD_STEP1='NULL',FLD_STEP2='NULL',FLD_STEP3='NULL'"

break



#IF

Equal D1 2

#ACT

close

Set [210] 1

FormatStr "FLD_USERNAME='%s'" %USERNAME

UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Status='Act',FLD_Step='Progress'"

break



#IF

Equal D1 3

#ACT

close

FormatStr "FLD_USERNAME='%s'" %USERNAME

UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Status='Act',FLD_Step='NULL'"

break



#IF

Equal D1 4

#ACT

close

FormatStr "FLD_USERNAME='%s'" %USERNAME

ReadValueSQL "TBL_DairyQuestUser" %A9 "FLD_Condition2,FLD_Condition2Amount" @NPCSet_QuestDairyToday_Next3_Case4or7

break



#IF

Equal D1 7

#ACT

close

FormatStr "FLD_USERNAME='%s'" %USERNAME

ReadValueSQL "TBL_DairyQuestUser" %A9 "FLD_Condition2,FLD_Condition2Amount" @NPCSet_QuestDairyToday_Next3_Case4or7

break



#IF

Equal D1 9

#ACT

close

Set [210] 1

FormatStr "FLD_USERNAME='%s'" %USERNAME

UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Status='Act',FLD_Step='Progress',FLD_STEP1='NULL',FLD_STEP2='NULL',FLD_STEP3='NULL'"

break



#IF

#ACT

close

FormatStr "FLD_USERNAME='%s'" %USERNAME

UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Status='Act',FLD_Step='Progress'"

break



[@NPCSet_QuestDairyToday_Next3_Case4or7()]

#ACT

Mov A0 %ARG(1)

Mov D0 %ARG(2)

Give %A0 %D0

FormatStr "FLD_USERNAME='%s'" %USERNAME

UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Status='Act',FLD_Step='Progress'"

break

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