Can anyone help with python aim assist code?

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üye
Katılım
29 Mar 2021
Mesajlar
5
Tepki puanı
1
Yaş
26
5 HİZMET YILI
this is aim assist code in python but i don't know much about python programming so i would like if you could help me to perfect it
Kod:
import win32gui
import mss
import PIL.ImageGrab
import PIL.Image
from interception import  *
import configparser
#convert valorantsens to paladins (valorantsens / 0.819) * 6.258
#check config
config = configparser.ConfigParser()
config.read("config.ini")
sensitivity = float(config.get("config","sensitivity"))
sensitivity = int((sensitivity / 0.819) * 6.258)
S_HEIGHT = 1920
S_WIDTH = 1080
CENTER_X = 959
CENTER_Y = 539
offset_X = 3
bLeftButton = False
hWnd = win32gui.FindWindow(None,"VALORANT  ")
class Found(Exception):
    pass
def grab(x,y,w,h):
    with mss.mss() as sct:
        box = (x, y, w, h)
        img = sct.grab(box)
        return PIL.Image.frombytes('RGB',img.size,img.bgra,'raw','BGRX')
def approx(r,g,b):
    if(r >= 210 and g >= 110 and b >= 250 and r <= 255 and g <= 150 and b <= 255):
        return True
    else:
        return False
def aimassist():
    c = interception()
    c.set_filter(interception.is_mouse,interception_mouse_state.INTERCEPTION_MOUSE_LEFT_BUTTON_DOWN.value | interception_mouse_state.INTERCEPTION_MOUSE_LEFT_BUTTON_UP.value)
    while True:
        device = c.wait()
        stroke = c.receive(device)
        if(stroke.state == interception_mouse_state.INTERCEPTION_MOUSE_LEFT_BUTTON_DOWN.value):
            bLeftButton = True
        while(bLeftButton):
            img = grab(886,474,1031,608)
            try:
                for x in range(0,(1031-886)):
                    for y in range(0,(608-474)):
                        r,g,b = img.getpixel((x,y))
                        if approx(r,g,b) and x != 0 and y != 0:
                            newX = (886 + x) - CENTER_X # distance between crosshair and ennemy
                            raise Found
            except Found:
                if type(stroke) is mouse_stroke:
                    if(newX >= 50):
                        stroke.x = abs(int(((newX - 5) / sensitivity) * offset_X))
                    elif(newX <= 49):
                        stroke.x = int(((newX + 5) / sensitivity) * offset_X)
                    c.send(device,stroke)
            device2 = c.wait2(0)
            if device2 != 0 and interception.is_mouse(device2):
                stroke2 = c.receive(device2)
                if(stroke2.state == 2):
                    stroke.state = interception_mouse_state.INTERCEPTION_MOUSE_LEFT_BUTTON_UP.value
                    c.send(device,stroke)
                    c.send(device2,stroke2)
                    break
            c.send(device,stroke)
print(f"Offset X: {offset_X}")
aimassist()
 
Moderatörün son düzenlenenleri:
Seçkin Üye
Katılım
20 Mar 2021
Mesajlar
451
Çözümler
4
Tepki puanı
36
Ödüller
3
Yaş
25
5 HİZMET YILI
brother you have to read the manual that comes to you when you install python
 
Rank Demon
Süper Üye
Katılım
22 May 2020
Mesajlar
788
Çözümler
10
Tepki puanı
118
Ödüller
9
6 HİZMET YILI
Sorry I know this is kinda off-topic but isn't interception being flagged down? A couple days ago a mass ban happened because of people who uses interception
 
they want me to add title
Onaylı Üye
Katılım
4 Şub 2017
Mesajlar
124
Çözümler
1
Tepki puanı
7
Ödüller
9
Yaş
27
9 HİZMET YILI
i hope if i knew some python
 
Uzman Üye
Katılım
27 Nis 2018
Mesajlar
216
Çözümler
5
Tepki puanı
16
Ödüller
5
Yaş
32
8 HİZMET YILI
what type of codes is that? python?
 
Onaylı Üye
Katılım
6 Mar 2021
Mesajlar
54
Tepki puanı
8
Ödüller
1
Yaş
29
5 HİZMET YILI
I want to learn some python too hehehehe
 
YOU DİED
Seçkin Üye
Katılım
27 Şub 2019
Mesajlar
303
Çözümler
2
Tepki puanı
10
Ödüller
7
Yaş
26
7 HİZMET YILI
what type of codes is that?
 
no value
Seçkin Üye
Katılım
17 Nis 2020
Mesajlar
576
Çözümler
2
Tepki puanı
42
Ödüller
3
Yaş
24
6 HİZMET YILI
when triggered, does the crosshair snap only to the target?

Python:
if type(stroke) is mouse_stroke:
    if(newX >= 50):
        stroke.x = abs(int(((newX - 5) / sensitivity) * offset_X))
    elif(newX <= 49):
        stroke.x = int(((newX + 5) / sensitivity) * offset_X)
        c.send(device,stroke)
        device2 = c.wait2(0)
if device2 != 0 and interception.is_mouse(device2):
    stroke2 = c.receive(device2)
if(stroke2.state == 2):
    stroke.state = interception_mouse_state.INTERCEPTION_MOUSE_LEFT_BUTTON_UP.value
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üst