List<aClient> players;
Monster *monsters[LEVELS][MONSTERS]; // Monsters per level. Total = MONSTERS * LEVELS
+Monster boss; // The boss monster
Monster *masters[LEVELS]; // A master for each level
log("Source: %s Command: %s", source, cmd);
#endif
- long int mn = midnight() - 12 * 3600; // 12 noon ;)
+ struct tm *tm;
+ time_t ti;
+ time(&ti);
+ tm = localtime(&ti);
- if (mn > timestamp)
+ int curday = tm->tm_mday;
+
+ if (curday != day)
{
refreshall();
- timestamp = mn;
- save_timestamp();
+ day = curday;
+ save_day();
}
if (strnicmp(cmd, "\1PING", 6) == 0)
return;
}
+ else if (!is_playing(user))
+ {
+ notice(s_GameServ, u, "You must be playing to use items!");
+ return;
+ }
+
p = user->stats;
if (p->battle)
notice(s_GameServ, u, "You must be playing to use the bank!");
return;
}
+ else if (stricmp(cmd, "BALANCE") == 0)
+ {
+ showBankBalance(u);
+ return;
+ }
else if (!isAlive(user->stats))
{
notice(s_GameServ, u, "You are dead. We don't accept gold from dead folk! Wait 'til tomorrow!");
p = user->stats;
- if (stricmp(cmd, "BALANCE") == 0)
- {
- showBankBalance(u);
- }
- else if (stricmp(cmd, "DEPOSIT") == 0)
+ if (stricmp(cmd, "DEPOSIT") == 0)
{
if (p->bank == 2000000000)
{