Jump to content
BryceTheCoder

What in Binland100's source really loads the RS2 Client?

Recommended Posts

Hey i am looking at Binlands source and it looks like its coded in both C++ and Java.

 

Soo i an idea with a project im just playing around with.

 

What exactly in his source is the loader of the RS2 Client?

 

EDIT: OMG, i just now realized something..... is the SMART client loading a reflection bot, injection bot, or just loading it???

 

but wait... it wud have to be a reflection bot correct? It has a mouse hook?? Im so confused... please giv me alil info on the bot loading, bcuz i wud love to use this client in my project.

Edited by BryceTheCoder
Link to comment
Share on other sites

You can load RS2 yourself using SMART, but not the latest SMART unless you use the things Freddy made for it as detailed in OSI. The old SMART can still be loaded I think stand alone, i forget.

 

BenLands project basically is coded in JAVA, and then some files are C, C++, whatever. Then he provides (I think) Bindings for other languages. From what I've learned, the bindings mean this is how you use it in for instance Delphi, or w/e language.

 

Benlands SMART is very complex looking because of all that it does. Has a bunch of systems, and different file types (for different languages or w/e). For compatibility with linux and windows, etc. Then he had to encapsulate a JAR inside a window and interact with its params, and etc. etc.

 

Probably not hard to do at all, but as for the minimizable, you would need some more advanced knowledge. SMART did used to have reflection in it, but it has been since removed afaik or not used really.

Link to comment
Share on other sites

I am not big into C++/C#/etc too much. But I know some of VB. I would imagine it wouldn't be that difficult.

 

What does SCAR do to load SMART or the old SMART? Freddy made a wrapper for the new one, I think in a DLL file or something. It may be in C or some language that you can use with your project.

 

Then you would just load the DLL Like how SCAR does. You might need some extra things though. Load it, and on terminate unload it. Note the functions would look much different in C# I'd imagine.

Put that in your main loop. Int Arg or w/e.

 

 

Microsoft MSDN, LoadLibrary function. You need to have the Windows API header/include included, or w/e one needs to be there for that function for C# or VB.

Link to comment
Share on other sites

well thank god im better at VisualBasic, so im going to use that then.

 

Soo unforteuntly i dont have the .dll for the old SMART client? Do u kno where to get it? And i have no idea on how to open a .dll file in visual basic. I guess i cud youtube it, or do u kno maybe?

 

EDIT: Ok, so i went to here https://github.com/BenLand100/SMART/downloads and download verison 6.9 and 7.0 which contains "embedded_SMART.dll" which i tried to add as a reference in visual basic buuutt it says it cant use that dll, sooo (if im doing that right) can u help me plz?:/

Edited by BryceTheCoder
Link to comment
Share on other sites

You have to use the function LoadLibrary in the main loop of your visual basic program.

 

Load Library MSDN - http://msdn.microsoft.com/en-us/library/windows/desktop/ms684175%28v=vs.85%29.aspx

 

Comments on syntax with each language:

 

 vb.net syntax

<DllImport("kernel32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
Public Shared Function LoadLibrary(<[in], MarshalAs(UnmanagedType.LPTStr)> ByVal lpFileName As String) As IntPtr
End Function

C# syntax:

[DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)]
internal static extern IntPtr LoadLibrary([in, MarshalAs(UnmanagedType.LPStr)] string lpFileName);

Usage of [in, MarshalAs(UnmanageType.LPStr)] causes LoadLibrary call to fail in my case.  Removing it works.  Comment below seems to confirm.

Visual Basic 9 and C# Declarations:

 Public Declare Auto Function LoadLibrary Lib "kernel32" (ByVal lpLibFileName As String) As IntPtr

 [DllImport("kernel32", CharSet=CharSet.Unicode)]
 static extern IntPtr LoadLibrary(string lpLibFileName);

Link to comment
Share on other sites

allriiight, i dont see exactly what this does. (i dont believe im putting in right spot) i put my loadlibrary in a button click, shud i do it somewhere else or something? I dont udnerstand how this will help run the SMART client in my VB.

 

