sodaface Posted March 24, 2021 Posted March 24, 2021 Hello. Quote gg.searchNumber("95;75;3;200;1;130;9;1,075,419,546;26;1,065,353,216;26;1,094,713,344;26:49", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0) local results = gg.getResults(100) for i, v in ipairs(results) do if v.value == '75' then v.value = '85' end if v.value == '26' then v.value = '4000' end if v.value == '130' then v.value = '1400' end if v.value == '9' then v.value = '400' end gg.clearResults() end This is part of a larger script , and the script runs fine , no errors , but doesn't actually search and replace. I'm sure the answer must be staring me in the face .....but I've got nfi
0 MonkeySAN Posted March 24, 2021 Posted March 24, 2021 (edited) local gg = gg gg.setRanges(32) gg.searchNumber("95;75;3;200;1;130;9;1,075,419,546;26;1,065,353,216;26;1,094,713,344;26::49", 4) gg.refineNumber("75;130;9;26") local results = gg.getResults(10) for i,v in pairs(results) do if v.value == 75 then v.value = 85 end if v.value == 130 then v.value = 1400 end if v.value == 9 then v.value = 400 end if v.value == 26 then v.value = 4000 end gg.setValues(results) --gg.addListItems(results) gg.clearResults() gg.toast("Done") end Edited March 24, 2021 by MonkeySAN typo 2
0 CmP Posted March 25, 2021 Posted March 25, 2021 @MonkeySAN you probably forgot to end the loop before calling "setValues" function. It doesn't need to be called in loop, just once after it instead.
0 MonkeySAN Posted March 25, 2021 Posted March 25, 2021 local gg = gg gg.setRanges(32) gg.searchNumber("95;75;3;200;1;130;9;1,075,419,546;26;1,065,353,216;26;1,094,713,344;26::49", 4) gg.refineNumber("75;130;9;26") local results = gg.getResults(10) for i,v in pairs(results) do if v.value == 75 then v.value = 85 end if v.value == 130 then v.value = 1400 end if v.value == 9 then v.value = 400 end if v.value == 26 then v.value = 4000 end end gg.setValues(results) --gg.addListItems(results) gg.clearResults() gg.toast("Done") --end 2
0 sodaface Posted March 25, 2021 Author Posted March 25, 2021 2 minutes ago, MonkeySAN said: local gg = gg gg.setRanges(32) gg.searchNumber("95;75;3;200;1;130;9;1,075,419,546;26;1,065,353,216;26;1,094,713,344;26::49", 4) gg.refineNumber("75;130;9;26") local results = gg.getResults(10) for i,v in pairs(results) do if v.value == 75 then v.value = 85 end if v.value == 130 then v.value = 1400 end if v.value == 9 then v.value = 400 end if v.value == 26 then v.value = 4000 end end gg.setValues(results) --gg.addListItems(results) gg.clearResults() gg.toast("Done") --end Thanks. I see I made a few rookie mistakes. Is it necessary to refine the results before giving them new values ?
0 MonkeySAN Posted March 25, 2021 Posted March 25, 2021 hmm.... im not the expert...maybe not? im sometime use it and sometime not too. btw check this out : DWZ_Weapon.mp4
0 sodaface Posted March 25, 2021 Author Posted March 25, 2021 (edited) nice work. My script requires no user input. Also reload at 9999 is probably a bad thing Thanks again for your advice...... i'm obviously learning slower than i hoped Edited March 25, 2021 by sodaface
0 MonkeySAN Posted March 25, 2021 Posted March 25, 2021 only 1 value changed to max all of that..but it actually didnt work ..only visuals. its yours that really work. btw im guess you got HP hack too??
0 sodaface Posted March 25, 2021 Author Posted March 25, 2021 Haven't looked at that yet. Wanted to get the first part sorted. Is HP possible ?
0 MonkeySAN Posted March 25, 2021 Posted March 25, 2021 yup..its really posibble and easy. HP and Defense. one is in Dword and the other is Float.. search either one of them... go up or down...you sure will find the other one. or just search both at the same time. which is which and which one come first that.. im sure you can figure it out.
0 sodaface Posted March 25, 2021 Author Posted March 25, 2021 (edited) Right. Well. I'll add more to my script I guess ------ Oh that was easy. And all these hacks work in PvP too. Oh dear. Edited March 25, 2021 by sodaface
0 MAARS Posted March 25, 2021 Posted March 25, 2021 11 hours ago, MonkeySAN said: local gg = gg gg.setRanges(32) gg.searchNumber("95;75;3;200;1;130;9;1,075,419,546;26;1,065,353,216;26;1,094,713,344;26::49", 4) gg.refineNumber("75;130;9;26") local results = gg.getResults(10) for i,v in pairs(results) do if v.value == 75 then v.value = 85 end if v.value == 130 then v.value = 1400 end if v.value == 9 then v.value = 400 end if v.value == 26 then v.value = 4000 end end gg.setValues(results) --gg.addListItems(results) gg.clearResults() gg.toast("Done") --end why dont you use elseif statement ?
0 MonkeySAN Posted March 25, 2021 Posted March 25, 2021 obviously you can.. local gg = gg gg.setRanges(32) gg.searchNumber("95;75;3;200;1;130;9;1,075,419,546;26;1,065,353,216;26;1,094,713,344;26::49", 4) gg.refineNumber("75;130;9;26") local results = gg.getResults(10) for i,v in pairs(results) do if v.value == 75 then v.value = 85 elseif v.value == 130 then v.value = 1400 elseif v.value == 9 then v.value = 400 elseif v.value == 26 then v.value = 4000 end end gg.setValues(results) --gg.addListItems(results) gg.clearResults() gg.toast("Done") --end
0 PublicHax Posted March 26, 2021 Posted March 26, 2021 bruh local x = [=[STARTED]=] gg.toast(x) a = 7.31 b = -1 gg.searchNumber(a, gg.TYPE_FLOAT) gg.getResults(88888) gg.editAll(b, gg.TYPE_FLOAT) local y = [=[Activated]=] gg.alert(y) local z = [=[END]=] print(z) 1
Question
sodaface
Hello.
This is part of a larger script , and the script runs fine , no errors , but doesn't actually search and replace.
I'm sure the answer must be staring me in the face .....but I've got nfi
18 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