PUBG Logitech Macro

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üye
Katılım
15 May 2020
Mesajlar
8
Tepki puanı
0
Yaş
46
6 HİZMET YILI
logitech software yi yönetici olarak çalıştırın. pubg profilinide varsayılan yapın.
Bilgi için teşekkür ederim ama yine olmadı. Sol düğmeye tıklayınca sadece bir kere imleci aşağı çekiyor ve öyle kalıyor. Döngü ilk adımda kırılıyor.
Post automatically merged:

Bu tarz makrolar nedense masaüstünde çalışıyor ama emülatöre girince çalışmıyor. İmleci aşağıya çeken döngü emülatörde bir şekilde kırılıyor ve komut sadece bir kere çalışıp duruyor. Sanırım PUBG'nin aldığı bir tedbir.

Logitech GHUB'ı kaldırıp yeniden kurunca sorun çözüldü. Bu arada ben buradaki lua scripti değil, daha basit bir script kullanıyorum.
 
Son düzenleme:
Onaylı Üye
Katılım
20 Mar 2018
Mesajlar
54
Tepki puanı
0
Yaş
45
8 HİZMET YILI
D/ DİSKETİNE OLUSTURULAN LUA NE İŞİMİZE YARAYACAKKİ DIREK KODLARLADA CALISIYOR HER HANGI BIR ETKI EDIYORMU LUA?
 
Onaylı Üye
Katılım
5 Haz 2019
Mesajlar
93
Çözümler
1
Tepki puanı
6
Ödüller
6
Yaş
35
7 HİZMET YILI
d diskine dosya oluşturmadan yaptım çalıştı. ama buradaki paylaşımdan zerre birşey anlamadım.
anlamayanlar kodların içinde github linki var oradan detaylı bilgi alabilirler.
 
Puffin
Süper Üye
Katılım
14 May 2017
Mesajlar
675
Çözümler
68
Tepki puanı
63
Ödüller
8
Yaş
30
9 HİZMET YILI
ya logitech i olmayan ne yapsın :(
 
Banlı Üye
Katılım
8 Haz 2020
Mesajlar
47
Tepki puanı
1
Yaş
31
5 HİZMET YILI
Ellerine sağlık hocam yarar, ya logitech i olmayan ne yapsın :D
 
Onaylı Üye
Katılım
22 Ara 2019
Mesajlar
81
Tepki puanı
4
Ödüller
4
Yaş
33
6 HİZMET YILI
Çok eski bir konu fakat yazayım yardımcı olan olur belki denilenleri yaptım g300s modeline sahibim fakat ateş ettiğimde sadece 1 kere ediyor sanki teklideymiş gibi silah acaba sorun nedir ?
 
Onaylı Üye
Katılım
5 Eyl 2017
Mesajlar
53
Tepki puanı
2
Ödüller
5
8 HİZMET YILI
Bu Makroyu Çalıştırabilmeniz için önce gLua.lua kodlarını (D:/) Diskine oluşturun.
Çalışması için Bilgisayarınızda Logitech Gaming Software olması gerekiyor ve en az 1 adet Logitech ürününüz olması gerekiiyor Kulaklık olabilir mouse olabilir Klavye olabilir.

Bence Ban riski yoktur çünki Bu tarz legit Logitech gibi yazılımlara ban atmıyorlar.
Desteklediği Silahlar : AKM-M4A4-M416-SCARL-UMP9
Ekli dosyayı görüntüle 9762


Kod:
local current_weapon = "none"

--------------------------------------------------------------------------
---------------- Upgraded By LeftSpace --------------------------------
----------------Website https://memoryhackers.org/ --------------------
---Original Author : @liantian-cn  - https://github.com/liantian-cn/logitech-pbg
--------------------------------------------------------------------------

---- key bind ----


local ump9_key = 6
local akm_key = 2
local m16a4_key = 5
local m416_key = 3
local scarl_key = 4
local uzi_key = nil

local set_off_key = 7


---- fire key ----
local fire_key = "Pause" -- oyundaki ates tusu Pause Break Tusu
local full_mode_key = "end" -- kullanmyrm
local mode_switch_key = "delete" -- kullanmyrm


---- ignore key ----
---- kullanılabiliir tuslar "lalt", "ralt", "alt" "lshift", "rshift", "shift" "lctrl", "rctrl", "ctrl"

local ignore_key = "lalt" -- sol alt tusuna bastıgınızda makro calismas

--- Oyun icindeki Hassasiyet 50 olmak zorunda
--- varsayılan  50.0

local target_sensitivity = 50
local scope_sensitivity = 50
local full_sensitivity = 50
local scope4x_sensitivity = 50

---- 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 = true
local interval_ratio = 0.75
local random_seed = 1
-- local fullmode = false
local fullmode = false
--------------------------------------------------------------------------
---------------- Recoil Table ------------------------------
---------------- You can fix the value here ------------------------------
--------------------------------------------------------------------------

local recoil_table = {}

recoil_table["ump9"] = {
basic={30,31,32,34,37,35,35,36,42,38,39,42,42,41,41,41,41,42,42,42,43,40,41,43,40,40,40,41,42},
full={0},
quadruple={0},
speed = 90
}

recoil_table["akm"] = {
basic={56,41,42,46,48,58,58.5,62,64,67,68,71,72,74.4,77,72.5},
full={0},
quadruple={0},
speed = 100
}

recoil_table["m16a4"] = {
basic={42.3,31.2,32.4,42.3,50.4,54.1,62.1,60,62.5,65.5,63,62.1,64.4,64.4,65.25,63.9},
full={0},
quadruple={0},
speed = 80
}

recoil_table["m416"] = {
basic={43,30,34,36,41,40,46,47,45.6,46.5,47.5,46.5,49.2,52.2,53.1,54,54,54,54,55,56,56,56,56,56,57,57,57,57,57},
full={0},
quadruple={},
speed = 90
}

recoil_table["scarl"] = {
basic={40,25,31.5,39.6,39.6,41.4,42.3,42.3,43.2,48.6,50.4,52.2,54.5,53.2,55,59},
full={0},
quadruple={0},
speed = 100
}

recoil_table["uzi"] = {
basic={18,18,18,19,19,21,24,24,30,26,30,30,34,34,38},
full={0},
quadruple={0},
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},
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},
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

