gofish is a somewhat simple python script to generate responses to commands by sending a keystroke which executes a config file ingame.
!fish- Fishing minigame!
- The launch options below (
-condebug -con_clearlog) tell CS2 to output the console logs to%SteamLibrary%/steamapps/common/Counter-Strike Global Offensive/game/csgo/console.log. main.pyloops that file, through theCONSOLE_FILEvariable in the .env file, and analyzes the latest lines for commands.- When a comand is matched, it can do many things. But, to run commands in the game, it edits the
EXEC_FILE, in the .env file, with the command it wants to run. - The autoexec needs to have a line like
bind "]" "exec selfbot.cfg"with that selfbot.cfg matching the EXEC_FILE variable. This allows the file that was edited to be run from in game with the]key. - Lastly, the python script 'virtually' presses that key (which should be set in the .env file as the EXEC_KEY variable) so that you don't have to do it.
- Add this to your Steam Launch Options for CS2:
+exec autoexec.cfg -condebug -con_clearlog - Add the following to your autoexec.cfg. Or you can add it like I have it in my autoexec.cfg.
bind "[" "say !fish"
bind "]" "exec selfbot.cfg"
log_flags InputService +donotecho // absolutely NEEDED due to CS2 having really fucking annoying limitations and the only way for me to send console commands is with "exec"
log_flags Prediction +donotecho
log_flags "CL CommandQueue" +donotecho
echo "selfbot initialized"
- Python 3.11 (only version I tested)
- Poetry
- Install Python 3.11
- Install Poetry
- Clone the repo into a folder on your computer.
- Run
cd gallsinside of a terminal window. - Run
poetry installinside of a terminal window to install dependencies. - Make a copy of
.env.exampleand name it.env, edit it to contain the correct environment variables needed for the script to work. - Run
poetry run python main.pyinside of the project directory.
- Pandaptable
- DeaFPS for letting me yoink her code and convert it to python... also making the fish database because fishbase is way too big.. ly loser <3