Mudlet Help Desk

1468910

Comments

  • IshinIshin Retired Lurker Virginia
    Ilu bro
    Tell me and I forget, teach me and
    I remember, involve me and I
    learn.
    -Benjamin Franklin
  • So, i've come to the darkside and started using mudlet. I have a general tech question, which might have a specific mudlet answer. Is there a generalized way to ensure that my previous command has been processed by Aetolia before I send my next one? I was looking through gmcp and I don't see anything for general use, though it appears Combat Message might be able to be used if it is a combat command. I currently have a .5 second wait after receiving a prompt before I try to send the next command, but that does not appear to work every time.

    If it is something that'd be considered, the best thing for me would be if they had a GMCP attribute with the last command the game processed.
    image
  • SheirosiaSheirosia Sheffield, UK.
    Not really. I guess you could track the commands sent client-side in a table then use gmcp.Core.Ping with a timer check on it.

    GMCP docs.
  • For context, I just started using the Geyser UI template here: http://forums.mudlet.org/viewtopic.php?f=6&t=4098|Geyser to kickstart a UI.

    List of questions:

    1. Whether in a container or not, I can't get the mudlet mapper to show anything. Currently is in a container via:

    GUI.Map_Container = Geyser.Container:new({ name = "GUI.Map_Container", x = 0, y = 0, width = "100%", height = "100%", },GUI.Box1) GUI.Mapper = Geyser.Mapper:new({ name = "GUI.Mapper", x = 20, y = 20, width = GUI.Map_Container:get_width()-40, height = GUI.Map_Container:get_height()-40, },GUI.Map_Container) --the map's default background color is black, so lets blend it in... GUI.Box1CSS = CSSMan.new(GUI.BoxCSS:getCSS()) GUI.Box1CSS:set("background-color", "black") GUI.Box1:setStyleSheet(GUI.Box1CSS:getCSS())

    It has the UI elements like choosing how many rooms/exits and area etc. but isn't showing a map. I was under the impression it downloaded aetolia's map so I shouldn't have to do much?

    2. Is there a way to properly detect all local communication (emotes, says, murmur, etc) so I can route it to a miniconsole? Remote communications seem pretty easy, and so do murmur/says, but I don't see an easy way to get emotes.
    3. Any good uses for buttons? The template comes with them but I'm thinking about removing them as I can't think of a good use for them.
    image
  • Sorry, bumping this. I know it is still near top of tech talk, but not total discussions. Still haven't figured out the mapper :(
    image
  • HavenHaven World Burner Flight School
    @Mudlet: Why you gotta go and make things so complicated? >:[

    Ugh. So I'm converting my MUSHclient system into a Mudlet version and despite the fact they use the same scripting language (Lua), it's proving to be a long and complicated process. Is there an elegant way of making this alias?

    Alias:^disable (tree|focus|endgamecure|fitness|salve|shrugging|smoke|herb|sipper|rebounding|prerestore|clot|parry)$

    Script: if (disable.%1 == false) then disable.%1 = true ColourNote ("dimgray", "", "::[ ", "sandybrown", "", "Lilith", "dimgray", "", " ]::", "dimgray", "", " <<> ", "fuchsia", "", "Auto %1", "khaki", "", " is now ", "red", "", "OFF.", "dimgray", "", " <>>") elseif (disable.%1 == true) then disable.%1 = false ColourNote ("dimgray", "", "::[ ", "sandybrown", "", "Lilith", "dimgray", "", " ]::", "dimgray", "", " <<> ", "fuchsia", "", "Auto %1", "khaki", "", " is now ", "green", "", "ON.", "dimgray", "", " <>>") end

    That's the MUSHclient version. Here's what I have for Mudlet but it doesn't do anything or give any indication of an error:

    Pattern: ^disable (bbt|clot|tree|endgamecure|fitness|focus|herb|parry|prerestore|salve|shrugging|sipper|smoke|system|rebounding)$

    Script: if disable.Matches[2] then disable.Matches[2] = false cecho ("<firebrick>::[<a_yellow> Athena <firebrick>]:: <light_gray> " .. Matches[2] .. " has been <red>disabled<light_gray>.") else disable.Matches[2] = true cecho ("<firebrick>::[<a_yellow> Athena <firebrick>]:: <light_gray> " .. Matches[2] .. " has been <green>enabled<light_gray>.") end
    ¤ Si vis pacem, para bellum. ¤
    Someone powerful says, "We're going to have to delete you."
    havenbanner2
  • set matches to a temp local var, ref a table+var as table[var]. See how that goes.

    Arbre-Today at 7:27 PM

    You're a vindictive lil unicorn
    ---------------------------

    Lartus-Today at 7:16 PM

    oh wait, toz is famous

    Karhast-Today at 7:01 PM

    You're a singularity of fucking awfulness Toz
    ---------------------------
    Didi's voice resonates across the land, "Yay tox."
    ---------------------------

    Ictinus11/01/2021

    Block Toz
    ---------------------------

    limToday at 10:38 PM


    you disgust me
    ---------------------------
    (Web): Bryn says, "Toz is why we can't have nice things."

  • HavenHaven World Burner Flight School
    Okay, that worked thanks. Had to change it from disable.matches[2] to disable[matches[2]].
    ¤ Si vis pacem, para bellum. ¤
    Someone powerful says, "We're going to have to delete you."
    havenbanner2
  • HavenHaven World Burner Flight School
    edited August 2014
    Nevermind. Figured it out!
    ¤ Si vis pacem, para bellum. ¤
    Someone powerful says, "We're going to have to delete you."
    havenbanner2
  • HavenHaven World Burner Flight School
    Okay, I can't seem to get this to work and I'm not sure why. I made a Focusing script and everything about it works except for the part where I have the system check gmcp if I have the Focus skill in survival. When I call the information to see what the variable's set to, it comes up nil.

    So I guess my question is, for mudlet/gmcp, how do I properly check if I first have a skill in a script?
    ¤ Si vis pacem, para bellum. ¤
    Someone powerful says, "We're going to have to delete you."
    havenbanner2
  • Haven said:

    Okay, I can't seem to get this to work and I'm not sure why. I made a Focusing script and everything about it works except for the part where I have the system check gmcp if I have the Focus skill in survival. When I call the information to see what the variable's set to, it comes up nil.

    So I guess my question is, for mudlet/gmcp, how do I properly check if I first have a skill in a script?

    @Haven how are you checking if you have focusing or not? Like what script are you running/using?



    Mudlet Bashing System for sale. Message if interested
  • HavenHaven World Burner Flight School
    Here's the actual code for what I got @Nalor:

    -- Event Handler: gmcp.Char.Skills.Groups function parse_skillsets() skills = {} for _, set in ipairs(gmcp.Char.Skills.Groups) do local skillGet = string.format("Char.Skills.Get %s", yajl.to_string({ group = set.name })) sendGMCP(skillGet) end send("\n") end -- Event Handler: gmcp.Char.Skills.List function populate_skills() local group = gmcp.Char.Skills.List.group local list = gmcp.Char.Skills.List.list local newlist = {} for i, val in ipairs(list) do list[i] = val:gsub("* ", "") end if group then skills = skills or {} skills[group] = list end end -- Has Skill function function hasSkill(skill) if not skills then return false end if table.contains(skills, skill) then return true else return false end end -- Can focus function function canfocus () return ( stasis.focus and not aff["stun"] and not aff["impatience"] and not aff["death"] and not aff["asleep"] and not aff["unconscious"] and not mode["writhe"] and not mode["morphed"] and not mode["channeling"]) end -- Script to Fire from Prompt function AutoFocus () if not disable["system"] and not disable["focus"] then if (MP > 40) and not limiters.focus and hasSkill(focusing) then if not stasis.herb and canfocus () then Focus() elseif not stasis.salve and canfocus () then Focus() elseif stasis.herb and canfocus () or stasis.salve and canfocus () then Focus() end end end end


    When I remove the hasSkill(focusing) from the AutoFocus function, the script fires just fine. Unfortunately, it means that if I'm on an alt or something, my system will still try to focus afflictions away even if I don't have the skill. When I have hasSkill(focusing) in, the script stops firing completely.

    So I'm not sure where I'm going wrong here beyond that the problem is in the hasSkill function somewhere.
    ¤ Si vis pacem, para bellum. ¤
    Someone powerful says, "We're going to have to delete you."
    havenbanner2
  • SetneSetne The Grand Tyrant
    Any errors?

    Ingram said:
    "Oh my arms are suddenly lubed"
  • @haven ooo you did this wrong

    if (MP > 40) and not limiters.focus and hasSkill(focusing) then

    suppose to be

    if (MP > 40) and not limiters.focus and hasSkill("focusing") then

    or it might be "Focusing" <<
    Mudlet Bashing System for sale. Message if interested
    Haven
  • HavenHaven World Burner Flight School
    Nalor said:

    @haven ooo you did this wrong

    if (MP > 40) and not limiters.focus and hasSkill(focusing) then

    suppose to be

    if (MP > 40) and not limiters.focus and hasSkill("focusing") then

    or it might be "Focusing" << </p>

    Ugh... It's always the little things. Thank you. I've been stuck on this for days now.
    ¤ Si vis pacem, para bellum. ¤
    Someone powerful says, "We're going to have to delete you."
    havenbanner2
  • heh, you only use hasSkill(namehere) if namehere is already a variable :P @haven and welcomed
    Mudlet Bashing System for sale. Message if interested
  • IshinIshin Retired Lurker Virginia
    So I have this defined in my offense script:

    soffense.flaytype = soffense.flaytype or {}

    I have this in my flay-miss trigger:

    if soffense.flaytype == sileris then
    track:t_aff("no_fb")
    elseif soffense.flaytype == rebounding then
    t.defs.rebounding = false
    elseif soffense.flaytype == shielded then
    t.defs.shielded = false
    end

    if t.defs.rebounding then
    soffense.flaytype = rebounding

    and I have a tester:

    echo("test " .. soffense.flaytype)

    BUT I KEEP GETTING THIS FUCKING ERROR:


    [ERROR:] object: function:
    <[string "function syssinStab()..."]:10: attempt to concatenate field 'flaytype' (a nil
    value)>

    AND I CAN'T FIGURE OUT WHY AND IT'S REALLY PISSING ME THE FUCK OFF. PLEASE HELP.
    Tell me and I forget, teach me and
    I remember, involve me and I
    learn.
    -Benjamin Franklin
  • TragerTrager Raiding your underwear drawer.
    edited October 2014
    Try putting everything like such:

    elseif soffense.flaytype == "shielded" then

    Quotations around each designation.

    Edit: Looking again, it shows something wrong in the function syssinStab(), line 10. Paste it?
    Indoran'i is back baby. It's go-... Oh.


    Ishin
  • Yeah, use quotation marks. Also, you can use the track:t_remdef("shielded") instead of t.defs.shielded = false. 
    Ishin
  • AshmerAshmer Barefoot Adventurer Life
    edited October 2014
    ^ Above, make sure all of your if soffense.flaytype == "whatever" checks use " ".

    Brief note about variable comparisons - variables DO have a defined 'type' as meta data in Lua/Mudlet. That's how it knows you're fucking with it when you try to pass "string" to an ipairs() function.

    So, notice how your thing is soffense.flaytype = soffense.flaytype or {}? That's going to define soffense.flaytype as a {} table, not as a "" string, which is what you want. Really, you don't need that initial declaration at all. As long as the soffense table exists, you can just populate soffense.flaytype in your offense script.

    Also, see how your definition is

    if t.defs.rebounding then
    soffense.flaytype = rebounding

    ?

    It needs to be

    if t.defs.rebounding then
    soffense.flaytype = "rebounding"

    Otherwise, it's looking for the VARIABLE called 'rebounding,' which is nil, which is setting soffense.flaytype to nil.

    So! Try this in your offense script:
    
    if t.defs.shielded then
              table.insert(prompt.q, "flay " .. tmp.target .. " shield")
              soffense.flaytype = "shield"
              return
    end
    
    if t.defs.rebounding then
              table.insert(prompt.q, "flay " .. tmp.target .. " rebounding")
              soffense.flaytype = "rebounding"
              return
    end
    Edited: I hope that's still readable, with Vanillaforums' code coloring script.

    the way she tells me I'm hers and she is mine

    open hand or closed fist would be fine

    blood as rare and sweet as cherry wine

    Ishin
  • IshinIshin Retired Lurker Virginia
    @Trager, @Raeche, @Ashmer - Thanks bros. Made the changes, now to test.

    Well, seems to be working perfectly now! Thanks a lot guys!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    Tell me and I forget, teach me and
    I remember, involve me and I
    learn.
    -Benjamin Franklin
    TragerAshmerDrahkuna
  • IshinIshin Retired Lurker Virginia
    edited October 2014
    Does anyone know what's going on here?

    [ERROR:] object: function:
    <./mudlet-lua/lua/TableUtils.lua:101: bad argument #1 to 'pairs' (table expected, got nil)>

    The thing is, both of my pairs scripts in this instance actually have something. Here are the scripts as they are now and what they return:

    function selectAdderVenom(aff)
    ioffense.to_envenom = {}

    for i, v in ipairs(aff) do
    if not t.affs[v] then
    table.insert(ioffense.to_envenom, ioffense.to_venom[v])
    end
    if #ioffense.to_envenom == 1 then return ioffense.to_envenom end
    end
    end

    returns

    {
    "kalmia"
    }

    AND


    function selectTarot(aff)
    ioffense.tarotaff = {}

    for i, v in ipairs(aff) do
    if not t.affs[v] then
    table.insert(ioffense.tarotaff, ioffense.mode[1])
    end
    if #ioffense.tarotaff == 1 then return ioffense.tarotaff end
    end

    end

    returns

    {
    "clumsiness"
    }

    But like, when I try to turn my offense on, I get the error above. If I change the 1 after ioffense.mode[1] to a v, then I return this: {}

    Which I don't really understand at all, because the v works in the previous script? They're pretty much identical except for the variable names and such, so I'm pretty clueless and it's just as frustrating as not knowing what was going on with my Syssin stuff last night :(

    Please help.

    ...and now my Syssin offense isn't working and it's giving me the same error.
    Tell me and I forget, teach me and
    I remember, involve me and I
    learn.
    -Benjamin Franklin
  • IshinIshin Retired Lurker Virginia
    So I've been reading, and it seems that maybe one of my errors is in gmcp? I do have an 'if gmcp.Char.Vitals.class = "indorani" then in there. Would that generate a 'table expected got nil' or something?
    Tell me and I forget, teach me and
    I remember, involve me and I
    learn.
    -Benjamin Franklin
  • TragerTrager Raiding your underwear drawer.
    That might be your issue.

    if gmcp.Char.Vitals.class == "indorani" then (two ='s)

    Or use:

    if o.stats.class == "indorani then

    Give it a whirl.
    Indoran'i is back baby. It's go-... Oh.


  • IshinIshin Retired Lurker Virginia
    edited October 2014
    I did use == "indorani". I'm just lazy and I'm used to using = from cmud lol. Lemme try the o.stats.

    Edit - Nope, didn't fix it. It is shorter than typing all that GMCP stuff out though. >.>
    Tell me and I forget, teach me and
    I remember, involve me and I
    learn.
    -Benjamin Franklin
  • AshmerAshmer Barefoot Adventurer Life
    [ERROR:] object: function:
    <./mudlet-lua/lua/TableUtils.lua:101: bad argument #1 to 'pairs' (table expected, got nil)>

    This means that whatever you're passing to the 'pairs' function is 'nil,' and not a table. This goes back to the meta-data I was telling you about. If you feed anything other than a table to 'ipairs' or 'pairs,' it will throw an error - 'table expected, got nil/string/number/boolean.'

    Basically, it sounds like whatever priority you're passing to the venom/aff pick script is nil. I would check that script file in Mudlet for errors that would stop it populating, and make sure that there isn't a typo in the variable name. That's probably what's stopping your Syssin stuff from firing too.

    (Quick, someone troll Ishin for PK while his offense doesn't work)

    the way she tells me I'm hers and she is mine

    open hand or closed fist would be fine

    blood as rare and sweet as cherry wine

    TragerIshin
  • Is there a way to capture everything sent to the server (via send() and manual input) in Mudlet? Considering converting my system from TinyFugue and the ability to do so was rather heavily used to account for various things, but I don't see anything of the sort in Mudlet so far.
    Didi has expressed her esteem of you for the following reason: Smart organized leader.
    Experience Gained: 47720 (Special) [total: 2933660]
    Needed for LVL: 122.00775356245
  • TrigruTrigru the Bumberton's Delight
    edited October 2014
    The Mudlet event sysDataSendRequest receives every raw command sent to the game after parsing. If you know how to set up an event handler (how to do this is covered in a few areas in this subforum), you can capture that input fairly easily.
    image
    Seurimas
  • SetneSetne The Grand Tyrant
    The variable command also holds the last command sent to the game. I use(d) the sysDataSendRequest event to capture and log my commands sent to the game.

    Ingram said:
    "Oh my arms are suddenly lubed"
  • ElyniElyni New Zealand
    edited October 2014
    Ishin said:
    I did use == "indorani". I'm just lazy and I'm used to using = from cmud lol. Lemme try the o.stats. Edit - Nope, didn't fix it. It is shorter than typing all that GMCP stuff out though. >.>
    shouldnt it be == "Indorani" ? I'm pretty sure it's capitalised in the GMCP table. (this does matter)

    Also, it's captured in .Status, not .Vitals

Sign In or Register to comment.