;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[@HorseSystem]
{

#ACT
LoadValue A1 [QuestDiary/System/CurrentDate.txt] [DateSetting] [Date]
#SAY
Date is <$OUTPUT(A1)>\
Welcome to my Stables.\
Here is a selection of the Horses available\
from me\
<[ Brown Horse ]/@BuyHorse(horse1,15,500000)> - 500,000 Gold, Level 15,\
________________ +50 Bag Weight\
<[ Red Horse ]/@BuyHorse(horse3,42,90000000)> - 90,000,000 Gold, Level 42,\
________________+200 Bagweight, +5 DC, SC, or MC\
<[ Black Horse ]/@BuyHorse(horse4,55,400000000)> - 400,000,000 Gold, Level 55,\
________________ +300 Bagweight, +8 DC, SC, or MC\\
<[ White Horse ]/@BuyHorse(horse2,70,800000000)> - 800,000,000 Gold, Level 70,\
________________ +350 Bag Weight and Working Regen :)\
<[ Sell Horse ]/@SellHorse>\\
<[ Exit ]/@exit>\\\


[@BuyHorse()]
#IF
#ACT
Mov A0 %ARG(1)
Mov D0 %ARG(2)
Mov D1 %ARG(3)

#IF
checklevel %D0

#ELSESAY
You must be {FCOLOR/12}Level <$OUTPUT(D0)>+ {FCOLOR/10} to purchase this Horse\
<[ Exit ]/@exit>\

#ELSEACT
break

#IF
checkgold %D1

#ELSESAY
You need to have {FCOLOR/12}<$OUTPUT(D1)> Gold{FCOLOR/10} to purchase this Horse\
<[ Exit ]/@exit>\

#ELSEACT
break

#IF
CheckHorse

#SAY
You already own a Horse, sell that one First!\
<[ Back ]/@Main>\

#ACT
break

#IF
checklevel %D0
checkgold %D1
!CheckHorse

#SAY
You are now the proud owner of a new Horse\
<[ Exit ]/@exit>\

#ACT
take Gold %D1
horsecall %A0
goto @CheckBlackHorse
break

[@CheckBlackHorse]
#IF
EQUAL  A0 "horse4"
#ACT
lineMsg [Grobal] "<$USERNAME> Bought a Black Horse!!!!!!"
#ELSEACT
Break

[@SellHorse]
#SAY
Are you sure?\
You only get 50% of the horses value!!\\
<[ I am Sure - Sell my Horse ]/@SellH1>\
<[ Exit ]/@exit>\\\


[@SellH1]
#IF
checkhorse 1
!CheckRiding

#SAY
Thanks, A nice Brown Horse.\
Here's, 250,000 Gold\
<[ Back ]/@Main>\

#ACT
give Gold 250000
KillHorse
break

#IF
checkhorse 2
!CheckRiding

#SAY
Thanks, A Perfect White Horse.\
Here's, 10,000,000 Gold\
<[ Back ]/@Main>\

#ACT
give Gold 10000000
KillHorse
break

#IF
checkhorse 3
!CheckRiding

#SAY
Wow, A Fantastic example of a Red Horse!\
Here's, 45,000,000 Gold\
<[ Back ]/@Main>\

#ACT
give Gold 45000000
KillHorse
break

#IF
checkhorse 4
!CheckRiding
#SAY
Wow, A Wonderful Red Horse!\
Here's, 200,000,000 Gold\
<[ Back ]/@Main>\

#ACT
give Gold 200000000
KillHorse
break



#ELSESAY
You need to dismount before selling your Horse\
<[ Back ]/@Main>\

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