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

[@012_Urg]
{
#ACT
LoadValue B1 "QuestDiary\Judgement\Flag.txt" [012] [QuestUserName]

LoadValue P1 "QuestDiary\Judgement\Flag.txt" [012] [RecieveSay]
LoadValue P3 "QuestDiary\Judgement\Flag.txt" [T02] [open]

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

#IF
Equal P3 1
#ACT
GOTO @012_Autoend

#IF
Equal B1 %username
Equal P1 0
#ACT
GOTO @012_waitingQUEST
break

#IF
Equal B1 %username
Equal P1 1
Equal P3 0
#ACT
GOTO @012_resultQUEST
break

#IF
Equal B1 ""
Equal P1 0
#ACT
GOTO @012_GiveQUEST
break
#IF
#ACT
GOTO @012NPC_Normal
break



[@012_Autoend]
begin
#ACT
SaveValue "QuestDiary\Judgement\Flag.txt" [012] [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\012\NPC012.txt] @Convert_NPC012_0

[@012_NoQUEST]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\012\NPC012.txt] @Convert_NPC012_1

[@012NPC_Normal]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\012\NPC012.txt] @Convert_NPC012_2

[@012_GiveQUEST]
#if

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\012\NPC012.txt] @Convert_NPC012_3

[@012_GiveQUEST_1]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\012\NPC012.txt] @Convert_NPC012_4

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

#ACT
saveValue "QuestDiary\Judgement\Flag.txt" [012] [QuestUserName] %username
#ELSEACT
Goto @012Slow_Step
break


#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\012\NPC012.txt] @Convert_NPC012_5

[@012Slow_Step]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\012\NPC012.txt] @Convert_NPC012_6

[@012_waitingQUEST]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\012\NPC012.txt] @Convert_NPC012_7

[@012_resultQUEST]
#ACT
LoadValue P1 "QuestDiary\Judgement\Flag.txt" [010] [QuestSuccess]
LoadValue P2 "QuestDiary\Judgement\Flag.txt" [011] [QuestSuccess]
#IF
Equal P1 1
#ACT
Goto @012_resultTalk1
break
#IF
Equal P2 1
#ACT
Goto @012_resultTalk1
break
#ELSEACT
Goto @012_resultTalk2
break

[@012_resultTalk1]
begin
#ACT
mov A0 "Judgement"
mov D0 12
mov D1 1
mov D2 0
mov D3 0
goto @EveryThingReward
SaveValue "QuestDiary\Judgement\Flag.txt" [012] [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\012\NPC012.txt] @Convert_NPC012_8

[@012_resultTalk2]
begin
#ACT
mov A0 "Judgement"
mov D0 12
mov D1 2
mov D2 0
mov D3 0
goto @EveryThingReward
SaveValue "QuestDiary\Judgement\Flag.txt" [012] [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\012\NPC012.txt] @Convert_NPC012_9

}





[@012NPC_governer]

{
#ACT
LoadValue B1 "QuestDiary\Judgement\Flag.txt" [012] [QuestUserName]
LoadValue P1 "QuestDiary\Judgement\Flag.txt" [010] [QuestSuccess]
LoadValue P2 "QuestDiary\Judgement\Flag.txt" [011] [QuestSuccess]
#IF
Equal B1 %username
Equal P1 1
#ACT
Goto @012governer_Say1
break

#IF
Equal B1 %username
Equal P2 1
#ACT
Goto @012governer_Say1
break

#IF
!Equal B1 %username
#ACT
Goto @012governer_Normal
break

#ELSEACT
Goto @012governer_Say2
break


[@012governer_Normal]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\012\NPC012.txt] @Convert_NPC012_10

[@012governer_Say1]
begin
#ACT
SaveValue "QuestDiary\Judgement\Flag.txt" [012] [RecieveSay] 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\012\NPC012.txt] @Convert_NPC012_11

[@012governer_Say2]
begin
#ACT
SaveValue "QuestDiary\Judgement\Flag.txt" [012] [RecieveSay] 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\012\NPC012.txt] @Convert_NPC012_12

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