Generic Mapper Additions

From Mudlet
Revision as of 07:34, 11 April 2021 by Dawthus (talk | contribs) (Adding info for mysticalmud)
Jump to navigation Jump to search

This is a collection of triggers for the generic mapper script that are too dangerous to be enabled for all games and should only be added on a per-game basis. Eventually we'd like to add the to the generic mapper script when it's able to enable patterns on a per-game basis.


Avatar Mud

avatar.outland.org:3000

Create a new script called SetGMCPRoomName

Add User Event Handler: gmcp.Room.Info

function setGMCPRoomName() -- MUST match the 'name' above
  -- if map.getRoomAreaName ~= gmcp.Room.Info.zone then
    -- map.set_area(gmcp.Room.Info.zone)
  -- end
  map.prompt.room = gmcp.Room.Info.name
  map.prompt.exits = table.concat(table.keys(gmcp.Room.Info.exits), " ")
  raiseEvent("onNewRoom",map.prompt.exits)
end

That's it :) map away! Will update if any more things need to be tweaked - Added by Whiteheat - 9 April 2021

Kingdoms of the Lost

kotl.org: 2222

exit lines:

[inside: south->closed]

[field: north->closed *east *south->open west]

[field: *east west]

[city(very bright): north east south west up northwest]

regex for the above: \[.+: (.+)\] (regex101)

Reinos de Leyenda

map translate north norte n
map translate south sur s
map translate east este e
map translate west oeste w
map translate northwest noroeste no
map translate northeast noreste ne
map translate southwest suroeste so
map translate southeast sureste se
map translate up arriba ar
map translate down abajo ab
map translate out fuera fu
map translate in dentro de

-- ensure normal prompt is setup in the game that matches this exactly, include the space in the end of the pattern:
map prompt ^PV: %d+/%d+ GP: %d+/%d+;

Aladon

Make a new trigger with this perl regex pattern:

^\s*\[\s*Видимые выходы:\s*(.*)\]

that does this:

raiseEvent("onNewRoom",matches[2] or "")

Then enter the following in the input line:

map translate north север с
map translate south юг ю
map translate east восток в
map translate west запад з
map translate up вверх вв
map translate down вниз вн

That's it! Now you can do start mapping my first area.

Federation2

play.federation2.com: 30003

Add this pattern to Triggers->generic_Mapper->English Trigger Group->English Exit Triggers

[Ee]xits:\s(.*)

Define the prompt byː

map prompt You can see %.+ exits:


Now you can do start mapping my first area.


Brutália

telnetbrutalia2.avantek.hu 4444

Make a new trigger, with this perl regex pattern:

^.+kijáratot látsz: (.*)\.$

That does this:

raiseEvent("onNewRoom",matches[2] or "")

Then add another trigger perl regex pattern:

Nem mehetsz abba az iranyba.

That does this:

raiseEvent("onMoveFail")

Then, enter the following to the input line:

map translate north észak e
map translate south dél d
map translate east kelet k
map translate west nyugat n
map translate northwest északnyugat en
map translate northeast északkelet ek
map translate southwest délnyugat dn
map translate southeast délkelet dk
map translate up fel fe
map translate down le le
map translate out ki ki 
map translate in be be

Now you can do start mapping my first area.

MysticalMud

mysticalmud.org:5000

Add this pattern to Triggers->generic_Mapper->English Trigger Group->English Exit Triggers

^\[Exits:\s*(.*)\]

and add to the LUA code ABOVE the existing line: if (matches[2]) then matches[2] = matches[2]:gsub("."," %0"):sub(2) end

Now you can do start mapping my first area.