home *** CD-ROM | disk | FTP | other *** search
- /*
- LANDS OF LORE OIL DELIVERY SERVICE
- ----------------------------------
-
- Are you still stumbling around in those mines
- pushing buttons and turning cranks and jumping
- down pits and leaving rocks on plates? If so,
- you are probably running out of oil.
-
- This little whizbang fills up your lamp, the
- only cheat really needed in this great game.
-
- Now let's get a few prerequisites out of the
- way first:
-
- Number 1: You've got to have a lamp. If you don't
- have one yet, then don't use the program.
- Number 2: I developed this program with the
- English Screen English Box version of LOL.
- If you are using another language, be
- careful.
-
- To use this program, please follow the
- steps below:
-
- 1. Make backups of your saved games. LOL
- saved games are _save001.dat, _save002.dat,
- and so on.
-
- 2. Move lol_lamp.exe into the same directory
- where your saved games are.
-
- 3. Figure out which game needs to be fixed.
- If you are not sure, you can enter, for
- example, type _save008.dat, and see
- your description for that game. We'll
- assume that you want to change
- _save008.dat.
-
- 4. Then enter LOL_LAMP _save008.dat.
- That's all.
-
- HACKER'S NOTES
- --------------
- 1. The party gold is two words further down from the oil.
- 2. The party knapsack goes from 607 to 701 as words,
- but beware that the interpretation of these bytes
- is game-phase dependent (i.e., a 0x4F is a flask
- only in certain places. Dwarven Boots, however,
- 0xA1 is globally stable). Dropping more than
- 32 items in a room locks the machine.
- 3. The word immediately before the character's name
- contains his status (1 = ok, 9 = dead, etc).
- */
- #include <stdio.h>
- #include <io.h>
- #include <fcntl.h>
- #include <stdlib.h>
- #include <string.h>
- #include <ctype.h>
- #include <conio.h>
- #define LAMP_LIGHT 1110
- char light;
- int h;
- int r;
- int main( int argc, char *argv[] )
- {// What? You want dox?
- if( argc ) {
- h = open( argv[ 1 ], O_RDWR | O_BINARY );
- if( h > 1 ) {
- lseek( h, LAMP_LIGHT, SEEK_SET );
- r = read( h, &light, 1 );
- if( r == 1 ) {
- light = 0x93;
- printf( "Lantern boosted\n" );
- lseek( h, LAMP_LIGHT, SEEK_SET );
- write( h, &light, 1 );
- } else {
- printf( "Something untoward has taken place\n" );
- }
- close( h );
- } else {
- printf( "Cannot locate file!\n" );
- }
- } else {
- printf( "You have to tell me which file!\n" );
- }
- return( 0 );
- }
-
-