Skip to content

Commit a654075

Browse files
committed
fix: autoinvoke is now disabled by default
This means you need to add `()` to your functions unless you add `{$AUTOINVOKE ON}` to your script
1 parent 72cacf0 commit a654075

31 files changed

Lines changed: 101 additions & 58 deletions

examples/gear_form.simba

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ begin
1313

1414
WriteLn('Main Gear: ', gear1.Gear);
1515
WriteLn('SpecAttack Gear: ', gear2.Gear);
16-
inherited;
16+
inherited();
1717
end;
1818

1919
var

examples/inventory_form.simba

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ begin
99
layout.Layout := InventoryForm.Layouts[layoutSelector.ItemIndex];
1010

1111
WriteLn('Inventory Layout: ', layout.Layout);
12-
inherited;
12+
inherited();
1313
end;
1414

1515
var

osrs/antiban/antibantasks.simba

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ begin
214214

215215
WriteLn GetDebugLn('Antiban', 'Toggling make quantity buttons');
216216

217-
quantityBtns := Make.FindQuantityButtons;
217+
quantityBtns := Make.FindQuantityButtons();
218218
if quantityBtns = [] then Exit;
219219
currentBtn := Make.GetCurrentQuantity();
220220
randomBtn := quantityBtns[Random(Length(quantityBtns))];

osrs/finders/itemfinder.simba

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ begin
7171
if not Self._AlignHelper(image, tBorder, bBorder, align) then
7272
Exit;
7373

74-
bounds := tBorder.Bounds;
74+
bounds := tBorder.Bounds();
7575
image.Crop(bounds);
7676

7777
bounds := bounds.Offset([-align.X, -align.Y]);

osrs/finders/overheadfinder.simba

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ begin
206206

207207
matrix := MatchTemplate(Target.GetImage(bounds), overheadImage, ETMFormula.TM_CCOEFF_NORMED);
208208

209-
with matrix.ArgMax do
209+
with matrix.ArgMax() do
210210
begin
211211
if matrix[Y,X] < Self.Similarity then
212212
Break;

osrs/interfaces/chat/chat.simba

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ begin
456456
// Now find shadows, offset by -1,-1 to find colors of text
457457
tpa := img.FindColor(0, 0, [1, 1, img.Width, img.Height]);
458458
tpa := tpa.Offset([-1,-1]).ExcludePoints(tpa);
459-
img.ReplaceColorBinary(False, img.GetColors(tpa).Unique, 0);
459+
img.ReplaceColorBinary(False, img.GetColors(tpa).Unique(), 0);
460460

461461
Result := OCR.Engine.Recognize(img, RSFonts.PLAIN_12, [0,0]);
462462
end;

osrs/interfaces/chooseoption.simba

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ begin
164164
atpa := tpa.Cluster(2).ExcludeSize(100, __LT__).SortFrom(Mouse.Position);
165165

166166
for tpa in atpa do
167-
if tpa.Bounds.Corners.Intersection(tpa).Length = 4 then
168-
Exit(tpa.Bounds.Expand(-2));
167+
if tpa.Bounds().Corners().Intersection(tpa).Length = 4 then
168+
Exit(tpa.Bounds().Expand(-2));
169169
end;
170170

171171
(*

osrs/interfaces/gametabs/inventory.simba

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,12 +432,12 @@ begin
432432

433433
if not Self.ShiftEnabled then Exit(Self.Drop(slots));
434434

435-
boxes := Self.Slots.Boxes;
435+
boxes := Self.Slots.Boxes();
436436
for 1 to attempts do
437437
begin
438438
for i := 0 to High(slots) do
439439
begin
440-
if Self.GetSelected > -1 then
440+
if Self.GetSelected() > -1 then
441441
begin
442442
Self.Select(-1);
443443
Continue(2);

osrs/interfaces/gametabs/magic.simba

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ begin
405405
if Length(tpa) <= 10 then Exit;
406406

407407
for tpa in tpa.Cluster(8) do
408-
if tpa.Density < 0.28 then
408+
if tpa.Density() < 0.28 then
409409
Exit(True);
410410
tpa := [];
411411
end;

osrs/interfaces/gametabs/prayer.simba

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ WriteLn Prayer.InfoIsOpen();
134134
*)
135135
function TRSPrayer.InfoIsOpen(): Boolean;
136136
begin
137-
Result := Self.GetInfoBox <> [];
137+
Result := Self.GetInfoBox() <> [];
138138
end;
139139

140140
(*
@@ -192,7 +192,7 @@ begin
192192
if attempts = 0 then Exit;
193193

194194
if Self.InfoIsOpen() then
195-
Result := Self.CloseInfo and Self.Find(prayer, bounds, attempts-1);
195+
Result := Self.CloseInfo() and Self.Find(prayer, bounds, attempts-1);
196196
end;
197197

198198
(*
@@ -332,7 +332,7 @@ var
332332
activatedPrayers: TRSPrayerSet;
333333
begin
334334
Result := True;
335-
if not Self.IsOpen then
335+
if not Self.IsOpen() then
336336
Exit(False);
337337

338338
for prayer in prayers do

0 commit comments

Comments
 (0)