faiz92786 Posted January 30, 2021 Posted January 30, 2021 Hy guys i need help regard lua I want to edit search value by lua not by using gg.editall because it edit all value found I want to edit few value like i search for group value 1;2;3;4::23 And it find 1 , 2, ,3 ,4 so i want to edit only two value Which if like i want to edit value 2 >98 and value 4>77
0 Farmeriscool Posted January 30, 2021 Posted January 30, 2021 2 hours ago, faiz92786 said: Hy guys i need help regard lua I want to edit search value by lua not by using gg.editall because it edit all value found I want to edit few value like i search for group value 1;2;3;4::23 And it find 1 , 2, ,3 ,4 so i want to edit only two value Which if like i want to edit value 2 >98 and value 4>77 I dont get what your saying just that you want to not use editAll Example 1 is using edit all but let's say I want to edit just 3 gg.searchNumber("1;2;3;4::23", gg.TYPE_URTYPE) gg.refineNumber("3", gg.TYPE_FLOAT) gg.getResults(1) gg.editAll("val", gg.TYPE_URTYPE) That will only edit value 3 But now let me show you a different method without editAll local s gg.searchNumber("1;2;3;4::23", gg.TYPE_URTYPE) s = gg.getResults(AMOUNT) for i,v in ipairs(s) do if v.value == "3" and v.flags == "TYPE" then v.value = "amount" end end 1
0 faiz92786 Posted January 30, 2021 Author Posted January 30, 2021 1 hour ago, Farmeriscool said: I dont get what your saying just that you want to not use editAll Example 1 is using edit all but let's say I want to edit just 3 gg.searchNumber("1;2;3;4::23", gg.TYPE_URTYPE) gg.refineNumber("3", gg.TYPE_FLOAT) gg.getResults(1) gg.editAll("val", gg.TYPE_URTYPE) That will only edit value 3 But now let me show you a different method without editAll local s gg.searchNumber("1;2;3;4::23", gg.TYPE_URTYPE) s = gg.getResults(AMOUNT) for i,v in ipairs(s) do if v.value == "3" and v.flags == "TYPE" then v.value = "amount" end end Bro what if i want to change two value for ex. Value 2 and value 3 , where i want to change value 2 to 8 and value 3 to 99 I also try finding value using offset but value offset are changing on each restart of app Can you please make it for me if i share value and desired value to you ?
0 AKidWithMidgetFriend Posted January 30, 2021 Posted January 30, 2021 (edited) 7 hours ago, faiz92786 said: Bro what if i want to change two value for ex. Value 2 and value 3 , where i want to change value 2 to 8 and value 3 to 99 I also try finding value using offset but value offset are changing on each restart of app Can you please make it for me if i share value and desired value to you ? Then modify the refine number to be 2;3 instead of just three this will give you only the two and threes from the list then with the editAll you want to do it in the same order as they were refined if you wanted to change that 2 into an 8 and that 3 into a 99 then it would look like gg.editAll('8;99', gg.TYPE_DWORD) **EDIT** If I'm remembering wrong and that does not work you can always save the list items after refining it down to 2;3 and then refining to 2 editing the 2 then loading the saved list items and refining down to 3 and editing it as well. This wouldnt be recommended if the first method works because it is a lot more work Edited January 30, 2021 by AKidWithMidgetFriend
0 faiz92786 Posted January 31, 2021 Author Posted January 31, 2021 7 hours ago, AKidWithMidgetFriend said: Then modify the refine number to be 2;3 instead of just three this will give you only the two and threes from the list then with the editAll you want to do it in the same order as they were refined if you wanted to change that 2 into an 8 and that 3 into a 99 then it would look like gg.editAll('8;99', gg.TYPE_DWORD) **EDIT** If I'm remembering wrong and that does not work you can always save the list items after refining it down to 2;3 and then refining to 2 editing the 2 then loading the saved list items and refining down to 3 and editing it as well. This wouldnt be recommended if the first method works because it is a lot more work Bro i have successfully made a script but issue is that , for ex. Value are 1;2;3;4 while 1 is for level of stick and 2 is for card for stick and 4 is for stick code so i am changing level and stick card,but when ever i get new card or i level up i have to change values , i try finding offset but it is changing on every time i restart app , guys suggest me what to do ?
0 AKidWithMidgetFriend Posted January 31, 2021 Posted January 31, 2021 46 minutes ago, faiz92786 said: Bro i have successfully made a script but issue is that , for ex. Value are 1;2;3;4 while 1 is for level of stick and 2 is for card for stick and 4 is for stick code so i am changing level and stick card,but when ever i get new card or i level up i have to change values , i try finding offset but it is changing on every time i restart app , guys suggest me what to do ? Hmmm. By "but when ever i get new card or i level up i have to change values" more specifically the "change values" part do you mean that the address for them changes? Or do the values just reset back to what they'd be unedited? If the address keeps changing then you can try searching nearby the address (use GG's record script action on an empty note or file.txt for an easy outputted code but becareful as to not record script over your actual script because it does overwrite the file that it records to) searching nearby the address would help the script find the new address quickly. However if the values are changing and the address is staying the same then I'd try saving them as list items and setting it up to where if those values aren't equal to a hacked number then edit the list values back up to being hacked
0 faiz92786 Posted January 31, 2021 Author Posted January 31, 2021 1 hour ago, AKidWithMidgetFriend said: Hmmm. By "but when ever i get new card or i level up i have to change values" more specifically the "change values" part do you mean that the address for them changes? Or do the values just reset back to what they'd be unedited? If the address keeps changing then you can try searching nearby the address (use GG's record script action on an empty note or file.txt for an easy outputted code but becareful as to not record script over your actual script because it does overwrite the file that it records to) searching nearby the address would help the script find the new address quickly. However if the values are changing and the address is staying the same then I'd try saving them as list items and setting it up to where if those values aren't equal to a hacked number then edit the list values back up to being hack Other thing i can use to find value by using power , accuracy and guidelines but clue level and clue id is very far from each other
0 faiz92786 Posted January 31, 2021 Author Posted January 31, 2021 1 hour ago, faiz92786 said: Other thing i can use to find value by using power , accuracy and guidelines but clue level and clue id is very far from each other I have an idea what if i make menu prompt which ask for value 1 and value 2 , value 1 is for level and value 2 card i have so script will ask value and add them , how to make it?
0 AKidWithMidgetFriend Posted January 31, 2021 Posted January 31, 2021 You'd have to set up a function for the menu, and then set up a prompt in one of those menu choices. I did something like this in my merge dragons script if you're looking for code to use as reference. You should have something like --- function SCRIPT() menu = gg.multiChoice({ 'Open Prompt', 'Exit', }, nil, 'AKidWithAMidgetFriends Exameple PromptMenu') if menu==nil then gg.alert('Menu Closed') else if menu [1] then PROMPT() end if menu [2] then exit() end end end function PROMPT() local A = gg.prompt({'Level' ,'Card You Have' }, nil ,{[1] = 'number', [2] = 'number'}) val = A[1]..";"..A[2] -- <<<< this is just a concatenation being made into a local variable to search both prompted values and then later edit them both. To edit them separately you could just call on the prompt and index i.e. our Prompt here is A so now we just call an index for the prompt we only have two indexed values so it will either be [1] or [2] if A == nil then gg.alert('Prompt Minimized') gg.setVisible(false) else gg.setRanges(gg.REGION_ANONYMOUS) gg.clearResults() gg.searchNumber( val, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)N NESTEDFUNCTION() end end function NESTEDFUNCTION() -- This is a demonstration of nesting a function inside a function the script will go to this function when the line NESTEDFUNCTION() inside of Prompt is called. With this you can make a menu inside a menu or you could nest multiple functions inside of it that only call under specific situations using if then statements
0 MarioRossi93i Posted January 31, 2021 Posted January 31, 2021 gg.searchNumber('1;2;3;4::13, 4) --edit type if needed r = gg.getResults( gg.getResultsCount() ) for i=1, #r do if r.value == 2 then g.setValues({{ address = r.address, flags = 4, value = 98 }}) end if r.value == 4 then g.setValues({{ address=r.address, flags=4, value = 77 end end [added 2 minutes later] . [added 3 minutes later] Sorry msg auto edited
Question
faiz92786
Hy guys i need help regard lua
I want to edit search value by lua not by using
gg.editall because it edit all value found
I want to edit few value like i search for group value 1;2;3;4::23
And it find 1 , 2, ,3 ,4 so i want to edit only two value
Which if like i want to edit value 2 >98 and value 4>77
9 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