black ) -death trap setRoomEnv ( val, 300 ) -death traps Env setCustomEnvColor ( 300, r, g, b, 255 ) setRoomChar ( val, "☠️" ) lockRoom ( val, true ) elseif markRoomType = "markRoomsAsOneRoom" then local r, g, b = unpack ( color_table. See also: addMapMenu(), removeMapEvent(), getMapEvents() ExampleĪddMapMenu ( "Room type" ) addMapEvent ( "markRoomsAsDeathTrap", "onMapMarkSelectedRooms", "Room type", "Mark selected rooms as Death Trap" ) addMapEvent ( "markRoomsAsOneRoom", "onMapMarkSelectedRooms", "Room type", "Mark selected rooms as single-pass" ) function onMapMarkSelectedRooms ( event, markRoomType ) local selectedRooms = getMapSelection () for i, val in ipairs ( selectedRooms ) do if markRoomType = "markRoomsAsDeathTrap" then local r, g, b = unpack ( color_table. event name is the Mudlet event that will be called when this is clicked on, and arguments will be passed to the handler function. If there is no display name, it will default to the unique name (which otherwise isn't shown and is just used to differentiate this entry from others). Local areaid = addAreaName ( "my first area" ) local newroomid = createRoomID () addRoom ( newroomid ) setRoomArea ( newroomid, "my first area" ) setRoomCoordinates ( newroomid, 0, 0, 0 ) local otherroomid = createRoomID () addRoom ( otherroomid ) setRoomArea ( otherroomid, "my first area" ) setRoomCoordinates ( otherroomid, 0, 5, 0 ) addSpecialExit ( newroomid, otherroomid, "climb Rope" ) addCustomLine ( newroomid, , false ) centerview ( newroomid ) addMapEvent addMapEvent(uniquename, event name, parent, display name, arguments) Adds a new entry to an existing mapper right-click entry. arrow: a boolean which if true will set the custom line to have an arrow on the end of the last segment.color: a table of three integers between 0 and 255 as the custom line color as the red, green and blue components in that order.style: a string, one of: "solid line", "dot line", "dash line", "dash dot line" or "dash dot dot line" exactly.direction: a string to associate the line with a valid exit direction, "n", "ne", "e", "se", "s", "sw", "w", "nw", "up", "down", "in" or "out" or a special exit (before Mudlet 3.17 this was case-sensitive and cardinal directions had to be uppercase).ParametersĮITHER: a room Id number, of a room on same area who's x and y coordinates are used as the other end of a SINGLE segment custom line (it does NOT imply that is what the exit it represent goes to, just the location of the end of the line) OR: a table of sets of THREE (x,y and z) coordinates in that order, x and y can be decimals, z is an integer ( and must be present and be the same for all points on the line, though it is irrelevant to what is produced as the line is drawn on the same z-coordinate as the room that the line is attached to!) \n " ) end addCustomLine addCustomLine(roomID, id_to, direction, style, color, arrow) See also: getCustomLines(), removeCustomLine() Adds a new/replaces an existing custom exit line to the 2D mapper for the room with the Id given. random ( 10 )) if newId = nil or newId Created new area with the ID of ". Local newId, err = addAreaName ( string. To register a script as a mapping one with Mudlet (so Mudlet knows the profile has one and won't bother the user when they open the map), please do this in your script: For a collection of pre-made scripts and general mapper talk, visit the mapper section of the forums. The mapper is designed to be generic - it only provides the display and pathway calculations, to be used in Lua scripts that are tailored to the game you're playing. These are functions that are to be used with the Mudlet Mapper.
0 Comments
Leave a Reply. |