Register forum user name Search FAQ

Gammon Forum

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 ➜ Lua ➜ Can't get Telnet_opts working

Can't get Telnet_opts working

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Blainer   (191 posts)  Bio
Date Sun 19 Jul 2009 07:00 PM (UTC)
Message
I can't seem to get Telnet_Options.lua working with this plugin, as far as I can tell
it is exactly the same as the Map plugin. The file is in the same dir as the plugin.

One other problem is that not all the tags I need to switch on and off are listed on the
Aardworlf site or in the 'help Telopts'. Heres the tags I need to toggle:
tags ROOMNAMES on
tags ROOMDESCS on
tags ROOMOBJS on
tags ROOMCHARS on
tags EXITS on

Anyone with any ideas on how I might do this with no user intervention? I don't really
want a stream of 5 commands at Enable and Disable.

This is the plugin:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Thursday, July 16, 2009, 9:58 PM -->
<!-- MuClient version 4.42 -->

<!-- Plugin "Scan_Window" generated by Plugin Wizard -->

<muclient>

<plugin
   name="Look_Scan"
   author="Blainer"
   id="73766b7b4dfab1cd1ce9494d"
   language="Lua"
   purpose="Put scan and Look in miniwindow"
   date_written="2009-07-16 21:58:17"
   requires="4.42"
   version="1.0"
   save_state="y"
   >
</plugin>

<triggers>

<!-- look triggers -->
<trigger
    enabled="y"
    group="look"
    name="name"
    lines_to_match="1"
    keep_evaluating="n"
    match="^\{rname\}(.+)$"
    multi_line="n"
    omit_from_output="y"
    regexp="y"
    send_to="12"
    sequence="101"
    script="LookTrigger"
>
</trigger>
<trigger
    enabled="y"
    group="look"
    name="desc"
    lines_to_match="1"
    keep_evaluating="n"
    match="^\{\/?rdesc\}$"
    multi_line="n"
    omit_from_output="y"
    regexp="y"
    send_to="12"
    sequence="101"
    script="LookTrigger"
>
</trigger>
<trigger
    enabled="y"
    group="look"
    name="exits"
    lines_to_match="1"
    keep_evaluating="n"
    match="^\{exits\}(\[Exits\: .+\])"
    multi_line="n"
    omit_from_output="y"
    regexp="y"
    send_to="12"
    sequence="101"
    script="LookTrigger"
>
</trigger>
<trigger
    enabled="y"
    group="look"
    name="objs"
    lines_to_match="1"
    keep_evaluating="n"
    match="^\{\/?roomobjs\}$"
    multi_line="n"
    omit_from_output="y"
    regexp="y"
    send_to="12"
    sequence="101"
    script="LookTrigger"
>
</trigger>
<trigger
    enabled="y"
    group="look"
    name="chars"
    lines_to_match="1"
    keep_evaluating="n"
    match="^\{\/?roomchars\}$"
    multi_line="n"
    omit_from_output="y"
    regexp="y"
    send_to="12"
    sequence="101"
    script="LookTrigger"
>
</trigger>
<trigger
    enabled="n"
    name="catch_line"
    lines_to_match="1"
    keep_evaluating="n"
    match="^(.*)$"
    multi_line="n"
    omit_from_output="y"
    regexp="y"
    send_to="12"
    sequence="999"
    script="LookTrigger"
>
</trigger>
<trigger
    enabled="n"
    name="catch_desc"
    lines_to_match="1"
    keep_evaluating="n"
    match="^(.*)$"
    multi_line="n"
    omit_from_output="y"
    regexp="y"
    send_to="12"
    sequence="999"
    script="LookTrigger"
>
</trigger>
<!-- end look triggers -->

<!-- scan triggers -->
<trigger
    enabled="y"
    group="scan"
    lines_to_match="1"
    keep_evaluating="n"
    match="^\d* ?(Up|Down|Right|North|South|East|West) .*here you see:$"
    multi_line="n"
    omit_from_output="y"
    regexp="y"
    send_to="12"
    sequence="101"
    script="ScanTrigger"
