+Version 1.1.6
+* Made some cosmetic changes to this file.
+* Added an inventory class Pouch which allows players to carry around
+ things such as potions and such.
+
Version 1.1.5
-* Added a missing help file admin_commands. It was written before, but somehow was deleted.
+* Added a missing help file admin_commands. It was written before, but
+ somehow was deleted.
* Admins can now identify as any user without having the correct password.
* Fixed a bug that allowed for two nicknames to identify for the same player.
-* Added a forestfights directive to the config file so admins can set the default daily forest
- fights.
-* Added a die directive to the config file that will not let you start GameServ if it is present.
+* Added a forestfights directive to the config file so admins can set the
+ default daily forest fights.
+* Added a die directive to the config file that will not let you start
+ GameServ if it is present.
* Inputted monsters for Level 6. Six more levels left unfinished.
-* Changed confloadtime directive to welcomedelay directive in the config file. This made more sense.
-* Added an updateperiod directive to the config file. This represents the period (in seconds) for
- updating the player data file. Every time the gameserv server gets a message it will check to
- see if "updateperiod" seconds or more have elapsed since the last update.
+* Changed confloadtime directive to welcomedelay directive in the config file.
+ This made more sense.
+* Added an updateperiod directive to the config file. This represents the
+ period (in seconds) for updating the player data file. Every time the
+ gameserv server gets a message it will check to see if "updateperiod"
+ seconds or more have elapsed since the last update.
+
Version 1.1.4
-* Fixed the welcome msg sending "ICK" instead of the nickname of a new aclient. (Thank you wcampbel)
-* Load now has an optional parameter "monsters" which will force a load of the monsterdata
- file. This is useful for changing monsters on-the-fly.
-* Added a load_monsters function that loads from a preconfigured monsters.dat file instead of
- hard coding the monsters into the array. Users can now change the monster configuration
- around.
+* Fixed the welcome msg sending "ICK" instead of the nickname of a new
+ aclient. (Thank you wcampbel)
+* Load now has an optional parameter "monsters" which will force a load of the
+ monsterdata file. This is useful for changing monsters on-the-fly.
+* Added a load_monsters function that loads from a preconfigured monsters.dat
+ file instead of hard coding the monsters into the array. Users can now
+ change the monster configuration around without knowing C/C++.
* Added a new directive to the config file: confloadtime
- this represents the delay (in seconds) until GameServ sends a welcome message to incoming
- clients.
-* Added the welcome message to the config file. See gameserv.example.conf for more info on how to
- use the variable as a formatted string.
+ this represents the delay (in seconds) until GameServ sends a welcome
+ message to incoming clients.
+* Added the welcome message to the config file. See gameserv.example.conf
+ for more info on how to use the variable as a formatted string.
+
Version 1.1.3
-* Removed a lot of extra list searches by changing all of the boolean functions to take
- aClient as a parameter instead of a nickname string.
-* Added an is_alive boolean function. Players must now wait until the next day to play again.
-* Saving the player->flags integer to the players.dat file. Old databases will not work.
- QUICK FIX: put a 0 to the left of the encrypted passwords for all player entries so the
- database can load properly. Look in flags.h for a description of the way flags work.
+* Removed a lot of extra list searches by changing all of the boolean
+ functions to take aClient as a parameter instead of a nickname string.
+* Added an is_alive boolean function. Players must now wait until the next
+ day to play again.
+* Saving the player->flags integer to the players.dat file. Old databases
+ will not work.
+ QUICK FIX: put a 0 to the left of the encrypted passwords for all player
+ entries so the database can load properly. Look in flags.h for a
+ description of the way flags work.
+
Version 1.1.2
* Added a /version reply
* Fixed the Makefile to include configscript.cpp
-* Added a join message when people connect to the IRCD. The message is set on a delay
- so that on the initial nick burst, the services do not send everyone the message.
-* Changed the admin commands from a simple password interface to a more sophisticated flags
- approach. Now you have to identify with the administrator password once, and your flags
- indicate that you are an admin for all commands.
-* Full help files available corrected form for the new administrator type commands.
+* Added a join message when people connect to the IRCD. The message is set
+ on a delay so that on the initial nick burst, the services do not send
+ everyone the message.
+* Changed the admin commands from a simple password interface to a more
+ sophisticated flags approach. Now you have to identify with the
+ administrator password once, and your flags indicate that you are an
+ admin for all commands.
+* Full help files available in corrected form for the new administrator type
+ commands.
Version 1.1.1
* Added some admin features.
- Refresh
* Added help menu functionality for all commands.
-* Fixed the register command so it notified the client that registration was successful.
-* Changed the master command so that you didn't have to fight your master if you
- had enough experience. There is now a question/fight subcommand set for the master
- command.
-* Tweaked the masters a bit. Basically, they were too tough. Once a player had enough
- experience, they had no chance against their master until they got the next two
- weapons up. This made the next level too easy. Past level 1 still needs tweaking.
+* Fixed the register command so it notified the client that registration
+ was successful.
+* Changed the master command so that you didn't have to fight your master
+ if you had enough experience. There is now a question/fight subcommand
+ set for the master command.
+* Tweaked the masters a bit. Basically, they were too tough. Once a player
+ had enough experience, they had no chance against their master until
+ they got the next two weapons up. This made the next level too easy.
+ Past level 1 still needs tweaking.
* Added functionality for bahamut IRCD
Version 1.1.0
-* Added autoconf functionality to the gameserv package. Does not compile correctly on
- SunOS without tweaking.
+* Added autoconf functionality to the gameserv package. Does not compile
+ correctly on SunOS without tweaking.
* Fixed the game so that players stats reset at midnight UTC + 8 hours.
time(NULL) - (time(NULL) % 86400) + 3600 * 8
* Added a contrib directory with a user submitted patch for hybrid ircd.
void do_run(char *u);
void do_stats(char *u);
void do_store(char *u);
+void do_tavern(char *u);
void see_master(char *u);
void showstats(const char *u, const char *nick);
do_admin(source);
} else if (stricmp(cmd, "REFRESH") == 0) {
do_refresh(source);
+ } else if (stricmp(cmd, "TAVERN") == 0) {
+ do_tavern(source);
} else if (stricmp(cmd, "PRINT") == 0) {
cout << "Printing Clients List: " << endl;
clients.print();
}
}
+void do_tavern(char *u)
+{
+ char *cmd = strtok(NULL, " ");
+ long int price;
+
+ aClient *user;
+ Player *p;
+ if (!(user = find(u)))
+ {
+ notice(s_GameServ, u, "Fatal Error. See a %S admin for help");
+ return;
+ }
+ else if (!is_playing(user))
+ {
+ notice(s_GameServ, u, "You must be playing to go to the Tavern");
+ return;
+ }
+ p = user->stats;
+ if (!cmd)
+ {
+ notice(s_GameServ, u, "Welcome to Boot Liquors Mystic Apothecary");
+ notice(s_GameServ, u, "Your commands:");
+ notice(s_GameServ, u, "/msg %S TAVERN {LIST | BUY} [NUMBER]");
+ notice(s_GameServ, u, "What'll it be?");
+ }
+ else if (stricmp(cmd, "LIST") == 0)
+ {
+ notice(s_GameServ, u, "Here is a list of what we have to offer:");
+ notice(s_GameServ, u, "1. Healing Potions for %ld Gold", 1000 * p->level + (p->exp / 10));
+ notice(s_GameServ, u, "2. Strength Potions for %ld Gold", 2050 * p->level + (p->exp / 10));
+ notice(s_GameServ, u, "3. Defense Potions for %ld Gold", 2000 * p->level + (p->exp / 10));
+ notice(s_GameServ, u, "To buy a potion, type /msg %S TAVERN BUY #");
+ notice(s_GameServ, u, "Example: /msg %S TAVERN BUY 1 buys a healing potion!");
+ notice(s_GameServ, u, "By something will ya!");
+ }
+ else if (stricmp(cmd, "BUY") == 0)
+ {
+ char *chnum = strtok(NULL, " ");
+ int num = stringtoint(chnum);
+
+ if (!chnum)
+ {
+ notice(s_GameServ, u, "SYNTAX: TAVERN BUY #");
+ notice(s_GameServ, u, "Example: /msg %S TAVERN BUY 1");
+ return;
+ }
+ if (num < 1 || num > 3)
+ {
+ notice(s_GameServ, u, "Invalid Choice!");
+ notice(s_GameServ, u, "Here is a list of what we have to offer:");
+ notice(s_GameServ, u, "1. Healing Potions for %ld Gold", 1000 * p->level + (p->exp / 10));
+ notice(s_GameServ, u, "2. Strength Potions for %ld Gold", 2050 * p->level + (p->exp / 10));
+ notice(s_GameServ, u, "3. Defense Potions for %ld Gold", 2000 * p->level + (p->exp / 10));
+ notice(s_GameServ, u, "To buy a potion, type /msg %S TAVERN BUY #");
+ notice(s_GameServ, u, "Example: /msg %S TAVERN BUY 1 buys a healing potion!");
+ }
+ switch(num)
+ {
+ case 1:
+ price = (1000 * p->level) + (p->exp / 10);
+ if (p->gold >= price)
+ {
+ notice(s_GameServ, u, "One healing potion coming right up!");
+ p->inventory.incHealing();
+ }
+ else
+ notice(s_GameServ, u, "You don't have enough gold!");
+ break;
+ case 2:
+ price = (2050 * p->level) + (p->exp / 10);
+ if (p->gold >= price)
+ {
+ notice(s_GameServ, u, "One strength boost coming right up!");
+ p->inventory.incStrength();
+ }
+ else
+ notice(s_GameServ, u, "You don't have enough gold!");
+ break;
+ case 3:
+ price = (2000 * p->level) + (p->exp / 10);
+ if (p->gold >= price)
+ {
+ notice(s_GameServ, u, "One defense boost coming right up!");
+ p->inventory.incDefense();
+ }
+ else
+ notice(s_GameServ, u, "You don't have enough gold!");
+ break;
+ default:
+ notice(s_GameServ, u, "Logical Error. See a %S admin for help!");
+ break;
+ }
+ }
+}
+
void do_bank(char *u)
{
char *cmd = strtok(NULL, " ");