Hello, @MC874. Thanks for the help. Sorry for the late reply. When I asked my previous question, I mistook refine for something else. Also, my values are DWORDs if that's important to mention.
I decided to check the gg class reference page but I wasn't able to tell what I needed. I got your provided code working somewhat however.
gg.searchNumber("1620;728;1620;728::13", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0x7801000000, 0x9014b5ffff, 0)
--Get the 2nd and 9th position from the results
results = gg.getResults(100)
if results ~= nil then
--Notice results[2] & results[9]
specify = {results[1], results[3], results[5], results[7], results[9], results[11]}
specifytwo = {results[2], results[4], results[6], results[8], results[10]}
for k, v in ipairs(specify) do
specify[k].value = '2400'
specifytwo[k].value = '1080'
end
gg.setValues(specify)
gg.setValues(specifytwo)
end
Sadly, I start getting an error after the first 5-6 times I exit, enter a dungeon and run the code from my testing. This is the error:
Script ended:
Script error: luaj.o: /storage/emulated/0/Notes/gamescript.lua:55
` specifytwo[k].value = '1080'`
table expected for set index ('value') value, got nil (field '?')
level = 1, const = 60, proto = 0, upval = 1, vars = 22, code = 144
SETTABLE v15 "value" "1080"
; PC 132 CODE 9C4E83CA OP 10 A 15 B 312 C 314 Bx 160058 sBx 28987
stack traceback:
/storage/emulated/0/Notes/gamescript.lua:55 in main chunk
[Java]: in ?
at luaj.LuaValue.d(src:2795)
at luaj.LuaValue.b(src:1123)
at luaj.LuaClosure.a(src:383)
at luaj.LuaClosure.l(src:160)
at android.ext.Script.d(src:6056)
at android.ext.Script$ScriptThread.run(src:5785)
Can I do anything about this?
Also, anyway to clean up what I'm currently using? I feel like adding multiple results might not be good because I don't always have the same amount of results. The width of that game's resolution is always even numbers and the height is always odd numbers in results when I use this script so I was wondering if I could take advantage of that.