Exemple #1
0
def onCommand(socket, command, arguments):
    char = socket.player
    command = command.lower()

    if not char.hasscript('shardscripts.races'):
        char.addscript('shardscripts.races')

    if command == 'pickrace':
        selectBaseRace(char)

    elif command == 'evolverace':
        if char.gettag('race') == 'Human' or char.gettag('race') == 'Elven':
            selectAdvancedRace(char)
        else:
            socket.sysmessage("You're not even a race to begin with!")
            return False

    elif command == 'fixrace':
        char.deltag('race')
        char.update()
        char.resendtooltip()
        socket.sysmessage("Please run 'pickrace to select a race.")

    elif command == 'raceinfo':
        socket.sysmessage("Your current race is: %s" % (char.gettag('race')))

    return True
def onCommand( socket, command, arguments ):
	char = socket.player
	command = command.lower()

	if not char.hasscript( 'shardscripts.races' ):
		char.addscript( 'shardscripts.races' )

	if command == 'pickrace':
		selectBaseRace( char )

	elif command == 'evolverace':
		if char.gettag( 'race' ) == 'Human' or char.gettag( 'race' ) == 'Elven':
			selectAdvancedRace( char )
		else:
			socket.sysmessage( "You're not even a race to begin with!" )
			return False

	elif command == 'fixrace':
		char.deltag( 'race' )
		char.update()
		char.resendtooltip()
		socket.sysmessage( "Please run 'pickrace to select a race." )

	elif command == 'raceinfo':
		socket.sysmessage( "Your current race is: %s" % ( char.gettag( 'race' ) ) )

	return True
Exemple #3
0
def onLogin(char):
    if (not char.hastag('race')) or (not char.gettag('race') in RACE_TABLE):
        selectBaseRace(char)
def onLogin( char ):
	if ( not char.hastag( 'race' ) ) or ( not char.gettag( 'race' ) in RACE_TABLE ):
		selectBaseRace( char )