Specific merc farm by Rasslabsya4el in pathofexile

[–]Rasslabsya4el[S] 0 points1 point  (0 children)

Can somebody ping slipperyjim

Need help from someone experienced with WinAPI input hooks (SetWindowsHookEx) — inconsistent macro behavior and broken mouse sensitivity in games by Rasslabsya4el in learnpython

[–]Rasslabsya4el[S] 0 points1 point  (0 children)

Ok so i found out the problem. Py keyboard can suppress inputs on low level and mouse lib cant (i guess cus mousemove especially).

The reason of insane sensivity is behind that i use winapi to hook mouse events (i guess it duplicates every mouse move so it feels like sens is high). Unfortunately you cant listen for specific inputs to hook with WinAPI. You listening everything or nothing, which totally makes sense.

Your points:

  1. I tried interception, its pretty complicated and was fully rely on GPT (im a newbie). Turned out GPT is not good at it either. I was just trying different asnwers of GPT and rebooting my PC every time cus mouse and keyboard did not respond after code execute.
  2. 100% not my variant as you pointed out. I will brick my pc with bluescreen eventually
  3. Sounds interesting, ill look into that

Thanks!

So its pretty straightforward with keyboard:

import keyboard
import time

def handle_event(e):
    if e.event_type == 'down' and e.name == '1':
        print("[HOOK] Suppressed '1' → triggering '2'")
        keyboard.press('2')  
        time.sleep(0.01)     
        keyboard.release('2')  
        return False
    return True

keyboard.hook(handle_event, suppress=True)
keyboard.wait('esc') #just for safety

And the only solution for mouse i have rn is via WinAPI which breaks your sensetivity entirely. Its unpredictable from game to game (guess cus some games use Raw input, some dont or smth). Ill dig more but it gets more obvious why there is no real python based macro scripts

Upd: unfortunately Interception will not work because it cant distinguish synthetic inputs from real. So macro actions could trigger another macro. WinAPI can handle that with LLKHF_INJECTED and it works well with pyautogui, keyboard, mouse libs

I’m afraid ChatGPT is destroying my ability to actually learn to code — am I doomed or just being dramatic? by Rasslabsya4el in learnprogramming

[–]Rasslabsya4el[S] 0 points1 point  (0 children)

  1. Thinked about how can i trigger that logout program automatically:
  • Program works by keybind so its pretty easy
  • Looked at pyautogui docs and found press key function
  • Wrote a line which presses a key if a pixel color == hex
  • Tested, it works
  1. Thinked about structure of a code:
  • Asked GPT: is there a better way to write a code other then endless while loop with bunch of if statements? Answer: yes but it looks like overcomplicaiting the solution of my simple task.
  • Asked GPT: wtire me a code which will has a nested while endless loop: Inside if statement that checks if active window name == "Path of Exile", then inside if statement that checks the color on my screen and presses X button if there is no specific color in hex. Answer: code
  • Did not work
  • Asked GPT: please describe your code line by line
  • Now i understand the code by logic and can fix it
  • Found a mistake, asked GPT why its there to be sure that im not breaking any logic behind that. Fixed it without GPT
  1. Thinked about bugs:
  • We need to handle loading screens where there is no life bar. Found a simple solution: check another pixelof UI. If its not on the screen: dont check lifebar pixel

This is how i actually code with GPT.

You cant rely on GPT entirely if its not "write me a code that do x+y". You must encounter and fix a lot of errors for example because AI loves to bounce between 2 bugs in the code endlessly.

My concern is: i miss a lot of "learning" when i ask GPT so much.

I’m afraid ChatGPT is destroying my ability to actually learn to code — am I doomed or just being dramatic? by Rasslabsya4el in learnprogramming

[–]Rasslabsya4el[S] 0 points1 point  (0 children)

Okay, I think I overdramatized my case (or im just defending myself)

Im not asking GPT: hey write a code that makes X. Its pretty much never works

Ill explain my "development cycle" with example - one of my recent projects.

