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



















[@Samak_Mon1_0]
{
#IF
!CheckMonmap "DQ1901_001" 1 石像狮子
#ACT
give 头子证件 1
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUSRDY=3"
Delaygoto [Local] 3 @Samak_Mon1_MapMove

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] @Convert_Monster_0

[@Samak_Mon1_MapMove]
#IF
#ACT

MapMove D1901 52 242
}

[@Samak_Mon2_0]
{
#IF
IsCastleGuild TAOSUNG
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
ReadValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKGUILD,FLD_SAMAKGUILDMASTER,FLD_SAMAKCONDITION,FLD_SAMAKSTATUS,FLD_SAMAKSTATUSRDY" [@Samak_Mon2_Read]

[@Samak_Mon2_Read()]
#IF
#ACT
Mov A0 %ARG(1)
Mov A1 %ARG(2)
Mov A2 %ARG(3)
Mov D1 %ARG(4)
Mov D2 %ARG(5)

#IF
Equal A0 %GUILDNAME
Equal A2 "Ready"
Equal D1 2
Equal D2 2
#ACT
goto @Samak_Mon2_Gain
break

#IF
Equal A0 %GUILDNAME
Equal A2 "Ready"
Equal D1 2
Equal D2 3
#ACT
goto @Samak_Mon2_Gain
break

#IF
Equal A0 %GUILDNAME
Equal A2 "Ready"
Equal D1 2
Equal D2 4
#ACT
goto @Samak_Mon2_Gain
break

#IF
Equal A0 %GUILDNAME
Equal A2 "Ready"
Equal D1 2
Equal D2 5
#ACT
goto @Samak_Mon2_Gain
goto @Samak_Mon2_Complete
break

[@Samak_Mon2_Gain]
#IF
#ACT
Inc D2 1
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
Mov A8 %A9
FormatStr "FLD_SAMAKSTATUS='%s',FLD_SAMAKSTATUSRDY='%s'" 2 %D2
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A8 %A9

[@Samak_Mon2_Complete]
#IF
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUS='2',FLD_SAMAKSTATUSRDY='6'"
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg0]
EventMSG [D1901] %A7

}

[@Samak_Mon3_0]
{
#IF
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
ReadValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKGUILD,FLD_SAMAKGUILDMASTER,FLD_SAMAKCONDITION,FLD_SAMAKSTATUS,FLD_SAMAKSTATUSRDY" [@Samak_Mon3_Read]

[@Samak_Mon3_Read()]
#IF
#ACT
Mov A0 %ARG(1)
Mov A1 %ARG(2)
Mov A2 %ARG(3)
Mov D1 %ARG(4)
Mov D2 %ARG(5)

#IF
Equal A0 %GUILDNAME
Equal D1 2
Equal D2 8
#ACT
goto @Samak_Mon3_1
break

#ELSEACT
break

[@Samak_Mon3_1]
#IF
IsCastleGuild TAOSUNG
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUS=2,FLD_SAMAKSTATUSRDY=10"
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg1]
EventMSG [DQ1901_002] %A7
Delaygoto [Grobal] 7 @Samak_Mon3_2

[@Samak_Mon3_2]
#IF
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg2]
EventMSG [DQ1901_002] %A7
Delaygoto [Grobal] 60 @Samak_Mon3_3

[@Samak_Mon3_3]
#IF
#ACT
Mapting DQ1901_002 D1901 52 242
Mapting D1901 D1901 52 242

}

