;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[@NPC039]
{
#ACT
LoadValue P1 "QuestDiary\Judgement\Flag.txt" [039] [OpenGate]
#IF
Equal P1 1
#ACT
goto @Agent039_Enter

#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Event\039\NPC039.txt] @Convert_NPC039_0

[@Agent039]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Event\039\NPC039.txt] @Convert_NPC039_1

#ACT
SaveValue "QuestDiary\Judgement\Flag.txt" [039] [OpenGate] 1
SaveValue "QuestDiary\Judgement\Flag.txt" [039] [QuestUserName] %USERNAME
DelayGoto [Grobal] 900 @039_Initial
end

[@039_Initial]
begin
#ACT
Movenpc "D002,84,74,ÓñÁé" npcroom1,7,13
SaveValue "QuestDiary\Judgement\Flag.txt" [039] [OpenGate] 0
SaveValue "QuestDiary\Judgement\Flag.txt" [039] [QuestUserName] ""
FormatStr "FLD_JOB='%s'" "JOBRANDOM"
UpdateValueSql "TBL_JobServerMain" %A9 "FLD_JOBNAME='Q039',FLD_JOBCONDITION='End'"
end

[@Agent039_Enter]
begin
#ACT
LoadValue B1 "QuestDiary\Judgement\Flag.txt" [039] [QuestUserName]
#IF
Equal B1 %USERNAME

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Event\039\NPC039.txt] @Convert_NPC039_2


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Event\039\NPC039.txt] @Convert_NPC039_3

[@Agent039_Enter1]
begin
#IF
CheckGroupCount 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Event\039\NPC039.txt] @Convert_NPC039_4


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Event\039\NPC039.txt] @Convert_NPC039_5

[@Agent039_Enter2]
begin
#ACT
close
GroupMove "DQ1600_12,38,167,2" %USERNAME
SaveValue "QuestDiary\Judgement\Flag.txt" [039] [OpenGate] 0
Movenpc "D002,84,74,ÓñÁé" npcroom1,7,13
Mov B1{QUSERNAME} ""
goto @039EventStart
end

[@039EventStart]
#CALL [Judgement\Event\039\Event039.txt] @set039
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;