Jump to content
CheatTester

Help, Lua, Create file and write on it

Recommended Posts

Please help for anyone who read this and can help me, Basically this is for teleport map, so i have some data on Saved list, if i change it, it change my player position, but i need save manually any position that i will use later

Kind of

r = gg.getListItems 

set Values

What i want is :

Make script that can save my data on Saved List to new text files with custom name, then write on it with template like

__

r[1].value = "save data here"

gg.SetValues

__

Is it possible? Please teach me.

i usually use save to txt feature on gameguardian, then edit it.

Thanks

 

 

 

 

Share this post


Link to post
Share on other sites

You can load values to table and store to any file with any format. After that you can write on lua load from this files and restore data via setValues.

Also you can use gg.saveVariable for fast save variable to text (lua) file.

Read API help for each functions. it is not many as can be.

Share this post


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

You can load values to table and store to any file with any format. After that you can write on lua load from this files and restore data via setValues.

Also you can use gg.saveVariable for fast save variable to text (lua) file.

Read API help for each functions. it is not many as can be.

I didnot understand exactly what he need but i think MR @CheatTester need this codes :

local values = gg.getResults(50000)
gg.addListItems(values)

Edited by TopGEOYT

Share this post


Link to post
Share on other sites

I'm not a good writer of Lua scripts, I just make my own way and it works, sometimes it goes out of the way more complicated and lazy XD
but returning to the subject, if you want to burn a file to read later with your due values, you can use the "io.open" of the LUA itself.
but of course using the format of the game's guardian strings itself, since the saved gg list is a txt file.
I do not know if this idea is valid, it's that I'm kind of lazy to think of something, especially when it's not for me XD...
or just do a saveList and then a loadList with LOAD_VALUES and you're done!

Share this post


Link to post
Share on other sites
Posted (edited)

Is it possible to save with custom file name every time i want to save the savedList using ?

gg.saveList(  ,SAVE_AS_TEXT)

Edited by CheatTester

Share this post


Link to post
Share on other sites

 yes, you can use any name and use any extension, so that it is capable and load. but if you want to load the file with the values for the gg app modify, you should not save with text, because in the api of the game guardian says saving as text makes it unable to load the values later.

