[Release] ivanJo Forge Of Empires BOT

11/16/2012 23:28 ivanJo#1
This bot is work in progress and you may encounter bugs, so please post them and I’ll be glad to assist and improve it.
Should any new idea get on your mind, do not hesitate to write it to me, so we build this useful tool together.

Latest version: v1.0.13.33000 (13.04.2014)


Donate:
You’re always welcome to donate. There’s nice Donate button in the lower left corner of the application.


Download information (self extracting RAR file):
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]

Requirements:
Make sure you have at least [Only registered and activated users can see links. Click Here To Register...] installed.
Awesomium 1.7.3 (included in the distribution)
Adobe Flash 11.7 or better For Other Browsers from this link: [Only registered and activated users can see links. Click Here To Register...]

Latest Additions:
  • Collects Easter eggs.

Features:
  • Compatible with latest FoE 1.20 version but no guild wars.
  • Click to collect gold.
  • Click on supplies.
  • Click on production buildings.
  • Click on military buildings.
  • Spend Forge Points on already started research by the user.
  • Collects gold-box items.
  • Polish/Motivate friends/guild/neighbours in automatic fashion.
  • Auto adjust vertical click distance. (special thanks to UtharNL)
  • Added support for browser's UserAgent. Now you can match your real browser engine to BOT so it's more difficult to get banned.
  • Auto-zoom in.
  • Multilanguage support (English, Italian, Polish). Help needed to translate to your own language...
  • No Blue screens, freezes, slowdowns etc.
  • Auto-login and continue after something unusual happen: popup window remained, blue screen detected,internet connection is down - ALWAYS running.
  • Auto refresh every X minutes. If you still have memory/crash problems THIS is THE SOLUTION.
  • Default Forge of Empires server selection.
  • Pause countdown when user activity is detected.
  • Optimized memory usage and no more memory leaks.
  • CPU usage by bot is almost 0 even in full screen mode.
  • Main window and message log window position and size is remembered, so next time you open it they revert to auto-saved state.
  • Fast scanning for supplies and production
  • Ultra-fast picture redraw
  • When popup remains after supply/goods window, 2 images are created 'suppliesWindow.png' and 'goodsWindow.png'. Send me those for review and eventual bugfix.
  • Added polish/motivate friends, guild members and neighbours.

How to:
Extract "ivanJo FoE Bot vX.X.exe" in a folder.
Launch the bot and wait for FoE main page.
Enter your username and password to log-in. Once logged in, you can press the “Start bot” button


Application settings:


1. Once every X minutes the bot scans for clickable (ready to collect) items, verifies production etc.

2. If option #4 is enabled, the bot scans for building ready to start production after X seconds (those with the 'moon' over) and starts the selected production type in option #9. It’s also able to click on goods production buildings selected by option #10. If enabled option #5 military items will be included in selection.

4. If enabled, bot will be scanning for production (the ‘moons’)

5. If enabled, bot will select automatically, when military window is presented, eventual item to build (if the unit is dead)

6. If enabled, plunged objects (those with the ‘lightning’) will be clicked.

7. If enabled, after each scanning a PNG ‘scanresults.png’ file will be created in execution directory for troubleshooting purposes. It will also include a down pointed arrow to the coordinates where it will click.

8. If enabled, the ‘Message log’ window will appear upon bot start

9. The supply production type that will be selected.

10. The goods production type that will be selected.

11 & 12. When bot enters ‘Bot view mode’ the screen resizes so all buildings can fit in for scanning. If you have performance issues during scanning/clicking/selecting you can try to lower those.
Default values are 4000 and 2000 respectively.

13, 14 & 15. If the bot clicks too low or too high on the Y-Axis (see scan results pictures) you can edit those. The center of the coordinate system is in the upper left corner. Open 'collectdistance.png' and 'supplystartdistance.png' from the bot folder to see.
#14 is used to move click position on the X-axis.

