Mudlet Questions

1456810

Comments

  • ShaddusShaddus , the Leper Messiah Outside your window.
    edited September 2015
    I'm not sure how to do most of that, but it seems reasonable. I'm guessing I can add a line to the following to check for dreamweaving:

    if (gmcp.Char and

    (not gmcp.Char.Vitals.balance or gmcp.Char.Vitals.balance == "1") and

    (not gmcp.Char.Vitals.equilibrium or gmcp.Char.Vitals.equilibrium == "1") and

    (not gmcp.Char.Vitals.right_arm or gmcp.Char.Vitals.right_arm == "1") and

    (not gmcp.Char.Vitals.left_arm or gmcp.Char.Vitals.left_arm == "1") and

    (not gmcp.Char.Vitals.right_leg or gmcp.Char.Vitals.right_leg == "1") and

    (not gmcp.Char.Vitals.left_leg or gmcp.Char.Vitals.left_leg == "1") and

    (not gmcp.Char.Vitals.psisuper or gmcp.Char.Vitals.psisuper ~= "0") and

    (not gmcp.Char.Vitals.psisub or gmcp.Char.Vitals.psisub ~= "0") and

    (not gmcp.Char.Vitals.psiid or gmcp.Char.Vitals.psiid ~= "0") and

    (not gmcp.Char.Balance or gmcp.Char.Balance.List.balance == "1") and

    (not gmcp.Char.Balance or gmcp.Char.Balance.List.equilibrium == "1") and

    (not gmcp.Char.Balance or gmcp.Char.Balance.List.rarm == "1") and

    (not gmcp.Char.Balance or gmcp.Char.Balance.List.larm == "1") and

    (not gmcp.Char.Balance or gmcp.Char.Balance.List.legs == "1") and

    (not gmcp.Char.Vitals.prone or (gmcp.Char.Vitals.prone == "0" or gmcp.Char.Vitals.prone == 0))

    ) then

    if fromtimer then

    mmp.move()

    else return true end

    else

    tempTimer(0.2, [[mmp.canmove(true)]])

    return false

    end

    end




    Everiine said: The reason population is low isn't because there are too many orgs. It's because so many facets of the game are outright broken and protected by those who benefit from it being that way. An overabundance of gimmicks (including game-breaking ones), artifacts that destroy any concept of balance, blatant pay-to-win features, and an obsession with convenience that makes few things actually worthwhile all contribute to the game's sad decline.
  • I forget the table m&m uses, to be honest...

    I think it's something like 
     if mm.defs.got_dreambody then
       <whatever>


  • Daraius said:
    So I want all my lovely family members' names highlighted in Shevat beryl. Right now I just have a highlight trigger with each name entered manually, but I suspect there's a much more efficient and effective way to go about it. Any tips?
    I'm not 100% sure on the specifics here, but if you use m&mf and NameDB, then you can set a new order, Shevat, and then add people to it. Starting off you can do: 'ndb set Daraius order Shevat' and a new order will be added (Shevat's order) with Daraius as a member. Then you can manually add family members the same way. There's probably also a way to build a trigger on FWHO or FAMILY TREE SHEVAT to mass add people, but... I'm not good enough to do that.

    From there, MMCONFIG POLITICS will let you muck about with the highlights just like normal. Or you can MMCONFIG SHEVATCOLOR (whatever) to set it.

    The obvious disadvantage to this method is that you can't track what Orders the Shevats are in at the same time. There's probably a way to add a whole new 'family' category to nameDB, but again... not my strong suit.

    -=-=-

    And now, for my lack of knowledge!

    I'm working with demonnic's anitimer, which is giving me a formatting problem. This is more about labels than the specific anitimer code though. The gauge that gets spit out is clunky in comparison to the sleek, lean look of the other gauges and windows I've stolen, and I want to pretty it up, but the only reference to the gauge style I can find is:

    demonnic.anitimer.timers[name].gauge:setStyleSheet(unpack(args))

    I'm mostly fine with that, but I'm not sure how to modify that style sheet, either before or after that gets called.

    These are the attribute the other gauges have, that I want to add:
    border-style: solid;

    border-color: white;

    border-width: 1px;

    border-radius: 5px;

    margin: 5px;


    I'm not sure what the unpack() part of the function is doing exactly, since I can't find reference to it in any of demonnic's other code. Is it a mudlet thing? Is it magic? I would certainly like to prettify this.

    Also, is there a reference list somewhere of what properties can be used in label CSS?
    The purpose of writing is to inflate weak ideas, obscure pure reasoning, and inhibit clarity. With a little practice, writing can be an intimidating and impenetrable fog!
  • DaraiusDaraius Shevat The juror's taco spot
    That works for me. My worry was that just having a highlight trigger with each name as a substring is, like, taxing the system by scanning every single word. Really I have no idea what's going on behind the scenes.
    I used to make cakes.

    Estarra the Eternal says, "Give Shevat the floor please."
  • KaimanahiKaimanahi The One True Queen
    Stratas said:

    And now, for my lack of knowledge!

    I'm working with demonnic's anitimer, which is giving me a formatting problem. This is more about labels than the specific anitimer code though. The gauge that gets spit out is clunky in comparison to the sleek, lean look of the other gauges and windows I've stolen, and I want to pretty it up, but the only reference to the gauge style I can find is:

    demonnic.anitimer.timers[name].gauge:setStyleSheet(unpack(args))

    I'm mostly fine with that, but I'm not sure how to modify that style sheet, either before or after that gets called.

    These are the attribute the other gauges have, that I want to add:
    border-style: solid;

    border-color: white;

    border-width: 1px;

    border-radius: 5px;

    margin: 5px;


    I'm not sure what the unpack() part of the function is doing exactly, since I can't find reference to it in any of demonnic's other code. Is it a mudlet thing? Is it magic? I would certainly like to prettify this.

    Also, is there a reference list somewhere of what properties can be used in label CSS?
    Check out - http://doc.qt.io/qt-5/stylesheet-reference.html - and scroll down to the properties. Also I think that demonnic uses Geyser, so you can look at that specific documentation or try something like this http://wiki.mudlet.org/w/Manual:Lua_Functions#setLabelStyleSheet . I don't have Mudlet in front of me, but I think "args" is a variable that demonnic assigns for the style strings; unpack is feeding that into the function.
    image
  • So, I use demonnic's chatbox, but I imagine that the question works for anything that copies text to a smaller container. Is there a way to change the copied text (what ends up in the chatbox) without changing what's on the main window?

    In other words, if this pops in the main window:

    (Glomdoring): Nothing matters but Glomdoring!

    Can I change it to this in the chat window:
    (Glom): Nothing matters but Glomdoring!

    I know I can do
    stringSelect("(Glomdoring)")
    replace("(Glom)")
    demonnic.chat:append()

    But that will change both the main window, and the chat window. I want to find a way to leave the main window still saying (Glomdoring):

    On a related note, cutting down aetherchat spam. Let's say I want to get rid of (Ship): Cap'n Hook says, "Siphon" because that's, like, 90% of my chatlog. Is there a good way to do this, considering Cap'n Hook might be replaced with Cap'n Crunch on a different flight ? I would think if I did a parent trigger of (Ship): then I could have a subtrigger that is ^\(Ship\): \w+ says, "Siphon"$ or the like and have it just deleteLine(). Would I do another subtrigger then that is just (Ship):  and have it demonnic.chat:append() ? Is there a way to do it with functions, instead? Something like selectString(). And would I have to put it after my siphon trigger in order to still siphon when the call comes, or would it just gag it but still be available to trigger off of?

     
    The purpose of writing is to inflate weak ideas, obscure pure reasoning, and inhibit clarity. With a little practice, writing can be an intimidating and impenetrable fog!
  • I would like to create something like this:

    Table = {
      ["VariableKeyName1"] = { {array}, {array}, {array} ... }
      ["VariableKeyName2"] = { {array}, {array}, {array} ... }
      ["VariableKeyName3"] = { {array}, {array}, {array} ... }
      ["VariableKeyName4"] = { {array}, {array}, {array} ... }
    }

    Lua documentation indicates that if the name of the key is not known when you initially create/populate the table, you should use Table[variable] = whatever, which will both create the key, and assign the value.

    This works. The problem is that these keys are created and stored in no particular order. Every time the list is populated, things end up being in a different order. This is inconvenient. I would need to store an additional value representing the order in which it was added, and re-sort the growing table every time I add to it.

    table.insert() would be ideal, but this function does not seem to allow you to assign a key name. I could use it to add an additional nested table with the variable keyname, but then this makes finding/manipulating the deeper values stupid-loopy.

    Is there a better way to do this?
    #NoWireHangersEver

    Vive l'apostrophe!
  • ZacZac
    edited November 2015
    Talan said:
    I would like to create something like this:

    Table = {
      ["VariableKeyName1"] = { {array}, {array}, {array} ... }
      ["VariableKeyName2"] = { {array}, {array}, {array} ... }
      ["VariableKeyName3"] = { {array}, {array}, {array} ... }
      ["VariableKeyName4"] = { {array}, {array}, {array} ... }
    }

    Lua documentation indicates that if the name of the key is not known when you initially create/populate the table, you should use Table[variable] = whatever, which will both create the key, and assign the value.

    This works. The problem is that these keys are created and stored in no particular order. Every time the list is populated, things end up being in a different order. This is inconvenient. I would need to store an additional value representing the order in which it was added, and re-sort the growing table every time I add to it.

    table.insert() would be ideal, but this function does not seem to allow you to assign a key name. I could use it to add an additional nested table with the variable keyname, but then this makes finding/manipulating the deeper values stupid-loopy.

    Is there a better way to do this?

    If you want to keep the order you add them in but still be able to reference them by your own unique key you can use a second table to cache the indexes.

    <pre>-- Demo tables local tablea = {} local tableb = {} -- Your thing you want to insert local thisIsYourObject = { name = "Butts", data = { { things = "Stuff" }, { things = "Not really"} } } -- Assuming you use table functions to only manipulate tablea, this will be fine table.insert(tablea, thisIsYourObject) tableb[thisIsYourObject.name] = #tablea -- Two ways to reference local key = tableb[thisIsYourObject.name] local data = tablea[key] local data = tablea[tableb[thisIsYourObject.name]] </pre>

    If this is something you do a lot you can make it work more fluidly with metatables, IIRC, but honestly this gets it done just as well with only a couple extra lines more code.

  • I wasn't thinking earlier since I was stuck in C# land, but you could also just do this:

    <pre>-- Your thing you want to insert local thisIsYourObject = { name = "Butts", data = { { things = "Stuff" }, { things = "Not really"} } } local byString = {} local byIndex = {} byString[thisIsYourObject.name] = thisIsYourObject table.insert(byIndex, thisIsYourObject) print(byString.Butts.name) print(byIndex[1].name) byString.Butts.name = "Shoes" print(byString.Butts.name) print(byIndex[1].name)</pre>

    Which is actually better than what I said before.

  • edited December 2015
    Since there's no specific thread, I figure this one will do fine to ask, since it's Mudlet after all!

    After coming back a few days ago, and having lost my GUI, I figured I'd make a new one when my guild changing was complete~ (the two change depending on bashing/influencing (same one) and not bashing)
    It feels like something is missing, but I can't work out what... Any ideas? :(

    [spoiler]imageimage
    [/spoiler]

    image
  • ShaddusShaddus , the Leper Messiah Outside your window.
    A section to track poisons on your weapon?
    Everiine said: The reason population is low isn't because there are too many orgs. It's because so many facets of the game are outright broken and protected by those who benefit from it being that way. An overabundance of gimmicks (including game-breaking ones), artifacts that destroy any concept of balance, blatant pay-to-win features, and an obsession with convenience that makes few things actually worthwhile all contribute to the game's sad decline.
  • Hmm, maybe. I really don't fight / can't be bothered fighting all that much these days, the wounds tracker is largely there to fill space / on the off-chance I do decide to fight (need to redo all my combat stuff too anyway...) Not sure how much use it'll be since I just wipe/envenom weapon before each of my attacks, but maybe...

    Just not sure what else there is that'd be useful at all, other IRE games have a lot of different little things you could have, been a while since I played Lusternia. :P
    image
  • Quick question guys, as I'm at a loss.  Mudlet has quite suddenly and out of the blue decided to stop working.  I've restarted several times, I haven't changed anything with the original file, and it doesn't look like I'm missing any updates.  It loads but once I try to connect to the game it freezes and goes "mudlet has stopped working" blahblahblah.  Any ideas?
    --------
    "You are so much bigger than you think you are," She says, fervently. "You are a beacon of hope that shines through the world with every step you take. You are My beacon, Gabriella, and you shine even into the darkest of nightmares."
    --------
    The air sparkles with silver motes of light as a silken voice says, "You will see growth and strength where others will see weakness. You will walk with Us as a paragon of Serenwilde's power, for you have already walked this path before."
  • TarkentonTarkenton Traitor Bear
    I'd do the ol' uninstall/reinstall boogie.  Sounds to me like something zigged instead of zagging.
    image
  • I'm trying to use Ada's clothesline trigger, but I can't get it to work. When I import it, it doesn't show up. Now, that's one problem, but my question is actually this: How to process multiple lines of text?

    Using this problem of processing someone's description, I want it to trigger on the first line. Then it should eat all the remaining text and then process it somehow. I can trigger on the first line, but what I have trouble with is to get it to eat the rest of the output. 

    If someone could start me of, or point me to a manual/instruction/function for this, that would be great.

    The problem I have with this is that there is unknown input that may stretch multiple lines. I don't know the exact number of lines before hand, so I can't capture all of them manually. Working backwards wouldn't work because by then it would have already printed it, which defeats the purpose. Also, there's the problem of getting a string that goes over multiple lines into one string, without a newline character.
  • UshaaraUshaara Schrödinger's Traitor
    @Malecai

    That looks like it is for MUSH, rather than Mudlet, which probably explains it not working when you import it.

    But since the whole description, clothes and all, comes in as one line, you don't actually need multiple line triggers.

    So if your trigger is,

    ^(He|She) is (.*)\. (?:He|She) is wearing (.*)$

    matches[1] captures the entire thing, description + clothes.
    matches[2] captures the first 'He' or 'She', if you need to account for gender
    matches[3] captures the race and whatever else makes up their description
    matches[4] captures their clothing list

    The (?:He|She) doesn't capture anything.

    So I am assuming that if you change Ada's code to have

    local data = matches[1]  instead of local data = "%0",
    local gender = matches[2] instead of local data = "%1"

    and use cecho's instead of the ColourNote functions, you should be close to converting it fully for Mudlet.
  • UshaaraUshaara Schrödinger's Traitor
    edited March 2016
    If you really do need flexible multiple line triggers, using gate triggers, setting the fire length on the gate to something big, and a setTriggerStayOpen function behind the gate firing off a prompt (or something else) to close the gate should work.
  • Ah, it seems the problem was that I used the ingame config to wrap the line. Thus, the line was separated.
  • My question is that, can you script it in Mudlet such that you send a command to the game, and then don't do anything until the game registers it? Maybe some way to trigger on just the next gmcp event.

    For example, I have this script that gets all the 'takeable' items in the current room. It works off gmcp.Char.Items.List, which I update with sendGMCP("Char.Items.Room"), and then sending a blank command. This does update the room, but if I have no delay, then the rest of the code runs off of the old Char.Items.List, which is whatever it was when I last looked at the room. As it is, it seems that there is always some variance in the time that the command takes to process. Of course, I could just put a large delay and hope for the best, but I would prefer to keep the delay as minimal as possible.

    function getTakeableItems ()

    sendGMCP([[Char.Items.Room]])

    send("\n")

    tempTimer(.2, function()

    for key, value in pairs(gmcp.Char.Items.List.items) do

    if string.find(gmcp.Char.Items.List.items[key].attrib, "t") then

    send("get "..gmcp.Char.Items.List.items[key].id)

    end

    end

    echo("\nGot Everything!\n")

    end)

    end

  • TarkentonTarkenton Traitor Bear
    Perhaps have it delay until it gets a prompt? Make a trigger, type lua function, and return isPrompt() as the input will get you a trigger that fires when you get the prompt. May have to split your script up a bit, script activating/deactivating it, but that's something that comes to mind off hand.
    image
  • For some reason my mudlet wont save my alaises/triggers.
  • I apologize I'm not sure where to start in setting things up in mudlet, so here goes.

    I'd like to capture when someone calls a target on Swarm. I have this so far: ^(The Swarm): (.*) says, "Targeting: (.*)."$.
    But I'm not sure what should be in the dialog box.



    Avurekhos says, "Dylara's a PvP menace in my eyes, totes rekting face."

    The eye of Dylara materialises in your hands and flings itself around your neck, tightening incomprehensibly until it is irremovable.
    Perfectly clean, this eyeball has been wrenched from the socket of Dylara. It has been animated by some unusual force, constantly looking around itself as if in shock or fear. It is bathed in a light covering of white flames that roll endlessly over its surface. A single chain of empyreal metal pierces either side of the eye, allowing it to be worn around the neck.


  • edited April 2016
    I think I'd do it
    ^\(The Swarm\)\: \w+ says, "Targeting\: (.+)\."$
    (though you could probably use (\w+) to capture the wildcard. I don't think anyone would call numbers on the swarm for bashing and if they did I'd be mad because I use two different variables for PK and PVE and another for influence)
    --
    Then you just have to change your target variable. If you use an alias to agro ents or something you can just expand it. Mine is '^tt (\w+)$ so I'd put:
    expandAlias("tt "..matches[2])
    Otherwise, if you just have a variable to change, you can just do:
    target = matches[2]

    == 
    Though I'd also capture the person making the call and check it against a variable or table for trusted callers at the time. You could also create a list of called targets and use an alias to cycle through based on the amount of times they've been called in a timeframe. Lots of stuff. I just don't like automating my target personally.
    (I'm the mom of Hallifax btw, so if you are in Hallifax please call me mom.)

    == Professional Girl Gamer == 
    Yes I play games
    Yes I'm a girl
    get over it
  • Wanted to just say thanks, it worked! At least now during raid defence I wont be attacking the wrong person! (And I should be able to adapt this to squad talk for big bashes)

    Avurekhos says, "Dylara's a PvP menace in my eyes, totes rekting face."

    The eye of Dylara materialises in your hands and flings itself around your neck, tightening incomprehensibly until it is irremovable.
    Perfectly clean, this eyeball has been wrenched from the socket of Dylara. It has been animated by some unusual force, constantly looking around itself as if in shock or fear. It is bathed in a light covering of white flames that roll endlessly over its surface. A single chain of empyreal metal pierces either side of the eye, allowing it to be worn around the neck.


  • Just make sure to keep an eye on it and manual when you need, auto targeting can screw you too. Until I fixed my code to check if Avurekhos, or any other person calling targets, was actually -in- the room with me, I would quite often end up with my target switched to someone on the other side of Faethorn. Going to hit your target only to find mid swing that it switched on you is frustrating. I generally just manual target now, but have the calling highlighted loudly so I can make sure not to miss it.
  • Demartel said:
    Just make sure to keep an eye on it and manual when you need, auto targeting can screw you too. Until I fixed my code to check if Avurekhos, or any other person calling targets, was actually -in- the room with me, I would quite often end up with my target switched to someone on the other side of Faethorn. Going to hit your target only to find mid swing that it switched on you is frustrating. I generally just manual target now, but have the calling highlighted loudly so I can make sure not to miss it.
    Yep, eventually I'll make sure it's only certain people calling but for now it works since we only have certain people making calls in a fight.

    Avurekhos says, "Dylara's a PvP menace in my eyes, totes rekting face."

    The eye of Dylara materialises in your hands and flings itself around your neck, tightening incomprehensibly until it is irremovable.
    Perfectly clean, this eyeball has been wrenched from the socket of Dylara. It has been animated by some unusual force, constantly looking around itself as if in shock or fear. It is bathed in a light covering of white flames that roll endlessly over its surface. A single chain of empyreal metal pierces either side of the eye, allowing it to be worn around the neck.


  • I just reinstalled M&M, well the new version, M&Mf. My problem is that I tried to reset my mudlet and I accidentally deleted everything including the mapper and I think there was also a lua script that I also deleted. For some reason Mudlet refuses to be uninstalled and reinstalled on my computer, so I can't do that to have it completely reset to a default state (that is so weird).

    What are the default scripts wich were on Mudlet by default and where can I get them? Thank you.
  • edited April 2016
    Nevermind. I think I found a solution.

    Edit : Everything works!
  • edited May 2016
    A while ago, I snagged a copy of Yatco 2.3 - but I'm suspecting that I'm missing quite a bit of it.

    I'm also looking for something a little better, to track my Essence levels so that I can see it more consistently while I'm playing.

    Also hoping for a map so that I don't have to have my mapview on to take up space where I want to see and read what's actually going on. When I'm leading a hunt, I don't want to miss it when someone is attempting to gain my attention because I'm moving too quickly.

    This is what I have so far as my layout:

    image

    As demigod, the experience bar is just a waste I think and I'm unsure if there's a better way to go about it all.

    I don't mind the tabbed chat, but I don't have my triggers appropriately set up to capture chat as it should I think, and then when I looked at what I did have for triggers in relation to Yatco, I had quite literally nothing. Is there a link to the original file or is there a suggestion I can get for what sort of coding I should begin with? I've played with lua a super long time ago, but this feels pretty foreign to me now. Thanks!
    image
  • AeldraAeldra , using cake powered flight
    @eicia you may get YATCO at http://forums.mudlet.org/viewtopic.php?f=6&t=3163

    All you need to append to the specific tabs is having triggers that capture everything said on a channel

    and then have them append to one of the tabs like this:

    demonnic.chat:append("Tabname")  (it'll select the whole line automatically as far as I can tell)


    Avatar / Picture done by the lovely Gurashi.
Sign In or Register to comment.