

[Mudlet] Make mapper goto remap path and use wings when returning from Meropis

KlendathuKlendathu Eye of the StormPosts: 2,964Member @@ - Legendary Achaean
Klendathu has a pebble, and is forever back and forth to Meropis. One thing that's always niggled with me is that because Mudlet-Mapper works out the path from point of origin, if that point of origin is on Meropis, it won't use artefact wings when it gets to Sea Lion Cove.

Copy and paste the following into a blank script and when you get to Sea Lion Cove from Meropis, your path will be remapped and use wings if appropriate. The trigger is included in the code block, so no need to add that separately.

mmp = mmp or {}
mmp.remapPath = function()
        if mmp.settings.duanathar == false and mmp.settings.duanatharan == false then return end -- no wings, no point
        if #mmp.speedWalkPath > 0 then -- there is a destination
                local destination = mmp.speedWalkPath[#mmp.speedWalkPath]
                mmp.echo(string.format("Remapping path to %d (%s)",destination, getRoomName(destination)))
                mmp.gotoRoom(destination, gallop)
mmp.createTrigger = function()
        if seaLionCoveTrigger then killTrigger(seaLionCoveTrigger) seaLionCoveTrigger = nil end
        seaLionCoveTrigger = tempExactMatchTrigger("As your fingertips break through the swirling mist of a shimmering portal, you are tugged through to the distant Sea Lion Cove.", [[mmp.remapPath()]])
mmp.createTrigger() --would prefer to use an event, but can't find an appropriate one

Sign In to Comment.