Jump to content
Wanted

OSI 2 Underway. Divi & RS2 massive restructure. RS07 Introduction

Recommended Posts

I've been playing around with OSI since yesterday taking a look at the changes made in my extended absence. I've also been contemplating what to do with RS07.

 

It's clear the original OSI structure I came up with needs refining. There are also lots of new functions by Janabilo, LordJashin, and Bixby etc that need to be factored in. That and other changes with the game like removal of antirandoms from RS2 and RS07 coming out. I also plan on making some massive changes to OSI credits and cutting out a lot of people that don't/shouldn't belong in there.

 

I've decided instead of chopping down OSI and piecing it back together and calling it OSI 1 to chop and down, heavily restructure it, modify the hell out of it, and slap and brand new shiny OSI2 name on it and give it a new repo. This will also help for preparation of SCAR 4, however I'll release this under 3.38.

 

I need to decide on how to do the repo

 

I'll have Freddy create http://svn.scar-divi.com/osi2 and have it added to the includes manager.

 

For git I need to decide if I want to create OSI2 or how I want to handle the OSI1 organization members etc. open for suggestions at this point.

 

I'm planning on initially uploading OSI1 to OSI2 and then applying the massive changes so I can continue my Gource videos.

 

For the Divi core section of OSI that is used by any script that uses OSI regardless of what game its for (RS2, RS07, RSC, ?Seafight-lol, etc..) it will be structured as so

 

/OSI/

-OSI.scar

-Compile OSI

-/RS2/

-/RS07/

-/Templates/

-/Tools/

-/Divi/

--Client

--Globals

--/TFunctions/

---Boolean

---Box

---Conversion

---Extended

---Integer

---Point

---String

---Variant

--/Person/

---Keyboard

---Mouse

---Timing

--/Geometry/

---Bitmap

---Color

---Math

--/Misc/

---Debug

 

Anything from the current OSI will assimilate into one of those files. You'll notice Array and some other things are missing. Forms etc. won't be initial Beta and I still need to make decisions about those.

 

RS2 needs some reworking but this isn't my priority. There's some fixes that need to happen and such. As far as structure goes it will be very similar. Antirandoms will be gone completely obviously. Gametab will be split up. Perhahps some maps functions and other things will be more divided and categorized based upon their category and section of the screen /tree relation etc. Player array and login stuff needs some reworking and restructuring expect some major differences in that.

 

RS07 is my priority right now will reflect the RS2 section but for the older game and the structure may be a little different because the game has changed a lot in 6 years. Antirandoms will be there, categories may be a bit more broad.

 

I'm busting my ass right now trying to get the initial upload beta up that has all the basic functionality up in the next day or so.

 

My biggest things I can think of right now are

 

Finishing the changes to /Divi/ - 75%

Getting the Repo/organizations set up the way I want. 10%

Getting OSI 2 restructured and initiated. 35%

Working on RS07 basics all done and some more 10%

-Structure

-Figuring out the OCR and fonts etc. for RS07

-Login functions

-WTF is going on with SMART?

Fixing some RS2 stuff 5%

-Structure

 

Need some feedback regarding all of this

 

oh and I'm back bitches :D

Edited by Wanted
Link to comment
Share on other sites

I've never tried your include before but, I think it looks really interesting. I used to play rs and be apart of the SCAR community back in 2005-2008 and seeing as RS07 is out now I'm really excited about it. I'm definitely going to try out your Scripting Library when it's released. I must admit that I am a noob when it comes to scripting I haven't tried scripting since 6 years ago for scar but I'm willing to learn. It's so awesome to hear your focusing on RS07, can't wait to see what becomes of this

Link to comment
Share on other sites

You can expect advanced OSI style for everything only it will just be targeted at a different client scheme.

 

Forgot Bixby. Moved Globals out from TFunctions.

 

I got the feeling a lot of the things in tfunc and math etc should be in plugins.

 

Jashin you need to post source for your plugins.

 

Can someone tell me what is going on with SMART??

 

 

Thanks for the support guys. Hopefully I'll have a beta repo up soon.

 

Now is a good time for suggestions and insight

Edited by Wanted
Link to comment
Share on other sites

I can get you the source for those plugins, my bad on that.

 

Sexy, your making more Gource or Gsource or w/e videos.

As for OSI2, please don't cut out too much. Took me a long time to do some of that...lol...good times

