CLIENT: Dump of mudlet related things for y'all

The place with help files for new players, weapon and equipment stats and other pertinent information for players of all levels and experience.
Dorien
Posts: 4
Joined: Mon Jan 24, 2022 12:12 am

Re: Dump of mudlet related things for y'all

Post by Dorien » Mon Feb 14, 2022 4:21 am

Thanks for all your work Adael - I spent a good amount of time working out what has been going on and how to update it to do what I want (e.g., my status bar is now very different from yours!).

Regarding rents - thanks also for those scripts. I've done another alias you may find useful - it's a summary list of items in rents and a lot easier to read (imo). It's based entirely on yours, just with a lot of information removed.

Below is an example

Code: Select all

(rents): Items in rents for Dorien.
Maradon - 1                    a crystal lightstick                          54g 15c
Maradon - 2                    a thin vial of yellow fluid                   36g 10c
Maradon - 3                    a thin vial of yellow fluid                   36g 10c
Maradon - 4                    a thin vial of yellow fluid                   36g 10c
Maradon - 5                    a thin vial of yellow fluid                   36g 10c
Maradon - 6                    a blackened steel kris                        9g 8c
Maradon - 7                    a set of steel sai                            0c
Maradon - 8                    a dull black shield                           1g 1c
Twisted Forestlands - 1        a crystal lightstick                          54g 15c
Twisted Forestlands - 2        a crystal lightstick                          54g 15c
Twisted Forestlands - 3        a blackened steel kris                        91g 5c
Twisted Forestlands - 4        a thin vial of yellow fluid                   36g 10c
Twisted Forestlands - 5        a thin vial of yellow fluid                   36g 10c
Twisted Forestlands - 6        a thin vial of yellow fluid                   36g 10c
Twisted Forestlands - 7        a thin vial of yellow fluid                   36g 10c
Twisted Forestlands - 8        a thin vial of yellow fluid                   36g 10c
Twisted Forestlands - 9        a thin vial of yellow fluid                   36g 10c

My command is 'listrentitems' as that matches my general syntax (e.g., start with 'list' for lists). If you don't pass an argument, it provides items for the current character.

Code: Select all

pattern: (^listrentitems$)|(^listrentitems (.+)$)

local name
if matches[3] then
  name = matches[4]
else
  name = rents.name
end

if name == nil or name == "" then
  rents:echo("Character name not set.\n", true)
  return
else
  rents:echo("<b>Items in rents for "..name..".<reset>\n", false)
end

local rents_db = db:get_database("rents")

local storage = db:fetch(rents_db.storage, db:like(rents_db.storage.name,name))

if table.is_empty(storage) then
  rents:echo("No items for the character \""..name.."\" found in the rent database.\n",true)
else
  local currentZone = ""
  local prevZone = ""
  local itemNum
  for _, item in pairs(storage) do
    currentZone = item.zone
    if currentZone ~= prevZone then
      itemNum = tonumber(1)
    else
      itemNum = itemNum + 1
    end
    local msg = string.format("%-30s <ansi_cyan>%-45s<reset> %s\n", 
      item.zone.." - "..itemNum,
      item.item,
      string.gsub(string.gsub(string.gsub(string.gsub(
      string.gsub(string.gsub(string.gsub(item.cost, 
        " gold crowns", "g"), 
        " gold crown", "g"),
        " coppers","c"),
        " copper", "c"),
        " and", ""),
        "no rent due", "0c"),
        " rent due", "")
      )
    cechoLink(msg, function() centerview(item.room) end, "Click to center map on room.", true)
    prevZone = currentZone
  end
end
Note that some of the commands may have a ... primitive approach. For example, for the seven sets of text replacements, I used separate string.gsub commands. Similarly, the numbering is just plain incrementing until change.

Adael
Posts: 1081
Joined: Sun Mar 22, 2015 12:34 am

Re: Dump of mudlet related things for y'all

Post by Adael » Sat Feb 19, 2022 1:30 am

Very nice! I definitely went with a more verbose display for the rents :P, but I may take up your suggested changes in the future :)
Last edited by Adael on Sat Feb 19, 2022 1:31 am, edited 1 time in total.

Adael
Posts: 1081
Joined: Sun Mar 22, 2015 12:34 am

