Exemplo n.º 1
0
def preRegEffect6(args):
    if len(args) != 20 and len(args) != 16:
        log.log(
            'est_effect_06 <player Filter> <delay> <model> <start position "X Y Z"> <end position "X Y Z"> <framerate> <life> <start width>'
            + " <end width> <fade distance> <amplitude> <R> <G> <B> <A> <speed>"
        )
        log.log("est_effect_06: get: " + " ".join(args))
        return
    if len(args) == 16:
        x, y, z = args[3].split(",")
        x1, y1, z1 = args[4].split(",")
        preRegEffect6(
            [
                args[0],
                args[1],
                args[2],
                x,
                y,
                z,
                x1,
                y1,
                z1,
                args[5],
                args[6],
                args[7],
                args[8],
                args[9],
                args[10],
                args[11],
                args[12],
                args[13],
                args[14],
                args[15],
            ]
        )
        return
    users = str(args[0])
    if users == "#a":
        users = "#all"
    delay = float(args[1])
    model = str(args[2])
    start = (args[3], args[4], args[5])
    end = (args[6], args[7], args[8])
    rate = int(args[9])
    life = float(args[10])
    width = int(args[11])
    ewidth = int(args[12])
    spread = int(args[13])
    ampl = int(args[14])
    red = int(args[15])
    green = int(args[16])
    blue = int(args[17])
    alpha = int(args[18])
    speed = int(args[19])
    if ampl > 60:
        ampl = 60
    spe_effects.beamPoints(
        users, delay, start, end, model, 0, 0, rate, life, width, ewidth, spread, ampl, red, green, blue, alpha, speed
    )
Exemplo n.º 2
0
def bullet_impact(ev):
    userid = int(ev['userid'])
    steamid = getplayerid(userid)
    event_x = ev['x']
    event_y = ev['y']
    event_z = ev['z']
    x,y,z = es.getplayerlocation(userid)
    z += 30
    if steamid != "BOT":
        spe_effects.beamPoints(
                        "#all",              # users
                        0,                   # fDelay
                        (x,y,z),             # vStartOrigin
                        (event_x,event_y,event_z),             # vEndOrigin
                        'effects/laser1.vmt', # szModelPath
                        0,                   # iHaloIndex
                        0,                   # iStartFrame
                        255,                 # iFrameRate
                        0.2,                   # fLife
                        2.5,                   # fWidth
                        2.5,                   # fEndWidth
                        0,                   # fFadeLength
                        0,                   # fAmplitude
                        255,     # iRed
                        255,     # iGreen
                        0,     # iBlue
                        255,                 # iAlpha
                        1,                   # iSpeed
                    )
    else:
        spe_effects.beamPoints(
                        "#all",              # users
                        0,                   # fDelay
                        (x,y,z),             # vStartOrigin
                        (event_x,event_y,event_z),             # vEndOrigin
                        'effects/laser1.vmt', # szModelPath
                        0,                   # iHaloIndex
                        0,                   # iStartFrame
                        255,                 # iFrameRate
                        0.2,                   # fLife
                        2.5,                   # fWidth
                        2.5,                   # fEndWidth
                        0,                   # fFadeLength
                        0,                   # fAmplitude
                        255,     # iRed
                        0,     # iGreen
                        0,     # iBlue
                        125,                 # iAlpha
                        1,                   # iSpeed
                    )
Exemplo n.º 3
0
def bullet_impact(ev):
    userid = int(ev['userid'])
    steamid = getplayerid(userid)
    event_x = ev['x']
    event_y = ev['y']
    event_z = ev['z']
    x, y, z = es.getplayerlocation(userid)
    z += 30
    if steamid != "BOT":
        spe_effects.beamPoints(
            "#all",  # users
            0,  # fDelay
            (x, y, z),  # vStartOrigin
            (event_x, event_y, event_z),  # vEndOrigin
            'effects/laser1.vmt',  # szModelPath
            0,  # iHaloIndex
            0,  # iStartFrame
            255,  # iFrameRate
            0.2,  # fLife
            2.5,  # fWidth
            2.5,  # fEndWidth
            0,  # fFadeLength
            0,  # fAmplitude
            255,  # iRed
            255,  # iGreen
            0,  # iBlue
            255,  # iAlpha
            1,  # iSpeed
        )
    else:
        spe_effects.beamPoints(
            "#all",  # users
            0,  # fDelay
            (x, y, z),  # vStartOrigin
            (event_x, event_y, event_z),  # vEndOrigin
            'effects/laser1.vmt',  # szModelPath
            0,  # iHaloIndex
            0,  # iStartFrame
            255,  # iFrameRate
            0.2,  # fLife
            2.5,  # fWidth
            2.5,  # fEndWidth
            0,  # fFadeLength
            0,  # fAmplitude
            255,  # iRed
            0,  # iGreen
            0,  # iBlue
            125,  # iAlpha
            1,  # iSpeed
        )
