Jump to content
Enyby

LUA scripting

Recommended Posts

hey i am new to this lua stuff and still learning it,

 i have already checked several scripts in this forum.

but it confused me when it comes to find the range of value.

such an example i found a scripts for aimbot

gg.searchNumber('2;3D;2.25::200',gg.TYPE_FLOAT,false,gg.SIGN_EQUAL,0,-1)

gg.getResults(100)

gg.editAll('2.4e35',gg.TYPE_FLOAT)

gg.toast('aimbot enable')

goto START

 

ok based on these code i dont understand where the value of 

2;3D;2.25::200 and 2.4e35 came from.

and i also dont understand about type of integer. how to know what type of int we should use? 

i hope you can give me some ideas

Share this post


Link to post
Share on other sites

1 hour ago, n00bieS said:

i dont understand where the value of 

2;3D;2.25::200 and 2.4e35 came from.

and i also dont understand about type of integer. how to know what type of int we should use? 

You must know how to hack game before start write script.

Script only automated list of actions. It is not magic.

If you know how to hack game manually then you can write script for this.

If not - you can not write script.

Share this post


Link to post
Share on other sites
::gold::
a = gg.prompt({A='Your Gold'},{A='number'}) 
goto gold1

::gold1::
gg.clearResults()
gg.searchNumber(a.A';327680~327699::5', gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.searchNumber(a.A, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(900)
goto gold2

::gold2::
b = gg.prompt({B='Change Gold To'},{B='number'}) 
goto gold3

::gold3::
gg.editAll('b.B', gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.clearResults()
gg.toast('Gold Hacked Successfully')
goto Choice

Hey this is my some part of the script. This is my first script.

I want the code to be run like this :

When user enters the input A, gg should search for group value e.g. a.A;327780~327699::5. 

But if i enter the code like 'a.A;27680~327699::5' , gg ignores it.

And if i enter it like a.A';327680~327691::5' (because i want ';327680~327699::5' in front of the input) , gg shows error "attempt to call string" .

Can u please tell me the solution.

I want to do group search with the input A. (i.e. I want ;327680~327699::5 in front of the input a.A)

Share this post


Link to post
Share on other sites

You need learn lua and how to concatenete string in it.

Share this post


Link to post
Share on other sites
16 minutes ago, Enyby said:

You need learn lua and how to concatenete string in it.

Ok. Thank you so much. I figured it out. I will definitely learn lua when my exams are finished :D Thanks for your assistance. You are one of the best coders.

Share this post


Link to post
Share on other sites

Hey Enyby, is it possible in the script to do like this? :

Copy the address and put that address in offset calculator and put the offset also.

Share this post


Link to post
Share on other sites

No. But you can get address, add offset and dk some actions directlt, via lua, without offset calculator.

Share this post


Link to post
Share on other sites
10 hours ago, Enyby said:

No. But you can get address, add offset and dk some actions directlt, via lua, without offset calculator.

Ok. Thanks.

Share this post


Link to post
Share on other sites
6 minutes ago, SolarHacks said:

Help
if menu == nil then end goto Mainmenu end

It should be like this :

if menu == nil then goto Mainmenu end  

Edited by AjayP

Share this post


Link to post
Share on other sites
2 minutes ago, SolarHacks said:

Im still learning this is my first script

You have done so many mistakes. Try to learn by downloading other scripts. 

Share this post


Link to post
Share on other sites

::mainmenu::
mainmenu = gg.choice({'1. GodMode','2. Unlimited Ammo','3.Exit'})
if mainmenu == 1 then goto godmode end
if mainmenu == 2 then goto ammo end
if mainmenu == 3 then goto exit end
if mainmenu == nil then goto mainmenu end


::godmode::
go = gg.choice({'1. Click Me For GodMode','2.Back'})
if godmode == 1 then goto godmode1 end
if godmode == 2 then goto mainmenu end


-- godmode1
::godmode1::
 gg.clearResults()
gg.searchNumber('500', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
gg.searchNumber('500', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(100)
gg.editAll('999999', gg.TYPE_FLOAT)
gg.toast('')
goto mainmenu


-- ammo
::ammo::
ammo = gg.choice({'1. CLICK ME FOR UNLIMITED AMMO...','2. Back'})
if ammo == 1 then goto ammo1 end
if ammo == 2 then goto mainmenu end

-- ammo1
::ammo1::
a = gg.prompt({A='Your ammo'},{A='number'}) 
goto ammo2

::ammo2::
gg.clearResults()
gg.searchNumber(a.A..';30~30', gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.searchNumber(a.A..';1~100', gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.searchNumber(a.A, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.getResults(1000)
goto ammo3

::ammo3::
b = gg.prompt({B='Change Ammo To'},{B='number'}) 
goto ammo4

::ammo4::
gg.editAll(b.B, gg.TYPE_DWORD)
gg.clearResults()
gg.toast('Ammo Hacked Successfully')
goto mainmenu


::exit::
gg.toast('done')
os.exit()

Edited by SolarHacks

Share this post


Link to post
Share on other sites
7 hours ago, SolarHacks said:

::godmode::
go = gg.choice({'1. Click Me For GodMode','2.Back'})
if godmode == 1 then goto godmode1 end
if godmode == 2 then goto mainmenu end

It should be : 

if go == 1 then ........

Not godmode 

And same for the ammo.

And did u just copy my script? 

Share this post


Link to post
Share on other sites

Phew finally got SpeedHack|GodMode|Full Stamina|Arena Hacks Ready but now i gotta work on Unlimited ammo so the problem is my script does what i ask but it finds too many addresses (about 6k)

And if i change all game crash

So is there enyway to have specific search???

Share this post


Link to post
Share on other sites

Plz on the next update make sure to  add this functions (gg.saveAll) (gg.selectAll) (gg.changeAddress) its realy help us to modify lot of values and thnx gg

Share this post


Link to post
Share on other sites
On 24/07/2017 at 12:43 AM, Enyby said:

Updated gg table:

  Hide contents


gg =   table(538aa1ec): {
       [BUILD] = 5713
       [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.29.0
       [VERSION_INT] = 82900
       [alert] = function: alert /* gg.alert(string text[, string positive[, string negative[, string neutral]]]) -> int: 0 = cancel, 1 = positive, 2 = negative, 3 = neutral */
       [choice] = function: choice /* gg.choice(table items[, string selected]) -> string || nil */
       [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 */
       [getValuesRange] = function: getValuesRange /* gg.getValuesRange(table values) -> table || string with error */
       [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 */
       [multiChoice] = function: multiChoice /* gg.choice(table items[, table selection]) -> table || nil */
       [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 */
}

 

 

Plz on the next update make sure to  add this functions (gg.saveAll) (gg.selectAll) (gg.changeAddress) its realy help us to modify lot of values and thnx gg

Share this post


Link to post
Share on other sites

You need explain what you mean by this functions.

Share this post


Link to post
Share on other sites
3 minutes ago, Enyby said:

You need explain what you mean by this functions.

I mean like this function 

clearResults] = function: clearResults /* gg.clearResults() -> nil */ 

or any others 

example:

] = function: saveAll /* gg.saveAll() -> nil */

Share this post


Link to post
Share on other sites

You must describe what these functions should do.

If you need the function clearResults, then call it, and do not ask for another function called saveAll, but does the same.

 

Share this post


Link to post
Share on other sites
2 hours ago, Enyby said:

You must describe what these functions should do.

If you need the function clearResults, then call it, and do not ask for another function called saveAll, but does the same.

 

Thnx for reply, function gg.saveAll ==>save resultIMG-20180225-WA0008.thumb.jpg.8ed20f10dacdc3da16ee59646db67f8d.jpg in the saved list ,then i want to change address of the saved results using change Adresse IMG-20180225-WA0007.thumb.jpg.2375a0c6cbdbac798f346b2e21669087.jpg

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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;)

Share this post


Link to post
Share on other sites

Hey Enyby, when we use the offset using script, is the new value added to the search list? Or if not then how to change the new value?

Share this post


Link to post
Share on other sites
2 hours ago, AjayP said:

is the new value added to the search list?

No.

2 hours ago, AjayP said:

how to change the new value?

Use setValues call.

Share this post


Link to post
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?

Share this post


Link to post
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

×