Jump to content

LUA scripting


Enyby
 Share

Recommended Posts

On 7/17/2017 at 11:21 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

if i want to edit only two or three value not all then what is need to write?

Edited by Ethan17g
Link to comment
Share on other sites

I need help

Làm thế nào để đóng băng giá trị tìm kiếm được với hai kết quả tìm thấy?

How to freeze search value with two results found?

gg.clearResults()
gg.setRanges(gg.REGION_C_ALLOC)
gg.searchNumber("13.45~13.459;-15.06~-15.05",gg.TYPE_FLOAT,false,gg.SIGN_FUZZY_EQUAL,0,-1)
var = gg.getResults(2)
gg.editAll("30;-32",gg.TYPE_FLOAT)
end

I want to freeze "30; -32"

Sorry my English

Link to comment
Share on other sites

Trying to write a simple script and this tutorial has been very helpful. My question is similar to the one asked above but I didn't quite understand the answer.  I am doing a Float search for a number (1.35) and GG comes up with 3 results every time. I only need to edit/change the 2nd out of 3 results. EditAll does not work because it edits all of them (obviously). How would I specify the 2nd result for editing? editResult(2) or something along those lines?  Thanks for the help. 

Link to comment
Share on other sites

Thanks. This is the simple script I am trying to put together. I apologize if it's messy, it's literally the first one I have ever done based off of what I have been reading here. The first menu choice and last menu choice work fine, it's the 2nd menu choice I am trying to get working correctly. When you search for 1.85 you get 3 results and I need to edit just the 2nd one and change to 99999, as I mentioned. Is this correct? (I copied it from the gg Class Reference guide):

menu=gg.choice({'+99999% Gear & Gun','+99999% Gear only', '+100% Damage only'})
    if menu==1 then
        gg.searchNumber('1.85',gg.TYPE_FLOAT)
        gg.getResults(100)
        gg.editAll('99999',gg.TYPE_FLOAT)
    gg.alert('Equip +85% Camo and Decal and enjoy!')
    end
if menu==2 then
        gg.searchNumber('1.85',gg.TYPE_FLOAT)
        gg.getResults(3)
        r[2].value='99999'
        print('Edited:',gg.setValues(r))
    gg.alert('Equip +85% Decal and enjoy!')
    end
if menu==3 then
        gg.searchNumber('1.35',gg.TYPE_FLOAT)
        gg.getResults(500)
        gg.editAll('2',gg.TYPE_FLOAT)
    gg.alert('Equip +35% Camo and enjoy!')
    end

 

Edited by retroLS1
Link to comment
Share on other sites

  • 4 weeks later...

After update my GG from 77.0 to 83.0 my script dont work any more, is there any change in scripting please?

Edit: it stills run with faster speed and i think something wrong but i dont know what is it. I reinstall ver 77.0 and it work fine again.

Edited by minhthong0824
Link to comment
Share on other sites

I have two doubts and I hope you can help me.

1. How can I remove the word "Script" from all the script windows and toasts?

Screenshot_2019-06-30-14-06-17.thumb.png.a77e9496a8896211d17fd69c8a43f9ae.png

2. Is it possible to make a script like this?

Screenshot_2019-06-30-14-03-38.thumb.png.4a38cf90c6f8e6fd6d591f358f77d884.png

Example, select those three specific tracks, press "Unlock tracks" and start editing the values in the order they were selected.

This is just a concept, the first option unlocks all tracks in order one by one and I have it written. I could do it manually the second option, but the problem is that there are more than 300 tracks and writing each combination of the changing value is something I don't wish for anyone. Thanks in advance.

Edited by Ekaton
Link to comment
Share on other sites

  • Administrators
6 minutes ago, Ekaton said:

How can I remove the word "Script" from all the script windows?

No way. This was done so that no other messages could be faked.

6 minutes ago, Ekaton said:

Is it possible to make a script like this?

Use multi choice. Add special choices like "unlock all", "unlock first 100", "unlock A & B D & F & H" and so on.

If user check it - do appropriate actions.

[added 1 minute later]

For change title - check API description. For some calls it is possible, but you can not avoid word "script", by some reason as in toast.

Link to comment
Share on other sites

12 hours ago, Enyby said:

Thank you for answers my question sir. Can i ask what happened to search value. Is it moved to video memory range but still have the same value or is it changed too. Can i simple edit my script or do i need to find another new value.

---------------------

Btw how can i turn off auto check for update in GG if i want to keep using older versions? Is it possible?

Ps: i found the answer: No way.

Edited by minhthong0824
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.