Re: Dump of mudlet related things for y'all

Post by Adael » Sat Feb 19, 2022 1:31 am

Uploaded a variety of major/minor changes/fixes to all of my files today. I'll highlight the ones that are probably most relevant here, with instructions on how to grab them.

First, "wotpack update" so the installer knows a couple new files are available.


Mapper - some minor behind the scenes updates. Also uploaded a new map file with a few updated room descriptions/doors. "wotpack install mapper" and "map update"

Comms - minor behind the scenes changes. "wotpack install communications"

Rents - minor behind the scenes changes. "wotpack install rents"

Statting - minor behind the scenes changes. "wotpack install statting"

Practice and weave trainer - minor behind the scenes changes. Fixed a small bug involving ride/swim if the race was swapped from non-trolloc to trolloc. "wotpack install practice trainer" and "wotpack install weave trainer"

Tic timer - did a rewrite of the tic timer to incorporate a few changes and make it easier to interact with (both for the status bar, and if anyone ever wanted to hook into the tic timer for other reasons). Also fixed a bug that may have been affecting the tic time for fades and channies on hungry/thirsty messages. "wotpack install tic timer" to grab the new version. You WILL have to then restart mudlet for the changes to take effect.

Status bar - did a complete rewrite of the status bar. Lot of behind the scene changes, minor fixes/changes for how it estimates hps/sps/dps/mvs/fleelag/etc. You can also more easily edit the size of the status bar/fontsize via a few aliases or right click -> unlock -> dragging to resize. "wotpack install status bar" to grab the new version. You WILL have to then restart mudlet for the changes to take effect.

I also corrected some regex patterns in the melee colors. Doesn't really affect anything, unless you were for some odd reason wanting to highlight frags/extremely hard/very hard/hard/hit/barely hit/tickle/barely tickle different from each other. "wotpack install melee colors triggers" if you want them.

As always, let me know if you have any questions or encounter any issues/problems/bugs with things via forum mail, replies here, or discord. Cheers! :)

Adael
Posts: 1081
Joined: Sun Mar 22, 2015 12:34 am

Re: Dump of mudlet related things for y'all

Post by Adael » Mon Feb 21, 2022 5:10 pm

Fixed a small bug in the status bar when "bleeding" messages were seen, and the status bar not saving the width/height/fontsize when mudlet is closed.

"wotpack install status bar" to fix things.

Adael
Posts: 1081
Joined: Sun Mar 22, 2015 12:34 am

Re: Dump of mudlet related things for y'all

Post by Adael » Tue Feb 22, 2022 12:20 am

