Jump to content
Enyby

LUA scripting

Recommended Posts

6 hours ago, MrDeadpool said:

How do i make my script search a encrypted value, im just doing a simple script...

gg.searchNumber(100, gg.TYPE_DWORD)

gg.getResults(5000000)

gg.editAll(-99999999, gg.TYPE_DWORD)

gg.clearResults()

Contact me on discordhttps://discord.gg/bhW8tba

 

Share this post


Link to post
Share on other sites

7 hours ago, MrDeadpool said:

How do i make my script search a encrypted value, im just doing a simple script...

gg.searchNumber(100, gg.TYPE_DWORD)

gg.getResults(5000000)

gg.editAll(-99999999, gg.TYPE_DWORD)

gg.clearResults()

 

here you go encrypted search but why edit 50 mill results lol

gg.searchNumber(100, gg.TYPE_DWORD, true)

gg.getResults(5000000)

gg.editAll(-99999999, gg.TYPE_DWORD)

gg.clearResults()

 

Share this post


Link to post
Share on other sites

5 million not 50 million, its just for a test on a roblox game

Share this post


Link to post
Share on other sites

 

4 hours ago, MrDeadpool said:

5 million not 50 million, its just for a test on a roblox game

It is 5 million

Share this post


Link to post
Share on other sites

what script hack game ??? 

Share this post


Link to post
Share on other sites

anyone know how to correct this script?

i keep getting error on choice number 2...

the function is to search a number when press Search, then refine search and freeze the first 4 address to 10. after done unfreeze and clear the list.

function doAction()
    local menu = gg.choice({'Search','Change','Clear','exit'})
    if menu==1 then 
        gg.clearResults()
        gg.searchNumber('1.23',gg.TYPE_FLOAT,false,gg.SIGN_EQUAL,0,-1) end
    if menu==2 then
        gg.refineNumber('4.56',gg.TYPE_FLOAT,false,gg.SIGN_EQUAL,0,-1)
        local t = gg.getResults(4)
        t[1].value = '10'
        t[1].freeze = true
        t[1].freezeType = FREEZE_NORMAL
        t[2].value = '10'
        t[2].freeze = true
        t[2].freezeType = FREEZE_NORMAL
        t[3].value = '10'
        t[3].freeze = true
        t[3].freezeType = FREEZE_NORMAL
        t[4].value = '10'
        t[4].freeze = true
        t[4].freezeType = FREEZE_NORMAL
        gg.addListItems(t) end
    if menu==3 then
        local r = gg.getListItems()
        r[1].freeze = false
        r[2].freeze = false
        r[3].freeze = false
        r[4].freeze = false
        gg.clearList()
        end
    if menu==4 then os.exit() end
end
gg.setVisible(false)
while true do
    if gg.isVisible() then
        gg.setVisible(false)
        doAction()
    end
    gg.sleep(100)
end

Share this post


Link to post
Share on other sites
Posted (edited)

Hello...

Which function to call the red boxes? gg.saveList didn't did the job for me

I want to save the selected address to a file and reloading it later via script. Just like i did it manual on GG

gghelp.png

Edited by Hun2Memory

Share this post


Link to post
Share on other sites
19 minutes ago, Hun2Memory said:

Hello...

Which function to call the red boxes? gg.saveList didn't did the job for me

I want to save the selected address to a file and reloading it later via script. Just like i did it manual on GG

gghelp.png

use loops

Share this post


Link to post
Share on other sites
1 minute ago, AjYouTube said:

use loops

can u give me an example?

Share this post


Link to post
Share on other sites
1 hour ago, Hun2Memory said:

Which function to call the red boxes?

addListItems

Share this post


Link to post
Share on other sites
Posted (edited)
13 hours ago, Enyby said:

addListItems

thank you

do you know a good way to loop the address?

cause i can't get the size of gg.getListItems

EDIT: nvm i found a way

gg.loadList('/sdcard/gg2.txt')
local r = gg.getListItems()
for i, lul in ipairs(r) do
	gg.toast(lul.address)
end

but idk if this nice enough, thank you again

Edited by Hun2Memory

Share this post


Link to post
Share on other sites

Try google about lua loops and lua table length. It is not a hard.

Share this post


Link to post
Share on other sites

hello,i wanna to ask How to write script to select freeze_in_range type data in saved list, and change them to a faourite value?

I've been learning a lot from here for a long time,  but I didn't solve this problem. Manual change them one by one is very complicated. (the game will reduce it, but i don't want it to become "0" or to be freezed, so i set it freeze_in_range).

For example, there are 18 saved values,  6 of them are freeze in range. It's easy to find them, but it's very tiring to change them once in two minutes.

I tried    gg.getListItems ()  , but it couldn't be selected and change, unlike gg.getResults().

This is a part of my script:

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

A1 =  17341 
A2 =  13552 
B1 =  13716 
B2 =  14304 
C1 =  14226 ~~~~~~
gg.searchNumber(A1..';'..A2..'', gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
  if gg.getResultCount() == 0 then
    gg.searchNumber(A1..';'..A2..'', gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
       if gg.getResultCount() == 0 then
           gg.setVisible(true)
       end
  else
     gg.toast('searching correct')
  end
t=gg.getResults(3)
t[1].value =  A2
t[1].freeze = true
t[2].value =  A1
t[2].freeze = true
t[2].freezeType = gg.FREEZE_IN_RANGE
t[2].freezeFrom = '1'
t[2].freezeTo =  A1
t[3].value =  A1
t[3].freeze = true
print('addListItems: ', gg.addListItems(t))

gg.clearResults()
gg.searchNumber(B1..';'..B2..'', gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)

~~~~~~~~~~~~~~~~

::loop::

(waiting for help,Thanks a lot)

go to loop

201905251109.jpg

Share this post


Link to post
Share on other sites

Hello dear by enyby

Can Simcity benefit me in club battles?

Share this post


Link to post
Share on other sites
13 hours ago, Ton8y5 said:

hello,i wanna to ask How to write script to select freeze_in_range type data in saved list, and change them to a faourite value?

To select specific items use "getListItems" function and filter items that match condition.

Example of selecting frozen items with freeze type "freeze in range": 

local items = gg.getListItems()
for i, v in ipairs(items) do
  if (not v.freeze) or (v.freezeType ~= gg.FREEZE_IN_RANGE) then
    items[i] = nil
  end
end

To change values of the selected items use "setValues" function (if only value needs to be changed) or "addListItems" function (if anything of the following needs to be changed: freeze state, freeze type, "freeze from" value, "freeze to" value).

Example of changing values of the previously selected items: 

for k, v in pairs(items) do
  v.value = '123'
end
gg.setValues(items)

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

×
×
  • Create New...