The Mudlet Thread.

Started by Zoan, September 02, 2013, 11:36:34 PM

Ask me anything about Mudlet. The more basic the question, the better ('How do I make it so I can automatically switch between different weapons with a single macro?' is a good example of a 'simple' thing). I'll not only help design you it, but I'll explain why I did it that particular way, and how I did it so you'll be able to do it yourself in more advanced extrapolations in future.

I'm doing this to raise awareness of scripting in our community, which is always a good thing, as well as encourage me to do more basic coding (I'm in a slump, and I find myself coding more to help others than to work on my own projects). So I'd not only imagine you'd appreciate the help, I'd appreciate the work.

Bear in mind I work full-time, so I'll likely gather a compilation of questions daily and answer them all off-peak, so check in occasionally to see if I answered you. If I haven't yet after a few days, send me a PM with a link to your question and I'll prioritize it.
Quote from: Agameth
Goat porn is not prohibited in the Highlord's city.

Oooh I've got one that I've been trying to figure out... Well two now that I think of it:

1) How do I get the beep when something dies? I thought I set it up right and still no go.

2) Help me to design an Infobar that has at least the following components: name, status (standing, sitting, sleeping, etc), travel speed (walking, running, sneaking), Riding or not, hit points (max and current), stamina (max and current), stun (max and current), time of day.

Thank You!!!!!
I am unable to respond to PMs sent on the GDB. If you want to send me something, please send it to my email.

Is there any way that you know of to modify logging options?
Child, child, if you come to this doomed house, what is to save you?

A voice whispers, "Read the tales upon the walls."

Quote from: slvrmoontiger on September 03, 2013, 01:25:52 AM
Oooh I've got one that I've been trying to figure out... Well two now that I think of it:

1) How do I get the beep when something dies? I thought I set it up right and still no go.

2) Help me to design an Infobar that has at least the following components: name, status (standing, sitting, sleeping, etc), travel speed (walking, running, sneaking), Riding or not, hit points (max and current), stamina (max and current), stun (max and current), time of day.

Thank You!!!!!

You'll need to use the Geyser layout organizer for that - it's pretty complicated and difficult to make something without having the same native resolution as you (there's ways but too complicated to explain simply). The geyser API is here: http://wiki.mudlet.org/w/Manual:Geyser

Quote from: LauraMars on September 03, 2013, 02:07:16 AM
Is there any way that you know of to modify logging options?

At the moment there's no way to modify logging options save the choice to make it a HTML or text format. There's been some scripts designed to log differently but it's not a local function in-built into the client itself. Afraid you'll have to wait on that, but if you have a specific idea in mind there may be a script that exists to do it.
Quote from: Agameth
Goat porn is not prohibited in the Highlord's city.

Bear in mind, I'm happy to design these things for you if you want. I need to know specifics though. And they may take time (especially the infobar thing, Geyser's complicated).
Quote from: Agameth
Goat porn is not prohibited in the Highlord's city.

What about the sound when something dies or is killed? How do I make that work? It might be as simple as only a certain type of sound file being compatible I've run into that in the past. I'm on linux so the sound files are all .ogg files, there are some .wav files I haven't tried that yet.
I am unable to respond to PMs sent on the GDB. If you want to send me something, please send it to my email.

Quote from: slvrmoontiger on September 03, 2013, 04:48:39 AM
What about the sound when something dies or is killed? How do I make that work? It might be as simple as only a certain type of sound file being compatible I've run into that in the past. I'm on linux so the sound files are all .ogg files, there are some .wav files I haven't tried that yet.

You don't have the Third Party software for those codecs?
Fredd-
i love being a nobles health points

Theoretically, the #beep command sent through the telnet prompt should do it, but it doesn't. I noticed it as well and ddin't care enough to try and fix it.

I suppose a way to do it would do this (change directory as appropriate) on the beep-related messages (like a dying person, or someone beeping you):
playSoundFile([[./sounds/beep.mp3]])

The 'beep' noise can be downloaded here: http://soundbible.com/tags-alert.html

So, you'd make a trigger like thus (as perl regex):

^(.+) beeps you.$

And the reaction:

playSoundFile([[./sounds/beep.mp3]])

As for the dying person bit, I know that when someone dies in my Mudlet, a weird little dot thing shows instead of the beep. Maybe that can be triggered (I'm not sure, I'd need to see). Remember you don't need to make multiple triggers, just several lines for the one reaction.
Quote from: Agameth
Goat porn is not prohibited in the Highlord's city.

