void do_list(char *u)
{
aClient *user;
+ char *cmd = strtok(NULL, " ");
+
if (!(user = find(u)))
{
log("Fatal Error: Couldn't find %s in the client list", u);
ListNode<aClient> *temp;
bool header = false;
+
for (unsigned long x = 0; x < U_TABLE_SIZE; x++)
{
temp = players[x].First();
if (!players[x].isEmpty())
{
- if (!header)
- {
- notice(s_GameServ, u, "People Playing:");
- header = true;
- }
while(temp)
{
- #ifdef P10
- notice(s_GameServ, u, "IRC: %s Game: %s", temp->getData()->getRealNick(),
- temp->getData()->stats->name);
- #else
- notice(s_GameServ, u, "IRC: %s Game: %s", temp->getData()->getNick(),
- temp->getData()->stats->name);
- #endif
+ if (!cmd || is_playing(temp->getData()))
+ {
+ if (!header)
+ {
+ notice(s_GameServ, u, "Players:");
+ header = true;
+ }
+ #ifdef P10
+ notice(s_GameServ, u, "IRC: %s Game: %s", temp->getData()->getRealNick(),
+ temp->getData()->stats->name);
+ #else
+ notice(s_GameServ, u, "IRC: %s Game: %s", temp->getData()->getNick(),
+ temp->getData()->stats->name);
+ #endif
+ }
temp = temp->Next();
}
notice(s_GameServ, u, "You're dead. Wait until tomorrow to see your master!");
return;
}
- else if (user->stats->level < 12)
+ else if (user->stats->level < REALLEVELS)
{
notice(s_GameServ, u, "You fool! Only those strong enough "\
"to vanquish any foe should DARE fight the dragon!");
notice(s_GameServ, u, "To put it in terms you can understand: "\
- "You are too weak. You must be Level 12!");
+ "You are too weak. You must be Level %d!", REALLEVELS);
+ return;
}
updateTS(user->stats);
- char *cmd = strtok(NULL, " ");
Player *p = user->stats;
p->fight = new Monster(boss);
notice(s_GameServ, u, "You approach the dragon's lair cautiously.");
"deep, red fog rolls in. The air is filled with the "\
"heated mist of deadly fire from beyond the cave "\
"entrance.");
- notice(s_GameServ, u, "You adjust your %s, tighten your grip on "\
+ notice(s_GameServ, u, "You adjust your %s, tighten your grip on "\
"your %s, and venture into the hot, dark cave. "\
"You are surprised at the angle of descent as you climb "\
"lower and lower, deeper into the dragon's den.");
notice(s_GameServ, u, "Just then you notice the eye begin to "\
"glare orange! The tooth is moving... but it is still too "\
"dark for you to make out.... THE DRAGON! You see it!");
- display_monsters(u);
+ display_monster(u);
}
void do_master(char *u)
case 11:
need = 20000000;
break;
- case 12:
+
+ case REALLEVELS:
need = p->exp + 1;
- notice(s_GameServ, u, "You are at level 12. You are the master. What's left? The DRAGON!");
+ notice(s_GameServ, u, "You are at level %d. You are the master. What's left? The DRAGON!", REALLEVELS);
return;
break;
default: