SRL Archive - General Botting Help

openGL


gaspola

2013-09-27 06:18:55

I do not know if this is the right section of the forum to make this my question, but when will be released for Srl6 openGL?
could someone give me an answer?
thanks to all: P

rj

2013-09-27 06:26:49

When will SRL6 be released for openGL? What do you mean like a openGL include? There is already a openGL include by Brandon, I heard there are some compatibility issues or something so you would have to ask him

http://villavu.com/forum/showthread.php?t=104932

gaspola

2013-09-28 14:58:40

From: Officer Barbrady
When will SRL6 be released for openGL? What do you mean like a openGL include? There is already a openGL include by Brandon, I heard there are some compatibility issues or something so you would have to ask him

http://villavu.com/forum/showthread.php?t=104932


sorry but this link is opengl for srl5 no for srl6 :P

DemiseScythe

2013-09-28 16:14:44

From: gaspola
sorry but this link is opengl for srl5 no for srl6 :P


OGL and SRL6 are two completely different things.

OGL is different from SRL5 and has been working since RS3 came out.

Sjoe

2013-09-29 10:31:02

He probs just want Brandon to make the OGL plugin compatible with the latest simba/srl

serajin

2013-09-29 11:27:13

From: DemiseScythe
OGL and SRL6 are two completely different things.

OGL is different from SRL5 and has been working since RS3 came out.


With the release of SRL-6 and SetupSRL/SpawnSmart through SRL-6, the GLX.dll no longer hooks the smart client,and therefore is unable to function correctly. I let @Brandon know about it, and he said he'd work on it. But I imagine he has other things to do as well.

Brandon

2013-09-29 11:56:12

From: serajin
With the release of SRL-6 and SetupSRL/SpawnSmart through SRL-6, the GLX.dll no longer hooks the smart client,and therefore is unable to function correctly. I let @Brandon know about it, and he said he'd work on it. But I imagine he has other things to do as well.



If that's what you meant then that is incorrect. SRL-6 uses a "COLOUR ONLY" version of the plugin because the dev's did not want Hooks in the include and if anything were to happen to me, there would still be a working .dll as the colour can NEVER be broken regardless of whether the game engine changes (because all versions of OpenGL uses wglSwapBuffers for rendering). This much is guaranteed.


Thus I maintain two sets of code for the plugins:

Colour-Only (ships with SRL-6):
https://github.com/Brandon-T/GLX-Colour/releases

Hooks (both colour and hooks):
https://github.com/Brandon-T/GLX


Both support browsers and Smart v8.3.

Regardless, both are still OpenGL so yes SRL-6 uses OpenGL and so does the include I wrote as well. However, the two includes aren't compatible. I made them semi-compatible yesterday but I haven't released it yet and I'm hesitant because I don't want to use SRL-6's Smart.Simba and Graphics.Simba include. Everything else, I don't mind changing but I will not be changing those two files unless push comes to shove.

Running both in a browser isn't as easy atm but I'm waiting on the Simba devs to add a function to Simba for me to get the target window handle otherwise if none in a couple days, I'll have to roll my own.


TLDR:

You can use the plugin with hooks for SRL-6 and my include; you cannot use the colour-only plugin with my include.
SRL-6's ships with a colour only plugin and will survive regardless of changes to the game/game-engine and is maintainable by anyone (not just me).

Olly

2013-09-29 12:32:48

From: Brandon

Regardless, both are still OpenGL so yes SRL-6 uses OpenGL and so does the include I wrote as well. However, the two includes aren't compatible. I made them semi-compatible yesterday but I haven't released it yet and I'm hesitant because I don't want to use SRL-6's Smart.Simba and Graphics.Simba include. Everything else, I don't mind changing but I will not be changing those two files unless push comes to shove


What is wrong with srl-6's smart.simba and drawing.simba? curious, I'm all down to change stuff if some things aren't right/could be done better.

Brandon

2013-09-29 13:25:04

From: Olly
What is wrong with srl-6's smart.simba and drawing.simba? curious, I'm all down to change stuff if some things aren't right/could be done better.


I have nothing against the SRL-6 include. In fact, I'd say it is better than well written. It is superb and includes debugging and logging and everything. However, the following may be notable and you might see why I'm hesitant to change over to full SRL-6 compatibility:


Already discussed on IRC (missing from SRL-6):

