Jump to content
CodeKiller

Recorded script (change one value) does not work

Recommended Posts

Hello all,

I recorded a simple script that change a value, and it does not work (I just clear the useless loop because apparently the recording tool does not really record what your do, too bad) :
 

-- Script generated by GameGuardian 86.3 (15505) at 2019-09-20 10:06:36 for DB LEGENDS [com.bandainamcoent.dblegends_ww 1.37.1 (107)]
-- Lua help: http://gameguardian.net/help/

-- options
local scriptName = [=====[Script for DB LEGENDS 1.37.1]=====]
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 = [=====[DB LEGENDS]=====]
local targetPkg = 'com.bandainamcoent.dblegends_ww'
local targetVersion = [=====[1.37.1]=====]
local targetBuild = 107

-- functions

-- init
gg.require('86.3', 15505)

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

local v = gg.getListItems()
v[1].flags = gg.TYPE_FLOAT
v[1].value = "9999999"
v[1].freeze = false
v[1].freezeType = gg.FREEZE_NORMAL


So the main code is really simple as you can see, but it does not work...

Any idea ?

Thanks.

Share this post


Link to post
Share on other sites

51 minutes ago, CodeKiller said:

I just clear the useless loop because apparently the recording tool does not really record what your do, too bad) :

Reason why it not work - because you break it.

Share this post


Link to post
Share on other sites

i dont get..its always work for me.

should we search the value first...then change it..??

from what i know..when you change Float value...its change back to original value when you exit the game.

Edited by zam535582

Share this post


Link to post
Share on other sites
1 hour ago, zam535582 said:

i dont get..its always work for me.

should we search the value first...then change it..??

from what i know..when you change Float value...its change back to original value when you exit the game.

Yes you need to search the value first.

[added 3 minutes later]
On 9/20/2019 at 1:51 PM, CodeKiller said:

Hello all,

I recorded a simple script that change a value, and it does not work (I just clear the useless loop because apparently the recording tool does not really record what your do, too bad) :
 


-- Script generated by GameGuardian 86.3 (15505) at 2019-09-20 10:06:36 for DB LEGENDS [com.bandainamcoent.dblegends_ww 1.37.1 (107)]
-- Lua help: http://gameguardian.net/help/

-- options
local scriptName = [=====[Script for DB LEGENDS 1.37.1]=====]
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 = [=====[DB LEGENDS]=====]
local targetPkg = 'com.bandainamcoent.dblegends_ww'
local targetVersion = [=====[1.37.1]=====]
local targetBuild = 107

-- functions

-- init
gg.require('86.3', 15505)

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

local v = gg.getListItems()
v[1].flags = gg.TYPE_FLOAT
v[1].value = "9999999"
v[1].freeze = false
v[1].freezeType = gg.FREEZE_NORMAL


So the main code is really simple as you can see, but it does not work...

Any idea ?

Thanks.

This will never work because of broken code.

If you are not freezing the values then simply use search and edit funtion.Otherwise you can use this , after searching the value ..

gg.searchNumber('1', gg.TYPE_FLOAT) -- don't use this if you are searching the value manually
local v = gg.getResults(1)
--local v = gg.getListItems() --add this if you have already saved the value manually
for i,t in pairs(v) do
if t.flags == gg.TYPE_FLOAT then
v[1].value = "9999999"
v[1].freeze = true
v[1].freezeType = gg.FREEZE_NORMAL
end
end
gg.addListItems(v)

 

 

Share this post


Link to post
Share on other sites

This Pubg wallhack script was made by GG record script.

Im just keep the main codes...deleted the rest of it.

its never fails on me. 

 

 

-- main code

gg.setRanges(gg.REGION_C_ALLOC)

gg.searchNumber('"0.5;0.5;2.8025969e-45;1.4012985e-45;3.8115318e-43;2.2958874e-41:125"', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)

gg.refineNumber('"0.5"', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)

 

revert = gg.getResults(20, nil, nil, nil, nil, nil, nil, nil, nil)

local t = gg.getResults(20, nil, nil, nil, nil, nil, nil, nil, nil)

for i, v in ipairs(t) do

if v.flags == gg.TYPE_FLOAT then

v.value = '"1"'

v.freeze = true

end

end

gg.addListItems(t)

t = nil

 

 

gg.clearResults()

gg.processResume()

 

Share this post


Link to post
Share on other sites

Yeah this works bcoz it's basically the same thing as we write a script for search and edit. It's complete in it's way.

Share this post


Link to post
Share on other sites

so there is nothing wrong with GG record script function.

its just people who mess up with the script that already perfectly made by GG.

 

Share this post


Link to post
Share on other sites

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...