My only problem with mudlet is I can't seem to change the color of the bolded/highlighted text the mud sends to the client

With mushclient, i can change the bolded (or highlighted whatever the case might be)  combat text that we recieve from the mud to red making it much more clearer.

I'm not sure if its broken or not implemented but if i could just be able to change the bolded color to something else i would use mudlet since i do like its command box and spellchecker.

Not my work, but I got it from someone else I've kept in my system from a different game. Perhaps you can use it. cecho() is also an option:

color_table = {
        snow                  = {255, 250, 250},
        ghost_white           = {248, 248, 255},
        GhostWhite            = {248, 248, 255},
        white_smoke           = {245, 245, 245},
        WhiteSmoke            = {245, 245, 245},
        gainsboro             = {220, 220, 220},
        floral_white          = {255, 250, 240},
        FloralWhite           = {255, 250, 240},
        old_lace              = {253, 245, 230},
        OldLace               = {253, 245, 230},
        linen                 = {250, 240, 230},
        antique_white         = {250, 235, 215},
        AntiqueWhite          = {250, 235, 215},
        papaya_whip           = {255, 239, 213},
        PapayaWhip            = {255, 239, 213},
        blanched_almond       = {255, 235, 205},
        BlanchedAlmond        = {255, 235, 205},
        bisque                = {255, 228, 196},
        peach_puff            = {255, 218, 185},
        PeachPuff             = {255, 218, 185},
        navajo_white          = {255, 222, 173},
        NavajoWhite           = {255, 222, 173},
        moccasin              = {255, 228, 181},
        cornsilk              = {255, 248, 220},
        ivory                 = {255, 255, 240},
        lemon_chiffon         = {255, 250, 205},
        LemonChiffon          = {255, 250, 205},
        seashell              = {255, 245, 238},
        honeydew              = {240, 255, 240},
        mint_cream            = {245, 255, 250},
        MintCream             = {245, 255, 250},
        azure                 = {240, 255, 255},
        alice_blue            = {240, 248, 255},
        AliceBlue             = {240, 248, 255},
        lavender              = {230, 230, 250},
        lavender_blush        = {255, 240, 245},
        LavenderBlush         = {255, 240, 245},
        misty_rose            = {255, 228, 225},
        MistyRose             = {255, 228, 225},
        white                 = {255, 255, 255},
        black                 = {0, 0, 0},
        dark_slate_gray       = {47, 79, 79},
        DarkSlateGray         = {47, 79, 79},
        dark_slate_grey       = {47, 79, 79},
        DarkSlateGrey         = {47, 79, 79},
        dim_gray              = {105, 105, 105},
        DimGray               = {105, 105, 105},
        dim_grey              = {105, 105, 105},
        DimGrey               = {105, 105, 105},
        slate_gray            = {112, 128, 144},
        SlateGray             = {112, 128, 144},
        slate_grey            = {112, 128, 144},
        SlateGrey             = {112, 128, 144},
        light_slate_gray      = {119, 136, 153},
        LightSlateGray        = {119, 136, 153},
        light_slate_grey      = {119, 136, 153},
        LightSlateGrey        = {119, 136, 153},
        gray                  = {190, 190, 190},
        grey                  = {190, 190, 190},
        light_grey            = {211, 211, 211},
        LightGrey             = {211, 211, 211},
        light_gray            = {211, 211, 211},
        LightGray             = {211, 211, 211},
        midnight_blue         = {25, 25, 112},
        MidnightBlue          = {25, 25, 112},
        navy                  = {0, 0, 128},
        navy_blue             = {0, 0, 128},
        NavyBlue              = {0, 0, 128},
        cornflower_blue       = {100, 149, 237},
        CornflowerBlue        = {100, 149, 237},
        dark_slate_blue       = {72, 61, 139},
        DarkSlateBlue         = {72, 61, 139},
        slate_blue            = {106, 90, 205},
        SlateBlue             = {106, 90, 205},
        medium_slate_blue     = {123, 104, 238},
        MediumSlateBlue       = {123, 104, 238},
        light_slate_blue      = {132, 112, 255},
        LightSlateBlue        = {132, 112, 255},
        medium_blue           = {0, 0, 205},
        MediumBlue            = {0, 0, 205},
        royal_blue            = {65, 105, 225},
        RoyalBlue             = {65, 105, 225},
        blue                  = {0, 0, 255},
        dodger_blue           = {30, 144, 255},
        DodgerBlue            = {30, 144, 255},
        deep_sky_blue         = {0, 191, 255},
        DeepSkyBlue           = {0, 191, 255},
        sky_blue              = {135, 206, 235},
        SkyBlue               = {135, 206, 235},
        light_sky_blue        = {135, 206, 250},
        LightSkyBlue          = {135, 206, 250},
        steel_blue            = {70, 130, 180},
        SteelBlue             = {70, 130, 180},
        light_steel_blue      = {176, 196, 222},
        LightSteelBlue        = {176, 196, 222},
        light_blue            = {173, 216, 230},
        LightBlue             = {173, 216, 230},
        powder_blue           = {176, 224, 230},
        PowderBlue            = {176, 224, 230},
        pale_turquoise        = {175, 238, 238},
        PaleTurquoise         = {175, 238, 238},
        dark_turquoise        = {0, 206, 209},
        DarkTurquoise         = {0, 206, 209},
        medium_turquoise      = {72, 209, 204},
        MediumTurquoise       = {72, 209, 204},
        turquoise             = {64, 224, 208},
        cyan                  = {0, 255, 255},
        light_cyan            = {224, 255, 255},
        LightCyan             = {224, 255, 255},
        cadet_blue            = {95, 158, 160},
        CadetBlue             = {95, 158, 160},
        medium_aquamarine     = {102, 205, 170},
        MediumAquamarine      = {102, 205, 170},
        aquamarine            = {127, 255, 212},
        dark_green            = {0, 100, 0},
        DarkGreen             = {0, 100, 0},
        dark_olive_green      = {85, 107, 47},
        DarkOliveGreen        = {85, 107, 47},
        dark_sea_green        = {143, 188, 143},
        DarkSeaGreen          = {143, 188, 143},
        sea_green             = {46, 139, 87},
        SeaGreen              = {46, 139, 87},
        medium_sea_green      = {60, 179, 113},
        MediumSeaGreen        = {60, 179, 113},
        light_sea_green       = {32, 178, 170},
        LightSeaGreen         = {32, 178, 170},
        pale_green            = {152, 251, 152},
        PaleGreen             = {152, 251, 152},
        spring_green          = {0, 255, 127},
        SpringGreen           = {0, 255, 127},
        lawn_green            = {124, 252, 0},
        LawnGreen             = {124, 252, 0},
        green                 = {0, 255, 0},
        chartreuse            = {127, 255, 0},
        medium_spring_green   = {0, 250, 154},
        MediumSpringGreen     = {0, 250, 154},
        green_yellow          = {173, 255, 47},
        GreenYellow           = {173, 255, 47},
        lime_green            = {50, 205, 50},
        LimeGreen             = {50, 205, 50},
        yellow_green          = {154, 205, 50},
        YellowGreen           = {154, 205, 50},
        forest_green          = {34, 139, 34},
        ForestGreen           = {34, 139, 34},
        olive_drab            = {107, 142, 35},
        OliveDrab             = {107, 142, 35},
        dark_khaki            = {189, 183, 107},
        DarkKhaki             = {189, 183, 107},
        khaki                 = {240, 230, 140},
        pale_goldenrod        = {238, 232, 170},
        PaleGoldenrod         = {238, 232, 170},
        light_goldenrod_yellow= {250, 250, 210},
        LightGoldenrodYellow  = {250, 250, 210},
        light_yellow          = {255, 255, 224},
        LightYellow           = {255, 255, 224},
        yellow                = {255, 255, 0},
        gold                  = {255, 215, 0},
        light_goldenrod       = {238, 221, 130},
        LightGoldenrod        = {238, 221, 130},
        goldenrod             = {218, 165, 32},
        dark_goldenrod        = {184, 134, 11},
        DarkGoldenrod         = {184, 134, 11},
        rosy_brown            = {188, 143, 143},
        RosyBrown             = {188, 143, 143},
        indian_red            = {205, 92, 92},
        IndianRed             = {205, 92, 92},
        saddle_brown          = {139, 69, 19},
        SaddleBrown           = {139, 69, 19},
        sienna                = {160, 82, 45},
        peru                  = {205, 133, 63},
        burlywood             = {222, 184, 135},
        beige                 = {245, 245, 220},
        wheat                 = {245, 222, 179},
        sandy_brown           = {244, 164, 96},
        SandyBrown            = {244, 164, 96},
        tan                   = {210, 180, 140},
        chocolate             = {210, 105, 30},
        firebrick             = {178, 34, 34},
        brown                 = {165, 42, 42},
        dark_salmon           = {233, 150, 122},
        DarkSalmon            = {233, 150, 122},
        salmon                = {250, 128, 114},
        light_salmon          = {255, 160, 122},
        LightSalmon           = {255, 160, 122},
        orange                = {255, 165, 0},
        dark_orange           = {255, 140, 0},
        DarkOrange            = {255, 140, 0},
        coral                 = {255, 127, 80},
        light_coral           = {240, 128, 128},
        LightCoral            = {240, 128, 128},
        tomato                = {255, 99, 71},
        orange_red            = {255, 69, 0},
        OrangeRed             = {255, 69, 0},
        red                   = {255, 0, 0},
        hot_pink              = {255, 105, 180},
        HotPink               = {255, 105, 180},
        deep_pink             = {255, 20, 147},
        DeepPink              = {255, 20, 147},
        pink                  = {255, 192, 203},
        light_pink            = {255, 182, 193},
        LightPink             = {255, 182, 193},
        pale_violet_red       = {219, 112, 147},
        PaleVioletRed         = {219, 112, 147},
        maroon                = {176, 48, 96},
        medium_violet_red     = {199, 21, 133},
        MediumVioletRed       = {199, 21, 133},
        violet_red            = {208, 32, 144},
        VioletRed             = {208, 32, 144},
        magenta               = {255, 0, 255},
        violet                = {238, 130, 238},
        plum                  = {221, 160, 221},
        orchid                = {218, 112, 214},
        medium_orchid         = {186, 85, 211},
        MediumOrchid          = {186, 85, 211},
        dark_orchid           = {153, 50, 204},
        DarkOrchid            = {153, 50, 204},
        dark_violet           = {148, 0, 211},
        DarkViolet            = {148, 0, 211},
        blue_violet           = {138, 43, 226},
        BlueViolet            = {138, 43, 226},
        purple                = {160, 32, 240},
        medium_purple         = {147, 112, 219},
        MediumPurple          = {147, 112, 219},
        thistle               = {216, 191, 216},

-- CHECK IT OUT! Aetolia colors!
        a_darkred             = {128, 0, 0},
        a_darkgreen           = {0, 179, 0},
        a_brown               = {128, 128, 0},
        a_darkblue            = {0, 0, 128},
        a_darkmagenta         = {128, 0, 128},
        a_darkcyan            = {0, 128, 128},
        a_grey                = {192, 192, 192},
        a_darkgrey            = {128, 128, 128},
        a_red                 = {255, 0, 0},
        a_green               = {0, 255, 0},
        a_yellow              = {255, 255, 0},
        a_blue                = {0, 85, 255},
        a_magenta             = {255, 0, 255},
        a_cyan                = {0, 255, 255},
        a_white               = {255, 255, 255},

  chat_bg   = {25, 25, 25},
}