local target_scale = calc_sens_scale(target_sensitivity)
local scope_scale = calc_sens_scale(scope_sensitivity)
local full_scale = calc_sens_scale(full_sensitivity)
local scope4x_scale = calc_sens_scale(scope4x_sensitivity)

function recoil_mode()
return "basic";
end


function recoil_value(_weapon,_duration)
local _mode = recoil_mode()
local step = (math.floor(_duration/100)) + 1
if step > 40 then
step = 40
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_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

-- 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 / full_scale
elseif recoil_mode() == "quadruple" then
recoil_recovery= recoil_recovery / scope4x_scale
end

return weapon_intervals,recoil_recovery
end


--------------------------------------------------------------------------
---------------- OnEvent ------------------------------
--------------------------------------------------------------------------


function OnEvent(event, arg)
--OutputLogMessage("event = %s, arg = %s\n", event, arg)
if (event == "PROFILE_ACTIVATED") then
EnablePrimaryMouseButtonEvents(true)
OutputLogMessage("aktif\n")
elseif event == "PROFILE_DEACTIVATED" then
current_weapon = "none"
shoot_duration = 0.0
ReleaseKey(fire_key)
ReleaseMouseButton(1)
end

if (event == "G_PRESSED" and arg == set_off_key) then
current_weapon = "none"
elseif (event == "G_PRESSED" and arg == akm_key) then
current_weapon = "akm"
elseif (event == "G_PRESSED" and arg == m16a4_key) then
current_weapon = "m16a4"
elseif (event == "G_PRESSED" and arg == m416_key) then
current_weapon = "m416"
elseif (event == "G_PRESSED" and arg == ump9_key) then
current_weapon = "ump9"
elseif (event == "G_PRESSED" and arg == uzi_key) then
current_weapon = "uzi"
elseif (event == "G_PRESSED" and arg == scarl_key) then
current_weapon = "scarl"
elseif (event == "MOUSE_BUTTON_PRESSED" and arg == 1) then
    --OutputLogMessage("mode : %s",recoil_mode())
if ((current_weapon == "none") or IsModifierPressed(ignore_key)) then
PressKey(fire_key)
repeat
Sleep(30)
until not IsMouseButtonPressed(1)
ReleaseKey(fire_key)
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
elseif (event == "MOUSE_BUTTON_RELEASED" and arg == 1) then
ReleaseKey(fire_key)
end

