Guest User

Super SpeedHack Edited

a guest
Apr 15th, 2017
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.58 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <CheatTable CheatEngineTableVersion="24">
  3.   <Forms>
  4.     <programForm Class="TCEForm" Encoding="Ascii85">rIXEW)=A$SCwBc8hg517hy{t6*_9Z!rfRL2Ac7KM1DgsoiNDxZ9NQXCRhNfgfp]p[16I5f/G-/8;UP1-[T--L%$;/E2[a]}y.K{=ZpGxFCnWX:KIG3wOW0BIwInYf?O(!%L822UqCb#61upePYoM4op,OwU6Z/LwV%Q0QyTIGMF={%_nPC7C/zc.i:h./chH)mtmd]34AK89/^U(m7y1(3gQB!(zUgMh-;CDdbVY_PGvx)36@9XN3aO-b^sc;A03X_MZ7=zsCCAS/EYEWjCA]GskG7%p}9w/-lK$lCBO*,Jv,f9^H9lTi*7l=omQkmWoZy,4*?E*urEnZ5g:e5+vQQi,!Sxvc;X0ecAt=ik/#*LIw#$im/HkJSmJ6Q1;;fxR=-1jVXKey8Th^G!:bwBrDha4-Mojv5*?WkKfe{LoEKTi@NZQTAwf7V2w6HkhJm;.H5#b+ysXi0xZJtJg3VleF]=vm8O!}?!Le%b+FuPWY+@[email protected]+TNDZa@FGUFY=/0H0RiwY-YvSwNMOZYclOT.0Ku0}wVyTKs=,s5XS]rV{b=8hczq/S_)Lh7S*xWc#h1J=rl5Z6*CFosHiGk--n7[aKG]oZSchQh]6Tz(Ps%+R7Spt.W7}8)Z9NY{@F8Z3$(tQog:unnK.Cnz^LY]sZH$JC[H#bH#ctTkoHX^sI</programForm>
  5.   </Forms>
  6.   <CheatEntries/>
  7.   <UserdefinedSymbols/>
  8.   <LuaScript>
  9.  
  10.  
  11.  
  12.  
  13.  
  14. openProcess("cemu.exe")
  15.  
  16. function sleep(n)
  17.     Sleep(n)
  18.     updateGui()
  19. end
  20.  
  21.  
  22. require ('Helper')
  23. cemuWindowID =  GetWindowByCaptionPID("Cemu")
  24.  
  25. function getFPS()
  26.        
  27.         repeat
  28.             cemuWindowCaption = GetWindowCaption(cemuWindowID)
  29.             sleep(1)           
  30.         until string.find(cemuWindowCaption, "FPS:")         
  31.          fps = split(cemuWindowCaption , ":")
  32.          fps = fps[2]
  33.          fps = fps:sub(2,6)
  34.          fps = tonumber(fps)
  35.  
  36.          return fps
  37. end
  38.  
  39.  
  40.  
  41. TIMER_INTERVAL = 1500
  42. DEFAULT_FPS_TARGET = 30
  43. DEFAULT_MIN_SH = 0.55
  44. DEFAULT_MAX_SH = 1.25
  45.  
  46. programForm.show()
  47. require('Gui')
  48.  
  49. fpsTarget = DEFAULT_FPS_TARGET
  50. minSH = DEFAULT_MIN_SH
  51. maxSH = DEFAULT_MAX_SH
  52.  
  53.  
  54.  
  55.  
  56. --speedhack_setSpeed(1)
  57. lastSH = 1
  58.  
  59. function mainLoop()
  60.          repeat
  61.             sleep(1)
  62.             return
  63.          until getOpenedProcessID() ~=0
  64.          
  65.          fakeFPS = getFPS()
  66.  
  67.          if fakeFPS&lt;55 then
  68.             realFPS = fakeFPS * lastSH
  69.             newSH = fpsTarget/realFPS
  70.          else
  71.              realFPS = fakeFPS
  72.              newSH = fpsTarget/realFPS
  73.          end
  74.  
  75.          if newSH &lt; minSH then
  76.             newSH = minSH
  77.          elseif newSH&gt;maxSH then
  78.             newSH = maxSH
  79.          end
  80.  
  81.          speedhack_setSpeed(newSH)
  82.          lastSH = newSH
  83.  
  84.          --print ('fakeFPS=', fakeFPS, '  realFPS=', realFPS, '  speedHack = ', newSH)
  85.          updateGui()
  86.  
  87. end
  88.  
  89.  
  90. timer = createTimer(nil,true) -- Create a Timer, for loop the code
  91. timer_setInterval(timer,TIMER_INTERVAL) -- Set the interval (in millisecs) between one loop and other
  92. timer_onTimer(timer,mainLoop) -- What to do if the timer do a loop ?Run the mainLoop!
  93.  
  94. require ('Hotkeys')
  95. </LuaScript>
  96. </CheatTable>
Add Comment
Please, Sign In to add comment