ability to load various plugins into Smart via a parameter or string array (not just the OpenGL plugin).
support to spawn in any-mode (safemode or otherwise.
freeing of smart after every pair to prevent a leak (just in case).

Smart:
Ex:

Procedure TSmart.Create(Width, Height: Integer; Plugins: TStringArray = []); overload; //Plugins as an array.
Begin
Self.Create(Width, Height, 's', Plugins); //spawns in safemode with the 's' parameter.
End;

Procedure TSmart.Create(Width, Height: Integer; InitSequence: String; Plugins: TStringArray = []); overload;


SmartSpawnClient(..., '-XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=30', Implode(',', Plugins)); //Split plugins by comma delimiter required by Smart's internals.

Personally, I like the object oriented approach where you create your own Smart instance and spawn it. However, I also like SRL's global smart instance.

Support for OSRS and Reflection + Wrappers:
I took the time to write out wrappers for ease of use for all versions of RS.
You want to change Smart's refresh rate you do: Smart.SetRefresh(value). No need to worry about all Smart's internals and targets and all that stuff. The reflection wrappers are also below.




{$IFDEF SmartWrappers}
Procedure TSmart.SetRefresh(Value: Integer);
Begin
SmartSetRefresh(Self.Target, Value);
End;

Function TSmart.GetRefresh: Integer;
Begin
Result := SmartGetRefresh(Self.Target);
End;

Procedure TSmart.SetTransparentColor(Colour: Integer);
Begin
SmartSetTransparentColor(Self.Target, Colour);
End;

Procedure TSmart.SetDebug(Enabled: Boolean);
Begin
SmartSetDebug(Self.Target, Enabled);
End;

Procedure TSmart.SetEnabled(Enabled: Boolean);
Begin
SmartSetEnabled(Self.Target, Enabled);
End;

Function TSmart.Active: Boolean;
Begin
Result := SmartActive(Self.Target);
End;

Function TSmart.Enabled: Boolean;
Begin
Result := SmartEnabled(Self.Target);
End;

Procedure TSmart.GetMousePos(var X, Y: Integer);
Begin
SmartGetMousePos(Self.Target, X, Y);
End;

Procedure TSmart.HoldMouse(X, Y: Integer; Left: Boolean);
Begin
SmartHoldMouse(Self.Target, X, Y, Left);
End;

Procedure TSmart.ReleaseMouse(X, Y: Integer; Left: Boolean);
Begin
SmartReleaseMouse(Self.Target, X, Y, Left);
End;

Procedure TSmart.HoldMousePlus(X, Y, Button: Integer);
Begin
SmartHoldMouse(Self.Target, X, Y, Button);
End;

Procedure TSmart.ReleaseMousePlus(X, Y, Button: Integer);
Begin
SmartReleaseMousePlus(Self.Target, X, Y, Button);
End;

Procedure TSmart.MoveMouse(X, Y: Integer);
Begin
SmartMoveMouse(Self.Target, X, Y);
End;

Procedure TSmart.WindMouse(X, Y);
Begin
SmartWindMouse(Self.Target, X, Y);
End;

Procedure TSmart.ClickMouse(X, Y: Integer; Left: Boolean);
Begin
SmartClickMouse(Self.Target, X, Y, Left);
End;

Procedure TSmart.ClickMousePlus(Self.Target, X, Y, Button: Integer);
Begin
SmartClickMousePlus(Self.Target, X, Y, Button);
End;

Procedure TSmart.IsMouseButtonHeld(Button: Integer);
Begin
SmartIsMouseButtonHeld(Self.Target, Button);
End;

Procedure TSmart.ScrollMouse(X, Y);
Begin
SmartScrollMouse(Self.Target, X, Y, 3);
End;

Procedure TSmart.SendKeys(Text: String; KeyWait, KeyMod: Integer);
Begin
SmartSendKeys(Self.Target, Text, KeyWait, KeyMod);
End;

Procedure TSmart.HoldKey(Code: Integer);
Begin
SmartHoldKey(Self.Target, Code);
End;

Procedure TSmart.ReleaseKey(Code: Integer);
Begin
SmartReleaseKey(Self.Target, Code);
End;

Function TSmart.IsKeyDown(Code: Integer): Boolean;
Begin
Result := SmartIsKeyDown(Self.Target, Code);
End;

Procedure TSmart.SetCapture(Enabled; Boolean);
Begin
SmartSetCapture(Self.Target, Enabled);
End;

Procedure TSmart.SetNativeButton(PluginID, ButtonID: Integer; State: Boolean);
Begin
SmartSetNativeButton(Self.Target, PluginID, ButtonID, State);
End;
{$ENDIF}


The support for reflection:

{$IFDEF SmartReflectionWrappers}
Function TSmart.GetFieldArraySize(Reference: Integer; Path: String; Dimension: Integer): Integer;
Begin
Result := SmartGetFieldArraySize(Self.Target, Reference, Path, Dimension);
End;

Procedure TSmart.FreeObject(Reference: Integer);
Begin
SmartFreeObject(Self.Target, Reference);
End;

Function TSmart.GetFieldObject(Reference: Integer; Path: String): Integer;
Begin
Result := SmartGetFieldObject(Self.Target, Reference, Path);
End;

Function TSmart.GetFieldBoolean(Reference: Integer; Path: String): Boolean;
Begin
Result := SmartGetFieldBoolean(Self.Target, Reference, Path);
End;

Function TSmart.GetFieldLongH(Reference: Integer; Path: String): Integer;
Begin
Result := SmartGetFieldLongH(Self.Target, Reference, Path);
End;

Function TSmart.GetFieldLongL(Reference: Integer; Path: String): Integer;
Begin
Result := SmartGetFieldLongL(Self.Target, Reference, Path);
End;

Function TSmart.GetFieldInt(Reference: Integer; Path: String): Integer;
Begin
Result := SmartGetFieldInt(Self.Target, Reference, Path);
End;

Function TSmart.GetFieldShort(Reference: Integer; Path: String): Integer;
Begin
Result := SmartGetFieldShort(Self.Target, Reference, Path);
End;

Function TSmart.GetFieldFloat(Reference: Integer; Path: String): Extended;
Begin
Result := SmartGetFieldFloat(Self.Target, Reference, Path);
End;

Function TSmart.GetFieldDouble(Reference: Integer; Path: String): Extended;
Begin
Result := SmartGetFieldObject(Self.Target, Reference, Path);
End;

Function TSmart.GetFieldByte(Reference: Integer; Path: String): Integer;
Begin
Result := SmartGetFieldByte(Self.Target, Reference, Path);
End;

Function TSmart.GetFieldArray2DObject(Reference: Integer; Path: String; X, Y: Integer): Integer;
Begin
Result := SmartGetFieldArray2DObject(Self.Target, Reference, Path, X, Y);
End;

Function TSmart.GetFieldArray2DInt(Reference: Integer; Path: String; X, Y: Integer): Integer;
Begin
Result := SmartGetFieldArray2DInt(Self.Target, Reference, Path, X, Y);
End;

Function TSmart.GetFieldArray2DDouble(Reference: Integer; Path: String; X, Y: Integer): Extended;
Begin
Result := SmartGetFieldArray2DDouble(Self.Target, Reference, Path, X, Y);
End;

Function TSmart.GetFieldArray2DFloat(Reference: Integer; Path: String; X, Y: Integer): Extended;
Begin
Result := SmartGetFieldArray2DFloat(Self.Target, Reference, Path, X, Y);
End;

Function TSmart.GetFieldArray2DBoolean(Reference: Integer; Path: String; X, Y: Integer): Boolean;
Begin
Result := SmartGetFieldArray2DBoolean(Self.Target, Reference, Path, X, Y);
End;

Function TSmart.GetFieldArray2DLongH(Reference: Integer; Path: String; X, Y: Integer): Integer;
Begin
Result := SmartGetFieldArray2DLongH(Self.Target, Reference, Path, X, Y);
End;

Function TSmart.GetFieldArray2DLongL(Reference: Integer; Path: String; X, Y: Integer): Integer;
Begin
Result := SmartGetFieldArray2DLongL(Self.Target, Reference, Path, X, Y);
End;

Function TSmart.GetFieldArray2DByte(Reference: Integer; Path: String; X, Y: Integer): Integer;
Begin
Result := SmartGetFieldArray2DByte(Self.Target, Reference, Path, X, Y);
End;

Function TSmart.GetFieldArray2DChar(Reference: Integer; Path: String; X, Y: Integer): Integer;
Begin
Result := SmartGetFieldArray2DChar(Self.Target, Reference, Path, X, Y);
End;

Function TSmart.GetFieldArray2DShort(Reference: Integer; Path: String; X, Y: Integer): Integer;
Begin
Result := SmartGetFieldArray2DShort(Self.Target, Reference, Path, X, Y);
End;

Function TSmart.GetFieldArray2DObject(Reference: Integer; Path: String; X, Y: Integer): Integer;
Begin
Result := SmartGetFieldArray2DObject(Self.Target, Reference, Path, X, Y);
End;

Function TSmart.GetFieldArray3DObject(Reference: Integer; Path: String; X, Y, Z: Integer): Integer;
Begin
Result := SmartGetFieldArray3DObject(Self.Target, Reference, Path, X, Y, Z);
End;

Function TSmart.GetFieldArray3DByte(Reference: Integer; Path: String; X, Y, Z: Integer): Integer;
Begin
Result := SmartGetFieldArray3DByte(Self.Target, Reference, Path, X, Y, Z);
End;

Function TSmart.GetFieldArray3DChar(Reference: Integer; Path: String; X, Y, Z: Integer): Integer;
Begin
Result := SmartGetFieldArray3DChar(Self.Target, Reference, Path, X, Y, Z);
End;

Function TSmart.GetFieldArray3DShort(Reference: Integer; Path: String; X, Y, Z: Integer): Integer;
Begin
Result := SmartGetFieldArray3DShort(Self.Target, Reference, Path, X, Y, Z);
End;

Function TSmart.GetFieldArray3DInt(Reference: Integer; Path: String; X, Y, Z: Integer): Integer;
Begin
Result := SmartGetFieldArray3DInt(Self.Target, Reference, Path, X, Y, Z);
End;

Function TSmart.GetFieldArray3DFloat(Reference: Integer; Path: String; X, Y, Z: Integer): Extended;
Begin
Result := SmartGetFieldArray3DFloat(Self.Target, Reference, Path, X, Y, Z);
End;

Function TSmart.GetFieldArray3DDouble(Reference: Integer; Path: String; X, Y, Z: Integer): Extended;
Begin
Result := SmartGetFieldArray3DDouble(Self.Target, Reference, Path, X, Y, Z);
End;

Function TSmart.GetFieldArray3DBoolean(Reference: Integer; Path: String; X, Y, Z: Integer): Boolean;
Begin
Result := SmartGetFieldArray3DBoolean(Self.Target, Reference, Path, X, Y, Z);
End;

Function TSmart.GetFieldArray3DLongH(Reference: Integer; Path: String; X, Y, Z: Integer): Integer;
Begin
Result := SmartGetFieldArray3DLongH(Self.Target, Reference, Path, X, Y, Z);
End;

Function TSmart.GetFieldArray3DLongL(Reference: Integer; Path: String; X, Y, Z: Integer): Integer;
Begin
Result := SmartGetFieldArray3DLongL(Self.Target, Reference, Path, X, Y, Z);
End;

Function TSmart.IsPathValid(Reference: Integer; Path: String): Boolean;
Begin
Result := SmartIsPathValid(Self.Target, Reference, Path);
End;

Function TSmart.IsEqual(ObjectOne, ObjectTwo: Integer): Boolean;
Begin
Result := SmartIsEqual(Self.Target, ObjectOne, ObjectTwo);
End;

Function TSmart.IsNull(Reference: Integer): Boolean;
Begin
Result := SmartIsNull(Self.Target, Reference);
End;

Function TSmart.StringFromString(JavaString: Integer; Str: String): Integer;
Begin
Result := SmartStringFromString(Self.Target, JavaString, Str);
End;

Function TSmart.StringFromBytes(Bytes: Integer; Str: String): Integer;
Begin
Result := SmartStringFromBytes(Self.Target, Bytes, Str);
End;

Function TSmart.StringFromChars(Chars: Integer; Str: String): Integer;
Begin
Result := SmartStringFromChars(Self.Target, Chars, Str);
End;
{$ENDIF}


Graphics:

For Graphics.Simba I prefer to contain the TMufasaBitmap as an internal type for ease of use.

Example for SRL-6 I'd have to do:

var
T: TMufasaBitmap;
begin
T.Init(client.getMBitmaps());
T.SetSize(Width, Height);
T.DrawBox(0, 0, 100, 100);
T.Free();
end.

whereas if it is internal:

var
T: TGraphics;
begin
T.Create(Width, Height);
T.DrawBox(0, 0, 100, 100);
end.
//Automatically free's upon termination (just in case you forget). Can also be freed manually.

Ease of use for new users (difference in the API's and the overloads):

Procedure TGraphics.Create(Img: Integer; Copy: Boolean = False); //Same as below.
Procedure TGraphics.Create(Img: TMufasaBitmap; Copy: Boolean = False); overload //Create a bitmap from another bitmap. Copy OR by reference.
Procedure TGraphics.Create(Width, Height: Integer); overload; //Creates a bitmap of width * height.
Procedure TGraphics.Create(Width, Height: Integer; Ptr: Uint32); overload //Creates a bitmap from a pointer.


overloads.. so you can just do Graphics.DrawBox(0, 0, 100, 100) or Graphics.DrawBox(SomeTBoxHere);
overloads.. for clipping a box (the current SRL's function will throw if the box is out of bounds).
overloads for every possible type of parameter: X, Y vs. TPoint, etc..
Strongly typed Enums instead of plain old contants and integers.

Drawing text using a specific boldness, italics, etc..

Procedure TGraphics.DrawSystemText(Text, Font: String; Size: Integer; Style: TFontStyles; Position: TPoint = Point(0, 0); Colour: TColor = clRed); overload;

A lot is missing for "new" users. I don't have a problem changing the include to suit SRL-6. It's just, with all the benefits and overloads for ease of use already, why? Believe me, I would LOVE compatibility with SRL-6 more than anything but I'm not sure that users would like to lose out by a big chunk to be compatible. In the end, they'd gain a lot but lose a lot.

serajin

2013-09-29 15:26:57

From: Brandon
If that's what you meant then that is incorrect. SRL-6 uses a "COLOUR ONLY" version of the plugin because the dev's did not want Hooks in the include and if anything were to happen to me, there would still be a working .dll as the colour can NEVER be broken regardless of whether the game engine changes (because all versions of OpenGL uses wglSwapBuffers for rendering). This much is guaranteed.


Thus I maintain two sets of code for the plugins:

Colour-Only (ships with SRL-6):
https://github.com/Brandon-T/GLX-Colour/releases

Hooks (both colour and hooks):
https://github.com/Brandon-T/GLX


Both support browsers and Smart v8.3.

Regardless, both are still OpenGL so yes SRL-6 uses OpenGL and so does the include I wrote as well. However, the two includes aren't compatible. I made them semi-compatible yesterday but I haven't released it yet and I'm hesitant because I don't want to use SRL-6's Smart.Simba and Graphics.Simba include. Everything else, I don't mind changing but I will not be changing those two files unless push comes to shove.

Running both in a browser isn't as easy atm but I'm waiting on the Simba devs to add a function to Simba for me to get the target window handle otherwise if none in a couple days, I'll have to roll my own.


TLDR:

You can use the plugin with hooks for SRL-6 and my include; you cannot use the colour-only plugin with my include.
SRL-6's ships with a colour only plugin and will survive regardless of changes to the game/game-engine and is maintainable by anyone (not just me).


Ahh, but alas you have removed the binaries for the straight GLX.dll plugin =P

I figure you'll be putting those back up when you have time? Thank you for the work you've done.

gaspola

2013-09-29 18:31:25

From: Brandon
If that's what you meant then that is incorrect. SRL-6 uses a "COLOUR ONLY" version of the plugin because the dev's did not want Hooks in the include and if anything were to happen to me, there would still be a working .dll as the colour can NEVER be broken regardless of whether the game engine changes (because all versions of OpenGL uses wglSwapBuffers for rendering). This much is guaranteed.


Thus I maintain two sets of code for the plugins:

Colour-Only (ships with SRL-6):
https://github.com/Brandon-T/GLX-Colour/releases

Hooks (both colour and hooks):
https://github.com/Brandon-T/GLX


Both support browsers and Smart v8.3.

Regardless, both are still OpenGL so yes SRL-6 uses OpenGL and so does the include I wrote as well. However, the two includes aren't compatible. I made them semi-compatible yesterday but I haven't released it yet and I'm hesitant because I don't want to use SRL-6's Smart.Simba and Graphics.Simba include. Everything else, I don't mind changing but I will not be changing those two files unless push comes to shove.

Running both in a browser isn't as easy atm but I'm waiting on the Simba devs to add a function to Simba for me to get the target window handle otherwise if none in a couple days, I'll have to roll my own.


TLDR:

You can use the plugin with hooks for SRL-6 and my include; you cannot use the colour-only plugin with my include.
SRL-6's ships with a colour only plugin and will survive regardless of changes to the game/game-engine and is maintainable by anyone (not just me).

excuse my ignorance :) but I wanted to ask you what you could tell me more 'or less would it take to finish it all? I know it is a question with many variables but could you tell me a time??
ty for your work :D

Brandon

2013-09-29 19:16:53

From: gaspola
excuse my ignorance :) but I wanted to ask you what you could tell me more 'or less would it take to finish it all? I know it is a question with many variables but could you tell me a time??
ty for your work :D


It is already finished. SRL-6 is already released. See here: http://villavu.com/forum/showthread.php?t=105997

gaspola

2013-09-30 03:23:48

From: Brandon
It is already finished. SRL-6 is already released. See here: http://villavu.com/forum/showthread.php?t=105997


ahn no wait :D when you finisch opengl for srl6?

Olly

2013-09-30 09:37:54

From: Brandon
lots of nice letters..


Well, ive updated smart to have initseq variable, smart plugins variable, fix that memory leak also a variable for the button id of the native debug button.

Il add some more TMufasaBitmap overloads soon, we did used to have a TGraphic bitmap type but we decided to get rid of it because 90% of it is just repeating code.

Thanks for the feedback though :)