Quick Coding Questions

1181920212224»

Comments

  • Draugryn said:
    So, jumping back into the game with a new computer, loaded svof and keneanung's basher (not sure if either are still being maintained) and keep running into an issue that I'm sure has a super simple fix but I'm just not seeing it. I also know very little about how any of this works.

    Basically, the &tar isn't picking up my targets. Even when I've killed the mob manually, and it shows up in the prio list, the command doesn't seem to linking the &tar with my target (or anything on the list). 

    For reference, my command through the basher is: 

    keneanung: attackcommand is now battlefury focus speed/slaughter
    Alias "keneanungki" will now execute: "battlefury focus speed/slaughter &tar"

    What am I missing/doing wrong?
    When you set your target, are you using the SETTARGET command? That is what sets, and lets you reference,  &tar within a SS alias.




    Penwize has cowardly forfeited the challenge to mortal combat issued by Atalkez.
  • edited March 2021

    How do you write the trigger or code to have all icewall directions in a room added into a table? My tries resulted in only single icewall direction was added, the last one that it finds, and not all of the multiple icewalled direction in a room.


    The perl regex trigger I was using:

    An icewall is here, blocking passage to the (\w+)\.

  • Kogan helped me, and I got it working:

    for i = 2, #matches, 2 do

     table.insert(icewalltable, matches[i])

    end

  • Yep that’s good way to get it done. The other way I did this is with a chain trigger (filter trigger) that picks up all matches of the wall line and passes a direction onto the subsequent chained trigger to add to a table. Yours is probably better, cleaner at least, no idea if it runs better, I just happened to solve it with this way.

    Also, don’t forget to capture those stonewalls that come up the odd time to leap or tumble! Might as well.

  • For the record I got this sorted out with the help of @Romaen. Who is generally a step ahead of me in all things lua and then shared what I learned.

  • EruEru
    edited April 2021

    I have this idea to have a clickable goto menu that displays a list of pre-defined locations that will auto walk to upon clicking the given location. I don't want to have this as a static clickable menu on my UI, but rather only display when I -HOLD- a key. Is this possible or will I need to setup a key that does displayLocationMenu() and have it hide on click/hitting the button again?


    Also, if this is possible can I have the displayLocationMenu() center itself on my cursor?

  • You will have to make it a toggle-style display.

    I believe it's been asked a few times about having keydown/keypress and keyup/keyrelease events added, but it would require a large rewrite of their code for it to be doable. Which means they're not gonna do it without a good use case being presented for doing it.

    Disappearing from Achaea for now. See you, space cowboy.


    smileyface#8048 if you wanna chat.

  • edited April 2021

    Instead of doing a hold down functionality, just make it a hotkey or alias to enable the menu then have the clicks disable it, with either a "close window" function or a timeout for cases where you want to back out.

    The easiest way to do what you asked would be to use a 3rd party app that manages keyboard shortcuts (tons of options) which could trigger a different keypress combination on key release, but personally I think the option above is a lot cleaner and does the job just fine.

    • How do you delete a file? I made a script to download a file, display its contents, and then I want to delete it. I tried using the os.remove(path) but it doesn't seem to work.


    • How do I wait to display items in a userwindow until said download is complete? Do I just cycle it through the function until it is present before triggering the cecho to display stuff?

  • @Caelan

    I think for the first part os.remove should be doing what you want. Most folks save the file path as a local variable and then os.remove(variableName).


    For this second part I think you can use events? sysDownloadDone might be the event name off memory, but I'd have to check again later when I'm able to dig further.

  • Thanks. Yeah I have it as a path but it doesn't remove it. I was using io.close(path) 5o close the file and I think thatbwas the problem. Rewrote as file:close() followed by os.remove and will see if that does it.


    I will look into the event. Thanks for the point in the right direction.


  • Hey you all,

    I have been playing around with adjustable containers, and am having one echo some variables. Turns out the echoes are looping, meaning when I expand the container with my mouse they start over and over again with the same spacing I made the echoes. Anyone have an idea how to stop this from happening?

  • When is your adjustable container supposed to do its echo? Do you mean that the echoes start looping endlessly whenever it gets adjusted once, or they just output again when the adjustment finishes? What do you mean by 'the same spacing'? Are you using blank spaces for formatting? Can you send a picture of it?

    Without resting, my king, you will work, my king

    Until all is plentiful in the people's garden

  • edited May 2021

    Two quick questions:

    1) Can I capture emotes in the same way my client is able to capture says/tells/channels etc? I see that with the UI package I installed (Ashlia GUI), the "gmcp.Comm.Channel.Text" event is being listened to but it doesn't include emotes.

    2) Is there any way to copy/paste from Mudlet without the mid-sentence linebreaks? Example of what it looks like now when I paste:

    Makenna says in Ashtani in a soft-spoken voice, "Here is 
    a rare Lord of Chaos who is a biological descendant of 
    another Chaos Lord. Spawned from a tryst between 
    Golgotha and a demon of the Inferno, this half-demon 
    half-thrall was once known as the Chaos Prince."
    
    You say in a sultry voice, "I didn't even think that 
    possible."
    

    Thanks!

  • edited May 2021

    If ypu mean line-wrap, the easiest way around that is the CONFIG. I think it is SCREENWIDTH or something in Achaea. Set that to (0) zero, and it won't wrap at all.


    Then go in to Mudlet SETTINGS and find the option (I think on second tab) that says something like "wrap lines at ..." and play with the settings. Most monitors do well between 180 and 220 depending what other windows you have.


    It makes capturing EVERYTHING so much easier.


  • No, emotes are not in GMCP. I would recommend capturing them with a color trigger if you want to capture them.

    No, can't copy and paste from mudlet without linebreaks, but if you do what Caelan suggests you can LOG stuff without linebreaks.

  • Thank you both @Caelan and @Thaisen ! Those are good workarounds for what I was looking for

  • What can cause help files to be auto-more'd in Mudlet? e.g. when reading a long help file, the entire file is printed at once.

    I have uninstalled svof and keneanung's bashing script. At one point I noticed that when I disabled one of the free GUI packages I found here (Zulah's GUI for Mudlet 4.9+), Mudlet was no longer auto-reading help files. I then proceeded to build my own GUI adapted from bits and pieces of various GUI frameworks. I noticed it was after I built the mapper function, the help files were being read all at once again. I disabled the mapper scripts and triggers but it didn't fix the problem.

    I've checked my pagelength config (it's 20) and searched all my scripts/triggers for any mentions of 'more', but nothing shows up. I can confirm that when using Nexus (no packages), the problem does not come up there. I'm at a complete loss of how this is happening now and can only guess it's some side-effect of a GMCP event maybe? 😫

  • I don't use any of the scripts you've mentioned, but try searching your profile for "config pagelength". Some alias could be changing it, reading the help file, and changing it back?

  • If the whole thing is showing up at once and not being shown in pieces and it is like MORE is being sent over and over you most likely have the IRE.Display gmcp module enabled.

    Keneanung's basher used to enable that all the time, but in one of the recent releases it is now only enabled while bashing. I'd check to see if you have anything else that is enabling it.

  • edited June 2021

    Ahhh I think that was the culprit! In the GUI package there was this line:

    sendGMCP('Core.Supports.Add ["IRE.Display 1"]')
    

    I never thought anything of it, but after commenting it out, it seemed to stop HELP files being opened all at once. I'm guessing the 1 is an enum for IRE.Display.Help. I'll have to see if there was anything dependent on this (the package was also adding supports for 'IRE.Misc 1', 'IRE.Time 1' and a few others, so I need to learn what these modules do). Thanks so much @Thaisen

  • EDIT: Since I can't edit the original post anymore - the '1' in IRE.Display just means to enable it, after I looked at the official docs (https://www.achaea.com/local/Achaea_GMCP_Spec_20140311.pdf). My mapper is still working even with it disabled so I'm not exactly sure the purpose of having it there in the first place. But just wanted to clarify to avoid future confusion in case someone else comes here with similar issues

  • Yeah, I don't think it is officially documented anywhere since that module was originally intended for Nexus, but if it is enabled it will show all of the help file instead of just sections of it.

    IRE.Display.ButtonActions can be used to indicate when a battlerage ability is ready I think....so might be something like that.

    I think this documentation is more up to date BTW: https://nexus.ironrealms.com/GMCP

  • Trying to cut down on spam during fights and stuff by removing the full room descriptions. I set up a color trigger and ran deleteLine() just to see if it worked and it does.


    -PLANTS OFF, CONFIG ROOMDESCRIP BRIEF, etc.. is already done. Still want to pull the last little 'greenish' color from the room.


    But it also deleted CWHO, emotes, CONFIG options, etc... what's the best way to get it to only work on the room color ?


  • Change the room colour to something nothing else uses, like Cyan on Cyan or something, and the gag that colour. You can then just colour it back client side instead of gagging it if you ever want to see it.

  • Can you change CONFIG COLOUR ROOMS background?


    Just didnt want to "process" each room by changing the colors just to gag it out. I suppose if I have to, I have to - plus that gives me the opportunity to actually process out the little bits I can use for each room (monos, totems, etx)


  • Hello!

    I want to create a background and/or separate my main window from the rest of the stuff I might want to create. The idea is similar to this picture (Nice work, Zulah!) but I don't know where to start.

    I've tried to set a background image to my main window and that was something horrible. My first thoughts after that was to create a console and copy the main window to there. Then create another console that serves as a background. Should this work or any other ideas where to start? Thank you!


Sign In or Register to comment.