[@Samak_Mon4_0]
{
#IF
Random 60
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
ReadValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKCONDITION,FLD_SAMAKSTATUS,FLD_SAMAKSTATUSRDY" [@Samak_Mon4_Read]

#ELSEACT
Mov A0 %USERMAP
goto @Samak_Mon4_MapSpell

[@Samak_Mon4_Read()]
#IF
#ACT
Mov A2 %ARG(1)
Mov D1 %ARG(2)
Mov D2 %ARG(3)

#IF
Equal A2 "Ready"
Equal D1 3
Equal D2 1
#ACT
give 简易钥匙 1
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUSRDY=2"
break

#IF
Equal A2 "Ready"
Equal D1 3
Equal D2 2
#ACT
give 简易钥匙 1
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUSRDY=3"
break

#IF
Equal A2 "Ready"
Equal D1 3
Equal D2 3
#ACT
give 简易钥匙 1
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg3]
EventMSG "D1901,D1902,D1903,DQ1902_003,DQ1902_004,DQ1902_005" %A7
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUSRDY=4"
Delaygoto [Grobal] 7 @Samak_Mon4_Mapting
break

#ELSEACT
break

[@Samak_Mon4_Mapting]
#IF
#ACT
Mapting DQ1902_003 D1901 52 242
Mapting DQ1902_004 D1901 52 242
Mapting DQ1902_005 D1901 52 242
Mapting D1901 D1901 52 242
Mapting D1902 D1901 52 242
Mapting D1903 D1901 52 242

[@Samak_Mon4_MapSpell]
#IF
Equal A0 "DQ1902_003"
#ACT
Mapspell [Icewall] "DQ1902_003,5,5,80,80, +d80, +t40, +r10, +h

break

#IF
Equal A0 "DQ1902_004"
#ACT
Mapspell [Icewall] "DQ1902_003,5,5,80,80, +d80, +t40, +r10, +h

break

#IF
Equal A0 "DQ1902_005"
#ACT
Mapspell [Icewall] "DQ1902_003,5,5,80,80, +d80, +t40, +r10, +h

break

}

[@Samak_Mon5_0]
{
#IF
Random 8
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
ReadValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKCONDITION,FLD_SAMAKSTATUS,FLD_SAMAKSTATUSRDY" [@Samak_Mon5_Read]

#ELSEACT
MapSpell [FireWall] "DQ1902_001,5,5,80,80, +d80, +t10, +r10, +h

[@Samak_Mon5_Read()]
#IF
#ACT
Mov A2 %ARG(1)
Mov D1 %ARG(2)
Mov D2 %ARG(3)

#IF
Equal A2 "Ready"
Equal D1 3
Equal D2 5
#ACT
goto @Samak_Mon5_1stQuest
break

#ELSEACT
MapSpell [FireWall] "DQ1902_001,5,5,80,80, +d80, +t10, +r15, +h

[@Samak_Mon5_1stQuest]
#IF
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg4]
EventMSG "D1901,D1902,D1903,DQ1902_001" %A7
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUSRDY=6"

}

[@Samak_Mon6_0]
{
#IF
Random 15
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
ReadValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKCONDITION,FLD_SAMAKSTATUS,FLD_SAMAKSTATUSRDY" [@Samak_Mon6_Read]

#ELSEACT
MapSpell [FireWall] "DQ1902_001,5,5,80,80, +d80, +t10, +r15, +h

[@Samak_Mon6_Read()]
#IF
#ACT
Mov A2 %ARG(1)
Mov D1 %ARG(2)
Mov D2 %ARG(3)

#IF
Equal A2 "Ready"
Equal D1 3
Equal D2 7
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg5]
EventMSG "D1901,D1902,D1903,DQ1902_001" %A7
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUSRDY=8"
break

#ELSEACT
MapSpell [FireWall] "DQ1902_001,5,5,80,80, +d80, +t10, +r15, +h

}

[@Samak_Mon7_0]
{
#IF
Random 5
#ACT
MapSpell [FireWall] "DQ1902_001,5,5,80,80, +d80, +t10, +r15, +h
}

[@Samak_Mon8_0]
{
#IF
Random 6
#ACT
MapSpell [FireWall] "DQ1902_001,5,5,80,80, +d80, +t10, +r15, +h
}

