Skip to content

Utility Codes

Is there anything I could code/activate in Mudlet that would be for general utility? For example, I want to figure out how to put ringtells in a separate window, and I thought there may be other useful things I could do that I wasn't aware of.
(Ring): Lartus says, "I heard Theophilus once threw a grenade and killed ten people."
(Ring): Lartus says, "Then it exploded."

(Ring): Zsetsu says, "Everyone's playing checkers, but Theophilus is playing chess."

Comments

  • SalikSalik Da Burgh
    Demonnic's chat window code is out there. That'll do wonders.
  • https://mudlet-packages.googlecode.com/files/TabbedChat-v2.1.xml

    Here is that code, by the way. It is AWESOME. I can help anyone set it up. It's simple.
    (Ring): Lartus says, "I heard Theophilus once threw a grenade and killed ten people."
    (Ring): Lartus says, "Then it exploded."

    (Ring): Zsetsu says, "Everyone's playing checkers, but Theophilus is playing chess."
  • In a script, put:

    gm = gm or {}


    gm.room = gm.room or 0


    function gm.vitals()

    hp = math.floor(gmcp.Char.Vitals.hp/11)

    mhp = math.floor(gmcp.Char.Vitals.maxhp/11)

    mp = math.floor(gmcp.Char.Vitals.mp/11)

    mxmp = math.floor(gmcp.Char.Vitals.maxmp/11)

    eq = tonumber(gmcp.Char.Vitals.eq)

    bal = tonumber(gmcp.Char.Vitals.bal)


    bleed = math.floor(gmcp.Char.Vitals.bleed/11)

    end


    Add under user defined event handler at the top: gmcp.Char.Vitals


    And then you can capture hp or whatever to do certain things. Just starting to work with GMCP, so this might not be as new to most of you. But for some it might help.

    (Ring): Lartus says, "I heard Theophilus once threw a grenade and killed ten people."
    (Ring): Lartus says, "Then it exploded."

    (Ring): Zsetsu says, "Everyone's playing checkers, but Theophilus is playing chess."
  • (Ring): Lartus says, "I heard Theophilus once threw a grenade and killed ten people."
    (Ring): Lartus says, "Then it exploded."

    (Ring): Zsetsu says, "Everyone's playing checkers, but Theophilus is playing chess."
  • edited March 2016
    Do note the script has to be called gm.vitals too, if you want to use event handlers like that.

    Also don't recommend having variables called that as a standalone thing, if you're planning on making a system for Imperian.

    gm.hp = math.floor(gmcp.Char.Vitals.hp/11)

    gm.mhp = math.floor(gmcp.Char.Vitals.maxhp/11)

    gm.mp = math.floor(gmcp.Char.Vitals.mp/11)

    gm.mxmp = math.floor(gmcp.Char.Vitals.maxmp/11)

    gm.eq = (gmcp.Char.Vitals.eq == "1") and true or false

    gm.bal = (gmcp.Char.Vitals.bal == "1") and true or false

    gm.bleed = math.floor(gmcp.Char.Vitals.bleed/11)


    Also about 90% sure it needs to be math.floor(tonumber(gmcp.Char.Vitals.mp)/11) and such, since in gmcp they're all string values by default. As for the .eq / .bal values, basically if it's "1" then gm.eq would equal true, if it's not, then it's false.

  • Yeah, I posted this several hours before I finalized what I was using it for, and I realized I had screwed up -a lot-.

    GMCP is so useful, though.
    (Ring): Lartus says, "I heard Theophilus once threw a grenade and killed ten people."
    (Ring): Lartus says, "Then it exploded."

    (Ring): Zsetsu says, "Everyone's playing checkers, but Theophilus is playing chess."
  • What is GMCP - sorry noob question
    image
  • GMCP is a protocol used to send data to your client that is invisible to you. A lot of different information is available in GMCP. Jeremy recently reworked and expanded the documentation on GMCP, and it can be found here: http://nexus.ironrealms.com/GMCP
    Like what we're doing? Why not take a second to vote? Vote for Imperian at http://www.imperian.com/vote
Sign In or Register to comment.