Fixed another nasty bug in the mapper that would completely lag out mudlet if it lost your position in the dark. "wotpack install mapper" to grab the fix, sorry about that guys :(. Would appreciate word being spread around in case people don't check this forum thread that often.

Adael
Posts: 1081
Joined: Sun Mar 22, 2015 12:34 am

Re: Dump of mudlet related things for y'all

Post by Adael » Tue Feb 22, 2022 5:54 pm

Adael wrote:
Tue Feb 22, 2022 12:20 am
Fixed another nasty bug in the mapper that would completely lag out mudlet if it lost your position in the dark. "wotpack install mapper" to grab the fix, sorry about that guys :(. Would appreciate word being spread around in case people don't check this forum thread that often.
Just bumping this again from last night.

Also:

Fixed a trigger that was making the rents script not capture character names from the "score" command properly for some folks. "wotpack install rents" for the new version.

Fixed a bug in the statting triggers that was capturing the wrong thing for level determination, making some stuff error out. "wotpack install statting" for the new version.

Adael
Posts: 1081
Joined: Sun Mar 22, 2015 12:34 am

Re: Dump of mudlet related things for y'all

Post by Adael » Fri Feb 25, 2022 2:10 pm

Fixed a bug in the rents scripts where a rent wouldn't be cleared from the database (so that it could then be repopulated) if it was the first one checked after logging in.
Also slightly altered how items are displayed, thanks to Dorien and Draz's suggestions. "wotpack install rents" to grab the new version.

Also updated my map file to remove the s exit from 1d commy, "map update" to grab it. Cheers! :)

Adael
Posts: 1081
Joined: Sun Mar 22, 2015 12:34 am

Re: Dump of mudlet related things for y'all

Post by Adael » Mon Mar 07, 2022 9:38 pm

Updated the allowable values for room environments in my map scripts to include a few more different types. For reference, here they are with the default colors:

Code: Select all

  city = "brown",
  herb = "yellow",
  tailor = "magenta",
  nochannel = "gray",
  portalstone = "gray",
  trees = "lawn_green",
  smob = "firebrick",
  herbalist = "yellow"
"herb" denotes herb loads on the ground, "herbalist" are herb shops.
You can alter colors as always with "map color herb pink", "map color smobs orange", "map color trees green", etc, though you may need to restart mudlet after updating the scripts to be able to use the new environment types.
I've added all the ground herb loads, herbalist, and tailor shops that I know of. I've added a few nochannels and portalstones, but need to go around and get the rest. "trees" mostly denotes ancient loads, but I have included (and can slowly add more) shiv loads as well for DS. Any smobs that I know of/remembered are marked, though I may be missing some. Please feel free to post here, forum mail me, or discord message me any rooms whose environment types you think should be changed on my map (you can change them yourself with, for example "cre herbalist", "cre tailor", etc, but just for long term maintainability so you don't lose that if I update my map and you want to use my new version).
I've also added the ability to disable the double click speedwalk, as some users find it to be finicky. "map speedwalk" will enable/disable that functionality.

"wotpack install mapper" for the new version of everything.

I also updated my map file with the small changes to Tarendrelle entrance, and the larger changes to darkhounds zone. Thanks to Feneon for telling me about the changes and letting me map them. "map update" to grab the new version, which includes the new room environment colors listed above.

Let me know as always if you have questions/comments, cheers! :)

Adael
Posts: 1081
Joined: Sun Mar 22, 2015 12:34 am

Re: Dump of mudlet related things for y'all

Post by Adael » Fri Apr 22, 2022 12:56 am

Updated my map scripts with some behind the scenes cleanup, and some added functionality to edge cases if you happen to be running around lost in the dark/blind/fog (courtesy of a suggestion from Enoch).
As an additional added bonus, those of you who frequent the Ways should find a small quality of life update when entering them.

"wotpack install mapper" to grab the new versions. I don't -think- there's any bugs left (I tried to do as much testing as I could to make sure I didn't break anything with the cleanup), but PLEASE do let me know if you encounter any bugs by either posting here, forum messaging me, discord messaging me, or posting in the mudclient helpdesk channel and tagging me.

I also updated my map file with some missing rooms, courtesy of a few folk. "map update" to grab the new version.


Added a fix to the rents script to clear out a room if the innkeeper tells you you have nothing stored there, courtesy of Espen. I may be missing some triggers though, so let me know if you think this isn't working properly.
"wotpack install rents" to get the new version.


Lastly, I made some MAJOR adjustments to the tic timer. There's a bug in mudlet timers apparently (which I only discovered recently) that has the very unfortunate side affect of making the old tic timer start to be drastically off after a few tics. The updated version should work better. I may do a bit more cleanup in the future so its error messages aren't as spammy when there's a laggy tic, but for the most part I think it's a good improvement.
To be brief, it implements some checks that also use known aggro pulse events to keep the timer more in line. There's a couple new features in it as well, such as being able to use mob stands to keep the tic timer in sync. You can type "tic timer help" to get some of the new aliases, with short explanations. Feel free to post here if you have any questions, I don't quite have the brainpower to provide more details tonight :P
"wotpack install tic timer" and "wotpack install status bar timers" (if you use the status bar for a visual of the timer) to update. You -may- have to restart mudlet afterwards for some variables to get cleaned up.

As always, please feel free to message, post, pm, or otherwise get ahold of me with questions/bugs/comments/concerns. Cheers! :)

Adael
Posts: 1081
Joined: Sun Mar 22, 2015 12:34 am

Re: Dump of mudlet related things for y'all

Post by Adael » Sun Apr 24, 2022 1:46 pm

Fixed a bug in the communications script for rat/raven/crow reports, and added a couple triggers I was missing.

"wotpack install communications" for anyone who uses those.

Post Reply