;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[@041_Numa]
{
#ACT
FormatStr "FLD_JOB='%s'" "JOBRANDOM"
ReadValueSql "TBL_JobServerMain" %A9 "FLD_JOBCONDITION" [@041Quest_0]
#ELSEACT
break

[@041Quest_0()]
#ACT
mov A1 %ARG(1)
LoadValue B1 "QuestDiary\Judgement\Flag.txt" [041] [QuestUserName]

#IF
Equal B1 %username
CheckGroupCount 1
#ACT
Goto @041_EnterMap
break

#IF
Equal B1 %username
!CheckGroupCount 1
#ACT
Goto @041_CannotGo
break

#IF
Equal A1 "start"
Equal B1 ""
#ACT
Goto @041_GiveQuest
break
#ELSEACT
Goto @041_Normal
break


[@041_Normal]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Event\041\041npc.txt] @Convert_041npc_0

[@041_GiveQuest]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Event\041\041npc.txt] @Convert_041npc_1

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

#IF
!Equal B1 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Event\041\041npc.txt] @Convert_041npc_2


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Event\041\041npc.txt] @Convert_041npc_3

#ELSEACT
SaveValue "QuestDiary\Judgement\Flag.txt" [041] [QuestUserName] %username
DelayGoto [Grobal] 900 @041_Init
end


[@041_CannotGo]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Event\041\041npc.txt] @Convert_041npc_4

[@041_EnterMap]
begin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\Judgement\Event\041\041npc.txt] @Convert_041npc_5

[@041_EnterMap1]
begin
#ACT
GroupMove "DQ1600_11,155,57" %username
Movenpc "4,199,144,诺玛商人" npcroom1,4,12
Goto @041_EventCall
end


[@041_Init]
begin
#ACT
Movenpc "4,199,144,诺玛商人" npcroom1,4,12
SaveValue "QuestDiary\Judgement\Flag.txt" [041] [QuestUserName] ""
FormatStr "FLD_JOB='%s'" "JOBRANDOM"
UpdateValueSql "TBL_JobServerMain" %A9 "FLD_JOBNAME='Q041',FLD_JOBCONDITION='End'"
end

[@041_EventCall]
#CALL [Judgement\Event\041\041event.txt] @041_EventStart
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;