Limb - A Simple Mudlet Limb Counter.

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.

Comments

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

  • 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.


  • 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?

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

  • 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?

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





    Penwize has cowardly forfeited the challenge to mortal combat issued by Atalkez.
  • Now that makes sense, thank you.

  • edited July 2021

    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?

  • @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.

  • 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?

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

  • edited July 2021

    Edit: Nevermind, got it. Thanks @Treyal

  • 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.

  • How do you make the info show up in the prompt? My prompt is -

    vconfig customprompt ^1@healthh, ^2@manam, ^5@endurancee, ^4@willpowerw ^W@eqbal@defs @%xp- @timestamp

    I looked through it and couldn't figure it out, but I am absolutely terrible at coding. Thanks in advance.

  • edited October 2021

    @Andrayas It's not showing up on your prompt because you didn't add the 'limb prompt' to your custom prompt.

    Non Svof Users should just be able to add lb.prompt() to a prompt trigger to have it show.

    Svof overwrites the default prompt to draw its own, however, with the use of svo.adddefinition() we can add the limb counter display no problem!

    Locate the 'Scripts' section of the Limb counter and find the script named 'limb prompt' and add this line on the bottom of the script box.

    Note: the @ can be changed to just about anything you want the tag to be called and used but the latter needs to call the lb.prompt() function.

    svo.adddefinition("@lb_limbcounter", "lb.prompt()")


    After this, just add @lb_limbcounter(or whatever you called it) to your custom prompt string. i.e,

    vconfig customprompt ^1@healthh, ^2@manam, ^5@endurancee, ^4@willpowerw ^W@eqbal@defs @%xp- @timestamp @lb_limbcounter

  • @Xanton Thank you! That worked like a charm. I spent hours trying to figure this out. Should have asked sooner. Thanks again!

  • I'm having an issue adding this to my prompt on svo. I followed the steps Xanton gave and  [0|0|0|0|0|0] appears in my prompt, but limb damage doesn't change anything. When I start mudlet I have an error in the limb prompt script, but simply clicking on it resolves it.
  • Neeeeeevermind. I'm a goofy doofy and didn't read everything. Forgot I need to have my attacks in the queue.
Sign In or Register to comment.