{
// Place fun stuff here :)
int randnum = 1 + rand() % 100; // 1-100
+ #define GSN(s) notice(s_GameServ, nick, s)
+ #define GSN2(s, f) notice(s_GameServ, nick, s, f)
if (randnum < 50)
{
- #define GSN(s) notice(s_GameServ, nick, s)
- #define GSN2(s, f) notice(s_GameServ, nick, s, f)
- int stolen = ((35 + rand() % 66)/100) * user->stats->gold;
-
+ // 35-100% of your gold goes pffft - kain
+ int stolen = (35 + (rand() % 66)) * user->stats->gold / 100;
+
GSN("You stop for a moment to rest on the "\
"street corner. All of a sudden, you "\
"are ambushed from all sides by a hoarde "\
"and steal %d gold from you!", stolen);
user->stats->gold -= stolen;
}
+ else if (randnum >= 50 && randnum < 75)
+ {
+ // 25-65% of your gold goes pffft - kain
+ int stolen = (25 + (rand() % 41)) * user->stats->gold / 100;
+ GSN("While dilly dallying around, you lose "\
+ "your sense of time. Little did you know, "\
+ "but thieves lifted your gold while you "\
+ "weren't watching.");
+ GSN2("Better luck next time... you lose %d gold", stolen);
+ user->stats->gold -= stolen;
+ }
+ else if (randnum >= 75)
+ {
+ // 25-75% of your gold goes pffft - kain
+ int stolen = (25 + (rand() % 51)) * user->stats->gold / 100;
+ GSN("Good grief! A gaggle of gooey green ghostlike "\
+ "goblins grabbed your gold!");
+ GSN2("They stole %d gold from you!", stolen);
+ user->stats->gold -= stolen;
+ }
// Always log out the user
using std::endl;
char *PACKAGE = "GameServ";
-char *VERSION = "1.2.0 +devel";
+char *VERSION = "1.2.1 +devel";
int sock;
int day;
}
#if defined(P10)
} else if (stricmp(cmd, "Q") == 0) {
- unsigned long hv = sHASH((unsigned char *) source);
+// unsigned long hv = sHASH((unsigned char *) source);
#else
} else if (stricmp(cmd, "QUIT") == 0) {
- unsigned long hv = iHASH((unsigned char *) source);
+// unsigned long hv = iHASH((unsigned char *) source);
#endif
aClient *quitter;
char z = source[0];