[@Samak_Mon9_0]
{
#IF
Random 15
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
ReadValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKCONDITION,FLD_SAMAKSTATUS,FLD_SAMAKSTATUSRDY" [@Samak_Mon9_Read]

#ELSEACT
MapSpell [FireWall] "DQ1902_001,5,5,80,80, +d80, +t10, +r15, +h

[@Samak_Mon9_Read()]
#IF
#ACT
Mov A2 %ARG(1)
Mov D1 %ARG(2)
Mov D2 %ARG(3)

#IF
Equal A2 "Ready"
Equal D1 3
Equal D2 6
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg6]
EventMSG "D1901,D1902,D1903,DQ1902_001" %A7
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUSRDY=7"
break

#ELSEACT
MapSpell [FireWall] "DQ1902_001,5,5,80,80, +d80, +t10, +r15, +h
}

[@Samak_Mon10_0]
{
#IF
Random 20
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
ReadValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKCONDITION,FLD_SAMAKSTATUS,FLD_SAMAKSTATUSRDY" [@Samak_Mon10_Read]

#ELSEACT
MapSpell [FireWall] "DQ1902_001,5,5,80,80, +d80, +t10, +r15, +h

[@Samak_Mon10_Read()]
#IF
#ACT
Mov A2 %ARG(1)
Mov D1 %ARG(2)
Mov D2 %ARG(3)

#IF
Equal A2 "Ready"
Equal D1 3
Equal D2 8
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg7]
EventMSG "D1901,D1902,D1903,DQ1902_001" %A7
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUSRDY=9"
break

#ELSEACT
MapSpell [FireWall] "DQ1902_001,5,5,80,80, +d80, +t10, +r15, +h
}

[@Samak_Mon11_0]
{
#IF
Random 25
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
ReadValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKCONDITION,FLD_SAMAKSTATUS,FLD_SAMAKSTATUSRDY" [@Samak_Mon11_Read]

#ELSEACT
MapSpell [FireWall] "DQ1902_001,5,5,80,80, +d80, +t10, +r15, +h

[@Samak_Mon11_Read()]
#IF
#ACT
Mov A2 %ARG(1)
Mov D1 %ARG(2)
Mov D2 %ARG(3)

#IF
Equal A2 "Ready"
Equal D1 3
Equal D2 9
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg8]
EventMSG "D1901,D1902,D1903,DQ1902_001" %A7
Delaygoto [Grobal] 30 @Samak_Mon11_GuardGen
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUSRDY=10"
break

[@Samak_Mon11_GuardGen]
#IF
#ACT
MongenP "DQ1902_001,40,40,0" 护法天 1 "Noitem,森罗片"

}

[@Samak_Mon12_0]
{
#IF
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
ReadValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKCONDITION,FLD_SAMAKSTATUS,FLD_SAMAKSTATUSRDY" [@Samak_Mon12_Read]

#ELSEACT
break

[@Samak_Mon12_Read()]
#IF
#ACT
Mov A2 %ARG(1)
Mov D1 %ARG(2)
Mov D2 %ARG(3)

#IF
Equal A2 "Ready"
Equal D1 3
Equal D2 10
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg9]
EventMSG "D1901,D1902,D1903,DQ1902_001" %A7
Delaygoto [Grobal] 7 @Samak_Mon12_EventMSG
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUSRDY=11"
break

#ELSEACT
MapSpell [FireWall] "DQ1902_001,5,5,80,80, +d100, +t5, +r10, +h

[@Samak_Mon12_EventMSG]
#IF
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg10]
EventMSG "D1901,D1902,D1903,DQ1902_001" %A7
Delaygoto [Grobal] 60 @Samak_Mon12_Mapting

[@Samak_Mon12_Mapting]
#IF
#ACT
Mapting DQ1902_001 D1901 52 242
Mapting D1902 D1901 52 242
Mapting D1901 D1901 52 242

}

