Shuaiouke Posted February 3, 2019 Posted February 3, 2019 I have seen How do you edit a specific memory addresses value via a lua script (#670falkv) before, but that's editing one specific address, I want it to edit from something like EC16100 or whatever to something like EC161FF basically editing a bunch of addresses PS.to the same value
0 Administrators Enyby Posted February 3, 2019 Administrators Posted February 3, 2019 1. Start fuzzy search limited specified range. Edit all found result to desired value. 2. Or. Build table with need values in loop and use setValues. 3
0 Shuaiouke Posted February 3, 2019 Author Posted February 3, 2019 7 hours ago, Enyby said: 1. Start fuzzy search limited specified range. Edit all found result to desired value. 2. Or. Build table with need values in loop and use setValues. emm, is there other ways to do it? if not, how to use loop to edit value by address
0 Administrators Enyby Posted February 3, 2019 Administrators Posted February 3, 2019 Other ways similar. But first is most easy. Read API help and make 3 calls for it. clearResults, startFuzzy, editAll. 1
0 Shuaiouke Posted February 3, 2019 Author Posted February 3, 2019 Emm you misunderstanded me I know the address I’m editing it just there’s 500 vars to change I’m not doing a fuzzy search not even a search just edit addresses
0 BadCase Posted February 3, 2019 Posted February 3, 2019 5 hours ago, Shuaiouke said: emm, is there other ways to do it? if not, how to use loop to edit value by address local t = {} t[1] = {} t[1].address = 0x18004030 t[1].flags = gg.TYPE_DWORD t[2] = {} t[2].address = 0x18004034 t[2].flags = gg.TYPE_DWORD t[3] = {} t[3].address = 0x18004038 t[3].flags = gg.TYPE_DWORD gg.loadResults(t) yourTable = gg.getResults(3) for i,v in ipairs(yourTable) do yourTable.value = 10000 yourTable.flags = gg.TYPE_DWORD end gg.setValues(yourTable) 1
0 Administrators Enyby Posted February 3, 2019 Administrators Posted February 3, 2019 @Shuaiouke No. I understand you right. You need search your 500 address and change it. But you can use long way with loop if you want. 3
0 Shuaiouke Posted February 4, 2019 Author Posted February 4, 2019 So first, that's not efficient, since there are over 500 addresses to edit, and second, anyone knows how to use a loop to edit addresses progressively.
0 Administrators Enyby Posted February 4, 2019 Administrators Posted February 4, 2019 You choose not only worst possible way, you try it make more worst. Progressive edit is much worst in performance terms. 2
0 Shuaiouke Posted February 4, 2019 Author Posted February 4, 2019 So just give me a sec, I want a loop to edit the addresses one by one, that's what I mean by progressively since I don't even know there's soemthing called progressive edit, want a loop like for(int i = 0, i < Number of the addresses, i++) { string t =" address"; t.value = 1; } at least that's how u write it in Java
0 CmP Posted February 4, 2019 Posted February 4, 2019 50 minutes ago, Shuaiouke said: that's not efficient Have you tried it at least? I highly doubt that searching for 500 consecutive addresses and editing all of them to one value can noticeably slow down your script. So are you sure that it does not suffice because of performance reasons? 1 hour ago, Shuaiouke said: anyone knows how to use a loop to edit addresses progressively As pointed out above, editing values one-by-one in a loop is very inefficient. This approach should be used instead, if simple one with fuzzy search does not suffice: On 2/3/2019 at 4:33 AM, Enyby said: 2. Or. Build table with need values in loop and use setValues. Example of implementing it: local startAddress = 0x12340000 local count = 500 local editValue = '555444' local values = {} for i = 1, count do values[i] = {address = startAddress; flags = gg.TYPE_DWORD; value = editValue} startAddress = startAddress + 4 end gg.setValues(values) 3
0 Shuaiouke Posted February 4, 2019 Author Posted February 4, 2019 first, I don't care about time since it's editing like characters u have so it's in the menu and it's singleplayer, and second, how do I make the script u made to fit what I need first wat does editValue does and wat does values list do
Question
Shuaiouke
I have seen
How do you edit a specific memory addresses value via a lua script (#670falkv)before, but that's editing one specific address, I want it to edit from something like EC16100 or whatever to something like EC161FF
basically editing a bunch of addresses
PS.to the same value
11 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now