[Mudlet] Code Snippets

13»

Comments

  • KlendathuKlendathu Eye of the Storm
    Or... use the tab key to autocomplete

    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."
  • Klendathu said:
    Or... use the tab key to autocomplete
    If it was this simple every single time, there wouldn't be as many complaints about it. Tab completes more than just names, after all.
    Rather the reliability of a script.
  • edited December 2018
    If you hate the spam from gilded pikes with lots of heads on them, you can cut that down with a pretty simple trigger: https://pasteboard.co/HRYN9I9.png

    That won't work with the Logosmas-themed pikes, but you can make another trigger using that appearance after you've seen one once.
  • Not technically a script, but useful for calculating trade deals: http://bit.ly/2TG834T
  • Convert gmcp.Char.Vitals.charstats into a usable Lua dictionary (a table with key/value pairs):
    function processcharstats()
    	charstats = {}
    	
    	for _, stat in ipairs(gmcp.Char.Vitals.charstats) do
    		local name = string.match(stat, "^(%a+):"):lower()
    		local value = string.match(stat, "%a+: (%w+)$")
    		value = tonumber(value) or value
    		
    		charstats[name] = value
    	end
    end
    registerAnonymousEventHandler("gmcp.Char.Vitals", "processcharstats")
    

    To use, you'd do something like:
    
    if charstats.bleed > 100 then
        -- do something because you're bleeding for more than 100
    end
    
  • Mroxyl said:
    when in the wilderness, if you survey, it gives a clickable link to head toward the exit you're picking. It wouldn't make you go faster, just be similar to walking to a landmark in the regular map
    I actually had something like this, but decided to make it look nicer than how I currently had it setup... It won't walk like landmarks where you do 'walkto' but it'll walk in a straight direction of your choosing, based on SURVEY.

    Can dash, gallop or walk, just click the way you want to move and it'll go. You can SURVEY again to stop it from moving.


Sign In or Register to comment.