Skip to content

trigger for cs 2 #1

@dolbaebxone

Description

@dolbaebxone

Excellent trigger for CS 2, fully functional, the only drawback is that sometimes it doesn't work due to problems with the subtik

This trigger also works on the basis of AHK, here is the open source code

#SingleInstance Force
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen

Threshold := 20    ; Допустимая разница в цвете
TriggerKey := "x"  ; Клавиша активации
OffsetX := 2
OffsetY := 2

~x::
    MouseGetPos, mx, my
    PixelGetColor, color1, mx+OffsetX, my+OffsetY, RGB

    r1 := (color1 >> 16) & 0xFF
    g1 := (color1 >> 8) & 0xFF
    b1 := color1 & 0xFF

    While GetKeyState(TriggerKey, "P")
    {
        MouseGetPos, mx, my
        PixelGetColor, color2, mx+OffsetX, my+OffsetY, RGB

        r2 := (color2 >> 16) & 0xFF
        g2 := (color2 >> 8) & 0xFF
        b2 := color2 & 0xFF

        if (Abs(r1-r2) > Threshold || Abs(g1-g2) > Threshold || Abs(b1-b2) > Threshold)
        {
            Click
            Sleep, 10
        }
        Sleep, 1
    }
return

How to install? Open AHK EXE or Untrusted. If Untrusted, convert it to EXE. This didn't work for me in Untrusted. To convert, open Convert .ahk to .exe and select the .untrusted file. Simply run it as administrator. To install, open CS 2 and hold down the X key. If someone walks past (meaning the pixel color changes), it immediately triggers and left-clicks.

WORKS ON VERSION V1

USE AT YOUR OWN RISK

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions