Jump to content

Recommended Posts

Posted

Hey if i pause the process using script and hide the UI of gg then process gets resumed.

Is there any way to pause the process even if gg UI is hidden.

Posted

Hi sir eneby. How do I write a simple script that will load a file, offset everything from the saved list, and save it with a different filename?

  • Administrators
Posted

Use

Quote
Saved lists related methods
mixed  loadList (string file, int flags=0)
  Load the saved list from the file. More...
 
mixed  saveList (string file, int flags=0)
  Save the saved list to the file. More...
 
mixed  clearList ()
  Clear the saved list. More...
 
mixed  addListItems (table items)
  Add items to the saved list. More...
 
mixed  getListItems ()
  Return the contents of the saved list as a table. More...
 
mixed  removeListItems (table items)
  Remove items from the saved list. More...

load list into GG and save it with different name. But for this task more suitable just copy original file via os lib functions built-in in LUA.

Posted
On 11/03/2018 at 9:14 AM, NoExample said:

Ive been trying to make a lua script for game gardian for about 1 and a half years and last month i made it come close to working can you help me and also thanks. Also heres the file the problem is that it loads and stuff but when i tap on the thing it just ends the scripts and dosent actually run it fully.

 

ExampleHax%201.0

ExampleHax 1.0

Ive found what i did wrong

Posted

Hi again sir eneby. I made a script that will edit a value everytime the gg icon is tapped. But it needs a kill switch and the one I wrote isn't working. It should end the script if the value becomes 808465012. Can you tell me what is wrong?

if gg.isVisible then
	gg.setVisible(false)
end
	
gg.clearResults()
	
gg.searchNumber('808465268', gg.TYPE_DWORD)
	if gg.getResultCount() == nil then
		print('Go to home menu')
		os.exit()
	end
m = gg.getResults(1)

::unlikey::
	if gg.isVisible() then
		gg.setVisible(false)
		m[1].value = 808465268
		gg.setValues(m)
		gg.toast('Unlikey loaded', true)
	end

if m[1] == 808465012 then
	os.exit()
end

goto unlikey

 

  • Administrators
Posted
1 hour ago, Coolsi said:

if gg.getResultCount() == nil then

Can not be nil here. Maybe you mean zero.

1 hour ago, Coolsi said:

if m[1] == 808465012 then

Need compare value field not table.

  • 2 weeks later...
Posted
On 17/7/2017 at 10:08 AM, Enyby said:

Mulai dari versi 8.28.0 GG memiliki dukungan skrip LUA.

Ini dapat dimuat dan dijalankan.

https://www.lua.org/manual/5.2/manual.html

Scripting Documentation: https://gameguardian.net/help/

  Hide contents

 

GG function stored in table named gg.

You can print it for get short help.



print(gg)
wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==


gg =   table(5393242c): {
       [BUILD] = 6147
       [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_FUZZY_EQUAL] = 536870912
       [SIGN_FUZZY_GREATER] = 67108864
       [SIGN_FUZZY_LESS] = 134217728
       [SIGN_FUZZY_NOT_EQUAL] = 268435456
       [SIGN_GREATER_OR_EQUAL] = 67108864
       [SIGN_LESS_OR_EQUAL] = 134217728
       [SIGN_NOT_EQUAL] = 268435456
       [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.31.0
       [VERSION_INT] = 83100
       [alert] = function: alert /* gg.alert(string text [, string positive = 'ok' [, string negative = nil [, string neutral = nil]]]) -> int: 0 = cancel, 1 = positive, 2 = negative, 3 = neutral */
       [choice] = function: choice /* gg.choice(table items [, string selected = nil [, string message = nil]]) -> string || nil */
       [clearResults] = function: clearResults /* gg.clearResults() -> nil */
       [copyMemory] = function: copyMemory /* gg.copyMemory(long from, long to, int bytes) -> true || string with error */
       [copyText] = function: copyText /* gg.copyText(string text [, bool fixLocale = true]) -> nil */
       [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 */
       [getFile] = function: getFile /* gg.getFile() -> string */
       [getLine] = function: getLine /* gg.getLine() -> int */
       [getLocale] = function: getLocale /* gg.getLocale() -> string */
       [getRanges] = function: getRanges /* gg.getRanges() -> int */
       [getResultCount] = function: getResultCount /* gg.getResultCount() -> long */
       [getResults] = function: getResults /* gg.getResults(int count) -> array || string with error */
       [getSpeed] = function: getSpeed /* gg.getSpeed() -> double */
       [getTargetInfo] = function: getTargetInfo /* gg.getTargetInfo() -> table || nil */
       [getTargetPackage] = function: getTargetPackage /* gg.getTargetPackage() -> string || nil */
       [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.multiChoice(table items [, table selection = {} [, string message = nil]]) -> 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 = -1 [, int type = gg.TYPE_AUTO [, int sign = gg.SIGN_EQUAL [, long memoryFrom = 0 [, long memoryTo = -1]]]]]) -> true || string with error */
       [searchFuzzy] = function: searchFuzzy /* gg.searchFuzzy([string difference = '0' [, int type = gg.TYPE_AUTO [, int sign = gg.SIGN_FUZZY_EQUAL [, long memoryFrom = 0 [, long memoryTo = -1]]]]]) -> true || string with error */
       [searchNumber] = function: searchNumber /* gg.searchNumber(string text [, int type = gg.TYPE_AUTO [, bool encrypted = false [, int sign = gg.TYPE_EQUAL [, longmemoryFrom = 0 [, long memoryTo = -1]]]]]) -> 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 */
       [skipRestoreState] = function: skipRestoreState /* gg.skipRestoreState() -> nil */
       [sleep] = function: sleep /* gg.sleep(int milliseconds) -> nil */
       [startFuzzy] = function: startFuzzy /* gg.startFuzzy([int type = gg.TYPE_AUTO [, long memoryFrom = 0 [, long memoryTo = -1]]]) -> true || string with error */
       [timeJump] = function: timeJump /* gg.timeJump(string time) -> true || string with error */
       [toast] = function: toast /* gg.toast(string text [, bool fast = false]) -> nil */
}
wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==

In future we add help with examples.

 

 

Turtorial please?

  • Administrators
Posted

An example of a simple script with one action

When you click on the GG icon, a confirmation dialog is displayed.
If you select Yes, then 10 jumps of time per minute are performed with an interval of one second.

You can repeat it indefinitely.

gg.require('8.53.2')

if gg.isVisible(true) then 
	gg.setVisible(false) 
end

::LOOP::

if gg.isVisible(true) then 
	gg.setVisible(false)
	
	local ret = gg.alert('Jump?', 'Yes', 'Exit', 'No')
	if ret == 2 then
		os.exit()
	end
	if ret == 1 then
		local n = 10
		local s = 1
		local t = 60
		gg.toast('Do '..n..' jumps for '..t..' s with interval '..s..' s')
		for i = 1, n do
			gg.timeJump(t)
			gg.sleep(s*1000)			
		end
		gg.toast('Jumps ended')
	end
else
	gg.sleep(100)
end

goto LOOP

 

scr_1522536579.jpg

scr_1522536582.jpg

scr_1522536592.jpg

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
×
×
  • 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.