Jump to content

AhmadAlkatiri

Members
  • Content Count

    4
  • Donations

    $0.00 
  • Joined

  • Last visited

Community Reputation

1 n00b

About AhmadAlkatiri

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. edit : thank you very much, missing apostrophe in edit value function addcoins() local add = gg.choice({'Add 1000 Gold','Add 2000 Gold'}, nil, 'Tom Gold Run') if not add then os.exit() else local coin = gg.getResults(2)[1]['value'] if add == 1 then gg.editAll(coin + '1000', gg.TYPE_DWORD) end if add == 2 then gg.editAll(coin + '2000', gg.TYPE_DWORD) end gg.clearResults() gg.alert('Success!!! Spend or earn some coins to see the change in your coin amount.') end farm = -1 end
  2. How about this?, it still provides error reporting when run. Thanks also to BadCase, I learn and copy some line from his script function home() if searchingcoins == 'yes' then refinecoins() else h = gg.choice({'Add Coins','Exit'},nil, 'Tom Gold Run') if h == nil then else if h == 1 then addcoins() end if h == 2 then os.exit() end end farm = -1 end end function addcoins() gg.clearResults() data = gg.prompt({[1] = 'Enter the number of coins you spent'}, {[1] = '0'}) gg.setRanges(gg.REGION_C_ALLOC) gg.searchNumber(data[1], gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1) gg.toast(gg.getResultCount()) searchingcoins = 'yes' end function refinecoins() data2 = gg.prompt({[2] = 'Enter the number of coins you spent'}, {[2] = '0'}) gg.searchNumber(data2[2], gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1) currentresults = gg.getResultCount() if currentresults <= 2 then coinsearchresults = gg.getResults(2) for i, v in ipairs(coinsearchresults) do end -- (it gives different error if I don't use it) else h2 = gg.choice({'Add 1000 Gold','Add 2000 Gold'},nil, 'Tom Gold Run') if h2 == nil then else if h2 == 1 then add1000() end if h2 == 2 then add2000() end end farm = -1 end end function add1000() coinsearchresults.value = coinsearchresults.value + '1000' coinsearchresults.flags = gg.TYPE_DWORD end function add2000() coinsearchresults.value = coinsearchresults.value + '2000' coinsearchresults.flags = gg.TYPE_DWORD end gg.setValues(coinsearchresults) searchingcoins = 'no' farm = 1 gg.alert('Success!!! Spend or earn some coins to see the change in your coin amount.') else gg.alert('Spend some more coins then click on the GameGuardian button and enter the amount you spent') farm = -1 searchingcoins = 'yes' end end while true do if gg.isVisible(true) then farm = 1 gg.setVisible(false) end if farm == 1 then home() end end
  3. Thanks, very helpfull... ?
  4. 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()
×
×
  • Create New...