Quote:
Originally Posted by Svextra
In this game, there is differentiation between:
"Looting attack": Attack sent using Loot Assistant
"Small attack": All other attacks excluding Loot Assistant
Your bot currently sends "Small attack". If it was possible to change to "Looting attack", the bot would be much less detectable, from a human eye perspective.
Example:
[Only registered and activated users can see links. Click Here To Register...]
Also, there seems to be a problem with how 'game.mv.db' file is generated. Every forced update by changing the date in 'dsx.properties' -> 'lastWorldDataUpdate', causes the 'game.mv.db' to get larger and larger. The file eventually gets too large and causes the following error:
Code:
19:30:59 ERROR Session - API error:
org.json.JSONException: JSONObject["world"] not found.
at org.json.JSONObject.get(JSONObject.java:473)
at org.json.JSONObject.getJSONObject(JSONObject.java:573)
at me.d3luxe.farmbot.Session.heartBeat(Session.java:103)
at me.d3luxe.farmbot.routines.FarmRoutine.run(FarmRoutine.java:88)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
19:30:59 INFO Session - Will relog soonTM...
19:30:59 INFO Delay - Waiting for 15-30 minutes...
19:59:36 INFO Session - Logging in...
19:59:43 ERROR Session - Login error:
19:59:43 ERROR Session - An internal server error occurred. Please try again later, or contact support if the issue persists.
19:59:43 INFO App - Press {Enter} to exit...
Subsequent attempts at restarting the client, also with forced update, results in the following error:
Code:
20:03:42 INFO Update - DSX1337 version 1.5
20:03:42 INFO Update - Running latest version.
20:03:42 INFO Settings - Loaded settings.
20:03:43 INFO Database - Last world data update: 31/07/2000 18:34:32
20:03:43 INFO Database - Parsing world data...
20:03:43 INFO VillageData - Parsing villages...
20:03:46 INFO PlayerData - Parsing player data...
20:03:48 INFO FarmData - Parsing farm data...
20:03:48 INFO FarmData - Depending on farm radius, this can take some minutes.
20:03:52 INFO Session - Logging in...
20:03:58 ERROR Session - Login error:
20:03:58 ERROR Session - An internal server error occurred. Please try again later, or contact support if the issue persists.
20:03:58 INFO App - Press {Enter} to exit...
A fresh install solved this problem.
|
First, thanks for your feedback. But there are a few problems here:
The Farm/Loot attacks are marked by tribal wars because they are sent with loot assistant. Loot assistant has only 2 templates and uses a different request. Also, it is not free.
With dsx, you can in theory define unlimited templates. Also, dsx has to work for users that don't have the loot assistant feature. That's why I don't think it is worth implementing.
The error you are describing is by no means related to the database.
The bot saves/caches world data like player ids, villages, unit info locally in a database. As you correctly noticed, "game.mv.db" is the database file everything is saved in.However, upon each world data update, all old entries are deleted (SQL truncate).
The longer a world runs, the larger the world data will become (probably). So you might notice a small growth in file size.
The exception that happened there is a (tribalwars) API error and probably not influenced by the local bot database.
Quote:
Originally Posted by snezD™
Puh, raffe den bot absolut nicht, gibts kein stepbystep guide? :D
|
Ein umfangreiches Wiki wird wahrscheinlich demnächst hinzugefügt :D
Deutsches Setup Tut ist hier:
[Only registered and activated users can see links. Click Here To Register...]
--------------------------------------------------------------
Update: Version 2.0
Changelog:
- add: apache commons configuration.
- add: group system, by selectors, priority.
- add: new templates, own template parsing.
- add: building/unit stats.
- add: unit training.
- change: new settings, made settings portable.
- fix: now using 100% correct headers.
- fix: app version.
- fix: relogging / api error handling.
- fix: api retries.
- fix: package structure.
So this is the next big update. Thanks to everyone for your patience.
As you can probably judge from the log above, a lot of changes were made.
Lots of bugs are fixed now. DSX is now using completely correct headers for api / browser requests. It should also handle api errors better now.
Settings are finally portable. So if you have a server or machine without graphical user interface, you can now just copy the "dsx.properties" file from your main computer without encryption errors.
With the addition of a dynamic group system you can define village groups that can be used in other templates.
I added a set of selectors for groups, but the only useful one at the moment is "by-unit". You will find a detailed explanation in the "templates/group.xml" file.
As always, you can leave this file as it is if it looks too complicated, it should work for everyone by default.
There are 3 predefined groups:
-"off" for offensive villages.
-"def-inf" for defensive infantry villages.
-"def-horse" for defensive heavy cavalry villages.
DSX is now able to train new units. You are also able to set a resource buffer to leave a certain amount of resources for other tasks like building.
The correct train template is found by group for every village.
If you only have one village, you can use group="default".
By the way: "default" is the only group that is always loaded and matches every village.
You can find the new template file with explanation in "templates/train.xml".
Edit: Like with the building template, you define end result / max value numbers in the train template.
A small warning about the new version: Unfortunately, the tribal wars API behaves very strangely. The new features use the API extensively, but unfortunately each API error requires a relog. So to not make the bot wait 30 seconds after each small API error, I disabled the relog delay.
This means you should not use the tribal wars app on your phone, or you and the bot will kick each other out of the session frequently. Instead, you can use the mobile tribal wars version via the phone's internet browser.
I did not touch the other routines yet, so setting group attributes for building or farming will not work yet (and potentially crash DSX). I have spent so much time in the new update, but could not finish it completely.
I will be on vacation for the next 3 weeks, so no updates until then :S
The new features have been tested, but are not fail-safe.
As always, feel free to leave any feedback or bug reports.