BetterGo icon indicating copy to clipboard operation
BetterGo copied to clipboard

Remove time.sleep(0.01)

Open 2lag opened this issue 2 years ago • 6 comments

Bunny hops are now perfect with this method

2lag avatar Aug 11 '22 22:08 2lag

I included sleep function there it avoid spamming uncecessary memory calls. Also I fell like b-hop is perfect now and never had issues with that. Unfortunately I don't really feel to add you changes to the project, however B1G thanks for contribution.

OpsecGuy avatar Aug 27 '22 22:08 OpsecGuy

When I was testing it, it wasn't perfect, that's why I made the change I did. I don't think it would be too much of a drag on memory since it's almost exactly how the internal runs it except slower overall. Another potential change could be this?

def bunny_hop():
    while True and dpg.get_value('c_bh') and lp.get_current_state() == 5 and ctypes.windll.user32.GetAsyncKeyState(0x20):
        if ent.get_flag(lp.local_player()) in [257, 263] and lp.get_move_type() != 9:
            lp.force_jump(5)
        else:
            lp.force_jump(4)
        time.sleep(0.001)

2lag avatar Aug 27 '22 22:08 2lag

You could just change the 1 sleep statement and mess with it until its as consistent as you like and then just yolo it maybe? Didn't test just wrote it out real quick but it may work 🤷

2lag avatar Aug 27 '22 22:08 2lag

Once I start preparing update v1.5.1 I will test your solution or optimize code in different way.

OpsecGuy avatar Aug 29 '22 00:08 OpsecGuy

Sounds great! Be sure to tag me when that time comes around, I'd love to review and help out if possible! Another potentially better solution that would avoid detection (not difficult since .py is less "relevant" to current VAC than a Cython .exe or injected .dll for example), would be to simulate keypress input instead of using the CS:GO's "force jump" as vac does use keylogging and other methods of sensor input... Either way, I'll be looking forward to it!

2lag avatar Aug 29 '22 01:08 2lag

time.sleep func in bunny_hop Im gonna keep as I didn't occur any problems with it and it's always perfect for me (tested on random community server, local server). However about simulating mouse press I really like that idea and soon it gonna be added when I find some free time.

OpsecGuy avatar Sep 15 '22 05:09 OpsecGuy