//****************************************************************************
//SPHERE by : Menasoft 1997-2000
//www.sphereserver.com
// 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: Friday, April 28, 2000

[TYPEDEF T_ACCOUNT_CREATE]
ON=@Timer
SERV.ACCOUNT UPDATE
REMOVE
RETURN 1

[WEBPAGE w_login]
WEBPAGESRC=scripts/spherelogin.htm

ON=101
IF (<VAR0.EVENT.ID>)
WEBPAGE spherelogin.htm
RETURN 1
ENDIF

FOR 1 4
IF (<ISEMPTY <ARGTXT[<EVAL <LOCAL._FOR>>]>>)
WEBPAGE spherelogin.htm
RETURN 1
ENDIF
ENDFOR

IF !(0<ISEMPTY <STREAT <ARGTXT[1]>>>) || !(0<ISEMPTY <STREAT <ARGTXT[2]>>>)
WEBPAGE spherelogin.htm
RETURN 1
ENDIF

IF (STRMATCH([0-9]*,<ARGTXT[1]>))
WEBPAGE spherelogin.htm
RETURN 1
ENDIF

FOR 0 <EVAL <SERV.ACCOUNTS>-1>
IF !(STRCMPI(<SERV.ACCOUNT.<LOCAL._FOR>.NAME>,<ARGTXT[1]>)) || !(STRCMPI(<SERV.ACCOUNT.<LOCAL._FOR>.TAG0.EMAIL>,<ARGTXT[3]>))
WEBPAGE jatemaccouemail.htm
RETURN 1
ENDIF
ENDFOR

LOCAL.NEW=<NEW>
UID.command_receiver.NEWITEM=i_gold
NEW.TYPE=T_ACCOUNT_CREATE
NEW.WRITEFILE accounts\sphereacct.scp <VAR.NOTHING> 
NEW.WRITEFILE accounts\sphereacct.scp [<ARGTXT[1]>]
NEW.WRITEFILE accounts\sphereacct.scp PASSWORD=<ARGTXT[2]>
NEW.WRITEFILE accounts\sphereacct.scp TAG.EMAIL=<ARGTXT[3]>
NEW.WRITEFILE accounts\sphereacct.scp TAG.NOME=<ARGTXT[4]>
NEW.WRITEFILE accounts\sphereacct.scp LASTCONNECTDATE=<SERV.RTIME>
SERV.LOG ACCounts Acc <ARGTXT[1]> foi criada pelo e-mail <ARGTXT[3]> com a senha <ARGTXT[2]>
NEW.WRITEFILE C:\sphere\logsespeciais\accountscreated.doc <SERV.RTIME> :: @ACCounts Acc <ARGTXT[1]> foi criada pelo e-mail <ARGTXT[3]> com a senha <ARGTXT[2]>
IF (<SERV.CLIENT.0.UID>)
NEW.ATTR |= attr_invis
NEW.REMOVEFROMVIEW
NEW.P <SERV.CLIENT.0.P>
NEW.REMOVEFROMVIEW
NEW.TIMERD=1
ELSE
NEW.REMOVE
SERV.SAVE 1
ENDIF
NEW=<LOCAL.NEW>
WEBPAGE sphereloginok.htm

[WEBPAGE w_account]
WEBPAGESRC=scripts/sphereaccount.htm
PLEVEL=1

[WEBPAGE w_config]
WEBPAGESRC=scripts/sphereconfig.htm
PLEVEL=5

[WEBPAGE w_configgame]
WEBPAGESRC=scripts/sphereconfiggame.htm
PLEVEL=5

