Closed makrohard closed 5 years ago
The bot been around a while now, maybe they have put in some measures to detect it.
Hi, I wrote my own foe-bot using JAVA, and i just get ban too. 2 of 5 account where banned (i do multi account), and inno dont want to say why. i think it is because i dont communicate with their websocket. I dont know what informations are trade with this protocol. My bot was running 5min each hour about 2weeks.
I've been banned a time or two, then decided to make improvements to my local version. First of all - UserAgent - make sure it's the same as your current browser. Make sure Flash version is up to date (in the request, that is). 2nd - modify code that does sit in the taverns and aids friends. Currently, it's kinda dumb - it deals with players in the order sorted by player id. There's no way human would do that. So, get a list sorted by player's score and then sequentially go over it, checking each player if we can sit in the tavern and/or aid it. The idea is, basically, if you're aiding a player, check if we can sit down in his tavern as well. The same applies for building pickups and productions. Don't pick them up in the sequence of building ids. That's dumb and can be easily detected as well. And so on and so forth. There could be other things I improved in my local copy in regards to this, but these are main things that need to be addressed. I have code for all that. Also, I added an ability to train troops and fixed existent hidden reward code. Let me know, if you're interested. Cheers!
And of course, random delays have to be inserted pretty much everywhere. You can't blast through aiding/tavern sitting for 90+ players in like 10 seconds, for example.
@Druban, can you share your local version?
@peasodecesar If m3talstorm is willing to incorporate it into the main code
@druban Would have to see it first :) submit a PR and ill have a look, but, I don't play FoE anymore.
I didn't want to create my own branch for this. So here's promised patch. foe.diff.gz
Changes are: troops autotrain hidden reward code (from ruscon) - I simply fixed it so it'd work w/o server returning an error tavern threshold (from ruscon) Improved logic for tavern sitting / aiding players Randomize pickups and productions Some typos were fixed Perhaps some cosmetic changes
Let me know if you have any questions
@m3talstorm If you need help w/ code maintenance, I'm available, since I'm still playing the game
Do we know if there's an updated secret etc now? Also, now there's an HTML5 version of the game, does this allow interaction via the DOM with user scripts now, that Flash did not allow? Sorry for hijacking this issue but as m3talstorm doesn't play I thought this was the best place to ask re: HTML5
i had the new code that by myself, now i try the Websocket keep alive
@druban maybe you'd like to fork the repo and maintain that. would be useful
I had write two new codes. One write by C# and other is Python. all use Websocket keep alive. had runing 5 months not ban. now had one question that if not use Flash in future, and how to take the secret in Html5. thanks
The bot works quite well and does what it's supposed to do. Unfortunately one gets banned fast. I'm not sure what exactly triggers the ban, it might be constant activity. I got banned after about 40 h. Maybe It'll help to implement some more setting that will allow to pause maybe 2 hours every 6 h or so.