Mudlet Code Snippets - post any useful ones you might have here!

SelenitySelenity My first MC to stay in Serenwilde
I don't know if a thread like this exists already, but, here are some I've made that I think are useful:


What's it do: Has you send clan tells by the short name; makes you less likely to miss between clans or onto CT
What you need to do: Make a new alias, put in the pattern, put in the code. For the empty parenthesis in the pattern, put the shortnames of your clans, separated by a |. So if you have two clans, xyz and abc, you would put xyz|abc in. So the pattern would look like this: ^(xyz|abc) (.*)$
Pattern: ^() (.*)$
Code: send("clan " .. matches[2] .. " tell " .. matches[3])
To use: xyz Hi
The result: (Clan XYZ): You say, "Hi."

What's it do: Simplistic curio rubbing; gives you lots of control with less typing; not automatic
What you need to do: Make a new alias, put in the pattern, put in the code.
Pattern: ^crub ([\d ]+)$
Code:

tempcuriolist = matches[2]:split(" ")


for i=1, table.size(tempcuriolist) do

send("curio rub " .. tempcuriolist[i])

end


tempcuriolist = nil

To use: crub 1069 4687 2098612

The result: << curio rubbing spam >>


What's it do: Returns a list of keys of a table

What you need to do: Make a script or put it in an existing script of yours, not as part of a pre-existing function

Code:

function keys(tab)

temptable = {}

for k,v in pairs(tab) do

table.insert(temptable, k)

end

return temptable

end

To use in your code: display(keys(SomeTableWithKeysAndValues))

The result: << all the keys for the table SomeTableWithKeysAndValues >>

«134

