Originally Posted by
Swag Bag
I'm getting a gtx 970 with my new computer so hopefully that will work well. @(The Mayor) Do you know if the Direct X hook will have a similar library or be completely different? I'm excited about this.
Note: How do I tag...
I highly doubt it for a number of reasons, but I'll only get into a couple of them:
If directX turns out to be a feasible option I would like to see it integrated into SRL. There would just be a few methods like getModels(), getTextures() and getFonts() and their respective overloads. It doesn't need to be a standalone library because because it's not as powerful as reflection and somethings will still be easier with SRL-6. The only really hard thing with colour is finding objects on the mainScreen, particularly ones with clashing colours.
For example, something like:
Simba Code:
program example;
{$DEFINE DX} // If you want it, declare it, else don't
{$DEFINE SMART}
{i srl/srl-6.simba}
procedure mineRock();
var
i: Integer;
TPA: TPointArray;
begin
TPA := dx.getModels(123456, mainScreen.getBounds()).toTPA(); // returning models as a TPA, only look on the MS
TPA.sortFromPoint(mainScreen.playerPoint); // and from here work the TPA like you normally would:
for i := 0 to high(TPA) do
begin
mouse(TPA[i].rand(5), MOUSE_MOVE);
if isMouseOverText(['Mine']) then
begin
fastClick(MOUSE_LEFT);
break;
end;
end;
// or alternatively, do it in one line by returning the closest model as a TPoint
mouse(dx.getModels(2718818122, mainScreen.getBounds()).closest(mainScreen.playerPoint).rand(5), MOUSE_LEFT);
end;
begin
setupSRL();
mineRock();
end;
The last thing we want is more includes floating around. With the release of cLib yesterday I counted 8 individual includes that are currently being used in scripts. It would just be easier for everyone (developers, scripters, script users) if we kept it simple.