;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[@Marriage]
{
#Define N50{START} N50
#Define N51{WEDDING} N51
#Define N53{TIME} N53
#Define N54{TRY} N54
#Define N55{WAITINGTIMEOUT} N55
#Define N56{MAN} N6
#Define N57{GIRL} N7

#Define B1{MANNAME} B1
#Define B2{GIRLNAME} B2
#Define B3{INPUTGIRLNAME} B3

#IF
Equal N50{START} 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_0


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_1

#IF
Equal B1{MANNAME} %USERNAME

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_2

#IF
IsAdmin

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_3

[@MarriageQuestion]
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_4

[@wantGetMarried]
#IF
!CheckLevel 22

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_5

#ACT
break

#IF
CheckMarriage

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_6

#ACT
break

#IF
Gender [man]
#ACT
goto @wantGetMarried_man
#ELSEACT
goto @wantGetMarried_woman



[@wantGetMarried_woman]
#IF
!CheckPos 0_000,43,31,1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_7

#ACT
break

#IF
equal N56{MAN} 1
equal B3{INPUTGIRLNAME} %USERNAME
#ELSEACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg0]
SysMsg %A7
close
break

#IF
CheckGold 500000
#ACT
Take 金币 500000
mov N57{GIRL} 1
mov B2{GIRLNAME} %USERNAME
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg1]
SysMsg %A7
close
#ELSEACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg2]
SysMsg %A7
close



[@wantGetMarried_man]
#IF
!CheckPos 0_000,42,30,1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_8

#ACT
break

#IF
Equal B1{MANNAME} ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_9


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_10

[@@InputMarried_Woman]
#IF
Mov B5 %INPUTSTR
!Equal B5 ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_11

[@ProcessMarried]
#IF
Equal N56{MAN} 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_12

#ACT
break

#IF
!Equal B1{MANNAME} ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_13

#ACT
break

#IF
!Equal B3{INPUTGIRLNAME} ""

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_14

#ACT
break

#IF
!CheckGold 500000
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg3]
SysMsg %A7
close
break
#ELSEACT
Take 金币 500000
mov B1{MANNAME} %USERNAME
mov B3{INPUTGIRLNAME} %B5
mov N56{MAN} 1
mov N55{WAITINGTIMEOUT} 0
Delaygoto [Grobal] 5 @startWeddingloop
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg4]
SysMsg %A7
close


[@startWeddingloop]
#IF
Equal N50{START} 1
#ACT
break

#IF
Inc N55{WAITINGTIMEOUT} 1
Large N55{WAITINGTIMEOUT} 5
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg5]
Sysmsg %A7
goto @CancelWedding
break

#IF
Equal N56{MAN} 1
Equal N57{GIRL} 1
#ELSEACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg6]
SysMsg %A7
Delaygoto [Grobal] 5 @startWeddingloop
break

#IF
#ACT
Mov N50{START} 1
mov N51{WEDDING} 1
Mov N53{TIME} 0
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg7]
EventMsg "0_000" %A7 10005
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg8]
SysMsg %A7
Delaygoto [Grobal] 10 @weddingCeremony
close



[@weddingCeremony]
#IF
Equal N51{WEDDING} 0
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg9]
Sysmsg %A7
goto @CancelWedding
break

#IF
Large N53{TIME} 60
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg10]
EventMsg "0_000" %A7 10005
goto @CancelWedding
break

#IF
Equal N51{WEDDING} 1
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg11]
EventMsg "0_000" %A7 10005
Mov N51{WEDDING} 2
Inc N53{TIME} 1
Delaygoto [Grobal] 20 @weddingCeremony
break

#IF
Equal N51{WEDDING} 2
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg12]
EventMsg "0_000" %A7 10005
Mov N54{TRY} 5
Mov N51{WEDDING} 3
CaptureSaying %B1 @ListenSayYes_man
Inc N53{TIME} 1
Delaygoto [Grobal] 10 @weddingCeremony
break

#IF
Equal N51{WEDDING} 3
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg13]
EventMsg "0_000" %A7 10005
Inc N53{TIME} 1
Delaygoto [Grobal] 10 @weddingCeremony
break

#IF
Equal N51{WEDDING} 4
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg14]
Eventmsg "0_000" %A7 10005
Mov N54{TRY} 5
Mov N51{WEDDING} 5
CaptureSaying %B2 @ListenSayYes_woman
Inc N53{TIME} 1
Delaygoto [Grobal] 10 @weddingCeremony
break