end
-->> gLua 3. parti  Razer Tarzı Mouseleri desteklemek icin kullaniliyor
dofile( [[D:\gLua.lua]] )
EnableThirdPartyMouseEvents()
EnableKeyboardKeyEvents()


gLua.lua:
Kod:
-->>> gLua Script v.1002 <<<--

--(c)reated 2014 by UPIA - based on guru kgobers' Poll and Task Engine @ forums.logitech.com


gLua = {}

gLua.PollFamily = "mouse"
gLua.PollInterval = 10
gLua.PollDeadtime = 100
gLua.PollRunning = true
gLua.PollCheckTime = false

gLua.LegalMbKeys = {1,2,3,4,5}
gLua.LegalFamilies = {"mouse", "kb", "lhc"}
gLua.LegalKBKeys = {"scrolllock", "capslock", "numlock", "lalt", "ralt", "alt", "lshift", "rshift", "shift", "lctrl", "rctrl", "ctrl"}
gLua.SetupKBKeys = {"scrolllock", "capslock", "numlock", "lalt", "ralt", "lshift", "rshift", "lctrl", "rctrl"}

gLua.KeyCatch = {}
gLua.KeyEvent = false
gLua.MbCatch = {}
gLua.MbEvent = false

gLua.MbSwitch23 = false

gLua.EventFunction = false
gLua.EventFunctionAsTask = false

gLua.TaskEngine = false
gLua.TaskPrecision = false

gLua.OnPollEventStatus = false
gLua.OnMouseEventStatus = false
gLua.OnGKeyEventStatus = false
gLua.OnMKeyEventStatus = false
gLua.OnKeyEventStatus = false

gLua.LogEM = false

gLua.Sleep = Sleep
gLua.IsMouseButtonPressed = IsMouseButtonPressed
gLua.PressMouseButton = PressMouseButton
gLua.ReleaseMouseButton = ReleaseMouseButton
gLua.PressAndReleaseMouseButton = PressAndReleaseMouseButton
gLua.PollGmksHook = GetMKeyState
gLua.PollSmksHook = SetMKeyState
gLua.OnEvent = OnEvent

--gLua.Runtime = 0
gLua.Down = {}
gLua.TaskList = {}
gLua.TaskActive = false
function EnablePollTimeCheck(bool)
    bool = bool or true
    if bool ~= false and bool ~= true then
        gLua.log("WARNING: EnablePollTimeCheck() - bad parameter '" .. tostring(bool) .. "' ")
        return false
    else
        gLua.PollCheckTime = bool
    end
end
function EnableTaskEngine(bool)
    bool = bool or true
    if bool ~= false and bool ~= true then
        gLua.log("WARNING: EnableTaskEngine() - bad parameter '" .. tostring(bool) .. "' ")
        return false
    else
        gLua.TaskEngine = bool
        if gLua.TaskEngine then
            TaskRun = gLua.TaskRun
            TaskAbort = gLua.TaskAbort
            TaskAbortAll = gLua.TaskAbortAll
            TaskSleep = gLua.TaskSleep
            RunTask = gLua.TaskRun
            AbortTask = gLua.TaskAbort
        end
        return true
    end
end
function EnableTaskPrecision(bool)
    bool = bool or true
    if bool ~= false and bool ~= true then
        gLua.log("WARNING: EnableTaskPrecision() - bad parameter '" .. tostring(bool) .. "' ")
        return false
    else
        gLua.TaskPrecision = bool
        return true
    end
end
function EnableCustomPolling(family, interval)
    family = string.lower(family) or ""
    interval = interval or 10
    if gLua.TableFind(gLua.LegalFamilies, family, "ipairs") == 0 then
        gLua.log("WARNING: EnableCustomPolling() - bad family '" .. family .. "' ignored")
        return false
    end
    if interval < 10 then
        gLua.log("WARNING: EnableCustomPolling() - interval '" .. interval .. "' too short, set to 10ms" )
        interval = 10
    end
    gLua.PollFamily = family
    gLua.PollInterval = interval
    return true
end
function EnableKeyboardKeyEvents(...)
    gLua.KeyCatch = {}
    if # arg == 0 or arg[1] == true then
        arg = gLua.SetupKBKeys
    elseif arg[1] == false then
        return true
    end
    for i,v in ipairs(arg) do
        v = string.lower(v)
        if gLua.TableFind(gLua.LegalKBKeys, v, "ipairs") > 0 then
            table.insert(gLua.KeyCatch, v)
        else
            gLua.log("WARNING: EnableKeyboardKeyEvents() - bad key '" .. v .. "' ignored" )
        end
    end
    if # gLua.KeyCatch > 0 then gLua.KeyEvent = true end
    return true
