diff --git a/config.lua b/config.lua
index 72de76c..0a60ea7 100644
--- a/config.lua
+++ b/config.lua
@@ -1,6 +1,9 @@
-- Custom
knightCloseAttackDamageIncreasePercent = 20
paladinRangeAttackDamageIncreasePercent = 15
+-- Min/Max rate spawn is a multiplication of the map spawntime in spawns.xml Regular monster spawn time is 600. The formula would be randomValue = random(600*100, 600*200) which varies between 60s and 120s
+minRateSpawn = 100
+maxRateSpawn = 200
-- Combat settings
-- NOTE: valid values for worldType are: "pvp", "no-pvp" and "pvp-enforced"
diff --git a/data/world792/spawns.xml b/data/world792/spawns.xml
index e316470..193920b 100644
--- a/data/world792/spawns.xml
+++ b/data/world792/spawns.xml
@@ -1208,7 +1208,7 @@
-
+
diff --git a/src/configmanager.cpp b/src/configmanager.cpp
index 088a283..0d16691 100644
--- a/src/configmanager.cpp
+++ b/src/configmanager.cpp
@@ -101,6 +101,8 @@ bool ConfigManager::load()
integer[RATE_LOOT] = getGlobalNumber(L, "rateLoot", 2);
integer[RATE_MAGIC] = getGlobalNumber(L, "rateMagic", 3);
integer[RATE_SPAWN] = getGlobalNumber(L, "rateSpawn", 1);
+ integer[MIN_RATE_SPAWN] = getGlobalNumber(L, "minRateSpawn", 100);
+ integer[MAX_RATE_SPAWN] = getGlobalNumber(L, "maxRateSpawn", 200);
integer[BAN_LENGTH] = getGlobalNumber(L, "banLength", 30 * 24 * 60 * 60);
integer[ACTIONS_DELAY_INTERVAL] = getGlobalNumber(L, "timeBetweenActions", 200);
integer[EX_ACTIONS_DELAY_INTERVAL] = getGlobalNumber(L, "timeBetweenExActions", 1000);
diff --git a/src/configmanager.h b/src/configmanager.h
index 1b571ae..3caa4fa 100644
--- a/src/configmanager.h
+++ b/src/configmanager.h
@@ -87,6 +87,8 @@ class ConfigManager
RATE_LOOT,
RATE_MAGIC,
RATE_SPAWN,
+ MIN_RATE_SPAWN,
+ MAX_RATE_SPAWN,
BAN_LENGTH,
MAX_MESSAGEBUFFER,
ACTIONS_DELAY_INTERVAL,
diff --git a/src/luascript.cpp b/src/luascript.cpp
index 222ecb3..3927d1d 100644
--- a/src/luascript.cpp
+++ b/src/luascript.cpp
@@ -1662,6 +1662,8 @@ void LuaScriptInterface::registerFunctions()
registerEnumIn("configKeys", ConfigManager::RATE_LOOT)
registerEnumIn("configKeys", ConfigManager::RATE_MAGIC)
registerEnumIn("configKeys", ConfigManager::RATE_SPAWN)
+ registerEnumIn("configKeys", ConfigManager::MIN_RATE_SPAWN)
+ registerEnumIn("configKeys", ConfigManager::MAX_RATE_SPAWN)
registerEnumIn("configKeys", ConfigManager::MAX_MESSAGEBUFFER)
registerEnumIn("configKeys", ConfigManager::ACTIONS_DELAY_INTERVAL)
registerEnumIn("configKeys", ConfigManager::EX_ACTIONS_DELAY_INTERVAL)
diff --git a/src/spawn.cpp b/src/spawn.cpp
index 0de9026..26350aa 100644
--- a/src/spawn.cpp
+++ b/src/spawn.cpp
@@ -89,7 +89,7 @@ bool Spawns::loadFromXml(const std::string& filename)
spawnList.emplace_front(pos, radius);
Spawn& spawn = spawnList.front();
- uint32_t interval = uniform_random(pugi::cast(childNode.attribute("spawntime").value()) * 250, pugi::cast(childNode.attribute("spawntime").value()) * 500);
+ uint32_t interval = uniform_random(pugi::cast(childNode.attribute("spawntime").value()) * g_config.getNumber(ConfigManager::MIN_RATE_SPAWN), pugi::cast(childNode.attribute("spawntime").value()) * g_config.getNumber(ConfigManager::MAX_RATE_SPAWN));
if (interval > MINSPAWN_INTERVAL) {
uint32_t exInterval = g_config.getNumber(ConfigManager::RATE_SPAWN);
if (exInterval) {