Why this? If GetAsyncKeyState(VK_SPACE) And m_fFlags = FL_ONGROUND Then
I am working on a vb.net bhop. I am new to vb, this is the code that I already have. It does nothing when I run it.
I think that the error is in my rpm, but I do not know how to correct it.
Code:Function wop() Dim localplayer As Integer Dim m_fFlags As Integer Dim FL_ONGROUND As Integer = 257 While (Not exit_thread) ReadProcessMemory(gucci(0).Handle, client_dll_base + localBase_offset, localplayer, 4, 0) ReadProcessMemory(gucci(0).Handle, localplayer + m_fFlags_offset, m_fFlags, 4, 0) If GetAsyncKeyState(VK_SPACE) And m_fFlags = FL_ONGROUND Then keybd_event(&H20, &H39, 0, 0) System.Threading.Thread.Sleep(1) keybd_event(&H20, &H39, &H2, 0) End If System.Threading.Thread.Sleep(1) End While Return False End Function
Last edited by signal101; 06-03-2015 at 05:27 PM.
Code:/"if you see bees you no your not to far away from water" - Lil B
Why this? If GetAsyncKeyState(VK_SPACE) And m_fFlags = FL_ONGROUND Then
If space is held and m_flags(Should be 257 when player is on ground) is equal to 257(what m_flags should be when player is on ground)
Jump.
Wrong, FL_ONGROUND is a bitflag (Const FL_ONGROUND As Byte = 1<<0), "And" should be changed to "AndAlso" but your real problem is your sleep which should be at least 15ms, why are you not just writing to memory instead? (WPM(Client.dll + ForceJump, 1 or 0))
EDIT:
Also you should clean up your code.
Code:'If you're not gonna make a offset class, at least have them in a region #Region "Offsets" Const LocalPlayer As Integer = &H4321321 'cant remember Const m_fFlags As Integer = &H100 Const ForceJump As Integer = &H2C342C 'cant remember End Region #Region "Funcs and Subs" Function GetLocalBase() dim Value as integer RPM(gucci(0), Client.dll + LocalPlayer, Value, 4 , 0) Return Value End Function Function GetFlags() dim Value as byte RPM(gucci(0), GetLocalBase() + m_fFlags, Value, 4, 0) Return Value End Function Sub WriteJump(value As Integer) WPM(gucci(0), Client.dll + ForceJump, value, 4, 0) End Sub End Region Sub Bhopper() While(True) If GetAsyncKeyState(Bhop_Key) AndAlso GetFlags() = FL_ONGROUND Then WriteJump(1) Threading.Thread.Sleep(15) WriteJump(0) End If Threading.Thread.Sleep(1) End While End Sub
Last edited by illusionisten; 03-22-2016 at 09:36 AM.
I already moved on to pasting internal cheats, this is old news mane but thanks anyways
Code:/"if you see bees you no your not to far away from water" - Lil B
Shame, if you can't even do it right externally, I don't feel like you should go internal just because calling functions are somewhat easier.
And yes, the paste is strong with this one. You probably switched to C++ as well unknowingly of that you could go internal with VB.net also but, you probably don't feel a sense of familiarity towards one language as you're obviously new to programming and falling to copy-paste, ez hakes.
Last edited by illusionisten; 03-23-2016 at 02:29 PM.
the thing is, kb event never works on up-to-date directx games check out sendinput (i can controle everthing i want on mouse, but keyboard... i don't get it)
million project is coming up soon.. see if it draws