Jump to content

LUA scripting


Enyby
 Share

Recommended Posts

  • Administrators

I do not know what you want. And I do not have time to write scripts to each user. In general, your script is similar to a working one.
But the idea of finding more than 100 is bad. The sequence is not necessarily convergent, so your script can search forever.

Link to comment
Share on other sites

There is a way to do a lua script to read the value from a specific address? Example: address 07BA1100 shows a DWORD value between 100~500000. This value is a bonus for players that win the battle, and every refresh this value changes, so I want to be notified when this value is above 200000, for example. It's possible create this type of script?

Link to comment
Share on other sites

Thanks for your fast answer enyby, I do this script, but I get a lot of errors:


gg.clearResults()
t = {}
t[1] = {}

::LOOP::

t[1].address = 0xC0097624 -- desired address
t[1].flags = gg.TYPE_DWORD
t = gg.getValues(t)

if t[1].value >= '200000'
   then gg.alert('Find out!')
   else goto loop
end

Link to comment
Share on other sites

  • Administrators

You must describe all clear. Include text of error. Or no help.

_______________________________________________
added 1 minute later
1 hour ago, Pekenolucas said:

::LOOP::

 

1 hour ago, Pekenolucas said:

goto loop

Different case for label.

Link to comment
Share on other sites

I get this error when trying to run it:

Script terminado:
Script error: org.luaj.vm2.LuaError: load /storage/emulated/0/Notes/com.zeptolab.thieves.google.lua: org.luaj.vm2.LuaError: /storage/emulated/0/Notes/com.zeptolab.thieves.google.lua:9
`t[1].flags = gg.TYPE_DWORD`
unexpected symbol 194 (Â)
    at org.luaj.vm2.LuaValue.error(LuaValue.java:1075)
    at org.luaj.vm2.Globals.loadfile(Globals.java:204)
    at android.ext.Script.runScript(Script.java:3288)
    at android.ext.Script$ScriptThread.run(Script.java:3232)
Caused by: org.luaj.vm2.LuaError: /storage/emulated/0/Notes/com.zeptolab.thieves.google.lua:9
`t[1].flags = gg.TYPE_DWORD`
unexpected symbol 194 (Â)
    at org.luaj.vm2.compiler.LexState.lexerror(LexState.java:270)
    at org.luaj.vm2.compiler.LexState.syntaxerror(LexState.java:274)
    at org.luaj.vm2.compiler.LexState.primaryexp(LexState.java:1355)
    at org.luaj.vm2.compiler.LexState.suffixedexp(LexState.java:1366)
    at org.luaj.vm2.compiler.LexState.simpleexp(LexState.java:1446)
    at org.luaj.vm2.compiler.LexState.subexpr(LexState.java:1559)
    at org.luaj.vm2.compiler.LexState.expr(LexState.java:1577)
    at org.luaj.vm2.compiler.LexState.explist(LexState.java:1277)
    at org.luaj.vm2.compiler.LexState.assignment(LexState.java:1672)
    at org.luaj.vm2.compiler.LexState.exprstat(LexState.java:1994)
    at org.luaj.vm2.compiler.LexState.statement(LexState.java:2091)
    at org.luaj.vm2.compiler.LexState.statlist(LexState.java:2108)
    at org.luaj.vm2.compiler.LexState.mainfunc(LexState.java:2124)
    at org.luaj.vm2.compiler.LuaC$CompileState.luaY_parser(LuaC.java:129)
    at org.luaj.vm2.compiler.LuaC.compile(LuaC.java:99)
    at org.luaj.vm2.Globals.compilePrototype(Globals.java:323)
    at org.luaj.vm2.Globals.loadPrototype(Globals.java:302)
    at org.luaj.vm2.Globals.load(Globals.java:273)
    at org.luaj.vm2.Globals.loadfile(Globals.java:202)
    ... 2 more

Link to comment
Share on other sites

2 hours ago, Pekenolucas said:

t[1].address = 0xC0097624

Maybe this line contains some error? I didn't found a script like this one to run, so I'm having some troubles to do it! Thanks a lot!

Link to comment
Share on other sites

Almost finished, running without errors, BUT gives me wrong results! Alert show me the correct value (dWord) of the memory address, but I want this notification only for numbers bigger than 200000! Can you help help Enyby? I promise will be the last one! Apparently, a random value, different from the address value, has been used to compare with 200000, because sometimes alert pop-up and sometimes no, for values under 200000. I've tried to change 200000 by lesser values, but alert pops-up at wrong time too. Thanks for your help!

The script:

::x::

local o = {}
o[1] = {}
o[1].address = 0xC137DCA4 -- first address
o[1].flags = gg.TYPE_DWORD
o = gg.getValues (o)

if (o[1].value) > "200000"
then gg.alert('bonus found!', o[1].value)
end

else goto x
end
 

Link to comment
Share on other sites

26 minutes ago, Enyby said:

Remove quotes around number.

I get this error (only important part) removing the quotes:

###
`if (o[1].value) > 200000`
attempt to compare __lt on number and string
stack traceback:
    /storage/emulated/0/Notes/6test.lua:32: in main chunk
 ###

I think I need use some function! I will study more a bit! Thanks a lot for your rapid answer Enyby!

Link to comment
Share on other sites

Thanks Enyby, script working perfectly! How can I donate? I get a error when I click in Donate on site. Thanks again for your great job! 

This script is used to show a pop-up message to players that are searching a better value in game that is visible, OR NOT VISIBLE, that would be a win bonus, gold from others players, weakness/strength, etc... This script is very very simple, so it can be upgraded! But you MUST found the desired address manually using gameguardian!

The script:

::x::

local q = {}
q[1] = {}
q[1].address = 0xC72FD5E4 -- Desired address 
q[1].flags = gg.TYPE_DWORD
q = gg.getValues(q)

if tonumber (q[1].value) > 80000
-- Desired value to notify
then gg.alert('Value found!', q[1].value)
else goto x
end

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.