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

[@NPCACT_QuestDairyToday]

{

#IF

!StartDailyQuest

Check [209] 1

Check [409] 0

#ACT

FormatStr "FLD_USERNAME='%s'" %USERNAME

ReadValueSql "TBL_DairyQuestUser" %A9 "FLD_QuestIdx,FLD_Step,FLD_TQCASE,FLD_Condition1,FLD_Condition1Amount,FLD_Condition2" [@NPCACT_QuestDairyToday_Next]



#SAY

#INCLUDE [..\Convert_Def\QuestDiary\TodayQuest\QT_NPCAct.txt] @Convert_QT_NPCAct_0



[@NPCACT_QuestDairyToday_Next()]

#ACT

Mov D0 %ARG(1)

Mov A0 %ARG(2)

Mov D1 %ARG(3)

Mov A1 %ARG(4)

Mov D2 %ARG(5)

Mov A2 %ARG(6)

ReadValueSql "TBL_DairyQuestUser" %A9 "FLD_Condition2Amount,FLD_Condition3,FLD_Condition3Amount,FLD_TQNPC" [@NPCACT_QuestDairyToday_Next1]



[@NPCACT_QuestDairyToday_Next1()]

#ACT

Mov D3 %ARG(1)

Mov A3 %ARG(2)

Mov D4 %ARG(3)

Mov A4 %ARG(4)





#IF

Equal A4 %NPCNAME

Equal D1 0

#ACT

Goto @NPCACT_QuestDairyToday_Case0

break



#IF

Equal A4 %NPCNAME

Equal D1 1

#ACT

goto @NPCACT_QuestDairyToday_Case1

break



#IF

Equal A4 %NPCNAME

Equal D1 2

#ACT

goto @NPCACT_QuestDairyToday_Case2

break



#IF

Equal A4 %NPCNAME

Equal D1 3

#ACT

goto @NPCACT_QuestDairyToday_Case3

break



#IF

Equal A4 %NPCNAME

Equal D1 4

#ACT

goto @NPCACT_QuestDairyToday_Case4_OriGinal

break



#IF

Equal A1 %NPCNAME

Equal D1 4

#ACT

goto @NPCACT_QuestDairyToday_Case4_New

break



#IF

Equal A4 %NPCNAME

Equal D1 5

#ACT

goto @NPCACT_QuestDairyToday_Case5_OriGinal

break



#IF

Equal A1 %NPCNAME

Equal D1 5

#ACT

goto @NPCACT_QuestDairyToday_Case5_New

break



#IF

Equal A4 %NPCNAME

Equal D1 6

#ACT

goto @NPCACT_QuestDairyToday_Case6_OriGinal

break



#IF

Equal A1 %NPCNAME

Equal D1 6

#ACT

goto @NPCACT_QuestDairyToday_Case6_New

break



#IF

Equal A4 %NPCNAME

Equal D1 7

#ACT

goto @NPCACT_QuestDairyToday_Case7_OriGinal

break



#IF

Equal A1 %NPCNAME

Equal D1 7

#ACT

goto @NPCACT_QuestDairyToday_Case7_New

break



#IF

Equal A4 %NPCNAME

Equal D1 8

#ACT

goto @NPCACT_QuestDairyToday_Case8_OriGinal

break



#IF

Equal A1 %NPCNAME

Equal D1 8

#ACT

goto @NPCACT_QuestDairyToday_Case8_New

break



#IF

Equal A4 %NPCNAME

Equal D1 9

#ACT

goto @NPCACT_QuestDairyToday_Case9

break



#IF



#SAY

#INCLUDE [..\Convert_Def\QuestDiary\TodayQuest\QT_NPCAct.txt] @Convert_QT_NPCAct_1



[@NPCACT_QuestDairyToday_Case9]

#IF

Equal A0 "PreEnd"

#ACT

goto @NPCACT_QuestDairyToday_Result

#ELSEACT

goto @NPCACT_QuestDairyToday_ExceptSay





[@NPCACT_QuestDairyToday_Case8_OriGinal]

#IF

Equal A0 "PreEnd"

#ACT

goto @NPCACT_QuestDairyToday_Result

#ELSEACT

goto @NPCACT_QuestDairyToday_ExceptSay





[@NPCACT_QuestDairyToday_Case8_New]

#IF

!Equal A0 "PreEnd"

#ACT

goto @NPCACT_QuestDairyToday_NewSay



#ELSESAY

#INCLUDE [..\Convert_Def\QuestDiary\TodayQuest\QT_NPCAct.txt] @Convert_QT_NPCAct_2



[@NPCACT_QuestDairyToday_Case7_OriGinal]

#IF

Checkitem %A3 %D4

Equal A0 "PreEnd"

#ACT

Take %A3 %D4

goto @NPCACT_QuestDairyToday_Result

#ELSEACT

goto @NPCACT_QuestDairyToday_ExceptSay





[@NPCACT_QuestDairyToday_Case7_New]

#IF

!Checkitem %A2 %D3

#ACT

break



#SAY

#INCLUDE [..\Convert_Def\QuestDiary\TodayQuest\QT_NPCAct.txt] @Convert_QT_NPCAct_3



#IF

Checkitem %A2 %D3

!Equal A0 "PreEnd"

#ACT

Take %A2 %D3

Give %A3 %D4

goto @NPCACT_QuestDairyToday_NewSay



#ELSESAY

#INCLUDE [..\Convert_Def\QuestDiary\TodayQuest\QT_NPCAct.txt] @Convert_QT_NPCAct_4



[@NPCACT_QuestDairyToday_Case6_OriGinal]

#IF

Equal A0 "PreEnd"

#ACT

goto @NPCACT_QuestDairyToday_Result

#ELSEACT

goto @NPCACT_QuestDairyToday_ExceptSay





[@NPCACT_QuestDairyToday_Case6_New]

#IF

!Equal A0 "PreEnd"

#ACT

goto @NPCACT_QuestDairyToday_NewSay



#ELSESAY

#INCLUDE [..\Convert_Def\QuestDiary\TodayQuest\QT_NPCAct.txt] @Convert_QT_NPCAct_5



[@NPCACT_QuestDairyToday_Case5_OriGinal]

#IF

Checkitem %A2 %D3

Equal A0 "PreEnd"

#ACT

Take %A2 %D3

goto @NPCACT_QuestDairyToday_Result

#ELSEACT

goto @NPCACT_QuestDairyToday_ExceptSay





[@NPCACT_QuestDairyToday_Case5_New]

#IF

!Equal A0 "PreEnd"

#ACT

Give %A2 %D3

goto @NPCACT_QuestDairyToday_NewSay



#ELSESAY

#INCLUDE [..\Convert_Def\QuestDiary\TodayQuest\QT_NPCAct.txt] @Convert_QT_NPCAct_6



[@NPCACT_QuestDairyToday_Case4_OriGinal]

#IF

Equal A0 "PreEnd"

#ACT

goto @NPCACT_QuestDairyToday_Result

#ELSEACT

goto @NPCACT_QuestDairyToday_ExceptSay





[@NPCACT_QuestDairyToday_Case4_New]

#IF

!Checkitem %A2 %D3

#ACT

break



#SAY

#INCLUDE [..\Convert_Def\QuestDiary\TodayQuest\QT_NPCAct.txt] @Convert_QT_NPCAct_7



#IF

Checkitem %A2 %D3

!Equal A0 "PreEnd"

#ACT

Take %A2 %D3

goto @NPCACT_QuestDairyToday_NewSay



#ELSESAY

#INCLUDE [..\Convert_Def\QuestDiary\TodayQuest\QT_NPCAct.txt] @Convert_QT_NPCAct_8



[@NPCACT_QuestDairyToday_Case3]

#ACT

Mov D5 %D2

Inc D5 1

#IF

!Checkitem %A1 %D5

Checkitem %A1 %D2

#ELSEACT

break



#ELSESAY

#INCLUDE [..\Convert_Def\QuestDiary\TodayQuest\QT_NPCAct.txt] @Convert_QT_NPCAct_9



#IF

!Checkitem %A1 %D5

Checkitem %A1 %D2

Checkduraeva %A1 %D3

#ACT

take %A1 %D2

goto @NPCACT_QuestDairyToday_Result

#ELSEACT

goto @NPCACT_QuestDairyToday_ExceptSay





[@NPCACT_QuestDairyToday_Case2]

#IF

Equal A0 "PreEnd"

#ACT

goto @NPCACT_QuestDairyToday_Case2_Step0

#ELSEACT

goto @NPCACT_QuestDairyToday_ExceptSay



[@NPCACT_QuestDairyToday_Case2_Step0]

#IF

checkitem %A2 %D3

#ACT

take %A2 %D3

goto @NPCACT_QuestDairyToday_Result

#ELSEACT

goto @NPCACT_QuestDairyToday_ExceptSay





[@NPCACT_QuestDairyToday_Case1]

#IF

Equal A0 "PreEnd"

#ACT

goto @NPCACT_QuestDairyToday_Result

#ELSEACT

goto @NPCACT_QuestDairyToday_ExceptSay





[@NPCACT_QuestDairyToday_Case0]

#IF

Equal A1 "Money"

CheckGold %D2

#ACT

take Gold %D2

goto @NPCACT_QuestDairyToday_Case0_Step1

break



#IF

!Equal A1 "Money"

checkitem %A1 %D2

#ACT

take %A1 %D2

goto @NPCACT_QuestDairyToday_Case0_Step1

break



#IF

#ACT

goto @NPCACT_QuestDairyToday_ExceptSay

break



[@NPCACT_QuestDairyToday_Case0_Step1]

#IF

Equal A2 "NULL"

#ACT

goto @NPCACT_QuestDairyToday_Result

break



#IF

Checkitem %A2 %D3

#ACT

take %A2 %D3

goto @NPCACT_QuestDairyToday_Case0_Step2

break



#IF

Equal A1 "Money"

!Equal A2 "NULL"

#ACT

Give Gold %D2

goto @NPCACT_QuestDairyToday_ExceptSay

break



#IF

!Equal A1 "Money"

!Equal A2 "NULL"

#ACT

Give %A1 %D2

goto @NPCACT_QuestDairyToday_ExceptSay

break



[@NPCACT_QuestDairyToday_Case0_Step2]

#IF

Equal A3 "NULL"

#ACT

goto @NPCACT_QuestDairyToday_Result

break



#IF

checkitem %A3 %D4

#ACT

take %A3 %D4

goto @NPCACT_QuestDairyToday_Result

break



#IF

Equal A1 "Money"

!Equal A3 "NULL"

#ACT

Give Gold %D2

give %A2 %D3

goto @NPCACT_QuestDairyToday_ExceptSay

break



#IF

!Equal A1 "Money"

!Equal A3 "NULL"

#ACT

give %A1 %D2

give %A2 %D3

goto @NPCACT_QuestDairyToday_ExceptSay

break





[@NPCACT_QuestDairyToday_ExceptSay]

#ACT

FormatStr "FLD_TQIDX=%s" %D0

ReadStringSql "TBL_DairyQuestSet" %A9 "FLD_TQNPCContent2" [@NPCACT_ExceptSayDB]



[@NPCACT_ExceptSayDB]

#ACT

Mov A5 %ARG(1)





#SAY

#INCLUDE [..\Convert_Def\QuestDiary\TodayQuest\QT_NPCAct.txt] @Convert_QT_NPCAct_10



[@NPCACT_QuestDairyToday_NewSay]

#ACT

FormatStr "FLD_USERNAME='%s'" %USERNAME

UpdateValueSql "TBL_DairyQuestUser" %A9 "FLD_Step='PreEnd'"

FormatStr "FLD_TQIDX=%s" %D0

ReadStringSql "TBL_DairyQuestSet" %A9 "FLD_TQNPCContent4" [@NPCACT_QuestDairyTodayNewSayDB]



[@NPCACT_QuestDairyTodayNewSayDB]

#ACT

Mov A5 %ARG(1)



#SAY

#INCLUDE [..\Convert_Def\QuestDiary\TodayQuest\QT_NPCAct.txt] @Convert_QT_NPCAct_11



[@NPCACT_QuestDairyToday_Result]

#CALL [TodayQuest\QT_NPCReword.txt] @NPC_QuestDairyToday_Result

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