Forums » Community Projects
Need advice for KOS list plugin
Trying to make a plugin for alert on KOS players (maybe there's already such plugin, but I didn't manage to find it). The idea is to alert you when person enters sector or at least when targeting it and to alert KOS player with /msg too :}.
Is it possible to store and extract simple text lines from .txt? And how to store it correct?
For example:
Player 1
Player 2
Player 3
...
Is it possible to store and extract simple text lines from .txt? And how to store it correct?
For example:
Player 1
Player 2
Player 3
...
If you mean writing to a file, then, not to an arbitrary one.
You can use gkini.Read/WriteString to write to config.ini
That has some limitations but is probably sufficient for this.
Details here http://www.vo-wiki.com/racecar/index.php?title=Gkini
There is also Save/LoadSystemNotes, which lets you write txt files that were intended to be about, well, mission notes but can be used for other stuff
http://www.vo-wiki.com/racecar/index.php?title=API_SaveSystemNotes
You can use gkini.Read/WriteString to write to config.ini
That has some limitations but is probably sufficient for this.
Details here http://www.vo-wiki.com/racecar/index.php?title=Gkini
There is also Save/LoadSystemNotes, which lets you write txt files that were intended to be about, well, mission notes but can be used for other stuff
http://www.vo-wiki.com/racecar/index.php?title=API_SaveSystemNotes
For this use case, you want to use SystemNotes. The idea is to pick some large random "system" number that (hopefully) doesn't collide with the number chosen by some other plugin. It's a big, nasty mess.
I'd like to take this opportunity to ask the devs to allow us to read/write arbitrary files through the lua interface.
I'd like to take this opportunity to ask the devs to allow us to read/write arbitrary files through the lua interface.
Actually i'd use gkini, it is perfectly sufficient here and SystemNotes have the collision issue you mentioned.
i'd relay it all to an sql database that can be used no matter what computer i go to but *shrugs* that's just me
Well, that's somewhat more involved.
Tho, it'd be nice if there was a way to store settings on vo's own server.
Tho, it'd be nice if there was a way to store settings on vo's own server.
Don't see that happening heh