[@Samak_Mon13_0]
{
#IF
!CheckMonMap D1903 1 诺玛突击队长
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
ReadValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKGUILD,FLD_SAMAKGUILDMASTER,FLD_SAMAKCONDITION,FLD_SAMAKSTATUS,FLD_SAMAKSTATUSRDY" [@SAMAK_Mon13_Read]

[@SAMAK_Mon13_Read()]
#IF
#ACT
Mov A0 %ARG(1)
Mov A1 %ARG(2)
Mov A2 %ARG(3)
Mov D1 %ARG(4)
Mov D2 %ARG(5)

#IF
Equal D1 4
Equal D2 3
#ACT
MonClear "D1903"
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUSRDY=4"
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg11]
EventMSG "D1901,D1902,D1903" %A7
Delaygoto [Grobal] 7 @Samak_LastChallenge

[@Samak_LastChallenge]
#IF
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
ReadValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUS,FLD_SAMAKSTATUSRDY" [@Samak_LastChallenge_Read]

[@Samak_LastChallenge_Read()]
#IF
#ACT
Mov D1 %ARG(1)
Mov D2 %ARG(2)

#IF
Equal D1 4
Equal D2 4
#ACT
goto @Samak_LastChallenge_mongen

#ELSEACT
Delaygoto [Grobal] 60 @Samak_LastChallenge
break


[@Samak_LastChallenge_mongen]
#IF
CheckPOS D1903 100 178 10
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg12]
EventMSG [D1903] %A7
Delaygoto [Grobal] 7 @Samak_LastChallenge_EventMSG
break

#ELSEACT
Delaygoto [Grobal] 60 @Samak_LastChallenge

[@Samak_LastChallenge_EventMSG]
#IF
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg13]
EventMSG [D1903] %A7
Delaygoto [Grobal] 7 @Samak_LastChallenge_EventMSG_1

[@Samak_LastChallenge_EventMSG_1]
#IF
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg14]
EventMSG [D1903] %A7
Delaygoto [Grobal] 7 @Samak_LastChallenge_EventMSG_2
break

[@Samak_LastChallenge_EventMSG_2]
#IF
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg15]
EventMSG [D1903] %A7
Delaygoto [Grobal] 7 @Samak_LastChallenge_EventMSG_3

[@Samak_LastChallenge_EventMSG_3]
#IF
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg16]
EventMSG [D1903] %A7
Delaygoto [Grobal] 7 @Samak_LastChallenge_EventMSG_4

[@Samak_LastChallenge_EventMSG_4]
#IF
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg17]
EventMSG [D1903] %A7
Delaygoto [Grobal] 7 @Samak_LastChallenge_EventMSG_5

[@Samak_LastChallenge_EventMSG_5]
#IF
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg18]
EventMSG [D1903] %A7
Delaygoto [Grobal] 7 @Samak_LastChallenge_EventMSG_6

[@Samak_LastChallenge_EventMSG_6]
#IF
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg19]
EventMSG [D1903] %A7
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUSRDY=5"
Delaygoto [Grobal] 1800 @Samak_LastChallenge_TimeOut

[@Samak_LastChallenge_TimeOut]
#IF
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
ReadValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUS,FLD_SAMAKSTATUSRDY" [@Samak_LastChallenge_TimeOut_Read]

[@Samak_LastChallenge_TimeOut_Read()]
#IF
#ACT
Mov D1 %ARG(1)
Mov D2 %ARG(2)

#IF
Equal D1 4
Equal D2 4
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg20]
EventMSG "D1901,D1902,D1903" %A7
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUS='4',FLD_SAMAKSTATUSRDY='0'"
Mapting D1901 5 252 103
Mapting D1902 5 252 103
Mapting D1903 5 252 103

#ELSEACT
break

}

