For all of you terrible people who like rainbow crits. I decided to make one out of pure boredom (and summarily delete it >.>)
Trigger - Perl Regex ^You have scored (a|an) (.+)!$
Code:
local X local L = "" local C = {"red", "orange", "yellow", "green", "blue", "purple", "pink", "cyan",} for token in matches[1]:gmatch("[^+]") do X = math.random(1, #C) L = L.."<"..col[X]..">"..token end deleteLine() cecho("\n"..L)
For all of you terrible people who like rainbow crits. I decided to make one out of pure boredom (and summarily delete it >.>)
Trigger - Perl Regex ^You have scored (a|an) (.+)!$
Code:
local X local L = "" local C = {"red", "orange", "yellow", "green", "blue", "purple", "pink", "cyan",} for token in matches[1]:gmatch("[^+]") do X = math.random(1, #C) L = L.."<"..col[X]..">"..token end deleteLine() cecho("\n"..L)
Add any colour you want to the C table.
Going to change this to be more friendly to mine and Cyndarin's colourblindness and then add it to my crit counter. Thank you very much!
{"|c2A2A54","|c54547E","|c7E7EA8","|cA87EA8","|cD2A8A8","|cD2A8A8","|cD2A8A8","|cA87EA8","|c7E7EA8","|c547EA8","|c7E7EA8","|c54547E"}, -- dawn
{"|cD22A2A","|cD2542A","|cD27E2A","|cD28C2A","|cD28C00","|cD2A800","|cD2C000","|cD2D200","|cD2C000","|cD2A800","|cD28C00","|cD28C2A","|cD27E2A","|cD2542A"}, -- fire
{"|c00C4EE","|c1CC4EE","|c38C4EE","|c54C4EE","|c54A8EE","|c70A8EE","|c708CEE","|c548CEE","|c388CEE","|c1C8CEE","|c1CA8EE","|c00A8EE"}, -- water
{"|c7E00D2","|c7E00BD","|c7E00A8","|c7E0093","|c7E007E","|c7E2A7E","|c7E447E","|c7E547E","|c7E5493","|c7E54A8","|c7E54BD","|c7E54D2","|c7E44D2","|c7E2AD2"}, -- this tastes like purple
}
Just replace the colour table in my original script with that.
This was originally some code for the towers of Hanoi type puzzles, but I edited this to delete the original post, as another recent post was deleted for showing a quest solution. Just figured I would do the same here.
Download a file & read it, updated this last night. The example is for Mudlet 3.0 previews because it uses an https:// link, but it'll work the same in 2.1 with an http:// link.
-- create a function to parse the downloaded webpage and display a result
function downloaded_file(_, filename)
-- is the file that downloaded ours?
if not filename:find("lusternia-who-count.html", 1, true) then return end
-- read the contents of the webpage in
local f, s, webpage = io.open(filename)
if f then webpage = f:read("*a"); io.close(f) end
-- delete the file on disk, don't clutter
os.remove(filename)
-- parse our downloaded file for the player count
local pc = webpage:match([[Total: (%d+) players online]])
display("Lusternia has "..tostring(pc).." players on right now.")
end
-- register our function to run on the event that something was downloaded
registerAnonymousEventHandler("sysDownloadDone", "downloaded_file")
-- download a list of fake users for a demo
downloadFile(getMudletHomeDir().."/lusternia-who-count.html", "https://www.lusternia.com/game/who")
Here comes the Slacker Tracker. I basically just threw stuff together since I am lazy.
Thanks go to @Aeldra who suggested using os.time() (instead of fumbling around with stopwatch), this page for the ASCII and this guy for the conversion.
First, you need to trigger
starttime = os.time()
on your login line.
Then you set a counter with the desired interval and this code:
"Oh yeah, you're a naughty mayor, aren't you? Misfile that Form MA631-D. Comptroller Shevat's got a nice gemstone disc for you, but yer gonna have to beg for it."
It could be that the timer is one or two minutes behind sometimes. Have not discovered why yet. Maybe, it gets confused by lag (my internet connection has been pretty bad lately).
It could be that the timer is one or two minutes behind sometimes. Have not discovered why yet. Maybe, it gets confused by lag (my internet connection has been pretty bad lately).
Think it's an issue with the way mudlet calculates timestamp differences, more than anything. Happens with MMF sometimes, too, where it says you took like 60 seconds to recover balance, because the minute/hour/day rolled over.
Kind of Gaudi specific and in the format of a clhelp scroll, but it's easily adaptable for other portal chamber'y or transplanar'y things. Let me know if you'd like help!
edit: Originally, I didn't provide any means of removing rooms that don't allow for use of the belt, or locking off entire areas. I've updated that now.
Here's an easy way to make use of your Belt of the Enlightened with GMCP, Mudlet's Mapper, and the IRE Mapping Script in under 5 minutes. First, we'll map the chamber and second, we'll create the script. Once you're up and running, the mapper will begin to check all rooms to see if they're outdoors, and if so remember them as a location where you can use your belt. If you've not yet enabled GMCP, it can be turned on by clicking 'Settings' and selecting 'Enable GMCP' on the first screen, second from the bottom.
First, touch your belt to teleport to the chamber. To map the room, enter the following commands in order from Mudlet's main command line:
mc on<br>rlc v19627 0 0 0<br>area add Limbo<br>room area Limbo<br>rlk 19343 se one<br>rlk 19514 nw one<br>rlk 19222 up one<br>rlk 19666 sw one<br>rlk 19527 ne one<br>rlk 11401 down one<br>rlk 19693 north one<br>mc off
Second, we setup the script! We'll create a script group, I called mine 'MapHax'. I didn't place it inside of 'mudlet-mapper' to avoid any issues when the IRE Mapping Script updates. Open up a plain text editor (Notepad, Gedit, etc.) and save a blank file inside your mudlet home directory called 'maphax'. If you don't know where your mudlet home directory is, from the command line run 'lua echo(getMudletHomeDir())'. Inside the group, paste the following script:
maphaxloc = getMudletHomeDir().. "/maphax"<br>maphax = maphax or {beltlocked = {}}<br><br>function MapHax()<br> loadMapHax()<br>end<br><br>function loadMapHax()<br> if io.exists(maphaxloc) then table.load(maphaxloc, maphax) end<br>end<br><br>function saveMapHax()<br> if io.exists(maphaxloc) then table.save(maphaxloc, maphax) end<br>end
Inside that group, we'll create a script item called 'The Belt of the Enlightened'. In the body of the script, copy and paste the following:
registerAnonymousEventHandler("gmcp.Room.Info", "checkBelt")
function checkBelt()
local area = gmcp.Room.Info.area
local outdoors = gmcp.Room.Info.details[2]
if not table.contains(maphax.beltlocked, area) and outdoors == "outdoors" then
local num = gmcp.Room.Info.num
if not table.contains(getSpecialExits(num), "TOUCH ENLIGHTENED") then
addSpecialExit(num, 19627, "TOUCH ENLIGHTENED")
echo("\n(Map Hax): Added use of the Golden Belt of the Enlightened from v".. num..".")
end
end
end
function beltLock(num, area)
if not table.contains(maphax.beltlocked) then
table.insert(maphax.beltlocked, area)
echo("\n(MapHax): Can't use the Golden Belt of the Enlightened, locking the area.")
end
for k, v in pairs(getAreaRooms(getRoomArea(num))) do
if table.contains(getSpecialExits(v), "TOUCH ENLIGHTENED") then
removeSpecialExit(v, "TOUCH ENLIGHTENED")
end
end
end
I wrote a thingie. It can be used in place of ansi2decho() for coloring things from gmcp comms, except it also highlights peoples names using their NDB colors
function ansindb(text)
local text = ansi2decho(text)
color = string.match(text,"^<?r?>?<%d+,%d+,%d+:%d-,?%d-,?%d->")
local background = color:match(":.->") or ":>"
local highlighted = {}
for _, name in pairs(ndb.findnames(text)or {}) do
if not table.contains(highlighted,name) then
if ndb.getcolor(name)~="" then
text = text:gsub(name,string.format("<r><%d,%d,%d",unpack(color_table[string.sub(ndb.getcolor(name),2,-2)]))..background..name..color)
I wrote a thingie. It can be used in place of ansi2decho() for coloring things from gmcp comms, except it also highlights peoples names using their NDB colors
function ansindb(text)
local text = ansi2decho(text)
color = string.match(text,"^<?r?>?<%d+,%d+,%d+:%d-,?%d-,?%d->")
local background = color:match(":.->") or ":>"
local highlighted = {}
for _, name in pairs(ndb.findnames(text)or {}) do
if not table.contains(highlighted,name) then
text = text:gsub(name,string.format("<r><%d,%d,%d",unpack(color_table[string.sub(ndb.getcolor(name),2,-2)]))..background..name..color)
table.insert(highlighted,name)
end
end
return text
end
Ooo, thanks. Now to see if I can get it to work with the chat box in Reys GUI.
Moderator Note: I have deleted the post that gave a coding-based solution to quest mazes. It is fine to post hints regarding quests on the forums, but we prefer people to not post full solutions - this script falls into the latter category.
Moderator Note: I have deleted the post that gave a coding-based solution to quest mazes. It is fine to post hints regarding quests on the forums, but we prefer people to not post full solutions - this script falls into the latter category.
Administrator Note: This will also be fixed in the next game patch.
updateAddPlayer = function ()
if ndb.isglom(gmcp.Room.AddPlayer.name) then
send("infect " .. gmcp.Room.AddPlayer.name)
end
end
registerAnonymousEventHandler("gmcp.Room.AddPlayer", "updateAddPlayer")
Mostly for fighting fire with fire. Just put this in a script.
Simple script that just echos when you're running low on certain things. Easy enough to add more things to look for, as long as you have the name for it used by gmcp.IRE.Rift
There's also the room marks system for the mudlet mapper, which lets you associate a string with a room and use the string to walk to it. ROOM MARK <room number> <mark name> to create a mark ROOM MARKS to list the marks ROOM UNMARK <mark name> to delete a mark. GOTO <MARK NAME> [sprint|glide|etc] to go to a mark, the same way you'd path to an area or room number.
Mudlet Lua script for searching back multiple weaves of a log.
Currently does not do ('more'), on its own, so assuming either results are within pagelength or you do 'more' automatically.
Edit: updated with suggestion from @Aeldra to suppress the big string of ';' separated commands with false flag. Thanks!
-- ex. search back in org log for mentions or notes by Barrin back 12 weaves to today, inclusive<br>searchlog serenwilde 12 barrin<br>-- ex. search back in power for fae gathered (because First of the Crones, First of the Maidens, etc.)
searchlog power first
-- Alias name: searchlog
-- Pattern: ^searchlog (\w+)\s?(\d+)? (\w+)$<br><p>local searchLog
local backTo
local searchString = matches[4]
local query
if matches[2] == "power" or matches[2] == "powerlog" then
searchLog = "powerlog"
else
searchLog = "readlog "..matches[2]
end
if matches[3] == "" then
backTo = 30
else
backTo = matches[3]
end
query = searchLog.." 0 "..backTo.." "..searchString
backTo = backTo - 1
local i
for i = backTo,0,-1 do
query = query.."; "..searchLog.." 0 "..i.." "..searchString
end
send("config pagelength 250")
send(query, false) -- flag false to <span>suppress the big string of ';' separated commands</span>
send("config pagelength 30") -- or back to your usual pagelength, check with CONFIG<br></p>
If anyone else is still using the old M&MF influencing thing, and is curious to know which denizens in the room you've influenced already, try putting this in a script/alias/trigger/whatever:
function checkInfluenced(bool)
local long = bool or false
for k, v in pairs(mmi.roomnpcs) do
if v.influencable and v.influenced then
if long then cecho("<PaleGreen>"..v.longname.."\n") else cecho("<PaleGreen>X") end
elseif v.influencable and not v.influenced then
if long then cecho("<antique_white>"..v.longname.."\n") else cecho("<antique_white>.") end
end
end
end
In this quick little example I clumsily hacked together, you can choose whether you want to see the names of the denizens in the room by passing in "true" - false, or just nothing, will give you the short version.
Comments
Trigger - Perl Regex
^You have scored (a|an) (.+)!$
Code:
local L = ""
local C = {"red", "orange", "yellow", "green", "blue", "purple", "pink", "cyan",}
for token in matches[1]:gmatch("[^+]") do
X = math.random(1, #C)
L = L.."<"..col[X]..">"..token
end
deleteLine()
cecho("\n"..L)
Discord: Rey#1460
Ixion tells you, "// I don't think anyone else had a clue, amazing form."
Behold: https://ada-young.appspot.com/pastebin/0zBRjenF
Make a script:
Then you can call it using:
rainbow("Blah blah blah", 1)
1 is for rainbow, 2 is for dawn.
Ixion tells you, "// I don't think anyone else had a clue, amazing form."
Ixion tells you, "// I don't think anyone else had a clue, amazing form."
I have a problem.
Ixion tells you, "// I don't think anyone else had a clue, amazing form."
{"|cD22A2A","|cD2542A","|cD27E2A","|cD2A800","|cD2D200","|cA8D200","|cA8A800","|cA8A82A","|c7EA82A","|c54A82A","|c2AA82A","|c2A7E2A","|c2A7E54","|c007E54","|c007E7E","|c007EA8","|c0054A8","|c00547E","|c002A7E","|c2A2A7E","|c542A7E","|c7E2A7E"}, -- rainbow
{"|c2A2A54","|c54547E","|c7E7EA8","|cA87EA8","|cD2A8A8","|cD2A8A8","|cD2A8A8","|cA87EA8","|c7E7EA8","|c547EA8","|c7E7EA8","|c54547E"}, -- dawn
{"|cD22A2A","|cD2542A","|cD27E2A","|cD28C2A","|cD28C00","|cD2A800","|cD2C000","|cD2D200","|cD2C000","|cD2A800","|cD28C00","|cD28C2A","|cD27E2A","|cD2542A"}, -- fire
{"|c00C4EE","|c1CC4EE","|c38C4EE","|c54C4EE","|c54A8EE","|c70A8EE","|c708CEE","|c548CEE","|c388CEE","|c1C8CEE","|c1CA8EE","|c00A8EE"}, -- water
{"|c00A000","|c00B000","|c00C000","|c00D000","|c20D000","|c40D000","|c60D000","|c80D000","|c80C000","|c80B000","|c60B000","|c40B000","|c40A000","|c20A000"}, -- forest
{"|c7E00D2","|c7E00BD","|c7E00A8","|c7E0093","|c7E007E","|c7E2A7E","|c7E447E","|c7E547E","|c7E5493","|c7E54A8","|c7E54BD","|c7E54D2","|c7E44D2","|c7E2AD2"}, -- this tastes like purple
}
Just replace the colour table in my original script with that.currZone = CurrZone or {}
currArea = currArea or ""
currZone.check = function(event)
if event == "gmcp.Room.Info" then
if currArea ~= gmcp.Room.Info.area then
currArea = gmcp.Room.Info.area
cecho("<black:orange>****** CURRENT AREA IS NOW "..currArea.." ******\n")
end
end
end
registerAnonymousEventHandler("gmcp.Room.Info", "currZone.check")
Thanks go to @Aeldra who suggested using os.time() (instead of fumbling around with stopwatch), this page for the ASCII and this guy for the conversion.
First, you need to trigger on your login line.
Then you set a counter with the desired interval and this code:
It could be that the timer is one or two minutes behind sometimes. Have not discovered why yet. Maybe, it gets confused by lag (my internet connection has been pretty bad lately).
Discord: Rey#1460
Perl Regex Pattern:
S?[Hh]e is a\s.+[.?!]{1}\s(S?[Hh]e) is wearing.+\.$
Code:
replaceWildcard(2, "\n".. matches[2])
Output:
edit: I was unsure if you could end a description with any terminal punctuation, so that's why the special character class of [.?!]
edit: Originally, I didn't provide any means of removing rooms that don't allow for use of the belt, or locking off entire areas. I've updated that now.
Inside that group, we'll create a script item called 'The Belt of the Enlightened'. In the body of the script, copy and paste the following:
function ansindb(text)
Mostly for fighting fire with fire. Just put this in a script.
</code><pre class="CodeBlock"><code><code>local warningThings={<br>
healing=true,<br>
bromides=true,<br>
mana=true,<br>
dust=true,<br>
restorativeice=true,<br>
steam=true,<br>
sparkleberry=true,<br>
}<br>
local threshold = 100<br>
function riftWarning()<br>
if warningThings[gmcp.IRE.Rift.Change.name] and tonumber(gmcp.IRE.Rift.Change.amount)<threshold then<br>
cecho("<red>"..gmcp.IRE.Rift.Change.amount.." "..gmcp.IRE.Rift.Change.name.." left!")<br>
end<br>
end<br>
registerAnonymousEventHandler("gmcp.IRE.Rift.Change","riftWarning")
Simple script that just echos when you're running low on certain things. Easy enough to add more things to look for, as long as you have the name for it used by gmcp.IRE.Rift
-----------------------------------------------------------------------------
SETALIAS FNDCHEFMARKET PATH TRACK 421
SETALIAS FNDHLLFRAE PATH TRACK 13725
SETALIAS FNDHSTABLE PATH TRACK 19924
SETALIAS FNDADALGS PATH TRACK 25391 [the composer, for bard empowerment]
SETALIAS FNDVFLAME PATH TRACK 19526
SETALIAS FNDETHERFREST PATH TRACK 4932 || enter archway [etherseren entrance from maeve's court]
SETALIAS FNDTRKA PATH TRACK 344
SETALIAS FNDDELL PATH TRACK 7526 [caominhe dell]
SETALIAS FNDBARNA PATH TRACK 542
SETALIAS FNDKUL PATH TRACK 310
SETALIAS FNDTLBRLLA PATH TRACK 9529
SETALIAS FND3JUNCTN PATH TRACK 294
SETALIAS FNDRSADRL PATH TRACK 510
SETALIAS FNDLRED PATH TRACK v6360
SETALIAS FNDPHLSH PATH TRACK 478
SETALIAS FNDAURRE PATH TRACK 446
SETALIAS FNDYRCH PATH TRACK 413
SETALIAS FNDLWLANDS PATH TRACK 2592 [plex....something lowlands. up in the mountains]
SETALIAS FNDJRC PATH TRACK 391
SETALIAS FNDCAFAN PATH TRACK 352
SETALIAS FNDAELCH PATH TRACK 363
SETALIAS FNDTHEARCHWAY PATH TRACK 19626 [Air plane archway to ethereal plane]
SETALIAS FNDTHEMATRX PATH TRACK 19765 [for hallifaxians: air plane matrix]
SETALIAS FNDLARS PATH TRACK 18971
SETALIAS FNDRC PATH TRACK 1756 [roc caverns]
SETALIAS FNDCAY PATH TRACK 20693 [cay of clodashi.]
SETALIAS FNDSNWVALLEY PATH TRACK 2106
SETALIAS FNDASYLUM PATH TRACK 2072 [Ixii'a asylum]
SETALIAS FNDPERRE PATH TRACK 2622 [Pierre: lydia windwhispers BF]
SETALIAS FNDZAKA PATH TRACK 2665 [Mt Zoaka entrance]
SETALIAS FNDSHALLACH PATH TRACK 6258
SETALIAS FNDPRESD PATH TRACK 2076 [presidio of the damned]
SETALIAS FNDMANTCRE PATH TRACK 1909
SETALIAS FNDCAVERNS PATH TRACK 1913 [nagaradja caverns]
SETALIAS FNDBAY PATH TRACK 3125 [Bay of bondero]
SETALIAS FNDFPRTAL PATH TRACK 273
SETALIAS FNDDRAN PATH TRACK 3154 [Taerin's drain: access to undervault + crystal meadows]
SETALIAS FNDVSTAGE PATH TRACK 25391
SETALIAS FNDSCRPNCAVE PATH TRACK 15996 [desert, scorpion flies]
SETALIAS FNDWAYFARE PATH TRACK 14763
SETALIAS FNDFEYRANT PATH TRACK 2056
SETALIAS FNDCLARRAMRE PATH TRACK 16530
SETALIAS FNDLBLUE PATH TRACK v6361
SETALIAS FNDGGATE PATH TRACK 11231 [gaudiguch: to the mountains]
SETALIAS FNDCHANCEL PATH TRACK 2646 [klangatch chancel]
SETALIAS FNDGSTAIR PATH TRACK 11215 [gaudiguch: twisted stairs- to the road]
this uses lusternia's inbuilt alias system. copy & paste into the mudlet system. bookmarks useful locations on prime.
ROOM MARK <room number> <mark name> to create a mark
ROOM MARKS to list the marks
ROOM UNMARK <mark name> to delete a mark.
GOTO <MARK NAME> [sprint|glide|etc] to go to a mark, the same way you'd path to an area or room number.
Currently does not do ('more'), on its own, so assuming either results are within pagelength or you do 'more' automatically.
Edit: updated with suggestion from @Aeldra to suppress the big string of ';' separated commands with false flag. Thanks!
Avatar made through Picrew
I was planning to make something similar but now I don't have to.
In this quick little example I clumsily hacked together, you can choose whether you want to see the names of the denizens in the room by passing in "true" - false, or just nothing, will give you the short version.
Long:
Short: