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

[@008_Agent]
{

#ACT
LoadValue P1 "QuestDiary\Judgement\Flag.txt" [008] [EventStart]
LoadValue P2 "QuestDiary\Judgement\Flag.txt" [008] [GiveTimeover]
LoadValue P3 "QuestDiary\Judgement\Flag.txt" [008] [Result]
LoadValue P4 "QuestDiary\Judgement\Flag.txt" [008] [HumanCount]
LoadValue P5 "QuestDiary\Judgement\Flag.txt" [008] [Result2]
MovR P9 100

#IF
!checklevel 22
#ACT
Goto @008_Low_Level
break

#IF

Large P4 20
Equal P1 1
Equal P2 0
Equal P3 0
Equal P5 0
#ACT
Goto @008_QusestClose
break


#IF
check [781] 1
Equal P1 1
Equal P3 1
Equal P5 0
#ACT
Goto @008_QuestSuccess
break

#IF
Equal P1 1
Equal P2 1
Equal P3 0
#ACT
Goto @008_GiveTimeover
break

#IF
Equal P1 1
Equal P2 0
Equal P3 0
Equal P5 0
#ACT
Goto @008_Questdoing
break


#IF
Equal P1 0
Equal P2 0
Equal P3 0
Equal P4 0
Small P9 100
#ACT
GOTO @008_GiveQUEST
break
#ELSEACT
GOTO @008NPC_Normal
break


[@008NPC_Normal]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\008\NPC008A.txt] @Convert_NPC008A_0

[@008_QuestSuccess]
begin
#IF
check [781] 1
#ACT
Savevalue "QuestDiary\Judgement\Flag.txt" [MainTimer] [SuperQuest] 0
set [781] 0
set [782] 0
mov A0 "Judgement"
mov D0 8
mov D1 2
mov D2 0
mov D3 0
goto @EveryThingReward

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\008\NPC008A.txt] @Convert_NPC008A_1

#ELSEACT
goto @008NPC_Normal
end

[@008_GiveQUEST]
begin
#ACT
set [781] 0
set [782] 0

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\008\NPC008A.txt] @Convert_NPC008A_2

[@008_GetQuest]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\008\NPC008A.txt] @Convert_NPC008A_3

[@008_NOQuest]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\008\NPC008A.txt] @Convert_NPC008A_4

[@008_Questdoing]
begin
#ACT
LoadValue P1 "QuestDiary\Judgement\Flag.txt" [008] [HumanCount]
#IF
small P1 20

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\008\NPC008A.txt] @Convert_NPC008A_5

#ELSEACT
Goto @008_QusestClose
break
end
[@008_okstart]
begin
#IF
!CheckLevel 22
#ACT
Goto @008_Low_Level
break


#ACT
LoadValue P1 "QuestDiary\Judgement\Flag.txt" [008] [HumanCount]
#IF
Large P1 20
#ACT
Goto @008_QusestClose
break
#ELSEACT
LoadValue P1 "QuestDiary\Judgement\Flag.txt" [008] [HumanCount]
set [781] 1
set [782] 0
Inc P1 1
SaveValue "QuestDiary\Judgement\Flag.txt" [008] [HumanCount] %P1
Mapmove DQ1600_01 94 164
end

[@008_Low_Level]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\008\NPC008A.txt] @Convert_NPC008A_6

[@008_nostart]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\008\NPC008A.txt] @Convert_NPC008A_7

[@008_GiveTimeover]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\008\NPC008A.txt] @Convert_NPC008A_8

[@008_QusestClose]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\008\NPC008A.txt] @Convert_NPC008A_9

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