Jump to content
  • 0

how can I create a script with this code


allroundergaming

Question

6 answers to this question

Recommended Posts

in the end it is not very clear how you changed the values, try to see if this works, I cannot test it personally

	gg.clearResults()
gg.searchNumber('-139100160;144670709;-139100160;144670709::13',4)
if gg.getResultCount()==0 then
    print('No results.')
    os.exit()
end
r = gg.getResults(1)
gg.clearResults()
	r = gg.getValues({
    {
        address = r[1].address-0x356,
        flags = 4
    },
    {
        address = r[1].address-0x352,
        flags = 4
    },
    {
        address = r[1].address-0x34E, 
        flags = 4
    },
    {
        address = r[1].address-0x34A,
        flags = 4
    },
    {
        address = r[1].address-0x346,
        flags = 4
    },
    {
        address = r[1].address-0x342,
        flags = 4
    },
})
	for i=1, #r do
    if i==5 then r[i].value=0 end
    if i==6 then r[i].value=9 end
    r[i].freeze = true
end
	
gg.addListItems(r)
	

Link to comment
Share on other sites

How many results you get if you search manually -139100160;144670709;-139100160;144670709::13

maybe your search give multiple results, so u hqve to search for other fixed values or have to edit all of them.

If, for example, you know that value for offset -0x356 is always 6 you could add this check to script

[added 4 minutes later]

...give me play link for the gwme, i ll test it  on my device

Link to comment
Share on other sites

ok sorry, my mystake i thought offset values were hex

what is this hack for? I have installed the game and would like to test it

	gg.clearResults()
gg.searchNumber('-139100160;144670709;-139100160;144670709::13',4)
if gg.getResultCount()==0 then
    print('No results.')
    os.exit()
end
r = gg.getResults(1)
gg.clearResults()
	r = gg.getValues({
    {
        address = r[1].address-356,
        flags = 4
    },
    {
        address = r[1].address-352,
        flags = 4
    },
    {
        address = r[1].address-348, 
        flags = 4
    },
    {
        address = r[1].address-344,
        flags = 4
    },
    {
        address = r[1].address-340,
        flags = 4
    },
    {
        address = r[1].address-336,
        flags = 4
    },
})
	for i=1, #r do
    if i==5 then r[i].value=0 end
    if i==6 then r[i].value=9 end
    r[i].freeze = true
end
	
gg.addListItems(r)
	

[added 4 minutes later]

You can speed up search using

gg.searchNumber('h0080B5F7F57F9F080080B5F7F57F9F08')

Link to comment
Share on other sites

sorry for late reply it was night time so I was sleeping at that time

in the game's home screen there is an icon called battle mode in the battle mode there are many towers but in the last tower after you complete the last tower it will give you a lots of reward but you can complete it only one time this is the code of the last tower which helps to freeze the last tower so that you can complete last tower unlimited times and farm unlimited rewards

Link to comment
Share on other sites

Ok this is working for me (tested on 64bit only)

	local base,g,i,ls,s
	g = gg
g.setVisible(false)
g.clearResults()
	--[[
-139100160;
144670709;
-139100160;
144670709
]]--
	s = 'h0080B5F7F57F9F080080B5F7F57F9F08'
g.searchNumber(s)
if g.getResultCount()==0 then
    print('No results.')
    os.exit()
end
base = g.getResults(1)
base = base[1].address
g.clearResults()
	ls = {
    [1] = {
        name = 'Tower 1',
        off = 0x11C,
        value = 6
    },
    [2] = {
        name = 'Tower 2',
        off = 0x110,
        value = 6
    },
    [3] = {
        name = 'Sub Tower 1',
        off = 0x118,
        value = 6
    },
    [4] = {
        name = 'Sub Tower 2',
        off = 0x10C,
        value = 6
    },
    [5] = {
        name = 'Match 1',
        off = 0x114,
        value = 9
    },
    [6] = {
        name = 'Match 2',
        off = 0x108,
        value = 9
    },
    [7] = {
        name = 'Flag 1',
        off = 0x104,
        value = 0
    },
    [8] = {
        name = 'Flag 2',
        off = 0x100,
        value = 0
    }
}
	for i=1, #ls do
    g.setValues({
        {
            address = base-ls[i].off,
            flags = 0x04,
            value = ls[i].value
        }
    })
end
	
g.toast('Done!')
os.exit()
	

Link to comment
Share on other sites

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.