;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[@RefineAccessory]
{
#Define D1{PROB} D1
#Define D2{TYPE} D2
#Define D3{ATOM} D3


#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_0

[@@testRefineAccessory]
#IF
#ACT
mov A1 %INPUTSTR

#IF
Equal A1 ""
#ACT
break

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_1

[@retryRefine]
#ACT
goto @@testRefineAccessory

[@doRefineAcc()]
#IF
not CheckItem 钢玉石 1
or not CheckGold 10000
#ACT
goto @didnotMatchConditions
break

#IF
#ACT

mov D2{TYPE} %ARG(1)
mov D3{ATOM} %ARG(2)
TestRefineAccessories %A1 %D2 %D3
mov D1{PROB} %P9

#IF
Small D1{PROB} 0
#ACT
goto @didnotMatchConditions
break

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_2

[@GetRefineProb]
#IF
Small D1 30

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_3

#ACT
break

#IF
Small D1 38

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_4

#ACT
break

#IF
Small D1 45

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_5

#ACT
break

#IF
Small D1 55

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_6

#ACT
break

#IF
Small D1 65

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_7

#ACT
break

#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_8

#ACT
break

[@RefineAccNow]
#IF
not CheckItem 钢玉石 1
or not CheckGold 10000
#ACT
break

#IF
#ACT
Take 钢玉石 1
Take 金币 10000
RefineAccessories %A1 %D2 %D3

#IF
Equal P9 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_9

#IF
Equal P9 0

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_10

[@didnotMatchConditions]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_11

[@askAboutRefineAccessories]

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_12

}


[@RefineGangOk]
{
#IF

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_13

[@RefineGangOk_MainCheck]
#IF
CheckItem 钢玉矿石 10
!CheckItem 钢玉矿石 11
#ACT
goto @RefineGangOk_MainCheck_1
break

#ELSEACT
break

#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_14

[@RefineGangOk_MainCheck_1]
#IF
Checkgold 10000
#ACT
goto @RefineGangOk_MainCheck_2
break

#ELSEACT
break

#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_15

[@RefineGangOk_MainCheck_2]
#IF
Checkduraeva 钢玉矿石 10
#ACT
goto @RefineGangOk_MainRefine_RandSet
break

#ELSEACT
break

#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_16

[@RefineGangOk_MainRefine_RandSet]
#IF
Random 3
#ACT
take 钢玉矿石 10
take 金币 10000
break

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_17

#ELSEACT
goto @RefineGangOk_MainRefine
break

[@RefineGangOk_MainRefine]
#IF
checkitem 钢玉矿石 10
!Checkitem 钢玉矿石 11
checkgold 10000
checkduraeva 钢玉矿石 10
#ACT
take 钢玉矿石 10
take 金币 10000
give 钢玉石 1

#SAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_18

#ELSEACT
break

#ELSESAY
#INCLUDE [..\Convert_Def\QuestDiary\System\RefineAccessory.txt] @Convert_RefineAccessory_19

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