Advertisement
Guest User

[PHP] Logitech G MACRO PUBG

a guest
Jan 21st, 2020
671
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 11.57 KB | None | 0 0
  1. I'm sharing with you this no-recoil script for Logitech mouse users
  2.  
  3. --  https://gsurl.be/i6sq
  4.  
  5. What's the main difference between this script and the others.
  6.  
  7. First of all, this script allows you to have your own configurations on guns, you can edit the recoil table.
  8. Second, this is a real no-recoil script not a stup*d anti-recoil script which only makes your mouse go down. This script actually has the recoil tables and you are able to change it in case of an update on gun patterns.
  9.  
  10. Before posting the script I'm going to explain how to actually use it!
  11.  
  12.  
  13. Tutorial If you already know how to install and utilize a script, scroll down to the tutorial in-game
  14. 1- Open the Logitech Software
  15. 2- On the first page make sure you select "Automatic Game Detection"
  16. 3- Now click on any of the buttons being highlighted by a fading blue color.
  17. 4- Go to where it says profiles (all the way on the top of the software), click on create a new profile (a cross)
  18. 5- In the name field, enter whatever you want idc dude.
  19. 6- You don't have to fill the description field just go to the "Games and Apps that utilizes this profile"
  20. 7- Click on the cross symbol again and bring it to ur Tslgame.exe , you can find it here( C:\Program Files (x86)\Steam\steamapps\common\PUBG\TslGame\Binaries \Win64\TslGame.exe).
  21.  
  22. 8- Select TslGame.exe click on open
  23. 9- Now it created a new profile called Whatever name you created.
  24. 10- Right click on the profile, go to scripting -> Paste the source code below inside there and just f****** save it.
  25. 11- Now follow the f*****g tutorial in-game below.
  26.  
  27.  
  28. In-Game Tutorial
  29.  
  30. 1. Assigned button number for weapon
  31.  
  32. the button number can be find in log windows, when the mouse button click, log prompt event = MOUSE_BUTTON_RELEASED, arg = X, the X is the button number.
  33. Weapon has 6 kinds, and different models of Logitech mouse function keys may be less than 6, for unnecessary weapons allocation nil value.
  34. You should always assign a button to cancel the set recoil compensation. set_off_key
  35. 2. Set the fire key and the mode switch key.
  36.  
  37. the fire key button needs to be consistent with the game settings, and in the game to cancel the left mouse button binding.
  38. When the mode switch key is pressed, recoil zoom 3-4x , easy to use quadruple mirror.
  39. By default , fire key is pause , mode switch key is capslock.
  40. **All weapons use the single-shot model, which converts the individual into a fully automated mode, including M16a1. **
  41.  
  42. 3. Ignore Key
  43.  
  44. You can set a ignore Key, and when the key is pressed, the script pauses.
  45. Limited by LGS, you can only select "lalt", "ralt", "alt" "lshift", "rshift", "shift" "lctrl", "rctrl", "ctrl" and Logitech G Key(Logitech game keyboard only)
  46. By default is "lshift"
  47.  
  48.  
  49. Recommended settings
  50.  
  51. Logitech's most gaming mice contain 5 shortcuts. The default 1 forward, 1 back, 1 zoom, a reduced dpi, a magnifying glass.
  52.  
  53. Assign a button to use ump9, so that the keys are also suitable for full accessory m416 and scar-l.
  54. Assign a button to use m16a1, m16a1 with red dot sight or holographic sight, do not need other accessories, you can play a power.
  55. Assign a button using akm, akm mode also applies to sks and mini 14.
  56. Assign a button to use a big jump.
  57. Assign a button to cancel the no-recoil.
  58.  
  59.  
  60. Disclaimer: This script was not created by me... Not created by me.... Not created by me... Not created by me (Echo) I'm just a regular guy that likes to search on google =)
  61.  
  62. Script
  63. Just copy everything from here below and paste it where it says on the first tutorial! Enjoy!
  64. (If you don't understand what the **** I wrote just tell me so I can ******* create a video for y'all)
  65. --------------------------------------------------------------------------
  66. ---------------- Basic Variable -----------------------------
  67. ---------------- Do not edit ---------------------
  68. --------------------------------------------------------------------------
  69. local current_weapon = "none"
  70.  
  71. --------------------------------------------------------------------------
  72. ---------------- Basic Setting ------------------------------
  73. --------------------------------------------------------------------------
  74.  
  75. ---- key bind ----
  76.  
  77. local uzi_key = nil
  78. local ump9_key = nil
  79. local akm_key = 7
  80. local m16a4_key = 8
  81. local m416_key = 4
  82. local scarl_key = 5
  83.  
  84. local set_off_key = 6
  85.  
  86.  
  87.  
  88. ---- fire key ----
  89.  
  90. local fire_key = "Pause"
  91. local mode_switch_key = "capslock"
  92.  
  93. ---- ignore key ----
  94. ---- can use "lalt", "ralt", "alt" "lshift", "rshift", "shift" "lctrl", "rctrl", "ctrl"
  95.  
  96. local ignore_key = "lshift"
  97.  
  98. --- Sensitivity in Game
  99. --- default is 50.0
  100.  
  101. local target_sensitivity = 50
  102. local scope_sensitivity = 50
  103. local scope4x_sensitivity = 50
  104.  
  105. ---- Obfs setting
  106. ---- Two firing time intervals = weapon_speed * interval_ratio * ( 1 + random_seed * ( 0 ~ 1))
  107. local weapon_speed_mode = false
  108. local obfs_mode = true
  109. local interval_ratio = 0.75
  110. local random_seed = 1
  111.  
  112. --------------------------------------------------------------------------
  113. ---------------- Recoil Table ------------------------------
  114. ---------------- You can fix the value here ------------------------------
  115. --------------------------------------------------------------------------
  116.  
  117. local recoil_table = {}
  118.  
  119. recoil_table["ump9"] = {
  120. basic={18.3,18.3,18.3,18.3,18.3,18.3,18.3,23,23,23 ,23,23.7,23.7,23.7,23.7,23.7,23.7,23.7,23.7,23.3,2 3.3,23.3,23.3,23.3,23.3,23.3,23.3,23.3,23.3,23.3,2 3.3,23.3,23.3,23.3,23.3,23.3,23.3,23.3,23.3,23.3},
  121. quadruple={83.3,83.3,83.3,83.3,83.3,83.3,83.3,116. 7,116.7,116.7,116.7,93.3,93.3,93.3,93.3,93.3,93.3, 93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3, 93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3, 93.3,93.3,93.3},
  122. speed = 92
  123. }
  124.  
  125. recoil_table["akm"] = {
  126. basic={23.7,23.7,23.7,23.7,23.7,23.7,23.7,23.7,23. 7,23.7,23.7,28,28,28,28,29.7,29.7,29.7,29.7,29.7,2 9.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,2 9.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7},
  127. quadruple={66.7,66.7,66.7,66.7,66.7,66.7,66.7,66.7 ,66.7,66.7,66.7,123.3,123.3,123.3,123.3,93.3,93.3, 93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3, 93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3, 93.3,93.3,93.3},
  128. speed = 100
  129. }
  130.  
  131. recoil_table["m16a4"] = {
  132. basic={25.7,25.7,25.7,25.7,25.7,25.7,46.7,46.7,46. 7,46.7,30,30,30,30,30,30,30,30,30,30,30,30,30,30,3 0,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30},
  133. quadruple={86.7,86.7,86.7,86.7,86.7,86.7,86.7,150, 150,150,150,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96. 7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96. 7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96. 7,96.7},
  134. speed = 75
  135. }
  136.  
  137. recoil_table["m416"] = {
  138. basic={26.7,26.7,26.7,26.7,26.7,26.7,37,37,37,37,3 7,31,31,31,31,31,32,32,32,35,35,35,35,35,35,35,35, 35,35,35,35,35,35,35,35,35,35,35,35,35},
  139. quadruple={86.7,86.7,86.7,86.7,86.7,86.7,86.7,150, 150,150,150,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96. 7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96. 7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96. 7,96.7},
  140. speed = 86
  141. }
  142.  
  143. recoil_table["scarl"] = {
  144. basic={22.3,22.3,22.3,22.3,22.3,22.3,22.3,29.3,29. 3,29.3,29.3,26.7,26.7,26.7,26.7,26.7,26.7,26,26,26 ,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,2 6,26,26,26},
  145. quadruple={86.7,86.7,86.7,86.7,86.7,86.7,86.7,150, 150,150,150,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96. 7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96. 7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96. 7,96.7},
  146. speed = 96
  147. }
  148.  
  149. recoil_table["uzi"] = {
  150. basic={18.3,18.3,18.3,18.3,18.3,18.3,18.3,23,23,23 ,23,23.7,23.7,23.7,23.7,23.7,23.7,23.7,23.7,23.3,2 3.3,23.3,23.3,23.3,23.3,23.3,23.3,23.3,23.3,23.3,2 3.3,23.3,23.3,23.3,23.3,23.3,23.3,23.3,23.3,23.3},
  151. quadruple={13.3,13.3,13.3,13.3,13.3,21.7,21.7,21.7 ,21.7,21.7,46.7,46.7,46.7,46.7,46.7,46.7,46.7,46.7 ,46.7,46.7,46.7,46.7,46.7,46.7,46.7,46.7,46.7,46.7 ,46.7,46.7,46.7,46.7,46.7,46.7,46.7,46.7,46.7,46.7 ,46.7,46.7},
  152. speed = 48
  153. }
  154.  
  155. recoil_table["none"] = {
  156. basic={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  157. quadruple={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  158. speed = 60
  159. }
  160.  
  161.  
  162. --------------------------------------------------------------------------
  163. ---------------- Function ------------------------------
  164. --------------------------------------------------------------------------
  165.  
  166.  
  167. function convert_sens(unconvertedSens)
  168. return 0.002 * math.pow(10, unconvertedSens / 50)
  169. end
  170.  
  171. function calc_sens_scale(sensitivity)
  172. return convert_sens(sensitivity)/convert_sens(50)
  173. end
  174.  
  175. local target_scale = calc_sens_scale(target_sensitivity)
  176. local scope_scale = calc_sens_scale(scope_sensitivity)
  177. local scope4x_scale = calc_sens_scale(scope4x_sensitivity)
  178.  
  179. function recoil_mode()
  180. if IsKeyLockOn(mode_switch_key) then
  181. return "quadruple";
  182. else
  183. return "basic";
  184. end
  185. end
  186.  
  187.  
  188. function recoil_value(_weapon,_duration)
  189. local _mode = recoil_mode()
  190. local step = (math.floor(_duration/100)) + 1
  191. if step > 40 then
  192. step = 40
  193. end
  194. local weapon_recoil = recoil_table[_weapon][_mode][step]
  195. -- OutputLogMessage("weapon_recoil = %s\n", weapon_recoil)
  196.  
  197. local weapon_speed = 30
  198. if weapon_speed_mode then
  199. weapon_speed = recoil_table[_weapon]["speed"]
  200. end
  201. -- OutputLogMessage("weapon_speed = %s\n", weapon_speed)
  202.  
  203. local weapon_intervals = weapon_speed
  204. if obfs_mode then
  205.  
  206. local coefficient = interval_ratio * ( 1 + random_seed * math.random())
  207. weapon_intervals = math.floor(coefficient * weapon_speed)
  208. end
  209. -- OutputLogMessage("weapon_intervals = %s\n", weapon_intervals)
  210.  
  211. recoil_recovery = weapon_recoil * weapon_intervals / 100
  212.  
  213. -- issues/3
  214. if IsMouseButtonPressed(2) then
  215. recoil_recovery = recoil_recovery / target_scale
  216. elseif recoil_mode() == "basic" then
  217. recoil_recovery = recoil_recovery / scope_scale
  218. elseif recoil_mode() == "quadruple" then
  219. recoil_recovery= recoil_recovery / scope4x_scale
  220. end
  221.  
  222. return weapon_intervals,recoil_recovery
  223. end
  224.  
  225.  
  226. --------------------------------------------------------------------------
  227. ---------------- OnEvent ------------------------------
  228. --------------------------------------------------------------------------
  229.  
  230.  
  231. function OnEvent(event, arg)
  232. OutputLogMessage("event = %s, arg = %d\n", event, arg)
  233. if (event == "PROFILE_ACTIVATED") then
  234. EnablePrimaryMouseButtonEvents(true)
  235. elseif event == "PROFILE_DEACTIVATED" then
  236. current_weapon = "none"
  237. shoot_duration = 0.0
  238. ReleaseKey(fire_key)
  239. ReleaseMouseButton(1)
  240. end
  241.  
  242. if (event == "MOUSE_BUTTON_PRESSED" and arg == set_off_key) then
  243. current_weapon = "none"
  244. elseif (event == "MOUSE_BUTTON_PRESSED" and arg == akm_key) then
  245. current_weapon = "akm"
  246. elseif (event == "MOUSE_BUTTON_PRESSED" and arg == m16a4_key) then
  247. current_weapon = "m16a4"
  248. elseif (event == "MOUSE_BUTTON_PRESSED" and arg == m416_key) then
  249. current_weapon = "m416"
  250. elseif (event == "MOUSE_BUTTON_PRESSED" and arg == ump9_key) then
  251. current_weapon = "ump9"
  252. elseif (event == "MOUSE_BUTTON_PRESSED" and arg == uzi_key) then
  253. current_weapon = "uzi"
  254. elseif (event == "MOUSE_BUTTON_PRESSED" and arg == scarl_key) then
  255. current_weapon = "scarl"
  256. elseif (event == "MOUSE_BUTTON_PRESSED" and arg == 1) then
  257. -- button 1 : Shoot
  258. if ((current_weapon == "none") or IsModifierPressed(ignore_key)) then
  259. PressKey(fire_key)
  260. repeat
  261. Sleep(30)
  262. until not IsMouseButtonPressed(1)
  263. ReleaseKey(fire_key)
  264. else
  265. local shoot_duration = 0.0
  266. repeat
  267. local intervals,recovery = recoil_value(current_weapon,shoot_duration)
  268. PressAndReleaseKey(fire_key)
  269. MoveMouseRelative(0, recovery )
  270. Sleep(intervals)
  271. shoot_duration = shoot_duration + intervals
  272. until not IsMouseButtonPressed(1)
  273. end
  274. elseif (event == "MOUSE_BUTTON_RELEASED" and arg == 1) then
  275. ReleaseKey(fire_key)
  276. end
  277.  
  278. end
  279.  
  280. https://www.mpgh.net/forum/showthread.php?t=1322543&s=8316bb7f5c371fde9de00573d00564a3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement