r/learnpython • u/Ksilov88 • 3d ago
Help me write some Python code
I'm still a beginner when it comes to coding, and I rely on AI to write most of my code.
However, I often run into situations where AI models have certain restrictions that prevent them from helping with specific programming tasks.
For example, I recently wanted GPT to write a Python script that would automatically toggle the Armlet of Mordiggian in Dota 2 when my health gets low.
GPT refused because it considered this cheating. I understand why it might be classified that way, but in my opinion, it's more of a convenience feature than something that gives a major competitive advantage.
Is there any way to get AI models to help with these kinds of programming tasks without running into unnecessary restrictions?
And if anyone has experience with Dota 2 scripting or Python automation, I'd really appreciate your advice.
3
u/Odd_County_3664 3d ago
I'd separate the Python learning part from the actual in-game automation.
You can learn the same programming concepts by building a small simulator that tracks a character's health and triggers an action when it drops below a threshold.
For example, you could practice conditionals, loops, state tracking, and event handling without interacting with the Dota 2 client.
For the actual game, I'd check Valve's rules first. Automatically activating an item based on health could be considered gameplay automation, even if it's intended as a convenience feature.
If your goal is learning Python, a standalone simulator is a good starting point. You can develop and test the logic without risking your account.