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 Mrkemoo
      Hi
      So I've been using gg for awhile and I been succeeding most of the time but I think I can do better. I want to ask you all to give me some suggestions of games or way to find vaules so I can practice and improve. If you can just please help me out here it would be much appreciated 
      Other that have a good day
      Mrkemo
    • 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 THIS VIDEO TO KNOW HOW TO MAKE A LUA SCRIPT FOR ANY GAME
       
      WATCH THIS VIDEO TO KNOW HOW TO MAKE A LUA SCRIPT FOR ANY GAME
      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 THIS VIDEO TO KNOW HOW TO MAKE A LUA SCRIPT FOR ANY GAME
       
      WATCH THIS VIDEO TO KNOW HOW TO MAKE A LUA SCRIPT FOR ANY GAME
    • By ecchiro
      Anyone who can make script for rocket royale
×
×
  • Create New...