;;不要删掉此行

[@GuildRepair]
{
#SAY
What do you want me to repair?\\
<Weapons/@SRepair(1)> <$@GetWeaponCost>
<Armour/@Armour>\
<Accessory/@Accessory>\\
<Leave/@Exit>

[@Accessory]
#SAY
<Necklace/@SRepair(3)> <$@GetNecklaceCost>
<Left Bracelet/@SRepair(5)> <$@GetLeftBraceCost>
<Right Bracelet/@SRepair(6)> <$@GetRighBraceCost>
<Left Ring/@SRepair(7)> <$@GetRingCostLeft>
<Right Ring/@SRepair(8)> <$@GetRightRingCost>
<Back/@Main>\
<Leave/@Exit>

;---------------------------------------

[@Armour]
#SAY
What do you want me to repair?\\
<Armour/@SRepair(0)> <$@GetArmourCost>
<Helmet/@SRepair(4)> <$@GetHelmetCost>
<Shoes/@SRepair(10)> <$@GetFootWearCost>
<Back/@Main>\
<Leave/@Exit>

;---------------------------------------

[@GetWeaponCost]
#ACT
;mov P0 1
GetRepairCost 1
#ACT
Mov N95 %P9
Mov N94 2
Div N95 N94
#SAY
Cost: {FCOLOR/10}<$OUTPUT(P9)>{FCOLOR/12}\

;----------------------------------

[@GetNecklaceCost]
#ACT
;mov P0 3
GetRepairCost 3
#ACT
Mov N95 %P9
Mov N94 2
Div N95 N94
#SAY
Cost: {FCOLOR/10}<$OUTPUT(P9)>{FCOLOR/12}\

;----------------------------------

[@GetLeftBraceCost]
#ACT
;mov P0 5
GetRepairCost 5
#ACT
Mov N95 %P9
Mov N94 2
Div N95 N94
#SAY
Cost: {FCOLOR/10}<$OUTPUT(P9)>{FCOLOR/12}\

;----------------------------------

[@GetRighBraceCost]
#ACT
;mov P0 6
GetRepairCost 6
#ACT
Mov N95 %P9
Mov N94 2
Div N95 N94
#SAY
Cost: {FCOLOR/10}<$OUTPUT(P9)>{FCOLOR/12}\

;----------------------------------

[@GetRingCostLeft]
#ACT
;mov P0 7
GetRepairCost 7
#ACT
Mov N95 %P9
Mov N94 2
Div N95 N94
#SAY
Cost: {FCOLOR/10}<$OUTPUT(P9)>{FCOLOR/12}\

;----------------------------------

[@GetRightRingCost]
#ACT
;mov P0 8
GetRepairCost 8
#ACT
Mov N95 %P9
Mov N94 2
Div N95 N94
#SAY
Cost: {FCOLOR/10}<$OUTPUT(P9)>{FCOLOR/12}\

;----------------------------------

[@GetArmourCost]
#ACT
;mov P0 0
GetRepairCost 0
#ACT
Mov N95 %P9
Mov N94 2
Div N95 N94
#SAY
Cost: {FCOLOR/10}<$OUTPUT(P9)>{FCOLOR/12}\

;----------------------------------

[@GetHelmetCost]
#ACT
;mov P0 4
GetRepairCost 4
#ACT
Mov N95 %P9
Mov N94 2
Div N95 N94
#SAY
Cost: {FCOLOR/10}<$OUTPUT(P9)>{FCOLOR/12}\

;----------------------------------

[@GetFootWearCost]
#ACT
;mov P0 1
GetRepairCost 10
#ACT
Mov N95 %P9
Mov N94 2
Div N95 N94
#SAY
Cost: {FCOLOR/10}<$OUTPUT(P9)>{FCOLOR/12}\

;----------------------------------

[@SRepair()]
#ACT
Mov P0 %ARG(1)
GetRepairCost %P0
Mov N95 %P9
Mov N94 2
Div N95 N94

#IF
CheckGold %P9
#ACT
RepairItem %P0
Take Gold %P9
Goto @Main
#ELSESAY
You do not have enought gold...\\

;----------------------------------

[@Repair_ALL]
#ACT
Mov P0 0
GetRepairCost %P0
Mov N95 %P9
Mov N94 2
Div N95 N94

#IF
CheckGold %P9
#ACT
RepairItem %P0
Take Gold %P9
DelayGoto [Local] 1 @Repair_ALL_1
#SAY
Repairing: {FCOLOR/10}Armour{FCOLOR/10}
#ELSESAY
You do not have enought gold...\\

;----------------------------------

[@Repair_ALL_1]
#ACT
Mov P0 1
GetRepairCost %P0
Mov N95 %P9
Mov N94 2
Div N95 N94

#IF
CheckGold %P9
#ACT
RepairItem %P0
Take Gold %P9
DelayGoto [Local] 1 @Repair_ALL_2
#SAY
Repairing: {FCOLOR/10}Weapon{FCOLOR/10}
#ELSESAY
You do not have enought gold...\\

;-------------------------------------

[@Repair_ALL_2]
#ACT
Mov P0 4
GetRepairCost %P0
Mov N95 %P9
Mov N94 2
Div N95 N94

#IF
CheckGold %P9
#ACT
RepairItem %P0
Take Gold %P9
DelayGoto [Local] 1 @Repair_ALL_3
#SAY
Repairing: {FCOLOR/10}Helmet{FCOLOR/10}
#ELSESAY
You do not have enought gold...\\

;-------------------------------------

[@Repair_ALL_3]
#ACT
Mov P0 3
GetRepairCost %P0
Mov N95 %P9
Mov N94 2
Div N95 N94

#IF
CheckGold %P9
#ACT
RepairItem %P0
Take Gold %P9
DelayGoto [Local] 1 @Repair_ALL_4
#SAY
Repairing: {FCOLOR/10}Necklace{FCOLOR/10}
#ELSESAY
You do not have enought gold...\\

;-------------------------------------

[@Repair_ALL_4]
#ACT
Mov P0 5
GetRepairCost %P0
Mov N95 %P9
Mov N94 2
Div N95 N94

#IF
CheckGold %P9
#ACT
RepairItem %P0
Take Gold %P9
DelayGoto [Local] 1 @Repair_ALL_5
#SAY
Repairing: {FCOLOR/10}Left Bracelet{FCOLOR/10}
#ELSESAY
You do not have enought gold...\\

;-------------------------------------

[@Repair_ALL_5]
#ACT
Mov P0 6
GetRepairCost %P0
Mov N95 %P9
Mov N94 2
Div N95 N94

#IF
CheckGold %P9
#ACT
RepairItem %P0
Take Gold %P9
DelayGoto [Local] 1 @Repair_ALL_6
#SAY
Repairing: {FCOLOR/10}Right Bracelet{FCOLOR/10}
#ELSESAY
You do not have enought gold...\\

;-------------------------------------

[@Repair_ALL_6]
#ACT
Mov P0 7
GetRepairCost %P0
Mov N95 %P9
Mov N94 2
Div N95 N94

#IF
CheckGold %P9
#ACT
RepairItem %P0
Take Gold %P9
DelayGoto [Local] 1 @Repair_ALL_7
#SAY
Repairing: {FCOLOR/10}Left Ring{FCOLOR/10}
#ELSESAY
You do not have enought gold...\\

;-------------------------------------

[@Repair_ALL_7]
#ACT
GetRepairCost %P0
Mov N95 %P9
Mov N94 2
Div N95 N94

#IF
CheckGold %P9
#ACT
RepairItem %P0
Take Gold %P9
DelayGoto [Local] 1 @Repair_ALL_8
#SAY
Repairing: {FCOLOR/10}Right Ring{FCOLOR/10}
#ELSESAY
You do not have enought gold...\\

;-------------------------------------

[@Repair_ALL_8]
#ACT
Mov P0 8
GetRepairCost %P0
Mov N95 %P9
Mov N94 2
Div N95 N94

#IF
CheckGold %P9
#ACT
RepairItem %P0
Take Gold %P9
DelayGoto [Local] 1 @Repair_ALL_9
#SAY
Repairing: {FCOLOR/10}Shoes{FCOLOR/10}
#ELSESAY
You do not have enought gold...\\

;-------------------------------------

[@Repair_ALL_9]
#ACT
Loadvalue A5 "QuestDiary\Guild\GoldStorage.txt" %GUILDNAME [Gold]

#ACT
mov D2 %A5
mov D3 2000

#IF
CheckGold %D3
#ACT
Take Gold %D3
INC D2 %D3
SaveValue "QuestDiary\Guild\GoldStorage.txt" %GUILDNAME [Gold] %D2
#SAY
Finished...\\
<Leave/@Exit>
#ELSESAY
Finished...\\
<Leave/@Exit>

;----------------------------------
}

;;不要删掉此行