local t = multimatches for i=1, #t do local out = {} local n = t[i] moveCursorEnd() moveCursor(0, getLineNumber() - (#t - i)) if #n > 1 then for j=2, #n do local v = 1 while selectString( n[j], v ) ~= -1 do table.insert( out, { selectString(n[j], v), #n[j] } ) v = v + 1 end end end for i=1, #out do local p = out[i] local pos = p[1] local len = p[2] selectSection(pos, len) -- potentially use a lookup table for specific positions here fg('green') deselect() end end
Comments
Uses: Allows matches of partial targets. Target "Aust" would work in the following:
Austere stands up.
Svof
Mudlet Discord join up
Svof
Mudlet Discord join up
It can't completely avoid false positives(Hi, Antidas and Antonius), but it can avoid things like "Nazihk" and "Aziik".
- Use SVO?
- Hate the gem/veil changes?
- Got a chameleon tattoo?
If you want to, you can trigger the cham fading line afterwards to do:as well.
What's it do? Simple. It fetches a list of names from ndb's database, from everyone you currently have tracked (noticed 0 lag whatsoever when I ran this, for reference. No worries there!), then touches your chameleon tattoo to a random name from that list.
If you call this over and over again before 5s, the timer will never fire. If you don't call it within 5s, it'll fire.
Svof
Mudlet Discord join up
All credit goes to Tysandr who wrote this in Imperian.
This is how I get the room id and area and store it within my own system and blink the rooms.
Requirements: a table that contains the words to be excluded
Code:
Output:
A couple of simple functions to pad a string with spaces so it matches a set length, truncating when the original string exceeds the specified length:
Results of disembowel testing | Knight limb counter | GMCP AB files
Example:
Svof
Mudlet Discord join up
Quality of life lua printf like, when string.format is too much to type every time
matching stuff for Charstats
Can be used as a base for any of the charstats things although for monks stances/forms or other things with strings you'd have to use a different match (should be able to use "%w+: (%w+)" or something similar, there's a bunch of ways to match
and then a function that simply returns true if I'm in a party and false if I'm not for reporting purposes:
Dunn tells you, "I hate you."
(Party): You say, "Bad plan coming right up."
Svof
Mudlet Discord join up
Would be very good for this thread.
Turns the "1" in gmcp into a true/false boolean. You can apply this trick elsewhere to set the variable without a long if.
Svof
Mudlet Discord join up
Results of disembowel testing | Knight limb counter | GMCP AB files
GMCP documentation: https://github.com/keneanung/GMCPAdditions
svof github site: https://github.com/svof/svof and documentation at https://svof.github.io/svof
It accepts colour arguments, etc, just the same as a cecho, just a quick shorthand thing. Example usage:
regex trigger: ^You rip the air from the lungs of (\w+) in a single instant\, blood and mucus dripping from h(?:is|er) mouth as (?:|s)he doubles over with hacking coughs\.$
re: booleans - yes, but I find it helpful to be explicit in these things, esp. easier for beginners to read code.
Svof
Mudlet Discord join up
Purpose: Delete multiple lines below the trigger, up to the prompt.
Requirements: Know how many lines you want to delete. Uses global variable.
Code:
Insert into ordered table t all the elements from ordered table nt.
Results of disembowel testing | Knight limb counter | GMCP AB files
Results of disembowel testing | Knight limb counter | GMCP AB files
Svof
Mudlet Discord join up
A nicer looking qwho
Note, it requires knowledge of RGB values, which you can easily look up >>here<<.
Simply edit the script to add your colour, along the lines of
Then save script, and you'll be able to use 'myColour' in your code!
This also overrides the normal 'showColors()' function that's build into mudlet, with a much cleaner-looking layout, as seen below. You can use 'colours <num>' to show this, don't have to use lua like I did in the demonstration. I wouldn't recommend using a number greater than 5.