Jump to content
Ranqers

SMART coordinate error

Recommended Posts

when regularly using SCAR, the function MoveMouse(0, 150); moves to the designated spot.

inside of SMART when i use the coordinates (at the bottem left corner of the SCAR bot) it moves it +50 points on the Y-axis..

 

 

only way to make it work is by changing MoveMouse(x,y) to MoveMouse(x,y-50) ..

 

any way to fix? (yes i've re-targeted client)

Link to comment
Share on other sites

when regularly using SCAR, the function MoveMouse(0, 150); moves to the designated spot.

inside of SMART when i use the coordinates (at the bottem left corner of the SCAR bot) it moves it +50 points on the Y-axis..

 

 

only way to make it work is by changing MoveMouse(x,y) to MoveMouse(x,y-50) ..

 

any way to fix? (yes i've re-targeted client)

 

Assuming you're using OSI, it offsets the SMART input area with 50 pixels from the top to compensate for the toolbar in RS.

 

[scar]var

Client: TSCARClient;

InputBox: TBox;

 

...

 

Client := GetClient;

InputBox := Client.InputArea;

InputBox.Y1 := 0;

Client.InputArea := InputBox;[/scar]

Link to comment
Share on other sites

i've done some editing to the SMART client, and got it to run another .jar. ( this dosn't contain the RS toolbar like normally )

 

WOW thanks freddy!

 

i'll ask someone else, but i still can't get it to work. thanks a bunch tho!

Edited by Ranqers
Link to comment
Share on other sites

Have you turned off the toolbar? (Members can turn off the toolbar in their options). The includes are assuming that toolbar is present and adding 50 to all Y coordinates to workaround it being there.

 

Off topic: This is why I suggested getting rid of the +50 offset before growing OSI would be a really, really good idea. Simply not worth the headaches it causes.

Link to comment
Share on other sites

Have you turned off the toolbar? (Members can turn off the toolbar in their options). The includes are assuming that toolbar is present and adding 50 to all Y coordinates to workaround it being there.

 

Off topic: This is why I suggested getting rid of the +50 offset before growing OSI would be a really, really good idea. Simply not worth the headaches it causes.

 

There is no way to get rid of the offset. We need it because the toolbar can show up at any time. It usually shows up after you login.

If you REALLY wanted to get rid of this. You would need to be able to resize SMART, in real time. Because once that toolbar shows up, you would have to make the SMART window smaller to cut it off. Also note that the Login functions are really tied into it, and...most of osi's function don't have the +50 offset built into them, and since this toolbar can Magically disappear... I don't see a reason why we should remove this.

 

I'm going to update the setup I have for this right now and commit when I can. The 3 functions responsible are at the bottom of RS2/Globals.scar

 

 

I'm going to make it so. It will detect the size of SMART, and update accordingly. Right now it just updates whether it needs to be or not. So if anyone does this:

 

[scar]

UpdateRSClient;

UpdateRSClient;

[/scar]

That will make the offset 100 on the Y because of the function.

Edited by LordJashin
Link to comment
Share on other sites

Have you turned off the toolbar? (Members can turn off the toolbar in their options). The includes are assuming that toolbar is present and adding 50 to all Y coordinates to workaround it being there.

 

Off topic: This is why I suggested getting rid of the +50 offset before growing OSI would be a really, really good idea. Simply not worth the headaches it causes.

 

the toolbars gone, but I can't put it back, I only have two options here unless it's possible to change the settings.. I'll give it a look when I get home.

Link to comment
Share on other sites

the toolbars gone, but I can't put it back, I only have two options here unless it's possible to change the settings.. I'll give it a look when I get home.

 

If you can tell that there is a +50 offset. Then Use this line of code after you SetupOSI. This line and nothing else:

 

[scar]

ResetRSClient;

[/scar]

 

That should fix it.

Link to comment
Share on other sites

ResetRSClient; gave me a debug error: "Type: Compiler Error, Unknown identifier 'ResetRSClient'"

 

im running with this:

[scar]{$DEFINE RS2}

{$DEFINE OSI_Color_Anti_Randoms}

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

// and use browser instead

{$I OSI\OSI.scar}

{.include procedures.scar}

{.include thiev.scar}[/scar]

Link to comment
Share on other sites

Example script using OSI correctly:

 

[scar]

program New;

 

{$DEFINE RS2}

{$DEFINE SMART}

{$I OSI\OSI.scar}

 

begin

SetupOSI;

// If you want to Change the boxes back to normal

RevertRSClient;

 

 

// If you want to update them again

UpdateRSClient;

end.

[/scar]

 

I have some questions for Freddy though.

 

Can we do this yet?:

 

[scar]

GetClient.ImageArea := Box(0, 0, 0, 0);

[/scar]

 

And that would reset the image area to its default?

 

Or maybe we still need a variable...Client := GetClient;

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