[@Samak_Mon14_0]
{
#IF
CheckPOS D1903 84 146 20
#ACT
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
ReadValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUS,FLD_SAMAKSTATUSRDY" [@Samak_Mon14_Read]

#ELSEACT
break

[@Samak_Mon14_Read()]
#IF
#ACT
Mov D1 %ARG(1)
Mov D2 %ARG(2)

#IF
Equal D1 4
Equal D2 2
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg21]
EventMSG "D1901,D1902,D1903" %A7
Delaygoto [Grobal] 7 @Samak_Mon14_EventMSG
Delaygoto [Grobal] 7 @Samak_Mon14_GenPlus

[@Samak_Mon14_EventMSG]
#IF
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg22]
EventMSG "D1901,D1902,D1903" %A7
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUSRDY=3"

[@Samak_Mon14_GenPlus]
#IF
Random 3
#ACT
MongenP "D1903,84,146,15" 诺玛法老 20
Delaygoto [Grobal] 7 @Samak_Mon14_0

#ELSEACT
Delaygoto [Grobal] 7 @Samak_Mon14_0

}

[@Samak_Mon15_0]
{
#IF
!CheckMonmap "DQ1903_003" 1 震天首将
#ACT
MonClear DQ1903_003

Mapting DQ1903_003 5 251 103
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg23]
EventMSG "D1901,D1902,D1903,DQ1903_003" %A7
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUSRDY=11"

}

[@Samak_Mon16_0]
{
#IF
!CheckMonmap "DQ1903_003" 1 震天魔神
#ACT
MonClear DQ1903_003
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg24]
EventMSG "D1901,D1902,D1903,DQ1903_003" %A7
Delaygoto [Grobal] 7 @Samak_Mon16_1
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUSRDY=13"

[@Samak_Mon16_1]
#IF
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg25]
EventMSG "D1901,D1902,D1903,DQ1903_003" %A7
Delaygoto [Grobal] 7 @Samak_Mon16_2

[@Samak_Mon16_2]
#IF
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg26]
EventMSG "DQ1903_003" %A7
Delaygoto [Grobal] 60 @Samak_Mon16_3

[@Samak_Mon16_3]
#IF
#ACT

Mapting DQ1903_003 5 251 103

}

[@Samak_Mon17_0]
{
#IF
!CheckMonMap DQ1902_007 1 爆毒蚂蚁
!CheckMonMap DQ1902_007 1 盔甲蚂蚁
!CheckMonMap DQ1902_007 1 蚂蚁道士
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg27]
EventMSG "D1901,D1902,D1903,DQ1902_002,DQ1902_007" %A7
Delaygoto [Grobal] 7 @Samak_Mon17_1

[@Samak_Mon17_1]
#IF
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg28]
EventMSG "D1901,D1902,D1903,DQ1902_002,DQ1902_007" %A7
Delaygoto [Grobal] 7 @Samak_Mon17_2

[@Samak_Mon17_2]
#IF
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg29]
EventMSG "D1901,D1902,D1903,DQ1902_002,DQ1902_007" %A7
Delaygoto [Grobal] 7 @Samak_Mon17_3

[@Samak_Mon17_3]
#ACT
Mapting DQ1902_007 D1902 224 210
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKSTATUSRDY=5"

}

[@Samak_Mon18_0]
{
#IF
#ACT
Monclear DQ1903_001
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg30]
EventMSG "D1901,D1902,D1903,DQ1903_001" %A7
Delaygoto [Grobal] 7 @Samak_Mon18_1

[@Samak_Mon18_1]
#IF
#ACT
LoadValue A7 [Convert_Def\QuestDiary\SamakCastleQuest\Monster.txt] [Convert] [Msg31]
EventMSG "D1901,D1902,D1903,DQ1903_001" %A7
FormatStr "FLD_SAMAKGUILD='%s'" %GUILDNAME
UpdateValueSQL "TBL_SAMAKCASTLEQUEST" %A9 "FLD_SAMAKCONDITION='Complete'"
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;