Skip to content

Commit

Permalink
fix(House): added a .Leave() method
Browse files Browse the repository at this point in the history
it uses biohash to decide if it will leave through options menu or the portal weighted towards the first.
  • Loading branch information
Torwent committed Dec 26, 2024
1 parent 37b6185 commit a767699
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions optional/handlers/house/house.simba
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,22 @@ begin
end;
end;

function THouseHandler.Leave(): Boolean;
begin
if not Minimap.InPOH() then Exit(True);

if Antiban.BioDice(0.95) then
begin
if not Options.LeaveHouse() then Exit;
end
else
begin
if not Self.Objects[EHouseObject.EXIT].WalkSelectOption(['Enter']) then Exit;
end;

Result := WaitUntil(not Minimap.InPOH(), 300, 3000);
end;

function THouseHandler.CreateHouseTeleportCombobox(owner: TControl; topleft, offset: TPoint = [0,0]): TLabeledComboBox;
type THouseHandler = THouseHandler;
procedure THouseHandler.OnChange(sender: TObject);
Expand Down

0 comments on commit a767699

Please sign in to comment.