For both 13. and 15. options are:
Allowed values: 50 - 250;
Recommended values:
120 (default)
160 (for tall buildings like the ones in late middle age)

For 14. options are:
Allowed value: -100 - 100;
Recommended value:
0 (default)

Stealth options:
One of the biggest problems for botters are getting banned. I’ve tried to resolve this issue with 3 parameters:
16. At max, it will click no more than X items in each pass.

17. Bot scans regularly every X minutes for items being ready to collect. With this value in % we can modify this fixed period. For example, if we put 10 here and we have every 5 min check (300 seconds), this will result in value being randomly selected from range: 270 – 330 seconds (10% of 300 is 30!) for the next scan.

18. For items found during the scan we choose not to collect at max X percent. Example: if we found 10 items to collect and we set this value on 30%, so at max 3 items will not be clicked. Randomizer will choose from 0 to 3 items not to click on out of 10.

19. Let's you can change default FoE site language.

20. To overcome unexpected problem like "Game window not recognized" due to Internet connection problems or popup remained etc, you can set after how many rounds of game window not recognized it performs autologin. This way you go back to the game without loosing your goodies :)

21. Still having memory problems or experience application crash? This will keep your awesomium process tidy and small. Autorefreshing on every X minutes performs autologin so the BOT works 24/7.

22. Ever happened that in the middle of the battle bot starts? With this setting you can pause BOT timer for X seconds whenever you click on the game window.

Screenshots:


Have a nice game!!!

**Edit by Jarit
11/17/2012 02:01 foaato#2
thank you, I'll test it now!
11/17/2012 09:42 fasz joska#3
I tested 24hrs. Its work perfectly, collect everything. Great job! Thank you very much.
11/17/2012 11:19 Utharnl#4
Any chance on releasing the source code or that you stop obfuscating the bot?
I would like to add my own implementations.

~Uthar
11/17/2012 14:56 foaato#5
It work correctly in my system. Some problem about memory leak (awesomium_process) had been resolved when I press "Reload" button.

Once more, thank you for your program.
Sorry about my poor english!
11/17/2012 16:31 M4s5iv3#6
Very nice Job! THANKS
11/17/2012 22:52 ivanJo#7
Quote:
Originally Posted by Utharnl View Post
Any chance on releasing the source code or that you stop obfuscating the bot?
I would like to add my own implementations.

~Uthar
Hi,
at the moment I won't be releasing source code and I'll keep it obfuscated until I decide what to do. You can always start with andy's (ForgeBot) version - it's a good start.

If you need some solution to a particular problem you find in the other BOT, PM me and maybe I'll send you the source.

Quote:
Originally Posted by Utharnl View Post
Any chance on releasing the source code or that you stop obfuscating the bot?
I would like to add my own implementations.

~Uthar
Hi,
at the moment I won't be releasing source code and I'll keep it obfuscated until I decide what to do. You can always start with andy's (ForgeBot) version - it's a good start.

If you need some solution to a particular problem you find in the other BOT, PM me and maybe I'll send You the source.
11/18/2012 13:18 oziris1978#8
Collecting on distilary production does not work.. settings collect distance 190, supplay distance 150..
This settings work on andypockets..

But if i start production on destilary with this settings then production starts..
11/18/2012 13:45 ivanJo#9
Quote:
Originally Posted by oziris1978 View Post
Collecting on distilary production does not work.. settings collect distance 190, supplay distance 150..
This settings work on andypockets..

But if i start production on destilary with this settings then production starts..
That's exactly why you can modify them as fits you best. every age has different settings, and I think I saw somewhere in the forum a post discussing it.

thanks for the tryout.. any ideas on what to put next?
11/18/2012 17:47 foaato#10
Quote:
Originally Posted by ivanJo View Post
..........
13, 14 & 15. If the bot clicks too low or too high on the Y-Axis (see scan results pictures) you can edit those. The center of the coordinate system is in the upper left corner. Open 'collectdistance.png' and 'supplystartdistance.png' from the bot folder to see.
#14 is used to move click position on the X-axis.

