Wanted Posted March 20, 2013 Share Posted March 20, 2013 (edited) https://github.com/OfficialSCARInclude/OSI2/commit/0da1924270a86359b31bdc50d64df19cc530a84e SVN/Includes manager is down currently due to technicalities with Freddy's server/host. It will be updated as soon as it's online.. for now stop being a noob a use git hub New banking functionsAdded Withdraw indexes and clObjectShadow Fixed bug in ConstrainBox for huge boxes Lots of other revisions and additions Bank New [sCAR] * function GetBankSlotIndex(Row, Column: Integer): Integer; By: Wanted * function GetBankSlotRow(Index: Integer): Integer; By: Wanted * procedure GetBankSlotRowAndColumn(Index: Integer; var Row, Column: Integer); By: Wanted * function GetBankScrollBarPos: Extended; By: Wanted * function ScrollBankToRow(Row: Integer): Boolean; By: Wanted * function ScrollBankToIndex(Index: Integer): Boolean; By: Wanted * procedure OffsetPointBankScrollPos(var P: TPoint; Pos: Extended); By: Wanted * procedure OffsetBoxBankScrollPos(var B: TBox; Pos: Extended); By: Wanted * function GetBankSlotsSearchBounds(Slots: TIntegerArray; Pos: Extended): TBoxArray; By: Wanted * function GetBankSlotSearchBounds(Slot: Integer; Pos: Extended): TBox; By: Wanted * function GetBankSlotsBounds(Slots: TIntegerArray): TBoxArray; By: Wanted * function GetBankSlotBounds(Slot: Integer): TBox; By: Wanted * function GetBankItemAmount(Slot: Integer): LongInt; By: Wanted * function CordsToBankSlot(P: TPoint): Integer; By: Wanted * function BankItemExists(Slot: Integer; CheckBS: Boolean): Boolean; By: Wanted * function MouseBankItem(Slot: Integer; TypeC: ClickActions; CheckBS: Boolean): Boolean; By: Wanted * function DragBankItem(FromSlot, ToSlot: Integer; CheckBS: Boolean): Boolean; By: Wanted * function WithdrawEx2(Options: TStringArray; B: TBox; CheckBS: Boolean): Boolean; By: Wanted * function WithdrawEx(Amount: Integer; B: TBox; CheckBS: Boolean): Boolean; By: Wanted * function WithdrawSlotEx(Options: TStringArray; Slot: Integer; CheckBS: Boolean): Boolean; By: Wanted * function Withdraw(Amount, Slot: Integer; CheckBS: Boolean): Boolean; By: Wanted[/sCAR] [sCAR]{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= const Withdraw function indexes Contributors: Wanted Description: Index handles for withdrawing routines. Date Created: December 11th, 2011. By Wanted. RS2 Build 688. Last Modified: March 20th, 2013. By Wanted. RS07 Build ???. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=} const Withdraw_1 = 1; Withdraw_5 = 5; Withdraw_10 = 10; Withdraw_All = -1337;[/sCAR] Everything works independent of the scroll bar. However if you don't do ScrollBankToRow or ScrollBankToIndex before doing things that aren't currently entirely visible in your bank then you'll run into problems.. with the half/nonvisible things that is... the other stuff on your screen that is 100% visible will work fine. If you have the scroll bar all the way to the top (which you can achieve by doing ScrollToRow (0..5) then it will automatically give you the full boxes not affected by Scroll Bar position (unless that slot doesn't have an item in it, in which case it won't give you any bounds.. don't worry there's DragBankItem ) Here's what the indexes look like Easier to see : http://img.ctrlv.in/51495995b5ac5.png Anyways you can find out what indexes or just use stuff like GetBankSlotRow, GetBankSlotRowAndColumn, GetBankSlotIndex etc. you're smart.. figure it out =P There's also CordsToBankSlot - Tells you which slot that point you found is in. MouseBankItem - Clicks a bank item like you want DragBankItem - Clicks and drags a bank item from one slot to another... no sorry you can't drag between slots that aren't both visible on the screen there's just no use for that. Withdraw Withdraw is pretty cool you can like Withdraw(Withdraw_All, Slot, CheckBS) or Withdraw(28, Slot, CheckBS) and it will automatically use the X or whatever text there is I showed you the other constants you can use with that above... and I have Withdraw()(Ex) for those who want to use custom Text/Boxes. Other stuff Color.scar added [sCAR] * function FindColorsExP(var TPA: TPointArray; Colors: TIntArray; B: TBox): Boolean;[/sCAR] Box.scar Fixed bug in ConstrainBox for huge boxes where Y1 would actually be greater than Y2 (or less/ or with X1/X2) creating invalid boxes. Point.scar added [sCAR]function DistanceP(P1, P2: TPoint): Extended;[/sCAR] TSA.scar added [sCAR] * function TSAContainsMulti(SubStrs: TStringArray; TSA: TStringArray): TBooleanArray; [/sCAR] Globals.scar added clObjectOutline and Withdraw_Indexes Also other tiny revisions etc. not worth mentioning A huge thanks to Slacky and Janilabo for helping with scroll bar independent related banking routines, I don't know what I'd do with out you guys. More good OSI updates coming soon (sorry for being so slow.. these latest additions were DIFFICULT) Cheers -Wanted Edited March 20, 2013 by Wanted Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted March 20, 2013 Share Posted March 20, 2013 More good OSI updates coming soon (sorry for being so slow.. these latest additions were DIFFICULT) I'd rather see good quality updates trickle in than a flood of updates that require a ton of fixing/tweaking after the fact. Quote Link to comment Share on other sites More sharing options...
Wanted Posted March 20, 2013 Author Share Posted March 20, 2013 I'd rather see good quality updates trickle in than a flood of updates that require a ton of fixing/tweaking after the fact. Been working towards that. If you notice the updates are becoming more frequent and more specific. Just the nature of development. Quote Link to comment Share on other sites More sharing options...