Jump to content

Enyby

Administrators
  • Posts

    8,811
  • Joined

  • Last visited

  • Days Won

    1,017

Posts posted by Enyby

  1. Checking the password against the list of allowed passwords

    local pass = gg.prompt({"Input password:"}, nil, {"text"})
    if pass == nil then os.exit() end
    pass = pass[1]..' '
    local allowed = false
    local function allow_password(password)
    	if password..' ' == pass then 
    		allowed = true
    	end
    end
    
    allow_password('myPassword')
    allow_password('anotherPassword')
    allow_password('This_is_too_Password')
    allow_password('12345')
    allow_password('sex')
    allow_password('god')
    
    if not allowed then
    	os.exit(gg.alert('Wrong password'))
    else 
    	gg.toast("Password correct")
    end

     

  2. Prompt file with specified extension

    local ext = '.txt'
    local p = {gg.EXT_STORAGE}
    while true do
    	p = gg.prompt({'Select "'..ext..'" file:'}, p, {'file'})
    	if p == nil then os.exit() end
    	if p[1]:sub(-#ext) == ext then break end
    	gg.alert('You select "'..p[1]..'".\n\nIt is not end with "'..ext..'".\n\nPlease select file with "'..ext..'" extension.')
    end
    print(p[1]) -- do something

     

  3. There can be many solutions.
    1. Use files to save and restore state. Remember what has changed and look for changes.
    2. Search once, remember and restore the address, change the value without re-searching.
    3. Find values nearby and rely on them when searching.

  4. Prompt with 'remember' checkbox for store data in the config.

    local info = {}
    local config = gg.getFile()..'.cfg'
    local data = loadfile(config)
    if data ~= nil then
    	info = data()
    	data = nil
    end
    
    info = gg.prompt({'Login', 'Password', 'Remember'}, info, {'text', 'text', 'checkbox'})
    if info == nil then os.exit() end
    if info[3] then
    	gg.saveVariable(info, config)
    else
    	os.remove(config)
    end
    
    -- here work with 'info' content
    print(info)

     

  5. 2 hours ago, HEROGAMEOfficial said:

    1. Search DWORD mode Code found.

    2. Search FLOAT mode Code not found.

    @EnyBy this bug GG?

    Rounding issue.

    -50384417 dword is -1,06003776390176e37 float.

    It is too long for display in GG UI, so it is rounded to

    -1,0600378e37 which is equals to -50384416 dword.

    So it is not found.

    Strictly speaking -50384416 dword is -1,06003782728429e37

    In any case try search float by equality is not a good solution.

    Use range, as describe by NoFear.

    [added 3 minutes later]
    1 hour ago, yx335039642 said:

    Running Catton on android10 

    Nothing clear.

    Describe your problem in detail.
    The release of Android 10 has not yet been.

  6. 5 minutes ago, Broopaf said:

    I am a student + I have a interest in lua ,python c++ and java language so when I get free I study those concept + I play some games and got this script

    So see non-encrypted scripts.
    What you wrote is not the reason why you want to get the contents of this particular script.

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