My usage:

   <DllImport("kernel32.dll", CharSet:=CharSet.Auto, SetLastError:=True)> _
   Public Shared Function LoadLibrary(<[in](), MarshalAs(UnmanagedType.LPTStr)> ByVal lpFileName As String) As IntPtr
   End Function

   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       LoadLibrary("C:\Users\Chris\Desktop\thedll\Embedded_SMART.dll")
   End Sub

 

the smart versiion 6.9 files is in a folder called "thedll"

Link to comment
Share on other sites

If you knew how it works in SCAR. Then use the same concepts. You load the SMART library then use the functions in it. Then free it eventually. But you probably need more to be able to send input to SMART.

 

Ill try to use SMARTs bindings and get this working for you later...

 

 

EDIT: Well I tried, lols

 


Public Class Form1
   Private Declare Function FreeLibrary Lib "kernel32" (ByVal hModule As IntPtr) As Boolean
   Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
   Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As IntPtr, ByVal lpProcName As String) As IntPtr
   Private Declare Function CallWindowProc Lib "user32" Alias "CallWindowProc" (ByVal wndProc As IntPtr, ByVal hWnd As IntPtr, ByVal msg As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As IntPtr

   Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

       On Error Resume Next
       Dim lb As Long, pa As Long
       'We're going to call an API-function, without declaring it!
       'map 'user32' into the address space of the calling process.
       lb = LoadLibrary("libsmartjni32.dll")
       'retrieve the address of 'SetWindowTextA'

       pa = GetProcAddress(lb, "SmartSetup")
       SmartSetup("http://world17.runescape.com/", ",f5", 500, 500, "s")
       'unmap the library's address
       FreeLibrary(lb)


   End Sub
End Class

Edited by LordJashin
Link to comment
Share on other sites

I attempted it. In Benlands test apps folder he has examples for C++ and others. - https://github.com/BenLand100/SMART/blob/master/test-apps/test-spawn.cpp

 

But none for Visual Basic. I bet some1 cool enough could show you how to do it, but I give up on trying. The Variable types have to be exactly correct, and Idk exactly how the inside of SMART works too much.

I think it would be a safe bet to convert that test file to VB. Like the code in his main arg.

Link to comment
Share on other sites

I attempted it. In Benlands test apps folder he has examples for C++ and others. - https://github.com/BenLand100/SMART/blob/master/test-apps/test-spawn.cpp

 

But none for Visual Basic. I bet some1 cool enough could show you how to do it, but I give up on trying. The Variable types have to be exactly correct, and Idk exactly how the inside of SMART works too much.

I think it would be a safe bet to convert that test file to VB. Like the code in his main arg.

 

dammit.. so i am not good at all in C++ soo i guess i shud try and find someone to convert the test app in the c++ to convert it to visual basic, that wud b nice.

Link to comment
Share on other sites

You can compile and run the C++ test app he has, but as for getting it to work with Visual Basic here's what you would need to figure out:

 

1. How da fuk do you load a library in Visual Basic without having to manually use proc definitions. So e.g. NO dang 'dllimport' function name(params) etc. in the head of the file.

2. If you can't do that you would need to find out how to import the functions needed from the SMART.dll or w/e. (tried already) They have to have the right variable types, and everything.

3. Once you get that figured out, and you can actually use the code helper and see the functions inside SMART.dll (somehow). Then try to set it up so it loads up ...e.g. SetupSMART, and get the client up. Which may be harder then hell considering his C++ test app.

 

I know mostly Delphi, never worked the same amount on any other language really. So I can't say I know them fully or remember too much. But I do remember the basics, and the syntax a little bit. Vb though I really have no idea lol, I learned more C++ than VB. However VB isn't too terribly bad, its a wanna be delphi syntax that I like a lot more than C++ in ways.

Link to comment
Share on other sites

Do you know you can do this with python ? Python is free , very good language. Powerfull .

 

If you make your script well , the script can run on linux and mac too.

 

You can have free ide .

 

And many others things.

 

Well, there's plenty of free and powerful languages, the learning curve is something else :)

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