function fgcolor(color)
setFgColor(color_table[color][1], color_table[color][2], color_table[color][3])
end

function bgcolor(color)
setBgColor(color_table[color][1], color_table[color][2], color_table[color][3])
end

function cfgcolor(console, color)
setFgColor(console, color_table[color][1], color_table[color][2], color_table[color][3])
end

function cbgcolor(console, color)
setBgColor(console, color_table[color][1], color_table[color][2], color_table[color][3])
end
Quote from: Agameth
Goat porn is not prohibited in the Highlord's city.

How can I get mudlet to login automatically on Arm?
Varak:You tell the mangy, pointy-eared gortok, in sirihish: "What, girl? You say the sorceror-king has fallen down the well?"
Ghardoan:A pitiful voice rises from the well below, "I've fallen and I can't get up..."

Quote from: Barzalene on September 03, 2013, 07:58:47 AM
How can I get mudlet to login automatically on Arm?

Do you mean when you start mudlet that it automatically opens your arm profile and logs in or when you select your profile it automatically logs you in?

I created a profile and entered my account info, but it doesn't log me in. The doesn't seem to be any way to account for the c.
Varak:You tell the mangy, pointy-eared gortok, in sirihish: "What, girl? You say the sorceror-king has fallen down the well?"
Ghardoan:A pitiful voice rises from the well below, "I've fallen and I can't get up..."

