From fd2b47162a5a6262827357e1dce997c25277ac88 Mon Sep 17 00:00:00 2001 From: Torwent Date: Mon, 25 Nov 2024 12:48:46 +0100 Subject: [PATCH] fix(kraken): compatibility update --- wasp_kraken.simba | 21 ++++++++------------- wasp_pickpocketer.simba | 7 ++----- wasp_tab_maker.simba | 19 ++++++++++++++++--- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/wasp_kraken.simba b/wasp_kraken.simba index b488cf8..7a55168 100644 --- a/wasp_kraken.simba +++ b/wasp_kraken.simba @@ -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); @@ -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 @@ -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); @@ -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; diff --git a/wasp_pickpocketer.simba b/wasp_pickpocketer.simba index 1b25e81..144e9d9 100644 --- a/wasp_pickpocketer.simba +++ b/wasp_pickpocketer.simba @@ -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; diff --git a/wasp_tab_maker.simba b/wasp_tab_maker.simba index 2b58f9d..97a7d15 100644 --- a/wasp_tab_maker.simba +++ b/wasp_tab_maker.simba @@ -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; @@ -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'); @@ -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; @@ -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