if (curday != day)
{
refreshall();
+ clearNews(todaysnews);
+ saveNews(newsdata, todaysnews);
day = curday;
save_day(); // here i come to save the day!
}
do_list(source);
} else if (stricmp(cmd, "LOGOUT") == 0) {
do_logout(source);
+ } else if (stricmp(cmd, "NEWS") == 0) {
+ do_news(source);
} else if (stricmp(cmd, "REGISTER") == 0) {
do_register(source);
} else if (stricmp(cmd, "IDENTIFY") == 0) {
return;
}
int oldhealing = user->stats->hp;
+ user->stats->hp += (10 * user->stats->level) + (rand() % 10) * user->stats->level;
+ if (user->stats->hp - user->stats->maxhp >= 100)
+ {
+ user->stats->hp = user->stats->maxhp + 100;
+
+ if (oldhealing >= (user->stats->maxhp + 100))
+ {
+ notice(s_GameServ, u, "You cannot hold anymore HP!");
+ return;
+ }
+ }
+
notice(s_GameServ, u, "You hastiliy gulp down the flask of cool life-giving waters.");
notice(s_GameServ, u, "Rejuvination spreads throughout your body.");
- user->stats->hp += (10 * user->stats->level) + (rand() % 10) * user->stats->level;
notice(s_GameServ, u, "You gain %d HP!", user->stats->hp - oldhealing);
p->decHealing();
if (player_fight(user))
strbonus[ni->stats->level - 1], defbonus[ni->stats->level - 1]);
// Increase your level
- ni->stats->level++;
// Increase your maximum hit points
ni->stats->maxhp += hpbonus[ni->stats->level - 1];
// Add to your defensive power
ni->stats->defense += defbonus[ni->stats->level - 1];
+ ni->stats->level++;
+
// Clear the pointer for your master
ni->stats->master = NULL;
}