;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[@MadoNpc_Call]
{
#IF
Checkitemw 寂幻之刃 1
#ACT
goto @MadoNpc_Call1
break
#ELSEACT
goto @MadoNpc_Call0
break

[@MadoNpc_Call1]
#ACT
FormatStr "FLD_MADOHAVEUSER='%s'" %USERNAME

ReadValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOHAVEUSER" [@MadoNpcNpc_Call_0]

[@MadoNpcNpc_Call_0()]
#IF
#ACT
mov A9 %ARG(1)
#IF
Equal A9 ""
Checkitemw 寂幻之刃 1
checkitem 大族长角笛 1
checkitem 万里碧海 1
checkitem 九宫云雾 1
checkitem 血花落照 1
checkitem 黑天暗云 1
#ACT
FormatStr "'%s',%s,%s," %USERNAME 1 0
mov A8 %A9
FormatStr "%s" 0
AddStr A8 %A9
FormatStr "FLD_MADOHAVEUSER='%s'" %USERNAME
WriteValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOHAVEUSER,FLD_MADOUSERCONTENT,FLD_MADOUSERCHECK,FLD_MADOUSERPATTERN" %A8
set [207] 1
set [208] 0
goto @MadoNpcNpc_CallNormal
break

#IF
#ACT
goto @MadoNpcNpc_CallNormal
break

[@MadoNpcNpc_CallNormal]
#ACT
FormatStr "FLD_MADOHAVEUSER='%s'" %USERNAME

ReadValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOUSERCONTENT,FLD_MADOUSERCHECK,FLD_MADOUSERPATTERN" [@MadoNpc_Call_0]

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

#IF
Equal D1 14
Equal D2 0
#ACT
goto @MadoNpc_Call5_16
break

#IF
Equal D1 13
Equal D2 10
Checkitemw 寂幻之刃 1
#ACT
goto @MadoNpc_Call5_11
break

#IF
Equal D1 13
Equal D2 9
Checkitemw 寂幻之刃 1
#ACT
goto @MadoNpc_Call5_10
break

#IF
Equal D1 13
Equal D2 8
Checkitemw 寂幻之刃 1
#ACT
goto @MadoNpc_Call5_9
break

#IF
Equal D1 13
Equal D2 7
Checkitemw 寂幻之刃 1
#ACT
goto @MadoNpc_Call5_8
break

#IF
Equal D1 13
Equal D2 6
Checkitemw 寂幻之刃 1
#ACT
goto @MadoNpc_Call5_7
break

#IF
Equal D1 13
Equal D2 5
Checkitemw 寂幻之刃 1
#ACT
goto @MadoNpc_Call5_5
break

#IF
Equal D1 13
Equal D2 4
Checkitemw 寂幻之刃 1
#ACT
goto @MadoNpc_Call5_4
break

#IF
Equal D1 13
Equal D2 3
Checkitemw 寂幻之刃 1
#ACT
goto @MadoNpc_Call5_3
break


#IF
Equal D1 13
Equal D2 2
Checkitemw 寂幻之刃 1
#ACT
goto @MadoNpc_Call5_1
break

#IF
Equal D1 2
Equal D2 0
Checkitemw 寂幻之刃 1
#ACT
goto @MadoNpc_Call_10
break

#IF
Equal D1 1
Equal D2 2
Checkitemw 寂幻之刃 1
#ACT
goto @MadoNpc_Call_1
break

#IF
Equal D1 1
Equal D2 1
Checkitemw 寂幻之刃 1
#ACT
goto @madoQuestHave_Yes_1
break

#IF
Checkitemw 寂幻之刃 1
checkitem 大族长角笛 1
checkitem 万里碧海 1
checkitem 九宫云雾 1
checkitem 血花落照 1
checkitem 黑天暗云 1
Equal D1 1
Equal D2 0

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_0

#ACT
break

#IF
#ACT
goto @MadoNpc_Call0
break

[@MadoNpc_Call0]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_1

#ACT
break

[@madotouch]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_2

[@madoread]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_3

[@madoQuestHave]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_4

[@madoQuestHave_No]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_5

[@madoQuestHave_Yes]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_6

#ACT
FormatStr "FLD_MADOHAVEUSER='%s'" %USERNAME
UpdateValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOUSERCONTENT=1"
UpdateValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOUSERCHECK=1"


[@madoQuestHave_Yes_1]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_7

[@move_City]
#ACT
mapmove 4 174 139




[@MadoNpc_Call_1]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_8

[@MadoNpc_Call_2]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_9

[@MadoNpc_Call_3]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_10

[@MadoNpc_Call_4]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_11

[@MadoNpc_Call_5]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_12

#ACT
FormatStr "FLD_MADOHAVEUSER='%s'" %USERNAME
UpdateValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOUSERCONTENT=2"
UpdateValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOUSERCHECK=0"

[@MadoNpc_Call_10]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_13

[@MadoNpc_Call5_1]
#IF
Checkitemw 寂幻之刃 1
checkitem 万里碧海 1
checkitem 九宫云雾 1
checkitem 血花落照 1
checkitem 黑天暗云 1
checkitem 大族长角笛 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_14

[@MadoNpc_Call5_2]
#ACT
LoadValue A7 [Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] [Convert] [Msg0]
linemsg "grobal" %A7
FormatStr "FLD_MADOHAVEUSER='%s'" %USERNAME
UpdateValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOUSERCONTENT=13"
UpdateValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOUSERCHECK=3"
set [208] 1
Mongenp "D1506,33,44,10" 诺玛突击队长 1
ApplyMonEx "D1506,33,44,30" 诺玛突击队长 [Monsterside] "疯狂诺玛勇士"
close

[@MadoNpc_Call5_3]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_15

[@MadoNpc_Call5_4]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_16

[@MadoNpc_Call5_5]
#IF
Checkitemw 寂幻之刃 1
checkitem 万里碧海 1
checkitem 九宫云雾 1
checkitem 血花落照 1
checkitem 黑天暗云 1
checkitem 大族长角笛 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_17


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_18

[@MadoNpc_Call5_6]
#IF
Checkitemw 寂幻之刃 1
checkitem 万里碧海 1
checkitem 九宫云雾 1
checkitem 血花落照 1
checkitem 黑天暗云 1
checkitem 大族长角笛 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_19

#ACT
UpdateValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOUSERCONTENT=13"
UpdateValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOUSERCHECK=6"
LoadValue A7 [Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] [Convert] [Msg1]
Eventmsg "Grobal" %A7 2000
take 大族长角笛 1
#ELSEACT
break

#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_20

[@MadoNpc_Call5_7]
#IF
Checkitemw 寂幻之刃 1
checkitem 万里碧海 1
checkitem 九宫云雾 1
checkitem 血花落照 1
checkitem 黑天暗云 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_21


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_22

[@MadoNpc_Call5_7_1]
#IF
Checkitemw 寂幻之刃 1
checkitem 万里碧海 1
checkitem 九宫云雾 1
checkitem 血花落照 1
checkitem 黑天暗云 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_23

#ACT
UpdateValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOUSERCONTENT=13"
UpdateValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOUSERCHECK=7"
LoadValue A7 [Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] [Convert] [Msg2]
Eventmsg "Grobal" %A7 2000
take 黑天暗云 1
#ELSEACT
break

#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_24

[@MadoNpc_Call5_8]
#IF
Checkitemw 寂幻之刃 1
checkitem 九宫云雾 1
checkitem 血花落照 1
checkitem 万里碧海 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_25


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_26

[@MadoNpc_Call5_8_1]
#IF
Checkitemw 寂幻之刃 1
checkitem 九宫云雾 1
checkitem 血花落照 1
checkitem 万里碧海 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_27

#ACT
UpdateValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOUSERCONTENT=13"
UpdateValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOUSERCHECK=8"
LoadValue A7 [Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] [Convert] [Msg3]
Eventmsg "Grobal" %A7 2000
take 万里碧海 1
#ELSEACT
break

#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_28

[@MadoNpc_Call5_9]
#IF
Checkitemw 寂幻之刃 1
checkitem 九宫云雾 1
checkitem 血花落照 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_29


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_30

[@MadoNpc_Call5_9_1]
#IF
Checkitemw 寂幻之刃 1
checkitem 九宫云雾 1
checkitem 血花落照 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_31

#ACT
UpdateValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOUSERCONTENT=13"
UpdateValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOUSERCHECK=9"
LoadValue A7 [Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] [Convert] [Msg4]
Eventmsg "Grobal" %A7 2000
take 九宫云雾 1
#ELSEACT
break

#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_32

[@MadoNpc_Call5_10]
#IF
Checkitemw 寂幻之刃 1
checkitem 血花落照 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_33


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_34

[@MadoNpc_Call5_10_1]
#IF
Checkitemw 寂幻之刃 1
checkitem 血花落照 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_35

#ACT
UpdateValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOUSERCONTENT=13"
UpdateValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOUSERCHECK=10"
LoadValue A7 [Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] [Convert] [Msg5]
Eventmsg "Grobal" %A7 2000
take 血花落照 1
Delaygoto [Grobal] 12 @MadoNpc_Call5_11_1
break
#ELSEACT
break

#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_36

[@MadoNpc_Call5_11]
#IF
Checkitemw 寂幻之刃 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_37


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_38

[@MadoNpc_Call5_11_1]
#ACT
LoadValue A7 [Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] [Convert] [Msg6]
Eventmsg "Grobal" %A7 2000
Delaygoto [Grobal] 12 @MadoNpc_Call5_12

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] @Convert_MadoNpc_39

[@MadoNpc_Call5_12]
#ACT
LoadValue A7 [Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] [Convert] [Msg7]
Eventmsg "Grobal" %A7 2000
UpdateValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOUSERCONTENT=14"
UpdateValueSql "TBL_MadoHaveUserQuest" %A9 "FLD_MADOUSERCHECK=0"
takew 寂幻之刃 1
givew 1 影魅之刃
set [207] 0
Delaygoto [Grobal] 12 @MadoNpc_Call5_13

[@MadoNpc_Call5_13]
#ACT
LoadValue A7 [Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] [Convert] [Msg8]
Eventmsg "Grobal" %A7 2000
LoadValue A7 [Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] [Convert] [Msg9]
linemsg "grobal" %A7
Delaygoto [Grobal] 12 @MadoNpc_Call5_14

[@MadoNpc_Call5_14]
#ACT
LoadValue A7 [Convert_Def\QuestDiary\HonChonMado\MadoNpc.txt] [Convert] [Msg10]
Eventmsg "Grobal" %A7 10004
mapting D1506 4 174 139

[@MadoNpc_Call5_15]
#ACT
mapmove 4 174 139
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;