Lua ARM64 Sorunu Yardım Lütfen.

Onaylı Üye
Katılım
13 Tem 2017
Mesajlar
63
Tepki puanı
7
Ödüller
8
Yaş
29
8 HİZMET YILI
Merhaba arkadaşlar arm64 içinden bir kaç veri değiştirmek için aşağıdaki gibi bir kod yazdım fakat çalıştıramadım bilgisi olan yardımcı olabilir mi lütfen.

Kod:
local menu = {
    "Zoom Control",
    "EagleEye Hack",
    "Exit"
}
 
local HexTest = {
    ZoomControl = {
        arm64 = {
            Off = nil,
            ["1"] = 0x1E2E3001,
            ["2"] = 0x1E2E5001,
            ["3"] = 0x1E2E7001,
            ["4"] = 0x1E2EB001,
            ["5"] = 0x1E2F1001,
            ["6"] = 0x1E2F9001,
            ["7"] = 0x1E201001,
            ["8"] = 0x1E229001,
            ["9"] = 0x1E235001,
            ["10"] = 0x1E241001
        },
        offset = 0x589738
    },
    EagleEye = {
        arm64 = {
            On = 0x1E27D000,
            Off = nil
        },
        offset = 0x5AF678
    }
}
 
-- Function to apply the modifications based on user selection
local function applyFeature(feature, state)
    if not HexTest[feature] or not HexTest[feature].arm64 then
        gg.alert("Feature not available: " .. feature)
        return
    end
 
    local values = HexTest[feature].arm64[state]
    local offset = HexTest[feature].offset
    if not values then
        gg.alert("State not available: " .. state)
        return
    end
 
    if type(values) == "table" then
        for i, v in ipairs(values) do
            local address = offset and (offset[i] + 0) or 0
            gg.setValues({{address = address, flags = gg.TYPE_DWORD, value = v}})
        end
    else
        local address = offset and (offset + 0) or 0
        gg.setValues({{address = address, flags = gg.TYPE_DWORD, value = values}})
    end
    gg.toast(feature .. " set to " .. state)
end
 
-- Main menu loop with multiple feature selection
while true do
    local choices = gg.multiChoice(menu, nil, "HexTest Features Menu")
    if choices == nil then
        gg.alert("No option selected. Returning to menu.")
    else
        if choices[1] then
            local zoomLevels = {"Off", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}
            local zoomChoice = gg.choice(zoomLevels, nil, "Select Zoom Level")
            if zoomChoice then
                applyFeature("ZoomControl", zoomLevels[zoomChoice])
            end
        end
        if choices[2] then
            local states = {"On", "Off"}
            local stateChoice = gg.choice(states, nil, "EagleEye Hack")
            if stateChoice then
                applyFeature("EagleEye", states[stateChoice])
            end
        end
        if choices[3] then
            gg.alert("Exiting menu.")
            break
        end
    end
end
 
Üye
Katılım
17 Ocak 2025
Mesajlar
33
Tepki puanı
2
1 HİZMET YILI
Şu an HexTest verinizde, bazı özellikler için arm64'ün değerleri doğru şekilde verilmiş, ancak bazı yerlerde liste (table) ve tekil değerler arasında karışıklık olabilir. Özellikle ZoomControl için Off değerinin nil olduğu durumlar bulunuyor. applyFeature fonksiyonu, nil değerini kontrol ederek bu durumu ele almalıdır.


state değeri geldiğinde, ZoomControl'de "Off" durumu olduğunda, bunu nil olarak kullanmak istemiyorsanız, kontrol eklemelisiniz.
address hesaplamasında da bir düzeltme yapılması gerekebilir çünkü şu an sadece offset'i eklemek yerine başka bir mantık kullanmalısınız.


Aşağıdaki kodu daha stabil çalışması için düzenledim. Değişikliklere değineceğim.
Kod:
local menu = {
    "Zoom Control",
    "EagleEye Hack",
    "Exit"
}

local HexTest = {
    ZoomControl = {
        arm64 = {
            Off = nil,
            ["1"] = 0x1E2E3001,
            ["2"] = 0x1E2E5001,
            ["3"] = 0x1E2E7001,
            ["4"] = 0x1E2EB001,
            ["5"] = 0x1E2F1001,
            ["6"] = 0x1E2F9001,
            ["7"] = 0x1E201001,
            ["8"] = 0x1E229001,
            ["9"] = 0x1E235001,
            ["10"] = 0x1E241001
        },
        offset = 0x589738
    },
    EagleEye = {
        arm64 = {
            On = 0x1E27D000,
            Off = nil
        },
        offset = 0x5AF678
    }
}

-- Function to apply the modifications based on user selection
local function applyFeature(feature, state)
    if not HexTest[feature] or not HexTest[feature].arm64 then
        gg.alert("Feature not available: " .. feature)
        return
    end

    local values = HexTest[feature].arm64[state]
    local offset = HexTest[feature].offset
    if not values then
        gg.alert("State not available: " .. state)
        return
    end

    if type(values) == "table" then
        for i, v in ipairs(values) do
            local address = offset + (i - 1) * 4  -- her bir değerin adresini sırasıyla al
            gg.setValues({{address = address, flags = gg.TYPE_DWORD, value = v}})
        end
    else
        local address = offset  -- sadece bir değer olduğunda basit offset kullan
        gg.setValues({{address = address, flags = gg.TYPE_DWORD, value = values}})
    end
    gg.toast(feature .. " set to " .. state)
end

-- Main menu loop with multiple feature selection
while true do
    local choices = gg.multiChoice(menu, nil, "HexTest Features Menu")
    if choices == nil then
        gg.alert("No option selected. Returning to menu.")
    else
        if choices[1] then
            local zoomLevels = {"Off", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}
            local zoomChoice = gg.choice(zoomLevels, nil, "Select Zoom Level")
            if zoomChoice then
                applyFeature("ZoomControl", zoomLevels[zoomChoice])
            end
        end
        if choices[2] then
            local states = {"On", "Off"}
            local stateChoice = gg.choice(states, nil, "EagleEye Hack")
            if stateChoice then
                applyFeature("EagleEye", states[stateChoice])
            end
        end
        if choices[3] then
            gg.alert("Exiting menu.")
            break
        end
    end
end

Değişiklikler:​

  1. ZoomControl ve EagleEye için nil kontrolü: Eğer bir state değeri nil ise, bu durumu yönetmek için kontrol ekledim.
  2. applyFeature fonksiyonu: values bir table olduğunda, her değer için adresi doğru şekilde hesaplamak adına biraz mantık ekledim.
  3. gg.setValues ile address hesaplama: Her bir değer için doğru adresin kullanılması sağlandı.

Potansiyel Sorunlar:​

  • Eğer kodu hala çalıştıramıyorsanız, gg kütüphanesinin doğru şekilde yüklendiğinden ve çalıştığından emin olmalısınız. Eğer gg modülünün doğru versiyonunu kullanmıyorsanız veya ortamınızda bir sorun varsa, kod çalışmayabilir.
 
Üst