............

Have a nice game!!!
I can't found it, can you upload it for me :D
11/18/2012 20:03 ivanJo#11
Quote:
Originally Posted by foaato View Post
I can't found it, can you upload it for me :D
On settings page check "Save scan results to file" and click "Save". Next time when BOT scans a page those 2 files will be saved automatically.
11/20/2012 02:06 kinqme#12
Hello ivanjo,

thanks for the bot, i tested it 24/7, this is my third day now, and it works almost perfect.

If you use the bot the first hour, there is no perfomance Problem, but after an hour or two, the bot gets a Little Performance Problem.

If you click sell or move, the mouse Cursor dont Change.

if i'm zoomed out, the bot doesnt work. (maybe automatic zoom-in Feature?)

if i'm on the map or in the Research page, and the bot is on (sometimes i forgot to turn the timer off), the bot crashes.

for the design: maybe you could make the bar smaller, cause the Buttons would fit in only one column

dont missunderstand me, the bot is reaaally good, and those are only very very very very Little critic points

sorry for my bad english
11/20/2012 16:37 ivanJo#13
Hi people,
I'm testing a version of bot that should not present any memory leaks nor blue screens.
hoping to bring you good news very soon.

Ah, one more thing, it's not fast, it's lightning fast and use of system resources is minimal (awesomium is still memory hungry but not as before ;) )

CPU consumption of executable is practically always around 0% - only awesomium_process is taking some.

Thanks for your suggestions...

2 Kingme
as you might have seen, I'm testing a very fast version of my bot. you will not experience anymore slowing down after some time, unless it's the problem with the framework I use (awesomium).

Said that, I've managed to reproduce your error when you're on the map - I assume that you see just brown wood-patched page? if that's true, the problem is that FoE does not recognize that resolution have changed back to original. What you need to do is click several times on "Change View" button until your page comes back.

I like your 'automatic zoom in' feature - I will definitely make this!

I'll try to fix other things you've spotted!!

thank you very much for writing to me.

Quote:
Originally Posted by kinqme View Post
Hello ivanjo,

thanks for the bot, i tested it 24/7, this is my third day now, and it works almost perfect.

If you use the bot the first hour, there is no perfomance Problem, but after an hour or two, the bot gets a Little Performance Problem.

If you click sell or move, the mouse Cursor dont Change.

if i'm zoomed out, the bot doesnt work. (maybe automatic zoom-in Feature?)

if i'm on the map or in the Research page, and the bot is on (sometimes i forgot to turn the timer off), the bot crashes.

for the design: maybe you could make the bar smaller, cause the Buttons would fit in only one column

dont missunderstand me, the bot is reaaally good, and those are only very very very very Little critic points

sorry for my bad english
11/20/2012 22:50 oziris1978#14
problems. Sometimes clikcing and restarting productions works OK with all buildings. But sometimes it starts missing some which were clicked and restarted before.

Also... Dead millitary units does not work..Gives error (look down) and then it crashes with blue screen.

[22:34:11] Selected production item #1
[22:34:13] Looks like military building...
[22:34:20] Error: Popup true after click. Maybe not enough supplies. Goods selection!

I must say that restart goods works lperfect. Andys does not.

For blue screen problems I would implemet refresh every 30-60 minutes.
I dont know why but yours and andys crash with blue screen when i turn off my monitor. Also there are some random crashes with blue screens but stability is the same as andys..
11/21/2012 13:45 kinqme#15
Good News ;)
the bot exe isn't consuming anything, only awesomium is eating the memory and the cpu.

Change View helped. thanks :)

Another Little Thing, if the mouse is on move or sell, the bot rearranges my City :D

i must definetively stop playing while the bot is running :D

im thinking for an addon like = if user is clicking, the bot pauses for some seconds

awesomium is awesome, im farming now Gold and the other Thing and im making with only the oldest houses in the Stone Age ( 60 houses ) 5000 Gold an hour :D