Help with capturing achaea map to miniconsole

Post Reply
malaphus
Posts: 9
Joined: Mon Feb 01, 2010 11:47 pm

Help with capturing achaea map to miniconsole

Post by malaphus »

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?

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: Help with capturing achaea map to miniconsole

Post by tsuujin »

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

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Help with capturing achaea map to miniconsole

Post by Vadi »

You do have to use selectString(line, 1).

Liam
Posts: 1
Joined: Wed Oct 13, 2010 4:06 am

Re: Help with capturing achaea map to miniconsole

Post by Liam »

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?

nexa33
Posts: 14
Joined: Wed Oct 27, 2010 2:47 am

Re: Help with capturing achaea map to miniconsole

Post by nexa33 »

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.

Parnakra
Posts: 35
Joined: Tue Apr 21, 2009 10:48 am

Re: Help with capturing achaea map to miniconsole

Post by Parnakra »

Alias your movement commands so you only send the map command when you move?

nexa33
Posts: 14
Joined: Wed Oct 27, 2010 2:47 am

Re: Help with capturing achaea map to miniconsole

Post by nexa33 »

Parnakra wrote:Alias your movement commands so you only send the map command when you move?
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.

EDIT: It works! Just have to figure out how to have it update when following someone.

Post Reply