Version 1.3.3
+* Added a fair fight checker which won't allow people who can kill others with one hit
+ to even challenge other players - Kain (thanks Mauritz)
* Fixed a bug that would delete a user upon reset or defeating the dragon - Kain
* Fixed a compile bug for some operating systems in c_forest.cpp - Kain (thanks Mauritz)
* Fixed a bug that occured when a player defeated another player and gameserv /noticed the channel
{
char *buf, *directive, *value;
-#define numdirectives 39
+#define numdirectives 40
unload_config_file();
directives[36].desc = "MAXFORESTFIGHTS - Maximum amount of forest fights to roll over";
directives[37].desc = "ROLLOVERPERIOD - Period (in seconds) to rollover forest fights";
directives[38].desc = "NUMROLLOVERFIGHTS - Number of forest fights to roll over";
+ directives[39].desc = "FAIRFIGHTS - True/False as to whether or not to check for fair fights";
configflags = 0;
numrolloverfights = stringtoint(value);
directives[38].done = true;
}
+ else if (stricmp(directive, "FAIRFIGHTS") == 0)
+ {
+ value = strtok(NULL, "");
+ if (stricmp(value, "TRUE") == 0)
+ setFairFights();
+ directives[39].done = true;
+ }
else if (stricmp(directive, "WELCOMEMSG") == 0)
{
// This directive is optional
535~690
-10351~30000
+10351~75000
21231~24032
1958~3000
^
" %s is now watching over the Dragon's lair!",
ni->stats->getName().c_str(), ni->stats->getName().c_str(),
ni->stats->getMonster()->name.c_str(), ni->stats->getName().c_str());
- dragon.name = "DRAGON-" + ni->stats->getName();
+ dragon.name = "Dragon " + ni->stats->getName();
dragon.weapon = "Breath of Fire";
dragon.strength = ni->stats->getStrength();
dragon.defense = ni->stats->getDefense();
#define CFLAG_SAVEDNOTICE 0x00000010
#define CFLAG_USENICKSERV 0x00000020
#define CFLAG_ROLLOVERFORESTFIGHTS 0x00000040
+#define CFLAG_FAIRFIGHTS 0x00000080
+
+#define setFairFights() (configflags |= CFLAG_FAIRFIGHTS)
+#define clearFairFights() (configflags &= ~CFLAG_FAIRFIGHTS)
+#define isFairFights() (configflags & CFLAG_FAIRFIGHTS)
#define setRolloverForestFights() (configflags |= CFLAG_ROLLOVERFORESTFIGHTS)
#define clearRolloverForestFights() (configflags &= ~CFLAG_ROLLOVERFORESTFIGHTS)
{
notice(s_GameServ, u, "%s is fighting %s already!", battle->stats->getName().c_str(), battle->stats->getMonster()->name.c_str());
}
+ else if (isFairFights() && (ni->stats->getStrength()/2 - battle->stats->getDefense()) > 0)
+ {
+ notice(s_GameServ, u, "Fair fighting is enabled, and you're too strong for %s!", battle->stats->getName().c_str());
+ }
else if (ni->stats->getLevel() - battle->stats->getLevel() > maxbfightdistance)
{
// You can't fight someone below you by more than X level(s)
# player fights only
maxbfightdistance 1
+# Leave this as is if you want to enable fair fight checking
+# This will not let a player fight another player if they will
+# Kill the other player with 1 hit... useful for those pesky Level 1 players
+# That have the best armor and weapons because they play way too much!
+fairfights true
+
# This is the maximum time (in seconds) that a player may remain idle
# before something naughty happens to them :)
maxidletime 300