Wanted Posted March 10, 2013 Share Posted March 10, 2013 (edited) https://github.com/OfficialSCARInclude/OSI2/commit/f3ba05c92d67ee49c17827cf03af88d671dc934a OCR Finished all the OCR functions really, I'm conisdering putting the stuff that was in Amount.scar in OCR instead of splitting it up between all of it's files. Also I'm still debating on whether or not I want to pursue using FindText instead of GetText at all and other color options. For now [sCAR]{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Official SCAR Include Runescape 07 OCR Routines -------------------------------------------------------------------------------- * function GetUpText: String; By: Freddy * function UpTextContainsMulti(Text: TStringArray): Boolean; By: Freddy & Wanted. * function UpTextContains(Text: string): Boolean; By: Freddy & Wanted. * function FindOptionsBox(var OptionsBox: TBox): Boolean; By: Wanted * function OptionBoxExists: Boolean; By: Wanted * function GetAllOptionsBox: TBox; By: Wanted * function GetNumberOptions(AllOptionsBox: TBox): Integer; By: Wanted * function GetOptionBox(Index: Integer; AllOptionsBox: TBox): TBox; By: Wanted * function GetOptionBoxMulti(Indexes: TIntegerArray; AllOptionsBox: TBox): TBoxArray; By: Wanted * function GetAllOptionBoxes(AllOptionsBox: TBox): TBoxArray; By: Wanted * function GetOption(Index: Integer; AllOptionsBox: TBox): string; By: Wanted * function GetAllOptions(AllOptionsBox: TBox): TStrArray; By: Wanted * function OptionsContainsMulti(Options: TStrArray; AllOptionsBox: TBox): TBoolArray; By: Wanted * function OptionsContains(Option: string; AllOptionsBox: TBox): Boolean; By: Wanted * function ChooseOptionMultiEx(Options: TStrArray; TypeC: ClickActions): Boolean; By: Wanted * function ChooseOptionMulti(Options: TStrArray): Boolean; By: Wanted * function ChooseOption(Option: string): Boolean; By: Wanted =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}[/sCAR] [sCAR]{$DEFINE RS07} {$DEFINE OSI_RS07_Color_Anti_Randoms} {$I OSI\OSI.scar} {$I OSI\Divi\Misc\Debug.scar} procedure ScriptTerminate; begin FreeOSI; end; //var // TBA: TBoxArray; // T: LongInt; // B: TBox; begin SetUpOSI; Wait(2000); //T := GetSystemTime; //WriteLn(GetUpText); //Use Bucket / 2 more options (31 ms) //WriteLn(UpTextContainsMulti(['se B', 'ucket', '2 more'])); //True (32 ms) //WriteLn(UpTextContains('ucket')); //True (32 ms) //WriteLn(FindOptionsBox(B)); // True (31 ms) //B := GetOptionBox(2, GetAllOptionsBox); // (16 ms) //TBA := GetOptionBoxMulti([0, 1], GetAllOptionsBox); // (0 ms) //TBA := GetAllOptionBoxes(GetAllOptionsbox); //WriteLn(GetOption(0, GetAllOptionsbox)); // Talk-to Freaky Forester (63 ms) //WriteLn(TSAToString(GetAllOptions(GetAllOptionsBox))); // [0] Talk-to Freaky Forester, [1] Walk here, [2] Examine Freaky Forester, [3] Cancel, // (171 ms) //ChooseOptionMulti(['Examine', 'Cancel']); //ChooseOptionMulti(['stir', 'fry']); //DropItem(26, True); DropItems([0, 1, 2, 3], True); //WriteLn('(' + IntToStr(GetSystemTime - T) + ' ms)'); //DebugBox(B); //DebugTBA(TBA); end.[/sCAR] Inventory Finished all of Inventory pretty much. Just added the drop functions now that I have ChooseOption out of the way. Also Added GetInvSlotsBounds which is basically GetInvSlotBound(Multi) [sCAR] * function GetInvSlotsBounds(Slots: TIntegerArray): TBoxArray; By: Wanted[/sCAR] [sCAR] * function GetDropPattern(Which: Integer): TIntegerArray; By: Wanted * function DropItem(Slot: Integer; CheckIT: Boolean): Boolean; By: Wanted * function DropItemsPEx(Slots, Pattern: TIntegerArray; Exclude, CheckIT: Boolean): Integer; By: Wanted * function DropItemsEx(Slots: TIntegerArray; Exclude, CheckIT: Boolean): Integer; By: Wanted * function DropItems(Slots: TIntegerArray; CheckIT: Boolean): Integer; By: Wanted * function DropAllExclude(Exclude: TIntegerArray; CheckIT: Boolean): Integer; By: Wanted * function DropAll(CheckIT: Boolean): Integer; By: Wanted[/sCAR] Explanation of my drop functions here http://forums.scar-divi.com/showthread.php?527-OSI-Banking-additions-and-other-stuff-12-12-2011&p=2666&highlight=drop#post2666 That's all for now. I haven't had much time since the last release to work on OSI but I still got an incredible amount done because most of the code already existed in OSI 1 I just had to tweak it. More good stuff coming soon! -Wanted Edited March 10, 2013 by Wanted Quote Link to comment Share on other sites More sharing options...
Janilabo Posted March 10, 2013 Share Posted March 10, 2013 Nice progress, James! Fantastic job with the OCR stuff. You've been busy! Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted March 10, 2013 Share Posted March 10, 2013 Yea yea! Wanted the beast! Quote Link to comment Share on other sites More sharing options...
Modnick Posted March 10, 2013 Share Posted March 10, 2013 wow, seems impressively superior. keep up the good work Quote Link to comment Share on other sites More sharing options...