Looking for help with mudlet mapper scry/map/snowglobe

Hi people.

This is probably a really simple thing to fix but I've been poking at it for a few days and cant seem to get it right

The scry trigger linked to the mapper puts a handy little (123) thing next to peoples names so I can just click it to walk to them.

I've got the goop map(snowglobe) thing and I'm trying to make it do the same thing but can't quite figure it out.

The scry trigger looks like this:
^You rub .* and it begins to glow with a pulsating light\.$
Within the enchanted item, an image forms of (\w+) at (.+?)(?: \(.*\))?\.

Both perl regex and in the box they do:

mmp.locateAndEcho(multimatches[2][3], multimatches[2][2])

So I'm trying to copy that over into the the snowglobe thing but its a bit longer so it requires three lines

^You trace the name of \w+ on the surface of a wintry snowglobe of arctic wildlife, and then shake the globe vigorously\. As the swirling particles within clear, you see the vague outline of .+?\.$
You see the following in detail:
v(\d+)

and then the system makes it do:
mmp.gotoRoom(multimatches[3][2])

which finds the person and makes me start auto walking to them. I didn't want it to auto walk me though just replicate scry.

So I tried putting in 
mmp.locateAndEcho(multimatches[2][3], multimatches[2][2])

With different numbers but can't quite seem to figure out the right combination. Can anyone help with this?

Comments

  • edited October 2016
    iirc locateAndEcho requires a string (partial room name to match against), so you'd want to capture the the end of the first line and test that. 
    The alternative would be to make an echolink for 'mmp.gotoRoom(multimatches[3][2])' on the vnum (Which is probably what I'd do) if you don't want to automatically path there.
    (I'm the mom of Hallifax btw, so if you are in Hallifax please call me mom.)

    == Professional Girl Gamer == 
    Yes I play games
    Yes I'm a girl
    get over it
  • Well the map does this 

    You trace the name of Mailprion on the surface of a wintry snowglobe of arctic wildlife, and then 
    shake the globe vigorously. As the swirling particles within clear, you see the vague outline of 
    under a dark root.
    You see the following in detail:
    ----------- v1476 -----------

    So I figured it shows the room number in that v line so just use that?
  • edited October 2016
    So it really depends on what you want to do. You could just make the vnum clickable with some setLink after selecting the string to expand a mmp.goto such as 

    selectString(multimatches[3][2], 1)  -- You could use multimatches[3][1] in this instance if you wanted the v as part of the link too
    setLink([[mmp.gotoRoom( ]]..multimatches[3][2]..[[)]], multimatches[3][2])
    setUnderline(true)
    deselect()
    resetFormat()

    Or you could echo a link at the end via 'echoLink("Run at this person!", [[mmp.gotoRoom( ]]..multimatches[3][2]..[[)]], "Begin running!")'

    You could change the above around however you want, and I'm pretty sure whatever your desired result is can be attained by rearranging of this code or changing the select string or echo fields. As always lua/mudletinterface documentation can be found here: http://wiki.mudlet.org/w/Manual:Lua_Functions

    Edit: It's possible that mmp has some simple number->clickable thing in it but not one I'm familiar with. The above also are handy snips for other things you might want to code.

    (I'm the mom of Hallifax btw, so if you are in Hallifax please call me mom.)

    == Professional Girl Gamer == 
    Yes I play games
    Yes I'm a girl
    get over it
  • Ah cool thanks that mostly covers the functions. The only thing I'm missing now is adding the name and the room to the name database
  • Ah. Yeah. I admit I'm not the most versed in mmp. Good luck!
    (I'm the mom of Hallifax btw, so if you are in Hallifax please call me mom.)

    == Professional Girl Gamer == 
    Yes I play games
    Yes I'm a girl
    get over it
Sign In or Register to comment.