end
function EnableThirdPartyMouseEvents(...)
    gLua.MbCatch = {}
    if # arg == 0 or arg[1] == true then
        arg = gLua.LegalMbKeys
    elseif arg[1] == false then
        return true
    end
    for i,v in ipairs(arg) do
        v = tonumber(v)
        if gLua.TableFind(gLua.LegalMbKeys, v, "ipairs") > 0 then
            table.insert(gLua.MbCatch, v)
        else
            gLua.log("WARNING: EnableThirdPartyMouseEvents() - bad button '" .. v .. "' ignored" )
        end
    end
    if # gLua.MbCatch > 0 then gLua.MbEvent = true end
    return true
end
function EnableEventFunctions(bool, tasktyp)
    bool = bool or true
    tasktyp = tasktyp or false
    if bool ~= false and bool ~= true then
        gLua.log("WARNING: EnableEventFunctions() - bad parameter 1 '" .. tostring(bool) .. "' ")
        return false
    end
    if tasktyp ~= false and tasktyp ~= true then
        gLua.log("WARNING: EnableEventFunctions() - bad parameter 2 '" .. tostring(tasktyp) .. "' ")
        return false
    end
    gLua.EventFunction = bool
    gLua.EventFunctionAsTask = tasktyp
    return true
end
function EnableMouseButton23Switch(bool)
    bool = bool or true
    if bool ~= false and bool ~= true then
        gLua.log("WARNING: EnableMouseButton23Switch() - bad parameter '" .. tostring(bool) .. "' ")
        return false
    else
        gLua.MbSwitch23 = bool
        if gLua.MbSwitch23 then
            IsMouseButtonPressed = function(mb) return gLua.IsMouseButtonPressed( gLua.MbSwitch(mb) ) end
            PressMouseButton = function(mb) gLua.PressMouseButton( gLua.MbSwitch(mb) ) end
            ReleaseMouseButton = function(mb) gLua.ReleaseMouseButton( gLua.MbSwitch(mb) ) end
            PressAndReleaseMouseButton = function(mb) gLua.PressAndReleaseMouseButton( gLua.MbSwitch(mb) ) end
        end
        return true
    end
end

function gLua.log(str)
    OutputLogMessage(str .. "\n")
end
function gLua.OnXEventSetStatus()
    if type(_G["OnPollEvent"]) == "function" then gLua.OnPollEventStatus = true end
    if type(_G["OnMouseEvent"]) == "function" then gLua.OnMouseEventStatus = true end
    if type(_G["OnGKeyEvent"]) == "function" then gLua.OnGKeyEventStatus = true end
    if type(_G["OnMKeyEvent"]) == "function" then gLua.OnMKeyEventStatus = true end
    if type(_G["OnKeyEvent"]) == "function" then gLua.OnKeyEventStatus = true end
end
function gLua.OnXEventExecute(event, arg, family)
    if gLua.OnPollEventStatus and event == "POLL" then _G["OnPollEvent"](event, arg, family) end
    if gLua.OnMouseEventStatus and ( event == "MOUSE_BUTTON_PRESSED" or event == "MOUSE_BUTTON_RELEASED" ) then _G["OnMouseEvent"](event, arg, family) end
    if gLua.OnGKeyEventStatus and ( event == "G_PRESSED" or event == "G_RELEASED" ) then _G["OnGKeyEvent"](event, arg, family) end
    if gLua.OnMKeyEventStatus and ( event == "M_PRESSED" or event == "M_RELEASED" ) then _G["OnMKeyEvent"](event, arg, family) end
    if gLua.OnKeyEventStatus and ( event == "K_PRESSED" or event == "K_RELEASED" ) then _G["OnKeyEvent"](event, arg, family) end
end
OnEvent = function(event, arg, family)
    family = family or ""
    local st = gLua.PollStateTimer
    gLua.Runtime = GetRunningTime()
    if event == "PROFILE_ACTIVATED" then
        gLua.E = "PA"
        gLua.EM = "K0L0_PA"
        gLua.KeyInitiateLocks()
        gLua.MKeyInitiateID()
        gLua.OnXEventSetStatus()
        --if not gLua.TaskEngine then gLua.TaskPrecision = false end
        gLua.PollStart()
    elseif event == "PROFILE_DEACTIVATED" then
        gLua.E = "PD"
        gLua.EM = "K0L0_PD"
    else
        gLua.EventCreateID(event,arg,family)
        gLua.MKeyCreateID(event,arg,family)
    end
    gLua.OnEventExecute(event, arg, family)
    gLua.KeyGetAll()
    gLua.MbGetAll()
    if gLua.TaskEngine then gLua.TaskCheck() end
    gLua.Poll(event, arg, family, st)
