Giter Club home page Giter Club logo

flyff_combat_bot's Introduction

Flyff_Combat_Bot

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.

  1. Download and install Visual C++ redistributable files from Microsoft
  2. Download the bot

image

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

  1. Download and install Visual C++ redistributable files from Microsoft
  2. Download the bot
  3. Create a folder somewhere and unzip all of the contents into that folder
  4. 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
  5. Launch flyff_combat_bot.exe
    • If it closes instantly, it can't find the Chrome window with Flyff Universe running
  6. Select your mode (fight or heal)
  7. Fill out your player name under Setup Players, ommit any titles or guild name.
  8. 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.
  9. The Self Buffs section assumes all they are in the F2 skill bar (second skill bar)
  10. 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.
  11. Set windows res scaling
    • image
  12. The bot was tested on resoltuion 1920 x 1080

image

image

  1. Make sure your chrome window is Top left of the monitor window if it's not full screen.

image

  1. Click start on the bot GUI.

  2. 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

image

image

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.

image

Here's an image that explains which config file sections correlate to which GUI items.

GUI Config Sections

image

Giant Avoiding

Giant avoiding is done by finding the giant on the map. This requires the following map/navigator settings.

image

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.

GUI-LOGGING

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

flyff_combat_bot's People

Contributors

vektorprime avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.