Jump to content
Wanted

New drop functions

Recommended Posts

https://github.com/OSI1/OSI1/commit/207e28482eb9a5cbd199922607be0a297ef0b235

 

Edited Mouse/DragItem to return true if item exists

 

New Drop functions:

 

 * function GetDropPattern(Which: Integer): TIntegerArray;
    By: Wanted
* function DropItem(Slot: Integer): Boolean;
    By: Wanted
* function DropAllExcludeEx(Exclude, Pattern: TIntegerArray): Integer;
    By: Wanted
* function DropAllExclude(Exclude: TIntegerArray): Integer;
    By: Wanted
* function DropItemsEx(Slots, Pattern: TIntegerArray): Integer;
    By: Wanted
* function DropItems(Slots: TIntegerArrary): Integer;
    By: Wanted
* function DropAll: Integer;
    By: Wanted

 

Here's the drop patterns / Inv slot visuals:

 

i76d6v.png

 

Nothing conclusive in the benchmark (normal mouse speed)

 

program New;

{$DEFINE RS2}
{$DEFINE OSI_Color_Anti_Randoms}
//{$DEFINE SMART}                   // Comment out to disable SMART

{$I OSI\OSI.scar}

procedure ScriptTerminate;
begin
 FreeOSI;
end;

var
 T: LongInt;

begin
 SetUpOSI;
 T := GetSystemTime;
 //WriteLn(DropAllExcludeEx([], GetDropPattern(0))); // 24258
 //WriteLn(DropAllExcludeEx([], GetDropPattern(1))); // 24102
 //WriteLn(DropAllExcludeEx([], GetDropPattern(2)));   // 25896
 //WriteLn(DropAllExcludeEx([], GetDropPattern(3)));   // 24258
 //WriteLn(DropAllExcludeEx([], GetDropPattern(4)));     // 23993
 WriteLn(DropAllExcludeEx([], GetDropPattern(5)));  // 24929
 WriteLn(GetSystemTime - T);
end.

 

Those all will probably average out to 24 seconds (at normal mouse speed)

 

I've set the default drop pattern to 2 (don't worry it shows slowest, but not by much and the average should theoretically be higher, also note that this drop pattern requires the less work for a human to do is I believe its the most commonly used) but feel free to use which ever you want or post feedback concerning that... and you can always use custom patterns. :)

 

Enjoy

Edited by Wanted
Link to comment
Share on other sites

Nice job. Now that I think about it I use #4 legit. Guess I'm being inefficient?

 

Not with your time, maybe just your stress on your hand xD

 

I use that one normally too.

 

---------- Post added at 09:39 PM ---------- Previous post was at 09:26 PM ----------

 

Don't get too excited, they'll all probably average out to about 24 seconds, they're less than 1 second difference with just that 1 run, but I'm sure that will even out even more once they are extensively benchmarked.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...