So Im capturing the room description and i read through the two threads from nick on lua tables but I dont understand how to edit the styles that I have saved to a table. I didnt see much on nested tables. cause all I have figured out just shows me another table.
table: 030CBFD0 1
So I saved the room
line, wildcards, styles = wait.match ("*")
Then I insert it into the table
table.instert(room, styles)
but now I want to be able to go through the tables and say edit the text or the textcolor in the nested tables. And I dont know how to do that. Say I want to go through the text and remove everything inside a [] and add a - to the start of each line. how is that done. Or Say I want to look at the text from key 23. Thanks
table: 030CBFD0 1
So I saved the room
line, wildcards, styles = wait.match ("*")
Then I insert it into the table
table.instert(room, styles)
but now I want to be able to go through the tables and say edit the text or the textcolor in the nested tables. And I dont know how to do that. Say I want to go through the text and remove everything inside a [] and add a - to the start of each line. how is that done. Or Say I want to look at the text from key 23. Thanks
<aliases>
<alias
match="test2"
enabled="y"
send_to="12"
sequence="100"
>
<send>require "wait"
require "tprint"
wait.make (function ()
local room = {}
Send ("Look")
local w = wait.match ("[ Exits: n e s w u d ]")
while true do
line, wildcards, styles = wait.match("*")
if not string.match (line, "[A-Za-z0-9]") then
break
end
table.insert (room, styles)
end -- end loop
tprint(room)
end)</send>
</alias>
</aliases>