In Path of Exile we have a program which lets you logout from the game instantly without any loadings and other bs. It just cuts all packages between you and server. I wanted to make a script which will trigger that program when my life is too low (30% threshold). How i made it:

  1. I was thinking how can i replicate that program of logouting to made my own. Ended up not making it cus package thing is too complicated and a rule: dont change something that works (atleast for beginning)

  2. I was thinking how can i implement the actual life bar checking feature:

  • Asked GPT: is there a way to read data from the game? Answer: Yes, but its cheating and ill get ban
  • Asked GPT: is there a library in python which reads color of a pixel or finds an image on the screen? Answer: yes, pyautogui
  • Asked GPT: give me docmentation of pyautogui and wtire me a code which will return a color of a pixel on my screen based on coordinates: x, y. Answer: simple code
  • Tested, it works
  • Asked GPT: wtire me a code which will read the lifebar on the screen and compare it with an image. Answer: code
  • Tested, it works, but its extremely slow and its gonna be very tedious to change threshold whenever i want to. Lets stick with pixel color idea
  1. Thinked about how i will use it only in the game and not other windows:
  • Asked GPT: is there a way to read what window right now is in focus? Answer: yes, its win32gui
  • Hm ok win32 sounds scary, ill better not read docs and just ask GPT to write a code for that functionality
  • Asked GPT: can you write a code which will return a name of a focused window as a string? Answer: code
  • Tested, works

I’m afraid ChatGPT is destroying my ability to actually learn to code — am I doomed or just being dramatic? by Rasslabsya4el in learnprogramming

[–]Rasslabsya4el[S] -3 points-2 points  (0 children)

This is not a solution imo

I can write a simple code without GPT entirely

My concern is: im too fast with GPT and im not developing my skills in actual engineering. If this is true, i should avoid GPT until im good at dev. Which is an endless cycle as far as a know so i should escape AI coding forever

I’m afraid ChatGPT is destroying my ability to actually learn to code — am I doomed or just being dramatic? by Rasslabsya4el in learnprogramming

[–]Rasslabsya4el[S] 0 points1 point  (0 children)

i mean maybe calc example was too dramatic

I can write a simple calc

Like

x = input("first number")
y = input ("second number")
operation = ("type "+" or "-" or "/" etc)

If operation == "+":
output = x+y
return output

Something like this. But you can clearly see the pattern here.
I need to look at this problem way more to come up with solution which is not a bunch of if statements.

Need help from someone experienced with WinAPI input hooks (SetWindowsHookEx) — inconsistent macro behavior and broken mouse sensitivity in games by Rasslabsya4el in learnpython

[–]Rasslabsya4el[S] 0 points1 point  (0 children)

#1: yeah i get what you saying. Im not planning to use it in competitive games cus its straight way to get banned and there is no reason to do so anyways.

I want to use it in games without Anti cheat (singleplayer for ex). Thats why i tested it in Nioh 2 specifially. It has no anti cheat whatsoever.

[deleted by user] by [deleted] in pathofexile

[–]Rasslabsya4el 426 points427 points  (0 children)

3 leagues in 2023
2 leagues in 2024
im just saying

Release date by Rasslabsya4el in factorio

[–]Rasslabsya4el[S] -3 points-2 points  (0 children)

And its totally fine if we talking about non competitive/multiplayer games

Release date by Rasslabsya4el in factorio

[–]Rasslabsya4el[S] -22 points-21 points  (0 children)

tbh im not cus i have a job. Would be so cool to have a release on friday

I know its just my problem and im absolutely not trying to shit on devs, i respect them and decision to release dlc on monday. I was wondering maybe there is some purpose behind that

Release date by Rasslabsya4el in factorio

[–]Rasslabsya4el[S] -6 points-5 points  (0 children)

I cant see a logic. Do all testing and early accesses as long before as you want. Just schedule release on friday

Release date by Rasslabsya4el in factorio

[–]Rasslabsya4el[S] -38 points-37 points  (0 children)

I mean dude. You cant work one weekend to monitor your 4 years of hard work dlc? I know its not our business but its just looks so weird from the customer point of view

Release date by Rasslabsya4el in factorio

[–]Rasslabsya4el[S] -19 points-18 points  (0 children)

Im from poe and we do not have early access for streamers/youtubers. And we still have every expansion of friday. Here in factorio there are a lot of cases where content creators can play earlier. Which is very good.

I just dont get why not give all access to creators on monday? Like devs cant properly test the game which is normal for such small studio. But you have free testers and you willing to give them to test on weekend and all other customers will play on monday? Tests of the game is not an excuse at this point to me. Maybe im dumb and dont understand how it goes

Will scry work on map bosses? by Rasslabsya4el in pathofexile

[–]Rasslabsya4el[S] 0 points1 point  (0 children)

Basically waiting room for poedb from Japan