Jump to content
  • 0

using a condition in a script


BotBot72826

Question

Posted

hello

please help me make a script that will look for ":2.23.0" and if it does not find anything, the script will end, and if it finds it, it will display the text through gg.alert

 

 

thanks in advance and sorry for my english

 

3 answers to this question

Recommended Posts

Posted

 

Quote

gg.searchNumber(":2.23.0", gg.TYPE_BYTE, false, gg.SIGN_EQUAL, 0, -1, 0)

if gg.getResultsCount() ==0 then gg.alert("0 results") os.exit() end

 

get text somehow and show it

gg.alert(text)

Posted
On 11/17/2022 at 1:27 PM, Rs92ks said:

gg.searchNumber(":2.23.0", gg.TYPE_BYTE, false, gg.SIGN_EQUAL, 0, -1, 0)

if gg.getResultsCount() ==0 then gg.alert("0 results") os.exit()

else

t = gg.getResults(gg.getResultsCount())
text = {}
for i = 7 ,#t,7 in ipairs(t) do 
text[#text+1].value = string.char(t[i-6].value,t[i-5].value,t[i-4].value,t[i-3].value,t[i-2].value,t[i-1].value,t[i].value)
text[#text].address = t[i-6].address

end
string_result = ''
for k,v in ipairs(text) do
string_result = string_result..'\nValue '..k..'= '..(text[k].value)..'  address is : '..(text[k].address)

end

gg.alert(string_result)

 

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.