Jump to content
  • 0

How to get value in list Items and paste to search list


hoangninyb

Question

I'm new to scripting, please help me!

my code
-----
gg.clearResults()
                      ---- table containing offsets values to be taken
gg.searchNumber("800;6;2000::512" , gg.TYPE_DWORD) ---your group search value / or your search number
gg.refineNumber("6", gg.TYPE_DWORD)  -- refining the searched value to required value
p = gg.getResultCount()                -- saving the results count
q = gg.getResults(p)                   -- saving the results

-- using loop to edit the values at the offsets one by one
for i = 1,p do
            id = {}
            id = {}
            id.address = q.address + -16
            id.flags = 4           
gg.getValues(id)
gg.addListItems(id)
end

for i = 1,p do
            t = {}
            t = {}
            t.address = q.address + 32
            t.flags = 4 
            t.value = 120
            t.freeze = true              
gg.setValues(t)
gg.addListItems(t)
end
----

IMG_20210629_230956.jpg

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

3 minutes ago, hoangninyb said:

Thank you! But it doesn't work

Sorry about that. I just tried the record script function and saw that command was in there and thought it might work for you.

Try this thread:

lua | is possible, search - edit - save & search that & edit? (#27yte64y)

 

I think they are asking a similar question to yours. Give that a try.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.