Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/03/2018 in Posts

  1. The topic for various examples of Lua scripts
    1 point
  2. Search and replace text Up to 32 bytes. Replace must be same length. gg.clearResults() function searchText(text) local bytes = gg.bytes(text, 'UTF-8') local ret = '' for i, b in ipairs(bytes) do ret = ret .. ';' .. b end ret = ret:sub(2)..'::'..#bytes return gg.searchNumber(ret, gg.TYPE_BYTE) end searchText('rfde') function replaceText(text) local bytes = gg.bytes(text, 'UTF-8') local all = gg.getResults(100000) local len = #bytes for i, t in ipairs(all) do t.value = bytes[((i - 1) % len) + 1] end return gg.setValues(all) end replaceText('gold') If you want UTF-16, replace 'UTF-8' in code to 'UTF-16LE'.
    1 point
  3. Frozen values from the search Search for the number 10. The first 7 results are frozen with a value of 8. gg.searchNumber('10', gg.TYPE_DWORD) local t = gg.getResults(7) for i, v in ipairs(t) do t[i].value = '8' t[i].freeze = true end gg.addListItems(t)
    1 point
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.