Advertisement
S1L1R

lazy_vs_pr

Feb 9th, 2023 (edited)
719
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. global ui_theme := {voidTheme: {winOL: "ADADAD", alpOL: 255, winBG: "151515", alpBG: 180, title: "Montserrat Medium", titleCol: "86C8BC", titleSZ: 13, main: "Montserrat Medium", mainCol: "White", mainSZ: 13, info: "Montserrat Medium", infoCol: "FFF6BD", infoSZ: 13}}
  2. ui_theme := ui_theme.voidTheme
  3.  
  4. #include %A_AppData%\LazyHub\lib
  5.  
  6. #include headers.ahk
  7. #include timers.ahk
  8. #include utils.ahk
  9. #include custom_ui.ahk
  10.  
  11. #include game_settings.ahk
  12.  
  13. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  14. ;;               Globals               ;;
  15. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  16. global g_desiredLimb := -20
  17. global g_raplakDelay := 1608 ; my host has 300+ fps who cares
  18. global g_step := 5
  19.  
  20. ; Math
  21. global g_cooldown := 17186 - g_raplakDelay + g_desiredLimb
  22.  
  23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  24. ;;                Binds                ;;
  25. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  26. AntiDesyncKey   = XButton2
  27. IncreaseTimeKey = Down
  28. DecreaseTimeKey = Left
  29. EnergyDrainKey  = F5
  30.  
  31. ; Technical part
  32. #IfWinActive ahk_exe Warframe.x64.exe
  33. Hotkey, IfWinActive, ahk_exe Warframe.x64.exe
  34.  
  35. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  36. ;;               Hotkeys               ;;
  37. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  38. Hotkey, *%AntiDesyncKey%, AntiDesync
  39. Hotkey, *%IncreaseTimeKey%, IncreaseTime
  40. Hotkey, *%DecreaseTimeKey%, DecreaseTime
  41. Hotkey, *%EnergyDrainKey%, EnergyDrain
  42.  
  43. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  44. ;;             GUI Settings            ;;
  45. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  46. global ui := []
  47.  
  48. gGuiW := 80
  49. gGuiH := 28
  50.  
  51. gPosX := Ceil(gScreen[1] * 0.008)
  52. gPosY := Ceil(gScreen[2] * 0.47)
  53.  
  54. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  55. ;;                 GUI                 ;;
  56. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  57. ui.push(new Window("vs_title", gPosX, gPosY, gGuiW, gGuiH, ui_theme, 3.132))
  58. ui.push(new Window("vs_body", gPosX, gPosY+ui[1].h+4, gGuiW, gGuiH*2, ui_theme, 3.132))
  59.  
  60. ui[1].new_text("T1", "lazy", "auto", "title")
  61. ui[2].new_text("T2", g_cooldown, "xs ym+3", "main")
  62. ui[2].new_text("T3", "[time]", "xs ym+24", "info")
  63.  
  64. loop % ui.Length()
  65.     ui[A_Index].show()
  66. return
  67.  
  68. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  69. ;;                Funcs                ;;
  70. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  71. UpdateTimer(begin, end := "", prec := "3") {
  72.     if (end == "")
  73.         DllCall("QueryPerformanceCounter", "Int64*", end)
  74.  
  75.     offset := MeasureTime(begin, end)
  76.     offsetText := Format(offset >= 9999 ? "{1:.0f}" : "{1:.1f}", offset)
  77.  
  78.     ui[1].edit_text("T1", offsetText)
  79. }
  80.  
  81. AntiDesync:
  82.    GoSub, IncreaseTime
  83.     GoSub, DecreaseTime
  84.    
  85.     loop, 5
  86.     {
  87.         DllCall("QueryPerformanceCounter", "Int64*", beforePropa)
  88.         SendInput, {Blind}{%shoot2Key%}
  89.         DllCall("QueryPerformanceCounter", "Int64*", afterPropa)
  90.  
  91.         lSleep(g_raplakDelay, beforePropa)
  92.  
  93.         DllCall("QueryPerformanceCounter", "Int64*", beforeRaplak)
  94.         SendInput, {Blind}{%shootKey%}
  95.         Sleep 4000
  96.  
  97.         UpdateTimer(beforePropa, beforeRaplak)
  98.         lSleep(14700, beforeRaplak)
  99.        
  100.         GuiControl, gui_debug:Text, DebugText, paused
  101.         Hotkey, *%IncreaseTimeKey%, off
  102.         Hotkey, *%DecreaseTimeKey%, off
  103.  
  104.         lSleep(15300, beforeRaplak)
  105.  
  106.         Hotkey, *%IncreaseTimeKey%, on
  107.         Hotkey, *%DecreaseTimeKey%, on
  108.  
  109.         lSleep(g_cooldown, beforeRaplak)
  110.         UpdateTimer(beforeRaplak)
  111.     }
  112.     beforePropa := 0, afterPropa := 0
  113.     beforeRaplak := 0
  114. return
  115.  
  116. IncreaseTime:
  117.    if (g_desiredLimb > 300)
  118.         return
  119.  
  120.     g_desiredLimb += g_step
  121.     g_cooldown += g_step
  122.  
  123.     limbText := Format("{1:.3f}", g_desiredLimb * 0.001)
  124.     ui[2].edit_text("T2", g_cooldown)
  125.     ui[2].edit_text("T3", limbText)
  126. return
  127.  
  128. DecreaseTime:
  129.    if (g_desiredLimb - g_step < -150)
  130.         return
  131.  
  132.     g_desiredLimb -= g_step
  133.     g_cooldown -= g_step
  134.  
  135.     limbText := Format("{1:.3f}", g_desiredLimb * 0.001)
  136.     ui[2].edit_text("T2", g_cooldown)
  137.     ui[2].edit_text("T3", limbText)
  138. return
  139.  
  140. EnergyDrain:
  141.    SendInput, {Blind}{%shiftKey% Down}
  142.     lSleep(10)
  143.  
  144.     SendInput, {Blind}{%secondAKey%} ; 2nd madurai ability
  145.     lSleep(10)
  146.    
  147.     Loop, 18
  148.     {
  149.         SendInput, {Blind}{%jumpKey%}
  150.         SendInput, {Blind}{%shootKey%}
  151.         Sleep 1
  152.     }
  153.     SendInput, {Blind}{%shiftKey% Up}
  154. return
  155.  
  156. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  157. ;;                Misc                 ;;
  158. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  159. #IfWinActive
  160. *Insert::reload
  161. *Del::exitapp
  162.  
  163. *F11::
  164.     suspend, toggle
  165.     state := A_IsSuspended ? "pause" : "lazy"
  166.     GuiControl, gui_debug:, DebugText, %state%
  167. return
  168.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement