Skip to content

Commit

Permalink
fix(FairyRing): Teleport and WalkTeleport will now result true if we …
Browse files Browse the repository at this point in the history
…teleported from the context menu

- fixed  zanaris RSRegion
  • Loading branch information
Torwent committed Jan 26, 2024
1 parent 2a0636d commit bd3bac1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
21 changes: 16 additions & 5 deletions optional/interfaces/mainscreen/fairyring.simba
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,8 @@ Example
WriteLn FairyRing.Teleport('cip');
*)
function TRSFairyRing.Teleport(code: String): Boolean;
var
contextMenuTeleport: Boolean;
begin
if MainScreen.HasInterface() and not MainScreen.CloseInterface() then
Exit;
Expand All @@ -891,12 +893,14 @@ begin
if code = 'BKS' then
code := 'Zanaris';

if not RSObjects.FairyRing.Hover() or not ChooseOption.Select([code, 'onfigure']) then
Exit;
contextMenuTeleport := ChooseOption.Select(code, MOUSE_LEFT, False, False);
if not contextMenuTeleport then
if not ChooseOption.Select('onfigure', MOUSE_LEFT, False, True) then
Exit;

Minimap.WaitMoving();

if code = 'Zanaris' then
if contextMenuTeleport then
Exit(True);

if WaitUntil(Self.IsOpen(), RandomLeft(50, 1500), 3000) then
Expand All @@ -920,6 +924,8 @@ Example
WriteLn FairyRing.Teleport('cip');
*)
function TRSFairyRing.WalkTeleport(code: String): Boolean;
var
contextMenuTeleport: Boolean;
begin
if MainScreen.HasInterface() and not MainScreen.CloseInterface() then
Exit;
Expand All @@ -937,12 +943,17 @@ begin
if code = 'BKS' then
code := 'Zanaris';

if not RSObjects.FairyRing.WalkHover() or not ChooseOption.Select([code, 'onfigure']) then
if not RSObjects.FairyRing.WalkHover() then
Exit;

contextMenuTeleport := ChooseOption.Select(code, MOUSE_LEFT, False, False);
if not contextMenuTeleport then
if not ChooseOption.Select('onfigure', MOUSE_LEFT, False, True) then
Exit;

Minimap.WaitMoving();

if code = 'Zanaris' then
if contextMenuTeleport then
Exit(True);

if WaitUntil(Self.IsOpen(), RandomLeft(50, 1500), 3000) then
Expand Down
3 changes: 0 additions & 3 deletions osr/antiban/antibanextra.simba
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ begin

choices := Self.GetOptions();

WriteLn choices;
WriteLn text;

for i := 0 to High(text) do
for j := 0 to High(choices) do
begin
Expand Down
2 changes: 1 addition & 1 deletion utils/rsregions/rsregions.simba
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ begin
RSRegions.ZULANDRA := [3960, 4030, 4500, 4400];
RSRegions.POH := [1749, 0, 2009, 259];
RSRegions.TEMPOROSS_COVE := [7345, 4343, 7744, 4736];
RSRegions.ZANARIS := [9998, 4090, 10081, 4167];
RSRegions.ZANARIS := [9715, 3830, 10559, 4472];
RSRegions.VARROCK_SEWERS := [5407, 770, 6052, 1169];
RSRegions.FOSSIL_ISLAND_UNDERWATER := [1129, 5407, 1769, 5824];
RSRegions.KELDAGRIM := [2381, 5122, 3028, 5764];
Expand Down

0 comments on commit bd3bac1

Please sign in to comment.