I believe that many players are still not clear about this code details of cf one-click macro settings, so today I will let the editor of Sourcecode.com bring you the code details of cf one-click macro settings. I hope it will be helpful to everyone!
-- Ghost jump (hold ctrl+arrow key+side key) ---[[ if (event == "MOUSE_BUTTON_PRESSED" and arg == ghost_jump) then while(IsMouseButtonPressed(ghost_jump)) do PressKey("spacebar") Sleep( math.random(8,11)) ReleaseKey("spacebar") Sleep(math.random(8,11)) end end --]] -- Ghost Jump 1.2 (just hold down the arrow keys + side keys) (personal I don't think it feels as good as pressing ctrl myself) ---[[ if (event == "MOUSE_BUTTON_PRESSED" and arg == ghost_jump and is_open_up) then while(IsMouseButtonPressed(ghost_jump)) do PressKey("spacebar") Sleep(math.random( 5,8)) PressKey("lctrl") Sleep(math.random(1,3)) ReleaseKey("spacebar") Sleep(math.random(8,11)) end ReleaseKey("lctrl") end --] ]
-- One-click box loading 1.0 ---[[ if (event == "MOUSE_BUTTON_PRESSED" and arg == jump_box) then PressKey("spacebar") Sleep(math.random(267,275)) ReleaseKey("spacebar") Sleep( math.random(346,354)) PressKey("spacebar") Sleep(math.random(164,172)) ReleaseKey("spacebar") Sleep(math.random(96,104)) PressKey("lctrl") Sleep(math.random(140,148 )) ReleaseKey("lctrl") end --]]
-- Right-click instant sniper ---[[ if (event == "MOUSE_BUTTON_RELEASED" and arg == right_fire_Ju) then --OutputLogMessage("Hello World %fn", math.random()) -- Instant PressMouseButton( 1) Sleep(math.random(10,20)) ReleaseMouseButton(1) -- cut gun if(change_gun == 1) then PressKey("q") Sleep(math.random(9,14)) ReleaseKey("q ") Sleep(math.random(120,130)) PressKey("q") Sleep(math.random(9,14)) ReleaseKey("q") Sleep(math.random(9,14)) end end --] ]
-- usp burst ---[[ if (event == "MOUSE_BUTTON_PRESSED" and arg == usp_fire) then -- usp burst press time_sum = 0 move_y = 0 if(usp_push_gun)then move_y = 3 end while(IsMouseButtonPressed (usp_fire)) do MoveMouseRelative(0,move_y) PressMouseButton(1) usp_speed_end = usp_speed + 10 time_one = math.random(usp_speed,usp_speed_end) Sleep(time_one) ReleaseMouseButton(1) time_two = math.random(usp_speed,usp_speed_end) Sleep( time_two) time_sum = time_sum + time_one + time_two if(time_sum > 300) then move_y = 0 end end end --]]
-- Thor's three consecutive shots ---[[ if (event == "MOUSE_BUTTON_PRESSED" and arg == tree_constant) then -- Note below that the values used to determine whether to press are different from the values being pressed, which are 132 and 123value respectively -- OutputLogMessage("Hello World %dn",2007) PressMouseButton(1) Sleep(math.random(178,190)) ReleaseMouseButton(1) Sleep(math.random(45,53)) end end --]]
--Thor Pressure Gun 2.0 ---[[ if (event == "MOUSE_BUTTON_PRESSED" and arg == force_gun_m4 and is_open_up) then move_y = 3 --Longitudinal movement coordinates move_x = 0 --Lateral movement coordinates time_all = 0 --Gun Stop pressure gun valve --last_x_pos = 0 --last x coordinate --last_y_pos = 0 --last y coordinate --last_x_pos ,last_y_pos = GetMousePosition() --loop gun pressure while(IsMouseButtonPressed(force_gun_m4)) do if (time_all < 60) then --The first 2 moves are not pressed move_y = 0 end time_one = math.random(7,10) Sleep(time_one) MoveMouseRelative(move_x,move_y) time_two = math.random(7,10) Sleep (time_two) time_all = time_all + time_one + time_two if (time_all > 360) then --The vertical coordinate stops moving when the gun pressure threshold is reached move_y = 0 --The horizontal coordinate starts moving --current_x_pos,current_y_pos = GetMousePosition() --Get the current mouse Coordinates--if the current mouse moves, automatically press the gun in the opposite direction else move_y = 3 end end end --]]
7. ak Fire Qilin pressure gun--AK pressure gun ---[[ if (event == "MOUSE_BUTTON_PRESSED" and arg == force_gun_ak and is_open_up) then move_y = 4 -- vertical movement coordinates move_x = 0 -- horizontal movement coordinates time_all = 0 --Muzzle stop pressure valve--last_x_pos = 0 --Last x coordinate--last_y_pos = 0 --Last y coordinate--last_x_pos,last_y_pos = GetMousePosition() --Get initial position- -OutputLogMessage("%d,%dn",last_x_pos,last_y_pos) --sum_move_y = 0 --Y-axis moves the full distance--Loop gun pressure while(IsMouseButtonPressed(force_gun_ak)) do if (time_all < 40) then - -Single point without pressure move_y = 0 end --time_one = math.random(5,11) --Sleep(time_one) MoveMouseRelative(move_x,move_y) --sum_move_y = sum_move_y + move_y --Calculate the distance after movement time_two = math .random(10,22) Sleep(time_two) time_all = time_all + time_two if (time_all > 430) then -- When the gun pressure threshold is reached, the ordinate stops moving move_y = 0 -- The abscissa starts moving --current_x_pos,current_y_pos = GetMousePosition( ) --Get the current mouse coordinates --If the current mouse moves, automatically press the gun in the opposite direction else move_y = 4 end end --sum_move_y = 0 - sum_move_y --OutputLogMessage("%dn",sum_move_y) --MoveMouseRelative( 0,sum_move_y) --Position receipt--last_x_pos,last_y_pos = GetMousePosition() --Get initial position--OutputLogMessage("%d,%dn",last_x_pos,last_y_pos) end --]]