Stygian Help(Mudlet)

by Unknown

Back to Mechanic's Corner.

Unknown2010-08-19 03:15:07
There are a few (read a lot) things I like about Stygian and several more I like about Mudlet(easy to code, easy to organize, no messiness). So I decided to put aside Treant, however nice a system it is, to build off a current system in a Mudclient that I know how to use more proficiently than MUSH. HOWEVER, I'm stuck on how to fix this little nasty in my map window:


CODE
----------- v1964 -----------
\\             |   |         /
       |  -
    \\   /     |   |     /
           |   - - -
        \\     |     /   \\
             
            \\ | /
- - - - --- - ---
            / | \\       \\
               \\
        /     |   | \\       \\
           |    \\
    /         |   |     \\   /
  /           |      
/             |         /
----------- 0:0:0 -----------
The Pool of Stars.

You see exits leading north, northeast, east, southeast, south, southwest, west, northwest, and up (open door).
  Sipper: E S H Eq
The sound of clashing swords strikes the air as Paladins spar deep within Aegis Keep.
  Sipper: E S H Eq


I'm trying to turn it into just this:

CODE
----------- v1964 -----------
\\             |   |         /
       |  -
    \\   /     |   |     /
           |   - - -
        \\     |     /   \\
             
            \\ | /
- - - - --- - ---
            / | \\       \\
               \\
        /     |   | \\       \\
           |    \\
    /         |   |     \\   /
  /           |      
/             |         /
----------- 0:0:0 -----------
The Pool of Stars.


These are the triggers that may or may not be relevent:

Lua file:
CODE
function mk_create_map()
    WindowWidth, WindowHeight = getMainWindowSize()
    createMiniConsole( "mk_map", 0, 0, 0, 0 )
    setBackgroundColor( "mk_map", 25, 25, 35, 25 )
    setMiniConsoleFontSize( "mk_map", gui_map_font )
    local x, y = calcFontSize( gui_map_font )
    resizeWindow( "mk_map", x*45, y*25 )
    global_map_height = y*25
    moveWindow( "mk_map", WindowWidth-x*45-15, 0 ) -- -15 to keep the scroll bar visisble
end

function mk_map_resize()
    local WindowWidth, WindowHeight = getMainWindowSize()
    setMiniConsoleFontSize( "mk_map", gui_map_font)
    local x, y = calcFontSize( gui_map_font )
    resizeWindow( "mk_map", x*45, y*25 )
    moveWindow( "mk_map", WindowWidth-x*45-15, 0 ) -- -150 to keep the scroll bar visisble
end

function mk_cut_n_paste()
    selectCurrentLine()
    copy()
    appendBuffer("mk_map")
    deleteLine()
end

Capture trigger
CODE
Trigger: ^.(perl regex)

Codebox:
if FLAG_MAP_START == false then
    setTriggerStayOpen( "Map Detector", 0 )
else
    m_got_map_lines = m_got_map_lines + 1;
    selectCurrentLine();
    setBgColor(20,20,35)
    selectString("+",1)
    setBgColor(170,255,127)
    setFgColor(255,0,0)
    selectCurrentLine();
    copy();
    appendBuffer("mk_map")
   selectCurrentLine();
   setBgColor(0,0,0)
   resetFormat()
   deselect()
    if Stygian.config.gagMap == 1 then
        deleteLine()
    end
end


"Map end"

CODE
Trigger: .(substring)

Codebox:
if m_got_map_lines >= 23 then
    FLAG_MAP_START = false
    if Stygian.config.gagMap == 1 then
        deleteLine()
    end
end


"Capture Map"

CODE
Trigger: ^.(perl regex)

Codebox:
if FLAG_MAP_START == false then
    setTriggerStayOpen( "Map Detector", 0 )
else
    m_got_map_lines = m_got_map_lines + 1;
    selectCurrentLine();
    setBgColor(20,20,35)
    selectString("+",1)
    setBgColor(170,255,127)
    setFgColor(255,0,0)
    selectCurrentLine();
    copy();
    appendBuffer("mk_map")
   selectCurrentLine();
   setBgColor(0,0,0)
   resetFormat()
   deselect()
    if Stygian.config.gagMap == 1 then
        deleteLine()
    end
end


Halp?
Lilia2010-08-19 09:16:44
config mapwidth 5 should fix it
Unknown2010-08-19 15:36:18
Yeah, it assume a mapwidth of 5. I've often pondered one that can be adjusted for different mapwidths, and I may in fact do that at some point..


I've been doing more work on stygian lately. It's in a better place in my profile than it is in any of the places you can find it currently. I'll work on removing the stuff specific to me and making a newer version available. I can't promise when it'll be available, nor when it'll be totally working... but in the end I couldn't actually give it up.

Still no stancing/parrying/deepwound curing either. Have a few ideas on that, but I need more actual combat experience before I could implement anything worthwhile, I think.