Skip to content

Commit

Permalink
fix(kraken): compatibility update
Browse files Browse the repository at this point in the history
  • Loading branch information
Torwent committed Nov 25, 2024
1 parent d2545a8 commit fd2b471
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 21 deletions.
21 changes: 8 additions & 13 deletions wasp_kraken.simba
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,7 @@ begin
Self.Gear := Equipment.DiscoverAll();

if not Self.Gear.Contains('Sanguinesti staff') then
begin
CombatHandler.LootHandler.Loot.UpText += 'Shark';
CombatHandler.LootHandler.Drops += ['Shark', '', False, False, 5];
end;
LootHandler.Loot += ['Shark', '', False, False, 5];

i := Self.Gear.Find('expeditious bracelet');
if i > -1 then Delete(Self.Gear, i, 1);
Expand All @@ -139,15 +136,14 @@ begin
i := Self.Gear.Find('ring of recoil');
if i > -1 then Delete(Self.Gear, i, 1);

for i := 0 to High(CombatHandler.LootHandler.Drops) do
for i := 0 to High(LootHandler.Loot) do
begin
if CombatHandler.LootHandler.Drops[i].Item = 'Shark' then
Continue;
if LootHandler.Loot[i].Item = 'Shark' then Continue;

if CombatHandler.LootHandler.Drops[i].Noted then
Self.Loot += 'noted ' + CombatHandler.LootHandler.Drops[i].Item
if LootHandler.Loot[i].Noted then
Self.Loot += 'noted ' + LootHandler.Loot[i].Item
else
Self.Loot += CombatHandler.LootHandler.Drops[i].Item;
Self.Loot += LootHandler.Loot[i].Item;
end;

if QuickPrayer.Open() then
Expand Down Expand Up @@ -311,8 +307,7 @@ function TKrakenKiller.CheckLoot(): Boolean;
var
rect: TRectangle;
begin
if MainScreen.IsUpText('>') then
ChooseOption.Select('Cancel');
if MainScreen.IsUpText('>') then ChooseOption.Select('Cancel');

while Inventory.IsFull() and Inventory.ContainsConsumable(ERSConsumable.FOOD) do
Inventory.Consume(ERSConsumable.FOOD);
Expand All @@ -321,7 +316,7 @@ begin
Result := True;

rect := Minimap.GetTileMS(Minimap.Center(), [1,1,0]);
while CombatHandler.LootHandler.CheckLoot(rect) and Inventory.HasSpace(1) do
while LootHandler.CheckLoot(rect) and Inventory.HasSpace(1) do
Wait(400, 600);
end;

Expand Down
7 changes: 2 additions & 5 deletions wasp_pickpocketer.simba
Original file line number Diff line number Diff line change
Expand Up @@ -646,12 +646,9 @@ begin
Minimap.WaitMoving;
end;

if not MainScreen.WaitArrow(GraveTPA, 3000) then
Exit;

repeat
if not Minimap.WaitArrow(TPA, 3000) then
Exit;
if not Minimap.WaitArrow(TPA, 3000) then Exit;
if not MainScreen.WaitArrow(GraveTPA, 3000) then Exit;
GraveTPA.SortByY(False);
P := GraveTPA[0];
P.Y += 5;
Expand Down
19 changes: 16 additions & 3 deletions wasp_tab_maker.simba
Original file line number Diff line number Diff line change
Expand Up @@ -423,12 +423,18 @@ type
TabletSelector: TLabeledCombobox;
LayoutInfo, TabMakerInfo: TLabel;
ImagePanel: TPanel;
Config: TConfigJSON;
end;

procedure TTabMakerConfig.StartScript(sender: TObject); override;
begin
CurrentNPC := ERSNPC(Self.NPCSelector.GetItemIndex());
CurrentTablet := Lectern.TABLETS[CurrentLectern][Self.TabletSelector.GetItemIndex()];

Self.Config.Put('npc', Ord(CurrentNPC));
Self.Config.Put('lectern', Ord(CurrentLectern));
Self.Config.Put('tablet', ToStr(CurrentTablet));

inherited;
end;

Expand Down Expand Up @@ -470,6 +476,15 @@ var
i: Int32;
begin
Self.Setup('Wasp TabMaker');
Self.Config.Setup('wasp-tab-maker');

if Self.Config.Has('lectern') then
CurrentLectern := ERSLecternType(Self.Config.GetInt('lectern'));
if Self.Config.Has('npc') then
CurrentNPC := ERSNPC(Self.Config.GetInt('npc'));
if Self.Config.Has('tablet') then
CurrentTablet := Self.Config.GetString('tablet');

Self.Start.SetOnClick(@Self.StartScript);

Self.AddTab('Script Settings');
Expand All @@ -485,8 +500,8 @@ begin
SetTop(TControl.AdjustToDPI(150));
SetStyle(csDropDownList);
AddItemArray(['Standard', 'Ancient', 'Lunar', 'Arceuus']);
SetItemIndex(Ord(CurrentLectern)-1);
Combobox.SetOnChange(@Self.LecternSelectorOnChange);
SetItemIndex(Ord(CurrentLectern)-1);
SetEnabled(False);
end;

Expand All @@ -510,9 +525,7 @@ begin
SetLeft(Self.LecternSelector.GetRight() + TControl.AdjustToDPI(15));
SetStyle(csDropDownList);
for i := 0 to High(Lectern.TABLETS[CurrentLectern]) do
begin
AddItem(ToStr(Lectern.TABLETS[CurrentLectern][i]).SentenceCase());
end;
end;

with Self.LayoutInfo do
Expand Down

0 comments on commit fd2b471

Please sign in to comment.