So I've been reading up on how to use variables, and how to add them tables which can then be displayed with an alias. I was wondering if there is a way to update these values from the command line.
For example, I want to have my equipment displayed in one table, such as my dirk, but if the dirk were to decay and I get a new one, is there a way to quickly update the value of the variable in the command line, as opposed to going into the actual script location and changing it there?
0
Answers
At the rate dirks decay, just manually change it until you save up enough for artie dirk.
Or you could do database stuff, but that might be a bit overly complicated.
equipment={dirk=1234,...}
and save it with
table.save(equipment, getMudletHomeDir().."\equipment.txt").
Then you can have a script that loads it when you log in, with
table.load(equipment,getMudletHomeDir().."\equipment.txt").
You can make an alias to set the values when something changes, or do it from an alias that runs arbitrary lua code (like the "lua..." alias that comes with svo), and have a trigger or alias to save the table when you qq.
You should check the manual for the order of arguments for the save and load functions, I might have them backward.
Svof
Mudlet Discord join up
Svof
Mudlet Discord join up