ON=1
	if ! <src.account>
		webpage spherelogfail.htm
		return 1
	endif
	if <src.account.plevel> < 5
		webpage sphereaccount.htm
		return 1
	endif
	serv.MAXCHARSPERACCOUNT=<ARGTXT1> //T1MAXCHARSPERACCOUNT
	serv.CLIENTLINGER=<ARGTXT2> //T2CLIENTLINGER
	serv.MINCHARDELETETIME=<ARGTXT3> //T3MINCHARDELETETIME
	serv.DECAYTIMER=<ARGTXT4> //T4DECAYTIMER
	serv.CORPSEPLAYERDECAY=<ARGTXT5> //T5CORPSEPLAYERDECAY
	serv.CORPSENPCDECAY=<ARGTXT6> //T6CORPSENPCDECAY
	serv.ARRIVEDEPARTMSG=<ARGCHK1> //C1ARRIVEDEPARTMSG
	serv.GAMEMINUTELENGTH=<ARGTXT7> //T7GAMEMINUTELENGTH
	serv.NOWEATHER=<ARGCHK2> //C2NOWEATHER
	serv.FLIPDROPPEDITEMS=<ARGCHK3> //C3FLIPDROPPEDITEMS
	serv.PLAYERNEUTRAL=<ARGTXT9> //T9PLAYERNEUTRAL
	serv.HITPOINTPERCENTONREZ=<ARGTXT10> //T10HITPOINTPERCENTONREZ
	serv.BANKMAXITEMS=<ARGTXT11> //T11BANKMAXITEMS
	serv.BANKMAXWEIGHT=<ARGTXT12> //T12BANKMAXWEIGHT
	serv.REAGENTSREQUIRED=<ARGCHK4> //C4REAGENTSREQUIRED
	serv.REAGENTLOSSFAIL=<ARGCHK5> //C5REAGENTLOSSFAIL
	serv.EQUIPPEDCAST=<ARGCHK6> //C6EQUIPPEDCAST
	serv.WOPPLAYER=<ARGCHK7> //C7WOPPLAYER
	serv.WOPSTAFF=<ARGCHK8> //C8WOPSTAFF
	serv.LIGHTNIGHT=<ARGTXT13> //T13LIGHTNIGHT
	serv.DUNGEONLIGHT=<ARGTXT14> //T14DUNGEONLIGHT
	serv.MONSTERFIGHT=<ARGCHK9> //C9MONSTERFIGHT
	serv.MONSTERFEAR=<ARGCHK10> //C10MONSTERFEAR
	serv.MURDERMINCOUNT=<ARGTXT15> //T15MURDERMINCOUNT
	serv.MURDERDECAYTIME=<ARGTXT16> //T16MURDERDECAYTIME
	serv.CRIMINALTIMER=<ARGTXT17> //T17CRIMINALTIMER
	serv.SNOOPCRIMINAL=<ARGTXT18> //T18SNOOPCRIMINAL
	serv.GUARDSINSTANTKILL=<ARGCHK11> //C11GUARDSINSTANTKILL
	serv.GUARDLINGER=<ARGTXT19> //T19GUARDLINGER
	serv.LOOTINGISACRIME=<ARGCHK12> //C12LOOTINGISACRIME
	serv.CHARTAGS=<ARGCHK13> //C13CHARTAGS
	serv.NPCTRAINMAX=<ARGTXT20> //T20NPCTRAINMAX
	serv.NPCTRAINPERCENT=<ARGTXT21> //T21NPCTRAINPERCENT
	serv.VENDORMAXSELL=<ARGTXT22> //T22VENDORMAXSELL
	serv.MAXCOMPLEXITY=<ARGTXT23> //T23MAXCOMPLEXITY
	serv.MAGICUNLOCKDOOR=<ARGTXT24> //T24MAGICUNLOCKDOOR
	webpage sphereconfig.htm
	serv.saveini
	return 1

[WEBPAGE w_configserv]
WEBPAGESRC=scripts/sphereconfigserv.htm
PLEVEL=5

ON=1
	if ! <src.account.>
		webpage spherelogfail.htm
		return 1
	endif
	if <src.account.plevel> < 5
		webpage sphereaccount.htm
		return 1
	endif
	serv.SERVNAME=<ARGTXT1>		// T1SERVNAME
	serv.ADMINEMAIL=<ARGTXT2>	// T2ADMINEMAIL
	serv.URL=<ARGTXT3>			// T3URL
	serv.REGISTERSERVER=<ARGCHK1> // C1REGISTERSERVER
	serv.REGPASS=<ARGTXT4>	// T4REGPASS
	serv.SERVIP=<ARGTXT5>	// T5SERVIP
	serv.SERVPORT=<ARGTXT6> // T6SERVPORT
	serv.NTSERVICE=<ARGCHK2> // C2NTSERVICE
	serv.MULFILES=<ARGTXT7> // T7MULFILES
	serv.SCPFILES=<ARGTXT8> // T8SCPFILES
	serv.WORLDSAVE=<ARGTXT9> // T9WORLDSAVE
	serv.ACCTFILES=<ARGTXT10> // T10ACCTFILES
	serv.LOG=<ARGTXT11> // T11LOG
	serv.VERBOSE=<ARGCHK3> // C3VERBOSE
	serv.TIMEZONE=<ARGTXT12> // T12TIMEZONE
	serv.ACCAPP=<ARGTXT13> // T13ACCAPP
	serv.SECURE=<ARGCHK4> // C4SECURE
	serv.HEARALL=<ARGCHK5> // C5HEARALL
	serv.SAVEPERIOD=<ARGTXT14> // T14SAVEPERIOD
	serv.GUESTSMAX=<ARGTXT15> // T15GUESTSMAX
	serv.CLIENTMAX=<ARGTXT16> // T16CLIENTMAX
	serv.LANG=<ARGTXT17> // T17LANG
	webpage sphereconfig.htm
	serv.saveini
	return 1

[WEBPAGE w_join]
WEBPAGESRC=scripts/spherejoin.htm

ON=0
SERV.LOG oi

ON=1
SERV.LOG oi

ON=2
SERV.LOG oi

[WEBPAGE w_401]
// auth required
WEBPAGESRC=scripts/spherelogin.htm

[WEBPAGE w_403]
// forbidden
WEBPAGESRC=scripts/spherelogin.htm

[WEBPAGE w_404]
// not found
WEBPAGESRC=scripts/sphere404.htm

[EOF]