Table of selected Rooms?

drak
Posts: 9
Joined: Sat Mar 30, 2013 2:25 am

Table of selected Rooms?

Post by drak »

Is there a way to get access to which rooms are selected on the mapper in a table or something inside a script?

I'm using linux (ubuntu) version 2.0

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Table of selected Rooms?

Post by chris »

You can use the custom map event hooks via right click/select. But at the moment, there is nothing in the api to do it. Good idea though.

drak
Posts: 9
Joined: Sat Mar 30, 2013 2:25 am

Re: Table of selected Rooms?

Post by drak »

I tried adding a hook and perhaps i'm not doing it correctly, I've searched all over and can't find out why its not working. I went to windows and tried it and still can't get anything to show up on the menu.

When I lua at the command prompt:
addMapMenu("Favorites") -- will create a menu, favorites

the error in the console is:
LUA: ERROR running script Run lua script (Alias20) ERROR:[string "return addMapMenu("Favorites") --
will create..."]:1: attempt to call global 'addMapMenu' (a nil value)

Am I using a wrong version? Or am I missing something?

Thanks for replying :)

I've got my mapper working pretty good, with buttons for Find, Look, Edit mode, room stubs are auto showing and merging correctly, like the othe client I used to use... But it would be nice to do my own merge scripts and without creating a keyboard curser for the map, the mouse would help alot.

Silvine
Posts: 142
Joined: Sat Oct 23, 2010 2:36 pm

Re: Table of selected Rooms?

Post by Silvine »

With regard to accessing the selected rooms, is this what your after? display(arg) is the bit your after I think.
forums.mudlet.org/viewtopic.php?f=9&t=2730&start=40#p15190
And the right click menu thing is directly below it in the same post.

I get the feeling you are in the same place now, I was in a we while ago.

drak
Posts: 9
Joined: Sat Mar 30, 2013 2:25 am

Re: Table of selected Rooms?

Post by drak »

Yes, that looks like what I want but it doesn't seem to be working. It is like my version of Mudlet does not support the addMapMenu function. Is there something else I need to add to Mudlet?

This is the debug error when clicking on the save button to that script:
Lua syntax error:[string "---------------------------------------------..."]:6: attempt to call
global 'addMapMenu' (a nil value)
ERROR: Lua compile error. compiling script of script:EventHandler

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Table of selected Rooms?

Post by chris »

What version do you use

drak
Posts: 9
Joined: Sat Mar 30, 2013 2:25 am

Re: Table of selected Rooms?

Post by drak »

It is version Mudlet 2.0 June 12, 2011

Its the stock install from Ubuntu 12.04 LTS from the repositories.

User avatar
kevutian
Posts: 217
Joined: Fri Aug 20, 2010 8:18 pm
Location: United Kingdom
Contact:

Re: Table of selected Rooms?

Post by kevutian »

Yeah, upgrade mate.

You can either add the Sid repo (and hope for the best) or build from source.

drak
Posts: 9
Joined: Sat Mar 30, 2013 2:25 am

Re: Table of selected Rooms?

Post by drak »

phasma wrote:Yeah, upgrade mate.

You can either add the Sid repo (and hope for the best) or build from source.
I'm not too keen on the build from source path, but I can give it a try. Is there a zipped source somewhere? This doesn't seem to show a gzip file of the whole thing.

Where can I get the "Sid repo"?

User avatar
kevutian
Posts: 217
Joined: Fri Aug 20, 2010 8:18 pm
Location: United Kingdom
Contact:

Re: Table of selected Rooms?

Post by kevutian »

You need to be aware that this is a Debian branch, so it may or may not work and can even cause problems.

Simply append the following to /etc/apt/sources.list

Code: Select all

deb http://ftp.debian.org/debian sid main contrib non-free
Then:

Code: Select all

$ sudo apt-get update && sudo apt-get install mudlet

Post Reply