For some reason I can't get the in-game map to capture properly to a miniconsole... here is my script to create the window:
----------
function initMap()
resolutionX, resolutionY = getMainWindowSize()
setMiniConsoleFontSize("map_window", 10);
createMiniConsole("map_window", resolutionX-440, 50, 400, 350)
setBackgroundColor("map_window", 200, 0, 0, 0 )
end
initMap()
----------
This properly creates the miniConsole, and I can echo("map_window", "blah blah blah") and it works fine... however my capture trigger(s) won't actually put the output there, here is my capture triggers:
a Filter trigger like: ^--- Area (\d+): (.+) \-+$ (perl regex), set to fire 24 more lines
a lua trigger of "return true" under that filter trigger, which does:
selectString(line);
-- copy the rich text into a buffer
copy();
-- paste it into our map miniConsole
appendBuffer("map_window");
-- erase from main screen
deleteLine()
Now, all of the map gets deleted, so I know the lua trigger is working on it, but for some reason it never gets appended to the map_window window. Any ideas why?
Help with capturing achaea map to miniconsole
Re: Help with capturing achaea map to miniconsole
try selectString(line,1). I know I've had issues with that in the past. Also make sure you're using the latest version, there was a version where appendBuffer was broken
Re: Help with capturing achaea map to miniconsole
You do have to use selectString(line, 1).
Re: Help with capturing achaea map to miniconsole
I have made this into my own mapper and altered it a tad, but I am having the problem with when I close Mudlet and reopen it the map gets all squished together. When I go into the script and just click save it fixes itself, ideas?
Re: Help with capturing achaea map to miniconsole
I was able to successfully capture the Achaea map to a miniconsole but am trying to figure out how to update the map without spamming the server. Obviously using the Lua function return isPrompt() constantly spams the server with the "map" command. Is there any way to stop it after it has fired once?
The only workaround I've found so far is to use a timer but I'm sure there's a better way.
The only workaround I've found so far is to use a timer but I'm sure there's a better way.
Re: Help with capturing achaea map to miniconsole
Alias your movement commands so you only send the map command when you move?
Re: Help with capturing achaea map to miniconsole
That's actually a good idea. I thought of that last night as well but didn't have time to try it out. The only problem with that is I don't think the map will update if I am following someone since I'm not pressing the movement keys when following.Parnakra wrote:Alias your movement commands so you only send the map command when you move?
EDIT: It works! Just have to figure out how to have it update when following someone.