Jump to content
  • 0

help lua how add offset diference and edit


Question

Posted (edited)

i generated this search with gameguardian to generate the lua script but it not save when in go to offset and go to the value and change, i want continue this script by go to ADDRESS i search  and  go to there and add offset

F0   and edit in the new address that value, is not possible the generator save thats changes?if not how put in script to go to that address by  offset more F0?thanks

com.shinybox.smash.lua

Edited by nalcwap

Recommended Posts

  • 0
Posted
2 minutes ago, Enyby said:

Pointer it everywhere pointer. This is just a number in memory. Memory address.

yes i know but is diferent depends the phone or if is emulator?

  • 0
Posted
1 minute ago, Enyby said:

On the phone, the pointers are wet, and on the emulator - salty. There are no other differences.

ok thanks bro

  • 0
Posted (edited)
14 hours ago, Enyby said:

Maybe you will read the help? It says how to freeze. And there are examples on the forum.

In particular, it is not enough to set freeze to true.
It is necessary then to add elements to the saved list.

i put this in final and not freeze

for i, v in ipairs(t) do
   
    t.freeze = true
end
gg.addListItems(t)


end

 

 

 

 

 

 

 

code

- Script generated by GameGuardian 82.1 (15188) at 2019-06-24 00:27:07 for Dungeon Quest [com.shinybox.smash 3.0.5.3 (1423430531)]
-- Lua help: http://gameguardian.net/help/

-- options
local scriptName = [=====[Script for Dungeon Quest 3.0.5.3]=====]
local scriptVersion = '1.0.0'
local scriptAuthor = 'User'
local startToast = ''
-- 0 - no check; 1 - check package only, 2 - check package and build
local checkTarget = 0

local targetName = [=====[Dungeon Quest]=====]
local targetPkg = 'com.shinybox.smash'
local targetVersion = [=====[3.0.5.3]=====]
local targetBuild = 1423430531

-- functions

-- init
gg.require('82.1', 15188)

if startToast ~= '' then startToast = '\n'..startToast end
gg.toast(scriptName..' v'..scriptVersion..' by '..scriptAuthor..startToast)

if checkTarget ~= 0 then
    local info = gg.getTargetInfo()
    local check = false
    local current = false
    if checkTarget >= 1 then
        check = targetPkg
        current = info.packageName
    end
    if checkTarget >= 2 then
        check = check..' '..targetVersion..' ('..targetBuild..')'
        current = current..' '..info.versionName..' ('..info.versionCode..')'
    end
    if check ~= current then
        gg.alert('This script for "'..targetName..'" ['..check..'].\nYou select "'..info.label..'" ['..current..'].\nNow script exit.')
        os.exit()
    end
end
local revert = nil

-- main code
gg.searchNumber("97A2FBE0h", gg.TYPE_AUTO, false, gg.SIGN_EQUAL, 0, -1)

-- Added Code !
_resultCount = gg.getResultCount()
if _resultCount > 0 then -- Check for result, before using value.
    _result = gg.getResults(1) -- Get list no 1.
    
    _address = _result[1].address + 0xF0 -- Add 0xF0 at address list of no 1.

    gg.alert(sf("Original Address: 0x%X\nAddress With Offset 0xF0: 0x%X", 
    _result[1].address, _address))
    
    -- Edit value on address that we added with offset before.
    gg.setValues({{address = _address, flags = gg.TYPE_DWORD, value = 0x1}})

for i, v in ipairs(t) do
   
    t.freeze = true
end
gg.addListItems(t)


end

end
 

 

 

 

Edited by nalcwap
  • 0
Posted
4 minutes ago, Enyby said:

What is "t"?

to tell the true i not know i see the sample, i want freeze the line   

   gg.setValues({{address = _address, flags = gg.TYPE_DWORD, value = 0x1}})

  • 0
  • Administrators
Posted
1 minute ago, nalcwap said:

gg.setValues({{address = _address, flags = gg.TYPE_DWORD, value = 0x1}})

t = {{address = _address, flags = gg.TYPE_DWORD, value = 0x1}}
gg.setValues(t)

Use this code instead.

  • 0
Posted (edited)
5 minutes ago, Enyby said:

t = {{address = _address, flags = gg.TYPE_DWORD, value = 0x1}}
gg.setValues(t)

Use this code instead.

very thanks bro, you mean  this?

 

t = {{address = _address, flags = gg.TYPE_FLOAT, value = 0x9999.0}
gg.setValues(t)
    

for i, v in ipairs(t) do
   
    t.freeze = true
end
gg.addListItems(t)


end

Edited by nalcwap

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.