Looking for a Mudlet Script

Does anyone have a script for mudlet that would announce to a clan/org not only then room name of a person but the area?

I have a basic trigger to announce my spiritwatchers when an enemy enters and triggers them, but I would like it to say what area and if possible room vnum as well.

Example:

ct Johndoe has been spotted at a room(12345) in an area.

TIA

Comments

  • EnyalidaEnyalida Nasty Woman, Sockpuppeteer to the Gods
    Iirc, the mudlet mapper has a function in the utils that either outputs the first potential area name based on the room number, or returns a table of areas containing that room.

    You can also save the room area (grabbed from gmcp) when you set the watcher. Save the area in a table, keyed by the room name or number, and when your trigger is called, return the value.
  • Example, change as relevant.

    ^You see that (\w+) is at (.+).$
    send("clt "..matches[2].." spotted at "..matches[3]..". In: "..mmp.getexactarea(matches[3]).." (v"..mmp.getnums(matches[3])..")")

    Will report:

    clt Person spotted at RoomName. In: RoomArea (v12345)
    image
  • Oops. I shouldn't code when half asleep.

    local poss_numbs = mmp.getnums(matches[3])

    send("clt "..matches[2].." spotted at "..matches[3]..". In: "..mmp.getexactarea(matches[3]).." (v"..table.concat(poss_numbs, ", ")..")")



    ^ use this instead.


    image
Sign In or Register to comment.