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



[@010NPC_governer]
{
begin
#ACT
LoadValue B1 "QuestDiary\Judgement\Flag.txt" [010] [QuestUserName]
LoadValue P1 "QuestDiary\Judgement\Flag.txt" [010] [GrupTimeOver]
LoadValue P2 "QuestDiary\Judgement\Flag.txt" [010] [EventStart]
LoadValue P3 "QuestDiary\Judgement\Flag.txt" [010] [QuestSuccess]

#IF
!CheckLevel 22
#ACT
Goto @010Level_Low
break


#IF
Equal B1 %username
Equal P2 1
Equal P3 0
#ACT
GOTO @010_FailQUEST
break


#IF
Equal B1 %username
Equal P1 0
Equal P2 0
Equal P3 0
#ACT
GOTO @010_waitingQUEST
break
#IF
Equal B1 %username
Equal P1 1
Equal P2 0
Equal P3 0
#ACT
GOTO @010_TimeOverQUEST
break

#IF
Equal B1 %username
Equal P2 1
Equal P3 1
#ACT
GOTO @010_resultQUEST
break

#IF
Equal B1 ""
Equal P1 0
Equal P2 0
Equal P3 0
#ACT
GOTO @010_GiveQUEST
break
#ELSEACT
GOTO @010NPC_Normal
break
end

[@010_TimeOverQUEST]
begin
#ACT
SaveValue "QuestDiary\Judgement\Flag.txt" [010] [QuestUserName] ""
UpdateValueSql "TBL_JobServerMain" "FLD_JOB='JOBSTORY'" "FLD_JOBCONDITION='End'"

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_0

[@010_FailQUEST]
begin
#ACT
SaveValue "QuestDiary\Judgement\Flag.txt" [010] [QuestUserName] ""
UpdateValueSql "TBL_JobServerMain" "FLD_JOB='JOBSTORY'" "FLD_JOBCONDITION='End'"
Savevalue "QuestDiary\Judgement\Flag.txt" [MainTimer] [SuperQuest] 0

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_1

[@010_resultQUEST]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_2

[@010_resultQUEST_1]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_3

[@010_resultQUEST_2]
begin
#ACT
mov A0 "Judgement"
mov D0 10
mov D1 2
mov D2 0
mov D3 0
goto @EveryThingReward
SaveValue "QuestDiary\Judgement\Flag.txt" [010] [QuestUserName] ""
UpdateValueSql "TBL_JobServerMain" "FLD_JOB='JOBSTORY'" "FLD_JOBCONDITION='End'"
Savevalue "QuestDiary\Judgement\Flag.txt" [MainTimer] [SuperQuest] 0

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_4

[@010Level_Low]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_5

[@010NPC_Normal]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_6

[@010_GiveQUEST]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_7

[@010_GiveQUEST_1]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_8

[@010_GiveQUEST_2]
begin
#ACT
#ACT
LoadValue B1 "QuestDiary\Judgement\Flag.txt" [010] [QuestUserName]
#IF
Equal B1 ""

#ACT
saveValue "QuestDiary\Judgement\Flag.txt" [010] [QuestUserName] %username


#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_9

#ELSEACT
Goto @010Slow_Step
break
end


[@010_talk_2]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_10

[@010Slow_Step]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_11

[@010_waitingQUEST]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_12

[@010_Eventstart]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_13

[@010_Eventstart_1]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_14

[@010_Eventstart_2]
begin
#IF
CheckGroupCount 1
#ACT
Savevalue "QuestDiary\Judgement\Flag.txt" [010] [Eventstart] 1
GroupMove "DQ1600_01, 94 , 164" %Username
goto @010eventmsg

#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_15

[@010eventmsg]
#CALL [Judgement\Story\010\010Event.txt] @set010A


}



[@010_talk1]
{
begin
#ACT
LoadValue B1 "QuestDiary\Judgement\Flag.txt" [010] [QuestUserName]

#IF
!checkmonmap "DQ1600_01,157,55,10" 1 ลตย๊8
Equal B1 %username
#ACT
Goto @010npc_talk
break
#ELSEACT
Goto @010npc_Normal
break
end

[@010npc_Normal]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_16

[@010npc_talk]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_17

[@010_talk1_3]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_18

[@010_talk1_4]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_19

[@010_talk1_5]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_20

[@010_talk1_6]
#ACT
saveValue "QuestDiary\Judgement\Flag.txt" [010] [QuestSuccess] 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] @Convert_NPC010_21

[@010_talk1_7]
#ACT
mov A0 "Judgement"
mov D0 10
mov D1 1
mov D2 0
mov D3 0
goto @EveryThingReward
LoadValue A7 [Convert_Def\QuestDiary\Judgement\Story\010\NPC010.txt] [Convert] [Msg0]
linemsg "DQ1600_01" %A7
Mapting DQ1600_01 41 77 325


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