;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[@MadoextinctionCheck]
{
#IF
Checkmonmap D15061 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_0


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_1

[@MadoextinctionDAYOFWEEK]
#IF
DAYOFWEEK SUN

#ACT
goto @MadoQuestsundayextinction
break

#IF
DAYOFWEEK MON
HOUR 0 1
#ACT
goto @MadoQuestsundayextinction
break

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_2

#ACT
break

[@MadoQuestsundayextinction]
#ACT
FormatStr "FLD_MADOUSER='%s'" %USERNAME

ReadValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOMAIN,FLD_MADOCONTENT,FLD_MADOQUESTCHECK,FLD_MADOPATTERN" [@MadoQuestsundayextinction_0]

[@MadoQuestsundayextinction_0()]
#ACT
mov D1 %ARG(1)
mov D2 %ARG(2)
mov D3 %ARG(3)
mov D5 %ARG(4)


#IF
Equal D1 5
Equal D2 5
Equal D3 1
Large D5 1
#ACT
goto @MadoQuestsundayextinction_A
break

#IF
Equal D1 5
Equal D2 5
Equal D3 1
Small D5 2
#ACT
goto @MadoQuestsundayextinction_B
break





#IF
Equal D1 6
Equal D2 3
Equal D3 0
#ACT
goto @extinctionEvent_End_6
break

#IF
Equal D1 6
Equal D2 2
Equal D3 2
#ACT
goto @MadosundayextinctionEvent_End
break


#IF
Equal D1 6
Equal D2 2
Equal D3 1
Large D5 1
#ACT
goto @MadosundayextinctionEvent_A_1
break


#IF
Equal D1 6
Equal D2 1
Equal D3 1
Large D5 1
#ACT
goto @MadosundayextinctionEvent_A
break

#IF
Equal D1 6
Equal D2 2
Equal D3 1
Small D5 2
#ACT
goto @MadosundayextinctionEvent_B_B
break

#IF
Equal D1 6
Equal D2 2
Equal D3 0
Small D5 2
#ACT
goto @MadosundayextinctionEvent_B_1
break

#IF
Equal D1 6
Equal D2 1
Equal D3 1
Small D5 2
#ACT
goto @MadosundayextinctionEvent_B
break







#IF
#ACT
goto @MadoQuestsundayextinction_no
break


[@MadoQuestsundayextinction_no]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_3

[@MadoQuestsundayextinction_A]

#ACT
FormatStr "FLD_MADOUSER='%s'" %USERNAME
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOMAIN=6"
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOCONTENT=1"
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOQUESTCHECK=0"
set [206] 1
goto @extinctionEventMsg_A
goto @extinctionEventMonGen_A
goto @extinctionEventUserface_A
close
break

[@extinctionEventMsg_A]
#CALL [HonChonDo\extinctionQuestEvent.txt] @extinctionEventMsg_A_1

[@extinctionEventMonGen_A]
#CALL [HonChonDo\extinctionMongen.txt] @extinctionEventMonGen_A_1


[@MadosundayextinctionEvent_A]
#ACT
FormatStr "FLD_MADOUSER='%s'" %USERNAME
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOMAIN=6"
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOCONTENT=2"
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOQUESTCHECK=0"
set [206] 1
goto @extinctionEventMsg2_A
goto @extinctionEventMonGen2_A
goto @extinctionEventUserface_A
close
break

[@extinctionEventUserface_A]
#CALL [HonChonDo\extinctionQuestEvent.txt] @madojobcheckEvent

[@extinctionEventMsg2_A]
#CALL [HonChonDo\extinctionQuestEvent.txt] @extinctionEventMsg2_A_1

[@extinctionEventMonGen2_A]
#CALL [HonChonDo\extinctionMongen.txt] @extinctionEventMonGen2_A_1

[@MadosundayextinctionEvent_A_1]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_4

[@MadosundayextinctionEvent_A_2]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_5

[@MadosundayextinctionEvent_A_3]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_6

[@MadosundayextinctionEvent_A_4]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_7

#ACT
Delaygoto [Grobal] 12 @MadosundayextinctionEvent_A_5

[@MadosundayextinctionEvent_A_5]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_8

#ACT
mov n9 1
FormatStr "FLD_MADOUSER='%s'" %USERNAME
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOMAIN=6"
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOCONTENT=2"
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOQUESTCHECK=2"

[@MadoQuestsundayextinction_B]

#ACT
FormatStr "FLD_MADOUSER='%s'" %USERNAME
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOMAIN=6"
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOCONTENT=1"
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOQUESTCHECK=0"
set [206] 1
goto @extinctionEventMsg_B
goto @extinctionEventMonGen_B
goto @extinctionEventUserface_B
close
break

[@extinctionEventUserface_B]
#CALL [HonChonDo\extinctionQuestEvent.txt] @madojobcheckEvent

[@extinctionEventMsg_B]
#CALL [HonChonDo\extinctionQuestEvent.txt] @extinctionEventMsg_B_1

[@extinctionEventMonGen_B]
#CALL [HonChonDo\extinctionMongen.txt] @extinctionEventMonGen_B_1


[@MadosundayextinctionEvent_B]
#ACT
FormatStr "FLD_MADOUSER='%s'" %USERNAME
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOMAIN=6"
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOCONTENT=2"
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOQUESTCHECK=0"

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_9

[@MadosundayextinctionEvent_B_1]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_10

[@MadosundayextinctionEvent_B_2]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_11

[@MadosundayextinctionEvent_B_3]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_12

#ACT
mapspell [firewall] "D15061,22,33,40,47, +d0, +t10, +r50, +h


[@MadosundayextinctionEvent_B_4]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_13

#ACT
mapspell [firewall] "D15061,20,30,50,50, +d0, +t10, +r150, +h

[@MadosundayextinctionEvent_B_5]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_14

[@MadosundayextinctionEvent_B_6]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_15

[@MadosundayextinctionEvent_B_7]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_16

#ACT
FormatStr "FLD_MADOUSER='%s'" %USERNAME
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOMAIN=6"
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOCONTENT=2"
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOQUESTCHECK=1"
goto @MadosundayextinctionEvent_B_8
goto @extinctionEventUserface_B_8
break

[@extinctionEventUserface_B_8]
#CALL [HonChonDo\extinctionQuestEvent.txt] @madojobcheckEvent

[@MadosundayextinctionEvent_B_8]
#CALL [HonChonDo\extinctionQuestEvent.txt] @MadosundayextinctionEvent2_B_8

[@MadosundayextinctionEvent_B_B]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_17

[@MadosundayextinctionEvent_End]
#ACT
FormatStr "FLD_MADOQUEST='%s'" "HonChon"

ReadStringSql "TBL_HonChonMadoServer" %A9 "FLD_PASSWORDNAME" [@extinctionEvent_End_0]


#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_18

[@extinctionEvent_End_0()]
#ACT
Mov A0 %ARG(1)


#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_19

[@@extinctionEvent_End]
#IF
Equal A0 %INPUTSTR
#ACT
goto @extinctionEvent_End_1
break
#ELSEACT
goto @extinctionEvent_NO_1
break

#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_20

[@extinctionEvent_NO_1]
#IF
large N9 2
#ACT
LoadValue A7 [Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] [Convert] [Msg0]
SYSMSG %A7
mapting D15061 41 148 84
FormatStr "FLD_MADOUSER='%s'" %USERNAME
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOMAIN=5"
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOCONTENT=5"
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOQUESTCHECK=1"
mov n9 1
break
#ELSEACT
inc N9 1
break


[@extinctionEvent_End_1]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_21

[@extinctionEvent_End_2]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_22

[@extinctionEvent_End_3]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_23

[@extinctionEvent_End_4]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_24

[@extinctionEvent_End_5]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_25

#ACT
give »ÙÃðÖ®Ó¡ 1
FormatStr "FLD_MADOUSER='%s'" %USERNAME
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOMAIN=6"
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOCONTENT=3"
UpdateValueSql "TBL_HonChonMadoQuest" %A9 "FLD_MADOQUESTCHECK=0"

[@extinctionEvent_End_6]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonDo\MadoextinctionNpc.txt] @Convert_MadoextinctionNpc_26

[@extinctionEvent_End_7]
#ACT
mapting D15061 41 148 84



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