end
function gLua.OnEventExecute(event, arg, family)
    if gLua.E ~= "" then
        if gLua.LogEM then gLua.log(gLua.EM) end
        gLua.OnXEventExecute(event,arg,family)
        if gLua.EventFunction then
            -- run as task
            local n00 = "K0L0_" .. gLua.E
            if type(_G[n00]) == "function" then
                if gLua.EventFunctionAsTask then
                    gLua.TaskRun(n00, _G[n00], event, arg, family)
                else
                    _G[n00]()
                end
            end
            local nx0 = "K" .. gLua.MK .. "L0_" .. gLua.E
            if type(_G[nx0]) == "function" then
                if gLua.EventFunctionAsTask then
                    gLua.TaskRun(nx0, _G[nx0], event, arg, family)
                else
                    _G[nx0]()
                end
            end
            local n0x = "K0L" .. gLua.ML .. "_" .. gLua.E
            if type(_G[n0x]) == "function" then
                if gLua.EventFunctionAsTask then
                    gLua.TaskRun(n0x, _G[n0x], event, arg, family)
                else
                    _G[n0x]()
                end
            end
            local nxx = "K" .. gLua.MK .. "L" .. gLua.ML .. "_" .. gLua.E
            if type(_G[nxx]) == "function" then
                if gLua.EventFunctionAsTask then
                    gLua.TaskRun(nxx, _G[nxx], event, arg, family)
                else
                    _G[nxx]()
                end
            end
        else
            gLua.OnEvent(event, arg, family)
        end
    end
end
function gLua.TableFind(array, search, typ) -- Find element in 1D Array
    typ = typ or "ipairs"
    local ret = 0
    if typ == "ipairs" then
        for i,v in ipairs(array) do
            if v == search then
                ret = i
                break
            end
        end
    else
        for i,v in pairs(array) do
            if v == search then
                ret = tostring(i)
                break
            end
        end
    end
    return ret
end
function gLua.MKeyInitiateID()
    gLua.MK = gLua.PollGmksHook("kb")
    gLua.ML = gLua.PollGmksHook("lhc")
end
function gLua.MKeyCreateID(e, a, f)
    if e == "M_PRESSED" then
        if f == "kb" then
            gLua.MK = a
        elseif f == "lhc" then
            gLua.ML = a
        end
    end
end
function gLua.EventCreateID(e, a, f)
    local id = ""
    if f == "mouse" then
        id = id .. "M"
        if e == "MOUSE_BUTTON_PRESSED" then
            id = id .. "pG" .. a
            gLua.Down[id] = true
        elseif e == "MOUSE_BUTTON_RELEASED" then
            gLua.Down[id .. "pG" .. a] = false
            id = id .. "rG" .. a
        else
            id = ""
        end
    else
        local key = string.sub(e, 1, 1)
        local typ = string.sub(e, 3, 3)
        if key == "G" or key == "M" then
            if f == "lhc" then
                id = id .. "L"
            elseif f == "kb" then
                id = id .. "K"
            end
            if typ == "P" then
                id = id .. "p" .. key .. a
                gLua.Down[id] = true
            elseif typ == "R" then
                gLua.Down[id .. "p" .. key .. a] = false
                id = id .. "r" .. key .. a
            end
        end
    end
    gLua.E = id
    gLua.EM = "K" .. gLua.MK .. "L" .. gLua.ML .. "_" .. gLua.E
