Jump to content
  • 0

Help, Lua, Create file and write on it


CheatTester

Question

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

 

 

 

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • Administrators

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.

Link to comment
Share on other sites

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)

Link to comment
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!

Link to comment
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"

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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