Clickable links in Geyser objects

Post Reply
Loem
Posts: 17
Joined: Tue Jul 09, 2013 9:52 pm

Clickable links in Geyser objects

Post by Loem »

After two hours of late-night coding I'm pretty stumped on this one. Basically I have a name list of who's in a room gathered from GMCP, stuffed into a table, and output into a reporting MiniConsole. The table is simply a character's name as the key with the value as their full name. So for example:

{
CharacterName = "Epic, CharacterName of epicness"
}

It's then passed through this:
Code: [show] | [select all] lua
  if box1visible == true then
  clearWindow("roomstuffBox1")
    for k,v in pairs(LTroompeople) do
      LTtempnameT = k
      if LTtempnameT == gmcp.Char.Name.name then
        if LTmui.config.LTmuishowmewho == "yes" then
          roomstuffBox1:echo(LTtempnameT .. "\n")
        end
      else
       echoLink("roomstuffBox1", LTtempnameT .. "\n", [[target = LTtempnameT cecho ("\n<steel_blue>[LTmui]- <red>Your target is now <white>" .. target)]], v, true)
      end
    end
  end
When activated, if the person tracking tab is visible, it clears it, sifts through the table, sets the short name in a temp variable, goes through a config option on whether to show the user's name or not, then either echos it, or echos any other name as a link. It works perfect save for the code fired on click. Given how it's set above, it just targets the last name echoed due to the on-click code apparently being fired after the variables are altered.

So how would I go about making it equate to that line's character name in the on-click code? It's bit beyond me at the moment.

Thanks.

Post Reply