Page 1 of 12 12311 ... LastLast
Results 1 to 15 of 176
  1. #1
    talha10com's Avatar
    Join Date
    Jan 2017
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    7

    Fast Loot(Lctrl) + PUBG Macro and 4x Macro - 15.05.2018 (Logitech Mouse and Keyboard)

    AT YOUR OWN RISK

    * logitech gaming software never triggered any banwaves in the past, but this doesn't mean there won't be any banwaves in the future.

    How To Use

    * download and install logitech gaming software[LGS]
    * https://support.logitech.com/software/lgs

    [IMG]https://******.com/liantian-cn/logitech-pubg/raw/master/img/20171014103649.png[/IMG]

    * copy and paste "CODE"
    * Ctrl + S to save.



    1. Assign buttons to weapon

    * you can get the button numbers from logitech log window. When you click a mouse button, the log will prompt event = MOUSE_BUTTON_RELEASED, arg = X, X is the button number.
    * there are 6 weapon types. if you have a logitech mouse with less than 6 buttons, map unused buttons/weapons to nil.
    * You should always assign a button to cancel the recoil macro. set_off_key

    Set the fire key and the mode switch key.

    * unset the Fire binding in game from your mouse left button, and set it to Pause key. This needs to be consistent between the script and the game setting.
    * When the mode switch key is pressed, recoil is magnified by 3-4x, consistent with 4x scope mode.
    * By default in the script , fire key is pause , mode switch key is capslock.



    3. Ignore Key
    * You can set a ignore Key, and when the key is pressed, the script pauses.
    * Limited by LGS, you can only select "lalt", "ralt", "alt" "lshift", "rshift", "shift" "lctrl", "rctrl", "ctrl" and Logitech G Key(Logitech game keyboard only)
    * By default the ignore key is "lalt"

    4. Sensitivity Setting
    * If you modify the mouse sensitivity settings in the game menu, you need to modify the settings in script.
    Mouse dpi does not affect the script. this is built into Logitech driver functionality.



    [IMG]https://******.com/liantian-cn/logitech-pubg/raw/master/img/20171014153403.png[/IMG]

    Set it to your own, it's simple to use after spending some time.


    Code:
     --------------------------------------------------------------------------
     ----------------        Basic Variable       -----------------------------
     ----------------         Do not edit                 ---------------------
     --------------------------------------------------------------------------
     local current_weapon = "none"
     
     --------------------------------------------------------------------------
     ----------------        Basic Setting       ------------------------------
     --------------------------------------------------------------------------
     
     ---- key bind ----
     
     local ump9_key = nil
     local akm_key = nil
     local m16a4_key = nil
     local m416_key = nil
     local scarl_key = nil
     local uzi_key = nil
     local set_off_key = 5
     
     ---- keyboard ---- Only Support logitech G Keyboard
     
     local ump9_gkey = 2  ---1 is use F1.
     local akm_gkey = 3
     local m16a4_gkey = 4
     local m416_gkey = 5
     local scarl_gkey = 6
     local uzi_gkey = 1
     local set_off_gkey = nil
     
     ---- fire key ----
     
     local fire_key = "F7"
     
     ---- can use "lalt", "ralt", "alt"  "lshift", "rshift", "shift"  "lctrl", "rctrl", "ctrl"
     
     local ignore_key = "lalt" --- ignore key
     local hold_breath_key = "lshift"
     
     ---- only can use "numlock", "capslock", "scrolllock"
     
     local full_mode_key = "numlock"   ---numlock lamp on,recoil is full_mode.
     local mode_switch_key = "capslock" 
     local lighton_key = "scrolllock"  ---start script,scrolllock lamp will be on.close script ,scrolllock lamp will be off.
     
     --- fastloot setting---
     --- Press fast_loot_key and click Left mouse button ---
     
     local fastloot = true ---if you don't need it, you can close it by true to false.
     local fast_loot_key = "lctrl" 
     local move = 40 ----1920*1080
     
     --- Your Sensitivity in Game 
     
     local vertical_sensitivity = 0.7 --- default is 0.7
     local target_sensitivity = 29 --- default is 50.0
     local scope_sensitivity = 29 --- default is 50.0
     local scope4x_sensitivity = 35 --- default is 50.0
     
     ---- function ----
     -- if auto_mode = true ,the guns need to switch automatic shooting mode,except m16 single.
     
     local auto_mode = true
     
     -- you can close these by true to false
     
     local hold_breath_mode = true
     local full_mode = true
     
     ---- Obfs setting
     ---- Two firing time intervals = weapon_speed * interval_ratio * ( 1 + random_seed * ( 0 ~ 1))
     local weapon_speed_mode = false
     -- local obfs_mode = false
     local obfs_mode = false
     local interval_ratio = 0.75
     local random_seed = 1
     
     --------------------------------------------------------------------------
     ----------------        Recoil Table        ------------------------------
     ---------------- You can fix the value here ------------------------------
     --------------------------------------------------------------------------
     --- recoil times
     --- if the Recoil compensation is Large or small,You can modify the value of all_recoil_Times or recoil_table{times}
     local all_recoil_times = 1
     
     local recoil_table = {}
     
     recoil_table["ump9"] = {
         basic={28,30,30,30,37,30,31,36,37,37,37,40,40,39,39,41,41,42,44,42,43,40,41,44,40,40,41,42,43},
         basictimes = 0.963,
     	
         full={28,30,30,30,37,30,31,36,37,37,37,40,40,39,39,41,41,42,44,42,43,40,41,44,40,40,41,42,43},
         fulltimes = 0.75,
     	
         holdbreathtimes = 1.25,
     	
         quadruple={28,30,30,30,37,30,31,36,37,37,37,40,40,39,39,41,41,42,44,42,43,40,41,44,40,40,41,42,43},
         quadrupletimes = 4*0.963,
     	
         fullof4x={28,30,30,30,37,30,31,36,37,37,37,40,40,39,39,41,41,42,44,42,43,40,41,44,40,40,41,42,43},
         fullof4xtimes = 3.41*0.75,
     	
         speed = 90,
     }
     
     recoil_table["akm"] = {
         basic={56,40,38,44,48,55,56,61,65,65,67,68,67,71,74,70,65,66,72,74,72,71,70,70,70,72,74,76,72},
         basictimes = 0.9,
     	
         full={56,40,38,44,48,55,56,61,65,65,67,68,67,71,74,70,65,66,72,74,72,71,70,70,70,72,74,76,72},
         fulltimes = 0.9*0.75,
     	
         holdbreathtimes = 1.25,
     	
         quadruple={56,40,38,44,48,55,56,61,65,65,67,68,67,71,74,70,65,66,72,74,72,71,70,70,70,72,74,76,72},
         quadrupletimes = 4*0.9*0.99,
     	
         fullof4x={56,40,38,44,48,55,56,61,65,65,67,68,67,71,74,70,65,66,72,74,72,71,70,70,70,72,74,76,72},
         fullof4xtimes = 4*0.9*0.99*0.75,
     	
         speed = 100,
     }
     
     
     recoil_table["m16a4"] = {
         basic={48,38,40,37,50,58,66,58,64,62,69,60,61,61,65,63,63,64,66,60},
         basictimes = 1.1,
     		
         full={48,38,40,37,50,58,66,58,64,62,69,60,61,61,65,63,63,64,66,60},
         fulltimes = 1.1*0.75,
     	
         holdbreathtimes = 1.25,
     	
         quadruple={48,38,40,37,50,58,66,58,64,62,69,60,61,61,65,63,63,64,66,60},
         quadrupletimes = 1.1*4,
     	
         fullof4x={48,38,40,37,50,58,66,58,64,62,69,60,61,61,65,63,63,64,66,60},
         fullof4xtimes = 4*1.1*0.75,
     
         speed = 80,
     }
     
     recoil_table["m416"] = {
         basic={49,37,38,39,43,46,47,47,48,49,50,49,55,56,58,60},
         basictimes = 1.05,
     	
         full={49,37,38,39,43,46,47,47,48,49,50,49,55,56,58,60},
         fulltimes = 1.05*0.75,
     	
         holdbreathtimes = 1.25,
     	
         quadruple={49,37,38,39,43,46,47,47,48,49,50,49,55,56,58,60},
         quadrupletimes = 4*1.05,
     	
         fullof4x={49,37,38,39,43,46,47,47,48,49,50,49,55,56,58,60},
         fullof4xtimes = 4*1.05*0.75,
     	
         speed = 90,
     }
     
     recoil_table["scarl"] = {
         basic={40,28,35,44,44,45,46,46,46,48,49,45,44,44,51,55},
         basictimes = 0.89,
     
         full={40,28,35,44,44,45,46,46,46,48,49,45,44,44,51,55},
         fulltimes = 0.89*0.75,
     	
         holdbreathtimes = 1.25,
     	
         quadruple={40,28,35,44,44,45,46,46,46,48,49,45,44,44,51,55},
         quadrupletimes = 4*0.89,
     	
         fullof4x={40,28,35,44,44,45,46,46,46,48,49,45,44,44,51,55},
         fullof4xtimes = 4*0.89*0.75,
     	
         speed = 100,
     }
     
     recoil_table["uzi"] = {
         basic={18,18,18,19,19,21,24,24,30,26,30,30,34,34,38},
         basictimes = 1.7,
     	
         full={18,18,18,19,19,21,24,24,30,26,30,30,34,34,38},
         fulltimes = 1.7*0.75,
     	
         holdbreathtimes = 1.25,
     	
         quadruple={18,18,18,19,19,21,24,24,30,26,30,30,34,34,38},
         quadrupletimes = 1.7,
     	
         fullof4x={18,18,18,19,19,21,24,24,30,26,30,30,34,34,38},
         fullof4xtimes = 1.7*0.75,
     
         speed = 48,
     }
     
     recoil_table["none"] = {
         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},
         basictimes = 1,
     	
         full={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},
         fulltimes = 1,
     	
         holdbreathtimes = 1,
     	
         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},
         quadrupletimes = 1,
     	
         fullof4x={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},
         fullof4xtimes = 1,
     	
         speed = 60,
     }
     
     
     --------------------------------------------------------------------------
     ----------------          Function          ------------------------------
     --------------------------------------------------------------------------
     
     
     function convert_sens(unconvertedSens) 
         return 0.002 * math.pow(10, unconvertedSens / 50)
     end
     
     function calc_sens_scale(sensitivity)
         return convert_sens(sensitivity)/convert_sens(50)
     end
     
     function light_on()
         if not IsKeyLockOn(lighton_key) then
         PressAndReleaseKey(lighton_key)
         end
     end
     
     function light_off()
         if IsKeyLockOn(lighton_key) then
         PressAndReleaseKey(lighton_key)
         end
     end
     
     local target_scale = calc_sens_scale(target_sensitivity)
     local scope_scale = calc_sens_scale(scope_sensitivity)
     local scope4x_scale = calc_sens_scale(scope4x_sensitivity)
     
     function recoil_mode()
         if not IsKeyLockOn(mode_switch_key) then
             if IsKeyLockOn(full_mode_key) and full_mode then
     	       return "full";
     		   else
     		   return "basic";
             end
         end	
     	
         if IsKeyLockOn(mode_switch_key) then
             if IsKeyLockOn(full_mode_key) and full_mode then
     		   return "fullof4x"
     		   else
     		   return "quadruple"
             end 
         end		
     end
     		   
     function recoil_value(_weapon,_duration)
         local _mode = recoil_mode()
         local step = (math.floor(_duration/100)) + 1
         if step > #recoil_table[_weapon][_mode] then
             step = #recoil_table[_weapon][_mode]
         end
     	
         local weapon_recoil = recoil_table[_weapon][_mode][step]
         -- OutputLogMessage("weapon_recoil = %s\n", weapon_recoil)
         
         local weapon_speed = 30
         if weapon_speed_mode then
             weapon_speed = recoil_table[_weapon]["speed"]
         end
         -- OutputLogMessage("weapon_speed = %s\n", weapon_speed)
     
         local weapon_basictimes = recoil_table[_weapon]["basictimes"]
         local weapon_fulltimes = recoil_table[_weapon]["fulltimes"]
         local weapon_quadrupletimes = recoil_table[_weapon]["quadrupletimes"]
         local weapon_fullof4xtimes = recoil_table[_weapon]["fullof4xtimes"]
         local weapon_holdbreathtimes = recoil_table[_weapon]["holdbreathtimes"]
         local weapon_intervals = weapon_speed    
     	
         if obfs_mode then
             local coefficient = interval_ratio * ( 1 + random_seed * math.random())
             weapon_intervals = math.floor(coefficient  * weapon_speed) 
         end
         -- OutputLogMessage("weapon_intervals = %s\n", weapon_intervals)
     
         recoil_recovery = weapon_recoil * weapon_intervals / 100 
         recoil_times = all_recoil_times * 0.7 / vertical_sensitivity 
     
         if recoil_mode() == "basic" then
         recoil_recovery = recoil_recovery * recoil_times * weapon_basictimes
         end
         if recoil_mode() == "basic" and hold_breath_mode and IsModifierPressed(hold_breath_key) then
         recoil_recovery = recoil_recovery * weapon_holdbreathtimes * recoil_times * weapon_basictimes
         end
     
         if recoil_mode() == "full" then
         recoil_recovery = recoil_recovery * recoil_times * weapon_fulltimes
         end
         if recoil_mode() == "full" and hold_breath_mode and IsModifierPressed(hold_breath_key) then
         recoil_recovery = recoil_recovery * weapon_holdbreathtimes * recoil_times * weapon_fulltimes
         end
     
         if recoil_mode() == "quadruple" then
         recoil_recovery = recoil_recovery * recoil_times * weapon_quadrupletimes
         end
     	
         if recoil_mode() == "fullof4x" then
         recoil_recovery = recoil_recovery * recoil_times * weapon_fullof4xtimes
         end
         
         -- issues/3
         if IsMouseButtonPressed(2) then
             recoil_recovery = recoil_recovery / target_scale
         elseif recoil_mode() == "basic" then
             recoil_recovery = recoil_recovery / scope_scale
         elseif recoil_mode() == "full" then
             recoil_recovery = recoil_recovery / scope_scale
         elseif recoil_mode() == "quadruple" then
             recoil_recovery = recoil_recovery / scope4x_scale
         elseif recoil_mode() == "fullof4x" then
             recoil_recovery = recoil_recovery / scope4x_scale
         end
     
         return weapon_intervals,recoil_recovery
     end
     
     
     --------------------------------------------------------------------------
     ----------------          OnEvent          ------------------------------
     --------------------------------------------------------------------------
     
     
     function OnEvent(event, arg)
         OutputLogMessage("event = %s, arg = %d\n", event, arg)
         if (event == "PROFILE_ACTIVATED") then
             EnablePrimaryMouseButtonEvents(true)
         elseif event == "PROFILE_DEACTIVATED" then
             current_weapon = "none"
             shoot_duration = 0.0
             ReleaseKey(fire_key)
             ReleaseMouseButton(1)
         end
     
         if (event == "MOUSE_BUTTON_PRESSED" and arg == set_off_key) 
         or (event == "G_PRESSED" and arg == set_off_gkey) then
             current_weapon = "none" light_off()
         elseif (event == "MOUSE_BUTTON_PRESSED" and arg == akm_key)
         or (event == "G_PRESSED" and arg == akm_gkey) then
             current_weapon = "akm" light_on()
         elseif (event == "MOUSE_BUTTON_PRESSED" and arg == m16a4_key)
         or (event == "G_PRESSED" and arg == m16a4_gkey) then
             current_weapon = "m16a4" light_on()
         elseif (event == "MOUSE_BUTTON_PRESSED" and arg == m416_key)
         or (event == "G_PRESSED" and arg == m416_gkey) then
             current_weapon = "m416" light_on()
         elseif (event == "MOUSE_BUTTON_PRESSED" and arg == ump9_key)
         or (event == "G_PRESSED" and arg == ump9_gkey) then
             current_weapon = "ump9" light_on()
         elseif (event == "MOUSE_BUTTON_PRESSED" and arg == uzi_key)
         or (event == "G_PRESSED" and arg == uzi_gkey) then
             current_weapon = "uzi" light_on()
         elseif (event == "MOUSE_BUTTON_PRESSED" and arg == scarl_key)
         or (event == "G_PRESSED" and arg == scarl_gkey) then
             current_weapon = "scarl" light_on()
         elseif (event == "MOUSE_BUTTON_PRESSED" and arg == 1) then
             -- button 1 : Shoot
             if ((current_weapon == "none") or IsModifierPressed(ignore_key)) then
                 PressKey(fire_key)
                 repeat
                     Sleep(30)
                 until not IsMouseButtonPressed(1)
                 ReleaseKey(fire_key)
             elseif((current_weapon == "m16a4") and not IsModifierPressed(ignore_key)) then
                 local shoot_duration = 0.0
                 repeat
                     local intervals,recovery = recoil_value(current_weapon,shoot_duration)
                     PressAndReleaseKey(fire_key)
                     MoveMouseRelative(0, recovery )
                     Sleep(intervals)
                     shoot_duration = shoot_duration + intervals
                 until not IsMouseButtonPressed(1)
             else
                 if auto_mode then
                     PressKey(fire_key)
                     local shoot_duration = 0.0
                     repeat
                     local intervals,recovery = recoil_value(current_weapon,shoot_duration)
                     MoveMouseRelative(0, recovery )
                     Sleep(intervals)
                     shoot_duration = shoot_duration + intervals
                     until not IsMouseButtonPressed(1)
                 else
                     local shoot_duration = 0.0
                     repeat
                     local intervals,recovery = recoil_value(current_weapon,shoot_duration)
                     PressAndReleaseKey(fire_key)
                     MoveMouseRelative(0, recovery )
                     Sleep(intervals)
                     shoot_duration = shoot_duration + intervals
                     until not IsMouseButtonPressed(1)
                 end
             end
         elseif (event == "MOUSE_BUTTON_RELEASED" and arg == 1) then
             ReleaseKey(fire_key)
         end    
         while (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and IsModifierPressed(fast_loot_key) and fastloot) do
             Sleep(10)
             PressMouseButton(1)
             Sleep(10)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             Sleep(2)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             Sleep(2)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             Sleep(2)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             Sleep(2)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             Sleep(10)
             ReleaseMouseButton(1)
             Sleep(10)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             Sleep(2)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             Sleep(2)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             Sleep(2)
             MoveMouseRelative(-move, 0)
             Sleep(2)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             Sleep(10)            
             if not IsModifierPressed(fast_loot_key) then
             break
             end
         end
     end

  2. The Following 5 Users Say Thank You to talha10com For This Useful Post:

    AHITMAN (05-16-2018),daylul (06-26-2018),haxor888 (07-08-2018),longtam6 (10-07-2018),luh3o (05-29-2018)

  3. #2
    T-800's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Location
    Romania
    Posts
    17,076
    Reputation
    1688
    Thanks
    84,838
    //Approved

    "Never stop being a good person because of bad people"


    Super User -> 15-7-2020
    Global Moderator -> 23-3-2019 - 15-7-2020
    Steam Moderator -> 12-12-2017 - 23-3-2019
    Steam Minion+ -> 09-04-2017 - 12-12-2017
    Steam Minion -> 03-01-2017 - 09-04-2017


  4. #3
    daiduong's Avatar
    Join Date
    Sep 2017
    Gender
    female
    Posts
    6
    Reputation
    10
    Thanks
    0

  5. #4
    Mikejingbo's Avatar
    Join Date
    Mar 2018
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by daiduong View Post
    Agreed that the source should be posted.
    BTW,they have chinese version,nice work~
    中文好评

  6. #5
    Santor's Avatar
    Join Date
    Jan 2018
    Gender
    male
    Posts
    16
    Reputation
    10
    Thanks
    1
    My Mood
    Dead
    didnt workkk

  7. #6
    crazy_zx's Avatar
    Join Date
    Mar 2018
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    how to get the recoil data? they update the game 3 times every day .can you tell us how to get the recoil data,that we can edit the macro our self, thank you.

  8. #7
    talha10com's Avatar
    Join Date
    Jan 2017
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    7
    Quote Originally Posted by crazy_zx View Post
    how to get the recoil data? they update the game 3 times every day .can you tell us how to get the recoil data,that we can edit the macro our self, thank you.
    updates every day have no effect on guns. we share current codes when we get updated for weapons. "quadrupletimes = 4*0.963 or fullof4xtimes = 3.41*0.75" can be beautified by playing small. However, it currently works smoothly including 4x. Activate full mode if accessory is available.

  9. #8
    PureHateQT's Avatar
    Join Date
    Jan 2018
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    short question if I have my ingame settings on ads targing and x4 to 35, then I have to adjust the line 55-58?

  10. #9
    Santor's Avatar
    Join Date
    Jan 2018
    Gender
    male
    Posts
    16
    Reputation
    10
    Thanks
    1
    My Mood
    Dead
    Quote Originally Posted by talha10com View Post
    updates every day have no effect on guns. we share current codes when we get updated for weapons. "quadrupletimes = 4*0.963 or fullof4xtimes = 3.41*0.75" can be beautified by playing small. However, it currently works smoothly including 4x. Activate full mode if accessory is available.
    really ??? i must decrease the sensitivity in my script to make it work near perfect
    Or there is any effect from mouse DPI or screen resolution??
    Last edited by Santor; 05-19-2018 at 12:42 AM.

  11. #10
    talha10com's Avatar
    Join Date
    Jan 2017
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    7
    Quote Originally Posted by Santor View Post
    really ??? i must decrease the sensitivity in my script to make it work near perfect
    Or there is any effect from mouse DPI or screen resolution??
    no, it's not.
    change your binoculars settings from code. I'm using 29

    - - - Updated - - -

    Quote Originally Posted by PureHateQT View Post
    short question if I have my ingame settings on ads targing and x4 to 35, then I have to adjust the line 55-58?
    fullof4xtimes = edit this section, but in general is running smoothly now using full mode (Num Lock) test.

  12. #11
    Rex1337's Avatar
    Join Date
    Feb 2018
    Gender
    male
    Posts
    288
    Reputation
    36
    Thanks
    19
    My Mood
    Inspired
    very helpful, thanks

  13. #12
    Santor's Avatar
    Join Date
    Jan 2018
    Gender
    male
    Posts
    16
    Reputation
    10
    Thanks
    1
    My Mood
    Dead
    Quote Originally Posted by talha10com View Post
    no, it's not.
    change your binoculars settings from code. I'm using 29

    - - - Updated - - -



    fullof4xtimes = edit this section, but in general is running smoothly now using full mode (Num Lock) test.
    this section???
    local vertical_sensitivity = 0.7 --- default is 0.7
    local target_sensitivity = 29 --- default is 50.0
    local scope_sensitivity = 29 --- default is 50.0
    local scope4x_sensitivity = 35 --- default is 50.0

  14. #13
    talha10com's Avatar
    Join Date
    Jan 2017
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    7
    Quote Originally Posted by Santor View Post
    this section???
    local vertical_sensitivity = 0.7 --- default is 0.7
    local target_sensitivity = 29 --- default is 50.0
    local scope_sensitivity = 29 --- default is 50.0
    local scope4x_sensitivity = 35 --- default is 50.0

  15. #14
    Santor's Avatar
    Join Date
    Jan 2018
    Gender
    male
    Posts
    16
    Reputation
    10
    Thanks
    1
    My Mood
    Dead
    Quote Originally Posted by talha10com View Post
    and then i must push numlock for full mode??

  16. #15
    talha10com's Avatar
    Join Date
    Jan 2017
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    7
    Quote Originally Posted by Santor View Post
    and then i must push numlock for full mode??
    if there's an accessory in the gun, Yes.

    COMPANSETOR + VERTICAL GRIP ( NUM LOCK ON! )

    - - - Updated - - -

    FİX UMP9 - AKM - M16A4

    20.05.2018

    Code:
    --------------------------------------------------------------------------
     ----------------        Basic Variable       -----------------------------
     ----------------         Do not edit                 ---------------------
     --------------------------------------------------------------------------
     local current_weapon = "none"
     
     --------------------------------------------------------------------------
     ----------------        Basic Setting       ------------------------------
     --------------------------------------------------------------------------
     
     ---- key bind ----
     
     local ump9_key = nil
     local akm_key = nil
     local m16a4_key = nil
     local m416_key = nil
     local scarl_key = nil
     local uzi_key = nil
     local set_off_key = 5
     
     ---- keyboard ---- Only Support logitech G Keyboard
     
     local ump9_gkey = 2  ---1 is use F1.
     local akm_gkey = 3
     local m16a4_gkey = 4
     local m416_gkey = 5
     local scarl_gkey = 6
     local uzi_gkey = 1
     local set_off_gkey = nil
     
     ---- fire key ----
     
     local fire_key = "F7"
     
     ---- can use "lalt", "ralt", "alt"  "lshift", "rshift", "shift"  "lctrl", "rctrl", "ctrl"
     
     local ignore_key = "lalt" --- ignore key
     local hold_breath_key = "lshift"
     
     ---- only can use "numlock", "capslock", "scrolllock"
     
     local full_mode_key = "numlock"   ---numlock lamp on,recoil is full_mode.
     local mode_switch_key = "capslock" 
     local lighton_key = "scrolllock"  ---start script,scrolllock lamp will be on.close script ,scrolllock lamp will be off.
     
     --- fastloot setting---
     --- Press fast_loot_key and click Left mouse button ---
     
     local fastloot = true ---if you don't need it, you can close it by true to false.
     local fast_loot_key = "lctrl" 
     local move = 40 ----1920*1080
     
     --- Your Sensitivity in Game 
     
     local vertical_sensitivity = 0.7 --- default is 0.7
     local target_sensitivity = 29 --- default is 50.0
     local scope_sensitivity = 29 --- default is 50.0
     local scope4x_sensitivity = 35 --- default is 50.0
     
     ---- function ----
     -- if auto_mode = true ,the guns need to switch automatic shooting mode,except m16 single.
     
     local auto_mode = true
     
     -- you can close these by true to false
     
     local hold_breath_mode = true
     local full_mode = true
     
     ---- Obfs setting
     ---- Two firing time intervals = weapon_speed * interval_ratio * ( 1 + random_seed * ( 0 ~ 1))
     local weapon_speed_mode = false
     -- local obfs_mode = false
     local obfs_mode = false
     local interval_ratio = 0.75
     local random_seed = 1
     
     --------------------------------------------------------------------------
     ----------------        Recoil Table        ------------------------------
     ---------------- You can fix the value here ------------------------------
     --------------------------------------------------------------------------
     --- recoil times
     --- if the Recoil compensation is Large or small,You can modify the value of all_recoil_Times or recoil_table{times}
     local all_recoil_times = 1
     
     local recoil_table = {}
     
     recoil_table["ump9"] = {
         basic={28,30,30,30,37,30,31,36,37,37,37,40,40,39,39,41,41,42,44,42,43,40,41,44,40,40,41,42,43},
         basictimes = 0.963,
     	
         full={28,30,30,30,37,30,31,36,37,37,37,40,40,39,39,41,41,42,44,42,43,40,41,44,40,40,41,42,43},
         fulltimes = 0.963*0.75,
     	
         holdbreathtimes = 1.25,
     	
         quadruple={28,30,30,30,37,30,31,36,37,37,37,40,40,39,39,41,41,42,44,42,43,40,41,44,40,40,41,42,43},
         quadrupletimes = 4*0.963,
     	
         fullof4x={28,30,30,30,37,30,31,36,37,37,37,40,40,39,39,41,41,42,44,42,43,40,41,44,40,40,41,42,43},
         fullof4xtimes = 4*0.963*0.75,
     	
         speed = 90,
     }
     
     recoil_table["akm"] = {
         basic={56,40,38,44,48,55,56,61,65,65,67,68,67,71,74,70,65,66,72,74,72,71,70,70,70,72,74,76,72},
         basictimes = 0.96,
     	
         full={56,40,38,44,48,55,56,61,65,65,67,68,67,71,74,70,65,66,72,74,72,71,70,70,70,72,74,76,72},
         fulltimes = 0.96*0.75,
     	
         holdbreathtimes = 1.25,
     	
         quadruple={56,40,38,44,48,55,56,61,65,65,67,68,67,71,74,70,65,66,72,74,72,71,70,70,70,72,74,76,72},
         quadrupletimes = 4*0.96*0.99,
     	
         fullof4x={56,40,38,44,48,55,56,61,65,65,67,68,67,71,74,70,65,66,72,74,72,71,70,70,70,72,74,76,72},
         fullof4xtimes = 4*0.96*0.99*0.75,
     	
         speed = 100,
     }
     
     
     recoil_table["m16a4"] = {
         basic={47,35,38,44,58,61,70,67,73,74,72,69,72,71,72,70,72,70,69,71},
         basictimes = 1.15,
     		
         full={47,35,38,44,58,61,70,67,73,74,72,69,72,71,72,70,72,70,69,71},
         fulltimes = 1.15*0.75,
     	
         holdbreathtimes = 1.25,
     	
         quadruple={47,35,38,44,58,61,70,67,73,74,72,69,72,71,72,70,72,70,69,71},
         quadrupletimes = 1.15*4,
     	
         fullof4x={47,35,38,44,58,61,70,67,73,74,72,69,72,71,72,70,72,70,69,71},
         fullof4xtimes = 4*1.15*0.75,
     
         speed = 80,
     }
     
     recoil_table["m416"] = {
         basic={49,37,38,39,43,46,47,47,48,49,50,49,55,56,58,60},
         basictimes = 1.05,
     	
         full={49,37,38,39,43,46,47,47,48,49,50,49,55,56,58,60},
         fulltimes = 1.05*0.75,
     	
         holdbreathtimes = 1.25,
     	
         quadruple={49,37,38,39,43,46,47,47,48,49,50,49,55,56,58,60},
         quadrupletimes = 4*1.05,
     	
         fullof4x={49,37,38,39,43,46,47,47,48,49,50,49,55,56,58,60},
         fullof4xtimes = 4*1.05*0.75,
     	
         speed = 90,
     }
     
     recoil_table["scarl"] = {
         basic={40,28,35,44,44,45,46,46,46,48,49,45,44,44,51,55},
         basictimes = 0.89,
     
         full={40,28,35,44,44,45,46,46,46,48,49,45,44,44,51,55},
         fulltimes = 0.89*0.75,
     	
         holdbreathtimes = 1.25,
     	
         quadruple={40,28,35,44,44,45,46,46,46,48,49,45,44,44,51,55},
         quadrupletimes = 4*0.89,
     	
         fullof4x={40,28,35,44,44,45,46,46,46,48,49,45,44,44,51,55},
         fullof4xtimes = 4*0.89*0.75,
     	
         speed = 100,
     }
     
     recoil_table["uzi"] = {
         basic={18,18,18,19,19,21,24,24,30,26,30,30,34,34,38},
         basictimes = 1.7,
     	
         full={18,18,18,19,19,21,24,24,30,26,30,30,34,34,38},
         fulltimes = 1.7*0.75,
     	
         holdbreathtimes = 1.25,
     	
         quadruple={18,18,18,19,19,21,24,24,30,26,30,30,34,34,38},
         quadrupletimes = 1.7,
     	
         fullof4x={18,18,18,19,19,21,24,24,30,26,30,30,34,34,38},
         fullof4xtimes = 1.7*0.75,
     
         speed = 48,
     }
     
     recoil_table["none"] = {
         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},
         basictimes = 1,
     	
         full={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},
         fulltimes = 1,
     	
         holdbreathtimes = 1,
     	
         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},
         quadrupletimes = 1,
     	
         fullof4x={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},
         fullof4xtimes = 1,
     	
         speed = 60,
     }
     
     
     --------------------------------------------------------------------------
     ----------------          Function          ------------------------------
     --------------------------------------------------------------------------
     
     
     function convert_sens(unconvertedSens) 
         return 0.002 * math.pow(10, unconvertedSens / 50)
     end
     
     function calc_sens_scale(sensitivity)
         return convert_sens(sensitivity)/convert_sens(50)
     end
     
     function light_on()
         if not IsKeyLockOn(lighton_key) then
         PressAndReleaseKey(lighton_key)
         end
     end
     
     function light_off()
         if IsKeyLockOn(lighton_key) then
         PressAndReleaseKey(lighton_key)
         end
     end
     
     local target_scale = calc_sens_scale(target_sensitivity)
     local scope_scale = calc_sens_scale(scope_sensitivity)
     local scope4x_scale = calc_sens_scale(scope4x_sensitivity)
     
     function recoil_mode()
         if not IsKeyLockOn(mode_switch_key) then
             if IsKeyLockOn(full_mode_key) and full_mode then
     	       return "full";
     		   else
     		   return "basic";
             end
         end	
     	
         if IsKeyLockOn(mode_switch_key) then
             if IsKeyLockOn(full_mode_key) and full_mode then
     		   return "fullof4x"
     		   else
     		   return "quadruple"
             end 
         end		
     end
     		   
     function recoil_value(_weapon,_duration)
         local _mode = recoil_mode()
         local step = (math.floor(_duration/100)) + 1
         if step > #recoil_table[_weapon][_mode] then
             step = #recoil_table[_weapon][_mode]
         end
     	
         local weapon_recoil = recoil_table[_weapon][_mode][step]
         -- OutputLogMessage("weapon_recoil = %s\n", weapon_recoil)
         
         local weapon_speed = 30
         if weapon_speed_mode then
             weapon_speed = recoil_table[_weapon]["speed"]
         end
         -- OutputLogMessage("weapon_speed = %s\n", weapon_speed)
     
         local weapon_basictimes = recoil_table[_weapon]["basictimes"]
         local weapon_fulltimes = recoil_table[_weapon]["fulltimes"]
         local weapon_quadrupletimes = recoil_table[_weapon]["quadrupletimes"]
         local weapon_fullof4xtimes = recoil_table[_weapon]["fullof4xtimes"]
         local weapon_holdbreathtimes = recoil_table[_weapon]["holdbreathtimes"]
         local weapon_intervals = weapon_speed    
     	
         if obfs_mode then
             local coefficient = interval_ratio * ( 1 + random_seed * math.random())
             weapon_intervals = math.floor(coefficient  * weapon_speed) 
         end
         -- OutputLogMessage("weapon_intervals = %s\n", weapon_intervals)
     
         recoil_recovery = weapon_recoil * weapon_intervals / 100 
         recoil_times = all_recoil_times * 0.7 / vertical_sensitivity 
     
         if recoil_mode() == "basic" then
         recoil_recovery = recoil_recovery * recoil_times * weapon_basictimes
         end
         if recoil_mode() == "basic" and hold_breath_mode and IsModifierPressed(hold_breath_key) then
         recoil_recovery = recoil_recovery * weapon_holdbreathtimes * recoil_times * weapon_basictimes
         end
     
         if recoil_mode() == "full" then
         recoil_recovery = recoil_recovery * recoil_times * weapon_fulltimes
         end
         if recoil_mode() == "full" and hold_breath_mode and IsModifierPressed(hold_breath_key) then
         recoil_recovery = recoil_recovery * weapon_holdbreathtimes * recoil_times * weapon_fulltimes
         end
     
         if recoil_mode() == "quadruple" then
         recoil_recovery = recoil_recovery * recoil_times * weapon_quadrupletimes
         end
     	
         if recoil_mode() == "fullof4x" then
         recoil_recovery = recoil_recovery * recoil_times * weapon_fullof4xtimes
         end
         
         -- issues/3
         if IsMouseButtonPressed(2) then
             recoil_recovery = recoil_recovery / target_scale
         elseif recoil_mode() == "basic" then
             recoil_recovery = recoil_recovery / scope_scale
         elseif recoil_mode() == "full" then
             recoil_recovery = recoil_recovery / scope_scale
         elseif recoil_mode() == "quadruple" then
             recoil_recovery = recoil_recovery / scope4x_scale
         elseif recoil_mode() == "fullof4x" then
             recoil_recovery = recoil_recovery / scope4x_scale
         end
     
         return weapon_intervals,recoil_recovery
     end
     
     
     --------------------------------------------------------------------------
     ----------------          OnEvent          ------------------------------
     --------------------------------------------------------------------------
     
     
     function OnEvent(event, arg)
         OutputLogMessage("event = %s, arg = %d\n", event, arg)
         if (event == "PROFILE_ACTIVATED") then
             EnablePrimaryMouseButtonEvents(true)
         elseif event == "PROFILE_DEACTIVATED" then
             current_weapon = "none"
             shoot_duration = 0.0
             ReleaseKey(fire_key)
             ReleaseMouseButton(1)
         end
     
         if (event == "MOUSE_BUTTON_PRESSED" and arg == set_off_key) 
         or (event == "G_PRESSED" and arg == set_off_gkey) then
             current_weapon = "none" light_off()
         elseif (event == "MOUSE_BUTTON_PRESSED" and arg == akm_key)
         or (event == "G_PRESSED" and arg == akm_gkey) then
             current_weapon = "akm" light_on()
         elseif (event == "MOUSE_BUTTON_PRESSED" and arg == m16a4_key)
         or (event == "G_PRESSED" and arg == m16a4_gkey) then
             current_weapon = "m16a4" light_on()
         elseif (event == "MOUSE_BUTTON_PRESSED" and arg == m416_key)
         or (event == "G_PRESSED" and arg == m416_gkey) then
             current_weapon = "m416" light_on()
         elseif (event == "MOUSE_BUTTON_PRESSED" and arg == ump9_key)
         or (event == "G_PRESSED" and arg == ump9_gkey) then
             current_weapon = "ump9" light_on()
         elseif (event == "MOUSE_BUTTON_PRESSED" and arg == uzi_key)
         or (event == "G_PRESSED" and arg == uzi_gkey) then
             current_weapon = "uzi" light_on()
         elseif (event == "MOUSE_BUTTON_PRESSED" and arg == scarl_key)
         or (event == "G_PRESSED" and arg == scarl_gkey) then
             current_weapon = "scarl" light_on()
         elseif (event == "MOUSE_BUTTON_PRESSED" and arg == 1) then
             -- button 1 : Shoot
             if ((current_weapon == "none") or IsModifierPressed(ignore_key)) then
                 PressKey(fire_key)
                 repeat
                     Sleep(30)
                 until not IsMouseButtonPressed(1)
                 ReleaseKey(fire_key)
             elseif((current_weapon == "m16a4") and not IsModifierPressed(ignore_key)) then
                 local shoot_duration = 0.0
                 repeat
                     local intervals,recovery = recoil_value(current_weapon,shoot_duration)
                     PressAndReleaseKey(fire_key)
                     MoveMouseRelative(0, recovery )
                     Sleep(intervals)
                     shoot_duration = shoot_duration + intervals
                 until not IsMouseButtonPressed(1)
             else
                 if auto_mode then
                     PressKey(fire_key)
                     local shoot_duration = 0.0
                     repeat
                     local intervals,recovery = recoil_value(current_weapon,shoot_duration)
                     MoveMouseRelative(0, recovery )
                     Sleep(intervals)
                     shoot_duration = shoot_duration + intervals
                     until not IsMouseButtonPressed(1)
                 else
                     local shoot_duration = 0.0
                     repeat
                     local intervals,recovery = recoil_value(current_weapon,shoot_duration)
                     PressAndReleaseKey(fire_key)
                     MoveMouseRelative(0, recovery )
                     Sleep(intervals)
                     shoot_duration = shoot_duration + intervals
                     until not IsMouseButtonPressed(1)
                 end
             end
         elseif (event == "MOUSE_BUTTON_RELEASED" and arg == 1) then
             ReleaseKey(fire_key)
         end    
         while (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and IsModifierPressed(fast_loot_key) and fastloot) do
             Sleep(10)
             PressMouseButton(1)
             Sleep(10)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             Sleep(2)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             Sleep(2)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             Sleep(2)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             Sleep(2)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             MoveMouseRelative(move, 0)
             Sleep(10)
             ReleaseMouseButton(1)
             Sleep(10)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             Sleep(2)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             Sleep(2)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             Sleep(2)
             MoveMouseRelative(-move, 0)
             Sleep(2)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             MoveMouseRelative(-move, 0)
             Sleep(10)            
             if not IsModifierPressed(fast_loot_key) then
             break
             end
         end
     end

Page 1 of 12 12311 ... LastLast

Similar Threads

  1. Fast loot as razer macro
    By sql.insane in forum PUBG Discussions & Help
    Replies: 2
    Last Post: 02-12-2018, 07:14 AM
  2. Replies: 12
    Last Post: 04-08-2013, 07:27 PM
  3. [Release] Macro Scripter - Record your Mouse and Keyboard in Realtime [Version 0.85 BETA]
    By consca in forum Visual Basic Programming
    Replies: 4
    Last Post: 06-12-2012, 04:39 PM
  4. [Release] Macro Scripter - Record your Mouse and Keyboard in Realtime! [Open Source Soon]
    By consca in forum Visual Basic Programming
    Replies: 4
    Last Post: 05-26-2012, 10:41 AM
  5. Trigger Macro (NEED A NON USB MOUSE AND QMACRO)
    By sf0d in forum WarRock - International Hacks
    Replies: 6
    Last Post: 04-24-2007, 10:20 PM