//****************************************************************************
// SPHERE by : Menasoft ©1997-2019
// www.sphereserver.net
// All SPHERE script files and formats are copyright Menasoft & Partners.
// This file may be freely edited for personal use, but may not be distributed
// in whole or in part, in any format without express written permission from
// Menasoft & Partners.  All donations and contributions
// become the property of Menasoft & Partners.
//****************************************************************************
// FILE LAST UPDATED: Sunday, Mar 17, 2019
//
VERSION=0.56d

[SPEECH spk_shopkeep]
ON=*sell*
	SELL

ON=*buy*
	SAY Greetings.  Have a look around.
	BUY


[SPEECH spk_banker]
ON=*bank*
	SRC.BANKSELF

ON=*balance*
ON=*statement*
	IF (<SERV.FeatureTOL> & 02)	//FEATURE_TOL_VIRTUALGOLD
		SAY Thy current bank balance is <eval <SRC.VIRTUALGOLD>/1000000000> platinum and <eval <SRC.VIRTUALGOLD>%1000000000> gold.
	ELSE
		SAY Thy current bank balance is <SRC.BANKBALANCE> gold.
	ENDIF

ON=*check*
	IF !(<DEF0.i_bank_check>) || (<SERV.FeatureTOL> & 02)	//FEATURE_TOL_VIRTUALGOLD
		return 1
	ENDIF
	ARGS=<dSTRSUB <eval <STRPOS 0 check <ARGS>>+6> 0 <ARGS>>
	IF (<ARGS> < 5000)
		SAY We cannot create checks for such a paltry amount of gold!
		return 1
	ELIF (<ARGS> > 1000000)
		SAY Our policies prevent us from creating checks worth that much!
		return 1
	ELIF (<ARGS> > <SRC.GOLD>)
		SAY Ah, art thou trying to fool me? Thou hast not so much gold!
		return 1
	ENDIF
	SRC.GOLD -= <ARGS>
	SERV.NEWITEM i_bank_check
	NEW.MORE=<ARGS>
	NEW.CONT <SRC.FINDLAYER.layer_bankbox>
	SAY Into your bank box I have placed a check in the amount of: <ARGS>

ON=*withdraw*
	ARGS=<dSTRSUB <eval <STRPOS 0 withdraw <ARGS>>+9> 0 <ARGS>>
	IF (<ARGS> <= 0)
		SAY Thou must tell me how much thou wishest to withdraw.
		return 1
	ELIF (<ARGS> > <SERV.ItemsMaxAmount>)
		SAY Thou canst not withdraw so much at one time!
		return 1
	ELIF (<SERV.FeatureTOL> & 02)	//FEATURE_TOL_VIRTUALGOLD
		IF (<ARGS> > <SRC.VIRTUALGOLD>)
			SAY Ah, art thou trying to fool me? Thou hast not so much gold!
			return 1
		ENDIF
		SRC.VIRTUALGOLD -= <ARGS>
	ELSE
		IF (<ARGS> > <SRC.BANKBALANCE>)
			SAY Ah, art thou trying to fool me? Thou hast not so much gold!
			return 1
		ENDIF
		SRC.GOLD -= <ARGS>
	ENDIF
	SRC.NEWGOLD <ARGS>
	SAY Thou hast withdrawn gold from thy account.


[SPEECH spk_animaltrainer]
ON=*stable*
	PETSTABLE

ON=*claim*
ON=*retrieve*
	PETRETRIEVE


[SPEECH spk_bodysculptor]
ON=*buy*
	IF (<SRC.f_isGarg>)
		SRC.SYSMESSAGE Gargoyles cannot use the services of a body sculptor.
		return 1
	ELIF !((<SRC.CLIENTISKR>) || (<SRC.CLIENTISSA>))
		SRC.SYSMESSAGE Your legacy self looks too good to change.
		return 1
	ELIF !((<SRC.f_isHuman>) || (<SRC.f_isElf>)) || (<SRC.FLAGS> & statf_polymorph)
		return 1
	ENDIF
	SDIALOG d_body_sculptor


[SPEECH spk_hairstylist]
ON=*buy*
	IF (<SRC.FLAGS> & statf_dead)
		SRC.SYSMESSAGE You cannot use the services of a hairstylist right now.
		return 1
	ELIF (<SRC.f_isGarg>)
		SRC.SYSMESSAGE A hairstylist cannot style your horns!
		return 1
	ELIF !((<SRC.f_isHuman>) || (<SRC.f_isElf>)) || (<SRC.FLAGS> & statf_polymorph)
		SRC.SYSMESSAGE Your current form does not allow for new styles.
		return 1
	ENDIF
	SDIALOG d_hairstylist

[EOF]
