Jump to content
allroundergaming

Please Help me with my script

Recommended Posts

I don't understand why my script is not working what I am doing wrong here is the script that I created

 gg.clearResults()

gg.searchNumber('-574,128,128',4)

gg.searchAddress("7AC4102570")

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==6 then r.value=6 end

    if i==9 then r.value=9 end

    if i==0 then r.value=0 end

    r.freeze = true

end

 

gg.addListItems(r)

it should edit the value like this :- 6;6;9;6;6;9

But it edits the value like this :- 6;6;9;6;6;6

 someone please please help me.

 

THANK YOU.

Share this post


Link to post
Share on other sites
6 hours ago, allroundergaming said:

I don't understand why my script is not working what I am doing wrong here is the script that I created

 gg.clearResults()

gg.searchNumber('-574,128,128',4)

gg.searchAddress("7AC4102570")

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==6 then r.value=6 end

    if i==9 then r.value=9 end

    if i==0 then r.value=0 end

    r.freeze = true

end

 

gg.addListItems(r)

it should edit the value like this :- 6;6;9;6;6;9

But it edits the value like this :- 6;6;9;6;6;6

 someone please please help me.

 

THANK YOU.

	gg.clearResults()
	gg.searchNumber('-574,128,128',4) -- why search this if you don t use it?
	gg.searchAddress("7AC4102570")
	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==6 then r.value=6 end -- you should use r[i].value
	    if i==9 then r.value=9 end
	    if i==0 then r.value=0 end -- 'i' can t be equal 0
	    r.freeze = true
	end
	 
	gg.addListItems(r)
	

Share this post


Link to post
Share on other sites

You don't need to use "getValues" function, if you just need to set the values (whether with freeze or without) regardless of their current value.

gg.clearResults()
gg.searchNumber('-574,128,128',4)
gg.searchAddress("7AC4102570")
if gg.getResultCount()==0 then
  print('No results.')
  os.exit()
end
r = gg.getResults(1)
gg.clearResults()
local addr = r[1].address
local v = {
  {address = addr - 356, value = 6},
  {address = addr - 352, value = 6},
  {address = addr - 348, value = 9},
  {address = addr - 344, value = 6},
  {address = addr - 340, value = 6},
  {address = addr - 336, value = 9}
}
for i, v in ipairs(v) do
  v.flags = 4
  v.freeze = true
end
gg.addListItems(v)

Share this post


Link to post
Share on other sites
2 hours ago, CmP said:

You don't need to use "getValues" function, if you just need to set the values (whether with freeze or without) regardless of their current value.


gg.clearResults()
gg.searchNumber('-574,128,128',4)
gg.searchAddress("7AC4102570")
if gg.getResultCount()==0 then
  print('No results.')
  os.exit()
end
r = gg.getResults(1)
gg.clearResults()
local addr = r[1].address
local v = {
  {address = addr - 356, value = 6},
  {address = addr - 352, value = 6},
  {address = addr - 348, value = 9},
  {address = addr - 344, value = 6},
  {address = addr - 340, value = 6},
  {address = addr - 336, value = 9}
}
for i, v in ipairs(v) do
  v.flags = 4
  v.freeze = true
end
gg.addListItems(v)

Clean code

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

  • Similar Content

    • By jjolatunji
      Anything values to modify HP, ATK, Gold/ currency. I tried using GG to find values the values changes too but only visually. Need help. I have tagged apk file below the playstore version has other name Samurai Training New Era.
    • By MarioRossi93i
      View File Real Racing 3 (9.4.0) Race Mode
      REAL RACING 3 RACE MODE
       
      Current version: 9.4.0.3.3
      RR3 working version: 9.4.0
       
      Description:
      With this script you can enable/disable following hacks:
      - Autodrive Mode
      - Freeze Mode
      - Ghost Mode
      - KickAss Mode (not helpful if you active ghost mode too)
      - Set formula-e battery to 100%
       
      Works with standard and rolling start
      FULLY COMPATIBLE WITH BOTH 32 AND 64 BIT DEVICES
       
      Instructions:
      Run this script after signal light has turned green.
       
      If script doesn t work use S version
       
      Video:
       
       
       
      Submitter MarioRossi93i Submitted 05/13/2020 Category LUA scripts  
    • By MarioRossi93i
      REAL RACING 3 RACE MODE
       
      Current version: 9.4.0.3.3
      RR3 working version: 9.4.0
       
      Description:
      With this script you can enable/disable following hacks:
      - Autodrive Mode
      - Freeze Mode
      - Ghost Mode
      - KickAss Mode (not helpful if you active ghost mode too)
      - Set formula-e battery to 100%
       
      Works with standard and rolling start
      FULLY COMPATIBLE WITH BOTH 32 AND 64 BIT DEVICES
       
      Instructions:
      Run this script after signal light has turned green.
       
      If script doesn t work use S version
       
      Video:
       
       
       
    • By 101mod
      View File FREE ESP HACK PUBG 1.3 - www.101mod.com
      Link download Apk in description video
      👉ESP FREE 1.3: https://www101mod.com
       🙏IM SHARE FREE HACK WORK 100% | PLEASE VISIT MY CHANNEL🙏:  
      👉https://www.youtube.com/channel/UCgzKkI6nDVWIikEo97DmEIQ?sub_confirmation=1
       
       
      Submitter 101mod Submitted 11/25/2020 Category PUBG  
    • By 101mod
      Link download Apk in description video
      👉ESP FREE 1.3: https://www101mod.com
       🙏IM SHARE FREE HACK WORK 100% | PLEASE VISIT MY CHANNEL🙏:  
      👉https://www.youtube.com/channel/UCgzKkI6nDVWIikEo97DmEIQ?sub_confirmation=1
       
       
×
×
  • Create New...