Issue With Clickable Links
Posted: Thu Jul 16, 2015 10:01 pm
I'm trying to add clickable links to the "info here" output in Achaea that will allow me to do things like add the IDs of items in the room to a table. When I type "info here" I have something that looks like
EDIT: I'm going to be accomplishing this particular task through GMCP, but I'd still love to hear the solution as I intend to write similar scripts in the near future that will have the same problem.
I made a trigger that matches ^(\D+)(\d+)\s+(\D.*)$ which has the associated script:
the ihFlag variable is just there to keep the pattern from matching at inappropriate times. Anyways, the links show up and work properly, except if I click one of them (either the add or remove buttons) it only pattern matches the last item in the room description. In this case, if I click any of the 'add' links, then it'll call the function addHuntTarg("a runic totem"). So what appears to be happening is that ihDescription is not sticking to the clickable link itself, but the link accesses the value of ihDescription at the time I click it. How do I get the desired behavior?
EDIT: I'm going to be accomplishing this particular task through GMCP, but I'd still love to hear the solution as I intend to write similar scripts in the near future that will have the same problem.