Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
How to change the Framerate Limit
Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: How to change the Framerate Limit

  1. #1
    Junior Member
    Join Date
    Mar 2007
    Posts
    10

    How to change the Framerate Limit

    somebody, can tell me, how??

    i find memory with tseacrh but i try change but nothing happend..

  2. #2
    Senior Member
    Join Date
    Mar 2007
    Posts
    605

    How to change the Framerate Limit

    Framerate cannot be set to "max" when you attempt to modify the framerate.

    Mace.

  3. #3

    How to change the Framerate Limit

    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 Function
    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
    WriteMemory must be able to write double values, here's my WriteMemory and ReadMemory for doubles (in .NET):
    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

  4. #4
    Junior Member
    Join Date
    Mar 2007
    Posts
    10

    How to change the Framerate Limit

    Thank you very much it works perfectly.

  5. #5

    How to change the Framerate Limit

    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.

  6. #6
    Junior Member
    Join Date
    Mar 2007
    Posts
    10

    How to change the Framerate Limit

    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

  7. #7

    How to change the Framerate Limit

    good job, i found it and I'm going to use it in my bot

  8. #8
    Senior Member
    Join Date
    Apr 2007
    Posts
    314

    How to change the Framerate Limit

    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" />

  9. #9
    Junior Member
    Join Date
    Mar 2008
    Posts
    6

    How to change the Framerate Limit

    Just a question... Why would y ou change tibian fps? When you can simply go to graphics -> advanced, and change it? Lols.

  10. #10

    How to change the Framerate Limit

    Quote Originally Posted by Lahedam
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •