Ejemplo n.º 1
0
def clanWarTimer(count, cn):
	if count > 0:
		message(notice('Clan war starts in ' + green(str(count))))
		addTimer(1000, clanWarTimer, (count-1, cn))
	else:
		message(notice('Fight!'))
		setFrozen(False)
		setPaused(False)
Ejemplo n.º 2
0
def clanWarTimer(count, cn):
    if count > 0:
        message(notice('Clan war starts in ' + green(str(count))))
        addTimer(1000, clanWarTimer, (count - 1, cn))
    else:
        message(notice('Fight!'))
        setFrozen(False)
        setPaused(False)
Ejemplo n.º 3
0
def clanWar(cn, args):
	'''@description Start a clan war with current teams
	   @usage map (mode)'''
	sender = player(cn)
	if args == '':
		raise UsageError()
	else:
		args = args.split(' ')
		if len(args) == 1:
			map = args
			mode = currentMode()
		elif len(args) == 2:
			map = args[0]
			try:
				mode = modeNumber(args[1])
			except ValueError:
				raise ArgumentValueError('Invalid game mode')
		persistentTeams(True)
		setMap(map, mode)
		setMasterMode(2)
		setPaused(True, cn)
		setFrozen(True)
		clanWarTimer(10, cn)
Ejemplo n.º 4
0
def clanWar(cn, args):
    '''@description Start a clan war with current teams
	   @usage map (mode)'''
    sender = player(cn)
    if args == '':
        raise UsageError()
    else:
        args = args.split(' ')
        if len(args) == 1:
            map = args
            mode = currentMode()
        elif len(args) == 2:
            map = args[0]
            try:
                mode = modeNumber(args[1])
            except ValueError:
                raise ArgumentValueError('Invalid game mode')
        persistentTeams(True)
        setMap(map, mode)
        setMasterMode(2)
        setPaused(True, cn)
        setFrozen(True)
        clanWarTimer(10, cn)