Farm Manager - Tribal Wars 2 Farmbot (old version from 2018)

Now I am somewhat confused about the order of errors. Is the error you posted above the same one you still see when you try it again?
Are you using Windows 10?
Does the error change when you delete all other directories and files in the directory in which the BotEngine.exe is located?

The error I posted is the only error I get now. The original error was when the bot worked for me once. Doesn’t work anymore.

Sorry, so far I have no idea how I could produce the error with the TaskCanceledException.

I got it to work thank you !!!

Does this require some type of payment or donation?

Is there a way to have the bot just continually farm instead of shutting down after one cycle?

Thanks again,
Bigley

1 Like

HI Bot works fine on my PC…
Runs only once.
But pls link me to how to run it again dont see any icon on desktop or in chrome.
…using to start .exe which is not correct i suppose.
when i run chromium from winbar missing apikey…
thank u.

Yes, after you use the bot for two hours, payment is required. It costs 4.3 € for 300 hours of bot operation. For details about the payment, see the guide at Purchasing and Using BotLab Credits - Frequently Asked Questions (FAQ)

Yes, now there is a way: I created a version which continues farming. To use this version, load the bot from the following link: bots/implement/applications/tribal-wars-2/tribal-wars-2-farmbot.cs at dec8eaeb5e2b94a03f52028a907434a335019f7a · Viir/bots · GitHub

When you run this version, you will also see this message from the bot to confirm that it will repeat farming cycles:

16-03-33.565: According to the configuration, I will repeat farming in 99 cycles. Between the farming cycles, I will take breaks with lengths between 60 and 80 minutes.

Remember: This version will need payment to work.

no meu a página da web azul fecha sozinha, como faço para resolver ?

Hi @Viir

  1. How do I prevent attacks that have less troops than my original attack? I ended up having some attacks with 1 unit going out that will end up dying.

  2. How do I increase the limit of reports that bot goes through, it seems a bit random? I have 7000+ reports but bot only goes through around 100-200.

  3. If I increase the cycle number, would it just keep sending the same reports over and over again instead of going deeper into old reports. I end up having some villages without attacks being sent, despite having reports for those present.

Thank in advance

Welcome Bob!
Thank you for the feedback. It’s been a few months since I worked on Tribal Wars 2, so I will need to refresh my memory here.

I guess this happens if fewer troops are remaining in the sending village. As far as I remember, the bot does not check how many there are left, before sending.
I think fixing this will need a change in the bot code.

Maybe the problem you listed under 2. and 3. can be solved by using another method to locate barbarian villages?
After implementing this bot, we discovered a bug in the Tribal Wars 2 client which breaks the display of battle reports:

What options do you see in the game to get the locations of barbarian villages on the screen?
Besides the map view, do you have a way to display nearby villages in a list?

Thank you for your answer,

the only option to see a list of barbarians is by clicking on the province icon
Provice list image

That looks good. In the screenshot I see a list of villages, each with coordinates and what looks like buttons to perform some action specific to those. This view seems not only to include barbarian villages, so we will need some way of distinguishing between barbarian and others.

How did you get to this list?

Seeing this screenshot, I remembered more details about the game:
As far as I remember, there was some way to open the village context menu for given coordinates. If this (still) exists we could even scan all coordinates around your villages to search for barbarians. We could enumerate all possible coordinates in a given radius from your villages, ordered by distance, and try to open the village menu for these.

Then we would not need the reports anymore to learn the coordinates of villages. Then the bugs in the report list UI would not anymore limit the bot.

If we can find a way to open the list seen in the screenshot, we could speed up this scanning process by filtering out some of the coordinates earlier.

About distinguishing between barbarians and other:
The formular to send an army might look different if there is a player owning the destination village.

Good morning.
During the installation I followed all the steps and I still have a mistake - see the attachment.
Please give advice on how to fix it.
Thank you peki1808fail

Hello. Is it possible to set 50 clicks per village, more than 50 attacks from one village cannot be sent, and repeat after one hour?
Am I able to edit myself? Thank you peki1808

Yes, this can be done by editing the bot code.

Yes, you can edit the bot code file using a text editor and then load this modified version using the button Load Bot From Local File

open

Hello. Already the next day there was a mistake in the program at night. He ran normally during the day. I enclose an error listing in the attachment. Please give advice where the problem is. Thank you
peki1808

v Submission#0.<>d__0.MoveNext()
— Konec trasování zásobníku z předchozího místa, ze kterého byla vyvolána výjimka —
v System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
v System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
v Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.d__91.MoveNext() --- Konec trasování zásobníku z předchozího místa, ze kterého byla vyvolána výjimka --- v System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() v System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) v Microsoft.CodeAnalysis.Scripting.Script1.d__21.MoveNext()
— Konec trasování zásobníku pro vnitřní výjimku —
v System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) v BotSharp.ScriptRun.ScriptRun.<>c__DisplayClass75_1.<Start>b__3() v System.Threading.Tasks.Task1.InnerInvoke()
v System.Threading.Tasks.Task.Execute()
—> (Inner Exception #0) System.NotImplementedException: Did not find button to switch to battle reports.
v Submission#0.<>d__0.MoveNext()
— Konec trasování zásobníku z předchozího místa, ze kterého byla vyvolána výjimka —
v System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
v System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
v Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.d__91.MoveNext() --- Konec trasování zásobníku z předchozího místa, ze kterého byla vyvolána výjimka --- v System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() v System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) v Microsoft.CodeAnalysis.Scripting.Script1.d__21.MoveNext()<—
<—

