Flyff Combat Bot is a free, advanced, and fully automatic bot for Flyff Universe. I made this to learn C++.
The bot has been tested on Windows 10 and 11 x64.
- Download and install Visual C++ redistributable files from Microsoft
- Download the bot
Demo of the bot in action
flyff_combat_bot.mp4
Features:
- Healer or fighter mode
- Monitor hp/mp/fp and use potions to restore
- Tracks all monsters nearby and prioritizes the ones closest to the player
- Fighter always prioritizes monsters attacking healer, then monsters attacking the fighter, then monsters that are not in combat
- Doesn't trigger captcha
- Restores operation if game disconnects
- Giant avoiding
- Player returns to original position after fighting for a while
Restrictions: Running the bot takes over some mouse and keyboard actions, so you can't run more than one instance per PC.
BASIC HOW TO START
- Download and install Visual C++ redistributable files from Microsoft
- Download the bot
- Create a folder somewhere and unzip all of the contents into that folder
- Launch Flyff Universe in Chrome and keep the window up (don't minimize)
- If you minimize the window the bot won't find it, and the bot will close instantly
- Launch flyff_combat_bot.exe
- If it closes instantly, it can't find the Chrome window with Flyff Universe running
- Select your mode (fight or heal)
- Fill out your player name under Setup Players, ommit any titles or guild name.
- The default settings assume you have a healer with you, uncheck "Enable monitor and defend healer" if you do not. Otherwise, the bot will crash.
- The Self Buffs section assumes all they are in the F2 skill bar (second skill bar)
- You MUST have the "Attack selected target" action set as the #6 skill in the F1 (first) skillbar like below.
- If you don't know where that is, press "o" on your keyboard to open the Motion menu and find it here.
- Set windows res scaling
- The bot was tested on resoltuion 1920 x 1080
- Make sure your chrome window is Top left of the monitor window if it's not full screen.
-
Click start on the bot GUI.
-
You may need to mess with the zoom of the character, I generally zoom out and a little high.
If you ever need to close the bot, you can click stop in the GUI. You can also close the windows console window which runs the bot. I usually just alt F4 on that.
In-game requirements
As noted previously, the Chrome window should be at the top left of your screen. Or optionally, you can have chrome taking up the full window (maximize). The skill bar should be at the bottom of the screen. #1 in the screenshot - The character screen, which shows your character's image, Lvl, HP, etc, should be on the top left. #2 in the screenshot - The map should be at the top right. Use the following in game options
CONFIG
The bot can be configured from both the config file and the GUI. The config file is called flyffcombat.cfg, and it's in the root directory with the bot executable. The GUI always loads from the config file. Changes in the GUI are currently not saved back in the config file.
Here's an image that explains which config file sections correlate to which GUI items.
GUI Config Sections
Giant Avoiding
Giant avoiding is done by finding the giant on the map. This requires the following map/navigator settings.
I had to use the above method because distinguishing giants from normal monsters via memory was difficult.
Pick-up pets
Pick-up pets should be out BEFORE you start the bot.
General tips
Try to fight monsters your level or 1 level below. I usually hide special effects and player names, but this isn't required. Zoom out a bit and face the camera a little higher, it helps when the bot auto-focuses.
Logging
A log file called flyffcombat.log is created automatically on startup. The log is appended to on every run. 2 new lines are added to differentiate the runs "Log file started config loaded" The default logging level is "Error." Error means the bot will stop and crash. Verbose is for troubleshooting certain actions.
Troubleshooting
If you get any strange behavior, please restart Chrome and the bot. Things like character position not returning, or character no longer fighting are cleared with this. The bot is set to crash/close if it cannot set itself up. I do this so that I can detect errors instead of just proceeding. If you want to send me logs, set the log to "verbose" in the GUI. Then, send me the flyffcombat.log file.
If you get an error that the player ID is not found check this:
- inputted the wrong name
- the character is not logged in when you started the bot
- the character screen where the HP/MP/FP bar resides is not open (press T to toggle)
- your character has some very strange name
EVERYTHING BELOW THIS LINE IS TECHNICAL DETAILS FOR ANYONE INTERESTED IN THE SOURCE CODE AND COMPILING
Technical overview of bot: The bot utilizes both image matching, text recognition (OCR), and memory reading to operate.
Compile The Bot
The below information is for anyone who wants to compile the bot and modify it.
- C++ 20
- Visual studio 2022 v143 toolset (others will probably work too)
- OpenCV 4.7 or latest version from VCPKG
- Latest version of Tesseract from VCPKG