Quick Coding Questions

191012141524

Comments

  • Another option is to use the lines from the mapper.

    @Talroth and I assume you use Mudlet.
  • Jonathin said:
    You don't even need to make a multiline for farsight. I only use the second line and have not run into any issues at all.
    Ditto.  I just gag the first and use the second line to echo.  Though I think the mapper has an Alertness function in it that is pretty handy too

  • edited May 2017
    Farsee was a bad example, since it had the information on the line (and that can just be consumed normally). Multiline trigger was the way to go, but in my case I'm using doppleganger look, which gives you a look into the room, but the room name is directly on the next line. I did use the mapper stuff while I was digging around from things, but their use case was slightly different, with scrying pool being the closest thing but still not working for this use case.

    Eventually solved it, you need a line spacer with val = 1 as the second line of the trigger, instead of using \n around the regexes.

    The multiline trigger comment was actually useful since beforehand I was using a painful flag/capture/unflag set of triggers and trying to preserve line variable between an alias and a script just to pull a room name, but the line spacer thing was really difficult to find on how to use since it seems like a mudlet specific nuance. Based off of documentation/mapper examples I was just expecting you needed to match twice to pass over the first line in buffer, but apparently it's not consumed and just keeps matching over it from when I tested with highlights/echoes.
  • I am using mudlet 3.1.0. Starting from scratch (on top of latest svof runewarden), I created three Geyser miniconsoles inside an HBox. I am trying to set wordwrap on all three with Geyser's setWrap()  and with setWindowWrap(). However, I don't see any wordwrap happening when I echo lengthy string to miniconsole with Geyser's echo() or just plain echo(). The text runs past miniconsole's display width. I have used the window resize event handler to set up wordwrap using calcFontSize(). Any ideas?
  • JonathinJonathin Retired in a hole.
    Are you just echoing a single string or do you have spaces in there at all?
    I am retired and log into the forums maybe once every 2 months. It was a good 20 years, live your best lives, friends.
  • Calaurn said:
    I am using mudlet 3.1.0. Starting from scratch (on top of latest svof runewarden), I created three Geyser miniconsoles inside an HBox. I am trying to set wordwrap on all three with Geyser's setWrap()  and with setWindowWrap(). However, I don't see any wordwrap happening when I echo lengthy string to miniconsole with Geyser's echo() or just plain echo(). The text runs past miniconsole's display width. I have used the window resize event handler to set up wordwrap using calcFontSize(). Any ideas?
    I'm sure you know this if you've made it this far, but you have to include the console/hbox name you're trying to edit. Like.... left_console_chat:setWrap(54)
  • edited May 2017
    @Jonathin thanks for pointing that out. I tried again with smaller strings and spaces and it worked as expected.

    @Kogan Yes.
  • JonathinJonathin Retired in a hole.
    Calaurn said:
    Jonathin thanks for pointing that out. I tried again with smaller strings and spaces and it worked as expected.


    No problem. I do pretty much the same thing every time I want to set the wrap width for any console.
    I am retired and log into the forums maybe once every 2 months. It was a good 20 years, live your best lives, friends.
  • Hello everyone. I am using Mudlet and am trying to make a table that stores whose shadows I have. I am having trouble with removing names from the table. Think I can get the rest to work from the mudlet help file. Does anyone have any ideas of how to remove a certain value from a table without using the position number?
  • You can use table.index_of to get the index to pass to table.remove.
  • table.remove(<table name>, table.index_of( <table name>, "<name of player> "))

  • Is there a way to change the value of gmcp.IRE.Target.hpperc to not include the % after it. I am trying to alter my custom prompt using string.format so regardless of what the values are my prompt stays the same length. The only problem I have is getting the targets health% to show as a number and not a string.



  • KlendathuKlendathu Eye of the Storm
    string.match(gmcp.IRE.Target.hpperc,"%d+")

    Tharos, the Announcer of Delos shouts, "It's near the end of the egghunt and I still haven't figured out how to pronounce Clean-dat-hoo."
  • CyrCyr
    edited June 2017
    string.match(gmcp.IRE.Target.Info.hpperc, "(%d+).")
    E: I'm too slow

    Dunn tells you, "I hate you."
    (Party): You say, "Bad plan coming right up."
  • Think I've managed to fix the issues with my new laptop. Is there an easy way of exporting everything from mudlet on my old machine and importing? Historically, I've exported everything individually but that's a bit tedious...

    (Party): Mezghar says, "Stop."
  • Sobriquet said:
    Think I've managed to fix the issues with my new laptop. Is there an easy way of exporting everything from mudlet on my old machine and importing? Historically, I've exported everything individually but that's a bit tedious...
    You can c/p the profile itself.
  • I highly, highly recommend using something like Dropbox to sync Mudlet profiles - http://forums.mudlet.org/viewtopic.php?f=8&t=1731

    Since I play on multiple machines it's a must for me. Also comes with free version control in case you break something!


  • AustereAustere Tennessee
    Anze said:
    I highly, highly recommend using something like Dropbox to sync Mudlet profiles - http://forums.mudlet.org/viewtopic.php?f=8&t=1731

    Since I play on multiple machines it's a must for me. Also comes with free version control in case you break something!


    http://forums.aetolia.com/discussion/1754/mudlet-and-dropbox-never-lose-your-settings-again

    Is a much better write up for those of us not computer savvy.
  • Austere said:
    Anze said:
    I highly, highly recommend using something like Dropbox to sync Mudlet profiles - http://forums.mudlet.org/viewtopic.php?f=8&t=1731

    Since I play on multiple machines it's a must for me. Also comes with free version control in case you break something!


    http://forums.aetolia.com/discussion/1754/mudlet-and-dropbox-never-lose-your-settings-again

    Is a much better write up for those of us not computer savvy.
    NOICE!  I honestly have been manually doing it.  This will have to be implemented soon.  So much easier.

  • AustereAustere Tennessee
    Caelan said:
    Austere said:
    Anze said:
    I highly, highly recommend using something like Dropbox to sync Mudlet profiles - http://forums.mudlet.org/viewtopic.php?f=8&t=1731

    Since I play on multiple machines it's a must for me. Also comes with free version control in case you break something!


    http://forums.aetolia.com/discussion/1754/mudlet-and-dropbox-never-lose-your-settings-again

    Is a much better write up for those of us not computer savvy.
    NOICE!  I honestly have been manually doing it.  This will have to be implemented soon.  So much easier.
    If you need help, hit me up.  I'm fairly sure modules and packages are getting combined for mudlet, but for the time being, ripping a package with package manager is the easiest way to do this.  If you need help, just let me know.  I'm up to..a ridiculous number of modules. Need to add more, though.  

    On a side note, mudlet saves a module back-up every time you save, so I try to empty those once a month, at least until mudlet team tinkers with the delete old profiles script.  Last week I dumped 11 gb, which was low for me. Two month period.
  • Does this technique also include all of the extraneous (non-lua) files that various published scripts include? The benefit of backing up the actual files is that you get EVERYTHING that Mudlet uses regardless of which package/module it's from. Your databases, settings files and the like.
  • AhmetAhmet Wherever I wanna be
    @Anze the one linked from the aetolia file does not, no.

    Here's one that includes windows directions.

    Huh. Neat.
  • Austere said:

    On a side note, mudlet saves a module back-up every time you save, so I try to empty those once a month, at least until mudlet team tinkers with the delete old profiles script.  Last week I dumped 11 gb, which was low for me. Two month period.
    The modules not getting cleared by that script fell off my radar. Would anyone help mind updating it here - hit the Edit button top-right () ?
  • Anyone ever run into issues where wundersys/mudlet lags randomly for no reason? Numbers in the bottom right are low when it happens but not sure what the cause is. 
  • Sorry for the double post, but was unable to edit. Can ignore my question above. Think I fixed it. Thanks.
  • I'm having a play with setting up a separate console window to output my limb counter, target, etc.

    I've been through the documentation to create a console window, but the variables don't update dynamically. What's the easiest way to get the updating to work? Trigger off Prompt?

    (Party): Mezghar says, "Stop."
  • Run an update on the output window to clear and append your buffer after each event
    Deucalion says, "Torinn is quite nice."
  • If you can test without receiving, ala `echo or ^lua, then run a loop on a refresh function. Don't run it on a 1ms timer though.
    "All we have to decide is what to do with the time that is given to us."

  • Does anyone have an ink milling script I can use or modify? I'm doing it with simple aliases and it's tedious as anything. 

    (Party): Mezghar says, "Stop."
  • I've a setup that works really good. It's simplistic, but it works.
Sign In or Register to comment.