Mudlet The Mud Client

1.1.0 – an overview for scripters

March 12th, 2010

The 1.1.0 release comes with a lot of goodies to play with, and this post will give you an overview of what’s new. All of the new features are adequately documented in the manual; so we won’t go into too great detail here.

Bugfixes

Quality comes first, so here is a list of all issues that were fixed in this release. If you know about a problem and it’s not listed as fixed here, let us know about it. Things fixed:

  • A crash when searching in the script editor with queries that used regex metacharacters
  • Lua errors inside event handler functions not reported to debug
  • tempRegexTrigger() works properly again
  • Scripts are deactivatable now, ie a deactivated script won’t be compiled
  • Keys not staying in their groups
  • Timer groups fire on 0ms interval and slowed down the system
  • Custom command separator doesnt save
  • Setup namespaces for mini console + lables that are restricted to the respective profile -> you can have multiple connections using a mini console called “map”.
  • crash on setBgColor() on an undefined text selection
  • newline characters are stripped from trigger patterns (copying a pattern that was wrapped to two or more lines is into a trigger pattern is fine now)
  • crash on deleting scripts with event handlers
  • crash on reconnect button if reconnect process was still under way

New Feature: ATCP

Mudlet now fully support ATCP, a data transmission protocol that is mainly used with IRE games. Working with it is quite easy – all data is stored for you in the atcp table that is updated as new data comes. The table is a key-value type, so for example atcp.RoomNum will get you the latest room id received (most likely, that of the room you’re currently in) and atcp.CharVitals will get you the character vital stats string. You can do display(atcp) to see all the information the table contains.

Triggering on new ATCP events is easy as well; whenever a new one received Mudlet raises an event with the same name that of the ATCP message (sans the connecting dot in the middle) which you can hook an event handler to call a function for you. All of this is throughly explained in the manual, and a complete set of demonstration script is provided as well to get you started right off the bat.

You can also send ATCP messages to the server with sendATCP.

Do keep in mind though that the MudBot proxy or the Vadi Multi (mb-core.exe) strip all ATCP information. So if you or your script users make use of it, contact the person who you got the proxy from for help (an update to the Vadi Multi is available that will pass through all ATCP information).

New Feature: client-side MXP

And by client-side, we mean that MXP from the server isn’t currently accepted, so don’t expect to do config mxp on or something similar and have it work ;)

At this stage, setLink, insertLink and echoLink functions were added that allow you to create clickable words. Upon clicked, the words would run the supplied code – so you can, for example, enable any item you see in a shop to be clicked on that will send a command to buy that item. Links can also have custom tooltips to show when mouse is hovering over the linkified text. One useful script that’s been possible with this is one to allow URLs in text to be clicked and opened in a browser.

In addition to links, popups are also available – setPopup, echoPopup, and insertPopup. These are similar to links in the fact that left-clicking on linkified text will do one action, but right-clicking will show a pop-up menu that allows you to choose from a selection of choices.

This is just the start of MXP and there’s more to come, but these tools already allow some very powerful utility scripts to be created – so go crazy with linkfication!

New Feature: easy database operations

Mudlet came with a sqlite library since 1.0.5, which works great but requires knowledge of database theory and SQL syntax. Stephen Hansen aka ixokai has written a whole set of db: functions that make it real easy to use a database from Mudlet.

See the tutorial section of the Mudlet manual to get started.

New Feature: Mudlet-generated events

Mudlets event system allows you to build very modular scripts (and helps interoperability with other scripts, as well). In this release, Mudlet generates some events for you – namely, ATCP message ones and a few others:

  • sysWindowResizeEvent is called when the main window is resized. Use this event to re-position your labels and miniConsoles according to the new dimensions. This is also the now preferred method to use instead of the handleWindowResize function – because the function can only be overwritten once, meaning that other scripts won’t get access to it. Hooking to an event, however, can be done multiple times and so multiple scripts can be notified of dimension changes easily.
  • sysWindowMousePressEvent is called when a mouse button is pressed down anywhere on the screen. Some nefarious uses with labels running about can now be accomplished.
  • sysWindowMouseReleaseEvent is similar to mouse press, but called when the mouse button is released.

New Feature: errors view

Mudlet now has a dedicated errors display – which shows only errors, so it is way less spammier than the debug view. Additionally, it logs all Lua errors to the log/errors.txt file inside your profile folder.

New functions

As if three large feature-sets weren’t enough, there’s still more for you with 1.1.0.

  1. Easy, colored echos: there are now cecho, decho and hecho functions to output echos with color tags in them.
  2. getOS lets you know if Mudlet is running on Windows, Linux or a Mac.
  3. openURL opens the given url in the default OS browser.
  4. showColors shows you a neat table of all of the named colors available.
  5. createConsole will create and size a miniConsole for the proper amount of lines and characters per line
  6. string:title to capitalize the string
  7. table.union and table.n_union to join two tables together
  8. table.intersection and table.n_intersection to get only the values common to all given tables
  9. table.complement and table.n_complement to get a relative complement of one set to another
  10. speedwalk to undertake long journeys
  11. getTimestamp to retrieve the timestamp for a given line
  12. invokeFileDialog to have the user graphically locate a folder or a file
  13. isPrompt returns true if the current line processed is a prompt one (works only on GA servers). This makes closing gates on a prompt real easy, because prompts can often change.
  14. feedTriggers re-processes the given text as triggers for you. Great for testing your triggers in arbitrary lines.
  15. deselect to clear the selection on the main window or a miniConsole
  16. tempTimer now allows Lua closures instead of Lua code in a string
  17. setLabelStylesheet to give a label a stylesheet, allowing some very nice customization of health bars and so on
  18. sendAll now allows a true/false argument at the end in same fashion as send

Enjoy!

Thank you all to everyone who contributed to the Mudlet 1.1.0 release – we couldnt’ve produced a great, free, multi-platform and user friendly client without you. Help spread the word about Mudlet and keep on rocking.

Tags: , , , , , , ,

Posted in Uncategorized

One Response

  1. Ramiel

    Taking another hiatus from mudding right now, but I had to say what you guys do is unbelievable.

    Keep up the good work.