So I'm trying to understand the mapper plugin you wrote, and I've been experimenting with some of the things you've done for the (magic materia?) mud, and have had limited success.
When I load the mapper, it shows teh cyan box that is much client mapper, v2.5, written by nick, dsl (which i assume is the world name)
When I try moving, no new rooms are written to the box itself, and as far as I can tell, nothing is happening.
Added some of the debug prints I saw floating around there...
And the OnPluginSent - Moving <direction> message prints fine, but there is no following prints based on where I'm moving, which makes me think that the mapping plugin is not recognizing when I changed rooms (Which... really isn't a surprise.)
What I'm trying to do, is figure out how to break down the following...
When you move, you will see something like this:
So from top to bottom, w is the direction (input, west)
Within the Maze is the room name
Then you have the description of the room
Then the exits
Then any mobs in the room
Terminated by your prompt
Any recommendations on how to actually catch the movement?
When I load the mapper, it shows teh cyan box that is much client mapper, v2.5, written by nick, dsl (which i assume is the world name)
When I try moving, no new rooms are written to the box itself, and as far as I can tell, nothing is happening.
Added some of the debug prints I saw floating around there...
-- -----------------------------------------------------------------
-- We have changed rooms - work out where the previous room led to
-- -----------------------------------------------------------------
function fix_up_exit ()
-- where we were before
local room = rooms [from_room]
-- leads to here
room.exits [last_direction_moved] = current_room
print ("Fixing exit for", from_room, "to go to", current_room)
-- clear for next time
last_direction_moved = nil
from_room = nil
end -- fix_up_exit
-- -----------------------------------------------------------------
-- try to detect when we send a movement command
-- -----------------------------------------------------------------
function OnPluginSent (sText)
if valid_direction [sText] then
last_direction_moved = valid_direction [sText]
print ("Moving", last_direction_moved)
if current_room and rooms [current_room] then
expected_exit = rooms [current_room].exits [last_direction_moved]
if expected_exit then
from_room = current_room
end -- if
-- print ("expected exit for this direction is to room", expected_exit)
end -- if
end -- if
end -- function
And the OnPluginSent - Moving <direction> message prints fine, but there is no following prints based on where I'm moving, which makes me think that the mapping plugin is not recognizing when I changed rooms (Which... really isn't a surprise.)
What I'm trying to do, is figure out how to break down the following...
When you move, you will see something like this:
w
Within the Maze
Tall lusterous green hedges rise high above you, blocking your vision
from seeing over top of them. Hanging from metal posts, a lantern glows
brightly, lighting the crushed rocks beneath your feet. The hedges
themselves are well kept and neatly trimmed, but it matters not which way
you look for it all appears to be the same.
[Exits: east south ]
A Zandreyan follower wanders here.
<362/362hp, 141/141m, 172/172mv, (Within the Maze)[ES]> 1:30pm.
So from top to bottom, w is the direction (input, west)
Within the Maze is the room name
Then you have the description of the room
Then the exits
Then any mobs in the room
Terminated by your prompt
Any recommendations on how to actually catch the movement?