Yeah, arm will need a custom scrips as far as I know.

September 03, 2013, 09:14:56 PM #14 Last Edit: September 03, 2013, 10:11:35 PM by KankWhisperer
Could use a trigger maybe?

Step 1: Make a trigger.
Step 2: I triggered off this Perlregex (line 0 and 1)

^\(N\) Create a new account
^Reconnected.$


Then this goes in the script window.


account_name = "amos"
account_password = "mudsexy"

if matches[1] ~= "Reconnected." then
tempTimer( 0.5, [[send("c")]] )
tempTimer( 1.0, [[send(account_name)]] )
tempTimer( 1.5, [[send(account_password)]] )
timer_a = tempTimer( 3.0, [[send("\n")]] )
timer_b = tempTimer( 3.5, [[send("e")]] )
timer_c = tempTimer( 4.0, [[send("\n")]] )
else
killTimer(timer_a)
killTimer(timer_b)
killTimer(timer_c)
end



Only problem I see is that if someone knew you were using the trigger they could type in em (N) Create a new account , @ is here and get your char to move east maybe. Also apparently goes bonkers if you don't put in the right account name according to friend I made it for.


If I don't care about mapping (because that's cheating) is Mudlet better than tintin++?

A lot easier to code in since it uses a real language Lua. In my opinion.

