So,I'm kind of a noob and i need your help as you can see from the lua script below...i want to make the "hold" a global varibiable so i can use it to change the speed() without scanning the hold again and doing it with a method of changing the value of speed wich is present with hold in goto and by calculating offset getting the address of speed(can't do it directly with address because not static address)
function Hold()
gg.clearResults()
gg.searchNumber("1100;12;13;16::13", gg.TYPE_DWORD)
gg.refineNumber("1100", gg.TYPE_DWORD)
hold = gg.getResults(1)
hold = 12
local hld = {}
hld[1] = hold[1]
hld[1].flags = gg.TYPE_DWORD
hld[1].value = 999999999
hld[1].freeze = true
gg.addListItems(hold)
gg.clearResults()
end
function speed()
gg.clearResults()
local spd = {}
spd[1] = {}
spd[1].address = hold[12].address + 0x4
spd[1].flags = gg.TYPE_DWORD
spd[1].value = 99
spd[1].freeze = true
gg.addListItems(hold)
gg.clearResults()
end
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.
Question
Aanon007
So,I'm kind of a noob and i need your help as you can see from the lua script below...i want to make the "hold" a global varibiable so i can use it to change the speed() without scanning the hold again and doing it with a method of changing the value of speed wich is present with hold in goto and by calculating offset getting the address of speed(can't do it directly with address because not static address)
function Hold()
gg.clearResults()
gg.searchNumber("1100;12;13;16::13", gg.TYPE_DWORD)
gg.refineNumber("1100", gg.TYPE_DWORD)
hold = gg.getResults(1)
hold = 12
local hld = {}
hld[1] = hold[1]
hld[1].flags = gg.TYPE_DWORD
hld[1].value = 999999999
hld[1].freeze = true
gg.addListItems(hold)
gg.clearResults()
end
function speed()
gg.clearResults()
local spd = {}
spd[1] = {}
spd[1].address = hold[12].address + 0x4
spd[1].flags = gg.TYPE_DWORD
spd[1].value = 99
spd[1].freeze = true
gg.addListItems(hold)
gg.clearResults()
end
3 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.