File tree Expand file tree Collapse file tree 3 files changed +34
-2
lines changed
Expand file tree Collapse file tree 3 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ begin
110110 taskObj.AddFloat('variation', 0.33);
111111 arr.Add('task', taskObj);
112112 Self.TaskList.Items.Add(Self.GetTaskListString('LoseFocus', '10 mins', '33%'));
113- Antiban.AddTask(@RSClient .LoseFocus, 10*ONE_MINUTE, 0.33);
113+ Antiban.AddTask(@Antiban .LoseFocus, 10*ONE_MINUTE, 0.33);
114114
115115
116116 taskObj := new TJSONObject();
Original file line number Diff line number Diff line change @@ -681,6 +681,13 @@ begin
681681 end;
682682end;
683683
684+
685+ procedure TAntiban.LoseFocus();
686+ begin
687+ WriteLn GetDebugLn('Antiban', 'Losing client focus');
688+ RSClient.LoseFocus();
689+ end;
690+
684691(* TODO:
685692procedure TAntiban.MoveItems(items: TRSItemArray);
686693var
@@ -882,7 +889,7 @@ const
882889 ['LargeRandomMouse', @Antiban.LargeRandomMouse],
883890 ['SmallCameraRotation', @Antiban.SmallCameraRotation],
884891 ['LargeCameraRotation', @Antiban.LargeCameraRotation],
885- ['LoseFocus', @RSClient .LoseFocus],
892+ ['LoseFocus', @Antiban .LoseFocus],
886893 ['HoverSkills', @Antiban.HoverSkills],
887894 ['OpenSkills', @Antiban.OpenSkills],
888895 ['HoverMakeItem', @Antiban.HoverMakeItem],
Original file line number Diff line number Diff line change @@ -116,6 +116,31 @@ begin
116116 end;
117117end;
118118
119+ (*
120+ ### ERSItemQuantity.String2Quantity
121+ ```pascal
122+ function ERSItemQuantity.String2Quantity(str: String): ERSItemQuantity; static;
123+ ```
124+ Internal helper function to convert a string quantity into a ERSItemQuantity.
125+
126+ Example:
127+ ```pascal
128+ WriteLn ERSItemQuantity.String2Quantity('5');
129+ WriteLn ERSItemQuantity.String2Quantity('7');
130+ WriteLn ERSItemQuantity.String2Quantity('All');
131+ ```
132+ *)
133+ function ERSItemQuantity.String2Quantity(str: String): ERSItemQuantity; static;
134+ begin
135+ case LowerCase(str) of
136+ '1': Result := ERSItemQuantity.ONE;
137+ '5': Result := ERSItemQuantity.FIVE;
138+ '10': Result := ERSItemQuantity.TEN;
139+ 'all': Result := ERSItemQuantity.ALL;
140+ else Result := ERSItemQuantity.CUSTOM;
141+ end;
142+ end;
143+
119144type
120145(*
121146## ERSStack
You can’t perform that action at this time.
0 commit comments