Jump to content

LUA scripting


Enyby
 Share

Recommended Posts

  • 2 weeks later...

Hey guys,

First off, thanks for doing this! It's a really cool tool. 

I wanted to ask what IDE do you guys use for code editing and obviously indentation and stuff. 

Secondly, I'm trying to do something with some preset variables and for some reason, it's not working, basically, I know what the values that will be searched for are and I'm trying to have a script that I just run when I need to without any other interaction.

hp9 = 4433
sp9 = 863
dmg9 = 107
varmod9 = hpch9 .. ';' .. spch9 .. ';' .. dmgch9 .. '::17'
gg.clearResults()
gg.searchNumber(varmod1, gg.TYPE_DWORD)
gg.getResults(1000)
gg.editAll('850000', gg.TYPE_DWORD)

 

Help a Brother out! ?

 

Thanks!

Link to comment
Share on other sites

@Enyby how to use gg.FILES_DIR() ? My one line of code returned this error
 

Script ended:
Perhaps this script needs the latest version of GameGuardian. Try to update to the latest version.

Script error: org.luaj.vm2.LuaError: @/storage/emulated/0/Lua scripts/sdcardpath.lua:1
`gg.alert(gg.FILES_DIR())`
attempt to call string
stack traceback:
    /storage/emulated/0/Lua scripts/sdcardpath.lua:1: in main chunk
    [Java]: in ?
    at org.luaj.vm2.LuaValue.checkmetatag(LuaValue.java:2882)
    at org.luaj.vm2.LuaValue.callmt(LuaValue.java:2039)
    at org.luaj.vm2.LuaValue.invoke(LuaValue.java:1759)
    at org.luaj.vm2.LuaClosure.execute(LuaClosure.java:398)
    at org.luaj.vm2.LuaClosure.call(LuaClosure.java:137)
    at android.ext.Script.runScript(Script.java:3635)
    at android.ext.Script$ScriptThread.run(Script.java:3556)

Link to comment
Share on other sites

hello I'm shika

I'm quite confident (at least not a beginner) in hex editor. but i got no idea how to begin learning LUA. I'm not a programmer.. 

I want to make a script which allow me to find address by using add. Offsets from a single address, I'm so sorry if I confused you. but that's what I understand

example

i have an address which contains game currency value (gold) in the game. and I wanted to find premium currency address, is it possible to make LUA script, so I can find premium currency address with only gold address? that's just an example, I know currency address are usually near each other. All addresses are dword type

looking forward for this

Edited by Shika
Link to comment
Share on other sites

Hi everyone. Plz help me out with this. If I make script with code like:

searchNumber("135;246", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(100)

How can I edit all the results of 135 to 1000, and all the results of 246 to 2000.

Edited by minhthong0824
Link to comment
Share on other sites

Hi all, it is possible to refine search with address mask filter?

Example

In the first search

Gg.searchNumber('123;321,213',gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0x41100000, 0x60000000)

Then refine search results

Gg.searchNumber('123', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, gg.TYPE_FLOAT, false, gg.SIGN_EQUAL,0x41100000, 0x60000000)

I need to filter the address more spesific than range 0x41100000, 0x60000000.

I want to search address with the last number is 8. Something like FFFFFFF8, ???????8.

I know there is available feature called address mask search. But i want to implemented address mask search in lua code.

Thanks before.

 

Link to comment
Share on other sites

15 hours ago, bukandewa said:

Hi all, it is possible to refine search with address mask filter?

Example

In the first search

Gg.searchNumber('123;321,213',gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0x41100000, 0x60000000)

Then refine search results

Gg.searchNumber('123', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, gg.TYPE_FLOAT, false, gg.SIGN_EQUAL,0x41100000, 0x60000000)

I need to filter the address more spesific than range 0x41100000, 0x60000000.

I want to search address with the last number is 8. Something like FFFFFFF8, ???????8.

I know there is available feature called address mask search. But i want to implemented address mask search in lua code.

Thanks before.

 

thanks for the answer. may I ask again, for example 23 seconds cooldown number how do I look for it?

_______________________________________________
added 0 minutes later
15 hours ago, bukandewa said:

Hi all, it is possible to refine search with address mask filter?

Example

In the first search

Gg.searchNumber('123;321,213',gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0x41100000, 0x60000000)

Then refine search results

Gg.searchNumber('123', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, gg.TYPE_FLOAT, false, gg.SIGN_EQUAL,0x41100000, 0x60000000)

I need to filter the address more spesific than range 0x41100000, 0x60000000.

I want to search address with the last number is 8. Something like FFFFFFF8, ???????8.

I know there is available feature called address mask search. But i want to implemented address mask search in lua code.

Thanks before.

 

thanks for the answer. may I ask again, for example 23 seconds cooldown number how do I look for it?

_______________________________________________
added 4 minutes later
On Wed Sep 12 2018 at 2:35 AM, RogerAngell2018 said:

Most often Float. Use Fuzzy method if game don't show cooldown numbers.

thanks for the answer. may I ask again, for example 23 seconds cooldown number how do I look for it?

Link to comment
Share on other sites

On 9/15/2018 at 12:01 AM, Naa_Lina said:

thanks for the answer. may I ask again, for example 23 seconds cooldown number how do I look for it?

_______________________________________________
added 0 minutes later

thanks for the answer. may I ask again, for example 23 seconds cooldown number how do I look for it?

_______________________________________________
added 4 minutes later

thanks for the answer. may I ask again, for example 23 seconds cooldown number how do I look for it?

Use skill, pause the game, search for 23 or 22 Float (double if you dont found it), unpause, pause, refine new value until you found it. But sometimes the value is encrypted.

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