end
function gLua.KeyGetAll()
    for i,v in pairs(gLua.KeyCatch) do
        gLua.E = ""
        local CurrDown = gLua.Down[v]
        if v == "scrolllock" or v == "capslock" or v == "numlock" then
            if IsKeyLockOn(v) then
                gLua.Down[v] = true
                if not CurrDown then
                    gLua.E = "K" .. "p" .. string.upper(v)
                    gLua.EM = "K" .. gLua.MK .. "L" .. gLua.ML .. "_" .. gLua.E
                    if gLua.KeyEvent then gLua.OnEventExecute("K_PRESSED", v, "kb") end
                end
            else
                gLua.Down[v] = false
                if CurrDown then
                    gLua.E = "K" .. "r" .. string.upper(v)
                    gLua.EM = "K" .. gLua.MK .. "L" .. gLua.ML .. "_" .. gLua.E
                    if gLua.KeyEvent then gLua.OnEventExecute("K_RELEASED", v, "kb") end
                end
            end
        else
            if IsModifierPressed(v) then
                gLua.Down[v] = true
                if not CurrDown then
                    gLua.E = "K" .. "p" .. string.upper(v)
                    gLua.EM = "K" .. gLua.MK .. "L" .. gLua.ML .. "_" .. gLua.E
                    if gLua.KeyEvent then gLua.OnEventExecute("K_PRESSED", v, "kb") end
                end
            else
                gLua.Down[v] = false
                if CurrDown then
                    gLua.E = "K" .. "r" .. string.upper(v)
                    gLua.EM = "K" .. gLua.MK .. "L" .. gLua.ML .. "_" .. gLua.E
                    if gLua.KeyEvent then gLua.OnEventExecute("K_RELEASED", v, "kb") end
                end
            end
        end
    end
end
function gLua.KeyInitiateLocks()
    local locks = {"scrolllock", "capslock", "numlock"}
    for i = 1, # locks do
        if gLua.TableFind(gLua.KeyCatch, locks[i], "ipairs") > 0 then
            if IsKeyLockOn( locks[i] ) then
                gLua.Down[ locks[i] ] = true
            end
        end
    end
end
function gLua.MbGetAll()
    for i,v in pairs(gLua.MbCatch) do
        --v = gLua.MbSwitch(v)
        gLua.E = ""
        local CurrDown = gLua.Down["MpG" .. v]
        if IsMouseButtonPressed(v) then
            gLua.Down["MpG" .. v] = true
            if not CurrDown then
                gLua.E = "MpG" .. v
                gLua.EM = "K" .. gLua.MK .. "L" .. gLua.ML .. "_" .. gLua.E
                if gLua.MbEvent then gLua.OnEventExecute("MOUSE_BUTTON_PRESSED", v, "mouse") end
            end
        else
            gLua.Down["MpG" .. v] = false
            if CurrDown then
                gLua.E = "MrG" .. v
                gLua.EM = "K" .. gLua.MK .. "L" .. gLua.ML .. "_" .. gLua.E
                if gLua.MbEvent then gLua.OnEventExecute("MOUSE_BUTTON_RELEASED", v, "mouse") end
            end
        end
    end
end
function gLua.MbSwitch(mb)
    if gLua.MbSwitch23 then
        if mb == 2 then
            return 3
        elseif mb == 3 then
            return 2
        else
            return mb
        end
    else
        return mb
    end
end
---------------------------------->> Poll Stuff @kgober -->
function gLua.PollStart()
    gLua.PollActiveState = gLua.PollGmksHook(gLua.PollFamily)
    gLua.PollSmksHook(gLua.PollActiveState, gLua.PollFamily)
end
function gLua.PollStop()
    gLua.PollRunning = false
end
function gLua.Poll(event, arg, family, st)
    if gLua.PollRunning then
        if st == nil and gLua.PollStateTimer ~= nil then return end
        local t = GetRunningTime()
        if family == gLua.PollFamily then
            if event == "M_PRESSED" and arg ~= ActiveState then
                if gLua.PollStateTimer ~= nil and t >= gLua.PollStateTimer then gLua.PollStateTimer = nil end
                if gLua.PollStateTimer == nil then gLua.PollActiveState = arg end
                gLua.PollStateTimer = t + gLua.PollDeadtime
            elseif event == "M_RELEASED" and arg == gLua.PollActiveState then
                gLua.OnXEventExecute("POLL", 0, "")
                if gLua.TaskEngine and gLua.TaskPrecision and gLua.TaskNext then
                    gLua.TaskNextLeft = gLua.PollInterval
                    while gLua.TaskNext do
                        if gLua.TaskNext < gLua.TaskNextLeft then
                            Sleep(gLua.TaskNext)
                            gLua.TaskNextLeft = gLua.TaskNextLeft - gLua.TaskNext
                            gLua.TaskCheck()
                        else
                            break
                        end
                    end
                    Sleep(gLua.TaskNextLeft)
                    gLua.PollSmksHook(gLua.PollActiveState, gLua.PollFamily)
                else
                    if gLua.PollCheckTime then
                        local Tcheck = GetRunningTime()
                        Sleep(gLua.PollInterval)
                        Tcheck = GetRunningTime() - Tcheck
                        if (Tcheck == 15 or Tcheck == 16) and (gLua.PollInterval ~= 15 and gLua.PollInterval ~= 16) then
                            if type(_G["PollCheckAlert"]) == "function" then
                                PollCheckAlert(Tcheck)
                            end
                        else
                            if type(_G["PollCheckAlert"]) == "function" then
                                PollCheckAlert(-1)
                            end
                        end
                    else
                        Sleep(gLua.PollInterval)
                    end
                    gLua.PollSmksHook(gLua.PollActiveState, gLua.PollFamily)
                end
            end
        end
    end