that is, you can save it with the name teleport1.txt You can use a .txt extension, but you should not use a "save as a text"

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

  • Similar Content

    • By Squidoodle04
      Could someone help me pls?
      I want GG to search big numbers like 4,9190192e82F;9920D or so in a group search but if I execute script and select the option the script is just ending and not searching.
      Here's my code:
      menu = gg.choice({'Hack' , 'End'},nil,'Select')
      if menu == 1 then
      gg.searchNumber('65.536;-65.535;101:13',gg.TYPE_DWORD)
      t = gg.getResults(3)
      t[3].value = '32767'
      t[3].freeze = true
      t[3].freezType = gg.FREEZE_NORMAL
      print('Cheat Activated' ,gg.addListItems(t))
      os.exit()
      end
      if menu == 2 then
      os.exit()
      end
       
    • By WebReveuse1
      Hello,
      I just created my first lua script on the Dragon Ball Legends game on Android and I would like to have your opinion on this work which took time because I started ...
      The ModMenu includes the following options:
      - GodMod: Become Invincible
      - Weak Ennemy: Make the opponent vulnerable (choice of the number of enemies to automate the task)
      For the Weak Ennemy, when the opponent dies in excruciating pain after your fatal blow with the infinity glove, you automatically return to GameGuardian and the next opponent is automatically made vulnerable, until you extermination of each opponent.
      ::start:: mort = 1 gg.setVisible(true) gg.clearResults() gg.clearList() menu = gg.choice({"💪GodMod💪","☠️Weak Ennemy☠️","Both"},nil,"VIP ModMenu Dragon Ball Legends") if menu == nil then goto stop end weakmod = 1 godmod = 1e30 if menu == 1 then both = false goto a end if menu == 2 then both = false goto b end if menu == 3 then both = true goto a end if menu == nil then goto stop end ::a:: data = gg.prompt({[1]='My HP'}, {[1]=nil}) if data == nil then goto start end gg.searchNumber(data[1], gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1) empty = gg.getResultsCount() if empty == 0 then gg.clearResults() gg.searchNumber(data[1], gg.TYPE_AUTO, false, gg.SIGN_EQUAL, 0, -1) end gg.getResults(12) gg.editAll(godmod, gg.TYPE_FLOAT) gg.clearResults() gg.toast("💪GodMod ACTIVATED💪") if both == true then goto b else goto stop end ::b:: choix_nb_ennemy = gg.choice({'1', '2', '3'}, nil, 'Ennemy Number') data = gg.prompt({[1]='Ennemy HP'}, {[1]=nil}) if data == nil then goto start end gg.searchNumber(data[1], gg.TYPE_AUTO, false, gg.SIGN_EQUAL, 0, -1) next_ennemy = data[1] gg.getResults(20) gg.editAll(weakmod, gg.TYPE_FLOAT) gg.toast("☠️Weak Ennemy ACTIVATED☠️") goto c ::c:: if gg.isVisible(true) then gg.setVisible(false) end if choix_nb_ennemy == 1 then nb_ennemy = 1 end if choix_nb_ennemy == 2 then nb_ennemy = 2 end if choix_nb_ennemy == 3 then nb_ennemy = 3 end while mort <= nb_ennemy do if mort == nb_ennemy then break end for i, v in pairs(gg.getResults(16, nil, nil, nil, nil, nil, gg.TYPE_DWORD | gg.TYPE_QWORD)) do if v.value > 1 and v.value ~= next_ennemy then gg.toast("☠️Ennemy is Dead☠️Back to GG...") gg.sleep(1000) next_ennemy = v.value goto d end end end gg.toast("☠️Ennemy is Dead☠️👑YOU WIN👑") goto stop ::d:: mort = mort + 1 gg.setVisible(true) gg.clearResults() gg.searchNumber(next_ennemy, gg.TYPE_AUTO, false, gg.SIGN_EQUAL, 0, -1) gg.getResults(16) gg.editAll(weakmod, gg.TYPE_FLOAT) gg.toast("☠️Weak Ennemy ACTIVATED☠️") goto c ::stop:: if gg.isVisible(true) then gg.setVisible(false) end gg.clearResults() os.exit() I also have a question: Can we make sure that the values are automatically found at the launch of the script without the user entering anything? For example when the fight begins, my character has 1 500 000 HP, can we find this value without the user entering "1500000" in the script?
      Thank you for your feedback!
      WebReveuse1
       
    • By Mohamed90
      Script not working after update to v.81 and above..it running but nothing change but its working perfect with v.80.
      One more thing, in the app settings its written v.30.4 but its the last version
    • By RONO_PLAYS
      View File HOW TO MAKE A LUA SCRIPT FOR ANY GAME
       More scripts from the creator
      This is a  template that will help you create a script menu for any game
      Download the apps used in this video:
      lua editor
      GG tester
       
      WATCH THESE VIDEOS TO KNOW HOW TO MAKE A LUA SCRIPT FOR ANY GAME
      PART 1
      WATCH THIS VIDEO TO KNOW HOW TO MAKE A LUA SCRIPT FOR ANY GAME
       
      PART 2:
       
       
      PART 3
       
      Submitter RONO_PLAYS Submitted 04/27/2019 Category Templates  
    • By RONO_PLAYS
      More scripts from the creator
      This is a  template that will help you create a script menu for any game
      Download the apps used in this video:
      lua editor
      GG tester
       
      WATCH THESE VIDEOS TO KNOW HOW TO MAKE A LUA SCRIPT FOR ANY GAME
      PART 1
      WATCH THIS VIDEO TO KNOW HOW TO MAKE A LUA SCRIPT FOR ANY GAME
       
      PART 2:
       
       
      PART 3
       
×
×
  • Create New...