You guys are really working fast!
A lot of commands are added, tommorow I will learn them through manual and make good examples of them
I'm really loving this.. ?
My example v1.3:
-Fixed some typos
-removed goto c and checkpoint c to. "os. Exit()" to make it less confusing
-removed unneccesary code line for hiding GameGuardian UI after searching
-better explanation of "gg. Sleep()" code
-fixed script made the game a crash (only 1 value may be changed)
--v1.3
--#1 lines that start with "--" are comments, they won't be executed by script executer
--#2 you can execute "print(gg)" command to see a short help and available options for commands, it's also available at first post of Lua scripts by Enyby at gameguardian forum: https://gameguardian.net/forum/topic/17447-lua-scripting/
--#3 this is a simple example for lua scripts, provided by backlift at gameguardian forum: https://gameguardian.net/forum/profile/563312-backlift/
--#4 some functions of this script may conflict with gameguardian search helper function, recommend to disable it before running this script
--#5 each comment is related to the code above it
--#6 this is an example of an effective and functional lua script with nearly full descriptional comments
if gg.BUILD < 5511 then gg.alert('You need a newer version of GameGuardian to run this script. At least build 5511.')
os.exit()
end
--if gameguardian build number is below 5511, means the script will not work,so it aborts the script and exits
gg.clearResults()
-- this function clears the current search results so the script starts a new scan
::a::
-- checkpoint "a" to restart the script if there are a lot of values found
if gg.isVisible() then gg.setVisible(false) end
-- hides the gameguardian UI after script started
d = gg.prompt
-- "d" is a value and = means its equal to value got from "gg.prompt"
-- "gg.prompt" shows a window and requires an input from user
({A='Number of Orbs Or Dooblins'},
-- title of the required value, we named the value as "A" here, We could even use "Dooblins or orbs" but that makes the functional part of the code a bit long and it may bring some mistakes.
{A='0',})
-- default input of the value "A"
if d == nil
-- if no value defined for "d"
then gg.alert('Script canceled')
-- show message that script is canceled
os.exit()
-- exit the script
end
-- mandatory argument to end the "if" command above
gg.toast
-- toasts a message, for reminding credits, helps, warnings or etc...
('Quadropus 2.0.48 Hack by Backlift')
-- text of the toast message
gg.setRanges
-- set the search region
( gg.REGION_C_ALLOC)
-- the region of the value, for comlplete list of regions, check comment #2
gg.searchNumber
-- starts a search
(d['A'],
-- searchs for value "d" that has the input of "A" from "gg.prompt"
gg.TYPE_DOUBLE,
-- type of the value, for comlplete list of types, check comment #2
true,
-- define wether the value is encrypted (true), or NOT encrypted (false)
gg.SIGN_EQUAL,
-- define if it is equal, inequal, bigger or smaller than input value "A", see comment #2 for more info
0,
-- starting position of memory for scanning
-1)
-- ending position of memory for scanning
if gg.getResultCount() == 1
-- this is an "if" command to make the script do commands based on situation.
-- "gg.getResultCount()" will get the number of results found from search
-- this commands checks that "gg.getResultCount" is equal to 4 or less, or not, if it is equal or less, it goes to "then" command, if Not, it goes to "else" command
then gg.editAll('100000000',
-- edits all values and set them to '100000000'
gg.TYPE_DOUBLE)
-- type of the values to edit, see comment #2 for more info
gg.alert
-- show a window with Ok button
('Hacking Done, Enjoy')
-- text of the "gg.alert" window
print
-- shows a text at the script end window
('Quadropus 2.0.48 Hack by Backlift')
-- text for the "print" function
os.exit()
-- ends the script because hacking is done
gg.alert
-- show the user a message, this is to inform the user there are currently too much values found, the user may go in the game and change the value then open the gameguardian window again by tapping on it's floating icon
('Too much values found, Go to game and change the value, then open gameguardian window again')
end
-- end of if statement, it is mandatory
::b::
-- checkpoint "b" for gameguardian to sleep untill user has changed the value
gg.sleep(100)
-- sets code ro halt or sleep at current state for a certain ammount of time in milliseconds brfore continuing to next line
-- sleep 0.1 second until next command, so it will not continiously be running, or it supposed to be
if not gg.isVisible() then goto b
-- if gameguardian not visible, goto checkpoint "b" and rest 0.1 second then check again, user must change the value and then tap on gameguardian icon again so the code will pass this section and continue
else goto a
-- if gameguardian is visible, means user has opened it because it changed the value, go to checkpoint "a" to start the process again
end
-- end of if command, its mandatory
-- example made by backlift with extreme help of enyby for fixing many issues around it
-- you may edit this example and make it for other games.
-- hit the thanks if you used it :)