;;不要删掉此行

[@AdministratorMain]
{
#SAY
Welcome <$USERNAME>,\
How may i help you?\
{FCOLOR/10}
Make: <Guild/@MakeGuild>\
;Ask How To: <Make Guild/@buildguildexp> \ \
Start <Guild War/@guildwar>
;Ask How To: <Start Guild War/@guildwarexp>\ \
Change: <Guild Flag/@UserChangeFlag>\\
;<Guild Gold Storage/@GoldStorage>\
;<Guild Palace/@GuildPalace>\\
<Leave/@Exit>

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

[@GuildPalace]
#IF
!IsAdmin
#say
busy

#ELSEACT
Goto @testSR

[@testSR]
#SAY
Special Repair: <Weapon/@SRepair(1)> <$@GetWeaponCost>\\


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

#IF
CheckGold %P9
#ACT
RepairItem %P0
Take Gold %P9
Goto @SpecialRepair
#ELSESAY
You do not have enought gold...\\
<Leave/@Exit>


[@GetWeaponCost]
#ACT
;mov P0 1
GetRepairCost 1
#IF
Equal P9 0
#SAY
{FCOLOR/10}Repaired{FCOLOR/12}
#ELSESAY
Cost: {FCOLOR/10}<$OUTPUT(P9)>{FCOLOR/12}

[@testing
#ACT
Loadvalue A1 "QuestDiary\Guild\Palace.txt" [Legends] [Palace]
Loadvalue A2 "QuestDiary\Guild\Palace.txt" [DigitalEmpire] [Palace]
Loadvalue A3 "QuestDiary\Guild\Palace.txt" [New_Dawn] [Palace]
#SAY
What guild are you in?\\

#IF
Equal A1 "Active"
#SAY
<Legends/@GuildPalace(Legends)>\
#ELSESAY
{FCOLOR/1}Legends{FCOLOR/12}\

#IF
Equal A2 "Active"
#SAY
<Digital Empire/@GuildPalace(DigitalEmpire)>\
#ELSESAY
{FCOLOR/1}Digital Empire{FCOLOR/12}\

#IF
Equal A3 "Active"
#SAY
<New Dawn/@GuildPalace(New_Dawn)>\\
<Leave/@Exit>
#ELSESAY
{FCOLOR/1}New Dawn{FCOLOR/12}\\
<I want to purchase a palace/@Buy_Palace>\
<Leave/@Exit>

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

[@Buy_Palace]
#IF
IsGuildMaster
#SAY
What guild are you leader of?\\
<Legends/@BuyPalace(Legends)>\
<Digital Empire/@BuyPalace(DigitalEmpire)>\
<New Dawn/@BuyPalace(New_Dawn)>\\
<Leave/@Exit>
#ELSESAY
Only the guild leader can buy a palace...\\
<Leave/@Exit>

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

[@GoldStorage]
#IF
!IsAdmin
#SAY
What guild are you in?\\
<Legends/@GuildStorage(Legends)>
#ELSEACT
GoTo @LegendsGuild

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

[@GuildStorage()]
#ACT
mov A1 %ARG(1)
#IF
Equal A1 %GUILDNAME
#ACT
GoTo @LegendsGuild
#ELSESAY
You are not in  {FCOLOR/10}<$OUTPUT(A1)>{FCOLOR/12} Guild...\\
<Leave/@Exit>

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

[@LegendsGuild]
#IF
IsGuildMaster
#ACT
Loadvalue A2 "QuestDiary\GoldStorage.txt" [Legends] [Gold]
#SAY
{FCOLOR/10}Legends Gold Storage{FCOLOR/12}\
Current Gold: {FCOLOR/10}<$OUTPUT(A2)>{FCOLOR/12}\\
What do you wish to do?\\
<Input Amount Of Gold To Deposit Gold/@@DepositGoldLegends>\
<Input Amount Of Gold To With Draw Gold/@@WithDrawGoldLegends>\
<Leave/@Exit>

#ELSEACT
Loadvalue A2 "QuestDiary\GoldStorage.txt" [Legends] [Gold]
#ELSESAY
{FCOLOR/10}Legends Gold Storage{FCOLOR/12}\
Current Gold: {FCOLOR/10}<$OUTPUT(A2)>{FCOLOR/12}\\
What do you wish to do?\\
<Input Amount Of Gold To Deposit Gold/@@DepositGoldLegends>\\
<Leave/@Exit>

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

[@@DepositGoldLegends]
#ACT
mov D2 %A2
mov D3 %INPUTSTR

#IF
CheckGold %D3
#ACT
Take Gold %D3
INC D2 %D3
SaveValue "QuestDiary\GoldStorage.txt" [Legends] [Gold] %D2
#SAY
Done...\\
Legends Guild Gold: {FCOLOR/10}<$OUTPUT(D2)>{FCOLOR/12}\\
<Leave/@Exit>
#ELSESAY
You do not have {FCOLOR/10}<$OUTPUT(D3)>{FCOLOR/12} Gold...\\
<Leave/@Exit>

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

[@@WithDrawGoldLegends]
#ACT
mov D2 %A2
mov D3 %INPUTSTR

#IF
Large D3 %D2
#SAY
sorry your guild only has {FCOLOR/10}<$OUTPUT(D2)>{FCOLOR/12} Gold...\\
<Leave/@Exit>

#ELSEACT
Give Gold %D3
Dec D2 %D3
SaveValue "QuestDiary\GoldStorage.txt" [Legends] [Gold] %D2
#ELSESAY
Done...\\
Legends Guild Gold: {FCOLOR/10}<$OUTPUT(D2)>{FCOLOR/12}\\
<Leave/@Exit>

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

[@UserChangeFlag]
#IF
IsGuildMaster
#SAY
To change the guild flag you need {FCOLOR/10}100,000{FCOLOR/10} gold coins.\\
<Change Flag/@UserChangeFlag_next>\
<Leave/@Exit>

#ELSESAY
You are not a guild leader...\\
<Leave/@Exit>

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

[@UserChangeFlag_next]
#ACT
SendCmd "0,169,199,1" GuildFlag @TestUserFlag

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

[@MakeGuild]
#IF
HasGuild
#SAY
Can not make a guild because you are already in one.\\
<Leave/@Exit>
#ACT
break

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

#IF
!checkgold 1000000
#SAY
You need {FCOLOR/10}1,000,000{FCOLOR/10}Gold to make a guild...\\
<Leave/@Exit>
#ACT
break

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

#IF
checkitem WoomaTaurusHorn 1
checkgold 1000000
#ACT
EnableCmd @@buildguild
break
#SAY
<Create guild now/@@BuildGuild> \ \
<Leave/@Exit>
;-------------------------------------------------------------------------------

#IF
#SAY
You dont have enough gold or you dont have WoomaTaurusHorn. \ \
<Leave/@Exit>

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

[@@buildguild]
#IF
checkitem WoomaTaurusHorn 1
checkgold 1000000
#ACT
take Gold 1000000
take WoomaTaurusHorn 1
BuildGuild @MakeGuildOK
#ELSESAY
You do not have a {FCOLOR/10}WoomaTaurusHorn  \ \
<Leave/@Exit>

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

[@MakeGuildOK]
#ACT
Mov A1 %INPUTSTR
SysMsg [GROBAL] "Congratulations to <$USERNAME> for making <$OUTPUT(A1)> guild!"
#SAY
{FCOLOR/10}<$USERNAME>{FCOLOR/12} is now leader of "{FCOLOR/10}<$INPUTSTR>{FCOLOR/12}"  Guild. \ \
<Leave/@Exit>

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

[@MakeGuildOK~]
#SAY
There is already a guild with this name.\\
<Leave/@Exit>
#ACT
give WoomaTaurusHorn 1
give Gold 1000000

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

[@buildguildexp]
#SAY
创建行会必须满足下列条件：\
到失乐园附近的沃玛神殿，打败沃玛教主，获得沃玛号角，就取得创建行会的资格了。然后把沃玛号角带给我，再付100万金币的手续费，就可以创建行会了。\ \
<Leave/@Exit>

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

[@guildwar]
#SAY
Guild war costs 30,000 Gold.\ \
<Start Guild War/@comfirmGuildWar> \
<Leave/@Exit>

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

[@ComfirmGuildWar]
#IF
checkgold 30000
#ACT
EnableCmd @@guildwar
#SAY
<Input Enemy Guild Name Now/@@guildwar>\
#ELSESAY
You do not have 30,000 Gold.\ \
<Leave/@Exit>

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

[@@GuildWar]
#IF
checkgold 30000
#ACT
Mov A1 %INPUTSTR
#ELSEACT
break
#ELSESAY
You do not have 30,000 Gold.\ \
<Leave/@Exit>

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

#IF
Equal A1 %GUILDNAME
#ACT
break
#SAY
You can not start a guild with your own guild.\ \
<Leave/@Exit>
#ELSEACT
take Gold 30000
GuildWar @GuildMakeWarOK

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

[@GuildMakeWarOK]
#SAY
<$GUILD> has declared war to the enemy guild: <$INPUTSTR>.\ \
<Leave/@Exit>

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

[@GuildMakeWarOK~]

#SAY
There was an error with the guild name.\\
<Leave/@Exit>
#ACT
give Gold 30000

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

[@guildwarexp]
#SAY
<行会战争/@guildwar2>所指的是合法进行的战争。\
目前，存在的许多行会之间冲突连绵不断，只有在<特殊情况/@warrule>下，才被允许进行合法战争。\
<申请/@propose>1次，可以维持1小时的战争状态，申请战争的手续费为3万金币。\ \
<关 闭/@exit>

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

[@guildwar2]
#SAY
申请行会战争后，同一行会成员的名字变成蓝色，敌对行会成员名字变成深红色。交战时，聊天窗口中会显示战争状态信息，杀死敌对行会的成员也不会变红名。\ \
<前一步/@guildwarexp>

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

[@warrule]
#SAY
行会战争可以在除了城市以外的店铺内部，其他建筑物内部或远离城市的地方进行。\ \
<前一步/@guildwarexp>

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

[@propose]
#SAY
只有行会首领才有资格申请行会战争。\ \
<前一步/@guildwarexp>

}
;;不要删掉此行