>
</trigger>
<trigger
    enabled="y"
    group="scan"
    lines_to_match="1"
    keep_evaluating="n"
    match="^You see a [A-Za-z0-9 ]+?(up|down|right|north|south|east|west)\.$"
    multi_line="n"
    match_text_colour="y"
    text_colour="10"
    omit_from_output="y"
    regexp="y"
    send_to="12"
    sequence="101"
    script="ScanTrigger"
>
</trigger>
<trigger
    enabled="y"
    group="scan"
    lines_to_match="1"
    keep_evaluating="n"
    match="^\s{5}\- (?!--+).+$"
    multi_line="n"
    omit_from_output="y"
    regexp="y"
    send_to="12"
    sequence="101"
    script="ScanTrigger"
>
</trigger>
<trigger
    enabled="n"
    name="endTrigger"
    lines_to_match="1"
    keep_evaluating="n"
    match=".+"
    multi_line="n"
    omit_from_output="n"
    regexp="y"
    send_to="12"
    sequence="999"
    script="EndScan"
>
</trigger>
<!-- end scan triggers -->
<trigger
    enabled="n"
    name="combat"
    lines_to_match="1"
    keep_evaluating="y"
    match="^You receive (\d+(?:\+\d+)*) experience points?\.$"
    multi_line="n"
    omit_from_output="n"
    regexp="y"
    send_to="0"
    sequence="999"
>
<send>scan</send>
</trigger>

</triggers>

<aliases>

<alias
    script="Execs"
    match="^sl (.+)$"
    regexp="y"
    enabled="y"
    send_to="12"
    ignore_case="y"
    sequence="100"
></alias>

</aliases>

