somebody, can tell me, how??
i find memory with tseacrh but i try change but nothing happend..
somebody, can tell me, how??
i find memory with tseacrh but i try change but nothing happend..
Framerate cannot be set to "max" when you attempt to modify the framerate.
Mace.
Code:<Const Name="ptrFrameRateBegin" Value="H76793C" /> <Const Name="FrameRateCurrentOffset" Value="H60" /> <Const Name="FrameRateLimitOffset" Value="H58" />Code:Public Function FPSBToX(ByVal B As Double) As Double Return Round((1110 / B) - 5, 1) End FunctionWriteMemory must be able to write double values, here's my WriteMemory and ReadMemory for doubles (in .NET):Code:Public Sub SetFPS(Dim NewFPS As Double) Dim FrameRateBegin As Integer = 0 'Pointer to the FPS stuff ReadMemory(Consts.ptrFrameRateBegin, FrameRateBegin, 4) WriteMemory(FrameRateBegin + Consts.FrameRateLimitOffset, FPSBToX(NewFPS)) End Sub
Code:Public Sub WriteMemory(ByVal Address As Integer, ByVal Value As Double) Dim Buffer(0 To 7) As Byte Buffer = BitConverter.GetBytes(Value) For I As Integer = 0 To 7 WriteMemory(Address + I, CInt(Buffer(I)), 1) Next End Sub Public Sub ReadMemory(ByVal Address As Integer, ByRef Value As Double) Dim Buffer(7) As Byte Dim Temp As Integer For I As Integer = 0 To 7 ReadMemory(Address + I, Temp, 1) Buffer(I) = CInt(Temp) Next Value = BitConverter.ToDouble(Buffer, 0) End Sub
Thank you very much it works perfectly.
This isn't really a tutorial because I just put the code there, but it isn't that hard to understand. It's really nice that it worked for you.
I put the code in vb6 for if it can help somebody.
i translate your code to vb6
Code:Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long) '-------------------------------------------------------- Public Const MemoryFPS = &H76793C ' Public Const FrameRateCurrentOffset = &H60 Public Const FrameRateLimitOffset = &H58 '-------------------------------------------------------------------------------------- Public Function Memory(hwnd As Long, Address As Long, Value As Long, Size As Long, Process As Integer) Dim Pid As Long Dim phandle As Long GetWindowThreadProcessId hwnd, Pid phandle = OpenProcess(&H1F0FFF, False, Pid) If Process = 1 Then ReadProcessMemory phandle, Address, Value, Size, 0 If Process = 2 Then WriteProcessMemory phandle, Address, Value, Size, 0 CloseHandle phandle End Function '-------------------------------------------------------------------------------------------- Public Function ReadFPS() Dim LocalizarMemFps As Long Dim MemRealFPS As Long Dim MemRealLimiteFPS As Long Dim i As Integer Dim B(1 To 8) As Byte Dim f As Double Dim Temp As Long Memory Tibia_Hwnd, MemoryFPS, LocalizarMemFps, 4, RMem MemRealFPS = LocalizarMemFps + FrameRateCurrentOffset MemRealLimiteFPS = LocalizarMemFps + FrameRateLimitOffset For i = 1 To 8 Memory Tibia_Hwnd, MemRealFPS + i - 1, Temp, 1, RMem B(i) = CInt(Temp) DoEvents Next i CopyMemory f, B(1), 8 ReadFPS = f End Function '------------------------------------------------------------------------------------------ Public Function SetFPS(Fps As Integer) Dim LocalizarMemFps As Long Dim MemRealFPS As Long Dim MemRealLimiteFPS As Long Dim i As Integer Dim B(1 To 8) As Byte Dim f As Double Memory Tibia_Hwnd, MemoryFPS, LocalizarMemFps, 4, RMem MemRealFPS = LocalizarMemFps + FrameRateCurrentOffset MemRealLimiteFPS = LocalizarMemFps + FrameRateLimitOffset f = Round((1110 / Fps) - 5, 1) CopyMemory B(1), f, 8 For i = 1 To 8 Memory Tibia_Hwnd, MemRealLimiteFPS + i - 1, CInt(B(i)), 1, WMem DoEvents Next i End Function
good job, i found it and I'm going to use it in my bot
Would you mind posting these for 8.10?
EDIT:
Taken from the TTB sources (http://tibiatekbot.googlecode.com/sv...nstants8.1.xml)
Code:<Const Name="FrameRateCurrentOffset" Value="H60" /> <Const Name="FrameRateLimitOffset" Value="H58" /> <Const Name="ptrFrameRateBegin" Value="H76793C" />
Just a question... Why would y ou change tibian fps? When you can simply go to graphics -> advanced, and change it? Lols.
You can't change it to lower than 10, with this, you can change it to 1, which is really good if you are going to have more than 1 client running.Originally Posted by Lahedam