Jump to content

LUA scripting


Enyby
 Share

Recommended Posts

  • Administrators

These functions will not be added.
That you described, it is possible to make with the help of existing functions.
To save the results, load them into a table, and then add them to the saved list.
To change the address, before adding values to the saved list, change the address of the values to the desired one.
You need to carefully study the help, instead of writing requests for the functionality that is already present.

Link to comment
Share on other sites

5 hours ago, Enyby said:

These functions will not be added.
That you described, it is possible to make with the help of existing functions.
To save the results, load them into a table, and then add them to the saved list.
To change the address, before adding values to the saved list, change the address of the values to the desired one.
You need to carefully study the help, instead of writing requests for the functionality that is already present.

5 hours ago, Enyby said:

These functions will not be added.
That you described, it is possible to make with the help of existing functions.
To save the results, load them into a table, and then add them to the saved list.
To change the address, before adding values to the saved list, change the address of the values to the desired one.
You need to carefully study the help, instead of writing requests for the functionality that is already present.

Thnx for ur help i'll take ur advise;)

Link to comment
Share on other sites

1 hour ago, Enyby said:

Use setValues call.

But setValues function only set the new address? How to change the value. Can u give an example if u don't mind?

Link to comment
Share on other sites

Hey Enyby this is the code.

::gold1::
gg.clearResults()
gg.searchNumber('647232831', gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
local d = gg.getResults(1)
d[1].address = d[1].address + 144 
d = gg.getValues(d) 
print(d)
d[1].value = 120 
gg.setValues(d)
gg.getValues(d)
print(d)

In my opinion this should work like this : 

1. Search for 647232831 and use offset +144 on its address to get a NEW address.

2. And then edit the value of NEW address.

Am i right?

Because this didn't happen. After ending the script when i manually go to +144 offset, the value of the new address was same as it was before changing.

''d[1].value'' function changes the value of new address because i used offset on the address. Right?

Link to comment
Share on other sites

  • Administrators
18 minutes ago, AjayP said:

Am i right?

Yes. But +144  in decimal. Not in hex.

If you need hex you need write 0x144

19 minutes ago, AjayP said:

i manually go to +144 offset

Uncheck hex in offset calculator.

 

20 minutes ago, AjayP said:

'd[1].value'' function changes

it is not function. It is field of table. And you use it in next call setValues, so this set this value to address.

 

21 minutes ago, AjayP said:

gg.getValues(d)

here you try load new value but not use return result, so your next print, print old value from table variable.

You need

22 minutes ago, AjayP said:

d = gg.getValues(d)

as before.

Link to comment
Share on other sites

8 minutes ago, Enyby said:

Yes. But +144  in decimal. Not in hex.

If you need hex you need write 0x144

Thanks man so much. This was the problem. I actually wanted to use hex. I didn't know that i have to write 0x144 for hex.

 

10 minutes ago, Enyby said:

here you try load new value but not use return result, so your next print, print old value from table variable.

You need

33 minutes ago, AjayP said:

d = gg.getValues(d)

as before.

Ok thanks for telling.

You are really awesome.

Keep this energy always.

Link to comment
Share on other sites

Hey Enby, it worked perfectly.

I really wanted to donate you some money but i can't do it because i'm still 17.

I will do it once i get 18+:D

Link to comment
Share on other sites

On 7/17/2017 at 9:51 AM, Enyby said:

Script for hack Asphalt 8 nitro:


gg.searchNumber('2;8;10;12;15;20;25;30:61', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(100)
print('Replaced: ', gg.editAll('1000', gg.TYPE_FLOAT))
print('Nitro hacked!')

bandicam 2017-07-17 08-49-37-459.pngbandicam 2017-07-17 08-49-50-457.pngbandicam 2017-07-17 08-50-24-287.png

what does this mean :-

'2;8;10;12;15;20;25;30:61

 

 

Link to comment
Share on other sites

Ive been trying to make a lua script for game gardian for about 1 and a half years and last month i made it come close to working can you help me and also thanks. Also heres the file the problem is that it loads and stuff but when i tap on the thing it just ends the scripts and dosent actually run it fully.

 

ExampleHax%201.0

ExampleHax 1.0

Link to comment
Share on other sites

Sir Eneby, I need help trying to figure this out. I've been trying to search for the address that defines the buffering state of the game. It's value at rest is 0 and ranges from 90k - 200k when it is buffering. I've written a script that searches while I do things in the game that will make it buffer and will stop if it finds less than 100 results. But I think it might take forever to finish. Could you help me find it? Sorry for the poor code. I just learned it a while ago.

I should add that the buffering only lasts for one to three seconds.

::a::

gg.sleep(1000)
gg.searchNumber ('0', gg.TYPE_DWORD, false, gg.SIGN_GREATER_OR_EQUAL, 0, -1)

if gg.isVisible()
then

gg.setVisible(false)
end


if gg.getResultCount() <= 100 then

gg.alert('Done searching')
gg.isVisible(true)

os.exit()

else goto a
end 

 

Edited by Coolsi
Link to comment
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
 Share

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