<script>
<![CDATA[
require "checkplugin"
--Keys
MiniScan    = "ALT+s"   -- Minimize/Show scan window
MiniLook    = "ALT+l"   -- Minimize/Show look window
--end keys

--Settings
FontName                = GetInfo(20)                   -- Font for window, i.e. "Times New Roman", GetInfo(20) is current window font.
BackgroundColour        = GetInfo (271)                 -- Background colour for window. Supports Lua codes and MUSH colour names
                                                        -- i.e. "2432272" or "black" or GetInfo(271) can be used, last one is your current window colour.
TitleColour             = "lime"                        -- Colour of title text. Supports Lua codes and MUSH colour names
BannerColour            = "925008"                      -- Title Banner colour. Supports Lua codes and MUSH colour names.
ButtonColour            = "white"                       -- Button body colour.
ButtonBorderColour      = "black"                       -- Button border colour.
BorderColour            = "white"                       -- Window border colour.
LFontSize               = 8                             -- Window font size.
FontName                = GetInfo(20)                   -- Font for window, i.e. "Times New Roman", GetInfo(20) is current window font.
BorderWidth             = 1                             -- Line thickness borders.
ButtonGap               = 5                             -- Space between buttons.
LineSpace               = 3                             -- Space in points between lines of text.
OffSet                  = BorderWidth + 4               -- Objects offset from window edge.

ShowBorders             = true                          -- "true" = Draw borders, "false" = Don't draw borders
ShowWelcome             = true                          -- Show "plugin installed" msg when plugin enabled.
ScanAfterCombat         = true                          -- Will send scan to MUD after you recieve experience
CaptCharObjs            = true                          -- "true" = display objects and characters in look window
                                                        -- "false" = display objects and characters in output window (unchanged)
EchoDesc                = true                          -- "true" = show room descriptions in display
                                                        -- "false" = only display room descriptions in miniwindow
EchoName                = true                          -- "true" = show room names in display
                                                        -- "false" = only display room names in miniwindow
ShowRoomSep             = true                          -- "true" = will print "[-]" after look output is finished
                                                        -- "false = won't print anything
--End Settings

ScanT = {}
LookT = {}

--assigns commands to keyboad keys
function SetKeys ()

    AcceleratorTo (MiniScan, "sl scan", 10)
    AcceleratorTo (MiniLook, "sl look", 10)

end --SetKeys

--for execute commands from Accelerator keys
function Execs (name, line, wildcards)

    sWin = GetPluginID () .. wildcards[1]

    --if window is hidden then do nothing
    if WindowInfo (sWin, 3) == 0 then
        Refresh (sWin)
        return
    end

    --if window is minimized do Restore
    if GetVariable ("do" .. wildcards[1]) == "false" then
        Restore ("", sWin)
        return
    end

    --Minimize window
    Minimize ("", sWin)

end -- Execs

--triggered by Look output
function LookTrigger (name, line, wildcards, styles)

    -- put styles table into LookT
    local function addT ()
        -- fill table one index per line, replacing long flags
        t = {   ["(Translucent)"] = "(Trans.)",
                ["(White Aura)"] = "(W.Aura)"
            }

        for i,v in ipairs (styles) do
            v.text = v.text:gsub ("%([%a ]+%)",
                                    function (str)
                                        return t [str]
                                    end)
        end
        table.insert (LookT, styles)
    end -- addT

    --set options for window and call ShowWindow()
    local function LookFinish ()
        EnableTrigger ("catch_line", false)
        --set window height for Look
        Height = #LookT * (FontHeight + LineSpace) + THeight + (OffSet * 2)
        --get max line width for Look
        Width = 0
        for i,v in ipairs (LookT) do
            s = ""
            for j,w in ipairs (v) do
                s = w.text .. s
                Width = math.max (Width, WindowTextWidth (sLookWin, FontId, s) + (OffSet * 2))
            end
        end

        --
        if GetVariable ("dolook") == "true" then
            --show window WinName, Width, Height, TitleText, styles table
            ShowWindow (LookWinT, Width, Height, "You See", LookT)
        end

        --clear table for next time
        LookT = {}

        --look is finished send scan if not minimized
        if GetVariable ("doscan") == "true" then
            SendNoEcho ("scan")
        end
    end --LookFinish

    if line:match("%{rname%}") then
        sLookTitle = line:match ("{rname}(.+)")
        if EchoName then
            ColourNote("lime", GetInfo (271), sLookTitle)
        end
        --table.remove (styles, 1)
        return
    end

    if line:match("%{rdesc%}") then
        EnableTrigger ("catch_desc", true)
        return
    end

    if line:match("%{%/rdesc%}") then
        EnableTrigger ("catch_desc", false)
        return
    end

    if line:match("%{exits%}") then
        table.remove (styles, 1)
        addT ()
        if not CaptCharObjs then
            LookFinish ()
        end
        return
    end

    if line:match("%{roomobjs%}") then
        if CaptCharObjs then
            EnableTrigger ("catch_line", true)
        end
        return
    end

    if line:match("%{%/roomobjs%}") then
        EnableTrigger ("catch_line", false)
        return
    end

    if line:match("%{roomchars%}") then
        if CaptCharObjs then
            EnableTrigger ("catch_line", true)
        end
        return
    end

    --at end of Look output from MUD call ShowWindow
    if line:match ("%{%/roomchars%}") then
        EnableTrigger ("catch_line", false)
        if CaptCharObjs then
            LookFinish ()
        end
        if ShowRoomSep then
            ColourTell("brown", GetInfo (271), "[")
            ColourTell("gray", GetInfo (271), "-")
            ColourTell("brown", GetInfo (271), "]")
        end
        return
    end

    addT ()

end --LookTrigger

--triggered by scan output
function ScanTrigger (name, line, wildcards, styles)

    if line:match ("here you see:") or line:match ("     - ") or line:match ("You see ") then
        t = {   ["(Translucent)"] = "(Trans.)",
                ["(White Aura)"] = "(W.Aura)",
                ["(Animated)"] = "(Anim.)",
                ["Up"] = "UP",
                ["Down"] = "DOWN",
                ["Right"] = "RIGHT",
                ["North"] = "NORTH",
                ["South"] = "SOUTH",
                ["East"] = "EAST",
                ["West"] = "WEST"
            }

        for i,v in ipairs (styles) do
            v.text = v.text:gsub ("%([%a ]+%)",
                                    function (str)
                                        return t [str]
                                    end)
            v.text = v.text:gsub ("(%a+)",
                                    function (str)
                                        return t [str]
                                    end)
            v.text = v.text:gsub ("     ", " ")
        end
        table.insert (ScanT, styles)
        EnableTrigger ("endTrigger", true)
    end

end --ScanTrigger

--triggered after scan output
function EndScan (name,line,wildcards)

    EnableTrigger ("endTrigger", false)
    Height = #ScanT * (FontHeight + LineSpace) + THeight + (OffSet * 2)
    --get max line width for Look
    Width = 0
    for i,v in ipairs (ScanT) do
        s = ""
        for j,w in ipairs (v) do
            s = w.text .. s
            Width = math.max (Width, WindowTextWidth (sLookWin, FontId, s) + (OffSet * 3))
        end
    end
    ShowWindow (ScanWinT, Width, Height, "Scan", ScanT, true)
    ScanT = {}

end

--create a window with banner and buttons
function ShowWindow (WinT, Width, Height, sTitleText, stylesT, bMenu)

    --use last WinName window if not passed one
    if WinT then
        WinName = WinT.win
    end

    -- recreate the window the correct size and position
    WindowCreate (WinName,
                    WinT.window_left,
                    WinT.window_top,
                    Width,                  -- width
                    Height,                 -- height
                    WinT.window_mode,       -- whatever
                    WinT.window_flags,
                    BackgroundColour)

    --draw draw border
    if ShowBorders then
        WindowCircleOp (WinName, 2, 0, 0, Width, Height, BorderColour, 0, BorderWidth, ButtonColour, 1, 5, 5)
    else
        BorderWidth = 0
    end

    --title banner width
    Twidth  = Width - (BorderWidth * 2)

    -- draw drag bar rectangle
    WindowRectOp (WinName, 2, BorderWidth, BorderWidth, Twidth , THeight, BannerColour)

    --draw minimize button
    BoxSq   = LFontSize
    Left    = OffSet
    Top     = (THeight / 2) - (BoxSq / 2)
    Right   = Left + BoxSq
    Bottom  = Top + BoxSq
    WindowCircleOp (WinName, 2, Left, Top, Right, Bottom, ButtonBorderColour, 0, BorderWidth, ButtonColour, 0)
    WindowAddHotspot(WinName, WinName, Left, Top, Right, Bottom, "", "", "","", "Minimize", "Minimize " .. sTitleText, 1, 0)

    --draw refresh button
    CircleSize  = LFontSize
    Left        = Right + ButtonGap
    Right       = Left + CircleSize
    Bottom      = Top + CircleSize
    WindowCircleOp (WinName, 1, Left, Top, Right, Bottom, ButtonBorderColour, 0, BorderWidth, ButtonColour, 0)
    WindowAddHotspot (WinName, sTitleText, Left, Top, Right, Bottom, "", "", "", "", "Refresh", "Refresh " .. sTitleText, 1, 0)

    -- add the drag handler so they can move the window around
    Left    = Right + ButtonGap
    movewindow.add_drag_handler (WinName, Left, 0, 0, THeight)

    --draw title text
    if sLookTitle == nil then
        sLookTitle = "scan"
    end
    sTitleText = sLookTitle .. " - " .. WinName:gsub("^.", string.upper):sub(-4, -1)
    TextWidth   = WindowTextWidth (WinName, FontId, sTitleText)
    if TextWidth > Width - (Left + TextWidth) then
        sTitleText = sTitleText:sub(1, math.modf ((Width / 1.5) / WindowFontInfo (WinName, FontId, 6))) .. "..."
        TextWidth   = WindowTextWidth (WinName, FontId, sTitleText)
    end
    Left        = Right + ButtonGap
    Right       = Left + TextWidth
    Top         = LineSpace
    Bottom      = Top + FontHeight
    WindowText (WinName, FontId, sTitleText, Left, Top, Right, Bottom, TitleColour, false)

    --draw lines from stylesT
    Top     = FontHeight + LineSpace + OffSet
    Left    = 0
    iLin    = 0
    t = {   ["(Trans.) "] = "",
            ["(W.Aura) "] = "",
            ["(Linkdead) "] = "",
            ["(Charmed) "] = "",
            ["(Anim.) "] = ""
    }
    for i,v in ipairs (stylesT) do
        Left    = OffSet
        Bottom  = Top + FontHeight
        sLine   = ""
        iLin    = iLin + 1
        for j,w in ipairs (v) do
            Right   = Left + WindowTextWidth (WinName, FontId, w.text)
            Left    = Left + WindowText (WinName, FontId, w.text, Left, Top, Right, Bottom, w.textcolour, false)
            sLine   = sLine .. w.text:gsub ("[,.';:]", "")
        end
        if bMenu then
            for k in sLine:gmatch (" %- (.+)$") do
                s = k:gsub ("(%(.+%) )",
                            function (str)
                                return t [str]
                            end)
                if s:match(" ") then
                    s = s:match (" ([%a%d]+)$")
                end
                s = s .. ":" .. iLin .. ":" .. WinName
                WindowAddHotspot (WinName, s, OffSet, Top, Right, Bottom, "", "", "", "", "Menu", "Right Click for menu. CTRL Left Click to copy keyword to clipboard", 1, 0)
            end
        end
        Top = Bottom + LineSpace
    end

    --show the window
    WindowShow (WinName)

end --ShowWindow

--send look or scan to refresh window
function Refresh (sWin)
    if sWin:match("scan") then
        SetVariable ("doscan", "true")
        SendNoEcho ("scan")
    elseif sWin:match("look") then
        SetVariable ("dolook", "true")
        SendNoEcho ("look")
    end
end -- refresh

--set vaiable to allow ShowWindow to display window
function Restore (id, hotspotid)
    if hotspotid:match("scan") then
        SetVariable ("doscan", "true")
        SendNoEcho ("scan")
    elseif hotspotid:match("look") then
        SetVariable ("dolook", "true")
        SendNoEcho ("look")
    end
end -- Restore

--display small window as when minimize clicked
function Minimize (flags, hotspotid)

    --get window name
    WinName = hotspotid

    --set the window object table based on hotspotid
    if hotspotid:match("scan") then
            WinT = ScanWinT
            sTit = "Scan"
    elseif hotspotid:match("look") then
            WinT = LookWinT
            sTit = "Look"
    else
        Note("Minimize: no window object table.")
    end

    --window is minimized don't update
    SetVariable ("do" .. sTit, "false")

    --title banner width
    Twidth  = WindowTextWidth (WinName, FontId, sTit) + LFontSize + (OffSet * 2) + ButtonGap + (BorderWidth * 2)

    -- recreate the window the correct size and position
    WindowCreate (WinName,
                    WinT.window_left,
                    WinT.window_top,
                    Twidth,                 -- width
                    THeight,                    -- height
                    WinT.window_mode,       -- whatever
                    WinT.window_flags,
                    BackgroundColour)

    -- draw drag bar rectangle
    WindowRectOp (WinName, 2, BorderWidth, BorderWidth, Twidth , THeight, BannerColour)

    --draw draw border
    if ShowBorders then
        WindowCircleOp (WinName, 2, 0, 0, Twidth, THeight, BorderColour, 0, BorderWidth, ButtonColour, 1, 5, 5)
    else
        BorderWidth = 0
    end

    --draw restore button
    BoxSq   = LFontSize
    Left    = OffSet
    Top     = (THeight / 2) - (BoxSq / 2)
    Right   = Left + BoxSq
    Bottom  = Top + BoxSq
    WindowCircleOp (WinName, 2, Left, Top, Right, Bottom, ButtonBorderColour, 0, BorderWidth, ButtonColour, 0)
    WindowAddHotspot(WinName, WinName, Left, Top, Right, Bottom, "", "", "","", "Restore", "Restore " .. sTit, 1, 0)

    --draw title text
    TextWidth   = WindowTextWidth (WinName, FontId, sTit)
    if TextWidth > Width / 2 then
        sTitleText = sTitleText:sub(1, math.modf ((Width / 3) / WindowFontInfo (WinName, FontId, 6))) .. "..."
        TextWidth   = WindowTextWidth (WinName, FontId, sTitleText)
    end
    Left        = Right + ButtonGap
    Right       = Left + TextWidth
    Top         = LineSpace
    Bottom      = Top + FontHeight
    WindowText (WinName, FontId, sTit, Left, Top, Right, Bottom, TitleColour, false)

    -- add the drag handler so they can move the window around
    movewindow.add_drag_handler (WinName, Left, 0, Twidth, THeight)

    --show the window
    WindowShow (WinName)

end -- Minimize

--display menu when clicked
function Menu (flags, hotspotid)

    if bit.band (flags, 0x20) ~= 0 then
        --get the keyword from the hotspotid passed from the WindowAddHotspot
        s = hotspotid:match("^([%a%d]+):%d+:.+$")
        --get the window from hotspotid
        sWin = hotspotid:match("^[%a%d]+:%d+:(.+)$")
        --make the menu string
        sMen = "^Action Menu|" .. "|Examine ".. s .. "|Look ".. s .. "|kill ".. s .. "|Kick ".. s .. "|Bash ".. s
        --show the menu
        result = WindowMenu (sWin, WindowInfo (sWin, 14), WindowInfo (sWin, 15), sMen)
        --send the command from menu to the MUD
        if result ~= "" then
            Send (result)
        end

    elseif bit.band (flags, 0x02) ~= 0 then
        --copy the keyword to the the clipboard
        s = hotspotid:match("^(%a+):%d+:.+$")
        SetClipboard(s)
    end


end --Menu

--http://www.gammon.com.au/forum/bbshowpost.php?id=9594
function OnPluginInstall ()

    require "movewindow"

    sScanWin        = GetPluginID () .. "scan"
    sLookWin        = GetPluginID () .. "look"
    FontId          = "fn"

    -- install the window movement handler, get back the window position
    ScanWinT = movewindow.install (sScanWin, 7)  -- default to 7 (on right, center top/bottom)

    -- make window so I can grab the font info for Scan Window
    WindowCreate (sScanWin,
         ScanWinT.window_left,
         ScanWinT.window_top,
         0, 0,              -- width, height
         ScanWinT.window_mode,
         ScanWinT.window_flags,
         BackgroundColour)

    WindowFont (sScanWin, FontId, FontName, LFontSize, false, false, false, false, 0, 0)
    FontHeight = WindowFontInfo (sScanWin, FontId, 1)

    -- install the window movement handler, get back the window position
    LookWinT = movewindow.install (sLookWin, 7)  -- default to 7 (on right, center top/bottom)

    -- make window so I can grab the font info for Scan Window
    WindowCreate (sLookWin,
         LookWinT.window_left,
         LookWinT.window_top,
         0, 0,              -- width, height
         LookWinT.window_mode,
         LookWinT.window_flags,
         BackgroundColour)

    WindowFont (sLookWin, FontId, FontName, LFontSize, false, false, false, false, 0, 0)
    FontHeight  = WindowFontInfo (sLookWin, FontId, 1)

    --title border height
    THeight     = FontHeight + (LineSpace * 2.3) - BorderWidth

    --convert colour variables to Lua codes
    if tostring (BackgroundColour):match ("%a") then
        BackgroundColour = ColourNameToRGB (BackgroundColour)
    end
    if tostring (TitleColour):match ("%a") then
        TitleColour = ColourNameToRGB (TitleColour)
    end
    if tostring (BannerColour):match ("%a") then
        BannerColour = ColourNameToRGB (BannerColour)
    end
    if tostring (ButtonColour):match ("%a") then
        ButtonColour = ColourNameToRGB (ButtonColour)
    end
    if tostring (ButtonBorderColour):match ("%a") then
        ButtonBorderColour = ColourNameToRGB (ButtonBorderColour)
    end
    if tostring (BorderColour):match ("%a") then
        BorderColour = ColourNameToRGB (BorderColour)
    end

    --set trigger option to echo room desc
    if EchoDesc then
        SetTriggerOption ("catch_desc", "omit_from_output", "0")
    end

    --enable trigger to send scan after experience from combat
    if ScanAfterCombat then
        EnableTrigger ("combat", true)
    end

    --set script to do look and scan, these are used to stop scan or look
    SetVariable ("doscan", "true")
    SetVariable ("dolook", "true")

    --Set keys from global variables
    SetKeys ()

    OnPluginEnable ()  -- do initialization stuff

    if ShowWelcome then
        Note("Scan_Look.xml installed")
    end


end --OnPluginEnable


function OnPluginEnable ()

  -- if we are connected when the plugin loads, it must have been reloaded whilst playing
  if IsConnected () then
    OnPluginConnect ()
  end -- if already connected

end -- OnPluginEnable

--http://www.gammon.com.au/forum/bbshowpost.php?id=8775
-- pull in telnet option handling
dofile (GetPluginInfo (GetPluginID (), 20) .. "telnet_options.lua")

function OnPluginConnect ()
    TelnetOptionOn (TELOPT_ROOM_NAMES)
    TelnetOptionOn (TELOPT_EXIT_NAMES)
end -- function OnPluginConnect

--http://www.gammon.com.au/forum/bbshowpost.php?id=9594
function OnPluginSaveState ()
  -- save window current location for next time
  movewindow.save_state (sLookWin)
  movewindow.save_state (sScanWin)
end -- function OnPluginSaveState


function OnPluginClose()
    WindowShow (sLookWin, false)
    WindowShow (sScanWin, false)
    TelnetOptionOff (TELOPT_ROOM_NAMES)
    TelnetOptionOff (TELOPT_EXIT_NAMES)
end -- OnPluginClose

]]>
</script>
</muclient>
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 19 Jul 2009 10:06 PM (UTC)
Message
These options are listed in the file telnet_options.lua itself:


