├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── question.md │ └── suggestion.md ├── stale.yml └── workflows │ ├── pr.yml │ ├── push.yml │ └── release.yml ├── .gitignore ├── .idea ├── .name ├── RatPoison.iml ├── compiler.xml ├── encodings.xml ├── groovyc.xml ├── inspectionProfiles │ └── Project_Default.xml ├── jarRepositories.xml ├── kotlinc.xml ├── libraries-with-intellij-classes.xml ├── misc.xml ├── modules │ └── rat.poison.RatPoison.iml ├── uiDesigner.xml └── vcs.xml ├── LICENSE.txt ├── README.md ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── info.txt ├── installer.bat ├── installerSettings.json ├── settings.gradle ├── settings ├── Adrenaline.txt ├── Backtrack.txt ├── BombTimer.txt ├── BoxEsp.txt ├── BunnyHop.txt ├── CFGS │ └── DefaultSettings.cfg ├── ChamsEsp.txt ├── Data │ ├── SkinInfo.txt │ ├── ToneMaps.txt │ └── WeaponStats.txt ├── DrawFov.txt ├── ESP.txt ├── FootSteps.txt ├── FovChanger.txt ├── General.txt ├── GlowEsp.txt ├── GunAimOverride.txt ├── HeadLevelHelper.txt ├── HitMarker.txt ├── IndicatorEsp.txt ├── Localizations │ ├── locale_ES.locale │ ├── locale_en_US.locale │ ├── locale_pl_PL.locale │ └── locale_ru_RU.locale ├── MiscScripts.txt ├── NadeHelper │ ├── de_cache.txt │ ├── de_cbbl.txt │ ├── de_dust2.txt │ ├── de_inferno.txt │ ├── de_mirage.txt │ ├── de_nuke.txt │ ├── de_overpass.txt │ ├── de_train.txt │ └── de_vertigo.txt ├── Nades.txt ├── NightMode.txt ├── OpenGL.txt ├── PistolAim.txt ├── RCS.txt ├── RCrosshair.txt ├── ReducedFlash.txt ├── RifleAim.txt ├── ShotgunAim.txt ├── SkeletonEsp.txt ├── SkinChanger.txt ├── SmgAim.txt ├── Snaplines.txt ├── SniperAim.txt ├── SpectatorList.txt ├── SpreadCircle.txt ├── TriggerBot.txt └── hitsounds │ ├── COD.wav │ ├── Error.wav │ ├── Metal.wav │ ├── Roblox.wav │ ├── Skeet.wav │ └── ratto_aaah.wav ├── skin ├── default.fnt ├── font-small.fnt ├── tinted.atlas ├── tinted.json └── tinted.png ├── src └── main │ ├── kotlin │ └── rat │ │ └── poison │ │ ├── RatPoison.kt │ │ ├── game │ │ ├── Aim.kt │ │ ├── CSGO.kt │ │ ├── ClientState.kt │ │ ├── Color.kt │ │ ├── Entities.kt │ │ ├── EntityContext.kt │ │ ├── Ranks.kt │ │ ├── SignonState.kt │ │ ├── Weapons.kt │ │ ├── WorldToScreen.kt │ │ ├── entity │ │ │ ├── Bomb.kt │ │ │ ├── Entity.kt │ │ │ ├── EntityType.kt │ │ │ ├── Player.kt │ │ │ └── Weapon.kt │ │ ├── hooks │ │ │ ├── EntityIteration.kt │ │ │ └── OnFlash.kt │ │ ├── netvars │ │ │ ├── Class.kt │ │ │ ├── ClassOffset.kt │ │ │ ├── ClassTable.kt │ │ │ ├── ClassVariable.kt │ │ │ ├── NetVar.kt │ │ │ ├── NetVarOffsets.kt │ │ │ └── NetVars.kt │ │ └── offsets │ │ │ ├── ClientOffsets.kt │ │ │ ├── EngineOffsets.kt │ │ │ ├── FirstClassFinder.kt │ │ │ ├── ModuleScan.kt │ │ │ └── Offset.kt │ │ ├── interfaces │ │ ├── IOverlay.kt │ │ └── IOverlayListener.kt │ │ ├── jna │ │ ├── User32.kt │ │ ├── enums │ │ │ ├── AccentStates.kt │ │ │ └── WindowCompositionAttributes.kt │ │ └── structures │ │ │ ├── AccentPolicy.kt │ │ │ ├── Rect.kt │ │ │ └── WindowCompositionAttributeData.kt │ │ ├── overlay │ │ ├── App.kt │ │ └── Overlay.kt │ │ ├── scripts │ │ ├── AutomaticWeapons.kt │ │ ├── Backtrack.kt │ │ ├── BombTimer.kt │ │ ├── BunnyHop.kt │ │ ├── DoorSpam.kt │ │ ├── DrawBacktrack.kt │ │ ├── DrawFov.kt │ │ ├── FastStop.kt │ │ ├── FovChanger.kt │ │ ├── HeadWalk.kt │ │ ├── HitMarker.kt │ │ ├── KillBind.kt │ │ ├── KnifeBot.kt │ │ ├── NadeHelper.kt │ │ ├── NadeThrower.kt │ │ ├── NadeTracer.kt │ │ ├── NameChanger.kt │ │ ├── RCS.kt │ │ ├── RCrosshair.kt │ │ ├── Ranks.kt │ │ ├── ReducedFlash.kt │ │ ├── Scanner.kt │ │ ├── SelfNade.kt │ │ ├── SkinChanger.kt │ │ ├── SpectatorList.kt │ │ ├── SpreadCircle.kt │ │ ├── StrafeHelper.kt │ │ ├── TriggerBot.kt │ │ ├── WeaponSpam.kt │ │ ├── aim │ │ │ ├── FlatAim.kt │ │ │ ├── General.kt │ │ │ ├── HandleFireKey.kt │ │ │ ├── PathAim.kt │ │ │ └── SetAim.kt │ │ ├── bspHandling │ │ │ ├── BspFlags.kt │ │ │ ├── BspUtil.kt │ │ │ └── RayTraceTest.kt │ │ └── visuals │ │ │ ├── Adrenaline.kt │ │ │ ├── BoxESP.kt │ │ │ ├── ChamsESP.kt │ │ │ ├── DisableESP.kt │ │ │ ├── DisablePostProcessing.kt │ │ │ ├── DrawDebug.kt │ │ │ ├── DrawSmokes.kt │ │ │ ├── ESP.kt │ │ │ ├── FarRadar.kt │ │ │ ├── FootStepESP.kt │ │ │ ├── GlowESP.kt │ │ │ ├── HeadLevelHelper.kt │ │ │ ├── HitsoundESP.kt │ │ │ ├── IndicatorESP.kt │ │ │ ├── NightMode.kt │ │ │ ├── RadarESP.kt │ │ │ ├── SkeletonESP.kt │ │ │ ├── SnapLines.kt │ │ │ └── ToggleESP.kt │ │ ├── settings │ │ └── SetVars.kt │ │ ├── ui │ │ ├── TableBuilder.kt │ │ ├── UIUpdate.kt │ │ ├── UIUtil.kt │ │ ├── tabs │ │ │ ├── AimTab.kt │ │ │ ├── MiscTab.kt │ │ │ ├── NadeHelperTab.kt │ │ │ ├── OptionsTab.kt │ │ │ ├── RanksTab.kt │ │ │ ├── RcsTab.kt │ │ │ ├── SkinChanger.kt │ │ │ ├── VisualsTab.kt │ │ │ └── visualstabs │ │ │ │ ├── BoxEspTab.kt │ │ │ │ ├── ChamsEspTab.kt │ │ │ │ ├── FootStepsTab.kt │ │ │ │ ├── GlowEspTab.kt │ │ │ │ ├── HitMarkerTab.kt │ │ │ │ ├── IndicatorEspTab.kt │ │ │ │ ├── MiscVisualsTab.kt │ │ │ │ ├── NadesVT.kt │ │ │ │ └── SnaplinesEspTab.kt │ │ ├── uiHelpers │ │ │ ├── VisCheckBoxCustom.kt │ │ │ ├── VisColorPickerCustom.kt │ │ │ ├── VisInputFieldCustom.kt │ │ │ ├── VisSelectBoxCustom.kt │ │ │ ├── VisSliderCustom.kt │ │ │ ├── aimTab │ │ │ │ ├── ATabVisCheckBox.kt │ │ │ │ └── ATabVisSlider.kt │ │ │ ├── overrideWeaponsUI │ │ │ │ ├── OverrideUtil.kt │ │ │ │ ├── OverrideVisCheckBoxCustom.kt │ │ │ │ └── OverrideVisSliderCustom.kt │ │ │ └── tables │ │ │ │ ├── AimBacktrackTable.kt │ │ │ │ ├── AimTable.kt │ │ │ │ └── AimTriggerTable.kt │ │ ├── uiPanelTables │ │ │ └── OverridenWeapons.kt │ │ └── uiPanels │ │ │ ├── UIAimOverridenWeapons.kt │ │ │ ├── UIBombTimer.kt │ │ │ ├── UIKeybinds.kt │ │ │ ├── UIMenu.kt │ │ │ └── UISpectatorList.kt │ │ └── utils │ │ ├── Aim.kt │ │ ├── Angle.kt │ │ ├── CFGMigration.kt │ │ ├── ConfigTools.kt │ │ ├── DisposableMemory.kt │ │ ├── Every.kt │ │ ├── Hook.kt │ │ ├── HumanMouse.kt │ │ ├── LanguageDetection.kt │ │ ├── Long2ObjectCache.kt │ │ ├── Long2VectorCache.kt │ │ ├── Mouse.kt │ │ ├── NadeUtil.kt │ │ ├── ObservableBoolean.kt │ │ ├── Random.kt │ │ ├── RepeatedInt.kt │ │ ├── Retry.kt │ │ ├── Settings.kt │ │ ├── Structs │ │ ├── globalVars.kt │ │ ├── input.kt │ │ └── userCMD.kt │ │ ├── Vector.kt │ │ ├── extensions │ │ ├── ByteArrayExtensions.kt │ │ ├── EnumExtensions.kt │ │ ├── FloatExtensions.kt │ │ ├── LongExtensions.kt │ │ ├── MemoryExtensions.kt │ │ ├── ModuleExtensions.kt │ │ ├── PointExtensions.kt │ │ ├── SourceExtensions.kt │ │ └── StringBuilderExtensions.kt │ │ ├── generalUtil │ │ ├── GeneralUtil.kt │ │ ├── LoadSettings.kt │ │ └── VectorUtil.kt │ │ └── natives │ │ └── CUser32.kt │ └── resources │ └── META-INF │ └── services │ └── javax.script.ScriptEngineFactory └── version.txt /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[BUG]" 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Add steps on how to reproduce this issue/bug, if you don't this issue will be closed and won't be looked into. 15 | 16 | **Pictures/Videos** 17 | If applicable, add screenshots or link a video to help explain your problem. 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: Ask questions 4 | title: "[QUESTION]" 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Ask questions** 11 | Ask any questions related to the project 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/suggestion.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Suggestion 3 | about: Suggest additional features 4 | title: "[SUGGESTION]" 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the feature requested** 11 | A clear description or pictures/videos of what you want implemented. 12 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 7 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 7 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - pinned 8 | - security 9 | - bug 10 | - individual-issue 11 | - enhancement 12 | # Label to use when marking an issue as stale 13 | staleLabel: wontfix 14 | # Comment to post when marking an issue as stale. Set to `false` to disable 15 | markComment: > 16 | This issue has been automatically marked as stale because it has not had 17 | recent activity. It will be closed if no further activity occurs. Thank you 18 | for your contributions. 19 | # Comment to post when closing a stale issue. Set to `false` to disable 20 | closeComment: false 21 | -------------------------------------------------------------------------------- /.github/workflows/pr.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a Java project with Gradle 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle 3 | 4 | name: Pull Request 5 | 6 | on: 7 | pull_request: 8 | branches: "*" 9 | 10 | jobs: 11 | build: 12 | 13 | runs-on: windows-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v2 17 | with: 18 | ref: ${{ github.event.pull_request.head.sha }} 19 | - uses: suisei-cn/actions-download-file@v1 20 | id: downloadfile 21 | name: Download building script 22 | with: 23 | url: "https://github.com/SPRAVEDLIVO/RatReleaser/releases/latest/download/releaser.exe" 24 | target: "bruh/" 25 | - name: build 26 | id: build 27 | run: | 28 | bruh/releaser.exe --tag="yeahdefinately" -------------------------------------------------------------------------------- /.github/workflows/push.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a Java project with Gradle 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle 3 | 4 | name: Push 5 | 6 | on: 7 | push: 8 | branches: "*" 9 | 10 | jobs: 11 | build: 12 | runs-on: windows-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v2 16 | - uses: suisei-cn/actions-download-file@v1 17 | id: downloadfile 18 | name: Download building script 19 | with: 20 | url: "https://github.com/SPRAVEDLIVO/RatReleaser/releases/latest/download/releaser.exe" 21 | target: "bruh/" 22 | - name: build 23 | id: build 24 | run: | 25 | bruh/releaser.exe --tag=${{github.run_id}} 26 | - name: Upload artifact 27 | uses: actions/upload-artifact@v2 28 | with: 29 | name: ${{ steps.build.outputs.zip }} 30 | path: ${{ steps.build.outputs.zip }} 31 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a Java project with Gradle 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle 3 | 4 | name: Release 5 | 6 | on: 7 | push: 8 | tags: 9 | - '*' 10 | 11 | jobs: 12 | build: 13 | 14 | runs-on: windows-latest 15 | 16 | steps: 17 | - uses: actions/checkout@v2 18 | - uses: suisei-cn/actions-download-file@v1 19 | id: downloadfile 20 | name: Download building script 21 | with: 22 | url: "https://github.com/SPRAVEDLIVO/RatReleaser/releases/latest/download/releaser.exe" 23 | target: "bruh/" 24 | - name: build 25 | id: build 26 | run: | 27 | bruh/releaser.exe --tag=${{ github.ref }} 28 | - name: Create release 29 | uses: actions/create-release@v1 30 | id: create_release 31 | env: 32 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 33 | with: 34 | tag_name: ${{ github.ref }} 35 | release_name: ${{ github.ref }} 36 | draft: false 37 | prerelease: false 38 | - name: Upload Release Asset 39 | id: upload-release-asset 40 | uses: actions/upload-release-asset@v1 41 | env: 42 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 43 | with: 44 | upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps 45 | asset_path: ${{ steps.build.outputs.zip }} 46 | asset_name: ${{ steps.build.outputs.zip }} 47 | asset_content_type: application/zip 48 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | out 3 | 4 | .gradle 5 | 6 | .idea/workspace.xml 7 | .idea/tasks.xml 8 | .idea/libraries 9 | .idea/gradle.xml 10 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | RatPoison -------------------------------------------------------------------------------- /.idea/RatPoison.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/groovyc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | 29 | 30 | 34 | 35 | -------------------------------------------------------------------------------- /.idea/kotlinc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 10 | 11 | 13 | -------------------------------------------------------------------------------- /.idea/libraries-with-intellij-classes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 64 | 65 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/modules/rat.poison.RatPoison.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | kotlin.incremental=true 2 | org.gradle.daemon=true -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RatPoison-dev/RatPoison/f841d80b76599397f85386ad91e13a00e14277cc/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Dec 02 21:43:01 CST 2019 2 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip 3 | distributionBase=GRADLE_USER_HOME 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /info.txt: -------------------------------------------------------------------------------- 1 | This program is inherently Charlatano at it's root. I've edited Charlatano to RatPoison in this instance as my own, for my own sake. The original is available here https://github.com/Jire/Charlatano -------------------------------------------------------------------------------- /installer.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | title Installer downloader 3 | IF EXIST "installer.exe" ( 4 | installer.exe %1 %2 5 | ) ELSE ( 6 | echo Installer script wasn't found. Downloading... 7 | powershell -Command "(New-Object Net.WebClient).DownloadFile('http://github.com/SPRAVEDLIVO/RatInstaller/releases/latest/download/installer.exe', 'installer.exe')" 8 | installer.exe %1 %2 9 | ) -------------------------------------------------------------------------------- /installerSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "force_install_jdk": false, 3 | "force_cheat_update": false, 4 | "force_cheat_compile": false, 5 | "download_missing_files": true, 6 | "update_type": "call_installer", 7 | "build_folder": "build/", 8 | "jdk_zip_name": "JDK.zip", 9 | "github_repo": "TheRatCode/RatPoison", 10 | "settings_directory": "settings/", 11 | "bypass_download": false, 12 | "skip_jdk_checks": false, 13 | "show_last_X_commits": 5, 14 | "jdk_installation_path": "%APPDATA%", 15 | "jdk_link_x64": "https://download.java.net/java/GA/jdk14.0.2/205943a0976c4ed48cb16f1043c5c647/12/GPL/openjdk-14.0.2_windows-x64_bin.zip", 16 | "jdk_link_x86": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_x86-32_windows_hotspot_14.0.2_12.zip" 17 | } -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'RatPoison' -------------------------------------------------------------------------------- /settings/Adrenaline.txt: -------------------------------------------------------------------------------- 1 | //Enable full screen visual effect 2 | ENABLE_ADRENALINE = false 3 | 4 | //Strength of added adrenaline per shot 5 | ADRENALINE_STRENGTH = 0.15 6 | 7 | //How much adrenaline loses each update 8 | ADRENALINE_COOLDOWN = 0.01 9 | 10 | //Use bomb time left to account for adrenaline 11 | ADRENALINE_BOMB_TIME = true 12 | -------------------------------------------------------------------------------- /settings/Backtrack.txt: -------------------------------------------------------------------------------- 1 | //Enable backtrack 2 | ENABLE_BACKTRACK = false 3 | 4 | //Enable backtrack on key 5 | ENABLE_BACKTRACK_ON_KEY = false 6 | 7 | //VK Key Code (http://cherrytree.at/misc/vk.htm), 8 | //Default key is Mouse5 9 | BACKTRACK_KEY = 6 10 | 11 | //Show points 12 | BACKTRACK_VISUALIZE = false 13 | 14 | //Check if an entity is spotted before shooting 15 | BACKTRACK_SPOTTED = true 16 | 17 | //Enable backtrack when holding the specified weapons 18 | PISTOL_BACKTRACK = true 19 | RIFLE_BACKTRACK = true 20 | SHOTGUN_BACKTRACK = true 21 | SMG_BACKTRACK = true 22 | SNIPER_BACKTRACK = true 23 | 24 | //Max MS backtrack 25 | PISTOL_BACKTRACK_MS = 200 26 | RIFLE_BACKTRACK_MS = 200 27 | SHOTGUN_BACKTRACK_MS = 200 28 | SMG_BACKTRACK_MS = 200 29 | SNIPER_BACKTRACK_MS = 200 30 | -------------------------------------------------------------------------------- /settings/BombTimer.txt: -------------------------------------------------------------------------------- 1 | //Enable bomb timer 2 | ENABLE_BOMB_TIMER = true 3 | 4 | //Enable the menu on the overlay 5 | BOMB_TIMER_MENU = true 6 | 7 | //Visual bars at the top middle of your screen, and along the bottom of the screen 8 | BOMB_TIMER_BARS = true 9 | 10 | //X,Y,Alpha of the bomb timer menu 11 | BOMB_TIMER_X = 0.0 12 | BOMB_TIMER_Y = 0.0 13 | BOMB_TIMER_ALPHA = 0.75 14 | BOMB_TIMER_BARS_SHOW_TTE = true 15 | -------------------------------------------------------------------------------- /settings/BoxEsp.txt: -------------------------------------------------------------------------------- 1 | //Enable box esp 2 | ENABLE_BOX_ESP = true 3 | 4 | ADVANCED_BOUNDING_BOX = true 5 | 6 | //Disable through smoke 7 | BOX_SMOKE_CHECK = false 8 | 9 | //Enable far radar box 10 | BOX_FAR_RADAR = false 11 | 12 | //Enable box esp details 13 | //Shows optional extra details (Health/Armor bar, Name/Weapon text) for each enemy, configurable below 14 | BOX_ESP_DETAILS = true 15 | 16 | //Enable box esp health bar; Bar position Left / Right 17 | BOX_ESP_HEALTH = true 18 | BOX_ESP_HEALTH_POS = LEFT 19 | 20 | //Enable box esp armor bar; Bar position Left / Right 21 | BOX_ESP_ARMOR = true 22 | BOX_ESP_ARMOR_POS = LEFT 23 | 24 | //Enable box esp helmet text; Text position Left / Right 25 | BOX_ESP_HELMET = true 26 | BOX_ESP_HELMET_POS = RIGHT 27 | 28 | //Enable box esp helmet text; Text position Left / Right 29 | BOX_ESP_KEVLAR = true 30 | BOX_ESP_KEVLAR_POS = RIGHT 31 | 32 | //Enable box esp helmet text; Text position Left / Right 33 | BOX_ESP_SCOPED = true 34 | BOX_ESP_SCOPED_POS = RIGHT 35 | 36 | //Enable box esp flashed text; Text position Left / Right 37 | BOX_ESP_FLASHED = true 38 | BOX_ESP_FLASHED_POS = RIGHT 39 | 40 | //Enable box esp name text; Text position Top / Bottom 41 | BOX_ESP_NAME = true 42 | BOX_ESP_NAME_POS = TOP 43 | 44 | //Enable box esp weapon text; Text position Top / Bottom 45 | BOX_ESP_WEAPON = true 46 | BOX_ESP_WEAPON_POS = BOTTOM 47 | 48 | //Enable box esp ammo text; Text position Top / Bottom 49 | BOX_ESP_AMMO = true 50 | BOX_ESP_AMMO_POS = BOTTOM 51 | 52 | //Enable box esp money text; Text position Top / Bottom 53 | BOX_ESP_MONEY = true 54 | BOX_ESP_MONEY_POS = BOTTOM 55 | 56 | //Enable box esp scope text; Text position Top / Bottom 57 | BOX_ESP_SCOPED = true 58 | BOX_ESP_SCOPED_POS = RIGHT 59 | 60 | //Enable box esp on teammates 61 | BOX_SHOW_TEAM = false 62 | 63 | //Box color will depends on player health 64 | BOX_SHOW_HEALTH = false 65 | 66 | //Enable box esp on enemies 67 | BOX_SHOW_ENEMIES = true 68 | 69 | //Enable box esp on defuse kits 70 | BOX_SHOW_DEFUSERS = true 71 | 72 | //Enable box esp on weapons 73 | BOX_SHOW_WEAPONS = true 74 | 75 | BOX_DETAILS_TEXT_COLOR = Color(red=255, green=255, blue=255, alpha=1.0) 76 | 77 | //Color of your teammates box 78 | BOX_TEAM_COLOR = Color(red=0, green=0, blue=255, alpha=1.0) 79 | 80 | //Color of your enemies box 81 | BOX_ENEMY_COLOR = Color(red=255, green=0, blue=0, alpha=0.6) 82 | 83 | //Color of the defuse kit box 84 | BOX_DEFUSER_COLOR = Color(red=145, green=0, blue=90, alpha=1.0) 85 | 86 | //Color of the weapons box 87 | BOX_WEAPON_COLOR = Color(red=200, green=0, blue=255, alpha=1.0) 88 | -------------------------------------------------------------------------------- /settings/BunnyHop.txt: -------------------------------------------------------------------------------- 1 | //Enable bunny hop 2 | ENABLE_BUNNY_HOP = true 3 | BHOP_HITCHANCE = 100 4 | ENABLE_BUNNY_HOP_KEY = 32 5 | 6 | //Enable auto strafe when bunny hopping 7 | //This will auto press left/right synchronizing with your mouse movement 8 | AUTO_STRAFE = true 9 | 10 | //Enable auto strafing only when holding the bunny hop key 11 | STRAFE_BHOP_ONLY = true 12 | -------------------------------------------------------------------------------- /settings/ChamsEsp.txt: -------------------------------------------------------------------------------- 1 | //Enable clrRender chams 2 | //This modifies a cvar that isn't currently checked, which can change at any time. Use at your own discretion. 3 | CHAMS_ESP = false 4 | 5 | //Color players based on their health, overrides entity color 6 | CHAMS_SHOW_HEALTH = false 7 | 8 | //clrRender brightness (0 - 1000) 9 | CHAMS_BRIGHTNESS = 250 10 | 11 | //Enable chams esp on teammates 12 | CHAMS_SHOW_TEAM = false 13 | 14 | //Enable chams esp on enemies 15 | CHAMS_SHOW_ENEMIES = true 16 | 17 | //Enable chams on yourself (guns and hand) 18 | CHAMS_SHOW_SELF = false 19 | 20 | CHAMS_SHOW_TARGET = false 21 | 22 | //Color of your teammates 23 | CHAMS_TEAM_COLOR = Color(red=0, green=0, blue=255, alpha=1.0) 24 | 25 | //Color of your enemies 26 | CHAMS_ENEMY_COLOR = Color(red=255, green=0, blue=4, alpha=1.0) 27 | 28 | //Color of your hands/weapon 29 | CHAMS_SELF_COLOR = Color(red=255, green=94, blue=0, alpha=1.0) 30 | 31 | CHAMS_TARGET_COLOR = Color(red=0, green=174, blue=255, alpha=1.0) 32 | -------------------------------------------------------------------------------- /settings/Data/ToneMaps.txt: -------------------------------------------------------------------------------- 1 | DUST : 0.5 : 1.25 2 | MIRAGE : 0.8 : 1.3 3 | INFERNO : 0.75 : 1.15 4 | VERTIGO : 0.75 : 1.15 5 | COBBLESTONE : 0.6 : 1.5 6 | CACHE : 0.55 : 1.0 7 | ANUBIS : 0.0 : 0.9 8 | MUTINY : 1.2 : 2.0 9 | SWAMP : 0.5 : 1.25 10 | TRAIN : 0.8 : 1.3 11 | OVERPASS : 0.75 : 1.15 12 | NUKE : 0.75 : 1.15 13 | CANALS : 0.5 : 2.5 14 | AGENCY : 0.0 : 2.2 15 | MILITIA : 1.5 : 4.0 16 | OFFICE : 0.5 : 5.0 17 | ITALY : 0.5 : 5.0 18 | ASSAULT : 0.5 : 4.0 -------------------------------------------------------------------------------- /settings/Data/WeaponStats.txt: -------------------------------------------------------------------------------- 1 | DESERT_EAGLE : 230 : 2.000000 : 72.230003 : 48.099998 : 72.230003 : 48.099998 : 230 : 2.000000 2 | DUAL_BERETTA : 240 : 2.000000 : 11.160000 : 17.850000 : 11.960000 : 17.850000 : 240 : 2.000000 3 | FIVE_SEVEN : 240 : 2.000000 : 25 : 40 : 32.450001 : 13.410000 : 240 : 2.000000 4 | GLOCK : 240 : 2.000000 : 56.000000 : 10.000000 : 45.000000 : 12.950000 : 240 : 15.000000 5 | P2000 : 240 : 2.000000 : 50.000000 : 13.000000 : 13.150000 : 13.870000 : 240 : 1.500000 6 | P250 : 240 : 2.000000 : 52.450001 : 20 : 52.450001 : 13.410000 : 240 : 2.000000 7 | CZ75A : 240 : 3.000000 : 35.000000 : 13.410000 : 25.000000 : 13.410000 : 240 : 3.000000 8 | TEC9 : 240 : 2.000000 : 45 : 3.810000 : 36.880001 : 3.810000 : 240 : 1.800000 9 | PP_BIZON : 240 : 1 : 2.880000 : 27.570000 : 2.880000 : 27.570000 : 240 : 1 10 | MAC10 : 240 : 0.600000 : 4.760000 : 13.990000 : 4.760000 : 13.990000 : 240 : 0.600000 11 | MP7 : 220 : 0.600000 : 2.180000 : 19.860001 : 2.180000 : 19.860001 : 220 : 0.600000 12 | MP5SD : 235 : 0.600000 : 2.180000 : 30 : 2.180000 : 19.860001 : 220 : 0.600000 13 | MP9 : 240 : 0.600000 : 3.700000 : 29.040001 : 3.700000 : 29.040001 : 240 : 0.600000 14 | P90 : 230 : 1.000000 : 2.850000 : 31 : 2.850000 : 31 : 230 : 1.000000 15 | UMP45 : 230 : 1.000000 : 3.420000 : 28.760000 : 3.420000 : 28.760000 : 230 : 1.000000 16 | AK47 : 215 : 0.600000 : 7.800000 : 175.059998 : 7.800000 : 175.059998 : 215 : 0.600000 17 | AUG : 220 : 0.500000 : 7.290000 : 135.449997 : 7.290000 : 105.449997 : 150 : 0.300000 18 | FAMAS : 220 : 0.600000 : 6.050000 : 99.339996 : 3.350000 : 99.339996 : 220 : 0.600000 19 | GALILAR : 215 : 0.600000 : 7.000000 : 123.559998 : 5.850000 : 106.519997 : 215 : 0.600000 20 | M4A4 : 225 : 0.600000 : 7.000000 : 137.880005 : 6.340000 : 122.000000 : 225 : 0.450000 21 | SG553 : 210 : 0.600000 : 7.950000 : 136.009995 : 9.200000 : 136.009995 : 150 : 0.300000 22 | AWP : 200 : 0.200000 : 53.849998 : 176.479996 : 53.849998 : 176.479996 : 100 : 0.200000 23 | G3SG1 : 215 : 0.300000 : 18.610001 : 150.479996 : 18.610001 : 150.479996 : 120 : 0.300000 24 | SCAR20 : 215 : 0.300000 : 18.610001 : 150.479996 : 18.610001 : 150.479996 : 120 : 0.300000 25 | SSG08 : 230 : 0.280000 : 22.920000 : 123.449997 : 22.920000 : 123.449997 : 230 : 0.230000 26 | MAG7 : 225 : 40.000000 : 11.190000 : 15.990000 : 11.190000 : 15.990000 : 225 : 40.000000 27 | NOVA : 220 : 40.000000 : 9.720000 : 36.750000 : 9.720000 : 36.750000 : 220 : 40.000000 28 | SAWED_OFF : 210 : 62.000000 : 9.720000 : 16.799999 : 9.720000 : 16.799999 : 210 : 62.000000 29 | XM1014 : 215 : 38.000000 : 8.830000 : 36.029999 : 8.830000 : 36.029999 : 215 : 38.000000 30 | M249 : 195 : 2.000000 : 3.560000 : 156.250000 : 3.560000 : 156.250000 : 195 : 2.000000 31 | NEGEV : 150 : 2 : 30.000000 : 159.139999 : 3.370000 : 159.139999 : 150 : 2 32 | M4A1_SILENCER : 225 : 0.600000 : 12.000000 : 92.879997 : 7.000000 : 122.000000 : 225 : 0.500000 33 | USP_SILENCER : 240 : 2.500000 : 71.000000 : 13.870000 : 52.000000 : 13.870000 : 240 : 1.500000 34 | R8_REVOLVER : 180 : 0.520000 : 50.000000 : 6.500000 : 55.000000 : 36.000000 : 220 : 68.000000 35 | TASER : 220 : 2.000000 : 22.120001 : 1.000000 : 22.120001 : 1.000000 : 220 : 2.000000 -------------------------------------------------------------------------------- /settings/DrawFov.txt: -------------------------------------------------------------------------------- 1 | //Draw FOV (static only) 2 | DRAW_AIM_FOV = true 3 | DRAW_TRIGGER_FOV = true 4 | 5 | //FOV Color 6 | DRAW_AIM_FOV_COLOR = Color(red=0, green=255, blue=13, alpha=1.0) 7 | DRAW_TRIGGER_FOV_COLOR = Color(red=0, green=230, blue=255, alpha=1.0) 8 | 9 | -------------------------------------------------------------------------------- /settings/ESP.txt: -------------------------------------------------------------------------------- 1 | //Global enable esp 2 | ENABLE_ESP = true 3 | 4 | //VK Key Code (http://cherrytree.at/misc/vk.htm), toggles visibility of esp on/off 5 | //Default key is G 6 | VISUALS_TOGGLE_KEY = 35 7 | 8 | //Enable radar esp 9 | RADAR_ESP = false 10 | 11 | //Show enemies on radar when moving 12 | LEGIT_RADAR = true 13 | LEGIT_RADAR_FOOTSTEPS_DISTANCE = 1200 14 | 15 | //Enable audible hitsound 16 | //Activates on enemy hit 17 | ENABLE_HITSOUND = false 18 | 19 | //The file name of the hitsound 20 | HITSOUND_FILE_NAME = "COD.wav" 21 | 22 | //The volume of the hitsound (0.0 - 1.0) 23 | HITSOUND_VOLUME = 0.1 24 | -------------------------------------------------------------------------------- /settings/FootSteps.txt: -------------------------------------------------------------------------------- 1 | //Enable footstep visuals 2 | ENABLE_FOOTSTEPS = false 3 | 4 | //Footstep type (1 = text, 2 = circle, anything else = circle) 5 | FOOTSTEP_TYPE = 1 6 | 7 | //Footstep update timer (in relation to overlay fps) 8 | FOOTSTEP_UPDATE = 30 9 | 10 | //Footstep time to live 11 | FOOTSTEP_TTL = 15 12 | 13 | //Enable for teammates 14 | FOOTSTEP_TEAM = false 15 | 16 | //Enable for enemies 17 | FOOTSTEP_ENEMY = true 18 | 19 | //Team footsteps color 20 | FOOTSTEP_TEAM_COLOR = Color(red=0, green=0, blue=255, alpha=1.0) 21 | 22 | //Team enemy color 23 | FOOTSTEP_ENEMY_COLOR = Color(red=255, green=0, blue=0, alpha=1.0) 24 | -------------------------------------------------------------------------------- /settings/FovChanger.txt: -------------------------------------------------------------------------------- 1 | //Enable Fov Changer 2 | ENABLE_FOV_CHANGER = false 3 | 4 | //Default FOV for each gun 5 | FOV_DEFAULT = 90 6 | 7 | //Default FOV for snipers 8 | FOV_SNIPER_DEFAULT = 90 9 | 10 | //Enable smooth FOV transitioning (where possible) 11 | FOV_SMOOTH = true 12 | 13 | //These are defaulted for invisible scope blur 14 | //Default FOV for zoom lvl 1 (snipers only) 15 | FOV_ZOOM_1 = 40 16 | 17 | //Default FOV for zoom lvl 2 (snipers only) 18 | FOV_ZOOM_2 = 25 19 | -------------------------------------------------------------------------------- /settings/GlowEsp.txt: -------------------------------------------------------------------------------- 1 | //Enable glow esp 2 | GLOW_ESP = false 3 | 4 | //Type of glow on entities (enemies & teammates) 5 | GLOW_ENEMY_TYPE = NORMAL 6 | GLOW_TEAMMATE_TYPE = NORMAL 7 | GLOW_GRENADE_TYPE = NORMAL 8 | GLOW_WEAPON_TYPE = NORMAL 9 | GLOW_BOMB_CARRIER_TYPE = NORMAL 10 | GLOW_BOMB_TYPE = NORMAL 11 | GLOW_TARGET_TYPE = NORMAL 12 | 13 | //Disable through smoke 14 | GLOW_SMOKE_CHECK = false 15 | 16 | //Enable glow esp on teammates 17 | GLOW_SHOW_TEAM = false 18 | 19 | //Glow color will depends on player health 20 | GLOW_SHOW_HEALTH = false 21 | 22 | //Enable glow esp on enemies 23 | GLOW_SHOW_ENEMIES = true 24 | 25 | //Enable glow esp on bomb 26 | GLOW_SHOW_BOMB = true 27 | GLOW_BOMB_ADAPTIVE = true 28 | GLOW_BOMB_ADAPTIVE_CAN_DEFUSE = Color(red=0, green=255, blue=0, alpha=1.0) 29 | GLOW_BOMB_ADAPTIVE_CANT_DEFUSE = Color(red=255, green=0, blue=0, alpha=1.0) 30 | GLOW_BOMB_ADAPTIVE_LITTLE_TIME = Color(red=255, green=255, blue=0, alpha=1.0) 31 | 32 | //Enable glow esp on bomb carrier 33 | GLOW_SHOW_BOMB_CARRIER = true 34 | 35 | //Enable glow esp on dropped weapons 36 | GLOW_SHOW_WEAPONS = true 37 | 38 | //Enable glow esp on dropped/thrown grenades 39 | GLOW_SHOW_GRENADES = false 40 | 41 | //Enable glow esp on visible, in aimbot FOV players 42 | GLOW_SHOW_TARGET = true 43 | 44 | //Color of your teammates 45 | GLOW_TEAM_COLOR = Color(red=0, green=0, blue=255, alpha=1.0) 46 | 47 | //Color of your enemies 48 | GLOW_ENEMY_COLOR = Color(red=255, green=0, blue=0, alpha=0.6) 49 | 50 | //Color of the bomb 51 | GLOW_BOMB_COLOR = Color(red=255, green=255, blue=0, alpha=1.0) 52 | 53 | //Color of the bomb carrier 54 | GLOW_BOMB_CARRIER_COLOR = Color(red=255, green=140, blue=0, alpha=1.0) 55 | 56 | //Color of the defuse kit 57 | GLOW_DEFUSER_COLOR = Color(red=145, green=0, blue=90, alpha=1.0) 58 | 59 | //Color of dropped weapons 60 | GLOW_WEAPON_COLOR = Color(red=251, green=0, blue=255, alpha=0.5) 61 | 62 | //Color of thrown grenades 63 | GLOW_GRENADE_COLOR = Color(red=0, green=255, blue=0, alpha=1.0) 64 | 65 | //Color of visible, in aimbot FOV players 66 | GLOW_TARGET_COLOR = Color(red=0, green=174, blue=255, alpha=1.0) 67 | 68 | 69 | -------------------------------------------------------------------------------- /settings/HeadLevelHelper.txt: -------------------------------------------------------------------------------- 1 | HEAD_LVL_ENABLE = false 2 | 3 | HEAD_LVL_DEADZONE = 5 4 | 5 | HEAD_LVL_LINE_WIDTH = 25 6 | 7 | HEAD_LVL_COLOR = Color(red=255, green=255, blue=255, alpha=1.0) 8 | -------------------------------------------------------------------------------- /settings/HitMarker.txt: -------------------------------------------------------------------------------- 1 | //Enable visual hitmarker 2 | //Activates on enemy hit 3 | //Relies on the RCrosshairs X/Y Offset for center position 4 | ENABLE_HITMARKER = true 5 | 6 | //If hitmarker appears at your ingame crosshair, or where your recoil is spraying 7 | HITMARKER_RECOIL_POSITION = false 8 | 9 | //Display number of hits while crosshair is visible 10 | HITMARKER_COMBO = true 11 | 12 | //Visible hitmarker outline 13 | HITMARKER_OUTLINE = true 14 | 15 | //Spacing of lines from the center 16 | HITMARKER_SPACING = 5 17 | 18 | //Line length for hitmarker 19 | HITMARKER_LENGTH = 15 20 | 21 | //Line width for hitmarker 22 | HITMARKER_WIDTH = 3F 23 | 24 | //Color of hitmarker combo text 25 | HITMARKER_COMBO_COLOR = Color(red=255, green=255, blue=255, alpha=1.0) 26 | 27 | //Color of hitmarker 28 | HITMARKER_COLOR = Color(red=255, green=0, blue=0, alpha=1.0) 29 | 30 | //Color of hitmarker outline 31 | HITMARKER_OUTLINE_COLOR = Color(red=0, green=0, blue=0, alpha=1.0) 32 | -------------------------------------------------------------------------------- /settings/IndicatorEsp.txt: -------------------------------------------------------------------------------- 1 | //Enable indicator esp 2 | //Draws arrows pointing towards entities on screen 3 | INDICATOR_ESP = false 4 | 5 | //Size of indicator arrows 6 | INDICATOR_SIZE = 10.0 7 | 8 | //Distance from the center of arrows pointing towards entities off screen 9 | INDICATOR_DISTANCE = 25.0 10 | 11 | //Disable through smoke 12 | INDICATOR_SMOKE_CHECK = false 13 | 14 | //Enable indicator esp on teammates 15 | INDICATOR_SHOW_TEAM = false 16 | 17 | //Enable indicator esp on enemies 18 | INDICATOR_SHOW_ENEMIES = true 19 | 20 | //Enable indicator esp on bomb 21 | INDICATOR_SHOW_BOMB = true 22 | 23 | //Enable defuser esp on defuse kits 24 | INDICATOR_SHOW_DEFUSERS = true 25 | 26 | //Enable indicator esp on bomb carrier 27 | INDICATOR_SHOW_BOMB_CARRIER = true 28 | 29 | //Enable indicator esp on weapons 30 | INDICATOR_SHOW_WEAPONS = true 31 | 32 | //Enable indicator esp on grenades 33 | INDICATOR_SHOW_GRENADES = false 34 | 35 | //Color of your teammates 36 | INDICATOR_TEAM_COLOR = Color(red=0, green=0, blue=255, alpha=1.0) 37 | 38 | //Color of your enemies 39 | INDICATOR_ENEMY_COLOR = Color(red=255, green=0, blue=0, alpha=0.6) 40 | 41 | //Color of the bomb 42 | INDICATOR_BOMB_COLOR = Color(red=255, green=255, blue=0, alpha=1.0) 43 | 44 | //Color of the bomb carrier 45 | INDICATOR_BOMB_CARRIER_COLOR = Color(red=255, green=255, blue=0, alpha=1.0) 46 | 47 | //Color of the defuse kit 48 | INDICATOR_DEFUSER_COLOR = Color(red=145, green=0, blue=90, alpha=1.0) 49 | 50 | //Color of dropped weapons 51 | INDICATOR_WEAPON_COLOR = Color(red=251, green=0, blue=255, alpha=0.5) 52 | 53 | //Color of thrown grenades 54 | INDICATOR_GRENADE_COLOR = Color(red=0, green=255, blue=0, alpha=1.0) 55 | -------------------------------------------------------------------------------- /settings/MiscScripts.txt: -------------------------------------------------------------------------------- 1 | //Enable automatic weapons 2 | //Will attempt to shoot non-automatic weapons based on auto wep delay 3 | AUTOMATIC_WEAPONS = false 4 | 5 | //The MS delay between shooting 6 | AUTO_WEP_DELAY = 10 7 | 8 | KILL_BIND = false 9 | KILL_BIND_KEY = 222 10 | -------------------------------------------------------------------------------- /settings/Nades.txt: -------------------------------------------------------------------------------- 1 | //Enable nade helper 2 | ENABLE_NADE_HELPER = false 3 | 4 | //Enable nade tracer (shows path of an already thrown grenade) - not throw prediction 5 | NADE_TRACER = false 6 | 7 | //The update speed of thrown nades - # out of OPENGL_FPS, per second with FPS of 60 is 60, recommended lowest is 5 8 | NADE_TRACER_UPDATE_TIME = 10 9 | 10 | //How many positions are stored at a time 11 | NADE_TRACER_TIMEOUT = 5 12 | 13 | //Color of the grenade tracer line 14 | NADE_TRACER_COLOR = Color(red=4, green=255, blue=0, alpha=1.0) 15 | 16 | ENABLE_NADE_THROWER = false 17 | NADE_THROWER_SMOOTHNESS = 20 18 | NADE_ACCURACY_RADIUS = 500 19 | NADE_THROWER_KEY = -1 20 | 21 | //Visualize smoke grenades 22 | VISUALIZE_SMOKES = true 23 | 24 | VISUALIZE_SMOKES_COLOR = Color(red=255, green=255, blue=255, alpha=1.0) 25 | 26 | VISUALIZE_SMOKES_POLYS = 8 27 | 28 | VISUALIZE_SMOKES_WIDTH = 150 29 | 30 | VISUALIZE_SMOKES_HEIGHT = 125 31 | -------------------------------------------------------------------------------- /settings/NightMode.txt: -------------------------------------------------------------------------------- 1 | ENABLE_NIGHTMODE = false 2 | 3 | NIGHTMODE_VALUE = 1.0 4 | -------------------------------------------------------------------------------- /settings/OpenGL.txt: -------------------------------------------------------------------------------- 1 | //Enable or disable vsync on the overlay 2 | OPENGL_VSYNC = false 3 | 4 | //FPS of the overlay 5 | //Increasing can cause performance degradation 6 | OPENGL_FPS = 60 7 | 8 | //MSAA antialiasing of the overlay 9 | //0 (disabled), 2, 4, 8 10 | OPENGL_MSAA_SAMPLES = 0 11 | 12 | //Enable or disable GL3 13 | OPENGL_3 = true 14 | -------------------------------------------------------------------------------- /settings/PistolAim.txt: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////// 2 | /////////////////////////////////////// --- GENERAL --- /////////////////////////////////////// 3 | /////////////////////////////////////////////////////////////////////////////////////////////// 4 | 5 | //Enable flat aim 6 | //Writes to angles ingame 7 | PISTOL_ENABLE_FLAT_AIM = false 8 | 9 | //Enable path aim 10 | //Uses mouse movement to aim 11 | PISTOL_ENABLE_PATH_AIM = true 12 | 13 | //Factor recoil when shooting 14 | PISTOL_FACTOR_RECOIL = false 15 | 16 | //Aim Bone 17 | //Default bone to aim at 18 | PISTOL_AIM_BONE = NECK 19 | 20 | //Aim FOV 21 | //Aims at entities inside this value 22 | PISTOL_AIM_FOV = 4 23 | 24 | //Aim speed 25 | //MS delay between aiming steps 26 | //Lower is faster 27 | PISTOL_AIM_SPEED = 2 28 | 29 | //Aim smoothness 30 | //Lower is less smooth (faster snapping) 31 | PISTOL_AIM_SMOOTHNESS = 2.5 32 | 33 | //Force Bone 34 | PISTOL_AIM_FORCE_BONE = Head 35 | 36 | //If the aimbot should only aim when you can shoot 37 | PISTOL_AIM_ONLY_ON_SHOT = true 38 | 39 | //Advanced aim settings 40 | PISTOL_ADVANCED_SETTINGS = false 41 | PISTOL_AIM_RCS_X = 2.0 42 | PISTOL_AIM_RCS_Y = 2.0 43 | PISTOL_AIM_RCS_VARIATION = 0.0 44 | PISTOL_AIM_SPEED_DIVISOR = 1 45 | PISTOL_RANDOM_X_VARIATION = 0 46 | PISTOL_RANDOM_Y_VARIATION = 0 47 | PISTOL_VARIATION_DEADZONE = 0 48 | 49 | 50 | /////////////////////////////////////////////////////////////////////////////////////////////// 51 | ///////////////////////////////////// --- PERFECT AIM --- ///////////////////////////////////// 52 | /////////////////////////////////////////////////////////////////////////////////////////////// 53 | 54 | //Enable perfect aim 55 | //Will instantly snap to the aimbone 56 | PISTOL_PERFECT_AIM = false 57 | 58 | //Perfect aim fov (0 - 45) 59 | PISTOL_PERFECT_AIM_FOV = 10 60 | 61 | //Perfect aim % chance to activate (1 - 100) 62 | PISTOL_PERFECT_AIM_CHANCE = 15 63 | -------------------------------------------------------------------------------- /settings/RCS.txt: -------------------------------------------------------------------------------- 1 | //Enable RCS 2 | ENABLE_RCS = false 3 | 4 | //RCS type (calculation) LEGACY/STABLE 5 | RCS_TYPE = STABLE 6 | 7 | //RCS smoothing (0.1 - 1.0) 8 | //0.1 is the least accurate 9 | //1.0 is 'perfect' RCS 10 | RCS_SMOOTHING_X = 0.7 11 | RCS_SMOOTHING_Y = 0.7 12 | 13 | //Moves your cursor back to where you started spraying 14 | RCS_RETURNAIM = false 15 | -------------------------------------------------------------------------------- /settings/RCrosshair.txt: -------------------------------------------------------------------------------- 1 | //Enable recoil crosshair 2 | ENABLE_RECOIL_CROSSHAIR = true 3 | RCROSSHAIR_TYPE = CIRCLE 4 | 5 | //Enable sniper crosshair 6 | //Static crosshair when holding a sniper 7 | ENABLE_SNIPER_CROSSHAIR = true 8 | 9 | //Radius of the crosshair circle 10 | RCROSSHAIR_RADIUS = 10 11 | 12 | //Width of the crosshair bars 13 | RCROSSHAIR_WIDTH = 5 14 | 15 | //Length of the crosshair bars 16 | RCROSSHAIR_LENGTH = 100 17 | 18 | //Alpha of the crosshair 19 | RCROSSHAIR_ALPHA = 0.5 20 | 21 | //Center screen X offset of the crosshair 22 | RCROSSHAIR_XOFFSET = 1 23 | 24 | //Center screen Y offset of the crosshair 25 | RCROSSHAIR_YOFFSET = -2 26 | 27 | //Color of the crosshair 28 | RCROSSHAIR_COLOR = Color(red=255, green=255, blue=255, alpha=1.0) 29 | -------------------------------------------------------------------------------- /settings/ReducedFlash.txt: -------------------------------------------------------------------------------- 1 | //Enable reduced flash 2 | ENABLE_REDUCED_FLASH = false 3 | 4 | //Max alpha of the flash (0.0F - 255.0F) 5 | //255 is fully flashed, 0 is no flash 6 | FLASH_MAX_ALPHA = 200F 7 | -------------------------------------------------------------------------------- /settings/RifleAim.txt: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////// 2 | /////////////////////////////////////// --- GENERAL --- /////////////////////////////////////// 3 | /////////////////////////////////////////////////////////////////////////////////////////////// 4 | 5 | //Enable flat aim 6 | //Writes to angles ingame 7 | RIFLE_ENABLE_FLAT_AIM = false 8 | 9 | //Enable path aim 10 | //Uses mouse movement to aim 11 | RIFLE_ENABLE_PATH_AIM = true 12 | 13 | //Factor recoil when shooting 14 | RIFLE_FACTOR_RECOIL = true 15 | 16 | //Aim Bone 17 | //Default bone to aim at 18 | RIFLE_AIM_BONE = STOMACH 19 | 20 | //Aim FOV 21 | //Aims at entities inside this value 22 | RIFLE_AIM_FOV = 7.0 23 | 24 | //Aim speed 25 | //MS delay between aiming steps 26 | //Lower is faster 27 | RIFLE_AIM_SPEED = 4 28 | 29 | //Aim smoothness 30 | //Lower is less smooth (faster snapping) 31 | RIFLE_AIM_SMOOTHNESS = 4.5 32 | 33 | //Force Bone 34 | RIFLE_AIM_FORCE_BONE = Head 35 | 36 | //Aim after X shots 37 | RIFLE_AIM_AFTER_SHOTS = 1 38 | 39 | //If the aimbot should only aim when you can shoot 40 | RIFLE_AIM_ONLY_ON_SHOT = false 41 | 42 | //Advanced aim settings 43 | RIFLE_ADVANCED_SETTINGS = false 44 | RIFLE_AIM_RCS_X = 1.0 45 | RIFLE_AIM_RCS_Y = 1.0 46 | RIFLE_AIM_RCS_VARIATION = 0.0 47 | RIFLE_AIM_SPEED_DIVISOR = 1 48 | RIFLE_RANDOM_X_VARIATION = 0 49 | RIFLE_RANDOM_Y_VARIATION = 0 50 | RIFLE_VARIATION_DEADZONE = 0 51 | 52 | 53 | /////////////////////////////////////////////////////////////////////////////////////////////// 54 | ///////////////////////////////////// --- PERFECT AIM --- ///////////////////////////////////// 55 | /////////////////////////////////////////////////////////////////////////////////////////////// 56 | 57 | //Enable perfect aim 58 | //Will instantly snap to the aimbone 59 | RIFLE_PERFECT_AIM = false 60 | 61 | //Perfect aim fov (0 - 45) 62 | RIFLE_PERFECT_AIM_FOV = 5 63 | 64 | //Perfect aim % chance to activate (1 - 100) 65 | RIFLE_PERFECT_AIM_CHANCE = 10 66 | -------------------------------------------------------------------------------- /settings/ShotgunAim.txt: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////// 2 | /////////////////////////////////////// --- GENERAL --- /////////////////////////////////////// 3 | /////////////////////////////////////////////////////////////////////////////////////////////// 4 | 5 | //Enable flat aim 6 | //Writes to angles ingame 7 | SHOTGUN_ENABLE_FLAT_AIM = false 8 | 9 | //Enable path aim 10 | //Uses mouse movement to aim 11 | SHOTGUN_ENABLE_PATH_AIM = true 12 | 13 | //Factor recoil when shooting 14 | SHOTGUN_FACTOR_RECOIL = false 15 | 16 | //Aim Bone 17 | //Default bone to aim at 18 | SHOTGUN_AIM_BONE = Nearest 19 | 20 | //Aim FOV 21 | //Aims at entities inside this value 22 | SHOTGUN_AIM_FOV = 6 23 | 24 | //Aim speed 25 | //MS delay between aiming steps 26 | //Lower is faster 27 | SHOTGUN_AIM_SPEED = 1 28 | 29 | //Aim smoothness 30 | //Lower is less smooth (faster snapping) 31 | SHOTGUN_AIM_SMOOTHNESS = 1.0 32 | 33 | //Force Bone 34 | SHOTGUN_AIM_FORCE_BONE = Head 35 | 36 | //If the aimbot should only aim when you can shoot 37 | SHOTGUN_AIM_ONLY_ON_SHOT = true 38 | 39 | //Advanced aim settings 40 | SHOTGUN_ADVANCED_SETTINGS = false 41 | SHOTGUN_AIM_RCS_X = 1.0 42 | SHOTGUN_AIM_RCS_Y = 1.0 43 | SHOTGUN_AIM_RCS_VARIATION = 0.0 44 | SHOTGUN_AIM_SPEED_DIVISOR = 1 45 | SHOTGUN_RANDOM_X_VARIATION = 0 46 | SHOTGUN_RANDOM_Y_VARIATION = 0 47 | SHOTGUN_VARIATION_DEADZONE = 0 48 | 49 | 50 | /////////////////////////////////////////////////////////////////////////////////////////////// 51 | ///////////////////////////////////// --- PERFECT AIM --- ///////////////////////////////////// 52 | /////////////////////////////////////////////////////////////////////////////////////////////// 53 | 54 | //Enable perfect aim 55 | //Will instantly snap to the aimbone 56 | SHOTGUN_PERFECT_AIM = false 57 | 58 | //Perfect aim fov (0 - 45) 59 | SHOTGUN_PERFECT_AIM_FOV = 1 60 | 61 | //Perfect aim % chance to activate (1 - 100) 62 | SHOTGUN_PERFECT_AIM_CHANCE = 1 63 | -------------------------------------------------------------------------------- /settings/SkeletonEsp.txt: -------------------------------------------------------------------------------- 1 | //Enable skeleton esp 2 | SKELETON_ESP = false 3 | 4 | //Enable skeleton esp on teammates 5 | SKELETON_SHOW_TEAM = false 6 | 7 | //Enable skeleton esp on enemies 8 | SKELETON_SHOW_ENEMIES = true 9 | -------------------------------------------------------------------------------- /settings/SkinChanger.txt: -------------------------------------------------------------------------------- 1 | SKINCHANGER = false 2 | 3 | FORCE_UPDATE_AUTO = true 4 | 5 | //Knife 6 | SKIN_KNIFE = sWeapon(tSkinID = 560, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 7 | 8 | //Pistols 9 | SKIN_DESERT_EAGLE = sWeapon(tSkinID = 711, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 10 | SKIN_DUAL_BERETTA = sWeapon(tSkinID = 625, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 11 | SKIN_FIVE_SEVEN = sWeapon(tSkinID = 660, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 12 | SKIN_GLOCK = sWeapon(tSkinID=607, tStatTrak=1337, tWear=1.0E-4, tSeed=-1) 13 | SKIN_USP_SILENCER = sWeapon(tSkinID = 504, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 14 | SKIN_CZ75A = sWeapon(tSkinID = 643, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 15 | SKIN_R8_REVOLVER = sWeapon(tSkinID = 683, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 16 | SKIN_P2000 = sWeapon(tSkinID = 591, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 17 | SKIN_TEC9 = sWeapon(tSkinID = 889, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 18 | SKIN_P250 = sWeapon(tSkinID = 678, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 19 | 20 | //Smgs 21 | SKIN_MAC10 = sWeapon(tSkinID = 433, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 22 | SKIN_P90 = sWeapon(tSkinID = 636, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 23 | SKIN_MP5 = sWeapon(tSkinID = 810, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 24 | SKIN_UMP45 = sWeapon(tSkinID = 802, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 25 | SKIN_MP7 = sWeapon(tSkinID = 696, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 26 | SKIN_MP9 = sWeapon(tSkinID = 734, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 27 | SKIN_PP_BIZON = sWeapon(tSkinID = 542, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 28 | 29 | //Rifles 30 | SKIN_AK47 = sWeapon(tSkinID = 675, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 31 | SKIN_AUG = sWeapon(tSkinID = 845, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 32 | SKIN_FAMAS = sWeapon(tSkinID = 919, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 33 | SKIN_SG553 = sWeapon(tSkinID = 897, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 34 | SKIN_GALIL = sWeapon(tSkinID = 398, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 35 | SKIN_M4A4 = sWeapon(tSkinID = 844, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 36 | SKIN_M4A1_SILENCER = sWeapon(tSkinID = 497, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 37 | SKIN_NEGEV = sWeapon(tSkinID = 763, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 38 | SKIN_M249 = sWeapon(tSkinID = 496, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 39 | 40 | //Snipers 41 | SKIN_AWP = sWeapon(tSkinID=917, tStatTrak=1337, tWear=0.01, tSeed=-1) 42 | SKIN_G3SG1 = sWeapon(tSkinID = 511, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 43 | SKIN_SCAR20 = sWeapon(tSkinID = 391, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 44 | SKIN_SSG08 = sWeapon(tSkinID = 624, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 45 | 46 | //Shotguns 47 | SKIN_XM1014 = sWeapon(tSkinID = 850, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 48 | SKIN_MAG7 = sWeapon(tSkinID = 737, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 49 | SKIN_SAWED_OFF = sWeapon(tSkinID = 720, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 50 | SKIN_NOVA = sWeapon(tSkinID = 537, tStatTrak = 1337, tWear = 0.0001F, tSeed = -1) 51 | -------------------------------------------------------------------------------- /settings/SmgAim.txt: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////// 2 | /////////////////////////////////////// --- GENERAL --- /////////////////////////////////////// 3 | /////////////////////////////////////////////////////////////////////////////////////////////// 4 | 5 | //Enable flat aim 6 | //Writes to angles ingame 7 | SMG_ENABLE_FLAT_AIM = false 8 | 9 | //Enable path aim 10 | //Uses mouse movement to aim 11 | SMG_ENABLE_PATH_AIM = true 12 | 13 | //Factor recoil when shooting 14 | SMG_FACTOR_RECOIL = true 15 | 16 | //Aim Bone 17 | //Default bone to aim at 18 | SMG_AIM_BONE = STOMACH 19 | 20 | //Aim FOV 21 | //Aims at entities inside this value 22 | SMG_AIM_FOV = 15.0 23 | 24 | //Aim speed 25 | //MS delay between aiming steps 26 | //Lower is faster 27 | SMG_AIM_SPEED = 4 28 | 29 | //Aim smoothness 30 | //Lower is less smooth (faster snapping) 31 | SMG_AIM_SMOOTHNESS = 4.0 32 | 33 | //Force Bone 34 | SMG_AIM_FORCE_BONE = Head 35 | 36 | //Aim after X shots 37 | SMG_AIM_AFTER_SHOTS = 0 38 | 39 | //If the aimbot should only aim when you can shoot 40 | SMG_AIM_ONLY_ON_SHOT = false 41 | 42 | //Advanced aim settings 43 | SMG_ADVANCED_SETTINGS = false 44 | SMG_AIM_RCS_X = 1.0 45 | SMG_AIM_RCS_Y = 1.0 46 | SMG_AIM_RCS_VARIATION = 0.0 47 | SMG_AIM_SPEED_DIVISOR = 1 48 | SMG_RANDOM_X_VARIATION = 0 49 | SMG_RANDOM_Y_VARIATION = 0 50 | SMG_VARIATION_DEADZONE = 0 51 | 52 | 53 | /////////////////////////////////////////////////////////////////////////////////////////////// 54 | ///////////////////////////////////// --- PERFECT AIM --- ///////////////////////////////////// 55 | /////////////////////////////////////////////////////////////////////////////////////////////// 56 | 57 | //Enable perfect aim 58 | //Will instantly snap to the aimbone 59 | SMG_PERFECT_AIM = false 60 | 61 | //Perfect aim fov (0 - 45) 62 | SMG_PERFECT_AIM_FOV = 10 63 | 64 | //Perfect aim % chance to activate (1 - 100) 65 | SMG_PERFECT_AIM_CHANCE = 10 66 | -------------------------------------------------------------------------------- /settings/Snaplines.txt: -------------------------------------------------------------------------------- 1 | //Enable snaplines 2 | ENABLE_SNAPLINES = false 3 | 4 | //Line width 5 | SNAPLINES_WIDTH = 3.0 6 | 7 | //Disable through smoke 8 | SNAPLINES_SMOKE_CHECK = false 9 | 10 | //Enable snap lines for enemies 11 | SNAPLINES_ENEMIES = true 12 | 13 | //Enable snaplines for teammates 14 | SNAPLINES_TEAMMATES = false 15 | 16 | //Enable snapline for bomb 17 | SNAPLINES_BOMB = false 18 | 19 | //Enable snapline for bomb carrier 20 | SNAPLINES_BOMB_CARRIER = false 21 | 22 | //Enable snaplines for weapons 23 | SNAPLINES_WEAPONS = false 24 | 25 | //Enable snaplines for defuse kits 26 | SNAPLINES_DEFUSE_KITS = false 27 | 28 | //Snaplines enemy color 29 | SNAPLINES_ENEMY_COLOR = Color(red=255, green=0, blue=0, alpha=1.0) 30 | 31 | //Snaplines teammates color 32 | SNAPLINES_TEAM_COLOR = Color(red=0, green=0, blue=255, alpha=1.0) 33 | 34 | //Snaplines bomb color 35 | SNAPLINES_BOMB_COLOR = Color(red=255, green=255, blue=0, alpha=1.0) 36 | 37 | //Snaplines enemy color 38 | SNAPLINES_BOMB_CARRIER_COLOR = Color(red=255, green=140, blue=0, alpha=1.0) 39 | 40 | //Snaplines weapon color 41 | SNAPLINES_WEAPON_COLOR = Color(red=251, green=0, blue=255, alpha=1.0) 42 | 43 | //Snaplines defuse kit color 44 | SNAPLINES_DEFUSE_KIT_COLOR = Color(red=255, green=255, blue=255, alpha=1.0) 45 | -------------------------------------------------------------------------------- /settings/SniperAim.txt: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////// 2 | /////////////////////////////////////// --- GENERAL --- /////////////////////////////////////// 3 | /////////////////////////////////////////////////////////////////////////////////////////////// 4 | 5 | //Enable flat aim 6 | //Writes to angles ingame 7 | SNIPER_ENABLE_FLAT_AIM = true 8 | 9 | //Enable path aim 10 | //Uses mouse movement to aim 11 | SNIPER_ENABLE_PATH_AIM = false 12 | 13 | //Enable scoped only 14 | //Will only aimbot when scoped in 15 | SNIPER_ENABLE_SCOPED_ONLY = true 16 | 17 | //Factor recoil when shooting 18 | SNIPER_FACTOR_RECOIL = false 19 | 20 | //Aim Bone 21 | //Default bone to aim at 22 | SNIPER_AIM_BONE = NEAREST 23 | 24 | //Aim FOV 25 | //Aims at entities inside this value 26 | SNIPER_AIM_FOV = 8 27 | 28 | //Aim speed 29 | //MS delay between aiming steps 30 | //Lower is faster 31 | SNIPER_AIM_SPEED = 1 32 | 33 | //Force Bone 34 | SNIPER_AIM_FORCE_BONE = Head 35 | 36 | //Aim smoothness 37 | //Lower is less smooth (faster snapping) 38 | SNIPER_AIM_SMOOTHNESS = 1.0 39 | 40 | //If the aimbot should only aim when you can shoot 41 | SNIPER_AIM_ONLY_ON_SHOT = true 42 | 43 | //Advanced aim settings 44 | SNIPER_ADVANCED_SETTINGS = false 45 | SNIPER_AIM_RCS_X = 1.0 46 | SNIPER_AIM_RCS_Y = 1.0 47 | SNIPER_AIM_RCS_VARIATION = 0.0 48 | SNIPER_AIM_SPEED_DIVISOR = 1 49 | SNIPER_RANDOM_X_VARIATION = 0 50 | SNIPER_RANDOM_Y_VARIATION = 0 51 | SNIPER_VARIATION_DEADZONE = 0 52 | 53 | 54 | /////////////////////////////////////////////////////////////////////////////////////////////// 55 | ///////////////////////////////////// --- PERFECT AIM --- ///////////////////////////////////// 56 | /////////////////////////////////////////////////////////////////////////////////////////////// 57 | 58 | //Enable perfect aim 59 | //Will instantly snap to the aimbone 60 | SNIPER_PERFECT_AIM = false 61 | 62 | //Perfect aim fov (0 - 45) 63 | SNIPER_PERFECT_AIM_FOV = 1 64 | 65 | //Perfect aim % chance to activate (1 - 100) 66 | SNIPER_PERFECT_AIM_CHANCE = 1 67 | -------------------------------------------------------------------------------- /settings/SpectatorList.txt: -------------------------------------------------------------------------------- 1 | /** 2 | * Enable/disable the spectator list 3 | */ 4 | SPECTATOR_LIST = true 5 | 6 | /** 7 | * X/Y of the bomb timer menu 8 | * Alpha of the bomb timer menu 9 | */ 10 | SPECTATOR_LIST_X = 2260.0 11 | SPECTATOR_LIST_Y = 420.0 12 | SPECTATOR_LIST_ALPHA = 0.75 13 | -------------------------------------------------------------------------------- /settings/SpreadCircle.txt: -------------------------------------------------------------------------------- 1 | SPREAD_CIRCLE = true 2 | SPREAD_CIRCLE_COLOR = Color(red=255, green=255, blue=255, alpha=1.0) 3 | -------------------------------------------------------------------------------- /settings/TriggerBot.txt: -------------------------------------------------------------------------------- 1 | //Enable bone trigger 2 | ENABLE_TRIGGER = false 3 | 4 | //Enable auto knife 5 | ENABLE_AUTO_KNIFE = false 6 | 7 | //Enable bone trigger activation when holding the specified weapons 8 | PISTOL_TRIGGER = true 9 | RIFLE_TRIGGER = true 10 | SHOTGUN_TRIGGER = true 11 | SMG_TRIGGER = true 12 | SNIPER_TRIGGER = true 13 | 14 | //The bone trigger activation FOV (0 - 90) 15 | PISTOL_TRIGGER_FOV = 1 16 | RIFLE_TRIGGER_FOV = 2.0 17 | SHOTGUN_TRIGGER_FOV = 5 18 | SMG_TRIGGER_FOV = 3.0 19 | SNIPER_TRIGGER_FOV = 5 20 | 21 | //Activate if incross (recommended for sniper) 22 | PISTOL_TRIGGER_INCROSS = true 23 | RIFLE_TRIGGER_INCROSS = false 24 | SHOTGUN_TRIGGER_INCROSS = true 25 | SMG_TRIGGER_INCROSS = false 26 | SNIPER_TRIGGER_INCROSS = true 27 | 28 | //Activate If in FOV 29 | PISTOL_TRIGGER_INFOV = true 30 | RIFLE_TRIGGER_INFOV = true 31 | SHOTGUN_TRIGGER_INFOV = false 32 | SMG_TRIGGER_INFOV = true 33 | SNIPER_TRIGGER_INFOV = false 34 | 35 | //Enable aimbot settings when bone trigger activates for these specified weapons 36 | PISTOL_TRIGGER_AIMBOT = true 37 | RIFLE_TRIGGER_AIMBOT = true 38 | SHOTGUN_TRIGGER_AIMBOT = false 39 | SMG_TRIGGER_AIMBOT = true 40 | SNIPER_TRIGGER_AIMBOT = false 41 | 42 | //If should attempt to shoot at backtrack 43 | PISTOL_TRIGGER_BACKTRACK = true 44 | RIFLE_TRIGGER_BACKTRACK = true 45 | SHOTGUN_TRIGGER_BACKTRACK = true 46 | SMG_TRIGGER_BACKTRACK = true 47 | SNIPER_TRIGGER_BACKTRACK = true 48 | 49 | //Default initial shot MS delay on bone trigger activation (0 - 1000) 50 | PISTOL_TRIGGER_INIT_SHOT_DELAY = 150 51 | RIFLE_TRIGGER_INIT_SHOT_DELAY = 100 52 | SHOTGUN_TRIGGER_INIT_SHOT_DELAY = 100 53 | SMG_TRIGGER_INIT_SHOT_DELAY = 150 54 | SNIPER_TRIGGER_INIT_SHOT_DELAY = 100 55 | 56 | //Default initial shot MS delay on bone trigger activation (0 - 1000) 57 | PISTOL_TRIGGER_PER_SHOT_DELAY = 150 58 | RIFLE_TRIGGER_PER_SHOT_DELAY = 100 59 | SHOTGUN_TRIGGER_PER_SHOT_DELAY = 100 60 | SMG_TRIGGER_PER_SHOT_DELAY = 150 61 | SNIPER_TRIGGER_PER_SHOT_DELAY = 100 62 | 63 | //Enable currently held weapons aimbot setting's on bone trigger activation 64 | AIM_ON_TRIGGER = true 65 | 66 | //Enable bone trigger key that enables bone trigger only when TRIGGER_KEY is pressed 67 | TRIGGER_ENABLE_KEY = false 68 | 69 | //VK Key Code (http://cherrytree.at/misc/vk.htm), enables bone trigger when held 70 | //Default key is F 71 | TRIGGER_KEY = 70 72 | -------------------------------------------------------------------------------- /settings/hitsounds/COD.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RatPoison-dev/RatPoison/f841d80b76599397f85386ad91e13a00e14277cc/settings/hitsounds/COD.wav -------------------------------------------------------------------------------- /settings/hitsounds/Error.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RatPoison-dev/RatPoison/f841d80b76599397f85386ad91e13a00e14277cc/settings/hitsounds/Error.wav -------------------------------------------------------------------------------- /settings/hitsounds/Metal.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RatPoison-dev/RatPoison/f841d80b76599397f85386ad91e13a00e14277cc/settings/hitsounds/Metal.wav -------------------------------------------------------------------------------- /settings/hitsounds/Roblox.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RatPoison-dev/RatPoison/f841d80b76599397f85386ad91e13a00e14277cc/settings/hitsounds/Roblox.wav -------------------------------------------------------------------------------- /settings/hitsounds/Skeet.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RatPoison-dev/RatPoison/f841d80b76599397f85386ad91e13a00e14277cc/settings/hitsounds/Skeet.wav -------------------------------------------------------------------------------- /settings/hitsounds/ratto_aaah.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RatPoison-dev/RatPoison/f841d80b76599397f85386ad91e13a00e14277cc/settings/hitsounds/ratto_aaah.wav -------------------------------------------------------------------------------- /skin/tinted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RatPoison-dev/RatPoison/f841d80b76599397f85386ad91e13a00e14277cc/skin/tinted.png -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/CSGO.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game 2 | 3 | import com.sun.jna.Pointer 4 | import com.sun.jna.platform.win32.WinDef 5 | import org.jire.arrowhead.Module 6 | import org.jire.arrowhead.Process 7 | import org.jire.arrowhead.processByName 8 | import rat.poison.DEFAULT_MENU_APP 9 | import rat.poison.dbg 10 | import rat.poison.game.hooks.constructEntities 11 | import rat.poison.game.hooks.updateCursorEnable 12 | import rat.poison.game.netvars.NetVars 13 | import rat.poison.settings.CLIENT_MODULE_NAME 14 | import rat.poison.settings.ENGINE_MODULE_NAME 15 | import rat.poison.settings.PROCESS_ACCESS_FLAGS 16 | import rat.poison.settings.PROCESS_NAME 17 | import rat.poison.utils.every 18 | import rat.poison.utils.inBackground 19 | import rat.poison.utils.natives.CUser32 20 | import rat.poison.utils.retry 21 | import kotlin.system.exitProcess 22 | 23 | object CSGO { 24 | const val ENTITY_SIZE = 16 25 | const val GLOW_OBJECT_SIZE = 56 26 | 27 | lateinit var csgoEXE: Process 28 | private set 29 | 30 | lateinit var clientDLL: Module 31 | private set 32 | lateinit var engineDLL: Module 33 | private set 34 | 35 | var gameHeight: Int = 0 36 | private set 37 | 38 | var gameX: Int = 0 39 | private set 40 | 41 | var gameWidth: Int = 0 42 | private set 43 | 44 | var gameY: Int = 0 45 | private set 46 | 47 | fun initialize() { 48 | if (dbg) println("[DEBUG] Searching for and initializing CSGO") 49 | 50 | retry(128) { 51 | csgoEXE = processByName(PROCESS_NAME, PROCESS_ACCESS_FLAGS)!! 52 | } 53 | 54 | retry(128) { 55 | csgoEXE.loadModules() 56 | engineDLL = csgoEXE.modules[ENGINE_MODULE_NAME]!! 57 | clientDLL = csgoEXE.modules[CLIENT_MODULE_NAME]!! 58 | } 59 | 60 | val rect = WinDef.RECT() 61 | val hwd = CUser32.FindWindowA(null, DEFAULT_MENU_APP) 62 | 63 | //Get initially 64 | if (!CUser32.GetClientRect(hwd, rect)) exitProcess(2) 65 | gameWidth = rect.right - rect.left 66 | gameHeight = rect.bottom - rect.top 67 | 68 | if (!CUser32.GetWindowRect(hwd, rect)) exitProcess(3) 69 | gameX = rect.left + (((rect.right - rect.left) - gameWidth) / 2) 70 | gameY = rect.top + ((rect.bottom - rect.top) - gameHeight) 71 | 72 | every(1000) { 73 | if (!CUser32.GetClientRect(hwd, rect)) exitProcess(2) 74 | gameWidth = rect.right - rect.left 75 | gameHeight = rect.bottom - rect.top 76 | 77 | if (!CUser32.GetWindowRect(hwd, rect)) exitProcess(3) 78 | gameX = rect.left + (((rect.right - rect.left) - gameWidth) / 2) 79 | gameY = rect.top + ((rect.bottom - rect.top) - gameHeight) 80 | } 81 | 82 | every(1000, continuous = true) { 83 | inBackground = Pointer.nativeValue(hwd.pointer) != CUser32.GetForegroundWindow() 84 | } 85 | 86 | NetVars.load() 87 | 88 | constructEntities() 89 | updateCursorEnable() 90 | 91 | if (dbg) println("[DEBUG] CSGO initialized") 92 | } 93 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/ClientState.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game 2 | 3 | import rat.poison.game.CSGO.csgoEXE 4 | import rat.poison.game.offsets.EngineOffsets.dwViewAngles 5 | import rat.poison.utils.Angle 6 | 7 | typealias ClientState = Long 8 | 9 | fun ClientState.angle(): Angle { 10 | val tmpAng = Angle() 11 | tmpAng.x = csgoEXE.float(this + dwViewAngles) 12 | tmpAng.y = csgoEXE.float(this + dwViewAngles + 4) 13 | tmpAng.z = csgoEXE.float(this + dwViewAngles + 8) 14 | 15 | return tmpAng 16 | } 17 | 18 | fun ClientState.setAngle(angle: Angle) { 19 | if (angle.z != 0F || angle.x < -89 || angle.x > 180 || angle.y < -180 || angle.y > 180 20 | || angle.x.isNaN() || angle.y.isNaN() || angle.z.isNaN()) return 21 | 22 | csgoEXE[this + dwViewAngles] = angle.x // pitch (up and down) 23 | csgoEXE[this + dwViewAngles + 4] = angle.y // yaw (side to side) 24 | // csgo[address + m_dwViewAngles + 8] = angle.z.toFloat() // roll (twist) 25 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/Color.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game 2 | 3 | data class Color(val red: Int, val green: Int, val blue: Int, var alpha: Double = 0.6) -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/Entities.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game 2 | 3 | import it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap 4 | import it.unimi.dsi.fastutil.objects.Object2ObjectMap 5 | import rat.poison.game.entity.EntityType 6 | import rat.poison.game.entity.Player 7 | import rat.poison.settings.MAX_ENTITIES 8 | 9 | @Volatile 10 | var me: Player = 0 11 | @Volatile 12 | var clientState: ClientState = 0 13 | 14 | typealias EntityList = Object2ObjectArrayMap> 15 | 16 | var entitiesValues = arrayOfNulls>(MAX_ENTITIES) 17 | var entitiesValuesCounter = 0 18 | 19 | val entities: Object2ObjectMap> = EntityList(EntityType.size).apply { 20 | for (type in EntityType.cachedValues) { 21 | val list = mutableListOf() 22 | put(type, list) 23 | entitiesValues[entitiesValuesCounter++] = list 24 | } 25 | } 26 | 27 | fun entityByType(type: EntityType): EntityContext? = entities[type]?.firstOrNull() 28 | 29 | internal inline fun forEntities(vararg types: EntityType, crossinline body: (EntityContext) -> Unit) { 30 | val forEnts: ArrayList = ArrayList() 31 | 32 | if (types.isEmpty()) { 33 | for (entType in EntityType.values()) { 34 | entities[entType]?.let { forEnts.addAll(it) } 35 | } 36 | } else { 37 | for (entType in types) { 38 | entities[entType]?.let { forEnts.addAll(it) } 39 | } 40 | } 41 | 42 | //iterator later 43 | try { 44 | val iterator = forEnts.listIterator() 45 | while (iterator.hasNext()) { 46 | iterator.next()?.run(body) 47 | } 48 | } catch (e: Exception) { 49 | println("forEntities error, report in discord") 50 | println("$types") 51 | e.printStackTrace() 52 | } 53 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/EntityContext.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game 2 | 3 | import rat.poison.game.entity.Entity 4 | import rat.poison.game.entity.EntityType 5 | 6 | data class EntityContext(var entity: Entity = -1, var glowAddress: Entity = -1, 7 | var glowIndex: Int = -1, var type: EntityType = EntityType.NULL) { 8 | 9 | fun set(entity: Entity, glowAddress: Entity, glowIndex: Int, type: EntityType) = apply { 10 | this.entity = entity 11 | this.glowAddress = glowAddress 12 | this.glowIndex = glowIndex 13 | this.type = type 14 | } 15 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/Ranks.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game 2 | 3 | enum class Ranks(val id: Int, val str: String = "") { 4 | NONE(0, "N/A"), 5 | S1(1, "S1"), 6 | S2(2, "S2"), 7 | S3(3, "S3"), 8 | S4(4, "S4"), 9 | SE(5, "SE"), 10 | SEM(6, "SEM"), 11 | G1(7, "GN1"), 12 | G2(8, "GN2"), 13 | G3(9, "GN3"), 14 | GNM(10, "GNM"), 15 | MG1(11, "MG1"), 16 | MG2(12, "MG2"), 17 | MGE(13, "MGE"), 18 | DMG(14, "DMG"), 19 | LE(15, "LE"), 20 | LEM(16, "LEM"), 21 | SMFC(17, "SMFC"), 22 | GE(18, "GE"); 23 | 24 | companion object { 25 | private val cachedValues = values() 26 | operator fun get(id: Int) = cachedValues.firstOrNull { it.id == id } ?: NONE 27 | } 28 | } 29 | 30 | fun Int.rankName(): String { 31 | return Ranks[this].str 32 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/SignonState.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game 2 | 3 | import rat.poison.utils.extensions.EnumLookUpWithDefault 4 | 5 | @Suppress("unused") 6 | enum class SignOnState { 7 | MAIN_MENU, 8 | CHALLENGE, 9 | CONNECTED, 10 | NEW, 11 | PRE_SPAWN, 12 | SPAWN, 13 | IN_GAME, 14 | CHANGE_LEVEL; 15 | 16 | companion object : EnumLookUpWithDefault(values().associateBy(SignOnState::ordinal), MAIN_MENU) 17 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/WorldToScreen.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game 2 | 3 | import rat.poison.curSettings 4 | import rat.poison.game.CSGO.clientDLL 5 | import rat.poison.game.CSGO.gameHeight 6 | import rat.poison.game.CSGO.gameWidth 7 | import rat.poison.game.offsets.ClientOffsets.dwViewMatrix 8 | import rat.poison.utils.Vector 9 | import rat.poison.utils.generalUtil.strToBool 10 | 11 | val w2sViewMatrix = Array(4) { DoubleArray(4) } 12 | 13 | fun worldToScreen(from: Vector, vOut: Vector): Boolean { 14 | if (!curSettings["MENU"].strToBool()) { 15 | updateViewMatrix() 16 | } 17 | 18 | vOut.x = (w2sViewMatrix[0][0] * from.x + w2sViewMatrix[0][1] * from.y + w2sViewMatrix[0][2] * from.z + w2sViewMatrix[0][3]).toFloat() 19 | vOut.y = (w2sViewMatrix[1][0] * from.x + w2sViewMatrix[1][1] * from.y + w2sViewMatrix[1][2] * from.z + w2sViewMatrix[1][3]).toFloat() 20 | 21 | val w = (w2sViewMatrix[3][0] * from.x + w2sViewMatrix[3][1] * from.y + w2sViewMatrix[3][2] * from.z + w2sViewMatrix[3][3]).toFloat() 22 | 23 | val width = gameWidth 24 | val height = gameHeight 25 | 26 | if (!w.isNaN() && w >= 0.01F) { //If infront (on screen) 27 | val invw = 1F / w 28 | vOut.x *= invw 29 | vOut.y *= invw 30 | 31 | var x = width / 2.0F 32 | var y = height / 2.0F 33 | 34 | x += 0.5F * vOut.x * width + 0.5F 35 | y += 0.5F * vOut.y * height + 0.5F 36 | 37 | vOut.x = x 38 | vOut.y = y 39 | 40 | return true 41 | } else if (!w.isNaN() && w < 0.01F) { //If behind 42 | val invw = -1F / w 43 | 44 | vOut.x *= invw 45 | vOut.y *= invw 46 | 47 | var x = width / 2F 48 | var y = height / 2F 49 | 50 | x += 0.5F * vOut.x * width + 0.5F 51 | y -= 0.5F * vOut.y * height + 0.5F 52 | 53 | vOut.x = x 54 | vOut.y = y 55 | 56 | return false 57 | } else return false 58 | } 59 | 60 | fun updateViewMatrix() { //Call before using multiple world to screens 61 | if (dwViewMatrix > 0L) { 62 | val buffer = clientDLL.read(dwViewMatrix, 4 * 4 * 4) 63 | 64 | if (buffer != null) { 65 | if (buffer.getFloatArray(0, 16).all(Float::isFinite)) { 66 | var offset = 0 67 | for (row in 0..3) for (col in 0..3) { 68 | val value = buffer.getFloat(offset.toLong()) 69 | w2sViewMatrix[row][col] = value.toDouble() 70 | offset += 4 //Changed, error but not compd 71 | } 72 | } 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/entity/Bomb.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game.entity 2 | 3 | import rat.poison.game.CSGO.ENTITY_SIZE 4 | import rat.poison.game.CSGO.clientDLL 5 | import rat.poison.game.CSGO.csgoEXE 6 | import rat.poison.game.netvars.NetVarOffsets 7 | import rat.poison.game.netvars.NetVarOffsets.bBombDefused 8 | import rat.poison.game.netvars.NetVarOffsets.flC4Blow 9 | import rat.poison.game.netvars.NetVarOffsets.flDefuseCountDown 10 | import rat.poison.game.offsets.ClientOffsets.dwEntityList 11 | import rat.poison.utils.extensions.uint 12 | 13 | typealias Bomb = Long 14 | 15 | internal fun Bomb.defused(): Boolean = csgoEXE.boolean(this + bBombDefused) 16 | 17 | internal fun Bomb.blowTime() = csgoEXE.float(this + flC4Blow) 18 | 19 | internal fun Bomb.defuseTime() = csgoEXE.float(this + flDefuseCountDown) 20 | 21 | internal fun Bomb.defuserPointer(): Long = csgoEXE.uint(this + NetVarOffsets.hBombDefuser) 22 | 23 | internal fun Bomb.defuser(): Player { 24 | val defuserPointer = defuserPointer() 25 | return if (defuserPointer > 0) clientDLL.uint(dwEntityList + ((defuserPointer and 0xFFF) - 1L) * ENTITY_SIZE) else 0 26 | } 27 | 28 | internal fun Bomb.owner() = csgoEXE.uint(this + NetVarOffsets.hOwnerEntity) 29 | 30 | internal fun Bomb.carrier(): Player { 31 | val owner = owner() 32 | return if (owner > 0) 33 | clientDLL.uint(dwEntityList + ((owner and 0xFFF) - 1L) * ENTITY_SIZE) 34 | else 0 35 | } 36 | 37 | internal fun Bomb.plantLocation(): String = carrier().location() -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/entity/Entity.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game.entity 2 | 3 | import com.sun.jna.Memory 4 | import it.unimi.dsi.fastutil.longs.Long2ObjectMap 5 | import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap 6 | import rat.poison.game.CSGO.csgoEXE 7 | import rat.poison.game.me 8 | import rat.poison.game.netvars.NetVarOffsets.bSpottedByMask 9 | import rat.poison.game.netvars.NetVarOffsets.dwModel 10 | import rat.poison.game.netvars.NetVarOffsets.iTeamNum 11 | import rat.poison.game.netvars.NetVarOffsets.nSurvivalTeam 12 | import rat.poison.game.netvars.NetVarOffsets.vecOrigin 13 | import rat.poison.game.netvars.NetVarOffsets.vecViewOffset 14 | import rat.poison.game.offsets.ClientOffsets.bDormant 15 | import rat.poison.game.offsets.ClientOffsets.dwIndex 16 | import rat.poison.game.offsets.ClientOffsets.pStudioHdr 17 | import rat.poison.utils.Angle 18 | import rat.poison.utils.extensions.uint 19 | 20 | typealias Entity = Long 21 | 22 | internal fun Entity.spotted(): Boolean { 23 | val meID = csgoEXE.int(me + dwIndex) - 1 24 | val spottedByMask = csgoEXE.uint(this + bSpottedByMask) 25 | val result = spottedByMask and (1 shl meID).toLong() 26 | return result != 0L 27 | } 28 | 29 | internal fun Entity.dormant(): Boolean = try { 30 | csgoEXE.boolean(this + bDormant) 31 | } catch (t: Throwable) { 32 | t.printStackTrace() 33 | false 34 | } 35 | 36 | internal fun Entity.team() = csgoEXE.uint(this + iTeamNum) 37 | 38 | internal fun Entity.survivalTeam() = csgoEXE.uint(this + nSurvivalTeam) 39 | 40 | internal fun Entity.model(): Long = csgoEXE.uint(this + dwModel) 41 | 42 | internal fun Entity.studioHdr(): Long = csgoEXE.uint(this + pStudioHdr) 43 | 44 | private val entity2Angle: Long2ObjectMap = Long2ObjectOpenHashMap(255) 45 | 46 | internal fun Entity.position(): Angle { 47 | val ent = this 48 | val ang = Angle() 49 | ang.apply { 50 | x = csgoEXE.float(ent + vecOrigin) 51 | y = csgoEXE.float(ent + vecOrigin + 4) 52 | z = csgoEXE.float(ent + vecOrigin + 8) + csgoEXE.float(ent + vecViewOffset + 8) 53 | } 54 | return ang 55 | } 56 | 57 | fun Entity.absPosition(): Angle { 58 | val ent = this 59 | val ang = Angle() 60 | ang.apply { 61 | x = csgoEXE.float(ent + vecOrigin) 62 | y = csgoEXE.float(ent + vecOrigin + 4) 63 | z = csgoEXE.float(ent + vecOrigin + 8) 64 | } 65 | return ang 66 | } 67 | 68 | fun Entity.bones(boneID: Int): Angle { 69 | val ang = Angle() 70 | ang.apply { 71 | x = bone(0xC, boneID) 72 | y = bone(0x1C, boneID) 73 | z = bone(0x2C, boneID) 74 | } 75 | return ang 76 | } 77 | 78 | fun Memory.bones(boneID: Int): Angle { 79 | val ang = Angle() 80 | ang.apply { 81 | x = getFloat(((0x30L * boneID) + 0xC)) 82 | y = getFloat(((0x30L * boneID) + 0x1C)) 83 | z = getFloat(((0x30L * boneID) + 0x2C)) 84 | } 85 | return ang 86 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/entity/Weapon.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game.entity 2 | 3 | import rat.poison.game.CSGO.csgoEXE 4 | import rat.poison.game.Weapons 5 | import rat.poison.game.me 6 | import rat.poison.game.netvars.NetVarOffsets 7 | import rat.poison.game.netvars.NetVarOffsets.bInReload 8 | import rat.poison.game.netvars.NetVarOffsets.flNextPrimaryAttack 9 | import rat.poison.game.netvars.NetVarOffsets.iClip1 10 | import rat.poison.utils.extensions.uint 11 | 12 | typealias Weapon = Long 13 | 14 | internal fun Weapon.bullets() = csgoEXE.uint(this + iClip1) 15 | 16 | internal fun Weapon.inReload() = csgoEXE.boolean(this + bInReload) 17 | 18 | internal fun Weapon.nextPrimaryAttack() = csgoEXE.float(this + flNextPrimaryAttack).toDouble() 19 | 20 | internal fun Weapon.canFire(): Boolean = if (bullets() > 0) { 21 | val nextAttack = nextPrimaryAttack() 22 | nextAttack <= 0 || nextAttack < me.time() 23 | } else false 24 | 25 | internal fun Weapon.type(): Weapons { 26 | var id = 42 27 | if (this > 0) 28 | id = csgoEXE.short(this + NetVarOffsets.iItemDefinitionIndex).toInt() 29 | 30 | return Weapons[id] 31 | } 32 | 33 | internal fun Weapon.index(): Int = csgoEXE.short(this + NetVarOffsets.iItemDefinitionIndex).toInt() -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/hooks/OnFlash.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game.hooks 2 | 3 | import rat.poison.game.CSGO.csgoEXE 4 | import rat.poison.game.me 5 | import rat.poison.game.netvars.NetVarOffsets.flFlashMaxAlpha 6 | import rat.poison.scripts.aim.meDead 7 | import rat.poison.utils.hook 8 | import rat.poison.utils.inGame 9 | 10 | val onFlash = hook(250) { 11 | if (me > 0 && !meDead && inGame) csgoEXE.float(me + flFlashMaxAlpha) > 0F 12 | else false 13 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/netvars/Class.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game.netvars 2 | 3 | import org.jire.arrowhead.Addressed 4 | import rat.poison.game.CSGO.csgoEXE 5 | import rat.poison.utils.extensions.readable 6 | import rat.poison.utils.extensions.uint 7 | import kotlin.LazyThreadSafetyMode.NONE 8 | 9 | internal class Class(override val address: Long) : Addressed { 10 | 11 | val id by lazy(NONE) { csgoEXE.uint(address + 20) } 12 | 13 | val next by lazy(NONE) { csgoEXE.uint(address + 16) } 14 | 15 | val table by lazy(NONE) { csgoEXE.uint(address + 12) } 16 | 17 | fun readable() = csgoEXE.read(address, 40).readable() 18 | 19 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/netvars/ClassOffset.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game.netvars 2 | 3 | data class ClassOffset(val className: String, val variableName: String, val offset: Long) -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/netvars/ClassTable.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game.netvars 2 | 3 | import org.jire.arrowhead.Addressed 4 | import rat.poison.game.CSGO.csgoEXE 5 | import rat.poison.utils.extensions.readable 6 | import rat.poison.utils.extensions.toNetVarString 7 | import rat.poison.utils.extensions.uint 8 | import kotlin.LazyThreadSafetyMode.NONE 9 | 10 | internal class ClassTable(override val address: Long, val offset: Long = 16) : Addressed { 11 | 12 | val name by lazy(NONE) { 13 | val bytes = ByteArray(64) 14 | 15 | val memoryAddress = csgoEXE.uint(address + 12) 16 | val memory = csgoEXE.read(memoryAddress, bytes.size)!! 17 | memory.read(0, bytes, 0, bytes.size) 18 | 19 | bytes.toNetVarString() 20 | } 21 | 22 | val propCount by lazy(NONE) { csgoEXE.int(address + 4) } 23 | 24 | fun propForID(id: Int) = csgoEXE.uint(address) + id * 60 25 | 26 | fun readable() = csgoEXE.read(address, offset.toInt()).readable() 27 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/netvars/ClassVariable.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game.netvars 2 | 3 | import org.jire.arrowhead.Addressed 4 | import rat.poison.game.CSGO.csgoEXE 5 | import rat.poison.utils.extensions.toNetVarString 6 | import rat.poison.utils.extensions.uint 7 | import kotlin.LazyThreadSafetyMode.NONE 8 | 9 | internal class ClassVariable(override val address: Long, private val addressOffset: Long) : Addressed { 10 | 11 | private val resolvedAddress by lazy(NONE) { csgoEXE.uint(address) } 12 | 13 | val name by lazy(NONE) { 14 | val bytes = ByteArray(32) 15 | 16 | val memory = csgoEXE.read(resolvedAddress, bytes.size)!! 17 | memory.read(0, bytes, 0, bytes.size) 18 | 19 | bytes.toNetVarString() 20 | } 21 | 22 | val table by lazy(NONE) { csgoEXE.uint(address + 0x28) } 23 | 24 | val offset by lazy(NONE) { addressOffset + csgoEXE.uint(address + 0x2C) } 25 | 26 | val type by lazy(NONE) { csgoEXE.uint(address + 0x4) } 27 | 28 | val elements by lazy(NONE) { csgoEXE.uint(address + 0x34) } 29 | 30 | val stringBufferCount by lazy(NONE) { csgoEXE.uint(address + 0xC) } 31 | 32 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/netvars/NetVar.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game.netvars 2 | 3 | import rat.poison.game.netvars.NetVars.hashClassAndVar 4 | import rat.poison.game.netvars.NetVars.map 5 | import kotlin.reflect.KProperty 6 | 7 | class NetVar(private val className: String, private var varName: String?, val offset: Int, private val index: Int) { 8 | 9 | private var value = -1L 10 | 11 | operator fun getValue(thisRef: Any?, property: KProperty<*>): Long { 12 | if (varName == null) varName = "m_${property.name}" + if (index < 0) "" else "[$index]" 13 | if (value == -1L) value = map[hashClassAndVar(className, varName!!)]!!.offset + offset 14 | return value 15 | } 16 | 17 | operator fun setValue(thisRef: Any?, property: KProperty<*>, value: Long) { 18 | this.value = value 19 | } 20 | 21 | } 22 | 23 | fun netVar(className: String, varName: String? = null, offset: Int = 0, index: Int = -1) 24 | = NetVar(className, if (varName != null && index >= 0) "$varName[$index]" else varName, offset, index) -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/netvars/NetVars.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game.netvars 2 | 3 | import it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap 4 | import rat.poison.game.offsets.ClientOffsets.dwFirstClass 5 | 6 | object NetVars { 7 | 8 | internal val map = Int2ObjectArrayMap(20_000) // Cover us for a while with 20K 9 | 10 | private fun scanTable(netVars: MutableMap, table: ClassTable, offset: Long, name: String) { 11 | for (i in 0 until table.propCount) { 12 | val prop = ClassVariable(table.propForID(i), offset) 13 | if (Character.isDigit(prop.name[0])) continue 14 | 15 | if (!prop.name.contains("baseclass")) { 16 | val netVar = ClassOffset(name, prop.name, prop.offset) 17 | netVars[hashClassAndVar(netVar.className, netVar.variableName)] = netVar 18 | 19 | //println(netVar) //Quick dumper 20 | } 21 | 22 | val child = prop.table 23 | if (0L != child) scanTable(netVars, ClassTable(child), prop.offset, name) 24 | } 25 | } 26 | 27 | fun load() { 28 | map.clear() // for reloads 29 | 30 | var clientClass = Class(dwFirstClass) 31 | while (clientClass.readable()) { 32 | val table = ClassTable(clientClass.table) 33 | if (table.readable()) scanTable(map, table, 0, table.name) 34 | clientClass = Class(clientClass.next) 35 | } 36 | } 37 | 38 | internal fun hashClassAndVar(className: String, varName: String) = className.hashCode() xor varName.hashCode() 39 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/offsets/EngineOffsets.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game.offsets 2 | 3 | import rat.poison.game.CSGO.engineDLL 4 | import rat.poison.utils.extensions.invoke 5 | import rat.poison.utils.get 6 | 7 | object EngineOffsets { 8 | 9 | val dwClientState by engineDLL(1)(0xA1, 0[4], 0x33, 0xD2, 0x6A, 0, 0x6A, 0, 0x33, 0xC9, 0x89, 0xB0) 10 | val dwModelPrecache by engineDLL(0x3, subtract = false)(0x0C, 0x3B, 0x81, 0[4], 0x75, 0x11, 0x8B, 0x45, 0x10, 0x83, 0xF8, 0x01, 0x7C, 0x09, 0x50, 0x83) 11 | 12 | val dwGlobalVars by engineDLL(1)(0x68, 0[4], 0x68, 0[4], 0xFF, 0x50, 0x08, 0x85, 0xC0) 13 | val dwViewAngles by engineDLL(4, subtract = false)(0xF3, 0x0F, 0x11, 0x86, 0[4], 0xF3, 0x0F, 0x10, 0x44, 0x24, 0, 0xF3, 0x0F, 0x11, 0x86) 14 | 15 | val dwSignOnState by engineDLL(2, subtract = false)(0x83, 0xB8, 0[5], 0x0F, 0x94, 0xC0, 0xC3) 16 | val dwbSendPackets = -1 17 | 18 | val pStudioModel by engineDLL(0x2)(0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xB7, 0x80, 19 | 0x00, 0x00, 0x00, 0x00, 0x8B, 0x11, 0x89, 0x45, 0x08, 0x5D, 0xFF, 0x62, 0x38, 0x33, 0xC0) 20 | 21 | val dwModelAmbientMin by engineDLL(4)(0xF3, 0x0F, 0x10, 0x0D, 0[4], 0xF3, 0x0F, 0x11, 0x4C, 0x24, 0, 0x8B, 0x44, 0x24, 0x20, 0x35, 0[4], 0x89, 0x44, 0x24, 0x0C) 22 | 23 | val dwClientState_PlayerInfo by engineDLL(2, subtract = false)(0x8B, 0x89, 0[4], 0x85, 0xC9, 0x0F, 0x84, 0[4], 0x8B, 0x01) 24 | val dwClientState_State by engineDLL(2, subtract = false)(0x83, 0xB8, 0[5], 0x0F, 0x94, 0xC0, 0xC3) 25 | val dwClientState_MapDirectory by engineDLL(7, subtract = false)(0xB8, 0[4], 0xC3, 0x05, 0[4], 0xC3) 26 | val dwClientStateNetChannel by engineDLL(2, subtract = false)(0x8B, 0x8F, 0[4], 0x8B, 0x01, 0x8B, 0x40, 0x18) 27 | val dwGameDir by engineDLL(1)(0x68, 0[4], 0x8D, 0x85, 0[4], 0x50, 0x68, 0[4], 0x68) 28 | val dwClientState_LastOutgoingCommand by engineDLL(2, subtract = false)(0x8B, 0x8F, 0[4], 0x8B, 0x87, 0[4], 0x41) 29 | } 30 | -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/offsets/FirstClassFinder.kt: -------------------------------------------------------------------------------- 1 | 2 | 3 | package rat.poison.game.offsets 4 | 5 | import rat.poison.game.CSGO.clientDLL 6 | import rat.poison.game.CSGO.csgoEXE 7 | import rat.poison.game.offsets.ClientOffsets.decalname 8 | import rat.poison.utils.extensions.uint 9 | 10 | fun findDecal(): Long { 11 | val mask = ByteArray(4) 12 | for (i in 0..3) mask[i] = (((decalname shr 8 * i)) and 0xFF).toByte() 13 | 14 | val memory = Offset.memoryByModule[clientDLL]!! 15 | 16 | var skipped = 0 17 | var currentAddress = 0L 18 | while (currentAddress < clientDLL.size - mask.size) { 19 | if (memory.mask(currentAddress, mask, false)) { 20 | if (skipped < 5) { // skips 21 | currentAddress += 0xA // skipSize 22 | skipped++ 23 | continue 24 | } 25 | return currentAddress + clientDLL.address 26 | } 27 | currentAddress++ 28 | } 29 | 30 | return -1L 31 | } 32 | 33 | fun findFirstClass() = csgoEXE.uint(findDecal() + 0x3B) -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/offsets/ModuleScan.kt: -------------------------------------------------------------------------------- 1 | 2 | 3 | package rat.poison.game.offsets 4 | 5 | import it.unimi.dsi.fastutil.bytes.ByteArrayList 6 | import org.jire.arrowhead.Module 7 | import rat.poison.utils.RepeatedInt 8 | 9 | internal class ModuleScan(private val module: Module, private val patternOffset: Long, 10 | private val addressOffset: Long, private val read: Boolean, 11 | private val subtract: Boolean) { 12 | 13 | operator fun invoke(vararg mask: Any): Offset { 14 | val bytes = ByteArrayList() 15 | 16 | for (flag in mask) when (flag) { 17 | is Number -> bytes.add(flag.toByte()) 18 | is RepeatedInt -> repeat(flag.repeats) { bytes.add(flag.value.toByte()) } 19 | } 20 | 21 | return Offset(module, patternOffset, addressOffset, read, subtract, bytes.toByteArray()) 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/game/offsets/Offset.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.game.offsets 2 | 3 | import com.sun.jna.Memory 4 | import com.sun.jna.Pointer 5 | import it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap 6 | import org.jire.arrowhead.Addressed 7 | import org.jire.arrowhead.Module 8 | import rat.poison.utils.extensions.uint 9 | import kotlin.LazyThreadSafetyMode.NONE 10 | import kotlin.reflect.KProperty 11 | 12 | class Offset(val module: Module, private val patternOffset: Long, private val addressOffset: Long, 13 | val read: Boolean, private val subtract: Boolean, private val mask: ByteArray) : Addressed { 14 | 15 | companion object { 16 | val memoryByModule = Object2ObjectArrayMap() 17 | 18 | private fun Offset.cachedMemory(): Memory { 19 | var memory = memoryByModule[module] 20 | if (memory == null) { 21 | memory = module.read(0, module.size.toInt(), fromCache = false)!! 22 | memoryByModule[module] = memory 23 | } 24 | return memory 25 | } 26 | } 27 | 28 | private val memory = cachedMemory() 29 | 30 | override val address by lazy(NONE) { 31 | val offset = module.size - mask.size 32 | 33 | var currentAddress = 0L 34 | while (currentAddress < offset) { 35 | if (memory.mask(currentAddress, mask)) { 36 | currentAddress += module.address + patternOffset 37 | if (read) currentAddress = module.process.uint(currentAddress) 38 | if (subtract) currentAddress -= module.address 39 | return@lazy currentAddress + addressOffset 40 | } 41 | currentAddress++ 42 | } 43 | 44 | throw IllegalStateException("Failed to resolve offset") 45 | } 46 | 47 | private var value = -1L 48 | 49 | operator fun getValue(thisRef: Any?, property: KProperty<*>): Long { 50 | if (value == -1L) 51 | value = address 52 | return value 53 | } 54 | 55 | operator fun setValue(thisRef: Any?, property: KProperty<*>, value: Long) { 56 | this.value = value 57 | } 58 | 59 | } 60 | 61 | fun Pointer.mask(offset: Long, mask: ByteArray, skipZero: Boolean = true): Boolean { 62 | for (i in 0..mask.lastIndex) { 63 | val value = mask[i] 64 | if (skipZero && 0 == value.toInt()) continue 65 | if (value != getByte(offset + i)) 66 | return false 67 | } 68 | return true 69 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/interfaces/IOverlay.kt: -------------------------------------------------------------------------------- 1 | ////Courtesy of Mr Noad 2 | 3 | package rat.poison.interfaces 4 | 5 | interface IOverlay { 6 | val haveTargetWindow: Boolean 7 | var clickThrough: Boolean 8 | var protectAgainstScreenshots: Boolean 9 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/interfaces/IOverlayListener.kt: -------------------------------------------------------------------------------- 1 | ////Courtesy of Mr Noad 2 | 3 | package rat.poison.interfaces 4 | 5 | interface IOverlayListener { 6 | fun onTargetAppWindowClosed(overlay: IOverlay) 7 | fun onAfterInit(overlay: IOverlay) 8 | fun onActive(overlay: IOverlay) 9 | fun onPassive(overlay: IOverlay) 10 | fun onBackground(overlay: IOverlay) 11 | fun onForeground(overlay: IOverlay) 12 | fun onBoundsChange(overlay: IOverlay, x: Int, y: Int, width: Int, height: Int) 13 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/jna/User32.kt: -------------------------------------------------------------------------------- 1 | ////Courtesy of Mr Noad 2 | 3 | package rat.poison.jna 4 | 5 | import com.sun.jna.Native 6 | import com.sun.jna.ptr.IntByReference 7 | import com.sun.jna.win32.StdCallLibrary 8 | import rat.poison.jna.structures.Rect 9 | import rat.poison.jna.structures.WindowCompositionAttributeData 10 | 11 | //TODO:convert to enum ffs 12 | const val AccentFlag_DrawLeftBorder = 0x20 13 | const val AccentFlag_DrawTopBorder = 0x40 14 | const val AccentFlag_DrawRightBorder = 0x80 15 | const val AccentFlag_DrawBottomBorder = 0x100 16 | const val AccentFlag_DrawAllBorders = 17 | (AccentFlag_DrawLeftBorder or AccentFlag_DrawTopBorder or AccentFlag_DrawRightBorder or AccentFlag_DrawBottomBorder) 18 | 19 | 20 | const val WS_EX_TOOLWINDOW = 0x00000080 21 | const val WS_EX_TOPMOST = 0x00000008 22 | const val HWND_TOPPOS = -1L 23 | const val HWND_ZERO = 0L 24 | 25 | object User32 { 26 | //rewrote methods to get rid of WinNT.HWND and other wrapper classes, 27 | //they create shared memory instances in the stack, causing terrible 28 | //garbage collection cycles! 29 | init { 30 | Native.register("user32") 31 | } 32 | 33 | interface WndEnumProc : StdCallLibrary.StdCallCallback { 34 | fun callback(hwnd: Long): Boolean 35 | } 36 | 37 | external fun SetWindowCompositionAttribute(hwnd: Long, data: WindowCompositionAttributeData): Long 38 | external fun SetWindowDisplayAffinity(hwnd: Long, dwAffinity: Long): Boolean 39 | external fun SetActiveWindow(hwnd: Long): Long 40 | external fun FindWindowA(s: String?, s1: String?): Long 41 | external fun GetWindowLongA(hwnd: Long, i: Int): Int 42 | external fun SetWindowLongA(hwnd: Long, i: Int, i1: Int): Int 43 | external fun SetWindowPos(hwnd: Long, hwnd1: Long, i: Int, i1: Int, i2: Int, i3: Int, i4: Int): Boolean 44 | external fun SetForegroundWindow(hwnd: Long): Boolean 45 | external fun SetFocus(hwnd: Long): Long 46 | external fun IsWindowVisible(hwnd: Long): Boolean 47 | external fun ShowWindow(hwnd: Long, i: Int): Boolean 48 | external fun GetClientRect(hwnd: Long, rect: Rect): Boolean 49 | external fun GetWindowRect(hwnd: Long, rect: Rect): Boolean 50 | external fun GetWindowThreadProcessId(hwnd: Long, intByReference: IntByReference?): Int 51 | external fun AttachThreadInput(dword: Long, dword1: Long, b: Boolean): Boolean 52 | external fun EnumWindows(enumProc: WndEnumProc): Boolean 53 | } 54 | -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/jna/enums/AccentStates.kt: -------------------------------------------------------------------------------- 1 | ////Courtesy of Mr Noad 2 | 3 | package rat.poison.jna.enums 4 | 5 | import rat.poison.utils.extensions.EnumLookUpWithDefault 6 | 7 | enum class AccentStates { 8 | ACCENT_DISABLED, 9 | ACCENT_ENABLE_GRADIENT, 10 | ACCENT_ENABLE_TRANSPARENTGRADIENT, 11 | ACCENT_ENABLE_BLURBEHIND, 12 | ACCENT_ENABLE_ACRYLIC, 13 | ACCENT_INVALID_STATE; 14 | 15 | companion object : 16 | EnumLookUpWithDefault( 17 | values().associateBy( 18 | AccentStates::ordinal 19 | ), ACCENT_INVALID_STATE 20 | ) 21 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/jna/enums/WindowCompositionAttributes.kt: -------------------------------------------------------------------------------- 1 | ////Courtesy of Mr Noad 2 | 3 | package rat.poison.jna.enums 4 | 5 | import rat.poison.utils.extensions.EnumLookUpWithDefault 6 | 7 | enum class WindowCompositionAttributes(val id: Int) { 8 | WCA_UNKNOWN(0), 9 | WCA_ACCENT_POLICY(19); 10 | 11 | companion object : 12 | EnumLookUpWithDefault( 13 | values().associateBy( 14 | WindowCompositionAttributes::id 15 | ), WCA_UNKNOWN 16 | ) 17 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/jna/structures/AccentPolicy.kt: -------------------------------------------------------------------------------- 1 | ////Courtesy of Mr Noad 2 | 3 | package rat.poison.jna.structures 4 | 5 | import com.sun.jna.Structure 6 | import org.jire.arrowhead.Struct 7 | import rat.poison.jna.enums.AccentStates 8 | 9 | class AccentPolicy : Struct(), Structure.ByReference { 10 | @JvmField 11 | internal var AccentState: Int = 0 12 | 13 | var accentState: AccentStates 14 | get() { 15 | return AccentStates[AccentState] 16 | } 17 | set(value) { 18 | AccentState = value.ordinal 19 | } 20 | 21 | @JvmField 22 | var AccentFlags: Int = 0 23 | @JvmField 24 | var GradientColor: Int = 0 25 | @JvmField 26 | var AnimationId: Int = 0 27 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/jna/structures/Rect.kt: -------------------------------------------------------------------------------- 1 | ////Courtesy of Mr Noad 2 | 3 | package rat.poison.jna.structures 4 | 5 | import com.sun.jna.Structure 6 | import rat.poison.utils.DisposableMemory 7 | 8 | class Rect : DisposableMemory(16), Structure.ByReference { 9 | /** The left. */ 10 | var left: Int 11 | get() { 12 | return this.getInt(0) 13 | } 14 | set(value) { 15 | this.setInt(0, value) 16 | } 17 | 18 | /** The top. */ 19 | var top: Int 20 | get() { 21 | return this.getInt(4) 22 | } 23 | set(value) { 24 | this.setInt(4, value) 25 | } 26 | 27 | /** The right. */ 28 | var right: Int 29 | get() { 30 | return this.getInt(8) 31 | } 32 | set(value) { 33 | this.setInt(8, value) 34 | } 35 | 36 | /** The bottom. */ 37 | var bottom: Int 38 | get() { 39 | return this.getInt(12) 40 | } 41 | set(value) { 42 | this.setInt(12, value) 43 | } 44 | 45 | override fun toString(): String { 46 | return "[($left,$top)($right,$bottom)]" 47 | } 48 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/jna/structures/WindowCompositionAttributeData.kt: -------------------------------------------------------------------------------- 1 | ////Courtesy of Mr Noad 2 | 3 | package rat.poison.jna.structures 4 | 5 | import com.sun.jna.Pointer 6 | import com.sun.jna.Structure 7 | import org.jire.arrowhead.Struct 8 | import rat.poison.jna.enums.AccentStates 9 | import rat.poison.jna.enums.WindowCompositionAttributes 10 | 11 | class WindowCompositionAttributeData() : Struct(), Structure.ByReference { 12 | @JvmField 13 | internal var Attribute: Int = 0 14 | 15 | private var attribute: WindowCompositionAttributes 16 | get() { 17 | return WindowCompositionAttributes[Attribute] 18 | } 19 | set(value) { 20 | Attribute = value.id 21 | } 22 | 23 | @JvmField 24 | var Data: Pointer? = null 25 | @JvmField 26 | var SizeOfData: Int = 0 27 | 28 | constructor( 29 | Attribute: WindowCompositionAttributes = WindowCompositionAttributes.WCA_ACCENT_POLICY, 30 | AccentState: AccentStates = AccentStates.ACCENT_DISABLED, 31 | AccentFlags: Int = 0, 32 | GradientColor: Int = 0, 33 | AnimationId: Int = 0 34 | ) : this() { 35 | val accent = AccentPolicy() 36 | accent.accentState = AccentState 37 | accent.AccentFlags = AccentFlags // must be 2 for transparency 38 | accent.GradientColor = GradientColor // ARGB color code for gradient 39 | accent.AnimationId = AnimationId 40 | val accentStructSize = accent.size() 41 | accent.write() 42 | val accentPtr = accent.pointer 43 | this.attribute = Attribute 44 | this.SizeOfData = accentStructSize 45 | this.Data = accentPtr 46 | } 47 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/AutomaticWeapons.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts 2 | 3 | import com.badlogic.gdx.math.MathUtils.clamp 4 | import rat.poison.curSettings 5 | import rat.poison.game.hooks.cursorEnable 6 | import rat.poison.game.hooks.updateCursorEnable 7 | import rat.poison.scripts.aim.meCurWep 8 | import rat.poison.scripts.aim.meDead 9 | import rat.poison.settings.MENUTOG 10 | 11 | var punchCheck = 0 12 | 13 | fun automaticWeapons(): Boolean { 14 | if (!MENUTOG) { 15 | updateCursorEnable() 16 | if (!cursorEnable && !meDead) { 17 | if (!meCurWep.automatic && !meCurWep.grenade && !meCurWep.bomb) { 18 | val autoWepDelay = clamp(curSettings["AUTO_WEP_DELAY"].toInt(), 1, 5000) 19 | 20 | if (punchCheck >= autoWepDelay) { 21 | punchCheck = 0 22 | return true 23 | } else { 24 | punchCheck += 15 25 | } 26 | } 27 | } 28 | } 29 | 30 | return false 31 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/BunnyHop.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts 2 | 3 | import org.jire.arrowhead.keyPressed 4 | import rat.poison.curSettings 5 | import rat.poison.game.CSGO 6 | import rat.poison.game.entity.onGround 7 | import rat.poison.game.hooks.cursorEnable 8 | import rat.poison.game.hooks.updateCursorEnable 9 | import rat.poison.game.me 10 | import rat.poison.game.offsets.ClientOffsets.dwForceJump 11 | import rat.poison.scripts.aim.meDead 12 | import rat.poison.utils.every 13 | import rat.poison.utils.generalUtil.strToBool 14 | import rat.poison.utils.randInt 15 | 16 | fun bunnyHop() = every(4, inGameCheck = true) { 17 | if (curSettings["ENABLE_BUNNY_HOP"].strToBool() && keyPressed(curSettings["ENABLE_BUNNY_HOP_KEY"].toInt()) && (me > 0 && !meDead && me.onGround()) && (randInt(0, 100) <= curSettings["BHOP_HITCHANCE"].toInt())) { 18 | updateCursorEnable() 19 | if (cursorEnable) return@every 20 | CSGO.clientDLL[dwForceJump] = 6 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/DoorSpam.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts 2 | 3 | import org.jire.arrowhead.keyPressed 4 | import rat.poison.curSettings 5 | import rat.poison.game.CSGO 6 | import rat.poison.game.hooks.cursorEnable 7 | import rat.poison.game.hooks.updateCursorEnable 8 | import rat.poison.game.offsets.ClientOffsets.dwUse 9 | import rat.poison.scripts.aim.meDead 10 | import rat.poison.utils.every 11 | import rat.poison.utils.generalUtil.strToBool 12 | 13 | fun doorSpam() = every(20, inGameCheck = true) { 14 | if (!curSettings["D_SPAM"].strToBool() || meDead) return@every 15 | 16 | updateCursorEnable() 17 | if (cursorEnable) return@every 18 | 19 | if (keyPressed(curSettings["D_SPAM_KEY"].toInt())) { 20 | Thread(Runnable { 21 | CSGO.clientDLL[dwUse] = 5 22 | Thread.sleep(20) 23 | CSGO.clientDLL[dwUse] = 4 24 | Thread.sleep(20) 25 | }).start() 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/DrawBacktrack.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts 2 | 3 | import com.badlogic.gdx.graphics.Color 4 | import org.jire.arrowhead.keyPressed 5 | import rat.poison.curSettings 6 | import rat.poison.game.worldToScreen 7 | import rat.poison.overlay.App 8 | import rat.poison.scripts.aim.meCurWep 9 | import rat.poison.scripts.aim.meDead 10 | import rat.poison.settings.MENUTOG 11 | import rat.poison.utils.Vector 12 | import rat.poison.utils.generalUtil.strToBool 13 | import rat.poison.utils.inGame 14 | 15 | fun drawBacktrack() = App { 16 | if (MENUTOG) return@App 17 | if (meDead) return@App 18 | if (!inGame || !curSettings["BACKTRACK_VISUALIZE"].strToBool() || !curSettings["ENABLE_ESP"].strToBool() || !curSettings["ENABLE_BACKTRACK"].strToBool()) return@App 19 | 20 | val backtrackOnKey = curSettings["ENABLE_BACKTRACK_ON_KEY"].strToBool() 21 | val backtrackKeyPressed = keyPressed(curSettings["BACKTRACK_KEY"].toInt()) 22 | 23 | if (backtrackOnKey && !backtrackKeyPressed) return@App 24 | 25 | if (!meCurWep.gun) return@App 26 | 27 | for (i in 0 until 63) { 28 | if (btRecords[i][0].simtime == 0F) continue 29 | 30 | val minMaxIDX = getRangeRecords(i) 31 | 32 | if (minMaxIDX[0] == Int.MAX_VALUE || minMaxIDX[1] == -1) continue 33 | 34 | val minRecord = btRecords[i][minMaxIDX[0]] 35 | val maxRecord = btRecords[i][minMaxIDX[1]] 36 | 37 | val minHeadPos = Vector() 38 | val maxHeadPos = Vector() 39 | val minAbsPos = Vector() 40 | val maxAbsPos = Vector() 41 | 42 | if (worldToScreen(minRecord.headPos, minHeadPos) && worldToScreen(minRecord.absPos, minAbsPos) && worldToScreen(maxRecord.headPos, maxHeadPos) && worldToScreen(maxRecord.absPos, maxAbsPos)) { 43 | val w = (minAbsPos.y - minHeadPos.y) / 4F 44 | val minMidX = (minAbsPos.x + minHeadPos.x) / 2F 45 | val maxMidX = (maxAbsPos.x + maxAbsPos.x) / 2F 46 | 47 | var sign = -1 48 | 49 | if (minMidX > maxMidX) { 50 | sign = 1 51 | } 52 | 53 | val topLeft = Vector(minHeadPos.x - (w / 3F) * sign, minHeadPos.y, minHeadPos.z) 54 | val topRight = Vector(maxHeadPos.x + (w / 3F) * sign, maxHeadPos.y, maxHeadPos.z) 55 | 56 | val bottomLeft = Vector(minMidX - (w / 2F) * sign, minAbsPos.y+8F, minAbsPos.z) 57 | val bottomRight = Vector(maxMidX + (w / 2F) * sign, maxAbsPos.y+8F, maxAbsPos.z) 58 | 59 | shapeRenderer.apply { 60 | if (shapeRenderer.isDrawing) { 61 | end() 62 | } 63 | 64 | begin() 65 | 66 | color = Color(1F, 1F, 1F, 1F) 67 | 68 | line(topLeft.x, topLeft.y, topRight.x, topRight.y) 69 | line(topRight.x, topRight.y, bottomRight.x, bottomRight.y) 70 | line(bottomRight.x, bottomRight.y, bottomLeft.x, bottomLeft.y) 71 | line(bottomLeft.x, bottomLeft.y, topLeft.x, topLeft.y) 72 | 73 | color = Color.WHITE 74 | 75 | end() 76 | } 77 | } 78 | 79 | for (j in btRecords[i]) { 80 | j.alpha -= .5F 81 | } 82 | } 83 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/DrawFov.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts 2 | 3 | import com.badlogic.gdx.graphics.Color 4 | import com.badlogic.gdx.math.MathUtils.clamp 5 | import rat.poison.curSettings 6 | import rat.poison.game.CSGO 7 | import rat.poison.game.CSGO.csgoEXE 8 | import rat.poison.game.me 9 | import rat.poison.game.netvars.NetVarOffsets.m_iDefaultFov 10 | import rat.poison.game.netvars.NetVarOffsets.m_iFOV 11 | import rat.poison.overlay.App 12 | import rat.poison.scripts.aim.meCurWep 13 | import rat.poison.scripts.aim.meDead 14 | import rat.poison.settings.MENUTOG 15 | import rat.poison.utils.generalUtil.strToBool 16 | import rat.poison.utils.generalUtil.strToColor 17 | import rat.poison.utils.inGame 18 | import java.lang.Math.toDegrees 19 | import java.lang.Math.toRadians 20 | 21 | fun drawFov() = App { 22 | if (!curSettings["ENABLE_ESP"].strToBool() || MENUTOG || !inGame || meDead) 23 | return@App 24 | 25 | if (!curSettings["DRAW_AIM_FOV"].strToBool() && !curSettings["DRAW_TRIGGER_FOV"].strToBool()) 26 | return@App 27 | 28 | if (curSettings["FOV_TYPE"].replace("\"", "") != "STATIC") 29 | return@App 30 | 31 | val defaultFov = csgoEXE.int(me + m_iDefaultFov) 32 | val iFov = csgoEXE.int(me + m_iFOV) 33 | val viewFov: Int 34 | 35 | viewFov = if (iFov == 0) { 36 | defaultFov 37 | } else { 38 | iFov 39 | } 40 | 41 | val bFOV: Float 42 | var bINFOV = false 43 | 44 | var triggerRadius = -1F 45 | 46 | if (meCurWep.gun) { //Not 100% this applies to every 'gun' 47 | bFOV = curSettings["TRIGGER_FOV"].toFloat() 48 | bINFOV = curSettings["TRIGGER_USE_FOV"].strToBool() 49 | triggerRadius = calcFovRadius(viewFov, bFOV) 50 | } 51 | 52 | val aimRadius = calcFovRadius(viewFov, curSettings["AIM_FOV"].toFloat()) 53 | 54 | val rccXo = curSettings["RCROSSHAIR_XOFFSET"].toFloat() 55 | val rccYo = curSettings["RCROSSHAIR_YOFFSET"].toFloat() 56 | val x = CSGO.gameWidth / 2 + rccXo 57 | val y = CSGO.gameHeight / 2 + rccYo 58 | 59 | shapeRenderer.apply { 60 | if (shapeRenderer.isDrawing) { 61 | end() 62 | } 63 | 64 | begin() 65 | 66 | if (curSettings["DRAW_AIM_FOV"].strToBool()) { 67 | val col = curSettings["DRAW_AIM_FOV_COLOR"].strToColor() 68 | setColor(col.red / 255F, col.green / 255F, col.blue / 255F, 1F) 69 | circle(x, y, clamp(aimRadius, 10F, 1000F)) 70 | } 71 | 72 | if (curSettings["ENABLE_TRIGGER"].strToBool() && curSettings["DRAW_TRIGGER_FOV"].strToBool() && triggerRadius != -1F && bINFOV) { 73 | val col = curSettings["DRAW_TRIGGER_FOV_COLOR"].strToColor() 74 | setColor(col.red / 255F, col.green / 255F, col.blue / 255F, 1F) 75 | circle(x, y, clamp(triggerRadius, 10F, 1000F)) 76 | } 77 | 78 | color = Color(1F, 1F, 1F, 1F) 79 | end() 80 | } 81 | } 82 | 83 | fun calcFovRadius(viewFov: Int, aimFov: Float): Float { 84 | var calcFov = 2.0 * toDegrees(kotlin.math.atan((CSGO.gameWidth.toDouble()/CSGO.gameHeight.toDouble()) * 0.75 * kotlin.math.tan(toRadians(viewFov/2.0)))) 85 | calcFov = kotlin.math.tan(toRadians(aimFov/2.0)) / kotlin.math.tan(toRadians(calcFov/2.0)) * (CSGO.gameWidth.toDouble()) 86 | 87 | return calcFov.toFloat() 88 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/FastStop.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts 2 | 3 | import org.jire.arrowhead.keyPressed 4 | import rat.poison.curSettings 5 | import rat.poison.game.CSGO.clientDLL 6 | import rat.poison.game.angle 7 | import rat.poison.game.clientState 8 | import rat.poison.game.entity.onGround 9 | import rat.poison.game.entity.velocity 10 | import rat.poison.game.hooks.cursorEnable 11 | import rat.poison.game.hooks.updateCursorEnable 12 | import rat.poison.game.me 13 | import rat.poison.game.offsets.ClientOffsets.dwForceBackward 14 | import rat.poison.game.offsets.ClientOffsets.dwForceForward 15 | import rat.poison.game.offsets.ClientOffsets.dwForceLeft 16 | import rat.poison.game.offsets.ClientOffsets.dwForceRight 17 | import rat.poison.scripts.aim.meDead 18 | import rat.poison.utils.every 19 | import rat.poison.utils.generalUtil.strToBool 20 | import java.awt.event.KeyEvent.* 21 | import kotlin.math.cos 22 | import kotlin.math.sin 23 | 24 | internal fun fastStop() = every(4, inGameCheck = true) { 25 | if (!curSettings["FAST_STOP"].strToBool() || meDead) return@every 26 | 27 | updateCursorEnable() 28 | if (cursorEnable) return@every 29 | 30 | val vel = me.velocity() 31 | val yaw = clientState.angle().y 32 | 33 | //Velocity relative to player direction 34 | val x = (vel.x * cos(yaw / 180 * Math.PI) + vel.y * sin(yaw / 180 * Math.PI)) 35 | val y = (vel.y * cos(yaw / 180 * Math.PI) - vel.x * sin(yaw / 180 * Math.PI)) 36 | 37 | if (!keyPressed(VK_SPACE) && me.onGround()) { 38 | if (x != 0.0 && y != 0.0) { 39 | if (!keyPressed(VK_W) && !keyPressed(VK_S)) { 40 | if (x > 30) { 41 | clientDLL[dwForceBackward] = 6 42 | //robot.keyRelease(VK_S) 43 | } else if (x < -30) { 44 | clientDLL[dwForceForward] = 6 45 | //robot.keyRelease(VK_W) 46 | } 47 | } 48 | 49 | if (!keyPressed(VK_A) && !keyPressed(VK_D)) { 50 | if (y > 30) { 51 | clientDLL[dwForceRight] = 6 52 | //robot.keyRelease(VK_D) 53 | } else if (y < -30) { 54 | clientDLL[dwForceLeft] = 6 55 | //robot.keyRelease(VK_A) 56 | } 57 | } 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/FovChanger.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts 2 | 3 | import rat.poison.curSettings 4 | import rat.poison.game.CSGO.csgoEXE 5 | import rat.poison.game.entity.isScoped 6 | import rat.poison.game.me 7 | import rat.poison.game.netvars.NetVarOffsets.m_iDefaultFov 8 | import rat.poison.game.netvars.NetVarOffsets.m_zoomLevel 9 | import rat.poison.overlay.App 10 | import rat.poison.scripts.aim.meCurWep 11 | import rat.poison.scripts.aim.meCurWepEnt 12 | import rat.poison.utils.generalUtil.strToBool 13 | import rat.poison.utils.inGame 14 | 15 | internal fun fovChanger() = App { 16 | if (!inGame) return@App 17 | 18 | val curFov = csgoEXE.int(me + m_iDefaultFov) 19 | 20 | if (!curSettings["ENABLE_FOV_CHANGER"].strToBool()) { 21 | if (curFov != 90) { 22 | csgoEXE[me + m_iDefaultFov] = 90 23 | } 24 | 25 | return@App 26 | } 27 | val zLevel = csgoEXE.int(meCurWepEnt + m_zoomLevel) 28 | 29 | val targetFov: Int 30 | 31 | var instantSwap = false 32 | 33 | if (meCurWep.sniper) { 34 | if (me.isScoped()) { 35 | targetFov = when (zLevel) { 36 | 1 -> { 37 | instantSwap = true 38 | curSettings["FOV_ZOOM_1"].toInt() 39 | } 40 | 41 | 2 -> { 42 | instantSwap = true 43 | curSettings["FOV_ZOOM_2"].toInt() 44 | } 45 | 46 | else -> { 47 | instantSwap = true 48 | curSettings["FOV_SNIPER_DEFAULT"].toInt() 49 | } 50 | } 51 | } else { 52 | targetFov = curSettings["FOV_SNIPER_DEFAULT"].toInt() 53 | 54 | if (targetFov > curFov) { 55 | instantSwap = true 56 | } 57 | } 58 | } else { 59 | targetFov = curSettings["FOV_DEFAULT"].toInt() 60 | } 61 | 62 | if (targetFov != -1) { 63 | if (instantSwap) { 64 | csgoEXE[me + m_iDefaultFov] = targetFov 65 | return@App 66 | } 67 | 68 | if (curSettings["FOV_SMOOTH"].strToBool()) { 69 | 70 | if (curFov < targetFov) { 71 | csgoEXE[me + m_iDefaultFov] = curFov + 1 72 | } else if (curFov > targetFov) { 73 | csgoEXE[me + m_iDefaultFov] = curFov - 1 74 | } 75 | } else { 76 | if (curFov != targetFov) { 77 | csgoEXE[me + m_iDefaultFov] = targetFov 78 | } 79 | } 80 | } 81 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/KillBind.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts 2 | 3 | import rat.poison.curSettings 4 | import rat.poison.game.entity.kills 5 | import rat.poison.game.me 6 | import rat.poison.robot 7 | import rat.poison.scripts.aim.meDead 8 | import rat.poison.utils.every 9 | import rat.poison.utils.generalUtil.strToBool 10 | 11 | private var totalKills = me.kills() 12 | 13 | fun killBind() = every(600, inGameCheck = true) { 14 | if (!curSettings["KILL_BIND"].strToBool() || me <= 0 || meDead) return@every 15 | 16 | val curKills = me.kills() 17 | if (curKills != totalKills) { 18 | totalKills = curKills 19 | robot.keyPress(curSettings["KILL_BIND_KEY"].toInt()) 20 | robot.keyRelease(curSettings["KILL_BIND_KEY"].toInt()) 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/NadeThrower.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts 2 | 3 | import org.jire.arrowhead.keyPressed 4 | import rat.poison.curSettings 5 | import rat.poison.game.entity.absPosition 6 | import rat.poison.game.entity.eyeAngle 7 | import rat.poison.game.me 8 | import rat.poison.game.realCalcAngle 9 | import rat.poison.scripts.aim.meCurWep 10 | import rat.poison.scripts.aim.meDead 11 | import rat.poison.settings.MENUTOG 12 | import rat.poison.utils.* 13 | import rat.poison.utils.generalUtil.cToDouble 14 | import rat.poison.utils.generalUtil.cToFloat 15 | import rat.poison.utils.generalUtil.strToBool 16 | 17 | private var mPos = Vector() 18 | private var calcRes = 0F 19 | private var eyeAng = Angle(0F, 0F, 0F) 20 | 21 | private var closestAngle = Angle(90F, 90F, 90F) 22 | private var closestDistance = 100F 23 | private var clfSpot = listOf() 24 | 25 | fun autoThrowNade(fSpot: List, recoveredAngle: Angle) { 26 | eyeAng = me.eyeAngle() 27 | calcRes = eyeAng.distanceTo(recoveredAngle) 28 | writeAim(eyeAng, recoveredAngle, curSettings["NADE_THROWER_SMOOTHNESS"].cToFloat()) 29 | if (calcRes < 0.1) { 30 | when (fSpot[5]) { 31 | "J+T" -> jumpAndThrow() 32 | "S+T" -> standAndThrow() 33 | } 34 | closestAngle = Angle(90F, 90F, 90F) 35 | closestDistance = 100F 36 | Thread.sleep(20) 37 | } 38 | } 39 | 40 | fun nadeThrower() = every(10, inGameCheck = true) { 41 | if (!curSettings["ENABLE_NADE_THROWER"].strToBool() || !curSettings["ENABLE_ESP"].strToBool() || me <= 0L || MENUTOG || meDead) return@every 42 | mPos = me.absPosition() 43 | 44 | val nadeToCheck : String = when (meCurWep.name) { 45 | "FLASH_GRENADE" -> "Flash" 46 | "SMOKE_GRENADE" -> "Smoke" 47 | "MOLOTOV" -> "Molly" 48 | "INCENDIARY_GRENADE" -> "Molly" 49 | "EXPLOSIVE_GRENADE" -> "Frag" 50 | "DECOY_GRENADE" -> "Decoy" 51 | else -> "" 52 | } 53 | if (nadeToCheck != "") { 54 | nadeHelperArrayList.forEach { 55 | val fSpot = it[0] 56 | val hLPos = it[2] 57 | if (fSpot[4] == nadeToCheck || nadeToCheck == "Decoy") { 58 | if ((mPos.x in fSpot[0].cToDouble() - 20..fSpot[0].cToDouble() + 20) && (mPos.y in fSpot[1].cToDouble() - 20..fSpot[1].cToDouble() + 20)) { 59 | if (keyPressed(curSettings["NADE_THROWER_KEY"].toInt())) { 60 | val hLVec = Vector(hLPos[0].cToFloat(), hLPos[1].cToFloat(), hLPos[2].cToFloat()) 61 | val recoveredAngle = realCalcAngle(me, hLVec) 62 | val dist = me.eyeAngle().distanceTo(recoveredAngle) 63 | if (dist < closestDistance) { 64 | closestDistance = dist 65 | closestAngle = recoveredAngle 66 | clfSpot = fSpot 67 | } 68 | } 69 | else { 70 | closestAngle = Angle(90F, 90F, 90F) 71 | closestDistance = 100F 72 | } 73 | } 74 | } 75 | } 76 | if (closestAngle != Angle(90F, 90F, 90F)) { 77 | autoThrowNade(clfSpot, closestAngle) 78 | } 79 | } 80 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/NameChanger.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts 2 | 3 | import com.sun.jna.Memory 4 | import rat.poison.game.CSGO.csgoEXE 5 | import rat.poison.game.clientState 6 | import rat.poison.utils.every 7 | import rat.poison.utils.extensions.uint 8 | 9 | var nameChange = "" 10 | 11 | //TODO link uc post 12 | fun nameChanger() = every(10, true, inGameCheck = true) { 13 | if (nameChange == "") return@every 14 | 15 | val len = nameChange.length 16 | 17 | val a = byteArrayOf(0x6, (0x8 + len).toByte(), 0xA, (0x6 + len).toByte(), 0xA, (0x4 + len).toByte(), 0x12, len.toByte()) 18 | val b = nameChange.toByteArray(Charsets.US_ASCII) 19 | val c = byteArrayOf(0x18, 0x6) 20 | 21 | val final = a + b + c 22 | 23 | val netChan = csgoEXE.uint(clientState + 0x9C) 24 | val voiceStream = csgoEXE.uint(netChan + 0x78) 25 | 26 | val curBit = final.size * 8 27 | 28 | val mem = Memory(final.size.toLong()) 29 | mem.write(0, final, 0, final.size) 30 | 31 | csgoEXE.write(voiceStream, mem) 32 | 33 | csgoEXE[netChan + 0x84] = curBit.toByte() 34 | } 35 | 36 | fun changeName(name: String) { 37 | nameChange = name 38 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/RCS.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts 2 | 3 | import com.badlogic.gdx.math.Vector2 4 | import com.badlogic.gdx.math.Vector3 5 | import rat.poison.curSettings 6 | import rat.poison.game.angle 7 | import rat.poison.game.clientState 8 | import rat.poison.game.entity.punch 9 | import rat.poison.game.entity.shotsFired 10 | import rat.poison.game.me 11 | import rat.poison.game.setAngle 12 | import rat.poison.scripts.aim.meCurWep 13 | import rat.poison.scripts.aim.meDead 14 | import rat.poison.utils.every 15 | import rat.poison.utils.generalUtil.strToBool 16 | import rat.poison.utils.normalize 17 | 18 | private val lastAppliedRCS = Vector2() 19 | 20 | fun rcs() = every(4, inGameCheck = true) { 21 | if (me <= 0 || !curSettings["ENABLE_RCS"].strToBool() || meDead) return@every 22 | 23 | val weapon = meCurWep 24 | if (!weapon.automatic) { lastAppliedRCS.set(0F, 0F); return@every } 25 | val shotsFired = me.shotsFired() 26 | val p = me.punch() 27 | 28 | val forceSet = (shotsFired == 0 && !lastAppliedRCS.isZero) 29 | 30 | if (forceSet || /*!finishPunch ||*/ shotsFired > 1) { 31 | if (curSettings["RCS_TYPE"] == "STABLE") { 32 | if (lastAppliedRCS.isZero) { 33 | lastAppliedRCS.set(p.x * 2, p.y * 2) 34 | } 35 | 36 | val realPunch = Vector2(p.x * 2, p.y * 2) 37 | 38 | val punchToApply = Vector2(realPunch.x - lastAppliedRCS.x, realPunch.y - lastAppliedRCS.y) 39 | punchToApply.scl(curSettings["RCS_SMOOTHING_Y"].toFloat(), curSettings["RCS_SMOOTHING_X"].toFloat()) 40 | 41 | val angle = clientState.angle() 42 | angle.apply { 43 | x -= punchToApply.x 44 | y -= punchToApply.y 45 | normalize() 46 | } 47 | 48 | clientState.setAngle(angle) 49 | 50 | lastAppliedRCS.x += punchToApply.x 51 | lastAppliedRCS.y += punchToApply.y 52 | 53 | if (!curSettings["RCS_RETURNAIM"].strToBool() && forceSet) { 54 | lastAppliedRCS.set(0F, 0F) 55 | } 56 | } else { 57 | if (lastAppliedRCS.isZero) { 58 | lastAppliedRCS.set(p.x, p.y) 59 | } 60 | 61 | val playerPunch = Vector3(p.x, p.y, p.z) //Set playerPunch to current punch 62 | 63 | val punchToApply = Vector2((playerPunch.x - lastAppliedRCS.x), (playerPunch.y - lastAppliedRCS.y)) //Set to our current punch and what our last punch was 64 | punchToApply.scl(1F + curSettings["RCS_SMOOTHING_Y"].toFloat(), 1F + curSettings["RCS_SMOOTHING_X"].toFloat()) 65 | 66 | val angle = clientState.angle() 67 | angle.apply { 68 | x -= punchToApply.x 69 | y -= punchToApply.y 70 | normalize() 71 | } 72 | 73 | clientState.setAngle(angle) 74 | lastAppliedRCS.x = playerPunch.x 75 | lastAppliedRCS.y = playerPunch.y 76 | 77 | if (!curSettings["RCS_RETURNAIM"].strToBool() && forceSet) { 78 | lastAppliedRCS.set(0F, 0F) 79 | } 80 | } 81 | } 82 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/Ranks.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts 2 | 3 | import org.apache.commons.lang3.StringUtils 4 | import rat.poison.game.entity.* 5 | import rat.poison.game.forEntities 6 | import rat.poison.game.rankName 7 | import rat.poison.overlay.App.haveTarget 8 | import rat.poison.overlay.opened 9 | import rat.poison.ui.uiPanels.ranksTab 10 | import rat.poison.ui.uiRefreshing 11 | import rat.poison.utils.every 12 | import rat.poison.utils.extensions.roundNDecimals 13 | 14 | var teamList = mutableListOf() 15 | var nameList = mutableListOf() 16 | var steamIDList = mutableListOf() 17 | var rankList = mutableListOf() 18 | var killsList = mutableListOf() 19 | var deathsList = mutableListOf() 20 | var KDList = mutableListOf() 21 | var winsList = mutableListOf() 22 | var moneyList = mutableListOf() 23 | 24 | fun ranks() = every(5000, true, inGameCheck = true) { //Rebuild every second 25 | if (!opened || !haveTarget) return@every 26 | 27 | //Bruh -- fix later 28 | teamList.clear() 29 | nameList.clear() 30 | rankList.clear() 31 | killsList.clear() 32 | deathsList.clear() 33 | KDList.clear() 34 | winsList.clear() 35 | moneyList.clear() 36 | 37 | forEntities(EntityType.CCSPlayer) { 38 | val entity = it.entity 39 | 40 | if (entity.hltv()) return@forEntities 41 | 42 | val entTeam = when (entity.team()) { 43 | 3L -> "CT" 44 | 2L -> "T" 45 | else -> "N/A" 46 | } 47 | 48 | val entName = entity.name() 49 | val entRank = entity.rank().rankName() 50 | val entKills = entity.kills().toString() 51 | val entDeaths = entity.deaths().toString() 52 | val entMoney = entity.money() 53 | val entKD = when (entDeaths) { 54 | "0" -> "N/A" 55 | else -> (entKills.toFloat() / entDeaths.toFloat()).roundNDecimals(2).toString() 56 | } 57 | val entWins = entity.wins().toString() 58 | 59 | when (entTeam) { //Bruh 60 | "CT" -> { 61 | teamList.add("CT") 62 | } 63 | 64 | "T" -> { 65 | teamList.add("T") 66 | } 67 | } 68 | 69 | var steamID = 0 70 | 71 | try { 72 | val entSteam = entity.steamID() 73 | if (entSteam != "BOT" && entSteam.isNotEmpty() && StringUtils.isNumeric(entSteam.split(":")[2])) { 74 | steamID = (entSteam.split(":")[2].toInt() * 2) + entSteam.split(":")[1].toInt() 75 | } 76 | } catch (e: Exception) { } 77 | 78 | nameList.add(entName) 79 | steamIDList.add(steamID.toString()) 80 | rankList.add(entRank) 81 | killsList.add(entKills) 82 | deathsList.add(entDeaths) 83 | KDList.add(entKD) 84 | winsList.add(entWins) 85 | moneyList.add(entMoney.toString()) 86 | } 87 | 88 | if (!uiRefreshing) { 89 | ranksTab.updateRanks() 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/ReducedFlash.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts 2 | 3 | import rat.poison.curSettings 4 | import rat.poison.game.CSGO.csgoEXE 5 | import rat.poison.game.hooks.onFlash 6 | import rat.poison.game.me 7 | import rat.poison.game.netvars.NetVarOffsets.flFlashMaxAlpha 8 | import rat.poison.utils.generalUtil.strToBool 9 | 10 | fun reducedFlash() = onFlash { 11 | if (!curSettings["ENABLE_REDUCED_FLASH"].strToBool()) return@onFlash 12 | 13 | csgoEXE[me + flFlashMaxAlpha] = curSettings["FLASH_MAX_ALPHA"].toFloat() 14 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/SelfNade.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts 2 | 3 | import kotlinx.coroutines.Runnable 4 | import rat.poison.curSettings 5 | import rat.poison.game.angle 6 | import rat.poison.game.clientState 7 | import rat.poison.robot 8 | import rat.poison.settings.MENUTOG 9 | import rat.poison.utils.Angle 10 | import rat.poison.utils.normalize 11 | import rat.poison.utils.pathAim 12 | import java.awt.event.KeyEvent 13 | import java.awt.event.MouseEvent 14 | 15 | fun selfNade() { 16 | Thread(Runnable { 17 | if (MENUTOG) { 18 | robot.keyPress(curSettings["MENU_KEY"].toInt()) 19 | } 20 | Thread.sleep(50) 21 | 22 | val curAng = clientState.angle() 23 | val destAng = Angle() //= curAng doesnt work?? 24 | destAng.set(-89F, curAng.y, curAng.z) 25 | destAng.normalize() 26 | 27 | pathAim(curAng, destAng, 10, false, checkOnScreen = false) 28 | Thread.sleep(50) 29 | robot.keyPress(KeyEvent.VK_CONTROL) 30 | Thread.sleep(50) 31 | robot.mousePress(MouseEvent.BUTTON3_DOWN_MASK) 32 | Thread.sleep(50) 33 | robot.mouseRelease(MouseEvent.BUTTON3_DOWN_MASK) 34 | Thread.sleep(2000) 35 | robot.keyRelease(KeyEvent.VK_CONTROL) 36 | }).start() 37 | } 38 | -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/SpectatorList.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts 2 | 3 | import rat.poison.curSettings 4 | import rat.poison.game.CSGO.csgoEXE 5 | import rat.poison.game.entity.* 6 | import rat.poison.game.forEntities 7 | import rat.poison.game.me 8 | import rat.poison.game.netvars.NetVarOffsets.m_hObserverTarget 9 | import rat.poison.game.offsets.ClientOffsets.dwIndex 10 | import rat.poison.overlay.App.haveTarget 11 | import rat.poison.overlay.opened 12 | import rat.poison.ui.uiPanels.specListText 13 | import rat.poison.utils.every 14 | import rat.poison.utils.extensions.readIndex 15 | import rat.poison.utils.generalUtil.strToBool 16 | 17 | internal fun spectatorList() = every(100, inGameCheck = true) { 18 | if (!curSettings["SPECTATOR_LIST"].strToBool() || !curSettings["MENU"].strToBool()) { 19 | return@every 20 | } 21 | 22 | var spectators = "" 23 | var entCount = 1 24 | 25 | val playerSpecTarget = csgoEXE.readIndex(me + dwIndex) 26 | 27 | forEntities(EntityType.CCSPlayer) { 28 | val entity = it.entity 29 | 30 | if (entity.isSpectating() && !entity.hltv() && !entity.dormant()) { 31 | val entSpecTarget = csgoEXE.readIndex(entity + m_hObserverTarget) 32 | val entName = entity.name() 33 | 34 | if (entSpecTarget > -1 && entSpecTarget == playerSpecTarget) { 35 | if (!spectators.contains(entName)) { 36 | spectators += "$entCount. $entName\n" 37 | entCount++ 38 | } 39 | } 40 | } 41 | return@forEntities 42 | } 43 | 44 | if (opened && haveTarget) { 45 | specListText.setText(spectators) 46 | } 47 | } 48 | 49 | // Move to normal spot whenever 50 | fun Int.toIndex() = ((this and 0xFFF) - 1).run { 51 | if (this == 4094) -1 else this 52 | } 53 | -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/StrafeHelper.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts 2 | 3 | import org.jire.arrowhead.keyPressed 4 | import rat.poison.curSettings 5 | import rat.poison.game.angle 6 | import rat.poison.game.clientState 7 | import rat.poison.game.entity.onGround 8 | import rat.poison.game.hooks.cursorEnable 9 | import rat.poison.game.hooks.updateCursorEnable 10 | import rat.poison.game.me 11 | import rat.poison.robot 12 | import rat.poison.scripts.aim.meDead 13 | import rat.poison.settings.MENUTOG 14 | import rat.poison.utils.every 15 | import rat.poison.utils.generalUtil.strToBool 16 | import rat.poison.utils.inBackground 17 | import java.awt.event.KeyEvent 18 | import java.awt.event.KeyEvent.VK_SPACE 19 | 20 | private var lastAngY = 0.0F 21 | 22 | fun strafeHelper() = every(2, inGameCheck = true) { 23 | if (MENUTOG || inBackground || meDead) return@every 24 | 25 | if (!curSettings["AUTO_STRAFE"].strToBool()) return@every 26 | 27 | updateCursorEnable() 28 | if (cursorEnable) return@every 29 | val curAngY = clientState.angle().y 30 | val grounded = me.onGround() 31 | 32 | if ((curSettings["STRAFE_BHOP_ONLY"].strToBool() && keyPressed(VK_SPACE)) || (!curSettings["STRAFE_BHOP_ONLY"].strToBool())) { 33 | if (!grounded) { 34 | if (!keyPressed(KeyEvent.VK_A) && !keyPressed(KeyEvent.VK_D)) { 35 | if (curAngY > lastAngY) { 36 | robot.keyPress(KeyEvent.VK_A) 37 | robot.keyRelease(KeyEvent.VK_A) 38 | } else if (curAngY < lastAngY) { 39 | robot.keyPress(KeyEvent.VK_D) 40 | robot.keyRelease(KeyEvent.VK_D) 41 | } 42 | } 43 | } 44 | } 45 | 46 | lastAngY = curAngY 47 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/WeaponSpam.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts 2 | 3 | import org.jire.arrowhead.keyPressed 4 | import rat.poison.curSettings 5 | import rat.poison.game.hooks.cursorEnable 6 | import rat.poison.game.hooks.updateCursorEnable 7 | import rat.poison.robot 8 | import rat.poison.scripts.aim.meDead 9 | import rat.poison.utils.ObservableBoolean 10 | import rat.poison.utils.every 11 | import rat.poison.utils.generalUtil.strToBool 12 | import java.awt.event.MouseEvent 13 | 14 | private var toggled = false 15 | var weaponSpamToggleKey = ObservableBoolean({keyPressed(curSettings["W_SPAM_KEY"].toInt())}) 16 | 17 | fun weaponSpam() = every (20, inGameCheck = true) { 18 | if (!curSettings["W_SPAM"].strToBool()) return@every 19 | 20 | updateCursorEnable() 21 | if (cursorEnable || meDead) return@every 22 | 23 | weaponSpamToggleKey.update() 24 | if (weaponSpamToggleKey.justBecameTrue) { 25 | toggled = !toggled 26 | } 27 | 28 | if (toggled) { 29 | Thread(Runnable { 30 | robot.mousePress(MouseEvent.BUTTON3_DOWN_MASK) 31 | Thread.sleep(2) 32 | robot.mouseRelease(MouseEvent.BUTTON3_DOWN_MASK) 33 | Thread.sleep(2) 34 | }).start() 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/aim/FlatAim.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts.aim 2 | 3 | import rat.poison.curSettings 4 | import rat.poison.utils.generalUtil.strToBool 5 | import rat.poison.utils.writeAim 6 | 7 | fun flatAim() = aimScript(curSettings["AIM_DURATION"].toInt(), { curSettings["ENABLE_FLAT_AIM"].strToBool() }) { dest, current, aimSpeed, aimSpeedDivisor -> 8 | writeAim(current, dest, aimSpeed.toFloat(), divisor = aimSpeedDivisor) 9 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/aim/PathAim.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts.aim 2 | 3 | import rat.poison.curSettings 4 | import rat.poison.utils.generalUtil.strToBool 5 | import rat.poison.utils.pathAim 6 | 7 | fun pathAim() = aimScript(curSettings["AIM_DURATION"].toInt(), { curSettings["ENABLE_PATH_AIM"].strToBool() }) { dest, current, aimSpeed, aimSpeedDivisor -> 8 | pathAim(current, dest, aimSpeed, perfect = canPerfect, divisor = aimSpeedDivisor) 9 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/visuals/Adrenaline.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts.visuals 2 | 3 | import com.badlogic.gdx.math.MathUtils 4 | import rat.poison.curSettings 5 | import rat.poison.game.CSGO.csgoEXE 6 | import rat.poison.game.me 7 | import rat.poison.game.netvars.NetVarOffsets.m_flHealthShotBoostExpirationTime 8 | import rat.poison.game.netvars.NetVarOffsets.m_totalHitsOnServer 9 | import rat.poison.scripts.aim.meDead 10 | import rat.poison.scripts.bombState 11 | import rat.poison.scripts.currentGameTicks 12 | import rat.poison.utils.every 13 | import rat.poison.utils.generalUtil.strToBool 14 | 15 | private var totalHits = 0 16 | private var fl = 0F 17 | 18 | fun adrenaline() = every(10, inGameCheck = true) { 19 | if (!curSettings["ENABLE_ADRENALINE"].strToBool() || !curSettings["ENABLE_ESP"].strToBool() || meDead || me < 0) return@every 20 | 21 | val curHits = csgoEXE.int(me + m_totalHitsOnServer) 22 | if (curHits < 0 || curHits > 255) return@every 23 | 24 | if (curHits == 0) { 25 | totalHits = 0 26 | } else if (totalHits != curHits) { 27 | totalHits = curHits 28 | fl += curSettings["ADRENALINE_STRENGTH"].toFloat() 29 | } 30 | 31 | var bFL = 0F 32 | 33 | if (bombState.planted && curSettings["ADRENALINE_BOMB_TIME"].strToBool()) { 34 | val tLeft = bombState.timeLeftToExplode 35 | bFL += (40 - tLeft) / 80F 36 | } 37 | 38 | if (fl > 0F || bFL > 0F) { 39 | val cGT = currentGameTicks() 40 | fl = MathUtils.clamp(fl, 0F, 2.5F) 41 | csgoEXE[me + m_flHealthShotBoostExpirationTime] = cGT + fl + bFL 42 | fl -= curSettings["ADRENALINE_COOLDOWN"].toFloat() 43 | } else { 44 | fl = 0F 45 | } 46 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/visuals/DisableESP.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts.visuals 2 | 3 | import rat.poison.game.CSGO 4 | import rat.poison.game.Color 5 | import rat.poison.game.entity.EntityType 6 | import rat.poison.game.forEntities 7 | import rat.poison.game.me 8 | import rat.poison.game.netvars.NetVarOffsets 9 | import rat.poison.game.offsets.ClientOffsets 10 | import rat.poison.game.offsets.EngineOffsets 11 | import rat.poison.utils.extensions.uint 12 | import rat.poison.utils.inGame 13 | import java.lang.Float.floatToIntBits 14 | 15 | //Change to construct entities at call to prevent crashing? 16 | 17 | internal fun disableAllEsp() { 18 | if (!inGame) return 19 | 20 | val cWhite = Color(255, 255, 255, 1.0) 21 | 22 | val clientVModEnt = CSGO.csgoEXE.uint(CSGO.clientDLL.address + ClientOffsets.dwEntityList + (((CSGO.csgoEXE.uint(CSGO.csgoEXE.uint(CSGO.clientDLL.address + ClientOffsets.dwLocalPlayer) + NetVarOffsets.m_hViewModel)) and 0xFFF) - 1) * 16) 23 | CSGO.csgoEXE[clientVModEnt + 0x70] = 255.toByte() 24 | CSGO.csgoEXE[clientVModEnt + 0x71] = 255.toByte() 25 | CSGO.csgoEXE[clientVModEnt + 0x72] = 255.toByte() 26 | CSGO.engineDLL[EngineOffsets.dwModelAmbientMin] = floatToIntBits(0F) xor (CSGO.engineDLL.address + EngineOffsets.dwModelAmbientMin - 0x2C).toInt() 27 | 28 | forEntities { 29 | val entity = it.entity 30 | val type = it.type 31 | val glowAddress = it.glowAddress 32 | if (entity <= 0 || me == entity || glowAddress <= 0) return@forEntities 33 | 34 | if (type != EntityType.NULL) { 35 | when (type) { 36 | EntityType.CCSPlayer -> { 37 | glowAddress.glow(cWhite, -1); entity.chams(cWhite); entity.hideOnRadar() 38 | } 39 | EntityType.CPlantedC4 -> glowAddress.glow(cWhite, -1) 40 | EntityType.CC4 -> glowAddress.glow(cWhite, -1) 41 | else -> { 42 | if (type.weapon || type.grenade) { 43 | glowAddress.glow(cWhite, -1) 44 | } 45 | } 46 | } 47 | } 48 | 49 | return@forEntities 50 | } 51 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/visuals/DisablePostProcessing.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts.visuals 2 | 3 | import rat.poison.curSettings 4 | import rat.poison.game.CSGO.csgoEXE 5 | import rat.poison.game.offsets.ClientOffsets.bOverridePostProcesing 6 | import rat.poison.utils.every 7 | import rat.poison.utils.generalUtil.strToBool 8 | import rat.poison.utils.shouldPostProcess 9 | 10 | fun disablePostProcessing() = every(10000, true, inGameCheck = true) { 11 | if (!shouldPostProcess) return@every 12 | 13 | if (curSettings["DISABLE_POST_PROCESSING"].strToBool()) { 14 | csgoEXE[bOverridePostProcesing] = true 15 | } else if (csgoEXE.boolean(bOverridePostProcesing)) { 16 | csgoEXE[bOverridePostProcesing] = false 17 | } 18 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/visuals/ESP.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts.visuals 2 | 3 | import com.sun.jna.Memory 4 | import rat.poison.curSettings 5 | import rat.poison.dbg 6 | import rat.poison.game.CSGO.csgoEXE 7 | import rat.poison.game.Color 8 | import rat.poison.game.entity.Entity 9 | import rat.poison.game.entity.EntityType 10 | import rat.poison.game.netvars.NetVarOffsets 11 | import rat.poison.utils.extensions.uint 12 | import rat.poison.utils.generalUtil.strToBool 13 | import rat.poison.utils.generalUtil.toInt 14 | 15 | var espTARGET = -1L 16 | 17 | 18 | fun esp() { 19 | if (curSettings["MENU"].strToBool()) { //Temp until app fix 20 | if (dbg) { println("[DEBUG] Initializing Indicator ESP") }; indicatorEsp() 21 | if (dbg) { println("[DEBUG] Initializing Box ESP") }; boxEsp() 22 | if (dbg) { println("[DEBUG] Initializing Skeleton ESP") }; skeletonEsp() 23 | if (dbg) { println("[DEBUG] Initializing Snap Lines") }; snapLines() 24 | } 25 | 26 | if (dbg) { println("[DEBUG] Menu disabled, using alternate glow esp") }; glowEspEvery() 27 | if (dbg) { println("[DEBUG] Initializing Footstep ESP") }; footStepEsp() //Needed with & without menu 28 | if (dbg) { println("[DEBUG] Initializing Chams ESP") }; chamsEsp() 29 | if (dbg) { println("[DEBUG] Initializing Hitsound ESP") }; hitSoundEsp() 30 | if (dbg) { println("[DEBUG] Initializing Radar ESP") }; radarEsp() 31 | } 32 | 33 | fun Entity.glow(color: Color, glowType: Int) { 34 | val glowMemory: Memory by lazy { 35 | Memory(60) 36 | } 37 | 38 | //Revalidate 39 | val ent = csgoEXE.uint(this) 40 | val entType = EntityType.byEntityAddress(ent) 41 | 42 | if ((entType == EntityType.CCSPlayer || entType.weapon || entType.grenade || entType.bomb) && ent > 0) { 43 | csgoEXE.read(this, glowMemory) 44 | 45 | if (glowMemory.getPointer(0) != null) { 46 | if (glowType == -1) { 47 | glowMemory.setFloat(0x4, 0F) 48 | glowMemory.setFloat(0x8, 0F) 49 | glowMemory.setFloat(0xC, 0F) 50 | 51 | glowMemory.setByte(0x2C, glowType.toByte()) 52 | 53 | csgoEXE.write(this, glowMemory) 54 | } else { 55 | glowMemory.setFloat(0x4, color.red / 255F) 56 | glowMemory.setFloat(0x8, color.green / 255F) 57 | glowMemory.setFloat(0xC, color.blue / 255F) 58 | glowMemory.setFloat(0x10, color.alpha.toFloat()) 59 | glowMemory.setByte(0x24, 1) 60 | glowMemory.setByte(0x25, 0) 61 | 62 | glowMemory.setByte(0x26, curSettings["INV_GLOW_ESP"].toBoolean().toInt().toByte()) 63 | 64 | glowMemory.setByte(0x2C, glowType.toByte()) 65 | 66 | csgoEXE.write(this, glowMemory) 67 | } 68 | } 69 | } 70 | } 71 | 72 | 73 | //TODO add sanity checks, prolly not crash cause 74 | fun Entity.chams(color: Color) { 75 | csgoEXE[this + 0x70] = color.red.toByte() 76 | csgoEXE[this + 0x71] = color.green.toByte() 77 | csgoEXE[this + 0x72] = color.blue.toByte() 78 | } 79 | 80 | fun Entity.showOnRadar() { 81 | csgoEXE[this + NetVarOffsets.bSpotted] = true 82 | } 83 | 84 | fun Entity.hideOnRadar() { 85 | csgoEXE[this + NetVarOffsets.bSpotted] = false 86 | } 87 | 88 | fun String.toGlowNum(): Int { 89 | return when(this.uppercase()) { 90 | "NORMAL" -> 0 91 | "MODEL" -> 1 92 | "VISIBLE" -> 2 93 | else -> 3 94 | } 95 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/visuals/FarRadar.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts.visuals 2 | 3 | import com.badlogic.gdx.graphics.Color 4 | import com.badlogic.gdx.graphics.GL20 5 | import org.lwjgl.opengl.GL11.glEnable 6 | import rat.poison.curSettings 7 | import rat.poison.game.CSGO.clientDLL 8 | import rat.poison.game.CSGO.csgoEXE 9 | import rat.poison.game.entity.* 10 | import rat.poison.game.forEntities 11 | import rat.poison.game.me 12 | import rat.poison.game.offsets.ClientOffsets 13 | import rat.poison.game.offsets.ClientOffsets.dwRadarBase 14 | import rat.poison.game.worldToScreen 15 | import rat.poison.overlay.App 16 | import rat.poison.scripts.aim.meDead 17 | import rat.poison.settings.DANGER_ZONE 18 | import rat.poison.utils.Vector 19 | import rat.poison.utils.generalUtil.strToBool 20 | import rat.poison.utils.inGame 21 | import kotlin.math.abs 22 | 23 | data class FarPlayer(val pos: Vector = Vector(), var alpha: Float = 0F) 24 | private var farPlayerRecords = Array(64) { FarPlayer() } 25 | 26 | fun farRadar() = App { 27 | if (!inGame || !curSettings["BOX_FAR_RADAR"].strToBool() || meDead) return@App 28 | 29 | var dwRadar = clientDLL.int(dwRadarBase) 30 | dwRadar = csgoEXE.int(dwRadar + 0x74) 31 | 32 | forEntities(EntityType.CCSPlayer) { //This will probably require more prechecks 33 | val ent = it.entity 34 | 35 | //Prechecks 36 | if (ent == me || me.team() == ent.team() || DANGER_ZONE || !ent.dormant()) return@forEntities 37 | if (ent.dead()) return@forEntities 38 | 39 | val entID = csgoEXE.int(ent + ClientOffsets.dwIndex) 40 | 41 | val mem = csgoEXE.read(dwRadar + (0x174 * (entID + 1)) - 0x3C, 237) ?: return@forEntities 42 | 43 | val pos = Vector(mem.getFloat(0), mem.getFloat(4), mem.getFloat(8)) 44 | val health = mem.getInt(0x50) 45 | 46 | if (pos.x != 0.0F && health > 0 && health <= 100 && entID <= 64) { 47 | if (farPlayerRecords[entID].alpha <= 0F && farPlayerRecords[entID].pos != pos) { 48 | farPlayerRecords[entID] = FarPlayer(pos, 1F) 49 | } 50 | } 51 | } 52 | 53 | farPlayerRecords.forEach { 54 | if (it.alpha > 0F) { 55 | val w2s1 = Vector() 56 | val w2s2 = Vector() 57 | 58 | if (worldToScreen(it.pos, w2s1) && worldToScreen(Vector(it.pos.x, it.pos.y, it.pos.z - 75F), w2s2)) { 59 | if (shapeRenderer.isDrawing) shapeRenderer.end() 60 | shapeRenderer.begin() 61 | 62 | glEnable(GL20.GL_BLEND) 63 | 64 | val h = w2s1.y - w2s2.y 65 | val w = abs(h / 5F * 2F) 66 | 67 | shapeRenderer.color = Color(1F, 1F, 1F, it.alpha) 68 | shapeRenderer.rect(w2s1.x - w/2F, w2s1.y, w, h) 69 | 70 | shapeRenderer.end() 71 | } 72 | 73 | it.alpha -= .01F 74 | } 75 | } 76 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/visuals/HeadLevelHelper.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts.visuals 2 | 3 | import com.badlogic.gdx.graphics.GL20 4 | import com.badlogic.gdx.math.MathUtils.clamp 5 | import com.badlogic.gdx.math.Matrix4 6 | import org.lwjgl.opengl.GL11.glEnable 7 | import rat.poison.curSettings 8 | import rat.poison.game.angle 9 | import rat.poison.game.clientState 10 | import rat.poison.game.entity.onGround 11 | import rat.poison.game.entity.position 12 | import rat.poison.game.me 13 | import rat.poison.game.w2sViewMatrix 14 | import rat.poison.overlay.App 15 | import rat.poison.scripts.aim.meDead 16 | import rat.poison.utils.generalUtil.strToBool 17 | import rat.poison.utils.generalUtil.strToColorGDX 18 | import rat.poison.utils.generalUtil.toMatrix4 19 | import rat.poison.utils.inGame 20 | import kotlin.math.abs 21 | 22 | fun headLevelHelper() = App { 23 | if (!inGame || meDead) return@App 24 | 25 | val mePos = me.position() 26 | val meAng = clientState.angle() 27 | 28 | if (me.onGround() && curSettings["HEAD_LVL_ENABLE"].strToBool()) { 29 | val oldMatrix = Matrix4(shapeRenderer.projectionMatrix.values) 30 | 31 | val deadZone = curSettings["HEAD_LVL_DEADZONE"].toInt() 32 | 33 | shapeRenderer.apply { 34 | val gameMatrix = w2sViewMatrix.toMatrix4() 35 | gameMatrix.translate(0f, 0f, mePos.z) 36 | projectionMatrix = gameMatrix 37 | 38 | if (shapeRenderer.isDrawing) { 39 | end() 40 | } 41 | 42 | begin() 43 | 44 | glEnable(GL20.GL_BLEND) //sb end resets... 45 | 46 | val c = curSettings["HEAD_LVL_COLOR"].strToColorGDX() 47 | c.a = clamp((abs(meAng.x) - deadZone) / 5f, 0f, 1f) 48 | 49 | color = c 50 | 51 | circle(mePos.x, mePos.y, 50f) 52 | 53 | end() 54 | } 55 | shapeRenderer.projectionMatrix = oldMatrix 56 | } 57 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/visuals/HitsoundESP.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts.visuals 2 | 3 | import com.badlogic.gdx.Gdx 4 | import com.badlogic.gdx.audio.Sound 5 | import rat.poison.SETTINGS_DIRECTORY 6 | import rat.poison.curSettings 7 | import rat.poison.game.CSGO.csgoEXE 8 | import rat.poison.game.me 9 | import rat.poison.game.netvars.NetVarOffsets.m_totalHitsOnServer 10 | import rat.poison.settings.MENUTOG 11 | import rat.poison.utils.every 12 | import rat.poison.utils.generalUtil.strToBool 13 | 14 | private var totalHits = 0 15 | private var opened = false 16 | lateinit var hitSound: Sound 17 | 18 | fun hitSoundEsp() = every(50, inGameCheck = true) { 19 | if (!curSettings["ENABLE_HITSOUND"].strToBool() || MENUTOG || !curSettings["MENU"].strToBool() || me < 0) return@every 20 | 21 | val curHits = csgoEXE.int(me + m_totalHitsOnServer) 22 | if (curHits < 0 || curHits > 255) return@every 23 | 24 | if (!opened) { 25 | try { 26 | updateHitsound(curSettings["HITSOUND_FILE_NAME"].replace("\"", "")) 27 | opened = true 28 | totalHits = curHits 29 | } catch (e: Exception){ e.printStackTrace() } 30 | } 31 | else if (curHits == 0) { 32 | totalHits = 0 33 | } 34 | else if (totalHits != curHits) 35 | { 36 | hitSound.play(curSettings["HITSOUND_VOLUME"].toDouble().toFloat()) 37 | totalHits = curHits 38 | } 39 | } 40 | 41 | fun updateHitsound(fileName: String) { 42 | if (::hitSound.isInitialized) { 43 | hitSound.dispose() 44 | } 45 | hitSound = Gdx.audio.newSound(Gdx.files.internal("$SETTINGS_DIRECTORY\\hitsounds\\$fileName")) 46 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/visuals/NightMode.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts.visuals 2 | 3 | import rat.poison.curSettings 4 | import rat.poison.game.CSGO.csgoEXE 5 | import rat.poison.game.hooks.toneMapController 6 | import rat.poison.game.netvars.NetVarOffsets.m_bUseCustomAutoExposureMax 7 | import rat.poison.game.netvars.NetVarOffsets.m_bUseCustomAutoExposureMin 8 | import rat.poison.game.netvars.NetVarOffsets.m_flCustomAutoExposureMax 9 | import rat.poison.game.netvars.NetVarOffsets.m_flCustomAutoExposureMin 10 | import rat.poison.utils.every 11 | import rat.poison.utils.generalUtil.strToBool 12 | 13 | fun nightMode() = every(1000, inGameCheck = true) { 14 | if (!curSettings["ENABLE_ESP"].strToBool()) return@every 15 | 16 | if (curSettings["ENABLE_NIGHTMODE"].strToBool()) { 17 | if (toneMapController != 0L) { 18 | csgoEXE[toneMapController + m_bUseCustomAutoExposureMin] = 1 19 | csgoEXE[toneMapController + m_bUseCustomAutoExposureMax] = 1 20 | 21 | csgoEXE[toneMapController + m_flCustomAutoExposureMin] = curSettings["NIGHTMODE_VALUE"].toFloat() 22 | csgoEXE[toneMapController + m_flCustomAutoExposureMax] = curSettings["NIGHTMODE_VALUE"].toFloat() 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/visuals/RadarESP.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts.visuals 2 | 3 | import rat.poison.curSettings 4 | import rat.poison.game.entity.* 5 | import rat.poison.game.forEntities 6 | import rat.poison.game.me 7 | import rat.poison.settings.DANGER_ZONE 8 | import rat.poison.utils.Vector 9 | import rat.poison.utils.distanceTo 10 | import rat.poison.utils.every 11 | import rat.poison.utils.generalUtil.strToBool 12 | 13 | internal fun radarEsp() = every(100, inGameCheck = true) { 14 | if (!curSettings["RADAR_ESP"].strToBool() || DANGER_ZONE) return@every 15 | 16 | if (curSettings["LEGIT_RADAR"].strToBool()) { 17 | val entsChecked = mutableListOf() 18 | for (i in footSteps.indices) { 19 | val ent = footSteps[i].ent 20 | 21 | if (ent > 0L) { 22 | entsChecked.add(ent) 23 | if (!footSteps[i].open && footSteps[i].ttl > 0 && Vector(footSteps[i].x, footSteps[i].y, footSteps[i].z).distanceTo(me.position()) <= curSettings["LEGIT_RADAR_FOOTSTEPS_DISTANCE"].toInt()) { 24 | ent.showOnRadar() 25 | } else { 26 | ent.hideOnRadar() 27 | } 28 | } 29 | } 30 | 31 | forEntities(EntityType.CCSPlayer) { 32 | if (!entsChecked.contains(it.entity)) { 33 | it.entity.hideOnRadar() 34 | } 35 | } 36 | } else { 37 | forEntities(EntityType.CCSPlayer) { 38 | val entity = it.entity 39 | 40 | if (entity.dead() || entity == me || entity.dormant()) return@forEntities 41 | entity.showOnRadar() 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/scripts/visuals/ToggleESP.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.scripts.visuals 2 | 3 | import org.jire.arrowhead.keyPressed 4 | import rat.poison.curSettings 5 | import rat.poison.ui.uiUpdate 6 | import rat.poison.utils.every 7 | import rat.poison.utils.generalUtil.strToBool 8 | 9 | fun espToggle() = every(50) { 10 | if (keyPressed(curSettings["VISUALS_TOGGLE_KEY"].toInt())) { 11 | curSettings["ENABLE_ESP"] = !curSettings["ENABLE_ESP"].strToBool() 12 | if (!curSettings["ENABLE_ESP"].strToBool()) { 13 | disableAllEsp() 14 | } 15 | 16 | Thread.sleep(100) 17 | 18 | uiUpdate() 19 | } 20 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/settings/SetVars.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.settings 2 | 3 | import com.sun.jna.platform.win32.WinNT 4 | 5 | var GAME_PITCH = 0.022 // m_pitch 6 | var GAME_YAW = 0.022 // m_yaw 7 | var GAME_SENSITIVITY = 1.0 8 | var HEAD_BONE = 8 9 | var NECK_BONE = 7 10 | var CHEST_BONE = 6 11 | var STOMACH_BONE = 5 12 | var NEAREST_BONE = -1 13 | var RANDOM_BONE = -4 14 | 15 | var AIM_KEY = 1 16 | 17 | var SERVER_TICK_RATE = 64 18 | var MAX_ENTITIES = 4096 19 | var CLEANUP_TIME = 5_000 20 | var GARBAGE_COLLECT_ON_MAP_START = true 21 | var PROCESS_NAME = "csgo.exe" 22 | var PROCESS_ACCESS_FLAGS = WinNT.PROCESS_QUERY_INFORMATION or WinNT.PROCESS_VM_READ or WinNT.PROCESS_VM_WRITE or WinNT.PROCESS_VM_OPERATION 23 | var CLIENT_MODULE_NAME = "client.dll" 24 | var ENGINE_MODULE_NAME = "engine.dll" 25 | 26 | var DANGER_ZONE = false 27 | var MENUTOG = false 28 | -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/ui/TableBuilder.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.ui 2 | 3 | import com.badlogic.gdx.scenes.scene2d.Actor 4 | import com.kotcrab.vis.ui.widget.VisTable 5 | 6 | object TableBuilder { 7 | fun build(text: String, labelWidth: Int, actor: Actor): VisTable { 8 | val table = VisTable(true) 9 | table.add(text).width(labelWidth.toFloat()) 10 | table.add(actor) 11 | return table 12 | } 13 | 14 | fun build(vararg actors: Actor): VisTable { 15 | return build(VisTable(true), *actors) 16 | } 17 | 18 | fun build(rightSpacing: Int, vararg actors: Actor): VisTable { 19 | val table = VisTable(true) 20 | table.defaults().spaceRight(rightSpacing.toFloat()) 21 | return build(table, *actors) 22 | } 23 | 24 | private fun build(target: VisTable, vararg actors: Actor): VisTable { 25 | for (actor in actors) target.add(actor) 26 | return target 27 | } 28 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/ui/UIUpdate.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.ui 2 | 3 | import rat.poison.overlay.App.uiAimOverridenWeapons 4 | import rat.poison.overlay.App.uiBombWindow 5 | import rat.poison.overlay.App.uiKeybinds 6 | import rat.poison.overlay.App.uiMenu 7 | import rat.poison.overlay.App.uiSpecList 8 | import rat.poison.overlay.opened 9 | import rat.poison.ui.tabs.* 10 | import rat.poison.ui.tabs.visualstabs.* 11 | import rat.poison.ui.uiPanelTables.OverridenWeapons 12 | import rat.poison.ui.uiPanelTables.overridenWeaponsUpdate 13 | import rat.poison.ui.uiPanels.* 14 | 15 | var uiRefreshing = false 16 | 17 | fun uiUpdate() { 18 | if (!opened || uiRefreshing) return 19 | 20 | overridenWeaponsUpdate() 21 | visualsTabUpdate() 22 | glowEspTabUpdate() 23 | chamsEspTabUpdate() 24 | indicatorEspTabUpdate() 25 | boxEspTabUpdate() 26 | hitMarkerTabUpdate() 27 | skinChangerTabUpdate() 28 | nadesVTUpdate() 29 | snaplinesEspTabUpdate() 30 | footStepsEspTabUpdate() 31 | miscTabUpdate() 32 | rcsTabUpdate() 33 | miscVisualTabUpdate() 34 | optionsTabUpdate() 35 | nadeHelperTabUpdate() 36 | updateBacktrack() 37 | optionsTabUpdate() 38 | updateTrig() 39 | updateAim() 40 | updateDisableEsp() 41 | 42 | //Update windows 43 | uiAimOverridenWeapons.setPosition(uiMenu.x+uiMenu.width+4F, uiMenu.y) 44 | //Update lists 45 | optionsTab.updateCFGList() 46 | optionsTab.updateLocaleList() 47 | miscTab.updateHitSoundsList() 48 | nadeHelperTab.updateNadeFileHelperList() 49 | } 50 | 51 | fun refreshMenu() { 52 | uiRefreshing = true 53 | 54 | mainTabbedPane.removeAll() 55 | 56 | aimTab = AimTab() 57 | visualsTab = VisualsTab() 58 | rcsTab = RcsTab() 59 | miscTab = MiscTab() 60 | ranksTab = RanksTab() 61 | nadeHelperTab = NadeHelperTab() 62 | skinChangerTab = SkinChangerTab() 63 | optionsTab = OptionsTab() 64 | 65 | mainTabbedPane.add(aimTab) 66 | mainTabbedPane.add(visualsTab) 67 | mainTabbedPane.add(rcsTab) 68 | mainTabbedPane.add(miscTab) 69 | mainTabbedPane.add(ranksTab) 70 | mainTabbedPane.add(nadeHelperTab) 71 | mainTabbedPane.add(skinChangerTab) 72 | mainTabbedPane.add(optionsTab) 73 | 74 | espTabbedPane.removeAll() 75 | 76 | glowEspTab = GlowEspTab() 77 | chamsEspTab = ChamsEspTab() 78 | indicatorEspTab = IndicatorEspTab() 79 | boxEspTab = BoxEspTab() 80 | snaplinesEspTab = SnaplinesEspTab() 81 | footStepsEspTab = FootstepsEspTab() 82 | hitMarkerTab = HitMarkerTab() 83 | nadesTab = NadesVT() 84 | miscVisualsTab = MiscVisualsTab() 85 | 86 | espTabbedPane.add(glowEspTab) 87 | espTabbedPane.add(chamsEspTab) 88 | espTabbedPane.add(indicatorEspTab) 89 | espTabbedPane.add(boxEspTab) 90 | espTabbedPane.add(snaplinesEspTab) 91 | espTabbedPane.add(footStepsEspTab) 92 | espTabbedPane.add(hitMarkerTab) 93 | espTabbedPane.add(nadesTab) 94 | espTabbedPane.add(miscVisualsTab) 95 | 96 | uiAimOverridenWeapons.removeActor(overridenWeapons) 97 | uiAimOverridenWeapons.remove() 98 | overridenWeapons = OverridenWeapons() 99 | uiAimOverridenWeapons = UIAimOverridenWeapons() 100 | 101 | uiSpecList.remove() 102 | uiSpecList = UISpectatorList() 103 | 104 | uiBombWindow.remove() 105 | uiBombWindow = UIBombTimer() 106 | 107 | uiKeybinds.remove() 108 | uiKeybinds = UIKeybinds() 109 | 110 | uiRefreshing = false 111 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/ui/UIUtil.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.ui 2 | 3 | import com.badlogic.gdx.scenes.scene2d.Actor 4 | import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener 5 | 6 | fun Actor.changed(callback: (ChangeListener.ChangeEvent, Actor) -> Any?): ChangeListener { 7 | val listener = object : ChangeListener() { 8 | override fun changed(event: ChangeEvent?, actor: Actor?) { 9 | callback.invoke(event!!, actor!!) 10 | } 11 | } 12 | this.addListener(listener) 13 | return listener 14 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/ui/tabs/visualstabs/ChamsEspTab.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.ui.tabs.visualstabs 2 | 3 | import com.badlogic.gdx.scenes.scene2d.ui.Table 4 | import com.kotcrab.vis.ui.widget.VisTable 5 | import com.kotcrab.vis.ui.widget.tabbedpane.Tab 6 | import rat.poison.toLocale 7 | import rat.poison.ui.tabs.chamsEspTab 8 | import rat.poison.ui.uiHelpers.VisCheckBoxCustom 9 | import rat.poison.ui.uiHelpers.VisColorPickerCustom 10 | import rat.poison.ui.uiHelpers.VisSliderCustom 11 | 12 | class ChamsEspTab : Tab(false, false) { 13 | private val table = VisTable() 14 | 15 | //Init labels/sliders/boxes that show values here 16 | val chamsEsp = VisCheckBoxCustom("Enable", "CHAMS_ESP") 17 | val chamsShowHealth = VisCheckBoxCustom("Chams Show Health", "CHAMS_SHOW_HEALTH") 18 | val chamsBrightness = VisSliderCustom("Chams Brightness", "CHAMS_BRIGHTNESS", 0F, 100F, 1F, true) 19 | 20 | val showTeam = VisCheckBoxCustom(" ", "CHAMS_SHOW_TEAM", false) 21 | val chamsTeamColor = VisColorPickerCustom("Teammates", "CHAMS_TEAM_COLOR") 22 | 23 | val showEnemies = VisCheckBoxCustom(" ", "CHAMS_SHOW_ENEMIES", false) 24 | val chamsEnemyColor = VisColorPickerCustom("Enemies", "CHAMS_ENEMY_COLOR") 25 | 26 | val showSelf = VisCheckBoxCustom(" ", "CHAMS_SHOW_SELF", false) 27 | val chamsSelfColor = VisColorPickerCustom("Self", "CHAMS_SELF_COLOR") 28 | 29 | val showTarget = VisCheckBoxCustom(" ", "CHAMS_SHOW_TARGET", false) 30 | val chamsTargetColor = VisColorPickerCustom("Target", "CHAMS_TARGET_COLOR") 31 | 32 | init { 33 | ////////////////////FORMATTING 34 | table.padLeft(25F) 35 | table.padRight(25F) 36 | 37 | table.add(chamsEsp).left() 38 | table.add(chamsShowHealth).left().row() 39 | table.add(chamsBrightness).left().colspan(2).row() 40 | 41 | var tmpTable = VisTable() 42 | tmpTable.add(showTeam) 43 | tmpTable.add(chamsTeamColor).width(175F - showTeam.width).padRight(50F) 44 | 45 | table.add(tmpTable).left() 46 | 47 | tmpTable = VisTable() 48 | tmpTable.add(showEnemies) 49 | tmpTable.add(chamsEnemyColor).width(175F - showEnemies.width).padRight(50F) 50 | 51 | table.add(tmpTable).left().row() 52 | 53 | tmpTable = VisTable() 54 | tmpTable.add(showSelf) 55 | tmpTable.add(chamsSelfColor).width(175F - showSelf.width).padRight(50F) 56 | 57 | table.add(tmpTable).left() 58 | 59 | tmpTable = VisTable() 60 | tmpTable.add(showTarget) 61 | tmpTable.add(chamsTargetColor).width(175F - showTarget.width).padRight(50F) 62 | 63 | table.add(tmpTable).left() 64 | 65 | //table.add(colTable).colspan(2).width(450F).left() 66 | ////////////////////FORMATTING 67 | } 68 | 69 | override fun getContentTable(): Table? { 70 | return table 71 | } 72 | 73 | override fun getTabTitle(): String? { 74 | return "Chams".toLocale() 75 | } 76 | } 77 | 78 | fun chamsEspTabUpdate() { 79 | chamsEspTab.apply { 80 | chamsEsp.update() 81 | chamsShowHealth.update() 82 | chamsBrightness.update() 83 | showTeam.update() 84 | showEnemies.update() 85 | showSelf.update() 86 | chamsTeamColor.update() 87 | chamsEnemyColor.update() 88 | chamsSelfColor.update() 89 | } 90 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/ui/tabs/visualstabs/HitMarkerTab.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.ui.tabs.visualstabs 2 | 3 | import com.badlogic.gdx.scenes.scene2d.ui.Table 4 | import com.kotcrab.vis.ui.widget.VisTable 5 | import com.kotcrab.vis.ui.widget.tabbedpane.Tab 6 | import rat.poison.toLocale 7 | import rat.poison.ui.tabs.hitMarkerTab 8 | import rat.poison.ui.uiHelpers.VisCheckBoxCustom 9 | import rat.poison.ui.uiHelpers.VisColorPickerCustom 10 | import rat.poison.ui.uiHelpers.VisSliderCustom 11 | 12 | class HitMarkerTab : Tab(false, false) { 13 | private val table = VisTable() 14 | 15 | //Init labels/sliders/boxes that show values here 16 | val hitMarker = VisCheckBoxCustom("Enable", "ENABLE_HITMARKER") 17 | val hitMarkerOutline = VisCheckBoxCustom("Outline", "HITMARKER_OUTLINE") 18 | val hitMarkerCombo = VisCheckBoxCustom("Combo #", "HITMARKER_COMBO") 19 | val hitMarkerRecoilPos = VisCheckBoxCustom("Recoil Position", "HITMARKER_RECOIL_POSITION") 20 | 21 | val hitMarkerSpacing = VisSliderCustom("Spacing", "HITMARKER_SPACING", 0F, 20F,1F, true, width1 = 200F, width2 = 250F) 22 | val hitMarkerLength = VisSliderCustom("Line Length", "HITMARKER_LENGTH", 1F, 50F, 1F, true, width1 = 200F, width2 = 250F) 23 | val hitMarkerWidth = VisSliderCustom("Line Width", "HITMARKER_WIDTH", 1F, 10F, 1F, true, width1 = 200F, width2 = 250F) 24 | 25 | val hitMarkerColor = VisColorPickerCustom("Hitmarker", "HITMARKER_COLOR") 26 | val hitMarkerOutlineColor = VisColorPickerCustom("Outline", "HITMARKER_OUTLINE_COLOR") 27 | val hitMarkerComboColor = VisColorPickerCustom("Combo", "HITMARKER_COMBO_COLOR") 28 | 29 | init { 30 | table.padLeft(25F) 31 | table.padRight(25F) 32 | 33 | val colTab = VisTable() 34 | colTab.add(hitMarkerColor).width(150F).padRight(2F) 35 | colTab.add(hitMarkerOutlineColor).width(150F).padRight(2F) 36 | colTab.add(hitMarkerComboColor).width(150F).padRight(2F) 37 | 38 | table.add(hitMarker).left().row() 39 | table.add(hitMarkerOutline).left().row() 40 | table.add(hitMarkerCombo).left().row() 41 | table.add(hitMarkerRecoilPos).left().row() 42 | table.add(hitMarkerSpacing).left().row() 43 | table.add(hitMarkerLength).left().row() 44 | table.add(hitMarkerWidth).left().row() 45 | table.add(colTab).width(444F).center() 46 | } 47 | 48 | override fun getContentTable(): Table? { 49 | return table 50 | } 51 | 52 | override fun getTabTitle(): String? { 53 | return "Hitmarker".toLocale() 54 | } 55 | } 56 | 57 | fun hitMarkerTabUpdate() { 58 | hitMarkerTab.apply { 59 | hitMarker.update() 60 | hitMarkerOutline.update() 61 | hitMarkerCombo.update() 62 | hitMarkerRecoilPos.update() 63 | hitMarkerSpacing.update() 64 | hitMarkerLength.update() 65 | hitMarkerWidth.update() 66 | hitMarkerColor.update() 67 | hitMarkerOutlineColor.update() 68 | hitMarkerComboColor.update() 69 | } 70 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/ui/tabs/visualstabs/NadesVT.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.ui.tabs.visualstabs 2 | 3 | import com.badlogic.gdx.scenes.scene2d.ui.Table 4 | import com.kotcrab.vis.ui.widget.VisTable 5 | import com.kotcrab.vis.ui.widget.tabbedpane.Tab 6 | import rat.poison.curSettings 7 | import rat.poison.toLocale 8 | import rat.poison.ui.tabs.nadesTab 9 | import rat.poison.ui.uiHelpers.VisCheckBoxCustom 10 | import rat.poison.ui.uiHelpers.VisColorPickerCustom 11 | import rat.poison.ui.uiHelpers.VisSliderCustom 12 | 13 | class NadesVT : Tab(false, false) { 14 | private val table = VisTable() 15 | 16 | //Init labels/sliders/boxes that show values here 17 | val nadeTracer = VisCheckBoxCustom(" ", "NADE_TRACER", false) 18 | val nadeTracerColor = VisColorPickerCustom("Tracer", "NADE_TRACER_COLOR") 19 | 20 | val nadeTracerUpdateTime = VisSliderCustom("Tracer Update Time", "NADE_TRACER_UPDATE_TIME", 5F, curSettings["OPENGL_FPS"].toInt().toFloat(), 1F, true, width1 = 200F, width2 = 250F) 21 | val nadeTracerTimeout = VisSliderCustom("Tracer Timeout", "NADE_TRACER_TIMEOUT", 1F, 30F, 1F, true, width1 = 200F, width2 = 250F) 22 | 23 | val visualizeSmokes = VisCheckBoxCustom(" ", "VISUALIZE_SMOKES", false) 24 | val visualizeSmokesColor = VisColorPickerCustom("Smoke Box", "VISUALIZE_SMOKES_COLOR") 25 | val visualizeSmokesPolys = VisSliderCustom("Smoke Poly Count", "VISUALIZE_SMOKES_POLYS", 3F, 25F, 1F, true, width1 = 200F, width2 = 250F) 26 | val visualizeSmokesWidth = VisSliderCustom("Smoke Width", "VISUALIZE_SMOKES_WIDTH", 100F, 200F, 1F, true, width1 = 200F, width2 = 250F) 27 | val visualizeSmokesHeight = VisSliderCustom("Smoke Height", "VISUALIZE_SMOKES_HEIGHT", 100F, 150F, 1F, true, width1 = 200F, width2 = 250F) 28 | 29 | init { 30 | table.padLeft(25F) 31 | table.padRight(25F) 32 | 33 | var tmpTable = VisTable() 34 | tmpTable.add(nadeTracer) 35 | tmpTable.add(nadeTracerColor).width(175F - nadeTracer.width).padRight(50F) 36 | 37 | table.add(tmpTable).left().row() 38 | table.add(nadeTracerUpdateTime).row() 39 | table.add(nadeTracerTimeout).row() 40 | 41 | table.addSeparator() 42 | 43 | tmpTable = VisTable() 44 | tmpTable.add(visualizeSmokes) 45 | tmpTable.add(visualizeSmokesColor).width(175F - visualizeSmokes.width).padRight(50F) 46 | 47 | table.add(tmpTable).left().row() 48 | table.add(visualizeSmokesPolys).row() 49 | table.add(visualizeSmokesWidth).row() 50 | table.add(visualizeSmokesHeight).row() 51 | } 52 | 53 | override fun getContentTable(): Table? { 54 | return table 55 | } 56 | 57 | override fun getTabTitle(): String? { 58 | return "Nades".toLocale() 59 | } 60 | } 61 | 62 | fun nadesVTUpdate() { 63 | nadesTab.apply { 64 | nadeTracer.update() 65 | nadeTracerColor.update() 66 | nadeTracerUpdateTime.update() 67 | nadeTracerTimeout.update() 68 | visualizeSmokes.update() 69 | visualizeSmokesColor.update() 70 | visualizeSmokesPolys.update() 71 | visualizeSmokesWidth.update() 72 | visualizeSmokesHeight.update() 73 | } 74 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/ui/uiHelpers/VisCheckBoxCustom.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.ui.uiHelpers 2 | 3 | import com.kotcrab.vis.ui.widget.Tooltip 4 | import com.kotcrab.vis.ui.widget.Tooltip.removeTooltip 5 | import com.kotcrab.vis.ui.widget.VisCheckBox 6 | import rat.poison.curLocale 7 | import rat.poison.curSettings 8 | import rat.poison.dbg 9 | import rat.poison.scripts.visuals.disableAllEsp 10 | import rat.poison.ui.changed 11 | import rat.poison.ui.tabs.* 12 | import rat.poison.utils.generalUtil.boolToStr 13 | import rat.poison.utils.generalUtil.strToBool 14 | 15 | class VisCheckBoxCustom(mainText: String, varName: String, visibleText: Boolean = true) : VisCheckBox(mainText) { 16 | private val variableName = varName 17 | private val showText = visibleText 18 | private var hasTooltip = false 19 | 20 | init { 21 | update() 22 | 23 | updateTooltip() 24 | 25 | changed { _, _ -> 26 | curSettings[variableName] = isChecked.boolToStr() 27 | //CheckBoxes are the only things to disable/enable other settings, call all updates on change 28 | //Move to update() ? 29 | updateDisableRCrosshair() 30 | updateDisableRcsSmoothing() 31 | updateDisableEsp() 32 | updateDisableAim() 33 | updateDisableTrig() 34 | updateDisableBacktrack() 35 | disableAllEsp() //Nothing bad could come from this....?? 36 | true 37 | } 38 | } 39 | 40 | fun update() { 41 | if (curSettings["CURRENT_LOCALE"] != "" && showText) { //Only update locale if we have one 42 | if (dbg && curLocale[variableName].isBlank()) { 43 | println("[DEBUG] ${curSettings["CURRENT_LOCALE"]} $variableName is missing!") 44 | } 45 | setText(curLocale[variableName]) 46 | } 47 | 48 | isChecked = curSettings[variableName].strToBool() 49 | 50 | updateTooltip() 51 | } 52 | 53 | private fun updateTooltip() { 54 | if (curSettings["MENU_TOOLTIPS"].strToBool()) { 55 | if (curLocale["${variableName}_TOOLTIP"] != "") { 56 | if (!hasTooltip) { 57 | Tooltip.Builder(curLocale["${variableName}_TOOLTIP"]).target(this).build() 58 | hasTooltip = true 59 | if (dbg) { 60 | println("[DEBUG] Added tooltip to $variableName") 61 | } 62 | } 63 | } 64 | } else { 65 | if (hasTooltip) { 66 | removeTooltip(this) 67 | hasTooltip = false 68 | } 69 | } 70 | } 71 | 72 | fun disable(bool: Boolean) { 73 | isDisabled = bool 74 | } 75 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/ui/uiHelpers/VisColorPickerCustom.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.ui.uiHelpers 2 | 3 | import com.badlogic.gdx.graphics.Color 4 | import com.kotcrab.vis.ui.VisUI 5 | import com.kotcrab.vis.ui.widget.VisImageButton 6 | import com.kotcrab.vis.ui.widget.VisLabel 7 | import com.kotcrab.vis.ui.widget.VisTable 8 | import com.kotcrab.vis.ui.widget.color.ColorPicker 9 | import com.kotcrab.vis.ui.widget.color.ColorPickerAdapter 10 | import rat.poison.curLocale 11 | import rat.poison.curSettings 12 | import rat.poison.dbg 13 | import rat.poison.overlay.App 14 | import rat.poison.toLocale 15 | import rat.poison.ui.changed 16 | import rat.poison.utils.generalUtil.strToColor 17 | import rat.poison.game.Color as rColor 18 | 19 | private val white = VisUI.getSkin().getDrawable("white") 20 | 21 | class VisColorPickerCustom(mainText: String, varName: String) : VisTable() { 22 | private val labelText = mainText 23 | private val variableName = varName 24 | 25 | private val pickerButton = VisLabel(labelText) 26 | private val pickerImage = VisImageButton(white) 27 | 28 | private var colorPicker : ColorPicker 29 | 30 | init { 31 | colorPicker = ColorPicker(variableName.toLocale(), object : ColorPickerAdapter() { 32 | override fun finished(newCol: Color) { 33 | curSettings[variableName] = rColor((newCol.r*255F).toInt(), (newCol.g*255F).toInt(), (newCol.b*255F).toInt(), 1.0).toString() 34 | newCol.a = 1F 35 | color = newCol 36 | update() 37 | } 38 | }) 39 | 40 | pickerImage.changed { _, _ -> 41 | App.menuStage.addActor(colorPicker.fadeIn()) 42 | } 43 | 44 | this.add(pickerButton).growX() 45 | this.add(pickerImage).size(24f).pad(3f) 46 | 47 | update() 48 | } 49 | 50 | fun update() { 51 | val col = curSettings[variableName].strToColor() 52 | pickerImage.setColor(col.red/255F, col.green/255F, col.blue/255F, 1F) 53 | 54 | if (curSettings["CURRENT_LOCALE"] != "") { //Only update locale if we have one 55 | if (dbg && curLocale[variableName].isBlank()) { 56 | println("[DEBUG] ${curSettings["CURRENT_LOCALE"]} $variableName is missing!") 57 | } 58 | pickerButton.setText(curLocale[variableName]) 59 | colorPicker.titleLabel.setText(variableName.toLocale()) 60 | } 61 | } 62 | 63 | fun disable(bool: Boolean) { 64 | val col = if (bool) { 65 | Color(105F, 105F, 105F, .2F) 66 | } else { 67 | Color(255F, 255F, 255F, 1F) 68 | } 69 | 70 | pickerButton.color = col 71 | pickerImage.isDisabled = bool 72 | } 73 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/ui/uiHelpers/VisInputFieldCustom.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.ui.uiHelpers 2 | 3 | import com.badlogic.gdx.graphics.Color 4 | import com.badlogic.gdx.scenes.scene2d.Actor 5 | import com.kotcrab.vis.ui.util.Validators 6 | import com.kotcrab.vis.ui.widget.* 7 | import rat.poison.curLocale 8 | import rat.poison.curSettings 9 | import rat.poison.dbg 10 | import rat.poison.ui.changed 11 | import rat.poison.ui.uiPanels.keybindsUpdate 12 | import rat.poison.utils.generalUtil.strToBool 13 | 14 | class VisInputFieldCustom(mainText: String, varName: String, addLink: Boolean = true, keyWidth: Float = 200F) : VisTable() { 15 | private val textLabel = mainText 16 | private val variableName = varName 17 | private var hasTooltip = false 18 | 19 | private var keyLabel = VisLabel("$textLabel:") 20 | private val keyField = VisValidatableTextField(Validators.INTEGERS) 21 | private val linkLabel = LinkLabel("?", "http://cherrytree.at/misc/vk.htm") 22 | 23 | var value = 0 24 | 25 | init { 26 | update() 27 | 28 | updateTooltip() 29 | 30 | changed { _, _ -> 31 | if (keyField.text.toIntOrNull() != null) { 32 | if (keyField.text != curSettings[variableName]) { //If we need to change 33 | curSettings[variableName] = keyField.text.toInt().toString() 34 | keybindsUpdate(this) 35 | } 36 | } 37 | 38 | false 39 | } 40 | 41 | add(keyLabel).width(keyWidth) 42 | add(keyField).spaceRight(6F).width(50F) 43 | if (addLink) { 44 | add(linkLabel) 45 | } 46 | } 47 | 48 | fun update(neglect: Actor? = null) { 49 | if (neglect != this) { 50 | if (curSettings["CURRENT_LOCALE"] != "") { //Only update locale if we have one 51 | if (dbg) { 52 | if (curLocale[variableName].isBlank()) { 53 | println("[DEBUG] ${curSettings["CURRENT_LOCALE"]} $variableName is missing!") 54 | } 55 | } 56 | keyLabel.setText("${curLocale[variableName]}:") 57 | } 58 | 59 | keyField.text = curSettings[variableName] 60 | } 61 | 62 | updateTooltip() 63 | } 64 | 65 | private fun updateTooltip() { 66 | if (curSettings["MENU_TOOLTIPS"].strToBool()) { 67 | if (curLocale["${variableName}_TOOLTIP"] != "") { 68 | if (!hasTooltip) { 69 | Tooltip.Builder(curLocale["${variableName}_TOOLTIP"]).target(this).build() 70 | hasTooltip = true 71 | if (dbg) { 72 | println("[DEBUG] Added tooltip to $variableName") 73 | } 74 | } 75 | } 76 | } else { 77 | if (hasTooltip) { 78 | Tooltip.removeTooltip(this) 79 | hasTooltip = false 80 | } 81 | } 82 | } 83 | 84 | fun disable(bool: Boolean, col: Color) { 85 | keyLabel.color = col 86 | keyField.isDisabled = bool 87 | } 88 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/ui/uiHelpers/VisSliderCustom.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.ui.uiHelpers 2 | 3 | import com.badlogic.gdx.graphics.Color 4 | import com.kotcrab.vis.ui.widget.Tooltip 5 | import com.kotcrab.vis.ui.widget.VisLabel 6 | import com.kotcrab.vis.ui.widget.VisSlider 7 | import com.kotcrab.vis.ui.widget.VisTable 8 | import rat.poison.curLocale 9 | import rat.poison.curSettings 10 | import rat.poison.dbg 11 | import rat.poison.ui.changed 12 | import rat.poison.utils.generalUtil.strToBool 13 | import kotlin.math.pow 14 | import kotlin.math.round 15 | 16 | class VisSliderCustom(mainText: String, varName: String, varMin: Float, varMax: Float, stepSize: Float, intVal: Boolean, dec: Int = 2, width1: Float = 225F, width2: Float = 225F) : VisTable() { 17 | private val labelText = mainText 18 | private val variableName = varName 19 | private var hasTooltip = false 20 | private val isInt = intVal 21 | private val rnd = 10.0.pow(dec) 22 | private val w1 = width1 23 | private val w2 = width2 24 | 25 | private val sliderLabel = VisLabel("$labelText: " + curSettings[variableName]) 26 | private val sliderBar = VisSlider(varMin, varMax, stepSize, false) 27 | 28 | init { 29 | update() 30 | 31 | updateTooltip() 32 | 33 | sliderBar.changed { _, _ -> 34 | val sliderVal : Any = if (isInt) { 35 | sliderBar.value.toInt() 36 | } else { 37 | round(sliderBar.value * rnd)/rnd 38 | } 39 | 40 | curSettings[variableName] = sliderVal.toString() 41 | sliderLabel.setText("${curLocale[variableName]}: $sliderVal") 42 | } 43 | 44 | add(sliderLabel).width(w1) 45 | add(sliderBar).width(w2) 46 | } 47 | 48 | fun update() { 49 | sliderBar.value = curSettings[variableName].toFloat() 50 | 51 | val sliderVal : Any = if (isInt) { 52 | sliderBar.value.toInt() 53 | } else { 54 | round(sliderBar.value * rnd)/rnd 55 | } 56 | 57 | if (curSettings["CURRENT_LOCALE"] != "") { //Only update locale if we have one 58 | if (dbg && curLocale[variableName].isBlank()) { 59 | println("[DEBUG] ${curSettings["CURRENT_LOCALE"]} $variableName is missing!") 60 | } 61 | sliderLabel.setText("${curLocale[variableName]}: $sliderVal") 62 | } else { //User our default input 63 | sliderLabel.setText("$labelText: $sliderVal") 64 | } 65 | 66 | updateTooltip() 67 | } 68 | 69 | private fun updateTooltip() { 70 | if (curSettings["MENU_TOOLTIPS"].strToBool()) { 71 | if (curLocale["${variableName}_TOOLTIP"] != "") { 72 | if (!hasTooltip) { 73 | Tooltip.Builder(curLocale["${variableName}_TOOLTIP"]).target(this).build() 74 | hasTooltip = true 75 | if (dbg) { 76 | println("[DEBUG] Added tooltip to $variableName") 77 | } 78 | } 79 | } 80 | } else { 81 | if (hasTooltip) { 82 | Tooltip.removeTooltip(this) 83 | hasTooltip = false 84 | } 85 | } 86 | } 87 | 88 | fun disable(bool: Boolean, col: Color) { 89 | sliderBar.isDisabled = bool 90 | sliderLabel.color = col 91 | } 92 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/ui/uiHelpers/aimTab/ATabVisCheckBox.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.ui.uiHelpers.aimTab 2 | 3 | import com.kotcrab.vis.ui.widget.VisCheckBox 4 | import rat.poison.curLocale 5 | import rat.poison.curSettings 6 | import rat.poison.dbg 7 | import rat.poison.ui.changed 8 | import rat.poison.ui.tabs.categorySelected 9 | import rat.poison.ui.tabs.updateDisableAim 10 | import rat.poison.ui.uiUpdate 11 | import rat.poison.utils.generalUtil.boolToStr 12 | import rat.poison.utils.generalUtil.strToBool 13 | 14 | class ATabVisCheckBox(text: String, varExtension: String) : VisCheckBox(text) { 15 | private val mainText = text 16 | private val variableExtension = varExtension 17 | 18 | init { 19 | update() 20 | changed { _, _ -> 21 | curSettings[categorySelected + variableExtension] = isChecked.boolToStr() 22 | 23 | //Custom checks 24 | if (isChecked) { 25 | if (variableExtension == "_ENABLE_FLAT_AIM") { 26 | curSettings[categorySelected + "_ENABLE_PATH_AIM"] = "false" 27 | } else if (variableExtension == "_ENABLE_PATH_AIM") { 28 | curSettings[categorySelected + "_ENABLE_FLAT_AIM"] = "false" 29 | } 30 | } 31 | uiUpdate() 32 | updateDisableAim() 33 | true 34 | } 35 | } 36 | 37 | fun update() { 38 | val tmp = curSettings[categorySelected + variableExtension] 39 | 40 | if (tmp.isNotEmpty()) { 41 | isChecked = tmp.strToBool() 42 | } else { 43 | println("[Error] $categorySelected$variableExtension is empty") 44 | } 45 | 46 | if (curSettings["CURRENT_LOCALE"] != "") { //Only update locale if we have one 47 | if (dbg && curLocale[variableExtension].isBlank()) { 48 | println("[DEBUG] ${curSettings["CURRENT_LOCALE"]} $variableExtension is missing!") 49 | } 50 | setText(curLocale[variableExtension]) 51 | } 52 | } 53 | 54 | fun disable(bool: Boolean) { 55 | isDisabled = bool 56 | } 57 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/ui/uiHelpers/aimTab/ATabVisSlider.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.ui.uiHelpers.aimTab 2 | 3 | import com.badlogic.gdx.graphics.Color 4 | import com.kotcrab.vis.ui.widget.VisLabel 5 | import com.kotcrab.vis.ui.widget.VisSlider 6 | import com.kotcrab.vis.ui.widget.VisTable 7 | import rat.poison.curLocale 8 | import rat.poison.curSettings 9 | import rat.poison.dbg 10 | import rat.poison.ui.changed 11 | import rat.poison.ui.tabs.categorySelected 12 | import kotlin.math.pow 13 | import kotlin.math.round 14 | 15 | class ATabVisSlider(mainText: String, varExtension: String, varMin: Float, varMax: Float, stepSize: Float, intVal: Boolean, dec: Int = 2, width1: Float = 200F, width2: Float = 250F) : VisTable() { 16 | private val labelText = mainText 17 | private val variableExtension = varExtension 18 | private val isInt = intVal 19 | private val rnd = 10.0.pow(dec) 20 | 21 | private val w1 = width1 22 | private val w2 = width2 23 | 24 | private val sliderLabel = VisLabel("${curLocale[variableExtension]}: " + curSettings[categorySelected + variableExtension]) 25 | private val sliderBar = VisSlider(varMin, varMax, stepSize, false) 26 | 27 | init { 28 | update() 29 | 30 | sliderBar.changed { _, _ -> 31 | val sliderVal : Any = if (isInt) { 32 | sliderBar.value.toInt() 33 | } else { 34 | round(sliderBar.value * rnd) /rnd 35 | } 36 | 37 | curSettings[categorySelected + variableExtension] = sliderVal.toString() 38 | sliderLabel.setText("${curLocale[variableExtension]}: ${curSettings[categorySelected + variableExtension]}") 39 | } 40 | 41 | add(sliderLabel).width(w1) 42 | add(sliderBar).width(w2) 43 | } 44 | 45 | fun update() { 46 | val tmp = curSettings[categorySelected + variableExtension] 47 | 48 | if (tmp.isNotEmpty()) { 49 | sliderBar.value = tmp.toFloat() 50 | 51 | val sliderVal: Any = if (isInt) { 52 | sliderBar.value.toInt() 53 | } else { 54 | round(sliderBar.value * rnd) / rnd 55 | } 56 | 57 | sliderLabel.setText("$labelText: $sliderVal") 58 | } else { 59 | println("[Error] $categorySelected$variableExtension is empty") 60 | } 61 | 62 | if (curSettings["CURRENT_LOCALE"] != "") { //Only update locale if we have one 63 | if (dbg && curLocale[variableExtension].isBlank()) { 64 | println("[DEBUG] ${curSettings["CURRENT_LOCALE"]} $variableExtension is missing!") 65 | } 66 | sliderLabel.setText("${curLocale[variableExtension]}: ${curSettings[categorySelected + variableExtension]}") 67 | } 68 | } 69 | 70 | fun disable(bool: Boolean, col: Color) { 71 | sliderBar.isDisabled = bool 72 | sliderBar.color = col 73 | sliderLabel.color = col 74 | } 75 | 76 | fun isDisabled(): Boolean { 77 | return sliderBar.isDisabled 78 | } 79 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/ui/uiHelpers/overrideWeaponsUI/OverrideUtil.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.ui.uiHelpers.overrideWeaponsUI 2 | 3 | import rat.poison.curSettings 4 | import rat.poison.utils.generalUtil.pull 5 | 6 | fun splitOverrideString(curWep: String): MutableList { 7 | var tStr = curWep 8 | tStr = tStr.replace("oWeapon(", "").replace(")", "") 9 | val tSA = tStr.split(", ") 10 | 11 | return tSA as MutableList 12 | } 13 | 14 | fun getOverrideVar(curWep: String, index: Int): Any { 15 | val tSA = splitOverrideString(curSettings[curWep]) 16 | 17 | return tSA.pull(index) 18 | } 19 | 20 | fun getOverrideVarIndex(curWep: String, varName: String): Int { 21 | val tSA = splitOverrideString(curWep) 22 | 23 | var idx = -1 24 | for (i in tSA.indices) { 25 | if (tSA[i].contains(varName)) { 26 | idx = i 27 | } 28 | } 29 | return idx 30 | } 31 | 32 | fun setOverrideVar(curWep: String, index: Int, value: Any) { 33 | val tSA = splitOverrideString(curSettings[curWep]) 34 | 35 | tSA[index] = tSA[index].split("=".toRegex(), 2)[0] + "=" + value.toString() 36 | var newWep = tSA.toString() 37 | newWep = newWep.replace("[", "oWeapon(").replace("]", ")") 38 | curSettings[curWep] = newWep 39 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/ui/uiHelpers/overrideWeaponsUI/OverrideVisCheckBoxCustom.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.ui.uiHelpers.overrideWeaponsUI 2 | 3 | import com.kotcrab.vis.ui.widget.VisCheckBox 4 | import rat.poison.oWeapon 5 | import rat.poison.toLocale 6 | import rat.poison.ui.changed 7 | import rat.poison.ui.uiPanelTables.weaponOverrideSelected 8 | import rat.poison.ui.uiPanels.overridenWeapons 9 | import rat.poison.utils.generalUtil.strToBool 10 | 11 | private val flatAimIdx = getOverrideVarIndex(oWeapon().toString(), "tFlatAim") 12 | private val pathAimIdx = getOverrideVarIndex(oWeapon().toString(), "tPathAim") 13 | 14 | class OverrideVisCheckBoxCustom(mainText: String, varName: String) : VisCheckBox(mainText) { 15 | private val variableName = varName 16 | private val defaultText = mainText 17 | private val varIdx = getOverrideVarIndex(oWeapon().toString(), variableName) 18 | 19 | init { 20 | update() 21 | changed { _, _ -> 22 | if (varName == "tFlatAim" && isChecked) { 23 | setOverrideVar(weaponOverrideSelected, pathAimIdx, false) 24 | overridenWeapons.enablePathAim.isChecked = false 25 | } else if (varName == "tPathAim" && isChecked) { 26 | setOverrideVar(weaponOverrideSelected, flatAimIdx, false) 27 | overridenWeapons.enableFlatAim.isChecked = false 28 | } 29 | 30 | setOverrideVar(weaponOverrideSelected, varIdx, isChecked) 31 | 32 | true 33 | } 34 | } 35 | 36 | fun update() { 37 | val tmpText = variableName.toLocale() 38 | setText(if (tmpText.isBlank()) defaultText else tmpText ) 39 | isChecked = getOverrideVar(weaponOverrideSelected, varIdx).strToBool() 40 | } 41 | 42 | fun disable(bool: Boolean) { 43 | isDisabled = bool 44 | } 45 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/ui/uiHelpers/overrideWeaponsUI/OverrideVisSliderCustom.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.ui.uiHelpers.overrideWeaponsUI 2 | 3 | import com.badlogic.gdx.graphics.Color 4 | import com.kotcrab.vis.ui.widget.VisLabel 5 | import com.kotcrab.vis.ui.widget.VisSlider 6 | import com.kotcrab.vis.ui.widget.VisTable 7 | import rat.poison.curLocale 8 | import rat.poison.curSettings 9 | import rat.poison.dbg 10 | import rat.poison.oWeapon 11 | import rat.poison.ui.changed 12 | import rat.poison.ui.uiPanelTables.weaponOverrideSelected 13 | import kotlin.math.pow 14 | import kotlin.math.round 15 | 16 | class OverrideVisSliderCustom(mainText: String, varName: String, varMin: Float, varMax: Float, stepSize: Float, intVal: Boolean, dec: Int = 2, width1: Float = 225F, width2: Float = 225F) : VisTable() { 17 | private val labelText = mainText 18 | private val variableName = varName 19 | private val varIdx = getOverrideVarIndex(oWeapon().toString(), variableName) 20 | private val isInt = intVal 21 | private val rnd = 10.0.pow(dec) 22 | private val w1 = width1 23 | private val w2 = width2 24 | 25 | private val sliderLabel = VisLabel("$labelText: " + getOverrideVar(weaponOverrideSelected, varIdx)) 26 | private val sliderBar = VisSlider(varMin, varMax, stepSize, false) 27 | 28 | init { 29 | update() 30 | 31 | sliderBar.changed { _, _ -> 32 | val sliderVal : Any = if (isInt) { 33 | sliderBar.value.toInt() 34 | } else { 35 | round(sliderBar.value * rnd)/rnd 36 | } 37 | 38 | setOverrideVar(weaponOverrideSelected, varIdx, sliderVal) 39 | 40 | if (curSettings["CURRENT_LOCALE"] != "") { //Only update locale if we have one 41 | if (dbg && curLocale[variableName].isBlank()) { 42 | println("[DEBUG] ${curSettings["CURRENT_LOCALE"]} $variableName is missing!") 43 | } 44 | sliderLabel.setText("${curLocale[variableName]}: $sliderVal") 45 | } else { //User our default input 46 | sliderLabel.setText("$labelText: $sliderVal") 47 | } 48 | } 49 | 50 | add(sliderLabel).width(w1) 51 | add(sliderBar).width(w2) 52 | } 53 | 54 | fun update() { 55 | sliderBar.value = getOverrideVar(weaponOverrideSelected, varIdx).toString().toFloat()//curSettings[variableName].toFloat() 56 | 57 | val sliderVal : Any = if (isInt) { 58 | sliderBar.value.toInt() 59 | } else { 60 | round(sliderBar.value * rnd)/rnd 61 | } 62 | 63 | if (curSettings["CURRENT_LOCALE"] != "") { //Only update locale if we have one 64 | if (dbg && curLocale[variableName].isBlank()) { 65 | println("[DEBUG] ${curSettings["CURRENT_LOCALE"]} $variableName is missing!") 66 | } 67 | sliderLabel.setText("${curLocale[variableName]}: $sliderVal") 68 | } else { //User our default input 69 | sliderLabel.setText("$labelText: $sliderVal") 70 | } 71 | } 72 | 73 | fun disable(bool: Boolean, col: Color) { 74 | sliderBar.isDisabled = bool 75 | sliderLabel.color = col 76 | } 77 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/ui/uiPanels/UIAimOverridenWeapons.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.ui.uiPanels 2 | 3 | import com.badlogic.gdx.utils.Align 4 | import com.kotcrab.vis.ui.widget.VisWindow 5 | import rat.poison.overlay.App.uiMenu 6 | import rat.poison.overlay.opened 7 | import rat.poison.toLocale 8 | import rat.poison.ui.uiPanelTables.OverridenWeapons 9 | 10 | var overridenWeapons = OverridenWeapons() 11 | 12 | class UIAimOverridenWeapons : VisWindow("Override-Weapons".toLocale()) { 13 | init { 14 | defaults().left() 15 | align(Align.topLeft) 16 | 17 | add(overridenWeapons).top().left() 18 | 19 | pack() 20 | 21 | setSize(400F, 684F) 22 | isResizable = false 23 | } 24 | 25 | override fun positionChanged() { //Not draggable 26 | if (opened) { 27 | setPosition(uiMenu.x + uiMenu.width + 4F, uiMenu.y + uiMenu.height - height) 28 | } 29 | } 30 | 31 | fun changeAlpha(alpha: Float) { 32 | color.a = alpha 33 | } 34 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/ui/uiPanels/UIBombTimer.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.ui.uiPanels 2 | 3 | import com.kotcrab.vis.ui.widget.VisLabel 4 | import com.kotcrab.vis.ui.widget.VisSlider 5 | import com.kotcrab.vis.ui.widget.VisWindow 6 | import rat.poison.curSettings 7 | import rat.poison.scripts.bombState 8 | import rat.poison.toLocale 9 | import rat.poison.ui.changed 10 | import kotlin.math.round 11 | 12 | lateinit var bombText : VisLabel 13 | 14 | //Needs cleanup 15 | 16 | class UIBombTimer : VisWindow("Bomb-Timer".toLocale()) { 17 | init { 18 | defaults().left() 19 | 20 | bombText = VisLabel(bombState.toString()) 21 | 22 | //Create UI_Alpha Slider 23 | val menuAlphaSlider = VisSlider(0.5F, 1F, 0.05F, false) 24 | menuAlphaSlider.value = curSettings["BOMB_TIMER_ALPHA"].toFloat() 25 | menuAlphaSlider.changed { _, _ -> 26 | val alp = (round(menuAlphaSlider.value * 100F) / 100F) 27 | changeAlpha(alp) 28 | 29 | true 30 | } 31 | 32 | add(bombText).growX().fillX().expandX().expandY().center().top().colspan(1).row() 33 | add(menuAlphaSlider).growX() 34 | 35 | pack() 36 | 37 | setSize(325F, 150F) 38 | setPosition(curSettings["BOMB_TIMER_X"].toFloat(), curSettings["BOMB_TIMER_Y"].toFloat()) 39 | changeAlpha(curSettings["BOMB_TIMER_ALPHA"].toFloat()) 40 | isResizable = false 41 | } 42 | 43 | fun changeAlpha(alpha: Float) { 44 | color.a = alpha 45 | } 46 | 47 | fun updatePosition(x: Float, y: Float) { 48 | setPosition(x, y) 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/ui/uiPanels/UIKeybinds.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.ui.uiPanels 2 | 3 | import com.badlogic.gdx.scenes.scene2d.Actor 4 | import com.badlogic.gdx.utils.Align 5 | import com.kotcrab.vis.ui.widget.VisSlider 6 | import com.kotcrab.vis.ui.widget.VisWindow 7 | import rat.poison.curSettings 8 | import rat.poison.overlay.App.uiKeybinds 9 | import rat.poison.toLocale 10 | import rat.poison.ui.changed 11 | import rat.poison.ui.uiHelpers.VisInputFieldCustom 12 | import kotlin.math.round 13 | 14 | class UIKeybinds : VisWindow("Keybinds".toLocale()) { 15 | val aimToggleKey = VisInputFieldCustom("Toggle Aim Key", "AIM_TOGGLE_KEY") 16 | val forceAimKey = VisInputFieldCustom("Force Aim Key", "FORCE_AIM_KEY") 17 | val forceAimBoneKey = VisInputFieldCustom("Force Aim Bone Key", "FORCE_AIM_BONE_KEY") 18 | val boneTriggerKey = VisInputFieldCustom("Trigger Key", "TRIGGER_KEY") 19 | val visualsToggleKey = VisInputFieldCustom("Visuals Toggle Key", "VISUALS_TOGGLE_KEY") 20 | val doorSpamKey = VisInputFieldCustom("Door Spam Key", "D_SPAM_KEY") 21 | val weaponSpamKey = VisInputFieldCustom("Weapon Spam Key", "W_SPAM_KEY") 22 | val menuKeyField = VisInputFieldCustom("Menu Key", "MENU_KEY") 23 | 24 | init { 25 | defaults().left() 26 | 27 | align(Align.left) 28 | 29 | padLeft(25F) 30 | padRight(25F) 31 | 32 | //Create UI_Alpha Slider 33 | val menuAlphaSlider = VisSlider(0.5F, 1F, 0.05F, false) 34 | menuAlphaSlider.value = 1F 35 | menuAlphaSlider.changed { _, _ -> 36 | val alp = (round(menuAlphaSlider.value * 100F) / 100F) 37 | changeAlpha(alp) 38 | 39 | true 40 | } 41 | 42 | add(aimToggleKey).left().row() 43 | add(forceAimKey).left().row() 44 | add(forceAimBoneKey).left().row() 45 | add(boneTriggerKey).left().row() 46 | add(visualsToggleKey).left().row() 47 | add(doorSpamKey).left().row() 48 | add(weaponSpamKey).left().row() 49 | add(menuKeyField).left().row() 50 | add(menuAlphaSlider).growX() 51 | 52 | setSize(325F, 325F) 53 | setPosition(curSettings["KEYBINDS_X"].toFloat(), curSettings["KEYBINDS_Y"].toFloat()) 54 | color.a = curSettings["KEYBINDS_ALPHA"].toFloat() 55 | isResizable = false 56 | } 57 | 58 | fun changeAlpha(alpha: Float) { 59 | color.a = alpha 60 | } 61 | 62 | fun updatePosition(x: Float, y: Float) { 63 | setPosition(x, y) 64 | } 65 | } 66 | 67 | fun keybindsUpdate(neglect: Actor) { 68 | uiKeybinds.apply { 69 | aimToggleKey.update(neglect) 70 | forceAimKey.update(neglect) 71 | forceAimBoneKey.update(neglect) 72 | boneTriggerKey.update(neglect) 73 | visualsToggleKey.update(neglect) 74 | doorSpamKey.update(neglect) 75 | weaponSpamKey.update(neglect) 76 | menuKeyField.update(neglect) 77 | } 78 | 79 | aimTab.tAim.aimToggleKey.update(neglect) 80 | aimTab.tAim.forceAimKey.update(neglect) 81 | aimTab.tAim.forceAimBoneKey.update(neglect) 82 | aimTab.tTrig.boneTriggerKey.update(neglect) 83 | visualsTab.visualsToggleKey.update(neglect) 84 | miscTab.doorSpamKey.update(neglect) 85 | miscTab.weaponSpamKey.update(neglect) 86 | optionsTab.menuKey.update(neglect) 87 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/ui/uiPanels/UISpectatorList.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.ui.uiPanels 2 | 3 | import com.kotcrab.vis.ui.widget.VisLabel 4 | import com.kotcrab.vis.ui.widget.VisSlider 5 | import com.kotcrab.vis.ui.widget.VisWindow 6 | import rat.poison.curSettings 7 | import rat.poison.toLocale 8 | import rat.poison.ui.changed 9 | import kotlin.math.round 10 | 11 | lateinit var specListText : VisLabel 12 | 13 | //Needs cleanup 14 | 15 | class UISpectatorList : VisWindow("Spectator-List".toLocale()) { 16 | init { 17 | defaults().left() 18 | 19 | specListText = VisLabel() 20 | 21 | //Create UI_Alpha Slider 22 | val menuAlphaSlider = VisSlider(0.5F, 1F, 0.05F, true) 23 | menuAlphaSlider.value = curSettings["SPECTATOR_LIST_ALPHA"].toFloat() 24 | menuAlphaSlider.changed { _, _ -> 25 | val alp = (round(menuAlphaSlider.value * 100F) / 100F) 26 | changeAlpha(alp) 27 | true 28 | } 29 | 30 | columnDefaults(2) 31 | 32 | add(specListText).growX().fillX().expandX().expandY().center().top().colspan(1) 33 | add(menuAlphaSlider).colspan(1).growY() 34 | 35 | pack() 36 | 37 | setSize(300F, 350F) 38 | setPosition(curSettings["SPECTATOR_LIST_X"].toFloat(), curSettings["SPECTATOR_LIST_Y"].toFloat()) 39 | changeAlpha(curSettings["SPECTATOR_LIST_ALPHA"].toFloat()) 40 | isResizable = false 41 | } 42 | 43 | fun changeAlpha(alpha: Float) { 44 | color.a = alpha 45 | } 46 | 47 | fun updatePosition(x: Float, y: Float) { 48 | setPosition(x, y) 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/CFGMigration.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils 2 | 3 | import rat.poison.SETTINGS_DIRECTORY 4 | import java.io.File 5 | 6 | fun loadMigration() { 7 | val file = File("$SETTINGS_DIRECTORY/CFGS/default_migration.cfg") 8 | if (file.exists()) { 9 | try { 10 | loadCFG("default_migration", true) 11 | println("Default migration config found and successfully loaded.") 12 | } 13 | catch (e: Exception) { 14 | println("Default migration config found and wasn't successfully loaded.") 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/DisposableMemory.kt: -------------------------------------------------------------------------------- 1 | ////Courtesy of Mr Noad 2 | 3 | package rat.poison.utils 4 | 5 | import com.sun.jna.Memory 6 | 7 | open class DisposableMemory : Memory { 8 | constructor(size: Long) : super(size) 9 | constructor() : super() 10 | 11 | fun disposeUnsafe() { 12 | this.dispose() 13 | } 14 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/Every.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils 2 | 3 | import rat.poison.haltProcess 4 | 5 | @Volatile 6 | var inBackground = false 7 | @Volatile 8 | var inGame = false 9 | @Volatile 10 | var shouldPostProcess = false 11 | 12 | inline fun every(duration: Int, continuous: Boolean = false, inGameCheck: Boolean = false, crossinline body: () -> Unit) = Thread(Runnable { 13 | while (!Thread.interrupted()) { 14 | if ((continuous || !inBackground) && !haltProcess && ((inGameCheck && inGame) || !inGameCheck)) { 15 | try { 16 | body() 17 | } catch (e: Exception) { 18 | e.printStackTrace() 19 | } 20 | } 21 | 22 | Thread.sleep(duration.toLong()) 23 | } 24 | }).start() -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/Hook.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils 2 | 3 | class Hook(val clauseDefault: Boolean, val durationDefault: Int, 4 | val predicate: () -> Boolean) { 5 | 6 | inline operator fun invoke(clause: Boolean = clauseDefault, 7 | duration: Int = durationDefault, 8 | crossinline body: () -> Unit) { 9 | if (!clause) every(duration) { 10 | if (predicate()) body() 11 | } else if (predicate()) body() 12 | } 13 | 14 | } 15 | 16 | fun hook(durationDefault: Int = 8, clauseDefault: Boolean = false, predicate: () -> Boolean) 17 | = Hook(clauseDefault, durationDefault, predicate) 18 | -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/HumanMouse.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils 2 | 3 | import com.sun.jna.platform.win32.WinDef 4 | import rat.poison.utils.extensions.distance 5 | import java.lang.Math.toRadians 6 | import kotlin.math.floor 7 | import kotlin.math.sin 8 | import kotlin.math.sqrt 9 | import java.util.concurrent.ThreadLocalRandom.current as tlr 10 | 11 | object HumanMouse { 12 | inline fun fastSteps(a: WinDef.POINT, b: WinDef.POINT, action: (Int, Int) -> Unit) { 13 | val a2b = a.distance(b) 14 | val sqa2b = sqrt(a2b) 15 | 16 | val steps = sqa2b * 3 17 | 18 | val totalSteps = steps.toInt() + 2 19 | val lastIndex = totalSteps - 1 20 | for (i in 1..totalSteps) action(lastIndex, i) 21 | action(lastIndex, lastIndex) // final step 22 | } 23 | 24 | inline fun steps(a: WinDef.POINT, b: WinDef.POINT, action: (Int, Int, Int, Int) -> Unit) { 25 | val a2b = a.distance(b) 26 | val sqa2b = sqrt(a2b) 27 | 28 | val steps = sqa2b * 3 29 | val radSteps = toRadians(180 / steps) 30 | 31 | val xOffset = (b.x - a.x) / steps 32 | val yOffset = (b.y - a.y) / steps 33 | 34 | var x = radSteps 35 | var y = radSteps 36 | 37 | var waviness = 2.8 38 | if (a2b < 120) // less than 120px 39 | waviness = 0.5 40 | 41 | var multiplier = 1 42 | 43 | if (tlr().nextBoolean()) x *= floor(tlr().nextDouble() * waviness + 1) 44 | if (tlr().nextBoolean()) y *= floor(tlr().nextDouble() * waviness + 1) 45 | if (tlr().nextBoolean()) multiplier *= -1 46 | 47 | val offset = tlr().nextDouble() * (1.6 + sqrt(steps)) + 6 + 2 48 | 49 | val totalSteps = steps.toInt() + 2 50 | val lastIndex = totalSteps - 1 51 | for (i in 1..totalSteps) { 52 | val stepX = a.x + ((xOffset * i).toInt() + multiplier * (offset * sin(x * i)).toInt()) 53 | val stepY = a.y + ((yOffset * i).toInt() + multiplier * (offset * sin(y * i)).toInt()) 54 | action(lastIndex, stepX, stepY, i) 55 | } 56 | action(lastIndex, b.x, b.y, lastIndex) // final step 57 | } 58 | 59 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/LanguageDetection.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils 2 | 3 | import rat.poison.SETTINGS_DIRECTORY 4 | import rat.poison.curSettings 5 | import rat.poison.utils.generalUtil.loadLocale 6 | import java.nio.file.Files 7 | import java.nio.file.Paths 8 | import java.util.* 9 | 10 | fun getSystemLocale(): Locale? { 11 | return Locale.getDefault() 12 | } 13 | 14 | fun detectLocale() { 15 | val locale = getSystemLocale() 16 | val dir = "$SETTINGS_DIRECTORY/Localizations/locale_${locale}.locale" 17 | if (locale != null && Files.exists(Paths.get(dir))) { 18 | loadLocale(dir) 19 | } 20 | else { 21 | loadLocale("$SETTINGS_DIRECTORY/Localizations/locale_en_US.locale") 22 | curSettings["CURRENT_LOCALE"] = "locale_en_US" 23 | } 24 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/Long2ObjectCache.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils 2 | 3 | import it.unimi.dsi.fastutil.longs.Long2ObjectMap 4 | 5 | inline fun Long.readCached(cache: Long2ObjectMap, crossinline construct: () -> T, 6 | crossinline read: T.(Long) -> R): T { 7 | val t: T = 8 | if (cache.containsKey(this)) 9 | cache.get(this) 10 | else { 11 | val tt = construct() 12 | cache[this] = tt 13 | tt 14 | } 15 | t.read(this) 16 | return t 17 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/Long2VectorCache.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils 2 | 3 | import it.unimi.dsi.fastutil.longs.Long2ObjectMap 4 | 5 | inline fun Long.readCached(cache: Long2ObjectMap, crossinline read: Vector.(Long) -> R): Vector 6 | = readCached(cache, { Vector() }, read) -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/Mouse.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils 2 | 3 | import rat.poison.utils.natives.CUser32.mouse_event 4 | 5 | const val MOUSEEVENTF_ABSOLUTE = 0x8000 6 | const val MOUSEEVENTF_MOVE = 0x0001 7 | const val MOUSEEVENTF_WHEEL = 0x0800 8 | 9 | const val MOUSEEVENTF_LEFTDOWN = 0x0002 10 | const val MOUSEEVENTF_LEFTUP = 0x0004 11 | 12 | fun mouseMove(dx: Int, dy: Int, flags: Int = MOUSEEVENTF_MOVE) = mouse_event(flags, dx, dy, 0, 0) 13 | 14 | fun mouseWheel(amount: Int) = mouse_event(MOUSEEVENTF_WHEEL, 0, 0, amount, 0) 15 | 16 | fun mouse(button: Int) = mouse_event(button, 0, 0, 0, 0) -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/NadeUtil.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils 2 | 3 | import rat.poison.robot 4 | import java.awt.event.MouseEvent 5 | 6 | fun jumpAndThrow() { 7 | Thread(Runnable { 8 | robot.mousePress(MouseEvent.BUTTON1_DOWN_MASK) 9 | Thread.sleep(12) 10 | robot.keyPress(32) 11 | Thread.sleep(12) 12 | robot.keyRelease(32) 13 | Thread.sleep(12) 14 | robot.mouseRelease(MouseEvent.BUTTON1_DOWN_MASK) 15 | }).start() 16 | } 17 | 18 | fun standAndThrow() { 19 | Thread(Runnable { 20 | robot.mousePress(MouseEvent.BUTTON1_DOWN_MASK) 21 | Thread.sleep(12) 22 | robot.mouseRelease(MouseEvent.BUTTON1_DOWN_MASK) 23 | }).start() 24 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/ObservableBoolean.kt: -------------------------------------------------------------------------------- 1 | ////Courtesy of Mr Noad 2 | 3 | package rat.poison.utils 4 | 5 | import kotlin.properties.Delegates 6 | 7 | open class ObservableBoolean ( 8 | private val updateState: () -> Boolean, 9 | private var wasTrue: Boolean = updateState(), 10 | initialValue: Boolean = wasTrue 11 | ) { 12 | 13 | var value by Delegates.observable(initialValue) { _, old, _ -> 14 | wasTrue = old 15 | } 16 | private set 17 | 18 | open fun update() { 19 | value = updateState() 20 | } 21 | 22 | val justBecameTrue: Boolean 23 | get() = !wasTrue && value 24 | 25 | val justBecameFalse: Boolean 26 | get() = wasTrue && !value 27 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/Random.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils 2 | 3 | import rat.poison.utils.generalUtil.toInt 4 | import java.util.concurrent.ThreadLocalRandom.current as tlr 5 | 6 | fun randDouble(min: Double, max: Double) = tlr().nextDouble(min, max) 7 | fun randDouble() = tlr().nextDouble() 8 | 9 | fun randInt(min: Int, max: Int) = tlr().nextInt(min, max) 10 | fun randInt(min: Int) = tlr().nextInt(min) 11 | fun randInt() = tlr().nextInt() 12 | 13 | fun randLong(min: Long, max: Long) = tlr().nextLong(min, max) 14 | fun randLong(min: Long) = tlr().nextLong(min) 15 | fun randLong() = tlr().nextLong() 16 | 17 | fun randBoolean() = tlr().nextBoolean() 18 | 19 | fun randSign(): Int { 20 | var tmp = tlr().nextBoolean().toInt() 21 | if (tmp == 0) { 22 | tmp = -1 23 | } 24 | return tmp 25 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/RepeatedInt.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils 2 | 3 | data class RepeatedInt(val value: Int, val repeats: Int) 4 | 5 | operator fun Int.get(repeats: Int) = RepeatedInt(this, repeats) -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/Retry.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils 2 | 3 | inline fun retry(duration: Long = 1000, noinline exceptionHandler: ((Throwable) -> Unit)? = null, body: () -> R) { 4 | while (!Thread.interrupted()) { 5 | try { 6 | body() 7 | break 8 | } catch (t: Throwable) { 9 | exceptionHandler?.invoke(t) 10 | Thread.sleep(duration) 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/Settings.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils 2 | 3 | class Settings : MutableMap { 4 | private val savedValues = mutableMapOf() 5 | 6 | override fun get(key: String): String { 7 | if (savedValues.containsKey(key)) { 8 | return savedValues[key].toString() 9 | } 10 | return "" 11 | } 12 | 13 | override fun put(key: String, value: Any?): Any? { 14 | return savedValues.put(key, value.toString()) 15 | } 16 | 17 | override fun containsValue(value: Any?): Boolean { 18 | TODO("containsValue") 19 | } 20 | override val entries: MutableSet> 21 | get() = TODO("entries") 22 | override val keys: MutableSet 23 | get() = TODO("keys") 24 | override val size: Int 25 | get() = TODO("size") 26 | override val values: MutableCollection 27 | get() = TODO("values") 28 | override fun clear() {} 29 | override fun putAll(from: Map) {} 30 | override fun remove(key: String): Any? {return false} 31 | override fun isEmpty(): Boolean {return false} 32 | override fun containsKey(key: String): Boolean {return false} 33 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/Structs/globalVars.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils.Structs 2 | 3 | import com.sun.jna.Memory 4 | import com.sun.jna.Structure 5 | import org.jire.arrowhead.Struct 6 | import rat.poison.scripts.gvars 7 | 8 | fun memToGlobalVars(mem: Memory): GlobalVars { 9 | val tmp_gvars = gvars 10 | 11 | tmp_gvars.tickCount = gvar_tickCount(mem) 12 | tmp_gvars.intervalPerTick = gvar_intervalPerTick(mem) 13 | 14 | return tmp_gvars 15 | } 16 | 17 | class GlobalVars: Struct(), Structure.ByReference { 18 | @JvmField 19 | var realTime = 0f 20 | @JvmField 21 | var frameCount = 0 22 | @JvmField 23 | var absoluteFrameTime = 0f 24 | @JvmField 25 | var absoluteFrameStartTimeSTDDev = 0f 26 | @JvmField 27 | var curTime = 0f 28 | @JvmField 29 | var frameTime = 0f 30 | @JvmField 31 | var maxClients = 0 32 | @JvmField 33 | var tickCount = 0 34 | @JvmField 35 | var intervalPerTick = 0f 36 | @JvmField 37 | var interpolationAmount = 0f 38 | @JvmField 39 | var simTicksThisFrame = 0 40 | @JvmField 41 | var networkProtocol = 0 42 | 43 | //pSaveData void* 44 | @JvmField 45 | var m_bClient = false 46 | @JvmField 47 | var nTimestampNetworkingBase = 0 48 | @JvmField 49 | var nTimestampRandomizeWindow = 0 50 | } 51 | 52 | fun gvar_tickCount(mem: Memory): Int { 53 | return mem.getInt(0x1C) 54 | } 55 | 56 | fun gvar_intervalPerTick(mem: Memory): Float { 57 | return mem.getFloat(0x20) 58 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/Structs/input.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils.Structs 2 | 3 | import com.sun.jna.Memory 4 | import com.sun.jna.Structure 5 | import org.jire.arrowhead.Struct 6 | import rat.poison.utils.Vector 7 | 8 | //All we need baby 9 | fun memToInput(mem: Memory): Input { 10 | val Input = Input() 11 | 12 | Input.pCommands = input_pCommands(mem) 13 | Input.pVerifiedCommands = input_pVerifiedCommands(mem) 14 | 15 | return Input 16 | } 17 | 18 | class Input: Struct(), Structure.ByReference { 19 | @JvmField 20 | var bTrackIRAvailable = false 21 | @JvmField 22 | var bMouseInitialized = false 23 | @JvmField 24 | var bMouseActive = false 25 | @JvmField 26 | var bJoystickAdvancedInit = false 27 | //pKeys //0x34 28 | @JvmField 29 | var bCameraInterceptingMouse = false 30 | @JvmField 31 | var bCameraInThirdPerson = false 32 | @JvmField 33 | var bCameraMovingWithMouse = false 34 | 35 | var vecCameraOffset = Vector() 36 | 37 | @JvmField 38 | var bCameraDistanceMove = false 39 | @JvmField 40 | var nCameraOldX = 0 41 | @JvmField 42 | var nCameraOldY = 0 43 | @JvmField 44 | var nCameraX = 0 45 | @JvmField 46 | var nCameraY = 0 47 | @JvmField 48 | var bCameraIsOrthographic = false 49 | 50 | var vecPreviousViewAngles = Vector() 51 | 52 | var vecPreviousViewAnglesTilt = Vector() 53 | 54 | @JvmField 55 | var flLastForwardMove = 0f 56 | @JvmField 57 | var nClearInputState = 0 58 | @JvmField 59 | var pCommands: Int = 0 60 | @JvmField 61 | var pVerifiedCommands: Int = 0 62 | } 63 | 64 | fun input_pCommands(mem: Memory): Int { 65 | return mem.getInt(0xF4) //0xEC 66 | } 67 | 68 | fun input_pVerifiedCommands(mem: Memory): Int { 69 | return mem.getInt(0xF8) 70 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/Vector.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils 2 | 3 | data class Vector(var x: Float = 0.0F, var y: Float = 0.0F, var z: Float = 0.0F) { 4 | 5 | fun set(x: Float, y: Float, z: Float) = apply { 6 | this.x = x 7 | this.y = y 8 | this.z = z 9 | } 10 | 11 | private fun invalid() = x == 0.0F && y == 0.0F && z == 0.0F 12 | 13 | private fun valid() = !invalid() 14 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/extensions/ByteArrayExtensions.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils.extensions 2 | 3 | internal fun ByteArray.toNetVarString(): String { 4 | for (i in 0..size - 1) if (0.toByte() == this[i]) this[i] = 32 5 | return String(this).split(" ")[0].trim() 6 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/extensions/EnumExtensions.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils.extensions 2 | 3 | import com.badlogic.gdx.utils.IntMap 4 | 5 | open class EnumLookUpWithDefault(map: Map, 6 | private val defaultValue: T) { 7 | //to get rid of type casting 8 | private val valueMap: IntMap = IntMap(map.size) 9 | 10 | init { 11 | map.forEach { (k, v) -> valueMap.put(k, v) } 12 | } 13 | 14 | operator fun get(id: Int) = valueMap[id] ?: defaultValue 15 | } 16 | 17 | open class EnumLookUp(map: Map) { 18 | //to get rid of type casting 19 | private val valueMap: IntMap = IntMap(map.size) 20 | 21 | init { 22 | map.forEach { (k, v) -> valueMap.put(k, v) } 23 | } 24 | 25 | operator fun get(id: Int): T? = valueMap[id] 26 | private fun getOrDefault(id: Int, default: T): T = valueMap.get(id, default) 27 | operator fun get(id: Int, default: T) = getOrDefault(id, default) 28 | } 29 | -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/extensions/FloatExtensions.kt: -------------------------------------------------------------------------------- 1 | ////Courtesy of Mr Noad 2 | 3 | package rat.poison.utils.extensions 4 | 5 | import com.badlogic.gdx.math.MathUtils 6 | 7 | fun Float.roundNDecimals(n: Int): Float { 8 | var precision = 10f 9 | for (i in 1 until n) { 10 | precision *= 10f 11 | } 12 | return MathUtils.roundPositive(this * precision) / precision 13 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/extensions/LongExtensions.kt: -------------------------------------------------------------------------------- 1 | ////Courtesy of Mr Noad 2 | 3 | package rat.poison.utils.extensions 4 | 5 | import com.badlogic.gdx.utils.StringBuilder as LibgdxStringBuilder 6 | 7 | private const val UNITS = " kMGTPE" 8 | private const val DECIMALS = 1 9 | 10 | fun Long.humanReadableSize(stringBuilder: StringBuilder): StringBuilder { 11 | val z = (63 - java.lang.Long.numberOfLeadingZeros(this)) / 10 12 | val size = this.toFloat() / (1L shl (z * 10)) 13 | val rounded = size.roundNDecimals(DECIMALS) 14 | return stringBuilder.append(rounded).append(' ').append(UNITS[z]).append('B') 15 | } 16 | fun Long.humanReadableSize(stringBuilder: LibgdxStringBuilder): LibgdxStringBuilder { 17 | val z = (63 - java.lang.Long.numberOfLeadingZeros(this)) / 10 18 | val size = this.toFloat() / (1L shl (z * 10)) 19 | val rounded = size.roundNDecimals(DECIMALS) 20 | return stringBuilder.append(rounded).append(' ').append(UNITS[z]).append('B') 21 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/extensions/MemoryExtensions.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils.extensions 2 | 3 | import com.sun.jna.Memory 4 | 5 | fun Memory?.readable() = null != this -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/extensions/ModuleExtensions.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils.extensions 2 | 3 | import org.jire.arrowhead.Module 4 | import rat.poison.game.offsets.ModuleScan 5 | import rat.poison.game.offsets.Offset 6 | import java.nio.ByteBuffer 7 | import java.nio.ByteOrder 8 | 9 | internal operator fun Module.invoke(patternOffset: Long = 0, addressOffset: Long = 0, 10 | read: Boolean = true, subtract: Boolean = true) 11 | = ModuleScan(this, patternOffset, addressOffset, read, subtract) 12 | 13 | internal operator fun Module.invoke(patternOffset: Long = 0, addressOffset: Long = 0, 14 | read: Boolean = true, subtract: Boolean = true, className: String) 15 | = Offset(this, patternOffset, addressOffset, read, subtract, className.toByteArray(Charsets.UTF_8)) 16 | 17 | internal operator fun Module.invoke(patternOffset: Long = 0, addressOffset: Long = 0, 18 | read: Boolean = true, subtract: Boolean = true, offset: Long) 19 | = Offset(this, patternOffset, addressOffset, read, subtract, 20 | ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(offset.toInt()).array()) -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/extensions/PointExtensions.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils.extensions 2 | 3 | import com.sun.jna.platform.win32.WinDef 4 | import rat.poison.utils.natives.CUser32 5 | import java.lang.Math.sqrt 6 | 7 | fun WinDef.POINT.set(x: Int, y: Int) = apply { 8 | this.x = x 9 | this.y = y 10 | } 11 | 12 | fun WinDef.POINT.refresh() = apply { CUser32.GetCursorPos(this) } 13 | 14 | fun WinDef.POINT.distance(b: WinDef.POINT): Double { 15 | val px = (b.x - this.x).toDouble() 16 | val py = (b.y - this.y).toDouble() 17 | return sqrt(px * px + py * py) 18 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/extensions/SourceExtensions.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils.extensions 2 | 3 | import org.jire.arrowhead.Source 4 | import org.jire.arrowhead.unsign 5 | import rat.poison.scripts.toIndex 6 | 7 | fun Source.uint(address: Long, offset: Long = 0) = int(address, offset).unsign() 8 | fun Source.readIndex(address: Long) = int(address).toIndex() -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/extensions/StringBuilderExtensions.kt: -------------------------------------------------------------------------------- 1 | ////Courtesy of Mr Noad 2 | 3 | package rat.poison.utils.extensions 4 | 5 | import com.badlogic.gdx.utils.StringBuilder as LibgdxStringBuilder 6 | 7 | fun StringBuilder.appendHumanReadableSize(size: Long): StringBuilder { 8 | return size.humanReadableSize(this) 9 | } 10 | 11 | fun StringBuilder.appendSubstring( 12 | string: CharSequence, 13 | startIndex: Int, 14 | endIndex: Int = string.length - 1 15 | ): StringBuilder { 16 | for (i in startIndex..endIndex) { 17 | this.append(string[i]) 18 | } 19 | return this 20 | } 21 | 22 | fun LibgdxStringBuilder.set(o: Any): LibgdxStringBuilder { 23 | this.setLength(0) 24 | return this.append(o) 25 | } 26 | fun LibgdxStringBuilder.appendHumanReadableSize(size: Long): LibgdxStringBuilder { 27 | return size.humanReadableSize(this) 28 | } 29 | 30 | fun LibgdxStringBuilder.appendSubstring( 31 | string: CharSequence, 32 | startIndex: Int, 33 | endIndex: Int = string.length - 1 34 | ): LibgdxStringBuilder { 35 | for (i in startIndex..endIndex) { 36 | this.append(string[i]) 37 | } 38 | return this 39 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/generalUtil/VectorUtil.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils.generalUtil 2 | 3 | import com.badlogic.gdx.math.Vector3 4 | import rat.poison.utils.Angle 5 | import rat.poison.utils.Vector 6 | 7 | operator fun Vector3.minus(v: Vector3): Vector3 { 8 | x - v.x 9 | y - v.y 10 | z - v.z 11 | return this 12 | } 13 | 14 | operator fun Vector3.plus(v: Vector3): Vector3 { 15 | x + v.x 16 | y + v.y 17 | z + v.z 18 | return this 19 | } 20 | 21 | operator fun Vector3.times(f: Float): Vector3 { 22 | x * f 23 | y * f 24 | z * f 25 | return this 26 | } 27 | 28 | operator fun Vector3.divAssign(f: Float) { 29 | x /= f 30 | y /= f 31 | z /= f 32 | } 33 | 34 | fun Angle.toVector3(): Vector3 { 35 | val vec = Vector3() 36 | vec.x = x; vec.y = y; vec.z = z 37 | return vec 38 | } 39 | 40 | fun Vector3.toVector(): Vector { 41 | return Vector(x, y, z) 42 | } -------------------------------------------------------------------------------- /src/main/kotlin/rat/poison/utils/natives/CUser32.kt: -------------------------------------------------------------------------------- 1 | package rat.poison.utils.natives 2 | 3 | import com.sun.jna.Native 4 | import com.sun.jna.platform.win32.WinDef 5 | 6 | object CUser32 { 7 | init { 8 | Native.register("user32") 9 | } 10 | 11 | @JvmStatic 12 | external fun GetClientRect(hWnd: WinDef.HWND, rect: WinDef.RECT): Boolean 13 | 14 | @JvmStatic 15 | external fun GetCursorPos(p: WinDef.POINT): Int 16 | 17 | @JvmStatic 18 | external fun FindWindowA(lpClassName: String?, lpWindowName: String): WinDef.HWND 19 | 20 | @JvmStatic 21 | external fun GetForegroundWindow(): Long 22 | 23 | @JvmStatic 24 | external fun GetWindowRect(hWnd: WinDef.HWND, rect: WinDef.RECT): Boolean 25 | 26 | @JvmStatic 27 | external fun mouse_event(dwFlags: Int, dx: Int, dy: Int, dwData: Int, dwExtraInfo: Long) 28 | 29 | } -------------------------------------------------------------------------------- /src/main/resources/META-INF/services/javax.script.ScriptEngineFactory: -------------------------------------------------------------------------------- 1 | org.jetbrains.kotlin.script.jsr223.KotlinJsr223JvmLocalScriptEngineFactory 2 | -------------------------------------------------------------------------------- /version.txt: -------------------------------------------------------------------------------- 1 | 1.7.1.6 2 | master 3 | --------------------------------------------------------------------------------