end
GetMKeyState = function(family)
    family = family or "kb"
    if family == gLua.PollFamily then
        return gLua.PollActiveState
    else
        return gLua.PollGmksHook(family)
    end
end
SetMKeyState = function(mkey, family)
    family = family or "kb"
    if family == gLua.PollFamily then
        if mkey == gLua.PollActiveState then return end
        gLua.PollActiveState = mkey
        gLua.PollStateTimer = GetRunningTime() + gLua.PollDeadtime
    end
    return gLua.PollSmksHook(mkey, family)
end
---------------------------------->> Task Management functions  @kgober -->
function gLua.TaskCheck()
    local t = GetRunningTime()
    if gLua.TaskPrecision then
        gLua.TaskNext = false
        local next = gLua.PollInterval
        for key, task in pairs(gLua.TaskList) do
            local n = task.time - t
            if t >= task.time then
                gLua.TaskActive = key
                local s, d = coroutine.resume(task.task, task.run) --, task.key)
                gLua.TaskActive = false
                if (not s) or ((d or -1) < 0) then
                    gLua.TaskList[key] = nil
                else
                    task.time = task.time + d
                end
            else
                if n < next then gLua.TaskNext = n end
            end
        end
    else
        for key, task in pairs(gLua.TaskList) do
            if t >= task.time then
                gLua.TaskActive = key
                local s, d = coroutine.resume(task.task, task.run) --, task.key)
                gLua.TaskActive = false
                if (not s) or ((d or -1) < 0) then
                    gLua.TaskList[key] = nil
                else
                    task.time = task.time + d
                end
            end
        end
    end
end
function gLua.TaskRun(key, func, ...)
    gLua.TaskAbort(key)
    local task = {}
    task.time = GetRunningTime()
    task.task = coroutine.create(func)
    task.run = true
    gLua.TaskActive = key
    local s, d = coroutine.resume(task.task, ...)
    gLua.TaskActive = false
    if (s) and ((d or -1) >= 0) then
        task.time = task.time + d
        gLua.TaskList[key] = task
    end
end
function gLua.TaskStop(key)
    local task = gLua.TaskList[key]
    if task ~= nil then task.run = false end
end
function gLua.TaskAbort(key)
    local task = gLua.TaskList[key]
    if task == nil then return end
    while true do
        local s, d = coroutine.resume(task.task, false)
        if (not s) or ((d or -1) < 0) then
            gLua.TaskList[key] = nil
            return
        end
    end
end
function gLua.TaskAbortAll()
    gLua.TaskList={}
end
function gLua.TaskRunning(key)
    local task = gLua.TaskList[key]
    if task == nil then return false end
    return task.run
end
function gLua.TaskSleep(delay)
    return coroutine.yield(delay)
end
OutputLogMessage("gLua.Library loaded!\n")
--eof (end of file)
lite icin de yarar mi
 
Onaylı Üye
Katılım
22 Ara 2019
Mesajlar
81
Tepki puanı
4
Ödüller
4
Yaş
33
6 HİZMET YILI
Bilgi için teşekkür ederim ama yine olmadı. Sol düğmeye tıklayınca sadece bir kere imleci aşağı çekiyor ve öyle kalıyor. Döngü ilk adımda kırılıyor.
Post automatically merged:



Logitech GHUB'ı kaldırıp yeniden kurunca sorun çözüldü. Bu arada ben buradaki lua scripti değil, daha basit bir script kullanıyorum.
hocam iyi günler tek ateş etmesi sorununu nasıl çözdünüz acaba scriptti paylaşma şansınız var mı ?
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üst