especially the logging system, it was pretty uber, auto screenshotting, and all that was like the coolest thing i made in scar besides the FORMS stuff i started...

 

See some cool stuff going on, welcome back Wanted!

Link to comment
Share on other sites

If I cut anything out it can always be added back in later. It's more of I'm assembling a new include and it's not making it into the initial build.

 

If you ever want to add anything to the repo, Janilabo is always cooking stuff up over there in MSSL. Still yet to figure out some things in that include...

 

GL with the include

Link to comment
Share on other sites

Can someone tell me what is going on with SMART??
OSI is still limping along with the port of SMART 7.2 that Freddy came up with. It has more than a few issues and is buggy as hell. A lot are due to SMART itself, but the OSI version is not as stable as the official one I find.

 

There is a version 8.0 out that is more stable and moves java out into its own process and supports loading the other graphics modes (still can't read the screen though). This isn't officially used even with SRL/Simba although most everyone has simply manually updated. A lot of new scripts are requiring SMART 8.0. BenLand has come out with 8.1 which adds support for SMART to run plugins that people develop (such as read the OpenGL screen; a work in progress) but it has been beta forever even though its finished.

 

I started to look at making SMART 8.0/8.1 work with SCAR for kicks but got bogged down with the loading. Calling Java with the exact same arguments from a command prompt works. Trying to invoke in Delphi with the exact same arguments doesn't. Got busy with other projects in real life and put it on the back burner.

Link to comment
Share on other sites

I've been meaning to upgrade the plugin to work for the latest builds of SMART, but I'm already very short on time at the moment, I still haven't been able to get around to it.

 

It's pretty important I get SMART up. They are going to be holding that over my head more than anything even if everything else is solid gold.

Link to comment
Share on other sites

I've been meaning to upgrade the plugin to work for the latest builds of SMART, but I'm already very short on time at the moment, I still haven't been able to get around to it.

And really you shouldn't have to. It was incredibly kind of you to take this on initially and get it up and running, but your focus is and should be SCAR.

Link to comment
Share on other sites

It's pretty important I get SMART up. They are going to be holding that over my head more than anything even if everything else is solid gold.

 

Not unless you know Java, C, or w/e else Benland uses in the SMART source. By the way, some of the programming courses I've seen online have some cool stuff. I think one of them had a really good Java tutorial + manual or w/e

 

 

And I don't see why the SMART we have now is "not functional". I mean it has some flukes with things as Bixby has aptly posted. But does this mean upgrading SMART is going to fix it? Maybe I misunderstand here.

Link to comment
Share on other sites

May I humbly suggest OSI2 drop the 50 pixel hack and start using proper coordinates.

 

The 50 pixel hack worked but then all sorts of workarounds got implemented to make it work everywhere like the login screen because everyone lost sight of the fact the MS coordinates only "exist" while the player is logged in. They have no meaning on the login screen. So we should have simply changed MSY1 to 50 and been done with it. If all the other coordinates had been properly referenced as (MSX1 + x), (MSY1 + y) the entire include would have seamlessly handled the fact that Jagex shuffled things around. It would be nice to avoid making that mistake again.

 

Same thing for the login screen. Coordinates should be (RSX1 + something): There is no guarantee things won't shuffle around in the future. Why not future proof the includes by putting a little more effort up front.

 

Edit: I know, I know: flogging a dead horse. I'll shut up now.

Link to comment
Share on other sites

May I humbly suggest OSI2 drop the 50 pixel hack and start using proper coordinates.

 

The 50 pixel hack worked but then all sorts of workarounds got implemented to make it work everywhere like the login screen because everyone lost sight of the fact the MS coordinates only "exist" while the player is logged in. They have no meaning on the login screen. So we should have simply changed MSY1 to 50 and been done with it. If all the other coordinates had been properly referenced as (MSX1 + x), (MSY1 + y) the entire include would have seamlessly handled the fact that Jagex shuffled things around. It would be nice to avoid making that mistake again.

 

Same thing for the login screen. Coordinates should be (RSX1 + something): There is no guarantee things won't shuffle around in the future. Why not future proof the includes by putting a little more effort up front.

 

Edit: I know, I know: flogging a dead horse. I'll shut up now.

 

I'm so confused right now.

 

The constants are constant. RS doesn't change... if it does we go and we update those values in Globals.scar. What is this 50pixelhack you speak of?? O_o

 

If coordinates in the game change I highly doubt that offsetting them a fixed amount from any constant is going to remain the same difference you'd have to go back in and find the new coordinates which would most definitively be in different places on the screen relevant to the constants once again??

Edited by Wanted
Link to comment
Share on other sites

Sorry forgot you were away. They added a "toolbar" to the top of the client screen that amounts to "click me pay us money". It only appears when you are logged in and is 50 pixels in height.

 

Which means the main screen in the game starts at (0,50). Go through the OSI includes and virtually everything assumes the top of the game client starts at (0,0). Except it no longer does: It now starts at (0,50) when you are logged in. And members can choose to hide the toolbar just to make life fun (although I don't know if anyone is even aware of that, or that feature still exists).

 

So if one of the OSI routines needs to count a color in the area (100,100,200,200) that breaks because it is now (100,150,200,250). My point is: If we had been searching the area (MSX1+96,MSY1+96,MSX1+196,MSY1+196) instead (MSX1=4,MSY1=4) then and only then could we safely update MSX1, MSY1 and have everything seamlessly "adapt" to the fact the client has moved down 50 pixels.

 

Edit: But I am the only one who shares this opinion and I'm sick of trying to explain my point. So have at 'er buddy glad your back.

Edited by Bixby Sayz
Link to comment
Share on other sites

Sorry forgot you were away. They added a "toolbar" to the top of the client screen that amounts to "click me pay us money". It only appears when you are logged in and is 50 pixels in height.

 

Which means the main screen in the game starts at (0,50). Go through the OSI includes and virtually everything assumes the top of the game client starts at (0,0). Except it no longer does: It now starts at (0,50) when you are logged in. And members can choose to hide the toolbar just to make life fun (although I don't know if anyone is even aware of that, or that feature still exists).

 

So if one of the OSI routines needs to count a color in the area (100,100,200,200) that breaks because it is now (100,150,200,250). My point is: If we had been searching the area (MSX1+96,MSY1+96,MSX1+196,MSY1+196) instead (MSX1=4,MSY1=4) then and only then could we safely update MSX1, MSY1 and have everything seamlessly "adapt" to the fact the client has moved down 50 pixels.

 

Edit: But I am the only one who shares this opinion and I'm sick of trying to explain my point. So have at 'er buddy glad your back.

 

I haven't had the time to observe this yet if it's RS2. And I probably won't get to it for a while until I have a bunch of RS07 stuff done (OSI2 will have a place holder for RS2 for the time being)

 

We'll talk about it after I've looked at it.

 

I'm guessing my adblocker deletes it? Can't you just close it manually O_o?

Link to comment
Share on other sites

Cannot wait for OSI 2 :D

Its a ghost

 

To Wanted, Bixby, and whoever doesn't know how the globals/constants work as of right now with the TOOLBAR shit:

 

Undoubtedly, the toolbar will show up, or maybe if you have "Ad Blocking" it'll just show a big BLACK box or something. Like this imageeeeeeeee.

And so, how does this "work around" or "hackzors" work to get around this big box. Lets talk about when the BIG BOX appears:

1. It appears at the login screen

2. And I think it does at the lobby screen too

3. BUT Once your "logged in" it disappears

 

So how can we approach that. We could change ALL the coordinates in the login functions (+50 to them). But hell nah. Think about SCAR's red box, from the client selector. Well. If you select Runescape. The BOX is obviously there sometimes, even if it isn't. TO SCAR it is. Thus we have to trim the Client variable in SCAR (GetClient). To however we want it. We don't need to "fix hacks or get rid of them". There is no hacks. OSI just changes the client for a second and then switches it back. So lets go over this:

 

[scar]

procedure RS2GlobalVars;

begin

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

RS2 Client Constants

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

RSX1 := 0; // Client Edge Points // 8/16/2011 Wanted 667

RSY1 := 0; // 8/16/2011 Wanted 667

RSX2 := 764; // 7/20/2012 Freddy 725

RSY2 := 502; // 7/20/2012 Freddy 725

RSCX := RSX2 div 2; // Client Center Points // 9/17/2012 LordJashin 725

RSCY := RSY2 div 2; // 9/17/2012 LordJashin 725

RSPW := RSX2 - RSX1 + 1; // Client Width // 10/6/2012 LordJashin 735

RSPH := RSY2 - RSY1 + 1; // Client Height // 10/6/2012 LordJashin 735

RSPA := RSPW * RSPH; // Client Pixel Area // 9/17/2012 LordJashin 725

RSClientY1Offset := 50; // Client Y1 Offset // 10/2/2012 LordJashin 735

RSBlank := 0; // Blank var 4 functions // 10/2/2012 LordJashin 735

RSMedX1 := 0; // MedClient Edge points // 10/4/2012 LordJashin 735

RSMedY1 := 0; // 10/4/2012 LordJashin 735

RSMedX2 := 1023; // 10/4/2012 LordJashin 735

RSMedY2 := 767; // 10/4/2012 LordJashin 735

end;

[/scar]

 

As you can see. ALL CLIENT CONSTANTS, are variables now. Why? So if any of this crap changes, and Jagex goes "Hey lets fuck with the toolbar and break all bots", we can go BOOOP BOOP BOOP in the globals, and with the built in Update procedure. If you choose to run it.... It will check github, and it will CHECK if any of these variables have been changed, and if so it'll update the variable(s).

 

[scar]

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

function RSupdateGlobals: Boolean;

Contributors: LordJashin

Description: Will update OSI: RS2's Global Variables to the latest on github

Date Created: October 3rd, 2012. By LordJashin.

Last Modified: October 14th, 2012. By LordJashin.

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

 

function RSupdateGlobals: Boolean;

var

Page: string;

uRSX1, uRSY1, uRSX2, uRSY2, uRSMedX1, uRSMedY1, uRSMedX2, uRSMedY2: Integer;

begin

Result := False;

OSI_WriteAndLog('RS2: Checking for updates to Globals...');

Page := GetPage('https://raw.github.com/OSI1/OSI1/master/RS2/Core/Globals.scar');

 

// RS2 Min Bounds

uRSX1 := StrToInt(StrCopyEx(Page, Pos('RSX1 :=', Page) + 8, PosEx(';', Page, Pos('RSX1 :=', Page)) - 1));

uRSY1 := StrToInt(StrCopyEx(Page, Pos('RSY1 :=', Page) + 8, PosEx(';', Page, Pos('RSY1 :=', Page)) - 1));

uRSX2 := StrToInt(StrCopyEx(Page, Pos('RSX2 :=', Page) + 8, PosEx(';', Page, Pos('RSX2 :=', Page)) - 1));

uRSY2 := StrToInt(StrCopyEx(Page, Pos('RSY2 :=', Page) + 8, PosEx(';', Page, Pos('RSY2 :=', Page)) - 1));

 

// RS2 Medium Bounds

uRSMedX1 := StrToInt(StrCopyEx(Page, Pos('RSMedX1 :=', Page) + 11, PosEx(';', Page, Pos('RSMedX1 :=', Page)) - 1));

uRSMedY1 := StrToInt(StrCopyEx(Page, Pos('RSMedY1 :=', Page) + 11, PosEx(';', Page, Pos('RSMedY1 :=', Page)) - 1));

uRSMedX2 := StrToInt(StrCopyEx(Page, Pos('RSMedX2 :=', Page) + 11, PosEx(';', Page, Pos('RSMedX2 :=', Page)) - 1));

uRSMedY2 := StrToInt(StrCopyEx(Page, Pos('RSMedY2 :=', Page) + 11, PosEx(';', Page, Pos('RSMedY2 :=', Page)) - 1));

 

if (RSX1 <> uRSX1) or (RSY1 <> uRSY1) or (RSX2 <> uRSX2) or (RSY2 <> uRSY2) then

begin

RSX1 := uRSX1;

RSY1 := uRSY1;

RSX2 := uRSX2;

RSY2 := uRSY2;

Result := True;

end;

 

if (RSMedX1 <> uRSMedX1) or (RSMedY1 <> uRSMedY1) or (RSMedX2 <> uRSMedX2) or (RSMedY2 <> uRSMedY2) then

begin

RSMedX1 := uRSMedX1;

RSMedY1 := uRSMedY1;

RSMedX2 := uRSMedX2;

RSMedY2 := uRSMedY2;

Result := True;

end;

if Result then

OSI_WriteAndLog('RS2: Globals (RS2, RSMed bounds) Updated!')

else

OSI_WriteAndLog('RS2: Globals (RS2, RSMed bounds) are Up To Date!')

end;

[/scar]

 

That was the idea anyway. I don't think that update procedure is the best yet. But it will update any of the RSX1, etc.

RSClientY1Offset is the +50 for the toolbar.

 

Here are the toolbar procedures that are ran. Like i said NO CONSTANTS HAVE BEEN CHANGED. JUST SCAR's CLIENT that has been set (if need be).:

 

[scar]

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

procedure UpdateRSClient;

Contributors: Freddy, LordJashin

Description: Updates the client/SMART, excludes the toolbar from the client area

Date Created: July 21th 2012. By Freddy. RS2 Build 725.

Last Modified: November 28th, 2012. By LordJashin. RS2 Build 735.

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

 

procedure UpdateRSClient;

{$IFNDEF SMART}

var

Client: TSCARClient;

{$ENDIF}

begin

if RS2_SkipToolbarUpdates then Exit;

{$IFDEF SMART}

if SMART_Client <> nil then

begin

if (SMART_Client.ImageArea = RSClientOriginalImageArea) then

with SMART_Client.ImageArea do

SMART_Client.ImageArea := Box(X1, Y1 + RSClientY1Offset, X2, Y2);

if (SMART_Client.InputArea = RSClientOriginalInputArea) then

with SMART_Client.InputArea do

SMART_Client.InputArea := Box(X1, Y1 + RSClientY1Offset, X2, Y2);

end;

{$ELSE}

Client := GetClient;

Client.Update;

if (Client.ImageArea = RSClientOriginalImageArea) then

with Client.ImageArea do

Client.ImageArea := Box(X1, Y1 + RSClientY1Offset, X2, Y2 + RSClientY1Offset);

if (Client.InputArea = RSClientOriginalInputArea) then

with Client.InputArea do

Client.InputArea := Box(X1, Y1 + RSClientY1Offset, X2, Y2 + RSClientY1Offset);

{$ENDIF}

end;

 

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

procedure RevertRSClient;

Contributors: LordJashin

Description: Reverts the client back to original image area for SMART/browser

Date Created: September 30th 2012. By LordJashin. RS2 Build 735.

Last Modified: November 28th 2012. By LordJashin. RS2 Build 735.

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

 

procedure RevertRSClient;

var

{$IFNDEF SMART}

Client: TSCARClient;

{$ENDIF}

B, B1: TBox;

begin

if RS2_SkipToolbarUpdates then Exit;

with RSClientOriginalImageArea do

B := Box(X1, Y1 + RSClientY1Offset, X2, Y2 {$IFNDEF SMART} + RSClientY1Offset{$ENDIF} );

with RSClientOriginalInputArea do

B1 := Box(X1, Y1 + RSClientY1Offset, X2, Y2 {$IFNDEF SMART} + RSClientY1Offset{$ENDIF} );

{$IFDEF SMART}

if SMART_Client <> nil then

begin

if (SMART_Client.ImageArea = B) then

with SMART_Client.ImageArea do

SMART_Client.ImageArea := Box(X1, Y1 - RSClientY1Offset, X2, Y2);

if (SMART_Client.InputArea = B1) then

with SMART_Client.InputArea do

SMART_Client.InputArea := Box(X1, Y1 - RSClientY1Offset, X2, Y2);

end;

{$ELSE}

Client := GetClient;

Client.Update;

if (Client.ImageArea = B) then

with Client.ImageArea do

Client.ImageArea := Box(X1, Y1, X2, Y2);

if (Client.InputArea = B1) then

with Client.InputArea do

Client.InputArea := Box(X1, Y1, X2, Y2);

{$ENDIF}

end;

[/scar]

 

Like srsly guys, the first thing you need to know about RS2 in OSI is the GLOBALS stuff Like

you can SKIP the toolbar update, and the RSReady checking:

 

[scar]

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

var RS2_CheckForUpdates

Contributors: LordJashin

Description: If set to true, will check github for updates to GlobalVars (RSX1..RSMed, etc)

Date Created: October 14th, 2012. By LordJashin. RS2 Build 735.

Last Modified: October 14th, 2012. By LordJashin. RS2 Build 735.

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

 

var

RS2_CheckForUpdates: Boolean;

 

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

var RS2_SkipToolbarUpdates: Boolean;

Contributors: LordJashin

Description: If set to true, will skip changing of Clients for the toolbar in RS2

Date Created: November 27th, 2012. By LordJashin. RS2 Build 745.

Last Modified: November 27th, 2012. By LordJashin. RS2 Build 745.

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

 

var

RS2_SkipToolbarUpdates: Boolean;

 

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

var RS2_SkipSetupRSReady: Boolean;

Contributors: LordJashin

Description: If set to true, will skip checking for RSReady when you SetupOSI.

Date Created: November 27th, 2012. By LordJashin. RS2 Build 745.

Last Modified: November 27th, 2012. By LordJashin. RS2 Build 745.

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

 

var

RS2_SkipSetupRSReady: Boolean;

[/scar]

 

- - - Updated - - -

 

Trust me, the way the toolbar system is setup now in OSI. Works Great! I mean. Those functions actually check the sizes, and everything. They are a bit big, but they WORK. They are ran in the SetupOSI procedure I think. Anyway, you guys need to understand that, the BIG BOX only shows up at certain screens. So we need to change the client whenever those screens appear. But we could change the RSX1 variable. But but hey, not all the constants are "based off each other" yet I don't think, yeah they aren't:

 

[scar]

entPlayer := NextActivePlayerIndex;

OSI_WriteAndLog('RS2: Logging in ' + Copy(Capitalize(Players[CurrentPlayer].Name), 1, 4) + '...');

ProcStart: // Retry Login Mark

B3 := (CountColor(10141389, 345, 268, 418, 280) = 143); // Auto setup graphics

if (not (B3)) then

B4 := (CountColor(10141389, 343, 278, 418, 290) = 143); // Available changed

if (B3) then

MouseBox(349, 273, 414, 275, ClickLeft)

else

if (B4) then

[/scar]

 

We can change the RSX1, RSX2, Offsets, whenever we want if need be For Now. Now if you want to go through and mess with all the Count colors, and make them relative or anything. OR even make more constants (like I did). everything based off constants. Then with the levels of constants, make them based off each other. (O_O)

 

Also, not everything can be relative too much. Main screen, fine. But login screen? The only thing those coords could be relative to is RSX1, RSY1. Which means you would have to go in and change the find color to RSX1 + 600 or w/e.

 

Maybe this is all good ideas. I'd hate to go through and add RSX1 + to everything though, make it bulkier. I guess it makes sense though.

 

But when your "logged in" you'd have to change the RSY1 variable back to "0" instead of "50".

Edited by LordJashin
Link to comment
Share on other sites

I'll explore that later. From what I understand this does not affect RS07, and only RS2?

Yeah only RS2.

 

But when your "logged in" you'd have to change the RSY1 variable back to "0" instead of "50".

No. RSY1 is always 0. Always. The size/position of the client does not change.

 

The client is the same with the addition of a new in game area (the toolbar). The other areas are shuffled around to make room for it within the bounds of (RSX1,RSY1,RSX2,RSY2). These 4 coordinates are the same. And when you are at the login screen nothing has changed. Because everything is relative to (RSX1, RSY1) which hasn't changed.

 

When you are logged in the position of the in game areas (MSnn, MMnn, MCnn, MInn, etc) are +50 pixels vertically from their old values. They are still fixed, just different. So we should be able to (in theory) be able to simply +50 to MSY1, +50 to MIY1, and so on. And everything is fixed. Voila.

 

Except we are all guilty of not using the screen constants to their full potential. We are all guilty of using absolute coordinates . Ex: Click button at (200, 220) instead of using click button at (MS+196, MS+216). Had we all done that in all of scripts and the includes all of this would be a moot point. Adjust a couple constants and everything is fixed.

 

Instead we moved the entire client area "down" 50 pixels so we wouldn't have to clean up our mess and make things right. It worked but it isn't pretty and now we are having to move the client up sometimes then down sometimes. Ugly.

Link to comment
Share on other sites

OSI is still limping along with the port of SMART 7.2 that Freddy came up with. It has more than a few issues and is buggy as hell. A lot are due to SMART itself, but the OSI version is not as stable as the official one I find.

 

There is a version 8.0 out that is more stable and moves java out into its own process and supports loading the other graphics modes (still can't read the screen though). This isn't officially used even with SRL/Simba although most everyone has simply manually updated. A lot of new scripts are requiring SMART 8.0. BenLand has come out with 8.1 which adds support for SMART to run plugins that people develop (such as read the OpenGL screen; a work in progress) but it has been beta forever even though its finished.

 

I started to look at making SMART 8.0/8.1 work with SCAR for kicks but got bogged down with the loading. Calling Java with the exact same arguments from a command prompt works. Trying to invoke in Delphi with the exact same arguments doesn't. Got busy with other projects in real life and put it on the back burner.

 

I'm curious what you found buggy? I've been running in OSI 2 RS07 w/ 7.2 and everything I've tested so far works :S

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