BloodMoonScript Posted June 10, 2024 Posted June 10, 2024 how do I change the value in the script via "add value"? I no need change directly like gg.editAll("1", gg.TYPE_DOUBLE) I need if my value 15000, i write 2000, then this value = 17000 Ik how did it in gg, but idk how write to script
kiynox Posted June 11, 2024 Posted June 11, 2024 [ @BloodMoonScript ] --- Quote I need if my value 15000, i write 2000, then this value = 17000 Get the results -> Use gg.prompt() to ask user for the value to add -> Edit value from each result -> Apply the changes using gg.setValues() gg.clearResults() local search_input = gg.prompt( {'Enter a value to search: '}, {nil}, {'number'} ) if search_input[1] then gg.searchNumber(search_input[1], gg.TYPE_DWORD) local add_input = gg.prompt( {'Enter a value to add: '}, {nil}, {'number'} ) if add_input[1] then local enumerate = gg.getResults(gg.getResultsCount()) for k, v in ipairs(enumerate) do v.value = v.value + add_input[1] end gg.setValues(enumerate) end end ---
BloodMoonScript Posted June 12, 2024 Author Posted June 12, 2024 11 hours ago, kiynox said: [ @BloodMoonScript ] --- Get the results -> Use gg.prompt() to ask user for the value to add -> Edit value from each result -> Apply the changes using gg.setValues() gg.clearResults() local search_input = gg.prompt( {'Enter a value to search: '}, {nil}, {'number'} ) if search_input[1] then gg.searchNumber(search_input[1], gg.TYPE_DWORD) local add_input = gg.prompt( {'Enter a value to add: '}, {nil}, {'number'} ) if add_input[1] then local enumerate = gg.getResults(gg.getResultsCount()) for k, v in ipairs(enumerate) do v.value = v.value + add_input[1] end gg.setValues(enumerate) end end --- Thx ofc, but i already did
Moderators Collen Posted June 10, 2024 Moderators Posted June 10, 2024 42 minutes ago, BloodMoonScript said: how do I change the value in the script via "add value"? I no need change directly like gg.editAll("1", gg.TYPE_DOUBLE) I need if my value 15000, i write 2000, then this value = 17000 Ik how did it in gg, but idk how write to script Maybe this? Any lua script command to just ADD to a value?? (#bhof9etu)
BloodMoonScript Posted June 10, 2024 Author Posted June 10, 2024 23 minutes ago, Collen said: Maybe this? Any lua script command to just ADD to a value?? (#bhof9etu) Already did, forget write
Question
BloodMoonScript
how do I change the value in the script via "add value"?
I no need change directly like gg.editAll("1", gg.TYPE_DOUBLE)
I need if my value 15000, i write 2000, then this value = 17000
Ik how did it in gg, but idk how write to script
4 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.