I'm newbe in gg lua script. I want to ask some questions to make my first script.I want when the script loads, the menu appears options to change the gold value or change the value of ruby. Then when I choose one of them, the script popped up a search box to fill current value of gold / ruby. And how do I write value 2 in the search box so that it automatically find the value for "2000 ~ 3000" and if I write value 3 in the search box then automatically finds a value for "3000 ~ 4000" (sometimes some games only write 18k in the amount of money and I don't know the exact value of it, then it will be very troublesome to type "18000 ~ 19000" in the search box if I just can type "18" to look for it), and also how to keep my script popping out the search box until finally there are at least a minimum of 12 addresses and then stop popping out the search box?, This is my script record, can you please modify this like I mean and explain it one by one (if you have a lot of time) otherwise I will try to understand it myself. Thanks...
-- Script generated by GameGuardian 8.68.0 (12536) at 2018-11-09 20:57:04 for Hill Climb Racing [com.fingersoft.hillclimb 1.38.1 (209)]
-- Lua help: http://gameguardian.net/help/
-- options
local scriptName = [=====[Script for Hill Climb Racing 1.38.1]=====]
local scriptVersion = '1.0.0'
local scriptAuthor = 'User'
local startToast = ''
-- 0 - no check; 1 - check package only, 2 - check package and build
local checkTarget = 0
local targetName = [=====[Hill Climb Racing]=====]
local targetPkg = 'com.fingersoft.hillclimb'
local targetVersion = [=====[1.38.1]=====]
local targetBuild = 209
-- functions
-- init gg.require('8.68.0', 12536)
if startToast ~= '' then startToast = '\n'..startToast end gg.toast(scriptName..' v'..scriptVersion..' by '..scriptAuthor..startToast)
if checkTarget ~= 0 then
local info = gg.getTargetInfo()
local check = false
local current = false
if checkTarget >= 1 then
check = targetPkg
current = info.packageName
end
if checkTarget >= 2 then
check = check..' '..targetVersion..' ('..targetBuild..')'
current = current..' '..info.versionName..' ('..info.versionCode..')'
end
if check ~= current then
gg.alert('This script for "'..targetName..'" ['..check..'].\nYou select "'..info.label..'" ['..current..'].\nNow script exit.')
os.exit()
end
end
local revert = nil
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.
Question
AhmadAlkatiri
I'm newbe in gg lua script. I want to ask some questions to make my first script.I want when the script loads, the menu appears options to change the gold value or change the value of ruby. Then when I choose one of them, the script popped up a search box to fill current value of gold / ruby. And how do I write value 2 in the search box so that it automatically find the value for "2000 ~ 3000" and if I write value 3 in the search box then automatically finds a value for "3000 ~ 4000" (sometimes some games only write 18k in the amount of money and I don't know the exact value of it, then it will be very troublesome to type "18000 ~ 19000" in the search box if I just can type "18" to look for it), and also how to keep my script popping out the search box until finally there are at least a minimum of 12 addresses and then stop popping out the search box?, This is my script record, can you please modify this like I mean and explain it one by one (if you have a lot of time) otherwise I will try to understand it myself. Thanks...
-- Script generated by GameGuardian 8.68.0 (12536) at 2018-11-09 20:57:04 for Hill Climb Racing [com.fingersoft.hillclimb 1.38.1 (209)]
-- Lua help: http://gameguardian.net/help/
-- options
local scriptName = [=====[Script for Hill Climb Racing 1.38.1]=====]
local scriptVersion = '1.0.0'
local scriptAuthor = 'User'
local startToast = ''
-- 0 - no check; 1 - check package only, 2 - check package and build
local checkTarget = 0
local targetName = [=====[Hill Climb Racing]=====]
local targetPkg = 'com.fingersoft.hillclimb'
local targetVersion = [=====[1.38.1]=====]
local targetBuild = 209
-- functions
-- init
gg.require('8.68.0', 12536)
if startToast ~= '' then startToast = '\n'..startToast end
gg.toast(scriptName..' v'..scriptVersion..' by '..scriptAuthor..startToast)
if checkTarget ~= 0 then
local info = gg.getTargetInfo()
local check = false
local current = false
if checkTarget >= 1 then
check = targetPkg
current = info.packageName
end
if checkTarget >= 2 then
check = check..' '..targetVersion..' ('..targetBuild..')'
current = current..' '..info.versionName..' ('..info.versionCode..')'
end
if check ~= current then
gg.alert('This script for "'..targetName..'" ['..check..'].\nYou select "'..info.label..'" ['..current..'].\nNow script exit.')
os.exit()
end
end
local revert = nil
-- main code
gg.searchNumber("2000~3000", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.processResume()
gg.searchNumber("3000~4000", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
gg.processResume()
gg.clearList()
local t = gg.getResults(100, nil, nil, nil, nil, nil, nil, nil, nil)
gg.addListItems(t)
t = nil
gg.processResume()
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.