Jump to content
  • 0

need help write a script


zolotov123344

Question

Need help writing a script. Let's start. I have a value of 100 in qword, when searching for them, anonymous finds 500 pieces, I need the script to take each value of 100 and go down 15 lines and check this value if it is 1 qword, then the script remembers this value of 100 qword and does such a check with with all the other 100 qwords after only one 100 qword remains, skrt must move from this 100 qword one cell down and change it, please help!

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

hi u need to find a better search first time when u locate ur right value help u with near number to make an group search to limit result and if needed u can also use offset( group search without number of your value )

Link to comment
Share on other sites

17 minutes ago, blocx said:

привет вам нужно найти лучший поиск в первый раз, когда вы найдете правильное значение ur, помогите вам с рядом с номером, чтобы выполнить групповой поиск, чтобы ограничить результат, и при необходимости вы также можете использовать смещение (групповой поиск без номера вашего значения)

I personally know about all these group searches, but my task is to optimize the code, now the function turns on for about 15 seconds and it takes less than 2

Link to comment
Share on other sites

29 minutes ago, Crystal_Mods100x said:

прежде чем я смогу создать функцию смещения

сколько результатов вы получите при поиске этого значения qword?

и это значение на 15 строк ниже, в какой тип данных вы его редактируете?

 

qword finds 50 ~ 100. You do not understand it is not necessary to change the values 15 lines below it is necessary for the script to check whether it is equal to 1 in qword

Link to comment
Share on other sites

8 minutes ago, zolotov123344 said:

qword finds 50 ~ 100. You do not understand it is not necessary to change the values 15 lines below it is necessary for the script to check whether it is equal to 1 in qword

gg .getResults (100)

local loopthis = {}

 loopthis = gg .getResults (100)

for i, v in pairs (loopthis)

if v.value == 1 and 

v.flags == gg .TYPE_QWORD then do 

* Whatever you want done to the value *

 end

end

Would you like an explanation on what's happening line by line?

Link to comment
Share on other sites

1 hour ago, AKidWithMidgetFriend said:

gg .getResults (100)

local loopthis = {}

 loopthis = gg .getResults (100)

for i, v in pairs (loopthis)

if v.value == 1 and 

v.flags == gg .TYPE_QWORD then do 

* Whatever you want done to the value *

 end

end

Would you like an explanation on what's happening line by line?

this is not what i need

Link to comment
Share on other sites

gg.setRanges(gg.REGION_ANONYMOUS) --set anonymous memory region
gg.clearResults()
gg.searchNumber(100, gg.TYPE_QWORD) --search Qword value 100
res = gg.getResults(99999) --store results in table res
checkRes={} --this table will be used to check at line 15
finalRes = {} --after checking, we will store here
for i, v in ipairs(res) do --loop.Dont ask me idk what it is.
  checkRes[i] = {}
  checkRes[i].address = res[i].address + 0x3c --Put offset between qword 100 and your 1. dont put line 15 XD
  checkRes[i].flags = gg.TYPE_DWORD --put datatype of your 1.
end
checkRes = gg.getValues(checkRes)
--Now we have all values at 15 lines of qword 100.If you want to know, use print(checkRes). Now lets choose only 1.
for i, v in ipairs(checkRes) do
  if v.value== 1 then table.insert(finalRes, res[i]) end
end
if #finalRes==0 then return print('Not found desired value') end
--Now we have Right qword 100 Values in finalRes.use print(finalRes) if want to know. Now its time to edit.
gg.addListItems(finalRes) --I'll add those in saved list. delete if you dont want.
editVal = {}
for i, v in ipairs(finalRes) do
  editVal[i]={}
  editVal[i].address=finalRes[i].address+0x4 --if one cell down, i think offset 4
  editVal[i].flags=4 --if want edit dword
  editVal[i].value = 123456 --if u want 123456
end
gg.setValues(editVal) 
  
--whenever u confuse, use print(blahblah) and check their progress

If this is not, i think you should change your help question.

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.