Skip to content

Commit 680a7a6

Browse files
committed
fix bot click too fast when sell item on auction
1 parent 349b79b commit 680a7a6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

TbsCore/Tasks/LowLevel/SellOnAuctions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ namespace TbsCore.Tasks.LowLevel
1111
{
1212
public class SellOnAuctions : BotTask
1313
{
14+
private readonly Random rand = new Random();
15+
1416
public override async Task<TaskRes> Execute(Account acc)
17+
1518
{
1619
if (acc.AccInfo.ServerVersion == ServerVersionEnum.TTwars) return TaskRes.Executed;
1720
if (!acc.Wb.CurrentUrl.Contains("auction?action=sell"))
@@ -87,7 +90,7 @@ public override async Task<TaskRes> Execute(Account acc)
8790
var element = acc.Wb.Driver.FindElement(By.XPath(nodeItemXPath.XPath));
8891
if (element == null) continue;
8992
element.Click();
90-
await Task.Delay(600);
93+
await Task.Delay(rand.Next(1500, 2500));
9194

9295
int counter = 3;
9396
do

0 commit comments

Comments
 (0)