Exemplo n.º 4
0
def TRPLoop(userid):
    global hero
    userid = str(userid)
    player = playerlib.getPlayer(userid)
    vC = player.viewVector()
    loc = es.getplayerlocation(userid)
    origin1 = vecmath.Vector(loc[0], loc[1], loc[2] + 50)
    origin2 = vecmath.Vector(getViewCoords(userid))

    if player.team == 2:
        iRed = 255
        iBlue = 0
    else:
        iRed = 0
        iBlue = 255

    spe_effects.beamPoints(
        '#all',  # users
        0,  # fDelay
        origin1,  # vStartOrigin
        origin2,  # vEndOrigin
        'sprites/laser.vmt',  # szModelPath
        0,  # iHaloIndex
        0,  # iStartFrame
        255,  # iFrameRate
        hero['delay'],  # fLife
        12,  # fWidth
        12,  # fEndWidth
        0,  # fFadeLength
        0,  # fAmplitude
        iRed,  # iRed
        0,  # iGreen
        iBlue,  # iBlue
        255,  # iAlpha
        1,  # iSpeed
    )

    gamethread.delayedname(hero['delay'], hero['delay_name'] % (player),
                           TRPLoop, player)
Exemplo n.º 5
0
def regEffect3(args):
    if len(args) != 16:
        log.log(
            'est_effect 3 <player Filter> <delay> <model> (start <X> <Y> <Z>) (end <X> <Y> <Z>) <life> <width> <end width> <Red> <Green> <Blue> <Alpha>'
        )
        log.log('est_effect 3: get: ' + ' '.join(args))
        return
    users = str(args[0])
    if users == '#a': users = '#all'
    delay = float(args[1])
    model = str(args[2])
    start = (args[3], args[4], args[5])
    end = (args[6], args[7], args[8])
    life = float(args[9])
    width = int(args[10])
    ewidth = int(args[11])
    red = int(args[12])
    green = int(args[13])
    blue = int(args[14])
    alpha = int(args[15])
    spe_effects.beamPoints(users, delay, start, end, model, 0, 0, 255, life,
                           width, ewidth, 0, 0, red, green, blue, alpha, 0)
Exemplo n.º 6
0
def TRPLoop(userid):
    global hero
    userid = str(userid)
    player = playerlib.getPlayer(userid)
    vC = player.viewVector()
    loc = es.getplayerlocation(userid)
    origin1 = vecmath.Vector(loc[0], loc[1], loc[2] + 50)
    origin2 = vecmath.Vector(getViewCoords(userid))

    if player.team == 2:
        iRed = 255
        iBlue = 0
    else:
        iRed = 0
        iBlue = 255

    spe_effects.beamPoints(
        '#all',                          # users
        0,                               # fDelay
        origin1,                         # vStartOrigin
        origin2,                         # vEndOrigin
        'sprites/laser.vmt',             # szModelPath
        0,                               # iHaloIndex
        0,                               # iStartFrame
        255,                             # iFrameRate
        hero['delay'],                   # fLife
        12,                              # fWidth
        12,                              # fEndWidth
        0,                               # fFadeLength
        0,                               # fAmplitude
        iRed,                            # iRed
        0,                               # iGreen
        iBlue,                           # iBlue
        255,                             # iAlpha
        1,                               # iSpeed
    )

    gamethread.delayedname(hero['delay'], hero['delay_name'] % (player), TRPLoop, player)
Exemplo n.º 7
0
def preRegEffect6(args):
    if len(args) != 20 and len(args) != 16:
        log.log(
            'est_effect_06 <player Filter> <delay> <model> <start position "X Y Z"> <end position "X Y Z"> <framerate> <life> <start width>'
            +
            ' <end width> <fade distance> <amplitude> <R> <G> <B> <A> <speed>')
        log.log('est_effect_06: get: ' + ' '.join(args))
        return
    if len(args) == 16:
        x, y, z = args[3].split(',')
        x1, y1, z1 = args[4].split(',')
        preRegEffect6([
            args[0], args[1], args[2], x, y, z, x1, y1, z1, args[5], args[6],
            args[7], args[8], args[9], args[10], args[11], args[12], args[13],
            args[14], args[15]
        ])
        return
    users = str(args[0])
    if users == '#a': users = '#all'
    delay = float(args[1])
    model = str(args[2])
    start = (args[3], args[4], args[5])
    end = (args[6], args[7], args[8])
    rate = int(args[9])
    life = float(args[10])
    width = int(args[11])
    ewidth = int(args[12])
    spread = int(args[13])
    ampl = int(args[14])
    red = int(args[15])
    green = int(args[16])
    blue = int(args[17])
    alpha = int(args[18])
    speed = int(args[19])
    if ampl > 60: ampl = 60
    spe_effects.beamPoints(users, delay, start, end, model, 0, 0, rate, life,
                           width, ewidth, spread, ampl, red, green, blue,
                           alpha, speed)
Exemplo n.º 8
0
def regEffect3(args):
    if len(args) != 16:
        log.log(
            "est_effect 3 <player Filter> <delay> <model> (start <X> <Y> <Z>) (end <X> <Y> <Z>) <life> <width> <end width> <Red> <Green> <Blue> <Alpha>"
        )
        log.log("est_effect 3: get: " + " ".join(args))
        return
    users = str(args[0])
    if users == "#a":
        users = "#all"
    delay = float(args[1])
    model = str(args[2])
    start = (args[3], args[4], args[5])
    end = (args[6], args[7], args[8])
    life = float(args[9])
    width = int(args[10])
    ewidth = int(args[11])
    red = int(args[12])
    green = int(args[13])
    blue = int(args[14])
    alpha = int(args[15])
    spe_effects.beamPoints(
        users, delay, start, end, model, 0, 0, 255, life, width, ewidth, 0, 0, red, green, blue, alpha, 0
    )