Version 1.1.6
+* Added an inventory command which allows players to view how many
+ potions they are storing.
+* Added a tavern command which allows players to buy potions and store
+ them in their inventory for later use.
* Made some cosmetic changes to this file.
* Added an inventory class Pouch which allows players to carry around
things such as potions and such.
- = Started
X = Finsihed
+- Finish the monsters for all levels.
+
+* Make all applicable commands take the player name instead of the irc
+ nickname as their parameter. This way players can have different names
+ and stay anonymous on IRC while enjoying full game functionality.
+
+* Add functionality for potions
+
* Make GameServ a true daemon instead of using nohup
* No output unless it's a loading error
* Town square shouts. Array of 10 strings that gets rotated
* Choose how many strings to rotate in the config file
-- Tavern where you can buy potions and powerups
-
- Forest events
X Wishing well
X Fountain of youth - rejuvination & forest fights
X Add option to config file for forest fights per day, etc.
-* Finish the monsters for all levels.
- X Load monsters from a monsters.dat file so they can be changed easily.
+X Load monsters from a monsters.dat file so they can be changed easily.
X Periodic updates of the gameserv databases to avoid lost data
+X Tavern where you can buy potions and powerups
else if (!is_fighting(u))
{
int eventnum = rand() % 100;
+ eventnum = 14;
Player *p = source->stats;
p->forest_fights--;
if (eventnum < 5) // forest fights
{
notice(s_GameServ, u, "EXTRA FOREST FIGHTS!!");
- p->forest_fights += 5;
+ p->forest_fights += (rand() % 11) + 5;
}
else if (eventnum < 10)
{
notice(s_GameServ, u, "A SACK OF GOLD!");
- p->gold += 1000 * p->level;
+ p->gold += (rand() % 1000) * (p->level + (rand() % 10));
}
else
{
notice(s_GameServ, u, "Time seems to stand still for a moment.");
notice(s_GameServ, u, "EXTRA EXPERIENCE POINTS");
- p->exp += 10 * 10 / (p->level / 100);
+ p->exp += (rand() % 100) * (p->level + rand() % 10);
}
}
}
E void refreshall();
E void reset(aClient *ni);
-E void do_list(char *u);
-E void do_refresh(char *u);
-E void do_register(char *u);
+E void do_attack(char *u);
+E void do_bank(char *u);
+E void do_fight(char *u);
+E void do_forest(char *u);
+E void do_heal(char *u);
E void do_identify(char *u);
+E void do_invenory(char *u);
+E void do_list(char *u);
E void do_play(char *u);
E void do_quitg(char *u);
+E void do_refresh(char *u);
+E void do_register(char *u);
E void do_reset(char *u);
-E void do_fight(char *u);
-E void do_store(char *u);
-E void do_heal(char *u);
-E void do_bank(char *u);
-E void do_attack(char *u);
E void do_run(char *u);
-E void do_visit(char *u);
E void do_stats(char *u);
-E void do_forest(char *u);
+E void do_store(char *u);
+E void do_tavern(char *u);
+E void do_visit(char *u);
E void see_mystic(char *u);
-E void showstats(const char *u, const char *nick);
+E void showstats(const char *u, const char *nick);
+E void showinventory(aClient *from, aClient *to = NULL);
/* Database saving stuff */
E int save_gs_dbase();
void do_heal(char *u);
void do_help(char *u);
void do_identify(char *u);
+void do_inventory(char *u);
void do_refresh(char *u);
void do_register(char *u);
void do_list(char *u);
void see_master(char *u);
void showstats(const char *u, const char *nick);
+void showinventory(aClient *from, aClient *to = NULL);
void showBankBalance(const char *u);
#define WNA 16
do_run(source);
} else if (stricmp(cmd, "HEAL") == 0) {
do_heal(source);
+ } else if (stricmp(cmd, "INVENTORY") == 0) {
+ do_inventory(source);
} else if (stricmp(cmd, "MASTER") == 0) {
do_master(source);
} else if (stricmp(cmd, "STORE") == 0) {
}
}
}
+void do_inventory(char *u)
+{
+ aClient *user;
+ if (!(user = find(u)))
+ {
+ notice(s_GameServ, u, "Fatal Error. Contact a %S admin!");
+ return;
+ }
+ else if (!is_playing(user))
+ {
+ notice(s_GameServ, u, "You must be playing to check your inventory!");
+ return;
+ }
+ showinventory(user, user);
+}
+void showinventory(aClient *from, aClient *to)
+{
+ char *nick = to->getNick();
+
+ if (!to)
+ to = from;
+ if (is_playing(from))
+ {
+ Pouch *p = &from->stats->inventory;
+ notice(s_GameServ, nick, "Inventory for %s:", from->getNick());
+ notice(s_GameServ, nick, " Healing Potions: %d", p->Healing());
+ notice(s_GameServ, nick, "Strength Potions: %d", p->Strength());
+ notice(s_GameServ, nick, " Defense Potions: %d", p->Defense());
+ }
+}
void do_tavern(char *u)
{
char *cmd = strtok(NULL, " ");
notice(s_GameServ, u, "You must be playing to go to the Tavern");
return;
}
+ else if (is_fighting(user))
+ {
+ notice(s_GameServ, u, "You cannot go to the Tavern during a fight!");
+ return;
+ }
p = user->stats;
if (!cmd)
{
break;
}
}
+ else
+ {
+ notice(s_GameServ, u, "Improper Syntax.");
+ notice(s_GameServ, u, "Type /msg %S HELP TAVERN for help");
+ }
}
void do_bank(char *u)
\ 2HEAL\ 2 \1fHeal yourself. Replenishes Hit points\1f
\ 2HELP\ 2 \1fBrings up this help menu\1f
\ 2IDENTIFY\ 2 \1fIdentify yourself with a previously registered login\1f
+ \ 2INVENTORY\ 2 \1fView your inventory\1f
\ 2LIST\ 2 \1fList who is currently in the realm\1f
\ 2MASTER\ 2 \1fQuestion and fight your master to gain a level\1f
\ 2REGISTER\ 2 \1fRegister a login and join the realm\1f
--- /dev/null
+The inventory command allows a player to check their inventory to see how
+many potions they have on hand. You may check your inventory during a fight.
+
+SYNTAX: /msg %S \ 2INVENTORY\ 2