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?
0
Comments
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.
== Professional Girl Gamer ==
Yes I play games
Yes I'm a girl
get over it
So I figured it shows the room number in that v line so just use that?
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.
== Professional Girl Gamer ==
Yes I play games
Yes I'm a girl
get over it
== Professional Girl Gamer ==
Yes I play games
Yes I'm a girl
get over it