00-25-34.736: status transition from Running to Failed.

Most Recent Bot Operation Sessions

2019-11-12 05:32:19 UTC - session e26a4865c7f96cb0 using bot 0040E8762ADCB304E2FB4B6FE3878005AE480FD5

Status: , Duration: 136 minutes

2019-11-11 20:33:17 UTC - session c3b9759fbea4f59c using bot 0040E8762ADCB304E2FB4B6FE3878005AE480FD5

Status: Failed :x:, Duration: 172 minutes

2019-11-11 14:13:14 UTC - session 09b15da2c119307e using bot 0040E8762ADCB304E2FB4B6FE3878005AE480FD5

Status: Failed :x:, Duration: 215 minutes

Haloo. I’ve already figured out a problem. The robot stops after midnight to retrieve the report and at the same time starts the daily reward for the raw materials. it stops the robot and writes an error.

10-43-59.957: Bot operation started in session 4fd4c8acf0f3262b.
10-44-00.133: Welcome! - ¡Bienvenido! - Bienvenue! ---- This is the Tribal Wars 2 Farmbot. I read your battle reports and send troops to your farms again. To learn more about how I work, see /forum.botengine/t/farm-manager-tribal-wars-2-farmbot/1406. In case you have any questions, feel free to ask at ://forum.botengine
10-44-00.133: According to the configuration, I will repeat farming in 1 cycles. Between the farming cycles, I will take breaks with lengths between 60 and 80 minutes.
10-44-00.134: RuntimeException: System.AggregateException: One or more errors occurred. —> System.AggregateException: One or more errors occurred. —> System.AggregateException: One or more errors occurred. —> System.UnauthorizedAccessException: Access to the path ‘C:\WINDOWS\system32.local-chromium’ is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
at PuppeteerSharp.BrowserFetcher.d__22.MoveNext()
— End of inner exception stack trace —
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait(CancellationToken cancellationToken)
at BotOperationApp.Windows.Exe.ScriptRunClient.OpenNewBrowserPage()
at BotOperationApp.Windows.Exe.ScriptRunClient.<get_ToScriptGlobals>b__15_0()
at BotOperationApp.Windows.Exe.WebBrowser.OpenNewBrowserPage()
at Submission#0.<>d__0.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.d__91.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.CodeAnalysis.Scripting.Script1.d__21.MoveNext()
— End of inner exception stack trace —
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at BotSharp.ScriptRun.ScriptRun.<>c__DisplayClass75_1.<Start>b__3() at System.Threading.Tasks.Task1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
— End of inner exception stack trace —
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at BotSharp.ScriptRun.ScriptRun.<>c__DisplayClass75_0.b__4()
—> (Inner Exception #0) System.AggregateException: One or more errors occurred. —> System.AggregateException: One or more errors occurred. —> System.UnauthorizedAccessException: Access to the path ‘C:\WINDOWS\system32.local-chromium’ is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
at PuppeteerSharp.BrowserFetcher.d__22.MoveNext()

— End of inner exception stack trace —
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait(CancellationToken cancellationToken)
at BotOperationApp.Windows.Exe.ScriptRunClient.OpenNewBrowserPage()
at BotOperationApp.Windows.Exe.ScriptRunClient.<get_ToScriptGlobals>b__15_0()
at BotOperationApp.Windows.Exe.WebBrowser.OpenNewBrowserPage()
at Submission#0.<>d__0.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.d__91.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.CodeAnalysis.Scripting.Script1.d__21.MoveNext()
— End of inner exception stack trace —
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at BotSharp.ScriptRun.ScriptRun.<>c__DisplayClass75_1.<Start>b__3() at System.Threading.Tasks.Task1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
—> (Inner Exception #0) System.AggregateException: One or more errors occurred. —> System.UnauthorizedAccessException: Access to the path ‘C:\WINDOWS\system32.local-chromium’ is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
at PuppeteerSharp.BrowserFetcher.d__22.MoveNext()
— End of inner exception stack trace —
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait(CancellationToken cancellationToken)
at BotOperationApp.Windows.Exe.ScriptRunClient.OpenNewBrowserPage()
at BotOperationApp.Windows.Exe.ScriptRunClient.<get_ToScriptGlobals>b__15_0()
at BotOperationApp.Windows.Exe.WebBrowser.OpenNewBrowserPage()
at Submission#0.<>d__0.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.d__91.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.CodeAnalysis.Scripting.Script1.d__21.MoveNext()
—> (Inner Exception #0) System.UnauthorizedAccessException: Access to the path ‘C:\WINDOWS\system32.local-chromium’ is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
at PuppeteerSharp.BrowserFetcher.d__22.MoveNext()<—
<—
<—

10-44-00.134: status transition from None to Failed.
@Viir can you please help me out? First run was perfect but at the second one all this things showed up please tell me what should i do