Welcome to the Achaea Forums! Please be sure to read the Forum Rules.

Quick Coding Questions

1131415161719»

Comments

  • KeneanungKeneanung Posts: 584Member ✭✭✭✭ - Eminent
    This has been there pretty much since the beginning. But since it didn't break anything and I didn't quickly see what was the cause, it got buried in my todo list.
  • ShubShub Posts: 56Member ✭✭ - Stalwart
    edited December 2017
    I'm tempted to just store the info tables in a variable somewhere and switch it to a manual 'info refresh' command instead of handling every single gmcp.char.skill.list/info event.

    I figure it ought not to need a refresh on every login, just on things like level up, class switch, and when the gods adjust the rage abilities. I bet those gmcp messages are coming back with empty tables during the login, or something else outside of the basher is making gmcp send info that the basher is not liking. I guess the first thing to try is the basher on a naked profile.
  • KeneanungKeneanung Posts: 584Member ✭✭✭✭ - Eminent
    It should run through getting the skill info only when class changed or on login. Of course there might be a bug there of course. It doesn't store any information between sessions that it doesn't need to.
  • KlendathuKlendathu Eye of the StormPosts: 2,927Member @@ - Legendary Achaean
    How do others handle this? Whenever I take deafness off serverside defence keepup (aria), it spams curing and re-doing blindness, never getting to cure deafness until I curing off and then manually apply to ears.

    From the options available, serverside should default to "apply epidermal to ears" to cure deafness: Where do you want to apply the salve? You may spread it on your head, your ears, your arms, your legs, or your body.

    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."
  • AntoniusAntonius Posts: 4,500Member @@ - Legendary Achaean
    Sounds like you're not just taking deafness off defence upkeep, but also setting it as an affliction to be cured. It's possible serverside curing isn't doing the right thing to cure deafness, in which case bug it.

    I just take deafness off keepup and then apply epidermal to ears along with aria (if I have deafness) as part of the script.
  • KlendathuKlendathu Eye of the StormPosts: 2,927Member @@ - Legendary Achaean
    Antonius said:
    Sounds like you're not just taking deafness off defence upkeep, but also setting it as an affliction to be cured. It's possible serverside curing isn't doing the right thing to cure deafness, in which case bug it.

    I just take deafness off keepup and then apply epidermal to ears along with aria (if I have deafness) as part of the script.
    I did bug it. It never actually cures deafness, because it's curing blindness / reafflicting blindness with every salve balance. I'll make some local tweaks to manually apply epidermal instead of relying on serverside for now.

    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."
  • CaledCaled Posts: 74Member ✭✭ - Stalwart
    Does class balance show in gmcp somewhere?
    I've been trying to find fury balance in gmcp.Char.Vitals but not seeing it.
  • KriexKriex Posts: 140Member ✭✭✭ - Distinguished
    Iirc it does not show
  • KlendathuKlendathu Eye of the StormPosts: 2,927Member @@ - Legendary Achaean
    Caled said:
    Does class balance show in gmcp somewhere?
    I've been trying to find fury balance in gmcp.Char.Vitals but not seeing it.

    For bards it's part of gmcp.Char.Vitals.charstats:
    "Bleed: 5",
    "Rage: 11",
    "Stance: None",
    "Voice: Yes"
    You can't read it out as gmcp.Char.Vitals.charstats.Voice though, you'll need to do some gsubbing

    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."
  • BrenexBrenex Posts: 105Member ✭✭✭ - Distinguished
    Keneanung said:
    This has been there pretty much since the beginning. But since it didn't break anything and I didn't quickly see what was the cause, it got buried in my todo list.
    it's because after each skill you always call requestNextSkillDetails which always tries to remove something every time even if it has just removed the last entry. That causes a blank to populate in that string format. Just place a check in that function, maybe next(...) or whatever

  • KeneanungKeneanung Posts: 584Member ✭✭✭✭ - Eminent
    Brenex said:
    Keneanung said:
    This has been there pretty much since the beginning. But since it didn't break anything and I didn't quickly see what was the cause, it got buried in my todo list.
    it's because after each skill you always call requestNextSkillDetails which always tries to remove something every time even if it has just removed the last entry. That causes a blank to populate in that string format. Just place a check in that function, maybe next(...) or whatever
    This is... I can't believe I didn't see it myself... I created a PR with the very simple change, I just need to test it some time later.
  • GilliamGilliam Posts: 42Member ✭✭✭ - Distinguished
    Anyone know if there is a function or anything in mudlet that I can call to open the scripting menu? I'd like to make a button in my UI that pulls it up.
  • DragonknightDragonknight Posts: 252Member ✭✭✭✭ - Eminent
    Gilliam said:
    Anyone know if there is a function or anything in mudlet that I can call to open the scripting menu? I'd like to make a button in my UI that pulls it up.
    You mean like the script button at the top. No I don't know of a function, I imagine asking on the mudlet discord would get a better answer tho.
  • RekhyrRekhyr Posts: 56Member ✭✭✭ - Distinguished
    edited April 2
    Edit: nevermind
  • DominiusDominius Posts: 116Member ✭✭✭ - Distinguished
    Does anyone have a tip for how to reduce the prompt showing up twice every once in a while? Running on Mudlet and I use a lot of movecursor deleteline() gags.
  • KriexKriex Posts: 140Member ✭✭✭ - Distinguished
    Dominius said:
    Does anyone have a tip for how to reduce the prompt showing up twice every once in a while? Running on Mudlet and I use a lot of movecursor deleteline() gags.
    Use deleteFull()  will delete the line and the following prompt
  • KriexKriex Posts: 140Member ✭✭✭ - Distinguished
    Is it possible to get mudlets notepad into a miniconsole? Or is there an "always on top" option for the notepad window?
  • LeffeLeffe Posts: 32Member
    Not that I'm aware.
    But you could create your own notepad using a miniconsole. It could be part of tabbed chat as well.
  • CaelanCaelan Posts: 1,112Member ✭✭✭✭✭ - Grand Achaean
    How do I randomly remove an element from a table BUT if "t" is there, don't ever remove it?

    X = {y, a, m, t, b, r}

  • CaledCaled Posts: 74Member ✭✭ - Stalwart
    Caelan said:
    How do I randomly remove an element from a table BUT if "t" is there, don't ever remove it?

    X = {y, a, m, t, b, r}
    local i = 1
    local X = {'y', 'a', 'm', 't', 'b', 'r',}
     
    repeat
        i = math.random(1, #X)
        print(i, X[i])
    until X[i] ~= 't'
    
    table.remove(X, i)







  • CaelanCaelan Posts: 1,112Member ✭✭✭✭✭ - Grand Achaean
    Thanks. I will test later but I had a total brainfart. It wasnt quite how I was doing it but then..  it didn't work anyway so.   Thanks again

  • CaledCaled Posts: 74Member ✭✭ - Stalwart
    All good. Until you asked the question I didn't know the 'repeat-until' structure even existed. The last time I tried something like this it was a monster. 
  • CaelanCaelan Posts: 1,112Member ✭✭✭✭✭ - Grand Achaean
    I didn't either, was gonna try a while loop, myself.


Sign In to Comment.