Home
Screenshots
Download
FAQ
Donate
Links
[Changelog & Developer's Notes]
TO-DO LIST:
- ** Forking of a GUI thread currently suspends the parent.
- Scripts are receiving list of items improperly in SF.
- Some scripts remain on heap after being killed.
- Win32 `wrap' feature (systemu?).
- Support for compressed streams.
- SF `fetchloot' behavior is incongruent with Wizard's.
- Next matching room feature for goto.lic.
2008-06-18:
(v3.57)
- Ruby v1.8.7 has been released, and Lich's embedded Ruby interpreter is now built from this version.
2008-06-13:
(v3.57)
- Implemented the in-script methods ``hide_me'' and ``hide_script'' -- the former hides the calling script, the latter hides any scripts whose names you pass it as arguments. "Hidden" scripts will be excluded from the standard ``;list'' command, but will still show up if the (also new) ``;listall'' or ``;la'' commands are used. The user commands ``;hide'' and ``;unhide'' is the user-inputted equivalent to the in-script methods. See ``;help hide'' for details.
2008-05-18:
(v3.57)
- Added the Guardians of Sunfist sigils to the spell-list.txt file so that they'll be recognized by infomonitor.lic.
- Added recognition of the circle for above Sunfist sigils.
2008-04-02:
(v3.57)
- Added additional checks to ensure proper recognition of the current character's name at login.
2008-02-16:
(v3.57)
- An intermittent issue with StormFront was causing the user's character name to be improperly detected at login; fixed.
2008-02-04:
(v3.56)
- Added some additional sanity checks to the lichxml.c code.
2008-02-04:
(v3.55)
- Added the Map Browser and Console GUI modules. See the `;help' information for further info and usage details; note that these currently are only functional in UNIX environments, and that you must have libFOX-1.6 (the 1.6 series of the core Fox Toolkit library) installed to make use of the feature. See http://www.fox-toolkit.org for details about the Fox Toolkit.
2008-02-03:
(v3.54)
- The embedded Ruby interpreter is now built from Ruby v1.8.6.
2008-01-14:
(v3.54)
- When interpreting Wizard/SF scripts, the `%c' and `%s' character-sequences were case sensitive. This behavior differs from SF/Wizard, and has been changed to be case insensitive.
2007-11-15:
(v3.54)
- Eliminated some unnecessary error messaging when the "debug" flag isn't set.
2007-10-27:
(v3.53)
- Wrote the SFDialog class, which is basically a primitive GUI implementation for use with StormFront. It operates in a similar fashion to the majority of GUI frameworks: create a master window object, create labels and progress bars, attach any labels or progress bars to the window, and tweak their respective values as desired (positioning, display value, and so on). The class will handle the translation of all of this information into the proper format for SF to understand. If you're interested in usage details, see the file "sfdialog.rb" from the source.
2007-10-22:
(v3.53)
- A bug was preventing any room description that included a hyperlink from being properly processed when playing with SF; fixed.
2007-10-16:
(v3.52)
- Previously when Lich was used with StormFront, scripts would receive any game data the server sent to the client (with the XML elements stripped out); scripts will now only receive data the server sends if it shows up in the main window. This behavior mimics Wizard's functioning, and results in scripts only seeing the data they "should" see. Note that any script with its "status" flag toggled on will continue to receive all server-sent data without modification.
2007-10-11:
(v3.52)
- Fixed a bug that was causing Wizard & StormFront scripts with leading spaces on any match lines to be improperly executed (e.g., the line " match (LABEL) (STRING)" would have resulted in a "match" check that wasn't properly recognized).
2007-10-09:
(v3.52)
- Fixed a bug that was preventing Lich from properly detecting the position of your character's body (e.g. whether the character was kneeling, sitting, standing, etc.).
2007-10-08:
(v3.52)
- Fixed a bug that was causing the list of items in a room to be tracked as part of the room description when playing with SF.
- Added proper recognition of room transitions (e.g. moving from room A to room B) when playing with SF, so that the global "$room_count" variable is accurate.
2007-10-04:
(v3.52)
- Fixed a bug in the new SF code that was preventing recognition of any prepared spell that had more than one word (e.g. it handled "Presence" properly, but "Elemental Defense I" wasn't recognized at all).
2007-10-02:
(v3.51)
- Completely rewrote all the basic information tracking for SF and finished implementing the new (proper) XML parsing routines.
2007-09-27:
(v3.51)
- Implemented a number of routines that recognize and store the character information sent to StormFront (via XML).
2007-08-07:
(v3.51)
- Wrote the LichXML class (lichxml.c), which serves as a simplistic XML parser.
2007-06-22:
(v3.50)
- An oversight in the StormFront code was preventing Lich from properly detecting the presence of NPCs after initially entering a room. Fixed. Thanks goes to Divid for helping me test.
2007-04-30:
(v3.50)
- Fixed an intermittent bug in the auto-updating of the current character's mind state (waiting-to-be-absorbed exp).
2007-04-18:
(v3.49)
- A bug in the cachedarray.c lib was causing several oddities, primarily influencing initial autodetection during login. Fixed.
- Updated the script repository and lichnet scripts to store the dotted-quad IP address of the server after it's fetched once, and to clear the stored value if a connection attempt ever fails.
- Improved the reliability of automatic critter detection when playing with SF.
2007-04-06:
(v3.48)
- Fixed a bug preventing the current character's name from being automatically determined.
2007-03-07:
(v3.48)
- Fixed a bug making checkright/checkleft return inaccurate results in StormFront.
- The `cast' method will no longer consume game data silently.
2007-02-18:
(v3.48)
- Fixed a bug preventing certain game lines from being accessible to Lich scripts in StormFront; this was being caused by Lich's XML parsing.
- The `checkprone' method was checking if the player's character is currently kneeling, not if the character is currently fully prone. Fixed.
- When playing with SF, Lich wasn't properly recognizing when the current character is kneeling/prone/sitting. Fixed (and made somewhat more efficient).
2007-1-30:
(v3.47)
- Organized some of the data files into a devoted "data" subdir of the program's "home" directory; other miscellaneous cleaning-up of files.
- Implemented a Gem library (gemlib.rb); the `Gem' class is now usable and contains a list with various information about various gems. Refer to `Gem.list.inspect' for a peek at the details.
- Fixed a bug in the CachedArray (cachedarray.c) lib that was resulting in various empty cache files being created and not being deleted until the next run of the program, when they were detected as stale temp caches and deleted as such.
- Added the "split_as_list" method to strings, which will return an array of elements built from a comma-delimited English-sentence list of items. The all-too-often appearing sentences such as "You also see an item, some other item, a rock, a treasure beyond your wildest dreams and a shiny bracelet." can be split up into an array (here, it would result in `["an item", "some other item", "a rock", "a treasure beyond your wildest dreams", "a shiny bracelet"] ' as a return value). You can also use this in a more function-call style with `parse_list("the sentence of comma-delimited items to split up")' instead of ` "an English-listing of items".split_as_list ' if desired.
2007-1-05:
(v3.47)
- Fixed a bug introduced in v3.45 preventing a Wizard script that's being executed with Lich from being able to make use of "LICH { ... } LICH" sections.
2006-12-30:
(v3.47)
- Altered the `matchwait' command to accept regular expression objects in addition to strings.
2006-12-17:
(v3.46)
- Several additions to the `;stats' information.
2006-12-15:
(v3.46)
- 40% speed increase to the `cachedarray.c' lib.
2006-12-02:
(v3.46)
- Added support for decompressing and executing script files that have been compressed (zipped) with Zlib (for example, ".gz" and ".Z" files).
- Fixed a bug in the Wizard script parsing routines that caused the program to crash if an object of a non-file type was passed to the C functions as an argument.
12-02-06:
(v3.46)
- Fixed a bug preventing the time left until you decay from persisting if you logged out while dead.
- Fixed a bug preventing any spell with a duration of 1 minute or less to be tracked as having a 0 duration; spells are tracked properly under such circumstances now.
11-26-06:
(v3.46)
- Added the in-script method `Spells.known', which returns an array of all spell objects known to the current character; note that only Lich-recognized spells (as determined by "spell-list.txt") are candidates for being returned in the resulting array.
- Added the "Opt" class.
11-25-06:
(v3.45)
- Script files weren't being closed until the corresponding script object had been cleaned out of memory; fixed.
11-22-06:
(v3.45)
- Fixed a thread-identification bug preventing scripts from being properly recognized while executing `before_dying' code blocks; this resulted in the vast majority of Lich commands being unusable from before_dying procs.
- Added support for a new list of "rooms to pause in before walking through," for goto.lic (for the Griffin's Keen area, Icemule Trace rooms which cause slipping/falling, and so on). See "unique_map_movements.txt" to make use of it.
- Squeezed 20-45% more speed out of some of the core libraries with a few tricks: script thread recognition is now implemented with a hash function, changed the libs to cache their most-frequently-used symbols/method-identifiers to avoid constant interning, etc..
- Aliases weren't properly truncating to a single line when echoing back to the user; fixed.
11-17-06:
(v3.45)
- `reget' and `regetall' were only working if you didn't provide a string to search for; fixed (again).
- Added the in-script command `idle?' which returns true if the user hasn't typed anything for 60+ seconds, or false if they have. You can also provide the amount of seconds it should consider as meaning the user is "idle" (e.g., `idle? 300').
- `selectput' was only returning the matching portion of a game line that caused it to return, not the entire line; fixed.
11-16-06:
(v3.44)
- Added a new method of logging in to the game; it's certainly more reliable, but is only compatible with Simutronics games. See the DIRECTIONS.txt file for more info.
11-14-06:
(v3.44)
- StormFront seems to be forgiving of label jumps, allowing a script to "goto label:" successfully; Lich will now mirror that behavior when interpreting an SF script.
- Added a pause of 0.01 seconds to scripts that jump to the "labelerror:" label to avoid maxing CPU usage if a script gets caught in an endless loop.
11-13-06:
(v3.44)
- Corrected a few minor inconsistencies in the Wizard/SF script interpretation routines.
11-12-06:
(v3.44)
- If a script cannot be found, Lich will now attempt to start it as a Wizard/SF script. The end result is that Wizard/SF scripts can now be started without using the `;wiz' command; note though that a matching .lic file will supercede a .cmd file.
11-08-06:
(v3.44)
- The `reget' and `regetall' commands were broken; fixed.
- Ditched the buffer.c extension I wrote ages ago in favor of the new `cachedarray.c' lib; long story short, it's a CPU-intensive portion of the program and the new lib is significantly faster than the old one.
11-06-06:
(v3.44)
- The global variable names of the server socket, client socket, server & client buffers, and last server & client strings have all been changed to "$_CLIENT_", "$_SERVER_", "$_CLIENTSTRING_", "$_SERVERBUFFER_", etc.. To ensure backward compatibility with any scripts that depend on the old names being usable, they remain valid symbols for the corresponding global objects. What I originally found intuitive 14-16 months ago is anything but; these more self-explanatory names were rather overdue.
11-05-06:
(v3.44)
- Minor change to the display of information when the user is playing a Simutronics game and is using the Wizard; purely aesthetic tweak that helps clean up the text that Lich sends to the game window.
11-01-06:
(v3.44)
- Optimized some of the Lich script file-reading and memory storage routines; scripts now load faster and require slightly less RAM while executing.
- Optimized the Wizard script file-reading routines and increased the efficiency of the actual interpreting of Wizard scripts by several hundred percent (changed the method of recognition to a hash lookup rather than a sequential string comparison). Loading and execution of a Wizard/SF script are both significantly faster.
- You can now make the first line of a script "# QUIET" or "# HUSH" to suppress the "script active/ended" messages Lich normally echoes to the game window (as opposed to the only way of doing this being to type the word `quiet' after the script name when starting it).
- The Wizard `echo' command will now behave as the Lich `respond' command, as opposed to the Lich `echo' command (which encloses the string in brackets and prepends the script name to it before display).
- Changed the character signifying a script-sent command to the standard Wizard '>' instead of the previously used '^'; you can now also set the character to your liking by assigning to the `$SEND_CHARACTER' variable or typing in the game window ";sendchar #{character}".
10-30-06:
(v3.44)
- A bug was preventing any non-string objects from being converted to a string with their to_s method when the `respond' command was being used; fixed.
- A bug introduced in v3.42 (?) was making the program fail to properly query the Windows registry for local paths to files/applications, etc., resulting in only the "last resort" search information being used. Fixed.
10-28-06:
(v3.44)
- A bug was causing all alias-lines to be unconditionally downcased, which made certain tasks impossible. Fixed.
- I've added support for writing and running a script in any programming/scripting language your local system can execute; the catch is that I've yet to figure out how to make it work in Windows, so for the time being this capability is Linux-only. See the `;help wrap' info for more details.
10-24-06:
(v3.44)
- A bug in the new pathfinding algorithm was causing it to find shorter routes than the prior algorithms, but still not the shortest -- fixed.
10-23-06:
(v3.43)
- Scripts were (yet again) not being given time to execute their "before_dying" code blocks when the user exited the game; fixed.
- Added a new algorithm to the pathfinding extension; the new method is less efficient than the pre-existing one, but is also guaranteed to return the shortest possible path from the origin to the destination (as opposed to the "estimated shortest," which is the prior behavior). In practice, the reduction in moves required is something like 10% -- it cut 50 or so rooms off the EN<->WL trip (now 640 or so total), and usually yields a path that's 2-10 rooms shorter when running around locally (local meaning trips with 10-100 moves total).
- Changed the behavior of the "goto" script: it now by default uses the new guaranteed-shortest-path algorithm.
- A bug in the LichNet client script was causing any received chat message with a `%' character to raise a cryptic error and sometimes outright crash the script; fixed.
- Lich scripts can now have file extensions of ".lic", ".rb", or ".rbw" -- all three will be properly recognized (note that the script repository, however, will still only accept a ".lic" extension).
- An enormous amount of enhancements to the help information and several other miscellaneous user-interface and/or documentation tweaks (whether it LOOKS enormous from the user's side or not, believe me, it took me several hours to beef up the help info to this point).
- Removed the AUTOGC command; its usefulness ended around v2.0 and its only real function since has been to confuse and confound users.
- When used with StormFront, Lich was mistaking any game line with brackets around it as being a room title that signified the player had moved; e.g., if you were running a movement script and something used a Combat Maneuver on you as you walked by, Lich would mistake it for meaning you'd finished moving to the next room, which would throw off all subsequent MOVE commands and quickly result in the script exiting in error. Fixed.
- Added a new in-script command, `selectput'. It is by no means intuitive (unless you happen to be familiar with the behavior of the C function `select()', et al), but it is extremely flexible. The timeout (which is measured in seconds) and block (see directly below for details) are optional, and the basic behavior, in order, is (1) send the command, (2) watch for any of the given "succeeded" and "failed" messages, (3) return the matching game line if a "succeeded" message is seen, or call the block and pass it the matching "failed" message before starting over again at step 1 if an "action failed" message was seen. If a timeout value is given and an "action succeeded" message has not been seen before the timeout (in seconds) expires, the command gives up and returns `nil'. The end result is that if the action succeeds within the time limit, the return value of the command will always evaluate as logically true; if it is logically false (i.e. returns `nil') then the timeout count expired, since those are the only two conditions that by default result in the command returning. Syntax and usage (note that as is the custom, {curly-brackets} signify a required argument and [brackets] signify an optional one):
selectput({command to send}, {array of `succeeded' messages}, {array of `failed' messages}, [timeout]) { block to call if failed msg is seen } # (block is optional)
selectput("send to the game", ["a success message", "another success msg"], ["a failure message", "another, etc."], 15) { |failure_line|
echo "This block will be called everytime an `action failed' line is seen"
echo "Right after this block is called, the game command will be re-sent and the script will go back to waiting"
}
10-16-06:
(v3.43)
- StormFront scripts run by Lich weren't properly recognizing user-set variables if they included only one percent-sign (e.g., %myVariable instead of %myVariable%). Fixed.
10-09-06:
(v3.42)
- Added a start menu shortcut for executing the program in debug mode (creates an ASCII text file in the root directory of the current hard drive called "lich_debug.txt" with a record of what STDOUT and STDERR would have shown, if they existed in the Windows version).
10-04-06:
(v3.42)
- Minor additions to a few of the C libraries.
10-03-06:
(v3.42)
- The `checkmind' method wasn't functioning as documented; fixed.
9-29-06:
(v3.42)
- Added the ability to query various character information to the Char class (e.g. Char.health, Char.level, etc.); this usage seems much more intuitive than the previously required method calls -- which for backward compatibility still work (Stats.level, Skills.hiding, etc.).
- The behavior of the `fetchloot' command was improper if room descriptions were turned off; fixed.
- Aliases beginning with the same character as Lich-commands (default is a semicolon) will now be properly handled; note that any alias beginning with the actual word `;alias' will be ignored to prevent the possibility of aliasing the alias command and being unable to undo the action.
- Script-sent data will now be queued due to the user's type ahead limit settings in the same manner as manually-typed data is; as with manually entered data, this only applies to The Wizard and will only buffer-and-delay data if the user has their type ahead limit compensation measures enabled.
- Any data that has been queued by the type ahead limit settings will now be explicitly marked as such; a line that has been queued will also generate a notice when it's actually transmitted.
- Fixed a bug in the Numeric#as_time method that's used (among random other things) to display spell durations with the `;magic' command; the resulting string sometimes claimed there was up to an hour longer than you really had.
7-21-06:
(v3.42)
- The listening socket that the front-end's incoming connection request is accepted on was being inherited across the fork() and exec() syscalls that the user's login program is started with in Linux. Fixed.
7-15-06:
(v3.41)
- Some changes to the thread scheduling behavior; this addresses a bug that's been causing scripts to sometimes never be woken up while idly waiting for game data to be available (e.g., hang permanently for no apparent reason).
- Match tables weren't working properly; fixed.
7-06-06:
(v3.41)
- Minor update to the pathfinding library to fix an off-by-one pointer issue.
6-28-06:
(v3.40)
- The method of launching the user's specified (or auto-detected) login program was changed in v3.39 for efficiency, but not all computers are able to properly implement the new code: if it's necessary for whatever OS the program is running on, it will fall back on the old method now.
- Slightly altered Lich's behavior when logging in with multiple characters to try and make it less of a hassle to do this.
6-27-06:
(v3.39)
- The `watchhealth' command wasn't working; fixed.
6-23-06:
(v3.39)
- A bug was preventing scripts from receiving the "Also here:" line from room descriptions in Wizard; fixed.
6-08-06:
(v3.39)
- Some efficiency tweaks to a few of the C libraries.
5-31-06:
(v3.38)
- Added support for being linked to LichNet to use its features, but not being tuned in to the LNet chat channel.
- Added checking somebody's HEALTH data remotely through LichNet.
5-28-06:
(v3.38)
- Too many little tweaks to remember... reorganized the HELP info, changed the favorite list add/del commands to `favs add' and `favs del', etc. -- nothing major.
- Added support for fetching someone's active spells, char info, and skills through LichNet: the end result is that you see the same thing the target character would if they typed ;MAGIC, INFO, and SKILLS, respectively. See the `;help' info for more.
- Found a bug in SF mode that was causing Lich to try and display XML encoded strings to SF if a user tried to echo something with valid XML characters. The result of this was that SF was silently discarding any line with XML markup (without displaying a notice of any kind). Lich will now replace the XML markup with their HTML code equivalents so that it displays the way the user undoubtedly intended it to.
- Very minor tweaks to the Wizard script interpreting routines to fix a couple of rare (but not unheard of) Wizard script tactics which were broken when being run by Lich.
5-23-06:
(v3.37)
- I hate having to increment the version number twice in one day... the SF changes were buggy: fixed.
5-23-06:
(v3.36)
- Tracking of currently prepared spell, right hand, and left hand contents were still bugged in SF. Fixed (really this time).
- The behavior of the `move' script command has always been to assume a script is hung if 10 unrecognized game lines are seen while waiting to transition to the next room, but this was happening to me constantly when I ran SF to test: I've increased it to 35 unrecognized lines.
- Implemented tracking of current wounds and scars when playing with StormFront; this means that any scripts that depend on knowledge of this information (heal.lic, healme.lic, etc.) will now work in SF as well as Wizard. Additionally, the `Wounds.(bodypart)' and `Scars.(bodypart)' in-script commands are now available to SF users.
5-21-06:
(v3.35)
- There were some minor bugs with the Windows registry querying; fixed.
5-17-06:
(v3.35)
- There was a very obscure bug with Lich's Wizard-specific right/left hand contents tracking; fixed.
5-15-06:
(v3.35)
- Lich wasn't tracking up/down as possible room exits when used with StormFront; fixed.
- Currently prepared spell and left/right hand contents weren't being properly tracked in SF; fixed.
- Changed the behavior of the "infomonitor.lic" script (what implements the `;magic' command as well as all of Lich's active spell tracking) back to removing a spell from the active spell list when it's duration reaches 0. Note that it's removed even if Lich hasn't seen its "spell just dropped" message yet.
- The Wizard directory setting from the Windows Registry is now used to determine where Wizard scripts should be found; if you have a need to change this directory (dunno why the registry key would be inaccurate, but just incase), set the value of the $LICHCONFIG['Wizard Directory'] variable to suit your needs.
5-08-06:
(v3.35)
- The Black Lightning compatibility modification was bugged; fixed.
- Noticed that the spacing in SF was atrocious; Lich now sends the same tag as the game does when it's displaying "tables" of data (such as your INFO output, etc.) anytime the 'respond' command is used.
- Other small random tweaks: using the system registry info in order to launch SGE properly, etc..
4-30-06:
(v3.34)
- There was some poorly coordinated error handling that in very rare circumstances caused the program to go berserk and basically loop infinitely forever in the background and monopolize the CPU until you forcibly murdered the process (I'm hoping this was *NIX-only, since the sequence of signals that resulted in this shouldn't even be possible in Windows).
- Another massive, *massive* rewrite that really isn't necessary but that serves to feed my irrational love of efficiency. Lich's StormFront-specific behavior is totally unaffected, but I've rewritten from scratch absolutely all of the Wizard-specific data scanning. I've worked out every bug that I've been able to find, but it would be a miracle to not have anything break when you do something semi-stupid like rewrite a massive portion of the foundation of a program. So be sure to let me know if you notice any new odd behavior.
- When using the `goto' command in scripts, you can now provide the label to "go to" as a symbol instead of a string. It's just really irritating and repetitive to always have to type things surrounded by quotes, and symbols are ever-so-slightly less tedious; for those who don't know, a symbol is made like this: ":symbol_name". So in a script, the following two lines will do the exact same thing:
goto "mylabel"
goto :mylabel
- Lich now queries the windows registry for the hosts file location, and if that information isn't available, asks Windows for its "Windows" directory and checks there. If the file isn't found, it behaves as it always has and checks every possible permutation of system folders.
- Added an alternate means of connection in order to be 100% compatible with Black Lightning and it's features; you'll have to see Jayonas' (the author of BL) documentation for the details of how to set BL up to launch Lich in the proper way. See Lich's "DIRECTIONS.txt" file for slightly more information about this.
- The in-script "Watchfor" commands are all screwy, I've removed them all until I've fixed them so as to avoid users wondering why it isn't working right.
4-26-06:
(v3.34)
- The `walk' command can now take an optional block; if you use it this way, it will repeatedly walk until the block you give it evaluates as true (as opposed to the way it's always worked in the past, which is moved one room and returned TRUE if there's critters in that room, or FALSE if there isn't). The optional boundary room-descriptions will function properly with or without a block. To be clear, this is in addition to the way it's always worked in the past, it does not replace the old functionality. If given a block, the return value of `walk' is the return value of the block. For example, if I wanted a script to walk around until I found the priestess, this single line would do that:
walk { checknpcs "priestess" }
4-19-06:
(v3.34)
- New Lich user-input-command and in-script commands, both by the name of `debug'. The Lich command `;debug' will now toggle "verbose script debugging output" on and off (defaults to OFF at program startup). Mostly this affects the in-script `debug' command, which works two ways: if you give it a block (e.g. by putting "debug { echo 'Hi, I'm in a debug block!' }" in a script), it will only execute the block if that "verbose script debugging" is currently on. Alternatively, you can just give it some strings to echo and it will act identical to the `echo' command (unless "verbose script debugging" is currently OFF, in which case it will do absolutely nothing). So to clarify, both of these will do stuff if DEBUGGING is currently true, and will have no affect at all in a script if DEBUGGING is currently false:
debug { echo "Hi there, user! You currently have the `verbose debug output' on for scripts!" }
debug("Hi there, user! You currently have the `verbose debug output' on for scripts!")
4-13-06:
(v3.33)
- The Windows version of 3.32 wasn't removing the "carriage-return, newline" sequence from game strings, which was mucking up scripts... fixed.
- Pausing a script locked Lich in Windows. I can't begin to describe just how much I hate it when a version works fine in Linux but not in Windows. I should just write two different programs for God's sake...
4-07-06:
(v3.32)
- I can find no rhyme nor reason for this "exit" bug business. It simply should not be happening, but I'm tired of trying to track down a bug I can't even recreate: in Windows, Lich will now default to a slower (but stable) method of operation. I can almost guarantee you won't even be able to tell (except that Lich won't be crashing every 6-10 hours anymore), so I don't recommend this, but you can change back & forth between the stable & maximally-efficient methods by using the "Script.max_efficiency" and "Script.max_stability" in-script commands. Since the problem doesn't happen in Linux, that version defaults to the more efficient method.
4-05-06:
(v3.31)
- The "Fatal error: exit" bug wasn't fixed after all; thanks to Toy for helping me track down what's actually causing it. With any luck, it's finally fixed.
4-04-06:
(v3.31)
- infomonitor.lic wasn't properly tracking non-master ranks/steps in Voln/CoL (was recording a character as either a master of one or not a member of either). Fixed.
- The `silence_me' script command was broken. Fixed.
4-04-06:
(v3.30)
- A script that tried to stop itself with the 'stop_script' command was crashing Lich... fixed.
- The "exit" fix was all screwy... fixed.
- Lich should now be able to work no matter how you start it (installer-created shortcut or otherwise).
4-01-06:
(v3.29)
- Believe I've fixed that ridiculous "exit" bug.
3-28-06:
(v3.29)
- Made a website for Lich.
3-27-06:
(v3.29)
- Some errors were locking Lich into an infinite loop of retrying the failed operation... now retries up to 5 times, and then aborts.
3-25-06:
(v3.28)
- The settings file was completely erased anytime v3.26 or v3.27 was run, among other issues with the settings code. Fixed.
3-24-06:
(v3.27)
- I've decided that Lich will always be the first and also the last cross-platform program I ever actually try to develop/maintain... this stuff drives me mad: for the 368th time (or thereabouts) an itsy-bitsy difference in Windows (specifically the way it processes file open calls) made v3.26 run as happily as a clam in Linux, and crash and burn in Windows before it even read the settings file. Fixed.
3-21-06:
(v3.26)
- The settings file was being created in the wrong directory (one dir back from Lich's normal directory); fixed.
- I removed a *lot* of unnecessary repetition (defining methods for every skill, etc.) and rewrote them all. Things are a lot more efficient this way. Let me know if anything is broken.
- Added some better error handling to hopefully prevent these goddamn strange fatal errors that people are getting in Windows.
3-19-06:
(v3.25)
- Trying to send a line to a specific script froze Lich... fixed.
- Added locating a user connected to LichNet, and also accessing everything Lich knows about a user (their "character sheet" basically). These options default to not allowing access to this information.
3-15-06:
(v3.25)
- Fixed a li'l bug that was causing Lich to improperly report that scripts which died from the `;kill all' command were still running -- even though only scripts which had set the `no_kill_all' option were the only ones that weren't being killed with a user-initiated `;kill all', Lich was claiming even scripts that didn't set that option were being allowed to continue running as though they had set it. Fixed.
- The `regetall' command is supposed to add any matching lines back into the script's main game-data-queue (so that the `get' script command will return the matching lines). It also returns all matching lines as an array, but I thought it would be easier for people if you weren't restricted to using it in that manner. Unfortunately, it was failing to add matching lines to the game data queue... fixed.
3-14-06:
(v3.24)
- ... memory leak? Like a real memory leak? How in the Hell was there a memory leak of that size? God, that's a really nasty issue. Sorry guys. Should be fixed.
3-13-06:
(v3.24)
- I actually wrote a GUI (may God have mercy on my soul). LichConfig.exe is written with GTK+2 (you may recognize the look if you use Gaim, which also uses the toolkit). It's kinda small and dumb, but I figured it was time to actually get some meager experience with GUIs. It requires the Windows GTK+2 shared library files, which the Lich install doesn't include. It's just too simple and dumb to justify a large download for. Use it if you want though. If you run Linux, you either have the necessary libraries or you know why your particular system doesn't, so -- the *NIX build of lichconfig works fine.
- You can now clear the type ahead buffer by typing ";tac".
3-9-06:
(v3.23)
- Lich will now delete stale buffer files that it finds when it starts up. "Buffer files" are the disk cache files that Lich's buffer extension library uses to keep large amounts of data "on-hand" without storing it in RAM. These files are deleted when the Lich program exits, but if a user's compuer crashes while Lich is running, the files won't be deleted properly. Lich considers any buffer file to be "stale" if it hasn't been modified within an hour.
- Implemented compensation for Simu's typeahead line limit. Type `;typeahead help' for full details. What Simu would like you to pay for, I give you for free! Muahahah (it's a joke... I don't think anybody would pay for a program without a GUI, otherwise I'd be charging too, lol).
3-7-06:
(v3.23)
- Made "toggle_status" a synonym for "status_tags" -- even I keep forgetting the damn commands, and "status_tags" doesn't follow suit with the other commands (`toggle_upstream', `toggle_echo', etc.). To maintain backwards compatibility, "status_tags" is still a perfectly valid script command.
- Added the `--bare' command line parameter. Disables any & all data-scanning/status-tracking, and makes Lich do absolutely nothing except perform as a 'bare-bones' script engine (intended to be used with games that don't conform to Simu's status formatting).
- Various speed-tweaks, more minor run-time environment changes: suffice it to say general efficiency/stability improvements that are of little interest to the user.
- The source code is no longer distributed with the install package; keeping track of what I've changed, linked in, altered, etc., etc., and making sure it's part of the install routine has just become too much of a goddamn pain, and I don't want to go to the hassle anymore. Besides (see next note)...
- ... Lich can no longer be executed from source; the program started out being completely programmed in Ruby, but I've just written too much of it in C at this point (and altered too much of the Ruby interpreter) -- it's no longer possible for it to execute without the compiled portions. Just an FYI for the 2 or 3 of you that have run Lich from source for 6+ months.
- Removed the 'nodiskcache.txt' feature: changes made when I wrote the buffer extension lib would have required too much of a hassle to keep this behavior, so I just sliced it right out.
3-3-06:
(v3.22)
- Fixed a horribly nasty bug that was causing exec scripts with syntax errors, and possibly any script with syntax errors, to result in a fatal exception that crashed Lich altogether.
3-1-06:
(v3.21)
- Small runtime-environment tweaks to address a few minor inconsistencies introduced by the recent executable-file changes (from v3.19).
- Tons of map database updates; bloody tons... the actual mapping added this update is due to the efforts of Lich's users: Syuheh and Tillmen are the ones responsible for the 40% increase in the info contained in the map database. The database now includes various information for the town of Icemule, various surrounding Icemule environs, the route from WL to Icemule, Teras (the town, whatever it's called), and what appears to be most of the Teras hunting areas. I cannot test this stuff. I have no clue if it's right or not.
- Fixed a really nasty bug that was causing any script thread which used the `exit' method to exit the Lich application altogether instead of exiting just the script.
- A bunch of spell info fixes for spell-list.txt; usually I don't bother detailing script-only changes, but a number of the spells were badly off. Should all be 100% now (as accurate as Simu's documentation is anyway)...
2-27-06:
(v3.20)
- Added a rescue trap for argument errors to the script routine (e.g., if you try to give a command too many or too few arguments, or arguments of the wrong type, etc).
- Added a rescue trap for any IOError exceptions (don't stress the details; it's just another possible script error that will be handled cleanly if it should pop up, and it's handy for me to be able to look back and know when I changed what).
- Fixed a bug that was preventing Lich from recognizing the "3x/2x experience is finished" message (e.g., Lich still claimed you had time left for your 3x/2x time periods even if you really didn't).
- Really minor efficiency tweaks to calcredux.lic, calcflares.lic, and infomonitor.lic.
- Increased the before_dying code block timeout to 1 second (the maximum amount of time that they're allowed to run before being forcibly terminated whether they're done or not).
- The 'fetchloot' command will now take an optional container name. If given no container, it will continue to default to your Lich.lootsack (as it always has; if you just use `fetchloot' in a script, there won't be any change). For instance, to use your cloak (1st example) or your backpack (2nd example):
fetchloot('cloak')
fetchloot('backpack')
- Rewrote in C most (if not all) of the operations Lich performs anytime a game line is received. Enormous increase in efficiency, mostly in regards to CPU usage. So enormous, infact, that on my 2.12GHz Athlon XP, the game appears to be incapable of sending data faster than Lich can process it (even scrolling "who full" repeatedly with 8 scripts currently executing, Lich goes faster than the data comes in)...
2-26-06:
(v3.20)
- man.lic (Lich's manual script) wasn't recognizing synonyms for commands properly; fixed.
- A really nasty oversight was allowing an alias to retrigger itself, which in turn triggered the same alias again and again endlessly (basically locking Lich into infinite recursion, except the way I did it means it really would be infinite -- the stack would never overflow and it would've gone forever). Obscure but very bad bug. Fixed.
- Having aliases respond *fully* to regular expressions was too confusing for the majority of people... aliases are now on word boundaries (if you don't know what that means, google it in reference to regular expressions or just ignore it). They're otherwise identical.
2-25-06:
(v3.19)
- I'm unaware of how to accomplish the task in Windows, so the Win version is unaffected by this change, but in *NIX Lich will now drop its superuser privileges once it's finished with the hosts file and switch its effective and real user/group ids to the real user/group ids of the user who executed it. If you `su' to root in order to execute Lich instead of using `sudo' or going with the default setuid root method, it'll switch its permissions to root (effectively causing no change), FYI. It will also install itself setuid root in *NIX now (execute install.sh from the uncompressed tarball and it'll give you a schpiel about what it's done, or just read the comments in it).
2-24-06:
(v3.19)
- Completely redesigned the way I've been building the stand-alone lich.exe file. This will fix the way some users have been having to repeatedly allow Lich permission to accept incoming connections every time they ran it, etc. Surprisingly, the buffer library is working in Windows this way as well: apparently I couldn't find the bug in it because it wasn't the source code that was bugged, it was the object files (I guess, lol). In short, practically everything got a nice 25% or so bump in efficiency.
- Fixed a bug that was preventing any currently-paused scripts that had been marked to be killed by another script when it exits (with the `die_with_me' command) from being killed when the calling script exited.
- The `abort!' method for exiting from a script will now bypass the "(paused)" state. Probably won't ever come up that a paused script wants to immediately abort its execution before Lich is able to identify it as having been paused (once the script is frozen in place, it wouldn't be able to call the `abort!' method until it was unpaused -- so the chances of it calling `abort!' in the time between it being toggled into the paused state and being identified as paused & frozen in place are pretty slim), but it seems appropriate that if a script wants itself dead immediately that it shouldn't have to wait to be unpaused.
- Not sure how long it's been an issue, but after the switch to the new compiling method scripts were very frequently not being given sufficient time to save their data properly. Added what should be an all but fail-safe method for ensuring they're given the time they need when Lich exits (up to the normal 0.5 second timeout a `before_dying' code block is assigned, of course).
2-23-06:
(v3.19)
- The Gift of Lumnis cycle won't wrap and start counting down again once the time is up; it'll wait until your 7-day cycle really begins.
- Since about 3/4 of the people who use Lich also use PsiNet, it's redundant and almost certainly undesired to display Lich's Gift tracking when the user checks their experience. It's now on the magic list (the Lich ;magic list, not PsiNet's, of course).
- The messages related to your Gift of Lumnis are more in character now (no need to dispel the IC atmosphere unnecessarily).
- Forgot error-handling incase a user tries to load active spells from the server, but has never saved any info on it; this was causing infomonitor.lic to blow up so badly it just died and stayed listed as active... fixed.
2-23-06:
(v3.18)
- God damn it, I can't stand it when things work on some computers but not others. Fuck it, I took the buffer lib out of the Windows version. There's actually noticable lag with a WHO FULL because of processing time when it's a Ruby extension -- unacceptable. Besides, Lich doesn't actually use that much RAM; I'm just being anal and things are breaking because of it. Plain stupid of me. The Linux version still uses the compiled lib since it's faster than greased lightning, to coin a phrase.
2-22-06:
(v3.18)
- Efficiency improvements to `matchfind' and `matchfindword' (they'd been in need of a speed-tweak since I wrote them months ago).
2-21-06:
(v3.18)
- Spellshorts will now only recognize commands that begin with either 3 or 4 numbers (e.g., 401 or 1601 will be recognized as a spellshort command, but sending '4' to the game to exit at an inn will not).
2-21-06:
(v3.17)
- I give up for the time being; I can't figure out what the problem is with Windows and the compiled buffer extension lib. I wrote a clone of it as a Ruby lib, which is what the Windows version uses. The Linux version uses the compiled C extension since it works just fine in *NIX.
- Since I had 3.16 up for download twice, and both times it didn't work at all, I'm incrementing the version number to v3.17 to avoid confusion.
2-19-06:
(v3.17)
- Spellshorts are interfering with checking in at the inn... since most everybody uses PsiNet and its spellshorts work just fine (frankly I only added them for myself), I took them out. To enable this behavior, create a text file in the Lich dir named "spellshorts.txt" and it'll do them again.
2-18-06:
(v3.16)
- Spent a few hours improving the command reference document; return values, quirks of usage, all of those details should be 100% accurate. Added to some existing descriptions, that sort of thing.
- Turned the "Command Reference.txt" file into the "API Reference.xml" file. API stands for "application programming interface," and I realized it's pretty goddamn stupid to call it something so `professional' when 99% of the people using Lich won't have any clue what it means. Hence, it's called "Command Info (API list).xml" now. At least it's... sorta-kinda okay to look at in its new format.
- The "Watchfor" command will now work as it has in the past, but can also take a code block to execute instead of multiple strings. If given both, the code block will execute and the strings will be ignored.
- Watchfor objects will now be nullified when the calling script dies. If you *really* want to prevent this new behavior, just do an "undo_before_dying" command right after the "Watchfor.new" and the watchfor will continue to execute even after the script ends.
- Some map database fixes. Jesus Christ, if I had known how fucking tedious fixing these bullshit stupid "can't climb that with stuff in your hands n00b!" errors would be, I wouldn't have bothered even starting it...
- Addressed an issue with script data not being fully "disposed of," from memory after a script ended.
- Lich has a manual at last! Praise be to tedious documenting! :p Run man.lic for help info.
2-17-06:
(v3.16)
- Switched the arrays that scripts are fed game data in (what the "get" command fetches lines from) to buffers as opposed to standard arrays (see note about the buffer extension lib below). This effectively means that a script will be able to actively "get" only the last 50 lines, and will have to access anything older than that through "reget"/"regetall" or through the script's buffer history. I've never seen or heard of anyone actually making use of the way Lich queues all game data and holds it for a script until the data is looked at, and I realized that I've never even made use of it myself (the regetall method has always been what I used personally if I needed more than half a dozen lines past). Since that's the case, it's monumentally stupid for Lich to eat away at system RAM for a feature nobody ever uses (besides, this way users who forget that game lines are stacking up while a script runs don't burn through 100% of their system memory b/c they just let it keep piling up forever).
- Fixed a bug with the "checkroomdescrip" command: when you passed it a string to match against the current room description, it was returning a funky unpredictable answer that was really inexplicable and really wrong.
- The `watchhealth' command was just... bad. I was a really bad programmer when I coded it. I just chopped it right out and rewrote it, I don't think anybody's ever used it anyway. New format: watchhealth(50) { code block to execute if your health drops below 50 }
- Added what little I was able to tolerate documenting to the "Command Reference.txt" file.
- You can now use "Lich.user0" or "Lich.user1" or user-whatever in scripts the way everybody seems to try to (the command was always "Lich.user(1)" but either will work now).
2-16-06:
(v3.16)
- Fixed a minor issue with the buffer library. I'm very pleased with the results; Lich is using half the memory it was before this change.
- Fixed a stupid mistake ("independant" is spelled "independent") with "i_stand_alone" scripts.
2-15-06:
(v3.16)
- So, I think I've discovered why I've been having problem after problem trying to make Lich free its allocated buffer RAM. Has to do with very low-level stuff. Very fundamental low-level stuff. The kind of stuff you don't change unless you're willing to spend two weeks rewriting parts of standard libraries that talk to hardware and that you probably shouldn't be playing with in the first place. i.e., stuff that I'm not going to spend time tinkering with. It's stuck the way it is :(
- Wrote the buffer module in C (another extension library designed for Lich) to overcome the previous note: I can't change the way RAM is allocated, but I CAN get around it. Incase anybody has a use for this: for this module, a buffer is identical to an array in all ways, but it only has space for 50 objects; when you try to stick the 51st object in a buffer, it automatically dumps out the first 50 objects to a temporary file, clears itself, and sticks that would-be 51st object in as the now only object. It's a way to effectively store enormous amounts of data and still leave RAM nice and empty. Just use arrays unless you've got a need to store some God-awful amount of data (the way Lich caches all game data to keep it available, for instance). The temporary files are deleted at program exit, BTW. To access anything that's previously been dumped to a temporary file, use the "history" method. So
buffer = Buffer.new
(push 50 items onto the buffer, which is identical to an array)
buffer.push "test" # Our 51st item
(buffer is now an array with only 1 object in it, the string "test")
old = buffer.history # Constructs a new array (from the first 50 objects, not including the 51st which is in RAM at the moment) and returns it
2-13-06:
(v3.15)
- Recently uninstalled PsiNet; I wrote in spellshorts to Lich because I'm so used to using them (e.g., typing '401' to incant 401, or '401 adhara' to 'prep 401, cast at adhara').
- Lich will now do the initial login without performing any operations on the data sent before going into its usual "listen for Lich commands" loop (spellshorts were screwing up sending of the key; Lich just sends the key without looking at it now and then begins to act as it always has).
- There was some sort of issue with the --debug mode... I think I've fixed it.
- Recently altered ';exec' scripts in such a way that they weren't being numbered properly. Fixed.
- Even though it isn't a memory leak, it's just stupid for Lich to be sucking up the amount of resources it is because of RAM caching. Lich now forces any memory allocated for caching to be freed every 30 seconds.
- I usually don't bother detailing script changes/writing, but I fixed some issues with healme.lic and wrote order.lic (I can't fucking believe Simu...)
- Lich now tracks the Gift of Lumnis cycle. If you want to disable this, just type ';magic disable gift' (or ';magic enable gift' to enable it). You'll see it when you check your experience unless you disable it.
2-10-06:
(v3.14)
- I feel particularly lazy; added some really unsophisticated drive-checks when Lich starts up in Windows that should (I can't imagine how it wouldn't) correct any "unable to find your Lich program directory!" fatal errors.
- Wrote in the same repetitive, unsophisticated checks for the local hosts cache.
- Rewrote healme.lic; it had no clue what was going on way too often (didn't notice it was holding an herb, so on and so forth). This one should be astonishingly intelligent for a script.
- Added the old LichNet chat server information to lichnet.lic as a backup incase connecting to the primary chat server fails.
2-9-06:
(v3.14)
- Spell 202 (spirit shield) was being tracked as costing a flat rate of 2 mana... it's been updated to be accurate for the scaled cost.
- Whether it's just my memory of it or not, Lich started out calling the "Minor" and "Major" "Spirit" circles "Major Spiritual" (not Spirit). At the moment, the spell circle is called "Spirit" and even though Lich is tracking it right, "Spells.minorspirit" produces an error when used in a script (the command that returns the user's known minor spirit spells is "Spells.minorspiritual"). This has been corrected, both will work now.
2-7-06:
(v3.13)
- A slight detail of the way MATCH jumps are handled caused a 2-day-long bug-search when a user hit some inexplicable trouble... I'm shocked someone actually tried something where it caused a problem (yes, it's *that* obscure), but regardless, the issue has been corrected.
2-6-06:
(v3.13)
- Switched the servers to their new hosted location after some tweaking/tinkering. Thanks again Vizy :)
- I've improved the pathfinding extension library. It was taking almost 55 rooms to get from a Moonglae table to the dais, and is now taking 27. The improvements I've seen are not all so drastic, but I didn't find a single path that wasn't at least a few rooms shorter. Apparently my pathfinding extension library is (or includes, rather) what's professionally called an "heuristic algorithm." Sounds neat, huh. Yeah... Not to belittle how far I've come in half a year, but it seems a little self-glorifying for my tastes... I'll stick with calling it the pathfinding extension library.
2-5-06:
(v3.12)
- Added the 'outside?' method to the Map class. Room objects can now be queried as being outside or not. And remember, 'Room.current' returns the current room you're in (presuming it's part of the map database). So, 'Room.current.outside?' would be true if you're outside, false if you're not.
- Added the 'outside?' script command (first new one for like 2 months, lol). Even if your current room is not part of Lich's map database, you can use this command inside a script and it will always tell you if you're currently inside or outside (presumably only rangers could give a fuck, but hey, ya never know -- use it if you have a use for it).
- Lich will now display some more information if a script is killed due to a security warning (i.e., if a script tries something unsafe while running in SAFE mode). It's not in a very user-friendly format, but at least it's a bit more information about what's being attempted (to be specific, Lich will now display the last 5 Ruby execution frames; in a nutshell this means it'll display the last 5 "commands" leading up to the current one).
2-4-06:
(v3.12)
- The "nodiskcache.txt" file wasn't working (infact trying to force Lich not to use a disk cache made it not run at all). Fixed.
- Lich has always emptied its RAM buffers every 2 minutes and dumped them to the temporary files on the hard disk, but unfortunately the RAM allocated during those two minutes apparently isn't being released even though it's empty... this isn't a memory leak, because the memory is indeed used as it fills up, but it's still not being freed for use by other programs when Lich empties it -- it remains allocated to Lich. Most people have more RAM then they need, but I hate to see my program eating so much of the system resources... To make Lich "play nicer," with the system I've changed it to dump the RAM buffer every 30 seconds.
- The 'cast' command was looking for "Spell Hindrance for a" as meaning armor prevented a spell from succeeding, but some armor says "...for an" and some says "...for some" -- this was breaking the command for such armor. Fixed.
2-4-06:
(v3.11)
- The ;stats output now shows time since login in a more appealing format.
- Since aliases are no longer kept in a plain-text file (it's a binary Ruby Marshal dump), it's misleading for the file to be named 'aliases.txt'; Lich will change the filename to 'aliases.dat' the first time v3.11+ is run to avoid confusion on the part of users.
- More manual fixes to some rooms in the map database.
- A typo wasn't allowing Lich to auto-detect the user's game/front-end; fixed, tested, and verified as working properly now.
- I forgot to update the version that the installer says it's installing last version... updated it to v3.11 this time.
2-2-06:
(v3.1)
- I switched a bunch of stuff around with the pathfinding and mapping files... none of it effects users, but I hope I never need to figure out what I changed today because it was way too much to bloat this file with...
- Fixed a bug with Lich tracking critters in SF.
- Added an option for using Lich with Gemstone IV Platinum (a Start menu shortcut in Windows and a command line parameter, --platinum).
2-1-06:
(v3.1)
- Added support for the old unique_map_movements.txt file... see comments in said file (in your scripts dir) for more info on it.
- Tweaked goto.lic a little, you may wanna check out the ';goto help' info again.
- Added the basis for estimating how long a trip will take with goto.lic; any room that doesn't explicitly declare how many seconds it will take to go from that room to the next is assumed to take 0.5 seconds. If the map database includes a time for the movement, that's used instead (it's in the Room[number].timeto variable, same exact thing as the Room[number].wayto variable but with time in seconds instead of the movement command).
- Recompiled the Windows version of the pathfinding library with some optomization options enabled, and I've stripped the resulting binary this time. I realize that's probably total gibberish, but this is what I'm getting at: the pathfinding library should run a bit faster, and it's a ton smaller now (it's 20kb as opposed to 252kb). The problem here is that I can only test in an emulated-Windows environment; I don't have Windows installed and can't test in a "real, true Windows environment." Let me know if something blows up and I'll compile it the way I did before instead.
- Finished the unique portions of the trip from Wehnimer's Landing to Ta'Illistim; goto.lic should now be able to run you from WL to EN.
- Finished the unique portions of the trip from Ta'Illistim to the Landing, so goto.lic should now be able to take you both to and from both.
- The 'die_with_me' command was only registering scripts that were active at the time that it was used, which is not how I intended it to work. It will now properly store the name(s) of the script(s) to kill whether they're active at the time the command is used or not, and properly kill said script(s) if they're active when the calling script dies.
- Found two rooms with identical descriptions, identical titles, but different "Obvious paths:" exits. This was causing havoc with the map database; hopefully it'll be able to distinguish between such rooms from now on.
1-31-06:
(v3.09)
- Only applicable when run in Linux: added a check for the file ".lich_dir" in the current user's HOME directory; if this file exists, the directory that Lich should use will be read in from it. So as an example, say you wanted to use the directory "/stuff/lich" as its program dir and wanted that to always be its directory when it runs -- put the file ".lich_dir" in whatever the HOME directory of the user running the program is, and put the line "/stuff/lich" in that file. From then on, Lich will notice the file and set its directory as whatever that line reads.
1-30-06:
(v3.09)
- I think I tracked down a cause of occasional errors in the automap.lic script. I hope I did anyway... on very rare occasions it was recording the wrong movement, which was totally fucking everything up.
- This took me more time then I can even BEGIN to describe, but I've finally managed to compile the pathfinding extension library as a Windows-compatible .dll file...
1-28-06:
(v3.09)
- Added support for user-specified "key phrases" for destination rooms (basically nicknames for rooms) to goto.lic.
- Fixed a silly bug having to do with the Settings feature... can't for the life of me remember just what it was. Did some other little fixes here and there, and I can't remember those either... whatever, suffice it to say a few things are working more smoothly.
- Some issues arose when I tried to add to the map database; changed things around some to support writing out the data to an external file and loading the database from such a file. It's working like a charm, but God help me when I'm done putting the finishing touches on this and it comes time to document how to add to it...
- Not sure where else to say it, so for anybody who reads this: when I previously stated that the automap.lic script works in SF, I was wrong; it doesn't hurt anything and it certainly appears to work the way it should, but it doesn't actually record any movements. As it stands I'm not sure how the Hell to make it work in SF, and I doubt I'll ever feel like sitting down and putting in the effort to make it. Basically what I'm saying is it does not work in SF, and I have no plans to ever correct that.
1-27-06:
(v3.09)
- Finally managed to work in plotting of the "shortest path," to a destination. In practice it's far from perfect because of the way rooms are so unpredictably linked, but in testing it's almost always at least a few rooms shorter and sometimes the difference is as large as 13 rooms as compared to the old method walking through 45. Now if I can just get the goddamn mother fucking thing to compile as a shared Windows library so it'll work in Windows as well as Linux, I'll be set...
1-24-06:
(v3.09)
- Added a rescue catch to the script routine for the 'NoMemoryError' exception, since it's raised by the pathfinding lib in the unlikely event that it can't allocate the necessary RAM for pathfinding.
- Rewrote the Map and Room classes (source file lich-libmap.rb) to suit the new pathfinding lib. It should also be able to identify (and compensate for) rooms having descriptions that vary based on the time of day now.
- Rewrote the goto.lic script.
1-23-06:
(v3.09)
- Totally redesigned and rewrote the pathfinding algorithm in C; it's now a compiled extension library written for Ruby/Lich (i.e., it's very fast and does in a fraction of a second what the garbage I originally wrote took forever to do). Lich has always been an open source project, and I see no reason to change that now: you'll find the source in the same directory as the Ruby code (pathfind.c).
- I'm back in school. And I'm hating it oh-so-fucking-much... anyway, I have less time these days and barely play GS at all (if you couldn't tell by the lack of updates): regrettably, I'll likely call Lich "finished" and abandon development of it soon. That should not be taken to mean I won't fix bugs if they're brought to my attention -- I've put a LOT of time and effort into Lich, and I'll find the time to fix any broken tidbits that I'm notified of. Just a heads-up for anybody interested enough in the project to be reading the changelog.
1-17-06:
(v3.09)
- The --directory command line argument wasn't overriding Lich's auto-detection the way it should; fixed.
1-12-06:
(v3.08)
- Wrote the Settings feature and documented it. Personally I think it's really-really neat; check out the Command Reference.txt file for a full explanation.
- I think I screwed up the Linux build the last few versions... should be fixed now.
1-10-06:
(v3.07)
- The fput command now looks for "can't do that while" instead of "can't do that" (in reference to detecting a stun or whatnot).
- Added support for unique movements to load_automap.lic; see the "unique_map_movements.txt" file in your Lich scripts directory for more information.
1-09-06:
(v3.07)
- The global Socket.do_not_reverse_lookup value is now enabled at program startup; this should slightly decrease the time Lich takes to load when executed. The dotted quad IP address of the game server is also fetched with the 'BasicSocket::getaddress' method instead of the 'TCPSocket::gethostbyname' method now.
- Fixed a bug causing a Wizard script with nothing but 'echo' on a line to echo the word 'echo' instead of just echoing a blank line the way it should.
- Changed the 'echo' command so that if it isn't given anything to echo, it will just print a blank line without the ugly [scriptname: ] that previously showed.
- I've broken off some of the lich-lib.rb file into separate files that will only be loaded if the methods are used (for resource efficiency among other things). The source files are also now in "c:\program files\lich\source" instead of the base application directory in Windows. God the stuff I wrote 6 months ago is a total mess... it would be less work to rewrite it from scratch than to clean it up.
- Started the 'stringformatting.rb' file (a Ruby module) -- it only has one method for the time being: it extends the Fixnum and Float classes to include the 'as_time' method (see below).
- The useful part of that last note in English: you can now take any integer or decimal number and have it return the 'hr:mn:se' representation of itself (it's assumed the number represents minutes). So if you wanted to turn the number '200' into "3:20:00" (turn 200 minutes into nicely formatted 3hrs, 20mins, 00secs) to print it out or something really quickly and easily, just use '200.as_time' (this is now the method the Lich ;magic list uses). To treat the number as seconds instead of minutes, just do: (200 / 60).as_time and so on (since there are 60 seconds in a minute, dividing a number by 60 works to turn seconds into minutes, and then we're just calling the return number's 'as_time' method).
- Updated the script tutorial (new), directions and command reference documents a touch.
- Added the (force Wizard mode) and (force StormFront mode) links to the Start menu shortcuts the Installer creates.
- Added a command line parameter for running in DragonRealms mode (--dragonrealms).
- Removed the 'exit!' method altogether.
- Wrote the "all_scripts_run_safe.lic" script; see comments in said script for info.
1-08-06:
(v3.07)
- Fixed a bug causing the script's name to be passed as a command line variable when starting Wizard/SF scripts with the ';wiz' command (went unnoticed for God only knows how long because I always use the abbreviated ';w' form of the command).
1-07-06:
(v3.07)
- Lich wasn't recognizing the --directory parameter when being run in Windows; even though the chances of someone executing Lich from the command line and/or passing this parameter are all but nil, it's been fixed.
- Added the '--script-dir' switch; it allows you to set the directory Lich will search for scripts in. Example: lich.exe --script-dir c:\lichscripts
1-04-06:
(v3.07)
- Fixed a bug in repository.lic's NEW/UPDATED script tracking; the server uses UTC/GMT (international time independent of time zones), but the script was using the local time zone to compare against. This was causing some really screwy behavior; it's working the way I intended it to now.
- Altered the way spell time remaining was being formatted and printed out; bit faster now and certainly much cleaner code-wise.
1-03-06:
(v3.07)
- Corrected a few typos and one or two very slight mistakes (mostly concerning return values) in the 'Command Reference.txt' file, as well as updating the info and adding a few commands. That took me like 2+ hours and I didn't even add/change that much... it wasn't fun like the programming is either, it was boring. BORING AS HELL. God I wish someone who knows what they're doing would help me document stuff -- that's a plea, not a rhetorical statement, by the way ;)
1-02-06:
(v3.06)
- Tweaked room recognition for pathfinding a touch.
- Added tracking of the current room's description to StormFront mode, and implemented the necessary details for 'automap.lic' to function properly if the user runs Lich with StormFront. This should mean both 'automap.lic' and 'goto.lic' are fully compatible with SF now (as is the 'checkroomdescrip' command).
- Made the currently present NPC list reliable in SF (previously it was only trust-worthy for a 'true/false' kind of deal; it should now be accurate enough to depend on.)
- I'm pretty sure I've stomped out all the bugs that made 'load_automap.lic' only work some of the time; I've yet to find a room it messed up for, so I'm going to assume it's as close to 'totally reliable' as half-untested software can be.
- Added recognition of standing, kneeling, sitting, prone, stunned, hidden, dead, webbed, bleeding, invisible, and 'in a group' to the status information Lich tracks when used with StormFront.
- Made sure the commands for the above status checks (e.g. checkstunned, checkhidden, etc.) will recognize that the info is available now even in SF.
- Fixed a bug causing Lich's tracking of how full your head is (i.e., how much exp you have waiting to be absorbed) to be mistaken in SF.
- Fixed a bug causing Lich's tracking of your stance to almost always be tracked as 'offensive' in SF.
- Some minor efficiency tweaks to the SF status tracking routines and other minor changes to them for the sake of reliability.
- Implemented tracking of your prepared spell, right hand contents and left hand contents to SF mode.
- Altered the ';magic' list so that it won't clear a spell and remove it from the active list until its "melted" message is seen; if Lich's duration tracking is off, the spell will simply display as having 0 seconds left until it actually melts (if for some reason Lich doesn't ever see the melting message, see ';magic help' for info on how to get rid of the spell so it doesn't hang around there for eternity).
12-27-05:
(v3.05)
- checkmana/checkhealth/checkspirit were returning your current values if you asked them if you had 0 or more of the respective points left; they'll now act predictably and simply return 'true' if you have 0 or more, or 'false' if you have less (in this case, if you currently have negative points).
- Corrected some minor bugs in the behavior of 'checkstance' and tweaked its efficiency.
- script.vars[0] is now the whole line (the same way %0 is in Wizard scripts).
- Various cleanups.
- In Wizard, the difference between the game's clock and your local computer clock is resynchronized every 10 minutes, and the way this is done was removing any Watchfors (or any other variable tracing). This bug has been fixed.
12-26-05:
(v3.05)
- Fixed a bug causing the 'stunned?' command to be unrecognized and raise an error.
- Took out the leading tab from the alias list; it's now flush to the left side of the window. It's also sorted alphabetically now.
- Tightened the repository server's security even more (the server's security -- users are at no risk, of course).
12-25-05:
(v3.05)
- Added some standard GNU-style command line arguments for customizing the behavior of the program. Run Lich with the '--help' argument to see a list of available command line switches (of very little use in Windows).
- Added some functionality to the repository.lic script; run it with the argument 'help' (or no arguments) to see information.
- Added a trap for the SIGINT signal that will allow Lich to clean things up before being killed if this signal is received.
- A minor tweak I made to pathfinding just after getting it working, and just before building 3.04 somehow broke it... changed the half-a-line I altered back to how it was, which fixed it.
12-24-05:
(v3.04)
- The pathfinding algorithm (oooo, don't I sound so professional...) has been rewritten; it's faster, more reliable, and can handle plotting a course from any of the 1,000 test rooms to any other of the 1,000 test rooms in about half a second. Unfortunately, making the map file(s) suitable for such universal travel is turning out to require a lot more manual attention than I was hoping. Even so, goto.lic is coming along nicely and can be used for virtually any room in Ta'Illistim, what appears to be most rooms in Sylvarraend, and some random surrounding areas (I've taken to using it almost exclusively, but it remains in 'alpha testing' and should be considered unreliable).
- I've changed the timeout back to 2 minutes, and made it so that any instance of Lich which is unable to bind to the necessary port will just immediately exit itself (this happens if one instance has yet to fully connect, and will prevent multiple instances of Lich from running and doing nothing if people start it like 3 times).
- Executing the 'uninstall the Lich' shortcut will now restore your hosts backup before it removes the program. That stupid 'WARNING!' shit no longer applies; just make sure you run the shortcut and NOT the unins000.exe file from the directory.
12-22-05:
(v3.03)
- Even though execution of a script was ending if a line consisting only of '__END__' was encountered, the rest of the file was still being loaded into memory; this was causing pointless inefficiency, particularly for scripts like 'goto' and 'bestiary'. Now as far as Lich is concerned, the file ends if an '__END__' line is encountered.
- A script run in SAFE mode is no longer allowed to use the 'silence_me' command; an attempt to do so will generate a warning, but will otherwise be totally ignored.
- Fixed a bug in Wizard causing what was seen through the eyes of your familiar to be screwy.
- A bug was causing the next command sent to the game to be delayed after a script was killed or exited... fixed.
12-20-05:
(v3.02)
- Noticed that the 'exit!' (not 'exit') method bypasses exception handling and aborts execution immediately; added a catch for this to prevent a script that uses it from killing Lich instantly. It's now identical to 'exit'.
- At some point or another, I apparently wrote in a minor memory leak (it appears script files and all their data were staying resident in memory even after a script died)... this has been corrected. I also increased the overall RAM efficiency with some minor tweaking (it's become much less 'lightweight' than I would like, but I guess that's the price you pay for versatility).
- In Wizard, the status tags sent for what you're holding in your hands are always composed of three 15-letter strings, even if all 15 happen to be spaces. The method Lich was using returned the last two words instead of the last one word if one of those strings was the full 15-letters long (such as for 'a skull-pommelled claidhmore'). Fixed. It will now also check against the entire item name instead of the last word if you give the checkright or checkleft command(s) arguments (previously it was only checking if the last word matched). Still returns only the last word if given no arguments.
- An odd bug was making launching a script case sensitive; it's now case insensitive as I intended it to be.
- Found a bug in the storing of your currently active spells (usually when logging out, but it's saved at random times as well)... it was saving the duration for spells as whatever it was the last time you checked the list, as opposed to whatever it was at the time the script actually exited. This was causing pretty massive inaccuracy in some cases. Fixed.
- Updated the updatecheck.lic script to support automatic 'installation' when used in Linux.
- Wrote the 'Command Reference.txt' file; somewhat incomplete, but it covers the most useful ones (and what it doesn't cover is hopefully self-explanatory: it all follows the same pattern).
12-18-05:
(v3.01)
- Reformatted spell-list.txt to support mana cost on a per-spell basis (as well as adding them all). Also modified spellup.lic to take these mana costs into account when casting a spell.
- The test database for goto.lic now includes 1,000 rooms, and the "algorithm" I've been using for pathfinding has begun to fail miserably; there are too many branches. Automap.lic works 100% (finally), but the pathfinding has to be a whole lot better than it is or automap.lic will end up useless...
- The script 'cast' command will now use the mana cost that spell-list.txt defines if it's known. If not, it will continue to assume spells cost their level in mana.
12-17-05:
(v3.01)
- Improved current room identification for the purposes of pathfinding.
- Updated repository.lic to save any downloaded files in the operating system's default format, so that the file will always display properly regardless of what OS it was created in or downloaded to.
- Discovered that sometimes scripts weren't being given a chance to perform cleanup options before Lich exited (such as infomonitor saving your currently active spells, etc.). Fixed this; also cleaned up a good deal of random code to increase efficiency/decrease resource usage.
12-15-05:
(v3.00)
- Fixed a bug causing aliased commands with special regular-expression characters (such as brackets like [ or ], and parentheses, etc.) to do nothing except report an error to the user.
- Implemented the 'timetest' command. It takes an infinite number of proc objects, and times how long it takes to run each one 5,000 times; it returns an array of the resulting seconds (in the order of the procs you passed to it). This is just for people who would like to find out if a certain way of doing something is noticably faster than an alternative method. For example: timetest proc { checkhealth }, proc { checkmana }, etc.
- Fixed a bug causing a seemingly totally random alias to be deleted regardless of which one you tried to delete; it will now properly delete only the alias you specify.
- Made one or two tiny modifications to the basic framework of the engine in order to implement the 'automap.lic' script efficiently; it's nothing of interest to the general user, but it's going to make mapping out the entire game so much easier on me...
- The in-script commands for launching a new script (start_script, start_wizard_script, etc.) were yet again failing to succeed if the script using the command exited directly after it. Fixed (again).
- Every character now has a settings.txt file; if something odd should happen and Lich can't detect your character name for some reason, it will use the old 'settings.txt' file (this shouldn't really ever be necessary, but just incase). Otherwise, Lich will copy the 'settings.txt' file to a new character-specific 'settings-CharacterName.txt' file, and will from then on use the character-specific one for that char.
12-12-05:
(v2.99)
- Added some functionality to the Spell class... every now and then I find it comes in handy to search all spells known to Lich for a matching active/melting message, spell name, or spell number; I've made it easier so that hopefully anybody will be able to do it. If you want to see what a spell name is by it's number, just type: ;exec echo Spell[401] ... and if Lich knows what spell it is, it'll echo out the name. It will also recognize spells by name, active messages, and melting messages now (for example... ;e echo Spell['A brilliant luminescence surr'] would print out 'Elemental Defense III', or you could ask what the corresponding spell number for a name is by: ;e echo Spell['elemental defense iii'].num etc.).
- Added tracking of society status (CoL or Voln member and rank/step number), and recognition of the symbols of courage & protection to infomonitor. You'll need to type SOCIETY to let the infomonitor script see this information.
- FINALLY, a way to properly handle jumps popped into my head... they are now as flexible as every other command. You can use a 'goto' command in 'if' statements or wherever the Hell else you please. Note however that actual label declarations (the 'label:' lines) cannot be used within loops or 'if' statements.
- When reporting errors, Lich will now show the script's name and an accurate line number (accurate meaning the line number corresponds to the script file now; it may still be off because Lich can't properly track down precisely where the error is).
- Added support for downloading the latest Linux build of Lich with the updatecheck.lic script.
- Fixed an issue with detection/deletion of the temporary cache files used by Lich; a bug was causing them to hang around and waste disk space. They're now deleted properly at program exit and/or the next time Lich is run (if Lich crashes before it can clean up, it just deletes the stale cache files next time you run it).
12-10-05:
(v2.99)
- I've added recognition of quoted command line arguments when launching a script; for example, if you wanted the first script variable to be 'star ruby' instead of the first being 'star' and the second being 'ruby', you could type when launching the script: ;scriptname "star ruby" and it will recognize it properly.
- Slightly altered the behavior of the 'move' command to remove pauses and added a couple of 'move command unable to be processed' lines to what it recognizes as meaning the direction is impossible to move in. Also set 'reverse_direction' up to return false if it's unable to reverse the direction, as opposed to returning the direction it was given. I doubt anyone will notice these changes; I did it to facilitate auto-mapping the entire game.
12-09-05:
(v2.99)
- Added recognition of 'Running heedlessly through the icy terrain, you slip on a patch of ice and flail uselessly as you land on your rear!' (when going/coming to/from IceMule) to the 'move' command; it will recognize the unsuccessful attempt, stand, and retry until it succeeds. In Wizard, it will also skip the 'stand' attempt if you're already standing (if a group member pulls you up or something).
- I've changed the order in which Lich searches for a matching hosts directory... previously it checked the WinXP Pro location (C:\winnt\system32\drivers\etc) before checking the WinXP Home location (C:\windows\system32\drivers\etc). A particular user was unable to make Lich work for them because they have 3 different Windows system directories, all with hosts files (yes, 3 different dirs on 2 different drives; blame Gateway). It now checks the WinXP Home location, THEN the WinXP Pro location. If anyone notices that this is a problem for them, please let me know.
12-07-05:
(v2.98)
- Fixed a bug in SF that was causing empty game lines to be given to scripts instead of being silently discarded the way they are in Wizard; this was totally breaking the infomonitor.lic script and likely random other scripts that depend on Wizard formatting. Fixed.
- Implemented traps to catch a couple of force-kill signals (such as when a user CTRL-ALT-DELETE kills the program) and restore the hosts backup before the program terminates.
12-07-05:
(v2.97)
- Discovered Lich doesn't function properly on anyone's Linux setup but my own because of issues with the directory settings; fixed.
- Fixed a bug that made it impossible for Lich to find a script while trying to process an add to the favorites list in Windows. Thanks to Wrexem for pointing out ;add was plain broken in the Windows operating system.
- Lich wasn't recognizing command line arguments (such as '--directory /path/to/lich/dir', etc.) if you ran it from the executable (Lich was only detecting them when it was run from source); this has been fixed.
- Poor error handling during the loading of your favorites list could have caused fatal errors that resulted in your connection to the game being ghosted if something impossible to foresee happened (like, you [foolishly] delete your Lich scripts directory while Lich is running, and then try to load your favorites list or something equally unlikely happens). Proper error handling for this has been written in.
12-06-05:
(v2.96)
- Noticed a way that a very clever and malicious user who had studied the source code could conceivably have 'unset' the 'safe' option from within a script actually being run in SAFE mode. This obscure vulnerability has been corrected. Additionally, any Wizard/SF scripts will now run in SAFE mode. There is no option to change this. Since a Wizard/SF script can declare snippets of itself that are to be run as a Lich script, this is necessary -- there's virtually no reason a Wizard script would need access to Lich's more advanced features, and if it (somehow) has a legitimate reason to do so, it should be rewritten in Lich format.
- Added support for storing/loading settings and a few other things to spellup.lic (exclude list, duration options, etc.). Run the script for more details.
- Wrote the maparea.lic script; still working on the pathfinding script that actually uses the information the maparea.lic script collects.
- Corrected a bug in the ';force' command that was causing the entire line (e.g., [1] => ;force, [2] => calcredux, [3] arg1, [4] arg2, etc) to be passed to a script that was started like this.
- I'm frankly not entirely sure how aliases were being properly stored/loaded in Windows, because I (again) forgot to open the saved file in binary mode (necessary in Windows, does absolutely nothing in Linux)... I've changed it to the proper method, but some users may lose any aliases they've set up. Sorry guys.
12-05-05:
(v2.96)
- Slightly altered how a script is cleaned up when being killed to aid the 'before_dying' command.
- Implemented the script command 'no_pause_all'; it's the same kind of deal as 'no_kill_all': it just toggles on/off and prevents a script that uses it from being paused along with every other active script when you issue a ';pause all'. Even if a script has toggled this option on, it can still be paused if you target it individually (this has no effect on the ';unpause all' command).
12-04-05:
(v2.96)
- Added 'ua' as a synonym for 'unpause all'.
12-03-05:
(v2.96)
- Fixed a bug in Wizard/SF script processing that was causing any 'if_1' type lines to generate an error saying some gibberish about 'cannot convert nil to string'.
12-03-05:
(v2.95)
- Wizard/SF scripts will now give you an approximate line number of any errors encountered during execution (it's approximate because any commented lines are deleted before processing, so the line Lich is processing probably doesn't correspond to the document).
- 'fetchloot' and 'checkloot' will now recognize the unique item list seen when you have room descriptions turned off (i.e. 'You notice' instead of 'You also see').
- Fixed a quirk of SF that was causing the room description to be included in the list of items in a room.
- Fixed a bug that was causing an extra blank line to be sent along with an aliased command... this did nothing to the game, but was causing issues if you aliased particular Lich-recognized commands (for instance, aliasing the ;chat command would send your chat plus an extra blank chat).
12-02-05:
(v2.95)
- When dealing with very large Wizard/SF script files (sbc, maps, en, townhop, etc.), any 'goto' or 'match' label jumps were frighteningly inefficient -- it was searching every line one-by-one looking for a matching label every time the script wanted to jump; this is now done only once when a script is initially loaded, and only the list of found labels is searched when a script wants to jump. It's much more efficient and quick now.
- Wizard 'match' support was terribly setup... it was inflexible as Hell (had to stack them all one after another, so on and so forth). This has been completely corrected.
12-01-05:
(v2.94)
- Lots and lots of formatting changes toward 100% StormFront-script compatibility... waitforre implemented, matchre implemented, setvariable tweaks, deletevariable implemented, recognition of both %1 (Wizard-style) and %1% (SF-style) command line arguments for most or all quirky-differences, improvements to the Wizard save variable (every script has its own save variable, so that other scripts saving variables won't interfere -- however, if a script hasn't previously saved a value yet that run of Lich, it will use the last value saved by a Wizard script just like Wizard itself would do). In a nutshell, Lich should have full StormFront-script compatibility now as well.
- Implemented 'waitforre', which is basically the same thing as waitfor, except 'waitforre' takes an actual regular expression object (whereas 'waitfor' takes a string with regular expression syntax). Waitforre also returns the MatchData object, which can usually be treated as a string but has a number of useful methods that it supports; ignore it if you don't want to learn about how to make use of a MatchData object.
- Rewrote the tracking of StormFront's health, spirit, magic, stamina, and mind state to fix several bugs and improve the efficiency.
- Altered the LichNet script to avoid retrying a failed operation more than once (it's been locking up Windows users).
11-30-05:
(v2.94)
- Fixed a bug that was causing spell durations to be truncated in minutes (for example, surge of strength -- which lasts 1.5 minutes -- was registering as lasting 1 minute flat).
- The script command 'start_wizard_script' was not always being executed succesfully... fixed.
- A bug was causing Wizard scripts to never be checked for already-running instances. Lich will now only allow a single instance in the same way it does for Lich scripts.
- Implemented the script command 'force_start_wizard_script'; it just bypasses the already-running check like the 'force_start_script' command does for Lich scripts.
- Implemented the StormFront 'put .NewScriptName Variable1 Variable2 Etc' function of launching a new script to the 'put' command (when running a script in Wizard mode).
11-28-05:
(v2.94)
- Forgot about the almost-never-used 'nextroom' command in Wizard scripts... added proper recognition of this to the Wizard script routine.
- Added recognition of 'setvariable', 'counter multiply', and 'counter divide' to Wizard script execution.
11-27-05:
(v2.94)
- Fixed a bug in the 'checkpaths' script command that was causing 'n' to be detected as both 'n' and 'nw', 'ne', so on and so forth.
- Added the full cardinal directions to 'reverse_direction' (e.g., 'southwest', 'southeast', etc.), and added recognition of them to 'checkpaths' as well (so you can now either ask checkpaths if you can go 'nw', or 'northwest' and it will recognize both).
11-27-05:
(v2.93)
- Hopefully fixed a bug causing Lich to only detect a person's character name some of the time when used with SF.
- Fixed (another) bug that popped up on some 'uncommon' Windows setups that was again causing Lich to exit almost immediately after beginning execution.
- The 'marshal data too short' error that's been plaguing Windows users since I wrote the damn 'infomonitor.lic' script has finally been tracked down and properly smooshed. This should never, ever happen again.
- Fixed a bug in aliases causing the target to actually be permanently appended to the aliased command sent to the game every time you used them (sheesh).
11-26-05:
(v2.93)
- Corrected a bug causing some very rare Windows setups that have more than one copy of Windows on more than one partition to cause an error before proper error handling was in place, which forced Lich to abort execution with no hint to the cause.
- Increased the timeout wait to 30 seconds (up from 20 secs).
- Fixed a bug preventing single-word aliases from being recognized.
- Implemented the Lich command ';force', which bypasses the deliberate check Lich does to see if a script is already running. If 'test.lic' is already running, instead of typing ';test' to spawn a second instance of the script, you could bypass the safety checks and use ';force test'. I really, seriously don't like this command; it's sloppy, has a large margin for catastrophic screwups (endless loops that spawn a thousand scripts and crash Windows because you accidentally told Lich to keep executing the same script forever, stuff like that). You're much, much better off designing a script to coordinate itself properly and use threads to get its job done, but since I've been asked time and time again for this... be my guest, blow yourselves up.
- Implemented the script command 'force_start_script'; it's just a clone of 'start_script' that bypasses the 'already running!' check in the same way the command line ';force [script]' starts a script w/o checking if it's already running. For christ's sake, don't use this inside loops carelessly: if you don't pay attention to what'll happen when the script runs, you could easily bring down Windows faster than you can type ;k...
11-25-05:
(v2.92)
- Apparently two days ago I completely and totally broke skill/stat tracking instead of fixing whatever the fuck was wrong with it. I've rewritten it (all of it, argh), tested it, and it appears to be 100% functional (again).
11-23-05:
(v2.91)
- Implemented server-side support for caching your active spells & other tracked info on the server, so that people can play from work, save their spells, then reload them from another computer when they log back in from a different location.
- Wrote support for the server saving/loading of status info into the infomonitor script.
- Support for multiple bootable copies of Windows on multiple partitions has been added; also altered some of the old code to conform more to a Windows environment.
- I've added the standard 'thread' extension library; this will slightly increase the amount of RAM Lich uses (it will run just as fast, however), but advanced users can now make use of the Mutex and ConditionVariable classes. See any Ruby tutorial for full details (be careful, though, because if you do something like set the global thread critical value, Lich will probably freeze instantly [in short, this is a global setting that means "I (this thread) am absolutely critical and I must run until I finish," which of course will lock-up the data recv/send threads]).
- A new bug popped up in some of the Skill/stat/spell tracking code that used to work just fine for me... not sure if this will fix some issues others may have been having, but instead of a skill having a rank value of 'nil' when untrained, all skills should have the proper '0' ranks now.
- Corrected a bug in sonic blade song's spell-list.txt entry that was causing it to never be recognized as having melted and added cman surge as well as small statues.
11-22-05:
(v2.91)
- Implemented 'health', 'mana', and 'spirit' as synonyms for 'checkhealth', 'checkmana', and 'checkspirit'.
- Implemented 'stance' and 'stamina' as synonyms for 'checkstance' and 'checkstamina'.
11-21-05:
(v2.90)
- Fixed a couple of minor bugs in 'checknpcs' (only popped up when a user gave the command a creature to check for).
- Implemented 'count_npcs' -- it's silly, I mean all it does is execute 'checknpcs.length', but it's even sillier to force people to learn more than they want to bother learning to make use of everything Lich can do. So, it's now a usable command; returns how many critters Lich currently has tracked as being in the present room (still highly inaccurate in SF, and in Wizard (Lich implements this, it isn't a status tag or something nice & reliable like that) it requires a LOOK to ensure that Lich's info is as up-to-date as possible).
11-20-05:
(v2.90)
- Okay, so I was wrong, 'waitrt' nearly *always* waits too short a time... tweaked it a bit.
- Changed the 'pause' handling in Wizard scripts; Lich will now allow you to pause for fractional seconds, like '1.5' or '0.5' (the leading '0' is necessary, otherwise '.5' is trying to call the '5' method as a command, not declaring a number). Lich scripts have always been this way, so that's unchanged.
- Fixed some server bugs and added the random quotation at login... see the 'ignore.lic' script for details on how to turn this off.
- Removed the option to turn off PsiNet titles after discovering the latest PsiNet update added its own option to do that...
- Removed the 3-word limit to aliases (previously, an alias was only recognized if it was followed by no more than 3 words). There's now no limit whatsoever, if the line you send to the game starts with an alias, anything coming after it is used as the target. There still is no limit to how many lines a single alias can send (I suppose you could send hundreds, though I've never tried it).
- For some God forsaken reason, Wizard scripts were using put... no clue when I changed this, I've changed it back to fput.
11-19-05:
(v2.90)
- Fixed a bug causing some nasty scroll if you tried to start a script who's name included a character that has a special meaning in a regular expression (e.g., ';blah]' would scroll badly).
11-18-05:
(v2.89)
- My fix to 'waitrt' seems to have worked, but now it's frequently not waiting long enough... this command has had so much trouble for so long; increasing the time makes it pause for too long, but the more lag there is in the game when the command is used, the less accurate it becomes... I suggest that if you want a "super-safe" 'waitrt', that you manually add a 'pause 0.5' anytime you use 'waitrt' -- personally, I use 'fput' almost exclusively and don't want the command to wait a millisecond longer than is necessary, so it fixes itself with the 'fput'... I'm going to leave it as-is.
- Fixed a bug that was causing an 'alias error' if you both had no Lich aliases, and you used PsiNet aliases that sent commands which started with a blank space.
11-17-05:
(v2.89)
- I've reduced the timeout from 2 minutes to 20 seconds... originally, I made it 2 minutes so that people could login through the website w/o hassle, but it's more trouble than it's worth. If anyone finds that 20 seconds isn't enough time to start Lich & login, please speak up, because if it's going to cause issues I'll increase it.
- Lich will now default to making a 'guess' about which front-end you like to use (StormFront or Wizard)... Simutronics is sloppy (fortunately, in this case) and doesn't delete the file that their software uses to properly log you in. This file is what Lich uses to 'guess' at your front-end with, and since most everyone picks one front-end and basically sticks with it, this should be pretty accurate: what it comes down to is that Lich will, if not told otherwise, assume that you're using whichever front-end you used the last time you logged in. If you switch, this is obviously going to be wrong... so I've also added a check for the file 'wizard-mode.txt' in your Lich directory. Same deal as 'stormfront-mode.txt', if the file exists, Lich will obey and set itself up to work with The Wizard.
- Two new script commands, 'wait_until' and 'wait_while'. Each one takes a block of code, and won't return until that block returns a true value; also, if you pass a string to either, it will execute a 'respond' command and inform the user of whatever you gave it (if the statement inside the block is already true, meaning if the command won't wait at all, it doesn't display the string -- only shows it if it's going to be sitting there waiting). So for example, if you wanted a script to wait until you had enough mana to cast 414 (the 'cast' command includes the mana check, but doesn't actually wait until it has the mana), you could use:
wait_until("Waiting until you have enough mana...") { checkmana 14 }
cast 414
... and if you had the 14 mana to cast the spell, it would just cast the spell. If you had less than 14 mana, it would show "Waiting until you have enough mana..." in your game window one time, then wait until you had 14 or more mana (until the 'checkmana 14' statement was true), and then cast 414. 'wait_while' is identical, but it waits *while* the statement inside the block is true, and only continues when it isn't... so in the above example, if you replaced 'wait_until' with 'wait_while', it would pause until you had *less* than 14 mana, *then* attempt to cast the spell. Note that you don't need to tell it to say anything... you could just as easily use 'wait_until { checkmana 14 }' and have it pause w/o saying anything to the user.
11-16-05:
(v2.88)
- Fixed a bug that was causing any text highlighted as the name of an NPC to be handed to a script as its own complete game line (which was causing a 'get' to return stuff like "You also see a", then the next get might return "hobgoblin", next would be "and the Shaelun disk.", etc.). The data Lich sees from the game actually _is_ split into separate lines like that, but the lines are now pasted back together before being shown to scripts so that they see exactly what the user does in their game window (anything that's highlighted like an NPC is fixed, not just critters -- stats that have penalties when you type 'INFO', so on & so forth).
- Implemented 'multifput'; it's the same kinda deal as 'multimove', takes an array and performs the command for every element -- so:
multifput 'sign of striking', 'sign of smiting', 'sign of swords'
... is perfectly valid.
- Fixed a bug in 'waitrt' that only popped up in certain circumstances (caused an error message saying 'Time value must be positive' or some such).
- Removed Lich's alteration of the Gift of Lumnis messaging, it's compensation for the 'no dead bodies' bug in PsiNet, and the amulet thought fix as well. It's beginning to look as though Jamus doesn't intend to include a 'titles display off' feature... so I guess unless he does at some point, the Lich feature that does this has become semi-permanent.
- I forgot to credit Syyn for the list of spell durations that I was too lazy to look up, so, I'm doing it now: the spell durations were totally her, I just used the list she gave me. Thanks Syyn.
- Modified 'spell-list.txt' for the recent updates to the two cleric and two empath spells (cumulative durations), and noticed 313 wasn't there at all: tossed the info in (thanks to Tayre and Carene for the messaging).
11-14-05:
(v2.88)
- Fixed a bug causing left leg & right leg scars to be included in Scars.arms (that's what 'Scars.limbs' is for, 'Scars.arms' is just rhand/lhand/rarm/larm).
- Wrote the 'how it works.txt' file. I don't know why, but it's very difficult for me to look at things from any perspective other than 'intimate knowledge of everything the program does'... I just can't seem to put myself in the position of a user instead of the guy who wrote it. Hopefully the information in the file will be helpful.
- Corrected yet another bug related to the spellsong renewal cycle... it should now properly recognize when all of your songs drop, and appropriately begin the renewal timer the next time you start a song.
- You can now suppress both the 'exec active' and 'exec finished' information echoing when using the 'exec' command. Just enter 'execq' (or 'eq'), and it won't say either of them.
- Implemented the script command 'quiet_exit', which doesn't send any clutter to the game window and will toggle off/on Lich notifying you when a script exits (errors will always cause a notification). Use it once and Lich will _not_ say anything when the script finishes, use it again and Lich will go back to informing you when that happens.
- Fixed a bug causing 'toggle_echo' to do absolutely nothing. Works again now. Also, modified both 'toggle_echo' and 'silence_me' to not output any message when being turned on/off, and 'silence_me' now has no influence on echoing data, only on whether commands sent to the game are shown or not (so one 'toggle_echo' will turn any 'echo' commands off, but the script will still show you what it's sending to the game... one 'silence_me' will allow any 'echo' commands, but will _not_ show you what the script sends to the game).
- Removed the 'no_kill_all' echo; it's now silent as well.
11-13-05:
(v2.87)
- Implemented the 'Gift' class... poke around the top of 'lich-lib.rb' if you want to know the details. If you use the infomonitor.lic script, it tells you how long you have left in your triple/double Gift of Lumnis rate(s) anytime you check your experience (if you don't use 'infomonitor', it does nothing).
- Fixed a bug in spellsong duration causing the time until your next renewal to be totally screwed after just logging in (it will now properly store & reload how long it'll be until your spellsongs renew).
- Fixed another bug in spellsong duration, which was causing a spellsong to be removed from the list of active spells if you checked its duration before Lich saw your songs renew (if you weren't singing any songs, then started one and checked your Lich magic list before Lich saw your songs renew, the song was deleted from the list of active spells).
- Fixed a typo in infomonitor.lic that was resulting in Harness Power ranks being saved as Spell Aiming ranks.
- Fixed a bug in 'Skills.to_bonus' causing it to return the same number it was given as opposed to the equivalent skill bonus of that number.
- Corrected a bug causing inaccurate identification of which spell melted if a given 'spell melted' line matched for more than one spell (for instance, sonic weapons melt with 'Your sonic longsword dissipates.', and sonic armor melts with 'Your sonic barrier dissipates.', and to properly track any sonic weapon, sonic blade song's melting message is 'Your sonic (any_word) dissipates.' -- that matches for sonic armor as well... this is fixed).
- ... discovered the bugfix mentioned directly above is not universally effective; my fix improves the issue, but I can't think of any way to make it absolutely impossible for a spell to be mistaken for a different one (if 2 spells are both active at the same time, and have melting messages who's regular expressions match eachother, it's always possible one will be mistaken for the other... if only one is active, it'll be identified properly, but that still leaves a margin of error). Users are just going to have to be cautious if they add spells and make sure the regular expressions are unique (all included spells, to my knowledge, are 100% solid); I don't think a way around this even exists.
- The first time you run Lich, it will now add the 'infomonitor' and 'lichnet' scripts to the global favorites list with a little schpiel about what they do and how to remove them if you want to (this is tracked by the 'notfirst.txt' file, so you guys that have been using it all along will never even notice).
11-12-05:
(v2.87)
- Fixed a bug in 'start_script' that was causing it to fail silently if the script using the command exited immediately afterward.
11-11-05:
(v2.86)
- Help menu had gotten too long... rewrote the notes & chopped them out. To see them, 'help full' -- plain 'help' returns only the list now.
- Aliases were recognizing regular expressions, but weren't able to match what to send instead of the aliased command... this is fixed.
- Modified the format for the spell-list.txt file (again) to help support the 'spellup.lic' script I just tossed together.
11-10-05:
(v2.86)
- Major enhancements to the infomonitor.lic script; tracks spellsongs, time until song renewal, can distinguish between striking/smiting/swords and warding/defending/shields, and tracks every other CoL sign I thought was feasible.
- Major additions to the core; by itself, it tracks nothing, but coupled with the infomonitor.lic script it tracks your skills, spell circles, stats, level, gender, age, total exp, active spells/spellsongs/cmans, and profession; these are saved automatically for use next run (much like PsiNet). The classes from the previous day's changelog (Spell, Spells, Stats, Skills, and Spellsongs) contain a spattering of formulas for calculating things like your spellsong duration, sonic shield bonus (enchantment), random other junk.
- Corrected aliases so that any Lich-recognized commands will be properly handled (if you alias 'test' to be replaced with ';test', it will now properly start the script instead of sending ';test' to the game, for example).
- Implemented the '.active?' method for the Spell class; returns true or false if the given spell is active... so instead of being forced to go through 'Spell.active?(401)', for example, you can now call it directly from a given spell object (either through 'Spell[401].active?', or 'spellobject = Spell[401] ; spellobject.active?', or whatever's convenient at the time).
- Implemented the '.circle' method for the Spell class. It's just the numeric representation of the spell's circle, e.g. minor elemental is '4' (400s), paladin is 16 (1600s), etc. Also implemented '.circlename', which is the nice-and-neat text (e.g, 'Minor Elemental', etc.)
- Implemented the command 'script.feedme_upstream'; it's identical to 'toggle_upstream', except the script will continue to receive lines from the game (so after using this command, the script will be fed both what you type to the game, and what the game sends to your screen). The commands to use this data are the same (that is, 'upstream_get', 'upstream_waitfor', etc.).
- Altered the LichNet client script to properly format LichNet chats in StormFront (that is, properly display them as thoughts).
- Other random junk I can't really remember...
11-08-05:
(v2.86)
- Fixed a bug in 'upstream_get'; a typo was preventing it from being functional at all...
- Added the classes 'Spells', 'Stats', and 'Skills'. On their own, these do nothing, but they provide the basis for tracking of spells known, stats, and skills by infomonitor.lic. Skills is the only really complicated one... for all skills, you can query Lich for your current ranks in a given skill with Skills.(skill), where '(skill)' follows this rule: for mana control, it's the 3 letter abbreviation (e.g., mmc, emc, & smc). For lores, it's the first two words abbreviated followed by the full word (e.g., mlmanipulation, slblessings, slnecromancy, etc.) -- for all other skills, it's the full skill name as one word (as defined by the 'skills' game output, so your survival skill is 'Skills.survival', your two weapon combat skill is 'Skills.twoweaponcombat', hiding is 'Skills.stalkingandhiding', etc.). Spells are just the full name as one word, so MnE ranks is 'Spells.minorelemental', bard spellsongs are 'Spells.bard', and so on. Stats are the first 3 letters of the statistic, which is an array -- first value is that stat, second is the bonus (e.g., 'Stats.int', 'Stats.con', etc.). So if you had a STR of 100 with a bonus of 25, 'Stats.str' would return '[100,25]'.
- Added the command 'multimove', and made all the cardinal directions recognized w/o quotes (all lowercase abbreviations: n, ne, e, se, s, sw, w, nw, u, d, out). 'multimove' takes an array of directions to move in -- so for instance:
multimove ne, w, e, s, nw, u, w, ne, 'go stair', out
... would work just fine.
- Implemented the 'Spellsong' class... it's got some random junk, just look at 'Spellsong.methods' if you're interested.
- Implemented the 'Spell' class (don't confuse it with the 'Spells' class). It's really neat, but I may be the only one who'll get much use out of it... any spell in 'spell-list.txt' from your scripts directory will be an object of the 'Spell' class, each with instance variables corresponding to all the information in that file. You probably have no idea what I'm talking about... put it this way: every spell from that file is now known by Lich itself, and you can ask for it if you have any reason to with the following: Spell[(# or name, abbrev. okay)] returns the object itself, and you can ask that object for data it's carrying around in the usual method (object.method) -- so it's name is .name, duration is .duration, message seen when becoming active is .msgup, message seen when melting is .msgdn, spell # is .num, and whether it stacks or not is .stacks. Since this is probably gibberish so far, here are a couple of examples... say you wanted to know the name of a spell # -- 'Spell[401].name' would return it. Or the # of a spell's name? 'Spell["elemental defense I"].num' would return it. Your active spells are in Spell.active (that's just an array of your active 'Spell' objects, so they all support the same thing); the entire list is in Spell.list (it's an array of all of them), and so on. NOTE that I do NOT recommend adding every spell in the game to spell-list.txt 'just for the Hell of it' because the infomonitor.lic script scans every game line for every msgup/msgdn in that file, and if you have no use for what you're adding, the only thing you're accomplishing is giving your computer even more work to do.
11-06-05:
(v2.85)
- Added complete support for administrator-privileged names on LichNet.
11-05-05:
(v2.85)
- Fixed a bug causing an 'alias error!' message from Lich anytime you sent a blank line to the game. In fixing this Lich bug, I've discovered there's a bug in Wizard: the numpad 'enter' key sends the last command you entered, then also sends a blank line to the game; this appears totally harmless, and is ignored by Lich just like any other empty line sent to the game is.
11-04-05:
(v2.84)
- Changed the extension of the spell list from .dat to .txt; it was .dat when the file was a dump of the serialized hash, and now that it's plain text, it should have the file extension of a plain text file.
- Fixed a bug in the spell tracking of 'infomonitor.lic' causing it to improperly recognize spells that included regular expression syntax. The 'spell-list.txt' file now fully supports regular expressions. Added some more quick info about how to add spells to the file.
- Added/corrected some of the spells from the 'spell-list.txt' file.
- Implemented the script command 'before_dying'. Handiest command I've added in weeks -- it takes a code block (a 'code block' is just the name for what's inside brackets, basically): it does nothing at the time this command is encountered, but right before the script is killed, the block is executed. You can add as many of these blocks as you want to; you can only remove all of them, not just specific ones though -- the command to remove them all is 'undo_before_dying'. A detail that makes it even more useful, but could trip you up if you aren't paying attention: the block of code is executed in the *same environment it was declared at*. This means that if you declare a code block to be run as the script is dying, any variables that existed at the time you declare the block can be used inside the block -- but if a variable didn't exist then, it doesn't exist inside the code block. Here's an example:
variable1 = "I exist"
before_dying {
echo "Hi! You just killed me, so I'll exit now."
echo variable1 # 'variable1' existed when the 'before_dying' command was used, so this will echo 'I exist' to the user
echo variable2 # 'variable2' didn't exist until after the 'before_dying' command was used, so the script will cause an error at exit
}
variable2 = "I do not exist"
- Implemented the script command 'abort!'; it does exactly what 'exit' does, except any 'before_dying' code blocks are totally ignored and will not be run.
11-02-05:
(v2.83)
- Massive speedup to the spell tracking of infomonitor, other random cleanups/speed improvements.
- My change to RT tracking yesterday was too fragile; the time offset between your computer and Simu's is now re-synched every 10 minutes.
- Implemented the new script command 'reverse_direction'... it takes a cardinal direction (must be lowercase & abbreviated, e.g. 'sw' instead of 'southwest', etc.) and returns the reverse of it (so 'sw' would return 'ne', etc.). It's used by the 'walk' command, might as well just have it usable.
11-01-05:
(v2.83)
- Some speed/efficiency improvements in 'regetall'.
- Improved the efficiency in the tracking of your RT (for use with 'waitrt'); unless your clock is off by a second or more a day and/or you stay logged in for 24+ hours at a time frequently, it's just as accurate, and the overall speed of Lich is improved (I suppose if your clock is set to auto-update every hour or something, this could cause problems; tell me if you experience reliability issues).
- Implemented aliases just for the Hell of it, since Lich is on the other side of PsiNet and it could come in handy (albeit rarely).
- Implemented the 'excludeloot' Lich setting (e.g., 'Lich.excludeloot'). Same basic thing as 'Lich.treasure', except any item found in 'Lich.excludeloot' won't be taken with a plain 'fetchloot'. Also updated/slightly improved the settings.lic script accordingly (like 'treasure', this is a comma-separated list so that it supports multiword items).
- Cleaned up some of the initial loading of settings and whatnot at program execution.
- Implemented the 'i_stand_alone' script command. It removes the script in question from *all* of Lich's normal data feeds. It can query Lich for any status information through commands like 'stunned?', etc., and otherwise act just like it normally would, but it will be 100% blind to data in the standard 'script queue', 'unique queue', 'upstream queue', and 'status queue' (note that this means it can't properly execute 'intelligent' commands that try and ensure a given action succeeded, like move/fput/cast/etc.). The command toggles this on/off; most of the resource demands made by active scripts is due to Lich having to constantly share the data it sees with them: a script that 'stands alone' takes very, very few resources in comparison.
- Corrected a PsiNet Voln Thought bug (same as what's plaguing the amulet).
10-26-05:
(v2.82)
- Added 'u' as a synonym for 'unpause'.
- Fixed a bug in 'checkpcs' & 'checkfampcs' causing 'Shaelun who is sitting', and other similar things to be returned as part of a person's name.
- Fixed a bug that could have prevented data from being sent to the game if you tried to send to a paused script.
- Fixed a bug that could have prevented you from targetting a script if an almost identically-named script was also running (e.g., if you were running 'echo' and 'echo2' both, depending on what order you started them in, it may have been impossible to target 'echo' until 'echo2' was no longer running -- you can now always target any script by entering it's full name and not an abbreviation).
- Added 'person:msg' as a shortcut for 'chat TO person MSG' (e.g., ';shaelun:hi there')
- Fixed a bug that was allowing a second instance of a running script to be launched if the already-running instance was paused.
10-25-05:
(v2.81)
- Added some commands (chat, who).
- Server tweaks.
- Fixed a bug in familiar vision causing incomplete/inaccurate/repeated lines to be sent to scripts.
- Implemented tracking of the last seen room description. 'roomdescription?' and 'checkroomdescrip' are script commands that will return that description. Familiar vision will not be mistakenly tracked as your room. You can give both commands as many strings to search for as you want, and it'll return the matching room description.
- I wasn't able to implement script-pausing with the level of efficiency that I wanted, but I'm sick of wrestling with it, and it's still using a callback instead of polling... The method I've used will allow a script to process whatever it likes internally whether it's paused or not, but if it tries to read gamelines, echo data, or send data to the game (practically everything a script does...), the 'paused' state will postpone the call from returning until the user unpauses the script. For Wizard scripts, because of their simplicity, a pause is more absolute. I doubt you'll ever even notice this detail of implementation, but bear in mind that a pause does not instantly freeze a script right where it is. Also note that a script will continue to be fed game lines while paused, it just won't be able to do anything about it until it's unpaused.
- Implemented the new script commands 'pause_script', 'pause_scripts', 'unpause_script', and 'unpause_scripts'. pause/unpause script/scripts are the same in singular or plural form, it's just to help people not have to remember every letter of every one of the now 150+ commands. If 'pause_script' is given no names of scripts to pause, it pauses the script using the command. They all accept an infinite number of names of scripts to act on.
- Modified Lich's behavior while processing Wizard scripts; previously, despite compensating nicely for attempting an action while in RT, Lich just sent the thing anyway. It now behaves like Wizard itself, and will wait until your RT is over to continue processing the script.
- Implemented the command 'waitrt?'. 'waitrt' will expect you to know what you're talking about, and will sit and wait until you're actually in RT until it starts waiting -- if an action doesn't always cause RT, this will unpredictably hang a script. 'waitrt?' will only wait for RT to end, if you are indeed in RT to start with. If you aren't, it immediately returns -- the downside here is that Lich could easily have sent the command to the game, checked for RT, seen that you aren't currently in RT, and gone on to the next part of your script long before the game has had time to react and tell Lich you're in RT. This will almost certainly happen if you use 'put' -- if you use 'fput', it almost certainly will never happen.
10-22-05:
(v2.8)
- Changed the format of 'spell-list.dat' from a data-dump to a plain ASCII text file. This will allow it to be edited, corrected, added to, and otherwise tinkered with by almost anyone who can copy/paste the necessary lines from the game. Also improved the efficiency/speed of the infomonitor script itself.
- Yet more random code cleaning to improve efficiency.
- Fixed a bug in 'take'; it's supposed to put whatever is in your right hand in your Lich.lootsack setting if both your hands are full, and then take it back out when it's finished with all the items you passed -- which is what it does now. The bug was causing it to do the opposite and try to 'take' and 'put' boolean values...
- Fixed a bug when loading your favorites list; it wasn't properly registering the 'start quietly' value, and was causing a 'true' value to be passed to scripts as a variable as though you had typed it when starting the script yourself.
- Minor tweaks to support LichNet.
10-21-05:
(v2.7)
- Implemented the 'die_with_me' command. It accepts an infinite number of arguments, and it will cause any scripts who's names match what you give it to also exit whenever the script using the 'die_with_me' command does (whether it's from an 'exit' command in the script, manual kill, whatever -- makes no difference). Note that these scripts are silently killed; you won't be notified that they've exited, but they will indeed be killed. Example: die_with_me('calcredux', 'calcflares', 'test')
- When loading your favorites, it will now announce what scripts were loaded on one line as opposed to every script announcing itself on a line of its own. You can also enter 'quiet' as the first command line variable when starting a script to squelch the 'blah-blah active' message. Example: ;calcredux quiet
- Changed the favorites list. There's now a global list that applies to all chars, and a character-specific list for every character. You can also abbreviate names when adding scripts to the list now. See the live help menu for usage info. Also, you needn't manually switch over -- the first time you run v2.7, it will convert your file to the new format (all existing favs become global).
- Changed 'checkspell' to 'checkprep' (it's also 'prepped?' now), and in its place implemented a new 'checkspell', which requires the 'infomonitor' script to be running to be of any use. It's also 'active?' and 'checkactive' as well. It accepts the name (not number, abbrevations accepted) of any number of spells to check for as currently active. If they're all active, returns true. If any one of the spells it's given aren't currently up, returns false. Example: checkspell "elemental defense I", "elemental target", "elemental barri"
- Rewrote the 'about' information to, well, be more of a blurb 'about' the program.
- Implemented the 'variable' command. It's just a more simple way of saying 'script.vars' (and it's easier to understand wtf it means). So the first command line variable is 'variable[1]', second is 'variable[2]', and so on.
- Wrote what I hope is an 'okay', tiny script tutorial... again. I was going to write more, but... I'm about to gouge my eyeballs out, so I'm done now.
10-20-05:
(v2.7)
- Fixed a bug in 'checkpoison' and 'checkdisease' causing various reliability issues.
- Implemented 'survivepoison?' and 'survivedisease?'. These either return true if you'll still be alive when the poison/disease ends, or false if you'll be dead (obviously this is going to be inaccurate if you intervene by doing stuff like getting healed, etc.; it's just whether or not it'll kill you if you do absolutely nothing)
- Fixed a bug in 'matchtimeout' causing it to improperly return a matching line.
10-19-05:
(v2.67)
- Fixed a bug in the 'send_script' and 'send_scripts' command... they were sending data to the non-unique stack of scripts that were set to not receive game data at all; this was causing massive instability when dealing with huge levels of data, such as when processing all logs with the 'filefeed.lic' script, etc..
- Improved 'waitrt' in both Wizard & SF.
- Discovered PsiNet is looking for the Gift of Lumnis message (when you type 'experience') as being: "You feel a strange sense of serenity, and find you are able to reflect on recent events with uncommon clarity and understanding." It's changed, and is now... "You feel a strange sense of serenity and find that you are able to reflect on recent events with uncommon clarity and understanding." Lich now includes an option to alter this string so that PsiNet will track your gift cycle as it always has (defaults to doing this at login).
- Implemented tracking of health/mana/spirit, max health/max mana/max spirit, stamina/max stamina, current mind state (muddled, fried, etc.), current stance, current char name, and currently present PCs when running with SF. These should all be as reliable in SF as they are in Wizard (moreso in the case of the PCs, which requires no 'look' to ensure is updated). Please email if you find problems with any of these. Also implemented is 'sorta-kinda NPC tracking'... this shouldn't be relied upon yet, but it *is* good enough to tell you if there's an NPC in the room or not. To be blunt, it's ghetto-hooked so that the 'walk' command functions properly, and shouldn't be used for anymore than true/false kinds of things. Naturally, any commands based on this info are now functional in SF (checkpcs, percenthealth, blah-blah-blah). Also implemented the new commands 'stamina?', 'checkstamina', 'maxstamina', and 'percentstamina' -- these are only available in SF. They work the same as their pre-existing counterparts.
- Scripts should no longer receive death announcements when Lich is running with StormFront (e.g., ' * Shaelun just bit the dust!'); this was an oversight, and if anyone notices any other minor differences that could result in incompatibility between Wizard/SF, please email and let me know.
10-18-05:
(v2.66)
- Fixed a bug preventing status info from being updated whenever you were in RT.
- Updated the included directions file.
10-16-05:
(v2.65)
- Improved 'matchtimeout'. It will no longer wait until a game line is received to return (which it previously did even after the timer had expired). It will now immediately return the matching line found, or immediately return 'false' if the timer expires. It will also accept fractional seconds now. Example: matchtimeout(0.5,"You stand up")
- I've implemented a temporary work-around for three bugs introduced in the recent PsiNet Title update of the PsiNet client: one, the spacing/extra-blank-line bug with amulet thoughts; two, the failure to see a corpse as "the body of blah" in Wizard; and three, that there's no "I do not want to see the PsiNet titles of others," settings. See in-game help menu for more info. This is temporary, and will be removed whenever Jamus updates PsiNet.
10-15-05:
(v2.65)
- Changed 'waitrt'; with any luck, all remaining problems plaguing this command should be remedied now...
- Added support for tracking/recognition of hard RT to SF mode.
10-14-05:
(v2.64)
- Fixed a bug in 'Wounds.arms'/'Scars.arms' causing them not to check leg wounds/scars.
- Changed both 'Wounds/Scars.arms' to just return hands/arms. 'Wounds/Scars.limbs' will now return both arms/hands and legs.
- Fixed the server/updatecheck script. You can now properly d/l the installer.exe files without them being corrupt.
10-12-05:
(v2.63)
- Fixed a bug in 'checkright', 'checkleft', 'righthand?' and 'lefthand?' causing them to be unreliable when given items to check against. They'll properly return either the item that matched, or false if none of the items matched now. Also modified them to return false if you're holding "Empty" (meaning there's nothing in your hand), so you can now 'if righthand?' etc. to check if a hand is empty or not.
- Fixed a bug in 'take'.
- Fixed a bug in tracking of how full your head is... levels are not 1-7 as I originally thought: there's an 8, and without the status tag, it's impossible to detect it (Wizard shows you as fried at 7, and so does 'exp'). My current assumption is that it means nothing more than "100% fried," as in you truly cannot hold anymore XP at all, whereas at 7 you still have a smidgeon left to go. Lich will now also track you as being at level 8 if it doesn't recognize the status tag sent by the game (this bug made me realize that there *is* a legitimate 'beyond fried' level, though how you get there is something I can't recall... hence the reason for assuming anything unrecognized = 100% fried).
10-12-05:
(v2.62)
- Implemented 'Wounds.arms' and 'Scars.arms'; these return the rank of the most severe limb wound/scar (rarm/larm/rhand/lhand). Note this will be 0 if there aren't any.
- Implemented 'Wounds.torso' and 'Scars.torso'. Same as above, but for reye/leye/chest/abs/back. The reason for these is because herbs required to heal said body parts are the same.
- Added recognition of 1030's mana cost (20 unfocused, 15 focused) to 'cast', and fixed a bug causing it to not recognize 'spell hinderance for some' messaging during a spell failure.
10-11-05:
(v2.62)
- Fixed a bug in SF RT-tick tracking that was causing the value to always be 0.
- Updated 'fput' to be more efficient and use status info to determine when it should next try to send a command, as opposed to just retrying every second. Note it still sends an initial try without checking status to make sure a particular command is one that can't be executed while afflicted with the current ailment (e.g., so that fput("info") will still work while webbed, for example)
10-10-05:
(v2.61)
- Added tracking of room areas, room titles, and the RT tick to SF mode (note it still doesn't track your actual RT, just Simu's clock).
- Cleaned up 'fput' & 'forceput' some. Random minor tweaks/optomizing, etc.
- The Lich-code in a Wizard script wasn't being recognized as actual Lich code... this has been fixed, and since a single closing squiggly-bracket ('}') is so frequently used, I've changed the syntax; the block of Lich-code is now terminated by '} LICH', as opposed to simply '}'. Note that you can have as many of these Lich-blocks as you please. Ex. follows:
(do Wizard stuff)
LICH {
(this will be executed as though this block were an actual Lich script)
} LICH
(back to Wizard stuff)
- Implemented the script command 'running?'; it takes an infinite number of script names to check for. If every script you give it is found to be currently active, it will return true. If any 1 script you give it isn't running, it returns false.
- Added recognition of "You don't have a spell prepared!" to 'cast'.
- Added a check for a filename called 'stormfront-mode.txt.txt', since Windows is a pain in the ass and will create that file name without you knowing it if you aren't careful...
10-09-05:
(v2.6)
- Implemented 'maxhealth', 'maxspirit', and 'maxmana' (and the tracking to go with them in Wizard). These are very simple method calls, and all they do is return your max health, spirit, or mana as an integer, so you can use them straight in calculations (ex: 'if health? < maxhealth', etc.)
- Labels are no longer case sensitive. This is handled in such a way as to allow two labels with the same name, but different cases as well... say the label 'main' exists, but 'Main' also exists. If you 'goto "main"', you will always goto 'main', it will never find 'Main' first and jump there instead. The reverse is also true -- as long as you provide the exact name with 'goto', you can be sure it'll jump to the right label. Basically, if it can't find the exact label you provide, it scans for a case insensitive match, and if it finds that... jumps there instead, assuming you meant that one. But it only looks for a case insensitive match if it can't find a case sensitive match.
- Fixed a bug causing anyone with the prenames 'Apprentice', 'Novice', or 'Journeyman' to be tracked by Lich as a person named 'Apprentice', etc. Also drastically increased the efficiency of 'checkpcs'; much, much faster now.
- Improved 'settings.txt' handling, made a few changes, and wrote the 'settings.lic' script to provide a much-needed interface to editing your settings file (run the script to see help info). 'treasure' is now separated by commas to allow compatibility with items that have multiple words; there's no need to re-define all that junk, Lich will automatically convert it (and add anything you don't have, like 'user0-9' for Wizard scripts, like it should have been doing all along).
- Changed the server so that the list of scripts available is sorted by modification time (oldest to newest) and shows the file size/date. Also improved the security (as in, my security -- users are at no risk whatsoever, unless they d/l and run a malicious script without the 'safe' option), and set it up to allow files with '.wiz' and '.cmd' extensions to be uploaded/downloaded (in addition to '.lic' Lich scripts). So you can now post any Wizard scripts you think are rare, useful, and worth eating away at my bandwidth/disk space for ;)
- Implemented the script commands 'percenthealth', 'percentmana', and 'percentspirit'. If not given an argument, they simply return what percentage of health/mana/spirit you have left as an integer (if your max health were 160, and you had 80 health currently, the command 'percenthealth' would return 50). When given an argument, they return true if your current percentage is larger than the number provided, or false if it isn't (e.g., if you again had 160 max health & 80 current health, the command: percenthealth(50) would return true, but: percenthealth(49) would return false, because you've got 50% of your max health, and 49% is of course less than 50%).
- I have changed 'match'!! Any old scripts may be incompatible. It now works exactly like Wizard -- you can pile up 'match' labels/strings, then issue a 'matchwait' and have it jump to the appropriate label exactly like Wizard does. Syntax is a little different and follows:
match 'labelone', 'i am a game string'
match 'labeltwo', 'i am another game string'
matchwait
... you can pile up matches all day long, there's no limit, but they *must* be in that format, and they *must* have two arguments ('label', 'string')! This is the reason some old scripts might not be compatible: if you give 'match' any other number of arguments, it functions exactly as it has (a clone of 'matchwait'), but if you give it two arguments, it functions in the classic Wizard style. 'matchwait' will be 100% compatible, because if you give it any arguments at all it'll function as it always has, but with no arguments it too functions in the classic Wizard style (as seen above).
10-08-05:
(v2.6)
- Drastically increased the speed of regetall, and replaced the old XML cleaning method with the new one.
- Implemented the script command 'matchfindword'. It's extremely similar to matchfindexact, but it doesn't care about case... it *does* care about spacing, however. It works in the same style, but instead of returning *everything* where the question mark is, it returns only a single word. So, for example:
name,family_name,race = matchfindword("Name: ? ? Race: ?")
... will match the string, "Name: Shaelun Leshruc Race: Human Profession: Bard (shown as: Bard)" (from when I type 'info', FYI), and return the words that were placed where your question marks were (in order). So 'name' => 'Shaelun', 'family_name' => 'Leshruc', and 'race' => 'Human' in this example. Like the other 'matchfind' commands, it accepts an infinite number of question marks. If you used the match string from the above example, and the character had only one name -- it would hang forever, because it's looking for a single word wherever there's a question mark... but their string would be 'Name: Somebody Race: Human', so there's no word inbetween the first name and 'Race:' like you told it to look for.
10-07-05:
(v2.6)
- You can now use Lich-specific code, with the same exact formatting/syntax rules from standard Lich scripts, inside a Wizard script. I'm not 100% positive why you'd really want to, but you can do it... suppose it could be handy for dealing with things in the simple Wizard style, and using a Lich-snippet for the complicated stuff. The syntax is VERY IMPORTANT here -- and the script must still be run as a Wizard script (by starting it with ';wiz [script]') -- if the two lines aren't exactly as stated, it will not work (will probably just be ignored):
LICH {
(do lots of Lich stuff)
}
... this is *absolute*, it *must* be flush to the left-side of the line, there must be a space between 'LICH' and the opening bracket, '{'. Also, the closing bracket *must* be flush to the left-side of the line as well.
- Updated the server and repository.lic script to allow the author of a script to update/re-upload a script, and to timestamp all scripts as an ad-hoc 'version number' (or at least an indication of whether there's a newer, bigger, better, or whatever version available).
10-07-05:
(v2.5)
- Fixed a bug involving NPCs and their 'highlight this' tag, which was popping up in very unexpected places... checkloot, fetchloot, causing an entire screen to be highlighted, etc.. Fixed.
- After benchmarking, switched the method call for the basic sending/receiving of data.
- Fixed a number of sloppy mistakes dealing with... technical... stuff. Suffice it to say, a number of very odd errors related to object IDs have been fixed.
- Added the 'lich-char.txt' file. You'll find it in your Lich program dir; you can change what character you want Lich to recognize as a command by using it. Note: if you change the default and things just don't work, remember that you a) have to make sure JSE/Wizard/SF aren't stealing the command as theirs before it gets to Lich, and b) that it must be unique, otherwise things like your encrypted login key will be interpreted as Lich commands.
10-05-05:
(v2.4)
- Fixed a bug in 'fetchloot' that caused it to think the first item in a room was an empty string, making it send 'take ', and 'put my in my cloak' to the game, for instance.
- Wrote the 'updatecheck.lic' script, and threw together the server that it connects to on my box. Note that I wrote this server from scratch, and you're connecting to my home computer, so don't expect blazing speed or anything.
- Expanded the server to include the script repository, and wrote the 'repository.lic' script, which lists/downloads/uploads/views files to/from the repository server I'm running.
- Lich no longer passes arrival/disconnect messages to scripts. Note that it doesn't bother slowing itself down by passing these even to status scripts (this is the only data a script is unable to access). If anyone would like me to add a check specifically for that, speak up and I will, but since I have no use for it and I don't think anyone even uses the status script feature to begin with... I'm not going to slow Lich down with it.
- Tweaked Wizard script interpretation some more.
10-04-05:
(v2.4)
- Cleaned up the 2 month old file-checks... they now take half the time, so when executed, that part of Lich starts twice as fast; with the size of Lich's extension library at this point, startup time is actually becoming pronounced...
10-03-05:
(v2.3-v2.4)
- Added 'checkwebbed' and 'webbed?' as script commands.
- Added 'muckled?' as a script command. If you're webbed, stunned, or dead... it returns true. If you're none of those things, it returns false.
- Fixed a stupid bug in Wizard 'waitfor' scripts... it wasn't chopping off the linefeed, so it was waiting for a line that can never be seen. Also fixed a bug that caused a Wizard script which issued a 'pause' without a second duration, to sleep for all eternity (the default is to sleep until you're woken up in Ruby...)
- Since I had the info from the Warlock project's docs, I added a check for a file in the Lich dir called 'dr-mode.txt'. If this file exists, Lich will set itself up to intercept a DragonRealms connection; 100% untested, but if the port/ip hasn't been changed, should work just fine. It'll even track half the status info, since it'll be in Wizard format.
- Implemented the 'cast' script command. Syntax: cast(401, "target1", "target2", "etc"). Checks mana required for the spell by its level, so 406 is assumed to cost 6 mana, etc.. That's obviously going to be wrong for certain spells, use it accordingly. It also pauses for the cast roundtime before returning, and if you don't give it any targets, it defaults to using "incant [spell]". It makes a call to 'fput', so it'll recognize having to wait for RT, stuns, etc.. Also casts again if hindrance prevents success (assuming you have enough mana for another cast). If it successfully casts on all targets, it returns 'true'. If it runs out of mana before it can do that, it returns 'false'. So a simple spellup script can now be reduced to one line:
5.times { cast(401) ; cast(406) ; cast(414) }
... and you're done.
- Implemented the 'priority?' and 'setpriority' script commands. 'priority?' will return the priority of the calling script, and 'setpriority' allows you to set it. The send/recv threads are now 4 and 5, respectively. Lich won't let you set the priority of a script higher than 3; to do so is ridiculous, and would do no good at all, which is why it's a built-in limit. Larger means it has a higher priority. Range is -20 to 19, I believe, but I wouldn't go past -5 (or 3, the imposed limit), because things can get... quirky, if you introduce huge gaps in scheduling priority. Lich does this fine by itself, you can just leave it alone and it'll run 250 scripts without issue -- but if you want a particular script to get more attention and respond before some other scripts, this is the way to do that. For example, if you consider a particular script very important, set its priority to '1' or possibly '2', depending on how important you think it is. In the script, the line 'setpriority(2)' will do this. If you're like me and run half a dozen things like calcredux that will run just fine if they don't get their turn for an extra second or two... set their priority to '-1', with the script command 'setpriority(-1)'. They all start at a priority of 0 when first run. If you're doing advanced things with scripts and forking subthreads to run simultaneously in a script, all threads in that script's group are set by this. If you don't know wtf I'm talking about, ignore that completely -- only applies to multiple script threads. Since 'priority?' returns the current priority of the script, you could change it and then check to be sure it worked (it's silent to avoid clutter) with the line 'echo priority?'.
10-02-05:
(v2.2)
- Added recognition/tracking of SF 'Obvious exits:' directions.
- Fixed a bug that was causing inaccurate values for the left eye wounds/scars to be returned.
- Fixed another bug sometimes causing rank 1 wounds/scars to be reported as rank 0.
- Fixed a bug causing characters with certain, specific health/mana/spirit values to randomly have their current status improperly tracked.
- 'move' now behaves like fput (requeues the line in proper order, as opposed to improper order or simply executing a 'reget 1').
- Minor optomizing of some old code.
- Fixed a bug that was causing status info to be deleted from the RAM cache whenever a 'reget' was issued.
- Fixed a bug in 'fetchloot', 'Lich.fetchloot', and 'checkloot' causing them to miss the first item.
- Didn't bother testing, but the 'walk' code was outdated and the 'boundary room' check looked broken. Whether it was or not, it's fixed and working now.
- Implemented passing of upstream data to scripts that ask for it. Scripts requesting this with the script command 'toggle_upstream' will *not* receive normal game data. The command to fetch a line that was sent is 'upstream_get', and behaves identically to the standard 'get'. 'upstream_waitfor' is also available, and also behaves/functions identically to its standard counterpart.
10-01-05:
(v2.2)
- 'fput' was re-queueing the line it stole improperly, which was breaking a number of things. It replaces the line in proper order now.
9-30-05:
(v2.2)
- Fixed yet more bugs in Wizard script interpretation, and implemented %user0 through %user9 (settings.txt file).
- Modified the regexp being used to scan for a room change. It was too general and was a useless waste of CPU cycles.
- Updated the status tag document.
- I have, until now, failed to realize that even though Lich does not offer an easy command-interface to the upstream of data, that the cache file(s) are just as available to scripts as they are to Lich itself. Assuming a hash key 32 digits in length, using numbers 0-9 and letters a-z (it appears only lowercase...), I estimate between 10,912 and 392,832 possible encryption cyphers. This is not my specialty, but 392,832 possible values I would expect can be brute-force cracked in a matter of minutes, if it would even take that long. I haven't tried this, have no desire to waste my time trying it, and frankly I'm not even sure how you would do this: the fact remains, however, that a malicious user could compromise someone's account in total silence by having the user run a script that included such a routine. I find this unacceptable, and as of this writing, your encrypted login key is deleted and lost to oblivion almost immediately after being sent.
- Implemented executing a script in a 'safe' environment. When run like this, a script's access to the local machine (TCP/IP sockets, files, etc.) is severely limited, if not altogether blocked. To run a script in this mode, start it with 'safe' as the first command-line argument.
- Fixed a bug causing checkfried to always return a false value even if you were fried.
- Implemented 'reverse Wizard scripting'. What this does is execute a Wizard file bottom-to-top, instead of top-to-bottom, as well as reversing the directions ('ne' would become 'sw', etc.). Note it's rather useless for complicated scripts (read: only hideously simple scripts), but for those simple movement 'point A to point B', no-frills scripts, it can work pretty well. It can also get you stuck in the middle of nowhere because it isn't 'go bridge' on the trip back, the way it is on the trip to... Launch a Wizard script with 'reverse' as the first command-line argument to use this feature.
- Slightly modified fput; it no longer executes a 'reget 1', but requeues the actual line it stole from the queue.
9-29-05:
(v2.2)
- Fully implemented tracking of wounds/scars and the commands to go with them. Each of these returns 0 through 3 (0 = no wound, 1/2/3 = rank): Wounds.head, Wounds.neck, Wounds.rarm, Wounds.larm, Wounds.rhand, Wounds.lhand, Wounds.rleg, Wounds.lleg, Wounds.chest, Wounds.abs, Wounds.back, Wounds.reye, Wounds.leye, Wounds.nerves. There's also a 'Scars.(body part)' for each corresponding check. For instance, Scars.lhand returns the same thing, except for scars instead of wounds.
- Forgot about status scripts when I rewrote the data parsing routine for SF... fixed, they'll get what they asked for now (the raw XML feed).
- Updated the command quicklist.
- Implemented script commands 'righthand?' and 'lefthand?', which are synonyms for 'checkright' and 'checkleft', respectively.
- 'pause' wasn't properly interpreting strings with letters (the 's'(secs), 'm'(ins), 'h'(ours), 'd'(ays) thing). Fixed.
- Implemented 'matchfind'; seeing so many people using JSE-style "match You see %something% walk in" gave me the idea for this one, so I gotta credit Jamus for the concept. It takes an infinite number of strings, and returns only the snippet of a match that you asked for. So, for example:
person = matchfind("? just arrived", "? just went ")
... in this example, everything where the '?' (question mark) in the string is what's returned, so 'person' would now have the value of whoever walked in or out (it uses whichever one it sees first -- no limit to how many you can give it). Or:
name, direction = matchfind("? just went ?")
... in this example, 'name' would now be the name of the person who just left, and 'direction' would be which way they went ("Shaelun just went southeast." would result in 'name'=>'Shaelun', 'direction'=>'southeast.' -- that period messing your script up? No prob: direction.delete('.') and it's gone, leaving 'direction'=>'southeast' ... There's no limit to how many question-marks you can use... and if you prefer, you can just set them all equal to one variable and it'll be an array. It'll match as many words as there are:
container, items = matchfind("In the ? you see ?")
... I wear one of the black attuning cloaks, so for me, 'container' would now be 'spidersilk cloak' (that's what it shows when I look in it), and 'items' might be 'a blue crystal, a black crystal, and a ruby amulet.' (or whatever I happened to have in my cloak). Kind of hard to use them when it's all a big sentence though. Well lets split them!
item_array = items.split(',')
... this would split up the string into pieces using the character you gave it, in this case a comma (the default is every word). 'item_array' would now be an array whose values are 'item_array[0]'=>'a blue crystal', 'item_array[1]'=>'a black crystal', and 'item_array[2]'=>'a ruby amulet.'. Well that's not... terribly useful though, is it? Well... just split it again:
put "take my #{item_array[0].split.last} from my #{container}"
... 'array.last' gives you the last item in an array. And array[#] gives you that value of the array. So 'item_array[0]' returns 'a blue crystal', which we then turn into an array itself, each value being one of the words (in order, first word to last word). With that new array, we ask for the very last value -- in this case, it's 'crystal'. So what ends up being sent to the game is, "take my crystal from my spidersilk cloak". What if we wanted to do it for every item in the cloak? Easy: just put it inside a 'loop' block, and call 'item_array.shift', then make the last line in the block 'break if item_array.empty?'. Here:
loop {
put "take my #{item_array[0].split.last} from my #{container}"
item_array.shift
break if item_array.empty?
}
... this would loop what's inside the brackets, and everytime it did, it would 'shift' the 'item_array' values down one (it works just like the Wizard 'shift' command, except only on the array you call it for). 'break' will break out of a loop, but in this case, we told it to only 'break' out if 'item_array' is empty. The end effect is that it will loop through this block once for every item in the cloak, then 'break' out of the loop when there are no items left.
- Implemented 'matchfindexact'. It works almost identically to 'matchfind', but it's much stricter, and while 'matchfind' is case insensitive, 'matchfindexact' is case sensitive. 'matchfind("name:? profession:?")' would be happy to match the 'info' line with your name, but 'matchfindexact' wouldn't match it. The exact version is very particular about spaces (e.g., "Profession: ?" would *not* match for the string "Profession: Bard" because there's two spaces after profession in that line, but you asked it for a string containing only one space there). It's really for those times when two lines are very similar, but not quite identical, and you need a way to tell them apart.
- Changed the method of XML parsing for SF... this should make any script compatible. The downside is it's also going to cause 'not in the main window' text to be passed to scripts.
- Improved the accuracy of 'waitrt' a bit, and fixed a bug causing it to not wait at all if you used it before Lich had seen you in RT (right after login, for instance).
9-28-05:
(v2.1)
- New function -- if any command sent to Lich begins with ';!', Lich will slice out the '!' and send the string exactly as you typed it. Ex: ';!hello!' would be turned into ';hello!' and otherwise be totally ignored (PsiNet has the same behavior, and remember, Lich comes after PsiNet in the upstream -- if you sent '!;!hello!', PsiNet would strip the first '!', leaving ';!hello!' seen by Lich, which would strip the second '!' and ultimately, ';hello!' would be sent to the game as stated).
- Wizard script commands weren't being properly translated. 'put look' worked fine, but 'PUT look' would send 'PUT look' to the game. Fixed, and further improved Wizard script translation (complete '%c', '%s', 'if_1'/'%1' (up through 9), and 'counter' actions support).
- Lich wasn't processing the first line of a Wizard script. Even though it's always a comment, this has been fixed.
- Added the NOTICE, which is only displayed first run.
- Fixed a bug causing data sent to the game by 2 different scripts at almost identical moments in time to be seen by the game as one command put together.
9-27-05:
(v2.1)
- Added the 'What were you referring to?' message to the list of game lines 'move' will recognize as being an impossible direction and return because of.
- Initial support for Wizard script files has been implemented. At this point, any 'if_1' checks are simply assumed to be false entirely.
- In rewriting the basic handling of status tags, I broke checkmind and checkfried. Fixed.
- You can now pass scripts command line variables in the standard Wizard style. To access these, use 'script.vars'. It will return an array, so you can just skip to the one you're specifically after with 'script.vars[2]'. Since the intuitive thing is to assume an array starts at 1, and since that's more or less how Wizard has always done it, this particular array is indexed starting at 1 -- the first word after the script name is in 'script.vars[1]', second is in 'script.vars[2]', and so on. You can simulate these when launching a script from another script: start_script("name", ["var1", "var2", "etc"])
- Fixed a bug causing miscellaneous errors related to scripts who set themselves as unique (specifically, if more than 1 at a time was).
- All 'get', 'wait', 'match', and other variances of fetching a line will now echo an error, pause 1 second, and return if a script has set itself as unique (toggle unique back off and then back on if you have need to bypass this check; the reason for it is that it's highly likely there won't ever be a line to fetch if a script is 'unique' though, so normally these commands would hang forever 'mysteriously').
- Poison and disease tracking was backwards; I had the dissipation as the dmg per, and the dmg per as the dissipation with both. Both are fixed.
9-26-05:
(v2.1)
- Implemented the script commands: 'checkstunned', 'checkbleeding', 'checkgrouped', and 'checkdead'. The status info sent by the game is a bare true/false value, so that's all these support -- if you are, they return true. If you're not, they return false.
- Implemented the script commands 'checkprone', 'checksitting', 'checkkneeling', 'checknotstanding', 'checkhidden' (also 'checkhiding'), and 'checkjoined' (same as 'checkgrouped'). Same as above, true/false only.
- These 'check(thing)' commands are getting impossible for even me to remember... implemented all of the following (they do the same as their respective 'check(thing)' counterparts): dead?, bleeding?, stunned?, standing?, hiding?, joined? (also 'group?'), and myname? (identical to 'checkname'). Quick example of usage ('not' can be used anywhere that you want the opposite value of an object -- note it only works with 'true'/'false', integers, and a handful of other things): put 'stand' if not standing?
- If you're actually bleeding, but either death or the signs of staunching/clotting or some other random thing is preventing you from actually taking the damage per round, you're still sent the 'you are bleeding' status info. However, you're sent the 'you are not taking the damage' status info as well. In light of this, 'checkreallybleeding' and 'reallybleeding?' will both allow you to distinguish between when you're wounded enough to bleed -- but not really bleeding, because you've got sign of staunching up, or are bandaged, or something -- and when these effects have worn off. Little dizzying? The 'bleeding' icon in the Wizard, those little blood drops? If you see those, these two commands would return 'true'. Don't see those (like when you use sign of staunching)? Then these two commands are false. I only included them because Simu is silly enough to still tell Wizard you're bleeding, even if you're temporarily not for the moment.
9-26-05:
(v2.0)
- You can now disable disk caching entirely. Lich checks if a file called 'nodiskcache.txt' exists in its directory. If it does exist, there will be no disk caching, and every two minutes all data will be emptied from RAM and disappear forever (scripts will always be given data, it is impossible for a script to miss a line even if Lich empties the buffers the same millisecond -- ignore what ';autogc' used to say).
- My 'fake disk cache' class appears to be working perfectly (Lich was built on the concept of caching; disabling disk caches just makes Lich think the caches are empty and very little else), but remember: reget and regetall are only of use to requeue data that isn't more than 2 minutes old when you manually disable disk caching.
- I've further changed 'label' style jumps ('goto'). It should now be impossible to accidentally overload Lich's execution stack, and you can jump back and forth between two labels till your CPU melts for all Lich cares, it'll do so just fine (you can still fizz-out your script if you try to jump through 5,000 'def' blocks without ever returning or something).
- Since the Wizard 'labelerror:' feature was always so handy, I've implemented the same behavior in Lich.
- Modified 'pcnotes.lic', since Lich will now allow a script to ignore all game data and only listen to unique sends.
- Fixed a bug causing 'move' to be extremely sluggish when the local disk cache reached a certain size; part of this is that 'reget' will now only scan the RAM cache. 'regetall' still scans both.
- Noticed scripts were being sent ' * Shaelun just bit the dust!' lines. This was a bug, and has been corrected; scripts are only sent this info if they request status lines with 'status_tags'.
- To prevent a dozen scripts from making Lich scan a blank line a dozen times, once on each of their behalfs, Lich now discards empty lines instead of giving them to scripts.
- Fixed a bug causing only some status tags to be given to scripts that explicitly request the tags themselves; they now get every tag Lich sees, as they should if they've asked for them.
- Cut the time it takes to process status tag information in half by using a clever idea suggested by Wrexem.
9-24-05:
(v2.0)
- Threw together the 'matchtimeout' script command... identical to waitfor (case insensitive, unlike matchwait), and returns if the amount of time you give it passes. Returns false if it times out, or if the line is seen, returns the line. Syntax: matchtimeout(5, "line1", "line2", "etc") <-- 5 is the timeout, the rest are the lines to match. Note it only evaluates the timeout when a game line is seen -- this means it isn't infallible, and may not return for a second or two after you tell it to (or whenever the next game line is seen).
- You can now abbreviate a script to start. Note the first matching file name is used. Also, if 'hi.lic' exists, and 'high.lic' exists as well, telling Lich to start ';hi' will always start hi.lic -- it will never mistakenly start 'high.lic'. Use the full name (without the '.lic' extension) of a script file, and it won't even check for any other possible matches. If you run into troubles because of the order of files, just give it the full name.
- Fixed all 'waitrt' issues. Will no longer pause for any more than 1-2 (tops) seconds longer than it has to.
- Made ';e' a synonym for ';exec'... I use it all the time while I'm in-game to do stuff like execute shell commands to check my CPU temp, etc., and I'm sick of having to type out the whole thing. Even if someone does (inexplicably) want a script named 'e.lic', unless there's a space between that leading 'e' and the rest of the line, this won't interfere with anything.
- The move bug that everyone was bitching about (even though it still worked... just sent a repeated command sometimes) is totally fixed. And, it will no longer mistake just any room description for having moved (e.g., LOOK will not fool a 'move' command in Wizard... if you're running SF, however, it's still not that smart and will think you moved to another room).
- Implemented the 'no_kill_all' script command. It's a simple toggle on/off (defaults to off). When set to ON, the script will not be killed along with all the others (the ones that haven't also set this option, anyway) when you execute a ';kill all' command. A simple ';k' will kill it if it's the last script, as will targetting it by name (so, ';ka' followed by one ';k', or however many scripts you have running with this option on, will kill all scripts no matter what).
- ';s' is now a synonym for ';send'. Identical in all ways, so it also works to ';s to (scriptname) (line)'. Note that this replaces the previous ';s' behavior, which was a synonym for ';kill'.
9-23-05:
(v2.0)
- Initial 'real' label support is fully functional. A touch of differences here and there (such as, at the end of a label, it will return to the point where it jumped to that label and continue executing), but it appears totally usable. Note that labels are not supported with ';exec'.
- Just got myself caught in an endless loop that I was unable to kill... all 'goto' jumps will now pause for .10 seconds before executing the jump, just to make sure it's possible to at the least kill the script should things go bad.
- Altered the disk-caching method... I swear to God, I wasn't fond of Windows before this project, but the amount of goddamn problems I've had to work around because of the way Windows works is making me want to buy every copy of Windows in the state just so I can enjoy watching them all burn...
- Somehow the 'walk' command had become frighteningly inefficient and resource-intensive. Fixed.
- Doubled the amount of time between disk-cache updates (now 120 seconds). This will allow Lich to eat up more RAM... I just don't understand how simply appending 50kb of data to a file could possibly result in sluggishness, but if Windows is really doing this... I may just default the autogc feature to on for everyone except me (I'm rather attached to Lich's capacity to reget any and all data for a script).
- Changed the variable used for incoming game data to $_SIMUSTRING_; it's necessary for it to be a global variable in order to facilitate my yet-to-be functional 'watchfor' business. Just don't play with it ;)
- Drastically increased some of the 'wait until file descriptor is closed' sleep times.
- Slightly modified the functioning of disk caching... hopefully it'll further improve performance.
- Implemented the 'Watchfor' class. This is a relatively complicated feature, and may have some noticable performance impact (depends on your system, really). The syntax is: (variable) = Watchfor.new("a string to watch for", "line1 of code to execute", "line2", "line3", "infinitely"). So, for example:
watching_for_shaelun = Watchfor.new("Shaelun just arrived.", "echo 'Shaelun just walked in. TIMESTAMP: #{Time.now}'", "put 'kill shaelun'")
... this would create a new object, stored in the variable 'watching_for_shaelun', and anytime a line from the game is seen that matches the first argument given to Watchfor (here, it would be 'Shaelun just arrived.'), the rest of the lines you gave it are executed as direct code. Could be pretty damn handy. Here's the catch: the line is evaluated to see if it's true *every single game line*, *every single one*. This can add up *extremely* quickly, and be very costly in the way of CPU cycles. Just one shouldn't (shouldn't, mind you) cause any noticable slowdown, but if you start going crazy with these, you'll relatively quickly slow your game to an agonizing crawl. Other detail you should be aware of: the script that called for this 'on-demand code execution' is paused if the 'Watchfor' code is executed (this is opposed to an Autotimer, which runs simultaneously -- see below). This means, that your script will freeze where it is if the game line you passed Watchfor is seen, and once Watchfor finishes, your script will resume. This will not be executed only once... this will happen over, and over, and over again. This could be very good, or very bad. Use it knowing that if you don't stop it, it will run infinitely. Speaking of which, there are several ways to 'unregister' a Watchfor: in this particular example, the simple lines: waiting_for_shaelun.unset, waiting_for_shaelun.stop, waiting_for_shaelun.untrace -- these would all result in the Watchfor no longer existing, basically. Note that if you should have reason to use multiple Watchfor calls, you can at anytime stop them all by using: Watchfor.unset_all, Watchfor.stop_all, Watchfor.untrace_all (yes, caps matter very much). Play around with it, but REMEMBER TO UNSET it either before the script exits, or from a different script! (if you forget, yes, you can just run ';exec Watchfor.stop_all' or something). Since it's hard to track down and just looks like shit if a Watchfor keeps going once a script has ended, it has its own versions of echo & put (just those 2, no others) that track the calling script's name even after it exits. Watchfor.echo, and Watchfor.put. Same syntax as the regular ones. Note also this isn't designed as an alternative method of script execution. It's just a cool toy I've been wanting to play with (trace_var) :P As such, its suited to only certain tasks and not others. For more detail, try it out.
- Implemented the 'Autotimer' class. This is the same type of thing as 'Watchfor' is, but it's easier to override, easier to manipulate, and has much less potential for getting out of hand (it's also faster). It is not nearly as reliable, nor as 'impervious to anything that might happen' (a Watchfor will execute no matter wtf happens, if the prog is going, it will run -- an Autotimer could get messed up and die in error). This one's also a bit complicated, but easy to change, modify, or temporarily pause once you've set it up. The syntax is: my_variable = Autotimer.new(cycles, secs_per_cycle, "code to execute every cycle, line 1", "line2", "line3", "into infinity"). Cycles, as used here, should be a # of times you want the code to be repeated. secs_per_cycle is how may seconds will be inbetween each execution of the cycle. For instance, if you wanted an 'alarm clock' to tell you everytime an hour had gone by: hourly_chime = Autotimer.new(24, 86400, 'echo "ding-dong, it's now #{Time.now}!"'). This would repeat 24 times, waiting 86400 seconds inbetween each run (that's how many seconds are in a day). So every hour (maybe not ON the hour though), for a full 24 hours (if the script ran that long), you'd get an 'echo' saying ding-dong and telling you the time. There obviously are more useful things to do with this, but you get the point... the details of this one: unlike Watchfor, it *will* be stopped along with the script that created it (do not forget Watchfor will just keep going through almost anything, including its script being killed -- dangerous at times). You can give either of these two commands as much to execute as you like, and you can make as many of them as you like. These are pretty safe, pretty harmless, and pretty easy for Lich to process a goddamn truckload of: I'm not sure how badly Watchfor will suck up your CPU, but it could get pretty bad with a dozen going at once. A dozen Autotimers will hardly even be noticed (the difference is quite large). Autotimers are also dynamically alterable; that is, you can change the code they're programmed to loop over & over again even while they're running: my_variable.actions = "line1", "line2", "line3", "etc" (my_variable.code = is supported identically, BTW). Note this is NOT IN ADDITION to what you gave it before, this REPLACES what you gave it before. You can also set the timing of an Autotimer as it runs: my_variable.reset_timer will start the count over from 0 without modifying anything else (basically just sets it back to the beginning, so if it looped 99 times, it would now think it looped 0 times and go through all 99 again). You can also adjust the loop-count to suit your needs: my_variable.set_timer_to = #, where # is how many times you want the Autotimer to think it's cycled. my_variable.set_second_delay = # will change how many seconds it waits inbetween each loop (NOTE, unlike pause, it does NOT accept anything except second. You can give it fractions of a second, but you MUST format such numbers like this: 0.05; the script will bail in error if you don't put that '0' in front of the period [because of the way syntax is done, .05 is trying to use the method of an object which simply isnt' there... 0.05 is understood properly, however]). my_variable.pause (accepts no arguments) will freeze execution of the code next time around (note that the timer still runs, but once it gets to 0, the Autotimer will just sit and wait indefinitely -- once unpaused, it would immediately execute its code and resume normal looping). my_variable.unpause will unpause an Autotimer. my_variable.kill, and my_variable.stop will both kill an Autotimer permanently (again, this is done automatically if the script dies -- if you absolutely need to be able to count on the execution of a given command anytime something happens, Watchfor should be what you use. Anything not of dire importance or that can just be pulled off with an Autotimer, use this instead). Also, if you give an Autotimer a cycle count of 0 (e.g.: var = Autotimer.new(0, 10, 'echo "hi"') <-- would echo 'hi' infinitely every 10 secs), it will loop forever.
9-22-05:
(v2.0)
- new script command, 'watchhealth'. Syntax: watchhealth(30, "line 1 to execute", "line 2 to execute", "line 3 to execute" , "forever..."). In this example, while your script is running, every second your health will be checked -- if it's under 30, the 'mini-script' you pass to it (one line per argument) will be executed. At the time this 'mini-script' starts (assuming your health at some point drops to below 30), the original script will be killed and only the code you passed to 'watchhealth' will continue to run. While this may at first seem unnecessarily limiting, this is really meant as an 'emergency alarm' (besides, 'start_script' can, with a touch of juggling, get the original script going again with complete ease).
- The connections with your game client and Simutronics are now stored in the global variables '$_PSINET_' and '$_SIMU_'. The previously used '$psinet' and '$simu' were just bound to cause problems for unwary users sooner or later. DO NOT read, write, or really do fucking anything with these two, because the best that could happen is you screw Lich up, and what's likely to happen is a total meltdown of Lich and a ghosted char.
- I'm changing the licensing from the GPLv2 (GNU's General Public License, version 2) to the BSD license. This remains free software, and I will continue to distribute the complete and unmodified source code with it: the only real change is that it's legally "mine," now, not "everyone's," and I can choose to stop distribution of the source now if I want to. What, you didn't realize that under the GPLv2 it was legally everybody's...? Well nobody submitted source, I'm the only legal developer, so too late, it belongs only to ME now, muahahaha! ;)
- If anyone wants to add to the documentation, PLEASE, by all means, do. I hate documenting. It's boring. It's not what I have fun doing: I like coding, and I even enjoy teaching to a certain extent -- I don't like this 'change a line, make sure the user knows about it' garbage... so anyone anywhere, feel free to send me updated docs. This is the only file that's current, at the moment; some of them are almost a month old... but this is seriously turning into a full-time job, and nobody's paying me, so unless I'm just in the mood for it: I'm not gonna bother from hereon out (the changelog will always at least mention if not describe a change I make).
- 'checkpoison' and 'checkdisease' are now usable script commands. If you aren't poisoned or diseased, they return false. If you are, they return a two-element array: the first number is how much damage per round, the second number is the dissipation rate (remember '.first' and '.last' are handy for working with arrays; also note that all values are logically-evaluated as being 'true' except a boolean 'false' and 'nil' [the real 'nil', of its own class, not the word "nil"] -- note the odd difference here, because '0' is logically TRUE in a Lich script. So, you can do 'fput incant undease if checkdisease', etc).
- Move now functions like 'fput' in regards to executing a 'reget(1)' before it returns. Note it only requeues the last line -- if it has to stand up, for instance, most of that game-feed will not be requeued.
- Source has been split up. Framework of Lich is in lich.rb, and the script commands (methods and classes) are in lich-lib.rb.
- Implemented a new feature of scripts: they now have a unique 'silenced' flag, and you can toggle this flag on/off with the script command 'silence_me'. No arguments are accepted, it's just a simple on/off switch. If you use this (which I don't suggest, but it's really just for one particular user who requested the functionality, to be blunt), your script will not be allowed to 'echo' any data, and anything it 'put's or 'fput's to the game will not be echoed either. Be certain you want this, because unlike the other 'toggle_echo' command, this is forced -- unless you bypass script handling, nothing the script says will be allowed through ('respond' wasn't meant for scripts and falls under the 'bypass' category, it's Lich's command and includes no check; use that if you have a dire need for the script to say something).
9-21-05:
(v2.0)
- Fixed a bug in the ';exec' Lich command that was breaking it for the rest of that login session anytime a 'real' script (as in, one having a file) was killed or exited. I hate bugs that only rear their ugly head 'sometimes'... can't it just happen all the time or never?
- Implemented the script command 'checkname'. If given no arguments, will return your current character's name. If given one or more strings, will return true or false based on whether or not your current character name matches any of the strings provided (takes an infinite number to check for). Like almost everything else Lich does that's related to a status tag, this only works with The Wizard.
- Added the option of using ';send' to send a line to a single script, as opposed to all active scripts. The syntax is: ';send to <script> <line to send>'. Script name may be abbreviated. If 'to' is not the word directly following 'send', it behaves identically to how it always has. Example: ';send to calcred calcredux_help'
- Yep. That God-awful grinding sound really did mean something (LOL, like it possibly couldn't mean something when your HDD sounds like it's eating itself). Drive failed -- snap, no more hard drive for me... thank God I turned my music down earlier that day and was able to hear it. Think I got everything off of it, and I'm now editing blind (my notebook has no HDD and I can't get into the game to test, I'm just using my external USB backup drive and booting off a Linux LiveCD)
- Implemented the script command 'send_to_script'. Syntax is: send_to_script "name_of_a_script", "line1", "line2", "infinite"
- You can now toggle a script receiving or not receiving game data with the script command 'toggle_unique'. It's highly recommended that if your script will never fetch anything but 'specifically-sent-just-to-it' data, you 'toggle_unique' to turn off game lines being sent to the script. The reason for this is that if the script never reads the game lines, they will continue to pile up and eat away at your RAM until approx. 8-24 hours after the script is started, your computer will suddenly lock solid and require a reboot. Note that scripts now have two seperate stacks, and a script can freely read from one or the other at anytime and any order it pleases. The command to fetch a line that's been sent directly to that script - specifically to it - is 'unique_get'. It functions identically to 'get', but it reads the 'script-only' lines in the queue instead of the game lines. There is also a 'unique_waitfor', which also functions identically to the regular 'waitfor'. Note you do not *need* to turn off regular game lines being fed to your script if you don't want to -- either way, these commands will function identically. What gets sent to this 'script-only' unique stack is anything sent with: 'unique_send_to_script' (script cmd). ONLY that script command will ALWAYS send the line to the 'unique' pile, as opposed to the game pile. Also, the ';send to <script>' primary Lich command will send it to the 'unique' pile IF, but ONLY if, 'toggle_unique' has been set so that game lines aren't given to the script. So if you ';send to <script name> <line>', and the script hasn't used 'toggle_unique' to stop game lines from being sent: that line will be fed to the usual 'get' stack. If the script HAS used 'toggle_unique' to turn off regular game lines, then the line sent with ';send to' will send it to the unique stack to make sure the script sees it. Note the *script* command, 'send_to_script', will always send the line to the regular 'game data' pile. ... I know this likely seems a bit confusing, but it's the most versatile method I could come up with. If you have use for this, use it freely. If you don't, ignore it, nothing has changed.
- Cleaned up the code more, removed more global vars. If you notice any broken commands or new bugs, let me know.
- Added a check for command line arguments passed to Lich when executed. Mostly only of use to myself, or anyone else who has reason to launch Lich from a command line. These are in the standard GNU style; single-letter abbreviations using one '-', long words using '--' (2 as opposed to one). Currently recognized are '-d <dir>' and '--directory <dir>', for setting Lich's program folder, and '-n <-20 to 19>' or '--nice <-20 to 19>', to set the scheduling priority of any programs launched by Lich (NOT Lich itself, and additionally, setting of the scheduling priority is available only in Linux).
9-20-05:
(v2.0)
- Corrected a bug in 'move' (and therefore 'walk' and 'run' as well) that caused rare directions (such as, 'go ramp' returning 'You walk up a ramp' before the room title) with non-standard messaging to be totally unrecognized.
- Fixed a bug that prevented you from accessing your 'Lich.wandsack' setting.
- Purely aesthetic in nature, but with settings, depending on how you entered them in your file, an extra space was being sent to the game. Fixed.
- Implemented the script command 'waitrt'. I just recently was told JSE includes an 'fput' command, and I'm sorry for how much it appears I copied Jamus' work... this one I'm already aware is a JSE command, but it really is the best name for it. I hope you're okay with my using the same name, Jamus. Also, note that a special thanks goes out to Wrexem for helping me with the status tag info necessary for both this command and wound/scar/disease/poison info.
9-19-05:
(v1.9)
- Added recognition of Wizard-formatted 'familiar-vision' status tags (anything that's highlighted the 'familiar' color). This will continue to 'fake-out' Wizard and show inaccurate information, e.g., your compass won't show *your* directions but will show your *familiar's* directions; however, Lich's data will not be influenced by familiar-echoed data, and will remain current and accurate. Voln symbols of need, however, are another story... those will probably always cause Lich to tell you incorrect data: the goddamn things actually send the same tag your own LOOKs do. I'm unwilling to slow Lich down scanning every line for the symbol of need message just for these special circumstances, so... sorry Voln people, but it ain't happening.
- Implemented the 'checkfamroom', and 'checkfamarea' commands. They both accept an infinite number of arguments, and also both work as follows: if given no argument, returns the area/room your familiar last saw exactly like 'checkroom' and 'checkarea' do for the room *you* last saw. If given one argument, returns false if that isn't where your familiar is (abbreviations okay, case insensitive). If given 2 or more arguments, returns false if none match, or if one of them does match, returns the full name (not just the matching portion) of the corresponding value ('area' for checkfamarea, 'room title' for checkfamroom).
- Implemented tracking for PCs, NPCs, and 'obvious paths/exits:' directions for familiar-viewed information. The 'checkfamnpcs', 'checkfampcs', and 'checkfampaths' commands work identically to their character-specific counterparts. Note these, just like the character-specific ones that were already implemented, are 100% Lich-handled. They aren't status tags from the game, the info is only updated anytime you LOOK, move to another room, or otherwise cause a current room-description paragraph to be seen by Lich.
- Modified both character-specific and familiar-specific commands, including 'checknpcs', 'checkpcs', 'checkfamnpcs', and 'checkfampcs', to accept an infinite number of arguments. They now behave identically to 'checkfamroom' and 'checkfamarea', as detailed above. Note if you do not currently have a familiar or have not had one at anytime since you logged in with Lich, all familiar-specific checks will return false (still no SF status tags, so, in SF, *all* checks will still *always* return false).
- Added the 'currently webbed' messaging to the checks 'forceput' and 'fput' make to try and determine if a command was successful or not.
- As a prelude to the total overhaul of how Lich gets in the middle of your client and the game, the code has been heavily cleaned. Half a dozen global variables were made unnecessary and eliminated, error-checking was made less redundant and more efficient, several minor bugfixes along the way that I can't remember the details of, etc. End result is much cleaner, much more stable, much easier to handle, slightly faster, and the way it should have been from the start, frankly.
- Implemented the ';EXEC' Lich command. I'm already a huge fan of this one; type ';exec (code)', and it will take everything you feed it after the 'exec' command as a phantom-script file to run. Signify linefeeds with a ';' (so: ;exec echo "script running" ; exit <-- 2 lines total; 1. echo "script running", 2. exit). There is no limit to the size, complexity, or characters (ignore what the game will recognize, you're talking to Lich and any character I've tested will be read properly) that you can run as a phantom-script in this manner, but don't forget that once the script stops, the code disappears forever. I.e., don't spend minutes writing something that will be gone forever seconds after it runs ;) Meant more for quick, easy, 2-4 line Lich functions that are just handy as Hell (Lich.fetchloot, etc.). Technically, the limit to how many scripts you can run at a time in this manner is a full 256; essentially the only real limit is your patience and your CPU speed (WARNING: as with from-file scripts, these ARE NOT CHECKED FOR GAME-SESSION-KILLING ENDLESS LOOPS, ETC!! You have been warned! Lich will unfortunately be happy to take over your computer with a CPU-maxing infinite loop if you tell it to, so pay attention and make sure you don't!).
- Calcredux.lic was pissing me off with its 3-5 lines of info at startup. Shortened it to 1-2 and added a user-called help feature.
- So much for a total rewrite of the framework: tracked down the issue, turned out a snip and a tweak was all it needed. Multiple instances have been tested by both myself and others, and reported as being 100% functional. Oh well. At least I cleaned the code up, etc.
9-18-05:
(v1.9)
- Modified fput... I originally intended for it to be used sparingly, but even I'm getting to the point of just using fput instead of put -- it will now requeue the line it recognized instead of simply returning it (it still returns the line it recognized as being a 'successfully executed action'). Its prior behavior was causing confusion, and all it really does now is a 'reget(1)' by itself to avoid user confusion about why data is being missed.
- Implemented the 'toggle_echo' command. With no argument, toggles command-echoing on/off, or also accepts "on" or "off" as an optional argument. Anything sent to the game with 'echo' will still be sent through, this only effects whether or not commands sent with 'put' and/or 'fput'/'forceput'/'move'/etc. get echoed to your game window when they're sent.
- Modified both 'put' and 'echo' to accept an infinite number of arguments. You can now 'put("stand", "kill thrak")' or whatever, and it will act as though you had used a 'put' for each one of the commands. Note there's no pause between the sending of these commands. 'echo' now works the same way. Note also, however, that 'fput' and 'forceput' remain unchanged! Do not get confused about the difference!
- Cleaned up some stale code. Lich was still doing things that were necessary weeks ago, but have no purpose whatsoever now. All appears to be well, but email if you encounter any problems, I may have accidentally deleted a bugfix that I forgot was there for a reason...
- Fixed a bug causing 'kill all' to not be recognized properly.
- Fixed pcnotes... can now add/delete notes properly. It also automatically adds the date to all notes now.
- Modified calcflares.lic, it will no longer track miscellaneous flares that you see from other's weapons. However, it will also not track flares it sees from your own weapon unless the flare line (the '** Your...' one) includes the word 'your'.
9-17-05:
(v1.8)
- Finally implemented full syntax-error details being reported to the user. It will now describe, as accurately as it possibly can, where the syntax error lays: note that this isn't foolproof, though, and if it doesn't give you the exact space and/or line or is otherwise vague, take it more as a hint than a written in stone kind of thing.
- Improved the method of script self-exiting... there are no longer any conditions, ifs, ands or buts with ending a script by having it 'exit' itself. Safe, reliable and can be used in any manner desired. Ignore any such warnings/info in documentation, it'll be updated when I stumble across the outdated warnings.
- Implemented the 'Lich.fetchloot' command, which shares the 'settings' syntax because it's based off of your Lich.treasure list. It will pick up and stow any items you have defined under 'treasure:' in your 'settings.txt' file, but will only attempt to gather the ones currently in the room.
- Implemented the 'checkloot' command, which instead of attempting to 'take' every item on the ground, will simply return an array of all the items (as has become the standard, it will return 'false' if no items are currently found to be on the floor). This is another Lich-implemented feature, and is not a status tag -- hence Lich's need to 'look' in order to accomplish this command.
9-16-05:
(v1.8)
- Fixed a bug in both 'reget' and 'regetall' when running under StormFront mode. A typo was making it 100% broken; it's now fully functional.
- Added a couple of things to the Lich class (your settings), most notably being 'Lich.reload_settings', which will re-set the settings by reading the file again. Just delete the file if you're lazy, and Lich will reset it with all the current setting names.
- Lich will now only echo those 'script warnings' for unknown method calls within scripts (e.g., if a 'checknpcs' returned false because there aren't any in the room, but you forgot to take into account that could happen and tried to access the first critter by doing 'checknpcs.first') if the global debugging option (Lich command '; debug') is ON.
- Fixed a bug in fetchloot that was causing it to try and take the 'Obvious exits:' directions as loot if there were no items in the room, heh...
- Implemented the 'RELOAD' Lich command.
- Wrote the 'pcnotes.lic' script.
- When multiple instances of Lich were running, the hard drive caches (which are updated every 60 seconds in order to empty the RAM caches) were being overwritten by eachother... it's conceivable that unhandled errors could have arisen in certain circumstances, not sure to what extent things would have gotten mucked up. 100% fixed.
9-16-05:
(v1.7)
- After literally 3-4 hours, I cannot track down a bug that sometimes results in a script not being made aware that data has come in from the game... I've implemented a temporary fix. Even after I do find the culprit and fix it at the source, there won't be any real difference for users, so consider it fixed.
- 'reget' and 'regetall' now return false if no matching lines were found, or true if matching lines were found and resent to the script's queue.
- Modified calcredux to take advantage of the new 'reget' and 'regetall' operation.
- Added the script commands 'fetchloot' and 'take'.
- Drastically improved the error and mistake resilience of scripts and Lich as a whole. With any luck, even if you try to, you'll no longer be able to screw Lich up or cause an unhandled error that makes it bail on you (an endless loop with no rate-limiter, like a 'sleep 0.01' or something, will still totally frag you though).
- Code for storing and accessing ofen-used settings is now finished and usable. Format is 'Lich.gemsack', 'Lich.weapon', etc.. See the 'settings.txt' file in your Lich program directory to set these if you like (totally optional, but provides a way for people to write scripts that will run properly for anyone's personal settings, not just their own).
9-15-05:
(v1.7)
- Minor updates to the 'walk' command to address occasional unpredictability/erroneous behavior.
- Decided the current way Lich handles backup/restoration at load-time was more trouble than it was worth (which turns out, wasn't much). It's now been redesigned: this means if you lose power or CTRL-ALT-DELETE force-kill Lich, your system WILL NOT BE RESTORED!!! Upon running Lich again, it will no longer restore the backup it made and exit: it will launch SGE as usual and assume you're trying to log into GS. If this is not your desire, and you simply wish to fix things and get rid of the program, you must login one last time using Lich. Forcing impatient people to click-clik, click-click, click-click over and over was launching a dozen Lich instances at once, which just isn't good... I consider this policy better for the majority of people.
- Implemented the stop_script command. It's fully functional now.
- These are now all commands: start_script(s), stop_script(s), kill_script(s), and send_script(s) [singular/plural both]. All of these, with the exception of start_script (singular, start_scripts plural does), accept an infinite number of arguments. It won't hurt anything if you get them mixed up and give start_scriptS only 1 script, but it will cause an error and your script to quit if you accidentally pass start_script more than 1 name.
- stop_script can now stop any number of scripts (w/o limit). They must be provided by name, however, and cannot be 'batch' killed as they can be with a command. Note that like a manual ';k <script>' command, stop_script will accept abbreviations. Should it be of use to you, you can provide 'one of these two scripts, but only one, not both' by the command
. stop_script("calcredux|calcflares")
. ...this will kill either calcredux, or calcflares -- but only one, not both. The '|' (pipe) character is what does this. It can actually be used with most (infact, I'd nearly say almost all, but I may have overlooked this in a couple) commands to signify 'or this'. It may have unpredictable results however. Users who find it useful are encouraged to test for details.
- Fixed a bug that was causing a TCPSocket to be closed, but not shutdown... fixed now -- this allows you to now run multiple copies of Lich just like you run multiple copies of PsiNet or Wizard. As always, report any issues encountered.
9-14-05:
(v1.7)
- Forgot to add recognition of up/down to Lich-tracked 'obvious exits' directions. They're properly recognized and returned by 'checkpaths' now.
9-12-05:
(v1.6)
- Fixed a bug in the CHECKNPCS script command that was causing currently-penalized (death sting, etc.) stats, which are highlighted with the same tag as NPCs, to be returned along with any NPCs.
- Fixed a bug in 'matchbefore' that was causing the script to be unrecognized when querying Lich for this data (caused it to exit in error).
- Implemented initial support for processing of the actual area the character is in, as opposed to just copying part of the room title. Note that support is primitive, and you'll have to test to see what area a specific room belongs to (e.g., at a Shimmarglin Inn table, the area is currently "Shimmarglin Inn", as opposed to what you might expect -- "Ta'Illistim")
9-11-05:
(v1.6)
- Noticed unpredictable behavior with the caches and logging; not about to rewrite code I didn't even write (was using the 'Tempfile' extension library), so I scrapped the lib and wrote my own Lich-customized version. I seem to be amassing quite a pile of Lich-specific classes/methods because I don't like other people's...
- Modified any subroutines dealing with logging, caches, or previous game data to be compatible with this new format (including fixing the apparently-buggy reget/regetall script commands).
- Even though it already takes a system crash (loss of power, etc.) or a SIGQUIT (like CTRL+ALT+DELETE 'shutdown', etc.), I've added a restoration of the hosts backup Lich makes as a code block that's scheduled for execution at program-exit. This obviously isn't going to help if the power cord to the computer gets pulled out of the socket, but it won't hurt anything and it further ensures that if it's at all possible, the local system will be fully restored.
- Lines sent to the game now show up in Lich logs (';log' dumps) just as they do in the game screen instead of looking identical to the data the user sent. Note that since Lich is on the far-side of PsiNet, JSE, and basically any other utility you play GS with, it still can't distinguish between what PsiNet/JSE sent and what you typed and hit enter to send. In SF, however, you *can* tell: Jamus forgot to make PsiNet format data to the game in StormFront's XML scheme, so anything with a '<c>' preceding it is something you typed. '<c>' is what's sent to the game by SF whenever you send a command, and PsiNet doesn't send it (obviously it still works though). Lich obeys Simu's XML format and sends data the way SF does (including what scripts send). Hence, anything with neither '<c>' nor a Lich-style script label (or w/o any other '<tag>' label) is what PsiNet sent.
- Implemented the MATCHBOTH script command. Remember the '.first' and '.last' commands are for arrays, so 'matchboth("just").first' is what came before the word "just", and 'matchboth("just").last' is what came after the word "just".
9-10-05:
(v1.6)
- Fixed a bug that caused AUTOGC to try and use the old name for a cache purge, which caused an unhandled error and made Lich exit.
- Lich now uses a temporary file (which is automatically deleted at exit) for storing the game history. The memory-cache is written to this temporary file every 60 seconds, and is also deleted from memory as its written. This will ensure Lich uses a minimum amount of system RAM at all times.
- Modified AUTOGC to cycle every 60 seconds, and to clear any cached script data as well as to do what it can to 'force' the operating system to notice that there's newly-freed system RAM to be reclaimed. I don't expect that with the recent updates, autogc will be of any use whatsoever to anyone except users of computers that have *extremely* limited memory.
9-08-05:
(v1.5)
- Somehow, calcredux was failing to save its average history. Infact, it was failing to even properly calculate the average let alone save it; it's been corrected and now saves a correct history every 2 minutes.
- Corrected an oversight in calcsonic that was causing averages as high as 40-50% to be reported because of an improperly resetting in-script flag.
- Modified the flush command to be recognized as purge, with no other changes to it at all. I just didn't feel good about reading FLUSH over & over again ;)
- Dealt with several issues related to how scripts were being 'juggled' by implementing a new class for scripts (class Script); this has very little effect on the surface, but the foundation is much, much easier to handle now. As a result, any script sub-threads can now read/write to the game at will, and can be used as desired for simultaneous processing. Lich should take care of all scheduling and/or other arduous concerns without you needing to do more than enclose a portion of your script you want to have run at the same time as the rest within 'Thread.new {' and a closing '}'. Let me know if you encounter problems. See class Thread at 'http://www.rubycentral.com/book/' for exhaustive documentation.
- Implemented labels and goto-style 'jumps' for scripts. I've yet to overcome a handful of differences in the way the Ruby interpreter handles the command stack, and until I do, the usage of these labels is stricter than Wizard/SF -- without checking the paragraph of info in the tutorial it very likely won't work for you. Script_Tutorial.txt will explain.
- Fixed several bugs in the checkpcs command which were causing every word ('who is sitting', 'great lady', etc.) to be included as character names and also chopping off the last letter of the last person in the room. Should function properly regardless of in-game flag settings now.
- Fixed a bug that was causing all running scripts to stop receiving game data if the user tried to load a script that had syntax errors, or a script ran out of data to execute (end of file) instead of the user using 'exit', or a script encountered an error while running, etc., etc..
- Added a handful of common method calls to the FalseClass and TrueClass classes, just to ensure that if anybody tries to 'chain' together a method that returns a boolean value, their script won't be fragged and killed. It still isn't going to work the way they wanted it to, but at least it'll keep running now.
- Fixed a bug that was causing scripts waiting for a line to occasionally be woken up before one had been received, causing an empty string to be sent to the script.
- Increased the frequency of autogc to every 5 mins, as opposed to every 15; if someone wants their game history flushed automatically, seems safe to assume they'll want it flushed more than 4 times an hour.
9-06-05:
(v1.5)
- Tested the new IO::pipe method in Windows to discover Lich locks solid the moment a script is started. Operating system call never returns... Windows just wasn't designed with the goal of multiple simultaneous IO streams other than TCP or UDP sockets, it would seem; had to 'ghetto-hook' another method call: modified the Array class to mimick standard behavior of an IO pipe as far as Lich is concerned.
- ... after benchmarking, the array method is 35 times faster than the original TCP loopbacking I was using, and 15 times faster than IO::pipes. Rewrote my *NIX-specific behavior to also use the Array class. Once again, the only platform-specific behavior Lich includes is what directory it uses.
9-05-05:
(v1.5)
- Corrected a bug with the launch.txt settings file; Lich will now properly execute any and all commands within this file if it exists (stormfront-mode.txt still overrides launch.txt).
- Implemented initial StormFront support; scripts should now receive fully parsed strings (plain-text, just as seen in the game window, not funky XML tags). However, since recognition of SF status tags has yet to be included, ALL checks in SF scripts will ALWAYS return false for now.
- dump_to_log is now available as a script command; as with several others, this simply calls the same block that Lich executes when a user manually sends the ;log command to Lich. Syntax is: dump_to_log("/desired/directory/in/this/format")
- Discovered, to my shock, that the Ruby class method IO::pipe somehow works in Windows. I don't know how, since I thought this was a *NIX system call, but I won't argue. Modified the scripting subroutines to work off of IO.pipe as opposed to IO.TCPSocket -- Lich's efficiency has increased tenfold.
- Fixed minor issues with the favorites list.
- FPUT and MOVE now both automatically clear the buffers; this addresses unreliability issues with these commands. REGET and REGETALL are available to recover any data cleared, provided the user hasn't either manually or through AUTOGC caused a PURGE to have discarded these lines.
- Made MATCHWAIT another name for WAITFOR; I'm the one who wrote the thing, and even I continually use matchwait mistakenly... so I made it a command.
- Clear was behaving unpredictably; still not sure of the cause, and I ended up having to 'ghetto-hook' my own method, but it's completely reliable.
- Global DEBUG no longer has to be true for Lich to announce that a script encountered an error. It now displays the exact line number and cause of error if one is encountered during execution regardless of settings; however, syntax errors encountered when attempting execution are not detailed yet.
- Benchmarked if/elsif/else and case/when/else, discovered case is 5-30 (!!) times slower than if blocks. Rewrote all Lich routines to use if; the subjective impression is of a drastic increase in 'overall speediness', but I have no numbers to prove it...
- Fixed a bug that caused any script that didn't have a commented or blank first line to be unrunnable; Lich will now properly interpret such files.
9-04-05:
(v1.5)
- Altered several commands to accept an infinite number of strings as arguments, e.g. waitfor, matchbefore, matchafter, fput, etc..
- Several bugfixes for some of the new commands, which occasionally returned inaccurate values.
- Tried the clear script command for the first time in a week, and saw that it just didn't work. At all. Don't know when I broke it, but it works now.
- Implemented the script commands REGET and REGETALL.
- Modified all commands to return FALSE instead of NIL. This is to address insufficient error checking in user's scripts, but FALSE will still cause errors if you try to chain it together with things that don't take a boolean logical value as an argument... e.g., checknpcs.first, etc.
- Don't know how I thought it was necessary when I did it, but my 'fix' for calcredux in 1.2 or 1.3, not sure which, fixed nothing and broke everything... reverted to how it was.
- Threw together several more scripts which are included in the install.
9-02-05:
(v1.5)
- Added the AUTOGC Lich command (automated garbage collector). It will toggle on/off the silent flushing of the caches automatically every 15 minutes.
- Implemented the WALK, CHECKPCS, CHECKFRIED and CHECKMIND commands.
- Removed several checks and completely redesigned the method of error-resilience the basic input/output to/from the game uses. It's now better in all respects, particularly speed.
- Implemented safety checks to force-kill any script subthreads that attempt to read from the script's primary I/O port. Should you use threading for simultaneous functions, be aware that subthreads will be instantly shutdown if they try to get game data (the alternative is a guaranteed total freeze and a ghosted char).
- Increased the timeout for what constitutes an improperly processed script (syntax errors, etc.). This should be a good medium, but again, if anyone sees a script get killed even once for having syntax errors when they know it's perfectly fine, tell me.
- Calcsonic and calcredux were saving histories every time the value changed, which was causing massive inefficiency. They now save to disk an updated history every 2 minutes, but only if the history has actually changed.
9-01-05:
(v1.5)
- Implemented the STATS Lich command.
- Wrote the retrosend.lic script.
- Implemented a check for the file 'launch.txt' in the Lich program directory. See directions.txt for documentation.
- Added the Lich command ' DEBUG', which I've been using to debug Lich itself -- it also causes Lich to report why a script died in error, however, so just ignore the core-specific info it causes when used for debugging your scripts.
- Implemented the MOVE, CHECKPATHS, FPUT, and RUN script commands. Modified CHECKSTANCE to accept anything 3 letters or longer (e.g., 'off', 'def', etc.)
- Altered the speed at which favorites get loaded to address an infrequent 'appears to have a syntax' error even if they didn't.
- Addressed a bug that caused a script to be killed as unprocessable even if it was perfectly formatted. May still be an issue, report if so.
- Fixed a bug that caused a script which ends instead of killing itself with 'exit' to be listed as currently active until manually killed.
- Implemented the LOAD Lich command for manually loading the favorites list.
- More speed improvements, switched to synchronous IO::Sockets, some removal of unnecessary string checks, etc..
- Altered Lich to send a carriage-return and new-line both with every string; UNIX standard is just a new-line, which was causing occasional jumble of Lich-echoed strings.
- Reformatted all Lich-related documents to the same carriage-return new-line format, as I noticed when opened in notepad.txt they were -- for lack of a better way of putting it -- fucked.
- Fixed a bug that was causing calcsonic to include evaded attacks in the average percent chance of flares.
9-01-05:
(v1.4)
- Rigged up detection of improperly interpreted scripts that aren't executing properly, but were loaded and registered as running (syntax errors, etc.). It appears to be functioning as it should be... let me know if you encounter problems.
- Added the option of manually setting your armor type to calcredux.lic
8-31-05:
(v1.4)
- Added checks to automate system-dependent directory settings to save me the trouble of changing it back and forth.
- Implemented a check for the default SGE install location, and execution of the program if it's detected. If it isn't found, Lich performs identically to the prior behavior, which is to wait silently until it detects the game client and then to go fully active.
- Added a simple check for a file in the Lich directory which will prevent it from autolaunching SGE, should someone have any reason to want it installed but not want Lich to launch it when executed.
- Added to the list of recognized status strings the GSV tag, which is sent at login to allow the initial setting of your health/spirit/mana/wound displays. This means Lich knows your stats right after login now, instead of only being aware of them after a value changes the first time. Wounds and scars are currently unrecognized.
- Discovered a bug in the GSV tag processing... implemented a fix, which works in every situation I've tested, but it's conceivable for a character with certain stats to still be read inaccurately. Please report what it tells you and your health, spirit, and mana values if you find this happens.
- Added the NPC and roomtitle status tags to Lich's recognized strings.
- Implemented the new script commands CHECKNPCS, CHECKROOM, and CHECKAREA.
- More minor speed optomizations to the core, and almost doubled the speed of CalcRedux.
- Implemented differing functionality in the PUT script command for SF and the Wizard. SF users can now make use of PUT and the matches, but none of the checks will work.
- Investigated SF game data... discovered that Lich's prebuilt functions are sorely inadequate, and for the time being, the native SF scripts are the way to go. Haven't decided yet whether I'll choose to junk SF support totally, or write in proper XML parsing... I don't use SF and don't want to, but we'll see how it turns out.
- Fixed a bug that was causing some of the checks to not return true/false properly when queried.
- Changed the script commands so that they all conform to a standard, which is 'check<thing>'. As it was, one check might be '<thing>check' and another would be 'check<thing>'. Needlessly confusing. They're all 'check<thing>' now.
- Added safe, bug-resistant checks so that a script can easily start another script without crashing Lich or itself if a script doesn't exist or is otherwise problematic. Scripts initiating other scripts is now 100% functional and can be used freely.
- Fixed a bug that caused The Lich to keep client connections open even if the connection to the game server was closed.
8-30-05:
(v1.4)
- Implemented the favorites list, which autostarts any scripts you indicate upon login; part of this being the Lich commands ADD, DEL, and FAVS.
- Decided Lich should be tracking all info itself and pass that on to querying scripts, not depend on scripts to track the info for it. Implemented a filter to prevent the sending of status tags to scripts, and wrote in recognition of numerous status tags.
- Implemented the 'STATUS_TAGS' script command, which serves to turn on/off status tags from the game being fed to the scripts. Defaults to off.
- Removed health, mana, and spirit from the list of recognized commands. No reason to have them there; test.lic does far more than they ever did anyway.
- Apparently forgot to document that scripts have access to any still-cached data, whether it happened a day ago or a minute ago. It's stored in the $simu_buffer global array, and can be safely read by scripts. Note that the '.scan', '.find', and '.find_all' methods will probably make using and processing this cached game data trivial. The retrosend.lic script should serve most needs though.
8-29-05:
(v1.3)
- Addressed some issues in calcredux; still don't have all the faulty crit messages tracked down, but I did implement a check for multi-line crit messages. Added a couple more weapon types.
- Wrote a script to track every d100 roll (open) that happens in your presence, just out of curiosity. Gives you the average everytime it sees a roll.
- Wrote a script to convert Wizard scripts to Lich scripts. It works, but I haven't figured out how to handle GOTOs, so it remains another framework-done, non-functioning script.
- Wrote the calcsonic script.
- Implemented the first simplified, Wizard-style commands.
- Wrote a script to read and store all stats/skills. Haven't done anything with it yet, but the basic framework for calculating any numeric character value is now in place.
- Ironed out the kinks with killing scripts by name. Works just fine now.
- Fixed a possible future-bug that could have caused problems by downcasing all Lich commands, which conceivably could prevent existing scripts from being found if they had capital letters in their name.
- Reinstated the Lich SEND command after debugging it.
- Juggled things around and set it up so that anytime a script sends a string to the game or echoes a message, it's preceded by the name of the script.
8-27-05:
(v1.2)
- Even though I mostly work on this during the weekends, I record what I've done really infrequently... well, I doubt it matters. Fully debugged and implemented multiscripting.
8-21-05:
(v1.1, which was the initial binary build)
- Stopped keeping notes a week ago, because... well... it was a pain in the ass, and I'm the only one who was able to use this damn thing; so some changes/features/etc. could conceivably be undocumented.
- Finished the rewrite of calcredux.
- Finally reinstalled Windows, allowing me to test and debug Lich in a Windows environment. Were plenty of issues. Ironed things out, built the .exe
8-14-05:
(v0.1 Alpha to v1.0 source)
- I cam sum the rest up by saying: lots of bug fixing, implementing, basic coding of the framework, design decisions, that sort of thing. Whatever.