Jump to content

Enyby

Administrators
  • Posts

    8,811
  • Joined

  • Last visited

  • Days Won

    1,027

Everything posted by Enyby

  1. Enyby

    Can i lua this?

    Max size for group search is 65535 and can not be increased. Big size make search slow and need lot of memory. In script you can make one search get results, change it, clear, make second search and so on. Params for all search you can ask from user one time. Script support full size math so you can do any calculation inside script. See Math lib in lua reference.
  2. Version 1.0.0

    6,683 downloads

    Simple nitro hack. After that you get full nitro after one second of drift, fly or break objects. Usage can lead into CheaterBoard.
  3. View File Asphalt 8: Airborne - hack nitro Simple nitro hack. After that you get full nitro after one second of drift, fly or break objects. Usage can lead into CheaterBoard. Submitter Enyby Submitted 07/19/17 Category LUA scripts
  4. Enyby

    LUA scripting

    @RogerAngell maybe. You need try. Depends on many factors.
  5. Enyby

    LUA scripting

    @BackliftBetter create separate topic for this. I talk with d2dyno for separate section for all LUA script topics.
  6. Enyby

    LUA scripting

    All look like ok.
  7. Enyby

    LUA scripting

    https://www.lua.org/manual/5.1/manual.html C function exit take int. http://lua-users.org/wiki/OsLibraryTutorial then newbie write something like `{my var='test'}` and get errors. http://lua-users.org/wiki/TableConstructors
  8. Enyby

    LUA scripting

    os.exit take integer as param. 0 is usual exit. all another - is unusual. Not boolean, but if you pass it it cast to 0 or 1. Usually this thing named `label`. Must be single word and not one from predefined reserved words like `for` or `if`. If this is not single word - must be used wide way for create table. In lua reference present more information.
  9. Enyby

    GameGuardian

    @Backlift Because he is zombie without brain. Sometimes they bypass registration and start to post random crap on random places. Do not take they to serious.
  10. Enyby

    GameGuardian

    I already answered: https://gameguardian.net/forum/topic/17456-make-a-game-guardian-app-for-ios/?do=findComment&comment=58934
  11. Enyby

    LUA scripting

    Not bad script from one chinese user: Can be used as example for make automated group search with edit values.
  12. Enyby

    LUA scripting

    Good: while true do if gg.isVisible() then gg.setVisible(false) local d = gg.prompt({A='Number of Orbs Or Dooblins'}, {A='0'}) if d == nil then gg.alert('Script canceled') break end gg.searchNumber (d.A, gg.TYPE_DOUBLE, true, gg.SIGN_EQUAL, 0, -1) cnt = gg.getResultCount() if cnt == 0 then gg.alert('Search failed') break end if cnt <= 4 then gg.editAll('100000000', gg.TYPE_DOUBLE) gg.alert('Hacking Done, Enjoy') break end gg.alert ('Go to game and change the value, then click on gg icon to continue') end gg.sleep(100) end Bad: while true do if gg.isVisible() then gg.setVisible(false) local d = gg.prompt({A='Number of Orbs Or Dooblins'}, {A='0'}) if d == nil then gg.alert('Script canceled') break end gg.searchNumber (d.A, gg.TYPE_DOUBLE, true, gg.SIGN_EQUAL, 0, -1) cnt = gg.getResultCount() if cnt == 0 then gg.alert('Search failed') break end if cnt <= 4 then gg.editAll('100000000', gg.TYPE_DOUBLE) gg.alert('Hacking Done, Enjoy') break end gg.alert ('Go to game and change the value, then click on gg icon to continue') end gg.sleep(100) end As for me this make code very difficult to read. Good: -- local defines local variable, prompt show prompt with fields, A - name of index in table, '0' - default value local d = gg.prompt({A='Number of Orbs Or Dooblins'}, {A='0'}) Bad: -- local defines local variable local d = -- prompt show prompt with fields gg.prompt({ -- A - name of index in table A='Number of Orbs Or Dooblins'}, {A= --'0' - default value '0'}) _______________________________________________ added 1 minute later In last case very hard assembly full command in the mind. _______________________________________________ added 3 minutes later About good formatting code written lot of articles. Google "lua code style". For example on wiki: http://lua-users.org/wiki/LuaStyleGuide
  13. Enyby

    LUA scripting

    Few tips for code style: 1. better use indentation. 2. Do not break single command with comments. 3. Single command better place on one line. But you can code in any style. Even if anyone else hard to read it. Now for me very hard read your script. Also on paste code on forum you can select type of code for highlight. lua present in this list. By default selected Html. I think select lua produce better results.
  14. @jerryxx4 Latest. For me all worked as before.
  15. @jerryxx4 Latest. For me all worked as before.
  16. Enyby

    LUA scripting

    http://www.luaj.org/luaj/3.0/README.html Most of them exists in gg scripts. Except coroutine and some calls in os (popen, execute) for security reasons. You can use print for describe their content: print('base =', base) print('bit32 =', bit32) print('coroutine =', coroutine) print('io =', io) print('os =', os) print('package =', package) print('string =', string) print('table =', table) base = nil bit32 = table(537f0fa4): { [arshift] = arshift [band] = band [bnot] = bnot [bor] = bor [btest] = btest [bxor] = bxor [extract] = extract [lrotate] = lrotate [lshift] = lshift [replace] = replace [rrotate] = rrotate [rshift] = rshift } coroutine = nil io = table(537f85ac): { [close] = close [flush] = flush [input] = input [lines] = lines [open] = open [output] = output [read] = read [tmpfile] = tmpfile [type] = type [write] = write } os = table(537f9ae4): { [clock] = clock [date] = date [difftime] = difftime [exit] = function: exit [getenv] = getenv [remove] = remove [rename] = rename [setlocale] = setlocale [time] = time [tmpname] = tmpname } package = table(537f043c): { [loaded] = table(537f044c): { [bit32] = table(537f0fa4): { [arshift] = arshift [band] = band [bnot] = bnot [bor] = bor [btest] = btest [bxor] = bxor [extract] = extract [lrotate] = lrotate [lshift] = lshift [replace] = replace [rrotate] = rrotate [rshift] = rshift } [gg] = table(537fa8a8): { [BUILD] = 5523 [CACHE_DIR] = /data/data/catch_.me_.if_.you_.can_/cache [EXT_CACHE_DIR] = /mnt/sdcard/Android/data/catch_.me_.if_.you_.can_/cache [EXT_FILES_DIR] = /mnt/sdcard/Android/data/catch_.me_.if_.you_.can_/files [FILES_DIR] = /data/data/catch_.me_.if_.you_.can_/files [PACKAGE] = catch_.me_.if_.you_.can_ [REGION_ANONYMOUS] = 32 [REGION_ASHMEM] = 524288 [REGION_BAD] = 131072 [REGION_CODE_APP] = 16384 [REGION_CODE_SYS] = 32768 [REGION_C_ALLOC] = 4 [REGION_C_BSS] = 16 [REGION_C_DATA] = 8 [REGION_C_HEAP] = 1 [REGION_JAVA] = 65536 [REGION_JAVA_HEAP] = 2 [REGION_OTHER] = -1032320 [REGION_PPSSPP] = 262144 [REGION_STACK] = 64 [SIGN_EQUAL] = 536870912 [SIGN_INEQUAL] = 268435456 [SIGN_LARGER] = 67108864 [SIGN_SMALLER] = 134217728 [TYPE_AUTO] = 127 [TYPE_BYTE] = 1 [TYPE_DOUBLE] = 64 [TYPE_DWORD] = 4 [TYPE_FLOAT] = 16 [TYPE_QWORD] = 32 [TYPE_WORD] = 2 [TYPE_XOR] = 8 [VERSION] = 8.28.0 [VERSION_INT] = 82800 [alert] = function: alert /* gg.alert(string text[, string positive[, string negative[, string neutral]]]) -> int: 0 = cancel, 1 = positive, 2 = negative, 3 = neutral */ [clearResults] = function: clearResults /* gg.clearResults() -> nil */ [copyMemory] = function: copyMemory /* gg.copyMemory(long from, long to, int bytes) -> true || string with error */ [dumpMemory] = function: dumpMemory /* gg.dumpMemory(long from, long to, string dir) -> true || string with error */ [editAll] = function: editAll /* gg.editAll(string value, int type) -> count of changed || string with error */ [getRanges] = function: getRanges /* gg.getRanges() -> int */ [getResultCount] = function: getResultCount /* gg.getResultCount() -> long */ [getResults] = function: getResults /* gg.getResults(int count) -> array || string with error */ [getSelectedPackage] = function: getSelectedPackage /* gg.getSelectedPackage() -> string || nil */ [getSpeed] = function: getSpeed /* gg.getSpeed() -> double */ [getValues] = function: getValues /* gg.getValues(table values) -> table || string with error */ [gotoAddress] = function: gotoAddress /* gg.gotoAddress(long address) -> nil */ [isPackageInstalled] = function: isPackageInstalled /* gg.isPackageInstalled(string pkg) -> bool */ [isProcessPaused] = function: isProcessPaused /* gg.isProcessPaused() -> bool */ [isVisible] = function: isVisible /* gg.isVisible() -> bool */ [processKill] = function: processKill /* gg.processKill() -> bool */ [processPause] = function: processPause /* gg.processPause() -> bool */ [processResume] = function: processResume /* gg.processResume() -> bool */ [processToggle] = function: processToggle /* gg.processToggle() -> bool */ [prompt] = function: prompt /* gg.prompt(table prompts[, table defaults[, table types]]) -> nil || table with keys from prompts and values from inputs */ [removeResults] = function: removeResults /* gg.removeResults(table results) -> true || string with error */ [searchAddress] = function: searchAddress /* gg.searchAddress(string text, long mask, int type, int sign, long memoryFrom, long memoryTo) -> true || string with error */ [searchFuzzy] = function: searchFuzzy /* gg.searchFuzzy(string difference, int type, int sign, long memoryFrom, long memoryTo) -> true || string with error */ [searchNumber] = function: searchNumber /* gg.searchNumber(string text, int type, bool encrypted, int sign, long memoryFrom, long memoryTo) -> true || string with error */ [setRanges] = function: setRanges /* gg.setRanges(int ranges) -> nil */ [setSpeed] = function: setSpeed /* gg.setSpeed(double speed) -> true || string with error */ [setValues] = function: setValues /* gg.setValues(table values) -> true || string with error */ [setVisible] = function: setVisible /* gg.setVisible(bool visible) -> nil */ [sleep] = function: sleep /* gg.sleep(int milliseconds) -> nil */ [startFuzzy] = function: startFuzzy /* gg.startFuzzy(int type, long memoryFrom, long memoryTo) -> true || string with error */ [timeJump] = function: timeJump /* gg.timeJump(string time) -> true || string with error */ [toast] = function: toast /* gg.toast(string text[, bool fast]) -> nil */ } [io] = table(537f85ac): { [close] = close [flush] = flush [input] = input [lines] = lines [open] = open [output] = output [read] = read [tmpfile] = tmpfile [type] = type [write] = write } [math] = table(537f473c): { [abs] = function: abs [acos] = function: acos [asin] = function: asin [atan2] = function: atan2 [atan] = function: atan [ceil] = function: ceil [cos] = function: cos [cosh] = function: cosh [deg] = function: deg [exp] = function: exp [floor] = function: floor [fmod] = function: fmod [frexp] = function: frexp [huge] = inf [ldexp] = function: ldexp [log] = function: log [max] = function: max [min] = function: min [modf] = function: modf [pi] = 3.1415927 [pow] = function: pow [rad] = function: rad [random] = function: random [randomseed] = function: randomseed [sin] = function: sin [sinh] = function: sinh [sqrt] = function: sqrt [tan] = function: tan [tanh] = function: tanh } [os] = table(537f9ae4): { [clock] = clock [date] = date [difftime] = difftime [exit] = function: exit [getenv] = getenv [remove] = remove [rename] = rename [setlocale] = setlocale [time] = time [tmpname] = tmpname } [package] = table(537f043c): *** RECURSION *** [string] = table(537f2b4c): { [byte] = function: byte_ [char] = function: char_ [dump] = function: dump [find] = function: find [format] = function: format [gmatch] = function: gmatch [gsub] = function: gsub [len] = function: len [lower] = function: lower [match] = function: match [rep] = function: rep [reverse] = function: reverse [sub] = function: sub [upper] = function: upper } [table] = table(537f1ad0): { [concat] = function: concat [insert] = function: insert [pack] = function: pack [remove] = function: remove [sort] = function: sort [unpack] = function: unpack } } [loadlib] = function: loadlib [path] = ?.lua [preload] = table(537f04bc): { } [searchers] = table(537f08b8): { [1] = function: preload_searcher [2] = function: lua_searcher [3] = function: java_searcher } [searchpath] = function: searchpath } string = table(537f2b4c): { [byte] = function: byte_ [char] = function: char_ [dump] = function: dump [find] = function: find [format] = function: format [gmatch] = function: gmatch [gsub] = function: gsub [len] = function: len [lower] = function: lower [match] = function: match [rep] = function: rep [reverse] = function: reverse [sub] = function: sub [upper] = function: upper } table = table(537f1ad0): { [concat] = function: concat [insert] = function: insert [pack] = function: pack [remove] = function: remove [sort] = function: sort [unpack] = function: unpack } GameGuardian.git_signed.apk
  17. Enyby

    LUA scripting

    1. Define local variable. Without it be in global scope. Read lua manual. All things except gg.* is usual lua code. Then you if you see something unknown you need read reference manual for lua. Or type 'lua local' into google, for example. https://www.lua.org/pil/4.2.html 2. You need remove break. Break is exit from loop. You do not have loop. So you need jump to exit or call os.exit() for stop script execution.
  18. Enyby

    LUA scripting

    You can specify type of input fields. This allow show something useful around it. For example button for select dir, path or some converter. Also this switch internal keyboard to external if you need input text or file path. print('prompt 1: ', gg.prompt( {any='ask any',num='ask num',text='ask text', path='ask path',file='ask file',set='ask set',speed='ask speed'}, {any='any val',speed=123,set=-0.34}, {num='number',text='text',path='path',file='file',set='setting',speed='speed'} )) print('prompt 2: ', gg.prompt( {[0]='ask any',[1]='ask num',[2]='ask text',[3]='ask path',[4]='ask file',[5]='ask set',[6]='ask speed'}, {[0]='any val',[6]=123,[5]=-0.34}, {[1]='number',[2]='text', [3]='path',[4]='file',[5]='setting',[6]='speed'} )) _______________________________________________ added 2 minutes later You can use goto. But for big scripts it can be hell. For you or for anyone who try understand how it works. Even for you from few months.
  19. Enyby

    LUA scripting

    Also you can check selected app package via "gg.getSelectedPackage() -> string || nil".
  20. Enyby

    LUA scripting

    if gg.BUILD < 5511 then gg.alert('You need more new version of GG for run this script. At least build 5511.') os.exit() end gg.toast ('Quadropus 2.0.48 Hack by Backlift') gg.clearResults() gg.setRanges(gg.REGION_JAVA_HEAP) --gg.setRanges(gg.REGION_C_ALLOC) while true do if gg.isVisible() then gg.setVisible(false) local d = gg.prompt({A='Number of Orbs Or Dooblins'}, {A='0'}) if d == nil then gg.alert('Script canceled') break end gg.searchNumber (d.A, gg.TYPE_DOUBLE, true, gg.SIGN_EQUAL, 0, -1) cnt = gg.getResultCount() if cnt == 0 then gg.alert('Search failed') break end if cnt == 1 then gg.editAll('100000000', gg.TYPE_DOUBLE) gg.alert('Hacking Done, Enjoy') break end gg.alert ('Go to game and change the value, then click on gg icon to continue') end gg.sleep(100) end Work without open gg UI at all. Need only click on icon gg for resume script, I test it on our test app so I change regions set for java. You can comment and uncomment next line.
  21. Enyby

    LUA scripting

    Another good idea - check for gg.BUILD and gg.VERSION_INT for need version of GG for run this script. Because currently your script can not work on usual GG 8.28.0 - it not have gg.sleep and other functions. They present now only in test builds. So you can something like: if gg.BUILD < 5511 then gg.alert('You need more new version of GG for run this script. At least build 5511.') os.exit() end
  22. Enyby

    LUA scripting

    1. Too many comments as for me. Hard read code behind comments. 2. Not good choice rely on exact count. I think better firstly for `== 0` and next is `<= 4`. 3. Can return nil if user press `cancel` - you script crashed in this case. See my last edition - i check for this. 4. `print` not show any to user. You need `gg.alert` or `gg.toast`. `print` only print debug info into dcript log executin. User can see at only at the script end. Not while script run. 5. `gg.sleep` defined as `gg.sleep(int milliseconds) -> nil` then take not seconds but milliseconds. You need pass 1000 for sleep in one second. 6. More easy write `if not gg.isVisible()` or `if not(gg.isVisible())`. 7. you better avoid goto. For example I make similar script without it. With loop.
  23. Enyby

    LUA scripting

    I already post code which work in auto mode. Latest version of your script. _______________________________________________ added 2 minutes later While not x do y end Z _______________________________________________ added 4 minutes later Better avoid goto at all. I do not know - maybe it present. Read reference manual and try.
  24. Enyby

    LUA scripting

    Use while loop. while not x do gg.sleep(100) end
×
×
  • 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.