Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Plugins
➜ Showing doors in the mapper
Showing doors in the mapper
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Calamarain
(3 posts) Bio
|
Date
| Tue 21 Jun 2016 12:25 AM (UTC) |
Message
| I've converted the Materia Magicka mapper to mostly work for Wotmud. Is there any way currently to graphically represent doors between rooms? I think cmud does it by drawing a small rectangle halfway on the line connecting two rooms. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Tue 21 Jun 2016 02:23 AM (UTC) |
Message
| There is no support for that at present. You could conceivably modify the code that draws the line between rooms to add the extra line you speak of.
Of course, you would need to know (somehow) that the door is there in the first place. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Calamarain
(3 posts) Bio
|
Date
| Reply #2 on Sun 26 Jun 2016 01:30 AM (UTC) |
Message
| I've modified mapper.lua so that doors can be shown. However, I'd like to rename mapper.lua so that it won't potentially interfere with any mappers for other muds someone might be using. Renaming and requiring the new lua file gives the following errors:
The alias subroutine named "mapper.cancel_speedwalk" could not be found.
The alias subroutine named "mapper.zoom_out" could not be found.
The alias subroutine named "mapper.zoom_in" could not be found.
The alias subroutine named "mapper.hide" could not be found.
The alias subroutine named "mapper.show" could not be found.
Delete those aliases and this error message shows up.
Error number: 0
Event: Run-time error
Description: [string "Plugin"]:443: attempt to index global 'mapper' (a nil value)
stack traceback:
[string "Plugin"]:443: in function <[string "Plugin"]:429>
Called by: Function/Sub: OnPluginInstall called by Plugin Wotmud_Mapper
Reason: Executing plugin Wotmud_Mapper sub OnPluginInstall
function OnPluginInstall ()
config = {} -- in case not found
-- get saved configuration
assert (loadstring (GetVariable ("config") or "")) ()
-- allow for additions to config
for k, v in pairs (default_config) do
config [k] = config [k] or v
end -- for
-- initialize mapper
mapper.init { config = config,
get_room = get_room,
show_help = OnHelp, -- to show help
room_click = room_click, -- called on RH click on room square
timing = show_timing, -- want to see timing
show_completed = show_completed, -- want to see "Speedwalk completed." message
show_other_areas = show_other_areas, -- want to see areas other than the current one?
show_up_down = show_up_down, -- want to follow up/down exits?
show_area_exits = show_area_exits, -- want to see area exits?
speedwalk_prefix = speedwalk_prefix, -- how to speedwalk
}
mapper.mapprint (string.format ("MUSHclient mapper installed, version %0.1f", mapper.VERSION))
-- open databases on disk
db = assert (sqlite3.open(GetInfo (66) .. Trim (WorldAddress ()) .. "_" .. WorldPort () .. ".db"))
create_tables () -- create database structure if necessary
--prevent possible startup crash
EnableTrigger ("Name_Line", true)
EnableTrigger ("Prompt_Name_Line", true)
EnableTrigger ("Description_Or_Exits", false)
EnableTrigger ("Exit_Line", false)
end -- OnPluginInstall
| Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #3 on Sun 26 Jun 2016 02:04 AM (UTC) |
Message
| In your plugin there should have been a line like this:
mapper = require "your_mapper"
You shouldn't change the variable name (the LH side of the assign) because that is the "internal" name which would be used by various aliases. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
15,088 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top