Jump to content

Question

Posted (edited)

[ @kiynox ] could this script be any better?

function menus()

 choices = gg.choice({'Prepare spam','Search','Exit'})

 if choices == nil then

  os.exit()

 else

  if choices == 3 then

   os.exit()

  else

   prepares(choices)

  end

 end

end

 

function prepares(choices)

 if choices == 1 then

gg.clearResults()

gg.searchNumber("9;74;8.0", gg.TYPE_FLOAT)

gg.refineNumber('74', gg.TYPE_FLOAT)

chatspam = gg.getResults(gg.getResultsCount())

gg.addListItems(chatspam) 

 

 elseif choices == 2 then

gg.loadResults(chatspam)

gg.getResults(1000)

chatspam = gg.prompt({"Enter which letter you want to spam?(0 = A, 1 = B, 2 = C, 3 = D, 4 = E, 5 = F, 6 = G, 7 = H, 8 = I, 9 = J, 10 = K, 11 = L, 12 = M, 13 = N, 14 = O, 15 = P, 16 = Q, 17 = R, 18 = S, 19 = T, 20 = U, 21 = V, 22 = W, 23 = X, 24 = Y, 25 = Z)"},

{[1] ="0"},

{["1"] ="number"})

if chatspam == nil then 

    gg.alert("you haven't searched anything so the script will restart!")

    return 

end

 

gg.editAll(chatspam[1] ,gg.TYPE_FLOAT)

chatspam = gg.getResults(gg.getResultsCount())

 

 end

end

 

 

knxs = false

while true do

 if gg.isVisible(true) then

  knxs = true

 else

  knxs = false

 end

 if knxs == true then

  menus()

 else

  gg.setVisible(false)

 end

end

Edited by _yourram

Recommended Posts

  • 0
Posted
43 minutes ago, kiynox said:

[ @_yourram ]
---

There's a lot of errors, but I will only explain:

--Clearing results
gg.clearResults()
--Set memory region to Ca
gg.setRanges(gg.REGION_C_ALLOC)
--Search string: "nDstDist"
gg.searchNumber(':nDstDist', 1)
--Refining results that only contain '110' (I have no idea why)
gg.refineNumber('110', 1)
--Saving results as variable 'maintest'
maintest = gg.getResults(6)
--Clearing results
gg.clearResults()
--Taking address of the first result of 'maintest', then use offset -0x18 from the address.
maintest2 = maintest[1].address - 0x18
--Searching address of 'maintest2' (I have no idea why)
gg.searchNumber(maintest2, 32)
--Saving results as variable 'results'
local results = gg.getResults(19)
--(A table that only contain 1, why? (I have no idea why)
local resultnumber = {1}
--Temporary table to store items
local elements = {}
--Enumerating table 'resultnumber' that only contain 1, what? (I have no idea why)
for i, v in ipairs(resultnumber) do
--Check if 'v' is not empty
if results[v] ~= nil then
--Adding table: {address = results[v].address, flags = 16,value = "-9e9"}, to table 'elements'
table.insert(elements, {address = results[v].address, flags = 16,value = "-9e9"})
end
end

--Checking if table 'elements' has more than 0 item
if #elements > 0 then
--Applying changes in table 'elements' to memory
gg.setValues(elements)
end

---

maybe his trying to make a no idea script lol

  • 0
Posted (edited)

【  @kiynox 】

---

1 hour ago, kiynox said:
--Clearing results
gg.clearResults()
--Set memory region to Ca
gg.setRanges(gg.REGION_C_ALLOC)
--Search string: "nDstDist"
gg.searchNumber(':nDstDist', 1)
--Refining results that only contain '110' (I have no idea why)
gg.refineNumber('110', 1)
--Saving results as variable 'maintest'
maintest = gg.getResults(6)
--Clearing results
gg.clearResults()
--Taking address of the first result of 'maintest', then use offset -0x18 from the address.
maintest2 = maintest[1].address - 0x18
--Searching address of 'maintest2' (I have no idea why)
gg.searchNumber(maintest2, 32)
--Saving results as variable 'results'
local results = gg.getResults(19)
--(A table that only contain 1, why? (I have no idea why)
local resultnumber = {1}
--Temporary table to store items
local elements = {}
--Enumerating table 'resultnumber' that only contain 1, what? (I have no idea why)
for i, v in ipairs(resultnumber) do
--Check if 'v' is not empty
if results[v] ~= nil then
--Adding table: {address = results[v].address, flags = 16,value = "-9e9"}, to table 'elements'
table.insert(elements, {address = results[v].address, flags = 16,value = "-9e9"})
end
end

--Checking if table 'elements' has more than 0 item
if #elements > 0 then
--Applying changes in table 'elements' to memory
gg.setValues(elements)
end

thanks, I understood these commands perfectly, but I don't know what mistakes I made, can you fix it too?

---

Edited by _yourram
  • 0
Posted

[ @_yourram ]
---

Quote

thanks, I understood these commands perfectly, but I don't know what mistakes I made, can you fix it too?

If you understood it, you would not say "I don't know what mistakes I made". And no, I can't help you to fix it because I don't know what you're trying to search here:

---[Fix this search yourself]---
gg.searchNumber(':nDstDist', 1)
gg.refineNumber('110', 1)
maintest = gg.getResults(6)
gg.clearResults()
maintest2 = maintest[1].address - 0x18
gg.searchNumber(maintest2, 32)
-------------------------------

---

Quote

can you fix it too?

I can only help fixing the 'table':

local results = gg.getResults(19)
if results ~= nil then
	local elements = {}
	for k, v in ipairs(results) do
		table.insert(elements, {address = v.address, flags = 16, value = "-999"})
	end
	gg.setValues(elements)
end

---

  • 0
Posted

@kiynox 】

---

11 hours ago, kiynox said:

I can only help fixing the 'table':

local results = gg.getResults(19)
if results ~= nil then
	local elements = {}
	for k, v in ipairs(results) do
		table.insert(elements, {address = v.address, flags = 16, value = "-999"})
	end
	gg.setValues(elements)
end

thanks!

12 hours ago, kiynox said:

If you understood it, you would not say "I don't know what mistakes I made". And no, I can't help you to fix it because I don't know what you're trying to search here:

---[Fix this search yourself]---
gg.searchNumber(':nDstDist', 1)
gg.refineNumber('110', 1)
maintest = gg.getResults(6)
gg.clearResults()
maintest2 = maintest[1].address - 0x18
gg.searchNumber(maintest2, 32)
-------------------------------

well this script was given to me by my friend and I was trying to figure out what he was trying to do in this script lol

---

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.