Comments

  • ShaddusShaddus , the Leper Messiah Outside your window.
    edited December 2014
    Basic targetting alias I use on every character in all the IRE games, for Mudlet.

    ^x (.*)$

    sends

    target = matches[2]

    cecho("<blue>[<white>System<blue>]<white>: <white:blue>Target set: " .. string.upper(matches[2]) .. ".")

    ------------------------------------------

    If you want to change the variable (in this case "target"), you can do so. Just change the bolded target to whatever you want. Likewise, you can actually change the colours in the bottom line to whatever you want, and the words in the prompt to whatever you want as well. Make sure the top portion is set to regex.
    Everiine said: The reason population is low isn't because there are too many orgs. It's because so many facets of the game are outright broken and protected by those who benefit from it being that way. An overabundance of gimmicks (including game-breaking ones), artifacts that destroy any concept of balance, blatant pay-to-win features, and an obsession with convenience that makes few things actually worthwhile all contribute to the game's sad decline.
  • UshaaraUshaara Schrödinger's Traitor
    edited December 2014
    Trigger Type: Lua function
    Trigger Pattern
    : return isPrompt()
    Code
    :
    	time = getTime(true, "hh:mm:ss:zzz")
    	cinsertText("<seashell:dark_slate_gray>"..time.."<:black> ")
    
    Result: Prepends a timestamp to your prompt that gets included in logs.
  • edited December 2014
    Basic gauges for vitals: (should be 2 separate scripts)
    Sorry if there's a potential error... Was writing completely from memory >.>

    Create Them
    [spoiler]
    (important) Name: create_gauges()
    Event Handler: sysLoadEvent
    Code:
    function create_gauges()
       setBottomBorder(30)
       gWW, gWH = getMainWindowSize()
       health_gauge = Geyser.Gauge:new({ name = "health_gauge", x = "5%", y = gWH-30,height = 30, width = "17%",})

       health_gauge.front:setStyleSheet([[background-color: red; border-top: 1px black solid; border-left: 1px black solid; border-bottom: 1px black solid; border-radius: 7; padding: 3px;]])

       health_gauge.back:setStyleSheet([[background-color: black; border-width: 1px; border-color: red; border-style: solid; border-radius: 7; padding: 3px;]])

       health_gauge:setValue(50,100)


       mana_gauge = Geyser.Gauge:new({ name = "mana_gauge", x = "23%", y = gWH-30,height = 30, width = "17%",})

       mana_gauge.front:setStyleSheet([[background-color: blue; border-top: 1px black solid; border-left: 1px black solid; border-bottom: 1px black solid; border-radius: 7; padding: 3px;]])

       mana_gauge.back:setStyleSheet([[background-color: black; border-width: 1px; border-color: blue; border-style: solid; border-radius: 7; padding: 3px;]])

       mana_gauge:setValue(50,100)


       ego_gauge = Geyser.Gauge:new({ name = "ego_gauge", x = "41%", y = gWH-30,height = 30, width = "17%",})

       ego_gauge.front:setStyleSheet([[background-color: LightSkyBlue; border-top: 1px black solid; border-left: 1px black solid; border-bottom: 1px black solid; border-radius: 7; padding: 3px;]])

       ego_gauge.back:setStyleSheet([[background-color: black; border-width: 1px; border-color: LightSkyBlue; border-style: solid; border-radius: 7; padding: 3px;]])

       ego_gauge:setValue(50,100)


       will_gauge = Geyser.Gauge:new({ name = "will_gauge", x = "59%", y = gWH-30,height = 30, width = "17%",})

       will_gauge.front:setStyleSheet([[background-color: purple; border-top: 1px black solid; border-left: 1px black solid; border-bottom: 1px black solid; border-radius: 7; padding: 3px;]])

       will_gauge.back:setStyleSheet([[background-color: black; border-width: 1px; border-color: purple; border-style: solid; border-radius: 7; padding: 3px;]])

       will_gauge:setValue(50,100)


       end_gauge = Geyser.Gauge:new({ name = "end_gauge", x = "77%", y = gWH-30,height = 30, width = "17%",})

       end_gauge.front:setStyleSheet([[background-color: yellow; border-top: 1px black solid; border-left: 1px black solid; border-bottom: 1px black solid; border-radius: 7; padding: 3px;]])

       end_gauge.back:setStyleSheet([[background-color: black; border-width: 1px; border-color: yellow; border-style: solid; border-radius: 7; padding: 3px;]])

       end_gauge:setValue(50,100)

    end

    [/spoiler]


    Update Them
    [spoiler]
    (important) Name: update_gauges()
    Event Handler: gmcp.Char.Vitals
    Code:

    function update_gauges()

      local php = math.floor((tonumber(gmcp.Char.Vitals.hp)/tonumber(gmcp.Char.Vitals.maxhp))*100)

      local pmp = math.floor((tonumber(gmcp.Char.Vitals.mp)/tonumber(gmcp.Char.Vitals.maxmp))*100)

      local pegp = math.floor(tonumber(gmcp.Char.Vitals.ego)/tonumber(gmcp.Char.Vitals.maxego))*100)

       local pep = math.floor((tonumber(gmcp.Char.Vitals.ep)/tonumber(gmcp.Char.Vitals.maxep))*100)

       local pwp = math.floor((tonumber(gmcp.Char.Vitals.wp)/tonumber(gmcp.Char.Vitals.maxwp))*100)

       if php > 100 then php = 100 end

       health_gauge:setValue(php,100)

       if pmp > 100 then pmp = 100 end

       mana_gauge:setValue(pmp,100)

      if pegp > 100 then pegp = 100 end

      ego_gauge:setValue(pegp,100)

       if pep > 100 then pep = 100 end

       endurance_gauge:setValue(pep,100)

       if pwp > 100 then pwp = 100 end

       willpower_gauge:setValue(pwp,100)

    end

    [/spoiler]

    image
  • edited December 2014
    So, I made this handy dandy alias for gusting people last night. It requires vadi's namedb. To use it, you can do:

    gust - gusts whoever is set as 'target', checks roomexits and picks the 2nd one
    gust <person> - gusts whoever, direction is decided as above
    gust <direction> - gusts target in chosen direction
    gust <person> <direction> - obvious.
    gust <direction> <person> - also obvious.

    Alias: ^gust$|^gust (\w+)$|^gust (\w+) (\w+)$

    Code:

    [spoiler]
    p, li { white-space: pre-wrap; }

    local currentRoomExits = getRoomExits(mmp.currentroom)

    local gustDirection = "none"

    local gustTarget = "none"


    local directions = {

    "north",

    "south",

    "west",

    "east",

    "northwest",

    "northeast",

    "southwest",

    "southeast",

    "up",

    "down",

    "in",

    "out"

    }


    local short_dir = {

    n = "north",

    s = "south",

    w = "west",

    e = "east",

    nw = "northwest",

    ne = "northeast",

    sw = "southwest",

    se = "southeast",

    u = "up",

    d = "down",

    i = "in",

    o = "out"

    }


    if not matches[2] then

    gustTarget = target

    for k,v in pairs(currentRoomExits) do

    gustDirection = k

    break

    end

    elseif matches[2] and not matches[3] then

    if short_dir[matches[2]] or directions[matches[2]] then

    gustDirection = matches[2]

    gustTarget = target

    else

    if ndb.isperson(string.title(matches[2])) then

    gustTarget = matches[2]

    for k,v in pairs(currentRoomExits) do

    gustDirection = k

    break

    end

    else

    gustTarget = target

    for k,v in pairs(currentRoomExits) do

    gustDirection = k

    break

    end

    end

    end

    else

    if short_dir[matches[2]] or directions[matches[2]] then

    gustDirection = matches[2]

    gustTarget = matches[3]

    else

    gustDirection = matches[3]

    gustTarget = matches[2]

    end

    end


    if gustTarget ~= "none" then

    mm.doadd("point gust at " .. gustTarget .. " " .. gustDirection)

    if gustRecharge then killtrigger(gustRecharge) end

    gustRecharge = tempTrigger([[A gust of wind rises to push]], [[send("recharge gust from cube")]])

    end

    [/spoiler]

    Edit: Holy mangled code. Way to go, forums.
  • ShaddusShaddus , the Leper Messiah Outside your window.
    Kaiel said:
    So, I made this handy dandy alias for gusting people last night. It requires vadi's namedb. To use it, you can do:

    gust - gusts whoever is set as 'target', checks roomexits and picks the 2nd one
    gust <person> - gusts whoever, direction is decided as above
    gust <direction> - gusts target in chosen direction
    gust <person> <direction> - obvious.
    gust <direction> <person> - also obvious.

    Alias: ^gust$|^gust (\w+)$|^gust (\w+) (\w+)$

    Code:

    [spoiler]
    p, li { white-space: pre-wrap; }

    local currentRoomExits = getRoomExits(mmp.currentroom)

    local gustDirection = "none"

    local gustTarget = "none"


    local directions = {

    "north",

    "south",

    "west",

    "east",

    "northwest",

    "northeast",

    "southwest",

    "southeast",

    "up",

    "down",

    "in",

    "out"

    }


    local short_dir = {

    n = "north",

    s = "south",

    w = "west",

    e = "east",

    nw = "northwest",

    ne = "northeast",

    sw = "southwest",

    se = "southeast",

    u = "up",

    d = "down",

    i = "in",

    o = "out"

    }


    if not matches[2] then

    gustTarget = target

    for k,v in pairs(currentRoomExits) do

    gustDirection = k

    break

    end

    elseif matches[2] and not matches[3] then

    if short_dir[matches[2]] or directions[matches[2]] then

    gustDirection = matches[2]

    gustTarget = target

    else

    if ndb.isperson(string.title(matches[2])) then

    gustTarget = matches[2]

    for k,v in pairs(currentRoomExits) do

    gustDirection = k

    break

    end

    else

    gustTarget = target

    for k,v in pairs(currentRoomExits) do

    gustDirection = k

    break

    end

    end

    end

    else

    if short_dir[matches[2]] or directions[matches[2]] then

    gustDirection = matches[2]

    gustTarget = matches[3]

    else

    gustDirection = matches[3]

    gustTarget = matches[2]

    end

    end


    if gustTarget ~= "none" then

    mm.doadd("point gust at " .. gustTarget .. " " .. gustDirection)

    if gustRecharge then killtrigger(gustRecharge) end

    gustRecharge = tempTrigger([[A gust of wind rises to push]], [[send("recharge gust from cube")]])

    end

    [/spoiler]

    Edit: Holy mangled code. Way to go, forums.
    I'm interested in this. What would it take to fix the code?
    Everiine said: The reason population is low isn't because there are too many orgs. It's because so many facets of the game are outright broken and protected by those who benefit from it being that way. An overabundance of gimmicks (including game-breaking ones), artifacts that destroy any concept of balance, blatant pay-to-win features, and an obsession with convenience that makes few things actually worthwhile all contribute to the game's sad decline.
  • Oh, it works fine! The forums just ate all of the whitespace so it's not indented and is thusly an unreadable block of madness.
  • ShaddusShaddus , the Leper Messiah Outside your window.
    It shows a bug when I paste that into my alias's code box.
    Everiine said: The reason population is low isn't because there are too many orgs. It's because so many facets of the game are outright broken and protected by those who benefit from it being that way. An overabundance of gimmicks (including game-breaking ones), artifacts that destroy any concept of balance, blatant pay-to-win features, and an obsession with convenience that makes few things actually worthwhile all contribute to the game's sad decline.
  • ShaddusShaddus , the Leper Messiah Outside your window.
    I actually had to delete the p, li { white-space: pre-wrap; } line to get this to work, but I think it works now.
    Everiine said: The reason population is low isn't because there are too many orgs. It's because so many facets of the game are outright broken and protected by those who benefit from it being that way. An overabundance of gimmicks (including game-breaking ones), artifacts that destroy any concept of balance, blatant pay-to-win features, and an obsession with convenience that makes few things actually worthwhile all contribute to the game's sad decline.
  • Er, yeah, that seems to be a bit of CSS that the forums decided to put there. Sorry about that. Not quite sure why it's there, heh.
  • SelenitySelenity My first MC to stay in Serenwilde
    edited December 2014
    So this isn't a snippet, but I just made this and am proud. It's downloadable from this link (goes to filedropper) as I don't have a github or dropbox...

    A MILESTONE CLICKER!

    For all those bards who have milestones and really want to click the names instead of typing out "play majorsixth yaddayadda".

    Cheers for @Barrin and @Cadwyn who thought MXP was needed for it, which led me to try to do it in the first place.


    Edit: Doesn't work with personal milestones, looking for a fix...
    Edit Two: Fixed! Updated the original link.
  • edited February 2015

    Know what this thread needs? More snippets.


    Here's a targetting alias. It'll tell you what you're targetting if you don't feed it an argument, and will highlight your target in obnoxious colours if you do.

    alias: ^t$|^t (.*)$

    code:
    [spoiler]
    if not matches[2] then
    cecho("<white>Current target: " .. target)
    else
    target = matches[2]

    cecho("<white>Targetting: " .. target)

    if target_lower then killTrigger(target_lower) end

    target_lower = tempTrigger(target, [[selectString("]] .. target .. [[", 1) fg("dark_orange")bg("midnight_blue") deselect() resetFormat()]])

    if target_title then killTrigger(target_title) end

    target_title = tempTrigger(target:title(), [[selectString("]] .. target:title() .. [[", 1) fg("dark_orange") bg("midnight_blue") deselect() resetFormat()]])

    end[/spoiler]


    EDIT: I...I don't understand this spoiler tag.


    Here is an old gem for which I take no credit, I forget where this thing came from. It's ridiculously simple.

    Use: #40 thing will send "thing" 40 times.


    alias: ^#(\d+) (.*)$


    code:

    for i = 1, tonumber(matches[2]) do

    send(matches[3])

    end


    And finally, here is a tiny alias that I made to make my life easier with having to quickly make and populate covens for resurgems and such. It could pretty easily be repurposed for you southern folk -peer-.


    alias: ^cv(?: )?(\w+)( .*)?$


    code:

    [spoiler]

    if matches[2] then

    if matches[3] then

    if matches[2] == "add" then

    send("mooncoven join" .. matches[3])

    else

    send("mooncoven " .. matches[2] .. matches[3])

    end

    else

    send("mooncoven " .. matches[2])

    end

    end


    use:

    cvform, cvcircle, cvappoint, cvleave, etc.


    cvadd <person> is the same as cvjoin <person>, because I kept forgetting the syntax and that seems more intuitive.[/spoiler]

  • ShaddusShaddus , the Leper Messiah Outside your window.
    Will this work for experience or only essence?
    Everiine said: The reason population is low isn't because there are too many orgs. It's because so many facets of the game are outright broken and protected by those who benefit from it being that way. An overabundance of gimmicks (including game-breaking ones), artifacts that destroy any concept of balance, blatant pay-to-win features, and an obsession with convenience that makes few things actually worthwhile all contribute to the game's sad decline.
  • TarkentonTarkenton Traitor Bear
    Believe if you change essence in gmcp.blah to nl, should work.
    image
  • DaraiusDaraius Shevat The juror's taco spot
    edited September 2015
    Well, I don't know if it would work the same way. gmcp.Char.Vitals.nl is supposedly "progress to the next level" so I'm not sure if it's a plain old number or a percentage or what. Try replacing gmcp.Char.Vitals.essence with gmcp.Char.Vitals.nl in both triggers and see what happens!


    Update! Making that substitution does work, but it prints out a number with many digits after the decimal place. You can change your cecho to something like this if you want something tidier:

    cecho(" <magenta>(+".. string.format("%0.2f", essValue) .."%)")
    I used to make cakes.

    Estarra the Eternal says, "Give Shevat the floor please."
  • DaraiusDaraius Shevat The juror's taco spot
    edited September 2015
    Here is one of very niche appeal. It makes the Continuum power quest trivially easy. This code is not super robust because it requires Acquisitio and triggers off of in-game text instead of GMCP, but it does the trick!

    You need three triggers.

    Step 1.

    Trigger type: exact match
    Trigger pattern: You suddenly scoop up the corpse of a glistening crystal.
    Code:

    if crystals == nil then

       crystals = 0

    end

    crystals = crystals + 1

    deleteLineP()

    cecho("\n<purple>You have <white>".. crystals .."<purple> crystals.")


    This simply counts your crystal corpses collected from the air above the Transphenortex Grid and shows you how many you have. When you get 44, that's all of them!



    Step 2.


    Trigger type: Perl regex

    Trigger pattern: ^"(.+)hedron(.+)"

    Code:


    send("give crystal to " .. matches[3])


    This fires when you do IH in a room with any Continuum polyhedron. It will attempt to give each one a crystal (even wonder crystals). Polyhedra will spit back anything other than crystal corpses, and if they're already charged, they won't accept further corpses.


    Step 3.


    Trigger type: Perl regex

    Trigger pattern: ^(.+) begins to glow as the corpse of a glistening crystal sinks into it

    Code:


    crystals = crystals - 1

    cecho("\n<purple>You have <white>" .. crystals .. "<purple> crystals.")


    This just counts your crystals back down to zero so you know when you've fed all the polyhedra. I'm sure a better coder than I could automate this even further by using GMCP to detect crystal corpses in your inventory and polyhedra in the room on Continuum, but this is functional enough for my purposes even if it's not the most efficient code. :\">


    P.S. The Continuum power quest generates Hallifax ikons, so it can be marginally worthwhile for influencers and psychodrama enthusiasts!

    I used to make cakes.

    Estarra the Eternal says, "Give Shevat the floor please."
  • more snippets please. i'm trying so hard to mudlet, i really am ;__;

  • This is less a script to solve an in-game problem, and more of a generic data structure for you to use... I present, the Min-Heap!

    Min-Heaps one way of creating priority queues, allowing you execute specific actions in order, given a certain priority. They're called "Min-Heaps" because the smallest number priority goes first (1 goes before 2, etc). The interface is pretty simple:

    local h = heap.new()

    heap.insert(h, action("actionName", 1, "balance", "say Hiya!"))
    local someAction = heap.extract(h) -- "actionName"

    heap.insert(h, action("action2", 2, "balance", "say Hiya!"))
    heap.insert(h, action("action1", 1, "balance", function() send("say Hello!") end))
    someAction = heap.head(h) -- "action1"

    someAction = heap.extract(h) -- "action1"
    someAction = heap.extract(h) -- "action2"

    The "action" function as shown above has 4 parameters: the action name, it's priority, whatever in-game balance it uses (balance, equilibrium, psiid, etc), and the command to be sent. The command can either be a string (good for simple, one line commands) or an anonymous function -- which is just a function without a name -- , depending on how complex your needs are.

    The heap itself has 3 main functions: insert, which will insert a new action into the queue; head, which will return the highest priority action in the queue, but not remove it; and extract, which will remove the highest priority action from the queue and return it (just in case it needs to be used later).

    http://pastebin.com/6EFTEcZY

  • UshaaraUshaara Schrödinger's Traitor
    Ooh, nice. I lost some code I had for heaps and had been deferring piecing it back together. Yoink!
  • ShaddusShaddus , the Leper Messiah Outside your window.
    Is there a place I can upload an xml for linkage here? I have a small package I like to use, with bits and pieces in it.
    Everiine said: The reason population is low isn't because there are too many orgs. It's because so many facets of the game are outright broken and protected by those who benefit from it being that way. An overabundance of gimmicks (including game-breaking ones), artifacts that destroy any concept of balance, blatant pay-to-win features, and an obsession with convenience that makes few things actually worthwhile all contribute to the game's sad decline.
  • Shaddus said:
    Is there a place I can upload an xml for linkage here? I have a small package I like to use, with bits and pieces in it.

    You can always upload your XML package to Github as a Gist. From there, if anyone wants to make improvements to your code, they can fork, change, then submit a pull request for your approval.

  • FalaeronFalaeron Jolteon
    edited April 2016
    Here are the triggers I use to calculate how much essence my figurine is worth that @Salome was asking about. Just download, import and you can get started. The only things you need to change are the things at the things at the type of the "Catch esteem" trigger. I've got comments that should guide you. Once you've done this you can just probe your figurine with some esteem in it and it'll print out something like:
    image

    https://www.dropbox.com/s/bkpl0vvkb3dq2gs/EsteemEssenceCalculator.xml.xml?dl=1

    Edit: Now that I look at it this again I realise it won't update the calculated value after you change the values. Substitute the first three lines in the "Catch esteem" trigger with:

    eec.realmEssence = 0 -- Set this to the amount of essence generated from influencing one mob in the realm
    eec.tattooWeight = 0 -- Set this to the total weight of divine tattoos (max 100)
    eec.fPoteen = true               -- Set this to false if don't have want to account for the poteen bonus

    Obviously you should still change the values to what applies to you.
  • FalaeronFalaeron Jolteon
    edited April 2016
    Here is the POLITICS FAMILIES honour tracker I use. Just install through the package manager, use the "uph" alias to toggle saving the file and then POLITICS FAMILIES (don't forget to do MORE if you don't have a large enough page length) twice. You can now enter "uph" again to toggle off saving.  You can now just use POLITICS FAMILIES as normal and it'll take you how much honour each house has gained/lost since your last update. If you want to update again you can use "uph" before checking honour (remember to toggle it off after).

    https://www.dropbox.com/s/q8v27nxz5j10mqu/FamilyPoliticsTracker.xml?dl=1

    PS. You can also use houses["Shevat"], houses["Stormcrow"], houses["d'Murani"] etc. as variables for the honour of each house since you last updated using "uph" to make fun aliases to keep track of the progress of your favourite (and least favourite) houses. I have an alias to check how much honour Shevat still needs to be officially declared the best house in Hallifax.
  • You're the best :)

    Avurekhos says, "Dylara's a PvP menace in my eyes, totes rekting face."

    The eye of Dylara materialises in your hands and flings itself around your neck, tightening incomprehensibly until it is irremovable.
    Perfectly clean, this eyeball has been wrenched from the socket of Dylara. It has been animated by some unusual force, constantly looking around itself as if in shock or fear. It is bathed in a light covering of white flames that roll endlessly over its surface. A single chain of empyreal metal pierces either side of the eye, allowing it to be worn around the neck.


  • Oh yeah, for those of you looking to use GMCP for your chat window instead of relying on capturing them with triggers, have a look at http://forums.achaea.com/discussion/3710/since-its-apparently-some-secret
  • Because that outline is kinda wonky and has some incorrect information, I compiled it for people. So, here's the GMCP chat parser (which works with Demonnic, for you people who use that.)

    https://www.dropbox.com/s/31qbex4f9eyg0aj/GMCPChat.trigger.xml?dl=0
    image
  • Bah, they're sharing the secretses.  But have they figured out maps and aethermaps showing up in the same window, precious?

  • TremulaTremula Banished Quasiroyal
    edited April 2016
    Just in case anyone wants the Gaudiguch version of @Daraius' crystal helper, I made one for fleshpots since I had some spare time. It could be a bit tidier, but the concept is almost exactly the same, but includes an alias to reset your variables since I often found myself more flesh than creatures.

    Trigger 1:

    Exact Match
    You suddenly scoop up the corpse of a formless entity.

    if entity == nil then

    entity = 0

    end

    entity = entity + 1



    cecho("\n<blaze_orange>You have <white>".. entity .."<blaze_orange> entities.")


    Trigger 2:


    Exact Match


    You suddenly scoop up a congealed wad of flesh.

    You pick up a congealed wad of flesh.

    A screeching morrible thrusts a congealed wad of flesh back into your hands.


    if flesh == nil then

    flesh = 0

    end

    if entity > 0 then

    entity = entity - 1

    end

    flesh = flesh +1


    cecho("\n<blaze_orange>You have <white>".. entity.."<blaze_orange> entities.")

    cecho("\n<blaze_orange>You have <gold>".. flesh .."<blaze_orange> globs of flesh.")


    Trigger 3:


    Exact Match


    You give a congealed wad of flesh to a squirming sludgeworm.

    You give a congealed wad of flesh to a floating spix.

    You give a congealed wad of flesh to a tangled hekoskeri.

    You give a congealed wad of flesh to a screeching morrible.

    You give a congealed wad of flesh to a bulbous ribbachi.


    flesh = flesh - 1

    cecho("\n<blaze_orange>You have <gold>" .. flesh .. "<blaze_orange> flesh.")


    Trigger 4:


    Perl Regex


    ^"morrible(.+)"

    ^"spix(.+)"

    ^"sludgeworm(.+)"

    ^"ribbachi(.+)"

    ^"hekoskeri(.+)"


    send("give flesh to " .. matches[2])

    send("take flesh")


    Alias:


    Pattern

    ^alldone$


    flesh = 0

    entity = 0

    cecho("\n<blaze_orange>You're all done with this! Variables reset!")




    This runs just like his, IH will give flesh to appropriate creatures, pick it up as necessary, and count it for you. Hope it helps. 

                          * * * WRACK AND ROLL AND DEATH AND PAIN * * *
                                         * * * LET'S FEEL THE FEAR OF DEATH AGAIN * * *
              * * * WE'LL KILL AND SLAUGHTER, EAT THE SLAIN * * *
      * * * IN RAVAGING WE'LL ENTERTAIN * * *

    Ixion tells you, "// I don't think anyone else had a clue, amazing form."
  • TarkentonTarkenton Traitor Bear
    edited May 2016
    Little thing for Mudlet to highlight says in emotes. Change the highlight color to whatever it is you want it to be in the trigger.
    Edit: It captures things between quotes a little too nicely. Screw it. If anyone wants to improve it to only go off of emotes, feel free.
    image
Sign In or Register to comment.