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




[@005_Agent]
{
#ACT
LoadValue P1 "QuestDiary\Judgement\Flag.txt" [005] [OpenGate]
LoadValue P2 "QuestDiary\Judgement\Flag.txt" [005] [CloseGate]
LoadValue P3 "QuestDiary\Judgement\Flag.txt" [005] [QuestSuccess]
#IF
Equal P3 1
#ACT
Goto @005_endquest
break
#IF
Equal P2 1
#ACT
Goto @005_CannotGo
break

#IF
Equal P1 1
Equal P2 0
#ACT
Goto @005_GoGoGo
break

#IF
Equal P1 0
#ACT
Goto @005_WaitWait
break
#ELSEACT
Goto @005_NormalSay
break


[@005_NormalSay]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\005\005npc.txt] @Convert_005npc_0

[@005_endquest]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\005\005npc.txt] @Convert_005npc_1

#ACT
UpdateValueSql "TBL_JobServerMain" "FLD_JOB='JOBSTORY'" "FLD_JOBCONDITION='End'"
end

[@005_WaitWait]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\005\005npc.txt] @Convert_005npc_2

[@005_GoGoGo]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\005\005npc.txt] @Convert_005npc_3

[@005_CannotGo]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\005\005npc.txt] @Convert_005npc_4

[@005_reject]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\005\005npc.txt] @Convert_005npc_5

[@005_accept]
begin
#IF
CheckHum "DQ1600_01" 30
#ACT
Goto @005_TooMany
break
#ELSEACT
MapMove DQ1600_01 97 169
break
end

[@005_TooMany]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\005\005npc.txt] @Convert_005npc_6

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