Quote from: Barzalene on September 03, 2013, 08:51:37 AM
I created a profile and entered my account info, but it doesn't log me in. The doesn't seem to be any way to account for the c.

A quick solution: where you put the connection entry you put in c for character name and then your username for the password. From there, you can make a trigger by going into the triggers, making a new one and  putting "Password:" on line 0 and then your password where it says "send plain text" on the top right.

Quote from: Cabooze on September 09, 2013, 09:26:15 PM
Quote from: Barzalene on September 03, 2013, 08:51:37 AM
I created a profile and entered my account info, but it doesn't log me in. The doesn't seem to be any way to account for the c.

A quick solution: where you put the connection entry you put in c for character name and then your username for the password. From there, you can make a trigger by going into the triggers, making a new one and  putting "Password:" on line 0 and then your password where it says "send plain text" on the top right.

Might be an easy and quick way for doing it. But, please note that security is at a risk since your password is available to anyone that uses the computer.
I am unable to respond to PMs sent on the GDB. If you want to send me something, please send it to my email.

September 11, 2013, 10:56:57 AM #19 Last Edit: September 11, 2013, 04:36:30 PM by Blur
Yeah.

Its a real shame you can't change the bolded colors you receive from the mud automatically like you can with Mushclient. Otherwise this client would be perfect.  Even changing light colors under setting does not seem to work.

Unfortunately, using this client would make me go blind if I played any sort of combat oriented character. :(

I once did a lazyhack for a login and wound up somehow changing my email. I couldn't play for 2 weeks until Nyr finally offered clemency for my stupidity and reset my email.

Lazyhacks are bad, mmkay.
Quote from: Agameth
Goat porn is not prohibited in the Highlord's city.

An infobar like Agent_137 did for Mushclient would be awesome, possibly with gauges/bars. Ultimately a neat graphical infobar in a Zalanthan style and packaged with GMCP would be the shit.

Quote from: charas on October 02, 2013, 06:55:17 AM
An infobar like Agent_137 did for Mushclient would be awesome, possibly with gauges/bars. Ultimately a neat graphical infobar in a Zalanthan style and packaged with GMCP would be the shit.

Been waiting a long time for this.
I think the GMCP stuff was pulled a while back due to problems it was causing with some clients and information not getting to the server and causing commands not to be recognized. I could be wrong. I do remember I disabled GMCP option in Mudlet for that reason a few months ago.
I am unable to respond to PMs sent on the GDB. If you want to send me something, please send it to my email.

Quote from: charas on October 02, 2013, 06:55:17 AM
An infobar like Agent_137 did for Mushclient would be awesome, possibly with gauges/bars. Ultimately a neat graphical infobar in a Zalanthan style and packaged with GMCP would be the shit.

you can actually do this in MUSHclient too, it's called a miniwindow. one day i'll get around to converting the infobar to it.

http://www.mushclient.com/mushclient/mw_creation.htm


Is it possible to get the mapper working? I've been stuck on that.