Ejemplo n.º 1
0
def stop_multi_levelers():
    # For all players
    for userid in es.getUseridList():
        ggPlayer = Player(userid)

        # Make sure their multiLevels are reset
        ggPlayer.multiLevels = 0

        if userid in currentMultiLevel:
            # Cancel the gamethread
            gamethread.cancelDelayed("%i_multilevel" % userid)

            # Remove bonus effects
            remove_multi_level(userid)

        ggPlayer.multiLevelEntities = []

    # Clear the list of players currently multi-leveling
    currentMultiLevel.clear()
Ejemplo n.º 2
0
def stop_multi_levelers():
    # For all players
    for userid in es.getUseridList():
        ggPlayer = Player(userid)

        # Make sure their multiLevels are reset
        ggPlayer.multiLevels = 0

        if userid in currentMultiLevel:
            # Cancel the gamethread
            gamethread.cancelDelayed("%i_multilevel" % userid)

            # Remove bonus effects
            remove_multi_level(userid)

        ggPlayer.multiLevelEntities = []

    # Clear the list of players currently multi-leveling
    currentMultiLevel.clear()
Ejemplo n.º 3
0
def gg_levelup(event_var):
    # Get event information
    userid = int(event_var['userid'])
    attacker = int(event_var['attacker'])

    # Was it a suicide?
    if userid == attacker:
        return

    # Did the player fall to their death?
    if not attacker:
        return

    # Teamkill?
    if event_var['es_userteam'] == event_var['es_attackerteam']:
        return

    # Increment multi-kills for attacker
    ggPlayer = Player(attacker)
    ggPlayer.multiLevels += 1

    # Is it greater than or equal to our threshold?
    if ggPlayer.multiLevels >= int(gg_multi_level):

        # If they currently have the bonus
        if attacker in currentMultiLevel:

            # Cancel the gamethread
            gamethread.cancelDelayed("%i_multilevel" % attacker)

            # Remove the bonus
            remove_multi_level(attacker)

        # Multi-Level them
        do_multi_level(attacker)

        # Reset their kills
        ggPlayer.multiLevels = 0

        # Remove multilevel in 10
        gamethread.delayedname(10, "%i_multilevel" % attacker,
                               remove_multi_level, attacker)
Ejemplo n.º 4
0
def gg_levelup(event_var):
    # Get event information
    userid = int(event_var['userid'])
    attacker = int(event_var['attacker'])

    # Was it a suicide?
    if userid == attacker:
        return

    # Did the player fall to their death?
    if not attacker:
        return

    # Teamkill?
    if event_var['es_userteam'] == event_var['es_attackerteam']:
        return

    # Increment multi-kills for attacker
    ggPlayer = Player(attacker)
    ggPlayer.multiLevels += 1

    # Is it greater than or equal to our threshold?
    if ggPlayer.multiLevels >= int(gg_multi_level):

        # If they currently have the bonus
        if attacker in currentMultiLevel:

            # Cancel the gamethread
            gamethread.cancelDelayed("%i_multilevel" % attacker)

            # Remove the bonus
            remove_multi_level(attacker)

        # Multi-Level them
        do_multi_level(attacker)

        # Reset their kills
        ggPlayer.multiLevels = 0

        # Remove multilevel in 10
        gamethread.delayedname(10, "%i_multilevel" % attacker,
                               remove_multi_level, attacker)
Ejemplo n.º 5
0
def player_activate(event_var):
    ggPlayer = Player(event_var['userid'])

    # Add the player's multikill attribute
    ggPlayer.multiLevels = 0
    ggPlayer.multiLevelEntities = []
Ejemplo n.º 6
0
def player_activate(event_var):
    ggPlayer = Player(event_var['userid'])

    # Add the player's multikill attribute
    ggPlayer.multiLevels = 0
    ggPlayer.multiLevelEntities = []