#IF
Equal N51{WEDDING} 5
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg15]
EventMsg "0_000" %A7 10005
Inc N53{TIME} 1
Delaygoto [Grobal] 10 @weddingCeremony
break

#IF
Equal N51{WEDDING} 6
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg16]
Eventmsg "0_000" %A7 10005
GetMarried %B1 %B2
mov N51{WEDDING} 7
Inc N53{TIME} 1
Delaygoto [Grobal] 10 @weddingCeremony
break




#IF
Equal N51{WEDDING} 7
CheckMarriageRing %B1
CheckMarriageRing %B2
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg17]
EventMsg "0_000" %A7 10005
goto @cancelWedding
Break

#IF
#ACT
Inc N53{TIME} 1
Delaygoto [Grobal] 10 @weddingCeremony



[@ListenSayYes_man]
#IF
Equal N51{WEDDING} 0
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg18]
Sysmsg %A7
goto @cancelWedding
CaptureSaying ""
break

#IF
#ACT
mov B9 %INPUTSTR
mov P1 %@GetFace
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg19]
EventMsg "0_000" %A7 %P1

#IF
Equal N51{WEDDING} 3
Equal B9 "愿意"
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg20]
EventMsg "0_000" %A7 10005
Mov B9 ""
Mov N51{WEDDING} 4
CaptureSaying ""
break

#IF
Equal N51{WEDDING} 3
Equal B9 "不愿意"
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg21]
EventMsg "0_000" %A7 10005
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg22]
EventMsg "0_000" %A7 10005
Mov B9 ""
CaptureSaying ""
goto @cancelWedding
Break

#IF
Large N54{TRY} 0
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg23]
SysMsg %A7
Dec N54{TRY} 1
break
#ELSEACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg24]
EventMsg "0_000" %A7 10005
Mov B9 ""
CaptureSaying ""
goto @cancelWedding
Break



[@ListenSayYes_woman]
#IF
Equal N51{WEDDING} 0
#ACT
goto @cancelWedding
CaptureSaying ""
break

#IF
#ACT
mov B9 %INPUTSTR
mov P1 %@GetFace
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg25]
EventMsg "0_000" %A7 %P1

#IF
Equal N51{WEDDING} 5
Equal B9 "愿意"
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg26]
EventMsg "0_000" %A7 10005
Mov B9 ""
Mov N51{WEDDING} 6
CaptureSaying ""
break

#IF
Equal N51{WEDDING} 5
Equal B9 "不愿意"
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg27]
EventMsg "0_000" %A7 10005
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg28]
EventMsg "0_000" %A7 10005
Mov B9 ""
CaptureSaying ""
goto @cancelWedding
Break

#IF
Large N54{TRY} 0
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg29]
SysMsg %A7
Dec N54{TRY} 1
break
#ELSEACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg30]
EventMsg "0_000" %A7 10005
Mov B9 ""
CaptureSaying ""
goto @cancelWedding
Break


[@GetFace]
#IF
CheckJob Warrior
#ACT
mov P1 0

#IF
CheckJob Wizard
#ACT
mov p1 1

#IF
CheckJob Taoist
#ACT
mov p1 2

#IF
#ACT
mul p1 2
mov p1 p9

#IF
gender woman
#ACT
inc p1

#IF
#ACT
inc p1 20000

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_15

[@wantDivorce]
#IF
CheckMarriage

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_16


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_17

[@divorcenow]
#IF
checkgold 1000000
#ACT
take 金币 1000000
Divorce
close


[@TakeMarriedRing]
#IF
CheckMarriage

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_18


#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_19

[@ExchangeMarriedRing]
#IF
checkgold 200000
#ACT
take 金币 200000
CancelMarriageRing
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg31]
SysMsg %A7
close

#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\System\MarriageSystem.txt] @Convert_MarriageSystem_20

[@ResetWeddingVariables]
#ACT
goto @cancelWedding
close
break


[@PreCancelWedding]
#ACT
LoadValue A7 [Convert_Def\QuestDiary\System\MarriageSystem.txt] [Convert] [Msg32]
SysMsg %A7
goto @CancelWedding
break




[@CancelWedding]
#ACT
Mov N50{START} 0
Mov N51{WEDDING} 0
Mov N53{TIME} 0
Mov N54{TRY} 0
Mov N55{WAITINGTIMEOUT} 0
Mov N56{MAN} 0
Mov N57{GIRL} 0
Mov B1{MANNAME} ""
Mov B2{GIRLNAME} ""
Mov B3{INPUTGIRLNAME} ""
Mov B4 ""
Mov B8 ""
Mov B9 ""
close
break
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;