;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[@NPC040]
{
#ACT
FormatStr "FLD_JOB='%s'" "JOBRANDOM"
ReadValueSql "TBL_JobServerMain" %A9 "FLD_JOBCONDITION" [@040Quest_0]
#ELSEACT
break

[@040Quest_0()]
#ACT
mov A1 %ARG(1)

#IF
Equal A1 "start"
!CheckMonMap DQ1600_11 10

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Event\040\NPC040.TXT] @Convert_NPC040_0


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Event\040\NPC040.TXT] @Convert_NPC040_1

[@040Success]
begin
#IF

#Say
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Event\040\NPC040.TXT] @Convert_NPC040_2

[@040Success1]
begin
#ACT
mov A0 "Judgement"
mov D0 40
mov D1 1
mov D2 0
mov D3 0
goto @EveryThingReward
close
MapMove D002 115 134
break
end


}

[@GATENPC040]
{
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Event\040\NPC040.TXT] @Convert_NPC040_3

#ACT

[@040enter]
begin
#ACT
LoadValue P1 "QuestDiary\Judgement\Flag.txt" [040] [StateGate]
#IF
Equal P1 1
!checkhum DQ1600_11 20
#ACT
close
Mapmove DQ1600_11 97 170

#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Event\040\NPC040.TXT] @Convert_NPC040_4

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