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




[@004_MunHwangSpeak]
{
#ACT
LoadValue B1 "QuestDiary\Judgement\Flag.txt" [004] [QuestUserName]
LoadValue P1 "QuestDiary\Judgement\Flag.txt" [004] [GiveTimeOver]
LoadValue P2 "QuestDiary\Judgement\Flag.txt" [004] [GroupTimeOver]
LoadValue P3 "QuestDiary\Judgement\Flag.txt" [004] [EventStart]
LoadValue P4 "QuestDiary\Judgement\Flag.txt" [004] [QuestSuccess]
MovR P9 100

#IF
Equal B1 %username
Equal P3 1
Equal P4 1
#ACT
Goto @004_Success
break

#IF
Equal B1 %username
Equal P3 1
Equal P4 0
#ACT
Goto @004_Failed
break

#IF
Equal B1 %username
Equal P2 1
Equal P3 0
#ACT
Goto @004_GroupTimeOver
break

#IF
Equal B1 %username
Equal P2 0
Equal P3 0
CheckGroupCount 1
#ACT
Goto @004_EnterQuestMap
break

#IF
Equal B1 %username
Equal P2 0
Equal P3 0
!CheckGroupCount 1
#ACT
Goto @004_CannotEnter
break

#IF
!Equal D1 1
Small P9 100
Equal B1 ""
Equal P1 0
Equal P3 0
#ACT
Mov D1 1
Goto @004_GiveQuest
break

#IF
#ACT
Mov D1 1
Goto @004_NormalTalk
break



[@004_NormalTalk]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\004\004Npc.txt] @Convert_004Npc_0

[@004_SlowStep]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\004\004Npc.txt] @Convert_004Npc_1

[@004_CannotEnter]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\004\004Npc.txt] @Convert_004Npc_2

[@004_GroupTimeOver]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\004\004Npc.txt] @Convert_004Npc_3

[@004_GiveQuest]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\004\004Npc.txt] @Convert_004Npc_4

[@004_GiveQuest1]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\004\004Npc.txt] @Convert_004Npc_5

[@004_GiveQuest2]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\004\004Npc.txt] @Convert_004Npc_6

[@004_GiveQuest3]
begin
#ACT
LoadValue B1 "QuestDiary\Judgement\Flag.txt" [004] [QuestUserName]

#IF
!Equal B1 ""
#ACT
Goto @004_SlowStep
break
#ELSEACT
SaveValue "QuestDiary\Judgement\Flag.txt" [004] [QuestUserName] %username
DelayGoto [Grobal] 900 @004_GroupTimer

#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\004\004Npc.txt] @Convert_004Npc_7

[@004_Reject]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\004\004Npc.txt] @Convert_004Npc_8

[@004_GroupTimer]
begin
#ACT
SaveValue "QuestDiary\Judgement\Flag.txt" [004] [GroupTimeOver] 1
end


[@004_EnterQuestMap]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\004\004Npc.txt] @Convert_004Npc_9

[@into004]
begin
#ACT
GroupMove "DQ1600_02,27,174,2" %username
SaveValue "QuestDiary\Judgement\Flag.txt" [004] [EventStart] 1
Goto @004_EventCall
end

[@004_EventCall]
#CALL [Judgement\Story\004\004Event.txt] @004_Event


[@004_Success]
begin
#ACT
Savevalue "QuestDiary\Judgement\Flag.txt" [MainTimer] [SuperQuest] 0
SaveValue "QuestDiary\Judgement\Flag.txt" [004] [QuestUserName] ""
UpdateValueSql "TBL_JobServerMain" "FLD_JOB='JOBSTORY'" "FLD_JOBCONDITION='End'"
mov A0 "Judgement"
mov D0 4
mov D1 2
mov D2 0
mov D3 0
goto @EveryThingReward
LoadValue A7 [Convert_Def\QuestDiary\Judgement\Story\004\004Npc.txt] [Convert] [Msg0]
Speak %A7

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\004\004Npc.txt] @Convert_004Npc_10

[@004_Failed]
begin
#ACT
SaveValue "QuestDiary\Judgement\Flag.txt" [004] [QuestUserName] ""
UpdateValueSql "TBL_JobServerMain" "FLD_JOB='JOBSTORY'" "FLD_JOBCONDITION='End'"
Savevalue "QuestDiary\Judgement\Flag.txt" [MainTimer] [SuperQuest] 0
mov A0 "Judgement"
mov D0 4
mov D1 3
mov D2 0
mov D3 0

goto @EveryThingReward
break

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Story\004\004Npc.txt] @Convert_004Npc_11

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