Jump to content
TroisVerites

OSI -> RS2 : Some functions seem not work correctly

Recommended Posts

Perhaps I have a wrong configuration.

 

English and French Client:

 

- Color of the current Tab

- InvFull() -> not work

- InvItemExists(Slot: Integer) -> not work

Result := FindColor(P.X, P.Y, clObjectOutline, B.X1, B.Y1, B.X2, B.Y2);

 

[sCAR]

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

function GetCurrentTab: Integer;

Contributors: Dynamite, Wanted.

Description: Returns current tab.

Date Created: August 31st, 2011. By Dynamite & Wanted. RS2 Build 662.

Last Modification: August 31st, 2011. By Wanted. RS2 Build 662.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

function GetCurrentTab: Integer;

begin

for Result := 0 to 15 do

// if (GetColor(535 + ((Result mod 8) * 30), 169 + ((Result div 8) * 298)) = 3775974) then

if (GetColor(535 + ((Result mod 8) * 30), 169 + ((Result div 8) * 298)) = 3709924 ) then

Exit;

end;

 

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

function InvItemExists(Slot: Integer): Boolean;

Contributors: Wanted

Description: Returns true if there's an item in the given inventory slot.

Date Created: November 6th, 2011. By Wanted. RS2 Build 675.

Last Modification: November 21st, 2011. By Wanted. RS2 Build 681.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

function InvItemExists(Slot: Integer): Boolean;

var

P: TPoint;

B: TBox;

begin

Result := False;

if (not (SetGameTab(Tab_Inv))) then

if (not (BankScreen)) then

Exit;

B := GetItemBounds(Slot);

Result := FindColor(P.X, P.Y, clObjectOutline, B.X1, B.Y1, B.X2, B.Y2);

end;

[/sCAR]

Link to comment
Share on other sites

Good news , InvItemExists is working correctly now ( configuration client RS2 ) .

 

Need to find the good configuration for GetCurrentTab , the color yellow is not the same.

 

Question : Is there a way to test quickly if the configuration is good , and what is wrong ?

 

I Use chrome and Firefox

Link to comment
Share on other sites

Good news , InvItemExists is working correctly now ( configuration client RS2 ) .

 

Need to find the good configuration for GetCurrentTab , the color yellow is not the same.

 

Question : Is there a way to test quickly if the configuration is good , and what is wrong ?

 

I Use chrome and Firefox

 

This works for me:

 

[sCAR]var TB: TBox;

 

if GetCurrentTab <> Tab then begin

TB := GetTabBounds(Tab);

MouseBox(TB.X1, TB.Y1, TB.X2, TB.Y2, ClickLeft);

end;

[/sCAR]

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...