BryceTheCoder Posted October 25, 2012 Share Posted October 25, 2012 (edited) 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 October 25, 2012 by BryceTheCoder Quote Link to comment Share on other sites More sharing options...
LordJashin Posted October 25, 2012 Share Posted October 25, 2012 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. Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted October 25, 2012 Author Share Posted October 25, 2012 (edited) oohh alright that helped me alil cool:) Thnx, bbut so u think i can add the older SMART client to my C# or VB project? EDIT: And if so, can u help me rlly quick?:DDDDDD Edited October 25, 2012 by BryceTheCoder Quote Link to comment Share on other sites More sharing options...
LordJashin Posted October 25, 2012 Share Posted October 25, 2012 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. Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted October 25, 2012 Author Share Posted October 25, 2012 (edited) 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 October 25, 2012 by BryceTheCoder Quote Link to comment Share on other sites More sharing options...
LordJashin Posted October 25, 2012 Share Posted October 25, 2012 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); Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted October 25, 2012 Author Share Posted October 25, 2012 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" Quote Link to comment Share on other sites More sharing options...
LordJashin Posted October 25, 2012 Share Posted October 25, 2012 (edited) 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 October 25, 2012 by LordJashin Quote Link to comment Share on other sites More sharing options...
LordJashin Posted October 25, 2012 Share Posted October 25, 2012 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. Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted October 26, 2012 Author Share Posted October 26, 2012 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. Quote Link to comment Share on other sites More sharing options...
LordJashin Posted October 26, 2012 Share Posted October 26, 2012 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. Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted October 26, 2012 Author Share Posted October 26, 2012 Yeeahh alright, well this seems like too hard of a project for me unfortunetly:( Oh well, i still have RS2Bots.tk as my project with u and cody, i'd rather just work on making that successfully right now:) Ill post on RS2Bots disccussing wutelse we can add or do. Quote Link to comment Share on other sites More sharing options...
TroisVerites Posted November 17, 2012 Share Posted November 17, 2012 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. Quote Link to comment Share on other sites More sharing options...
FHannes Posted November 17, 2012 Share Posted November 17, 2012 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 Quote Link to comment Share on other sites More sharing options...