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

Limb - A Simple Mudlet Limb Counter.

RomaenRomaen LondonMember Posts: 50 ✭✭ - Stalwart

Hi all,

This is a limb counter for Mudlet. I've written this to be easy to install, easy to maintain, and easy for users to combine with existing systems.

Download and README: https://github.com/27theo/limb. Setup is described here.

This should run out of the box!

It comes with triggers to capture limb damage from the new lines ("you perceive that you have dealt"...) gated under a queue run message for anti-illusion*. It handles salves and the 3 minute decay in a straight-forward fashion.

Hits are stored in the limb namespace, under limb["Name"].hits.limb, (e.g. limb.Romaen.hits["right leg"] or limb["Romaen"].hits.head), in a percentage format.

The package comes with a primitive limb prompt - head, torso, left arm, right arm, left leg, right leg. You can change the order in the limb prompt script.

^ Result of a prompt trigger running cecho(limb.prompt())

I've not got an "isPrepped" function, but those of you who want to automate using one can likely make one yourselves! I opted out from this because I wanted to keep this elementary.

I'll keep the release and brief documentation updated on my GitHub.

If you find bugs, or I've missed out some crucial element of a limb counter (totally could have done this) please comment here or find me on discord or in game, with an OOC message.

Cheers,

Romaen.

*See the note in the README on my GitHub.

AustereSobriquetVinzentEryl

Comments

  • RomaenRomaen LondonMember Posts: 50 ✭✭ - Stalwart

    Updated the namespace from limb to lb. Not sure why I thought I could get away with that, but it's fixed now!

    Iaxus
  • CooperCooper Member Posts: 5,841 @@ - Legendary Achaean

    This is exactly what I had in mind during the discussion in the other thread, well done!


    I'll toss you some credits next time I login as a thank you.


    RomaenSobriquet
  • EveraEvera Member Posts: 2

    Hey! Thanks for sharing! I'm taking it for a spin, but for the life of me, I can't get the prompt line/GUI to work.... any pointers?

  • EveraEvera Member Posts: 2

    Nevermind! Got it! Looking forward to seeing it in action. :)

    Romaen
  • DominiusDominius Member Posts: 184 ✭✭✭ - Distinguished

    Can someone clarify this:

    If serverside is telling me the limb is daamges 24.1% and it breaks on that message, it isn't a bug? I bugged itand was told it is working as intended. Also, has anyone else noticed that this doesn't work if you're in retardation? As in, no percentages are given?

  • AtalkezAtalkez Member, Secret Squirrel Posts: 5,537 @@ - Legendary Achaean

    It tells you the damage per hit, not the total damage that limb has taken.





    You hug Aurora compassionately.
  • DominiusDominius Member Posts: 184 ✭✭✭ - Distinguished

    Now that makes sense, thank you.

  • SheveradSheverad Member Posts: 36 ✭✭ - Stalwart
    edited July 10

    Edit: Worn place for my question!

    But I wanted to ask here, too... I tried SVO and I can't make the echo thing to work. The reason is, the "in-client-svof" download when installed as module seems to always load after all my trigger/script groups, even if I manually move them before and save profile. This means that everytime Mudlet starts, apparently SVOF is being "reinstalled" as a module and thus ends up at the list bottom.

    Anyone know of a way to fix this? Is there perhaps an SVO event that is raised when everything is load and it's ready, so that I can create there some triggers etc for the limb counter?

  • KoganKogan Member Posts: 445 ✭✭✭✭ - Eminent

    @Sheverad There is a “svo system loaded” event. You can check out the documentation to see all other events here: https://svof.github.io/svof/#events-raised-by-the-system


    Hope this helps.

    SheveradRomaen
  • VerdellVerdell Member Posts: 54 ✭✭✭ - Distinguished

    This is probably more of a Mudlet issue than a script issue. But I installed the Mpackage using the Module Manager. I made the mistake of syncing it which I think is what messed it up. I restarted Mudlet and when I opened my profile again, the Limb script was missing. I tried to reinstall, wouldnt show up on the module list. Went into my profile and deleted any limb files I could find, still couldnt reinstall.


    Any ideas?

  • TreyalTreyal Member Posts: 101 ✭✭✭ - Distinguished

    You should be installing this as a package, not as a module.

    VerdellRomaen
  • VerdellVerdell Member Posts: 54 ✭✭✭ - Distinguished
    edited July 17

    Edit: Nevermind, got it. Thanks @Treyal

    Treyal
  • RomaenRomaen LondonMember Posts: 50 ✭✭ - Stalwart

    I've made a change to the lb.salve function, to account for left limbs curing first in all cases at the time upon which the restoration apply goes through.

    Here's the new function, in case you want to edit it in yourself.

    function lb.salve(name, area)
      lb[name].t.cure = tempTimer(3.7, [[
        local convert = {
          head = {"head"},
          torso = {"torso"},
          arms = {[1] = "left arm", [2] = "right arm"},
          legs = {[1] = "left leg", [2] = "right leg"},
        }
        if not convert["]] .. area .. [["] then return end
        for _, ltar in ipairs(convert["]] .. area .. [["]) do 
          if lb["]] .. name .. [["].hits[ltar] >= 100 then 
            if lb["]] .. name .. [["].t.cure then killTimer(lb["]] .. name .. [["].t.cure) end
            lb.resetLimb("]] .. name .. [[", ltar, true)
            if lb["]] .. name .. [["].t[ltar] then
              killTimer(lb["]] .. name .. [["].t[ltar])
              lb["]] .. name .. [["].t[ltar] = nil
            end
            lb["]] .. name .. [["].t.cure = nil
            break
          end
        end
      ]])
    end
    

    I'll also drop a new release in the GitHub repo.

    SheveradCaelanSobriquet
Sign In to Comment.