-- well-known options

TELOPT_STATMON = 1
TELOPT_BIGMAP = 2
TELOPT_HELPS = 3
TELOPT_MAP = 4
TELOPT_CHANNELS = 5
TELOPT_TELLS = 6
TELOPT_SPELLUP = 7
TELOPT_SKILLGAINS = 8
TELOPT_SAYS = 9
TELOPT_SCORE = 11
TELOPT_ROOM_NAMES = 12
TELOPT_EXIT_NAMES = 14
TELOPT_EDITOR_TAGS = 15
TELOPT_EQUIPMENT = 16
TELOPT_INVENTORY = 17
            
TELOPT_QUIET = 50
TELOPT_AUTOTICK = 51

TELOPT_REQUEST_STATUS = 100


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #2 on Sun 19 Jul 2009 10:12 PM (UTC)
Message
A couple more I dug out of old emails:


TELOPT_ROOM_DESC_TAGS = 18
TELOPT_ROOM_NAME_TAGS = 19

TELOPT_PROMPT = 52
TELOPT_PAGING = 53
TELOPT_AUTOMAP = 54
TELOPT_SHORTMAP = 55


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #3 on Mon 03 Aug 2009 12:33 AM (UTC)
Message
Option 101 (from server) - MUD has ticked.

- 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.


13,299 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.