diff --git a/config.lua.dist b/config.lua.dist index f446679911c..3ba98113b19 100644 --- a/config.lua.dist +++ b/config.lua.dist @@ -224,8 +224,6 @@ tibiadromeConcoctionTickType = "online" -- "online" | "experience" onlyPremiumAccount = false -- Customs --- NOTE: weatherRain = true, activates weather raining effects --- NOTE: thunderEffect = true, activates thunder effects -- NOTE: stashMoving = true, stow an container inside your stash -- NOTE: depotChest, the non-stackable items will be moved to the selected depot chest(I - XVIII). -- NOTE: autoBank = true, the dropped coins from monsters will be automatically deposited to your bank account. @@ -239,8 +237,6 @@ onlyPremiumAccount = false -- NOTE: toggleReceiveReward = true, will enable players to choose one of reward exercise weapon by command !reward -- NOTE: randomMonsterSpawn = true, will enable monsters from the same spawn to be randomized between them, thus making a variable hunt -- NOTE: enablePlayerPutItemInAmmoSlot = true, will enable players to put any items on ammo slot, more used in custom shopping system -weatherRain = false -thunderEffect = false stashMoving = false depotChest = 4 autoLoot = false diff --git a/data-otservbr-global/scripts/actions/other/glooth_bag.lua b/data-otservbr-global/scripts/actions/other/glooth_bag.lua deleted file mode 100644 index 382aa5ad447..00000000000 --- a/data-otservbr-global/scripts/actions/other/glooth_bag.lua +++ /dev/null @@ -1,47 +0,0 @@ -local items = { - glooth_spears = 21158, - glooth_amulet = 21183, - glooth_club = 21178, - glooth_axe = 21180, - glooth_blade = 21179, - glooth_backpack = 21295, - glooth_sandwiches = 21143, - glooth_soup = 21144, - glooth_steaks = 21146, - control_unit = 21186, -} - -local gloothBag = Action() - -function gloothBag.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local rand = math.random(1, 100) - - if rand <= 15 then - player:addItem(items.glooth_spears, 2) - elseif rand >= 16 and rand <= 23 then - player:addItem(items.glooth_amulet, 1) - elseif rand >= 24 and rand <= 32 then - player:addItem(items.glooth_club, 1) - elseif rand >= 33 and rand <= 50 then - player:addItem(items.glooth_axe, 1) - elseif rand >= 51 and rand <= 64 then - player:addItem(items.glooth_blade, 1) - elseif rand >= 65 and rand <= 75 then - player:addItem(items.glooth_backpack, 1) - elseif rand >= 76 and rand <= 86 then - player:addItem(items.glooth_sandwiches, 10) - elseif rand >= 87 and rand <= 96 then - player:addItem(items.glooth_soup, 10) - elseif rand >= 97 and rand <= 99 then - player:addItem(items.control_unit, 1) - elseif rand == 100 then - player:addItem(items.glooth_steaks, 10) - end - - item:remove(1) - - return true -end - -gloothBag:id(21203) -gloothBag:register() diff --git a/data-otservbr-global/scripts/actions/other/offline_training.lua b/data-otservbr-global/scripts/actions/other/offline_training.lua deleted file mode 100644 index d205feb6b2f..00000000000 --- a/data-otservbr-global/scripts/actions/other/offline_training.lua +++ /dev/null @@ -1,31 +0,0 @@ -local statues = { - [16198] = SKILL_SWORD, - [16199] = SKILL_AXE, - [16200] = SKILL_CLUB, - [16201] = SKILL_DISTANCE, - [16202] = SKILL_MAGLEVEL, -} - -local offlineTraining = Action() - -function offlineTraining.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local skill = statues[item:getId()] - if not player:isPremium() then - player:sendCancelMessage(RETURNVALUE_YOUNEEDPREMIUMACCOUNT) - return true - end - - if player:isPzLocked() then - return false - end - - player:setOfflineTrainingSkill(skill) - player:remove(false) - return true -end - -for index, value in pairs(statues) do - offlineTraining:id(index) -end - -offlineTraining:register() diff --git a/data-otservbr-global/scripts/creaturescripts/others/offline_training.lua b/data-otservbr-global/scripts/creaturescripts/others/offline_training.lua deleted file mode 100644 index afe28e82134..00000000000 --- a/data-otservbr-global/scripts/creaturescripts/others/offline_training.lua +++ /dev/null @@ -1,76 +0,0 @@ -local offlineTraining = CreatureEvent("OfflineTraining") -function offlineTraining.onLogin(player) - local lastLogout = player:getLastLogout() - local offlineTime = lastLogout ~= 0 and math.min(os.time() - lastLogout, 86400 * 21) or 0 - local offlineTrainingSkill = player:getOfflineTrainingSkill() - if offlineTrainingSkill == SKILL_NONE then - player:addOfflineTrainingTime(offlineTime * 1000) - return true - end - - player:setOfflineTrainingSkill(SKILL_NONE) - - if offlineTime < 600 then - player:sendTextMessage(MESSAGE_OFFLINE_TRAINING, "You must be logged out for more than 10 minutes to start offline training.") - return true - end - - local trainingTime = math.max(0, math.min(offlineTime, math.min(43200, player:getOfflineTrainingTime() / 1000))) - player:removeOfflineTrainingTime(trainingTime * 1000) - - local remainder = offlineTime - trainingTime - if remainder > 0 then - player:addOfflineTrainingTime(remainder * 1000) - end - - if trainingTime < 60 then - return true - end - - local text = "During your absence you trained for" - local hours = math.floor(trainingTime / 3600) - if hours > 1 then - text = string.format("%s %d hours", text, hours) - elseif hours == 1 then - text = string.format("%s 1 hour", text) - end - - local minutes = math.floor((trainingTime % 3600) / 60) - if minutes ~= 0 then - if hours ~= 0 then - text = string.format("%s and", text) - end - - if minutes > 1 then - text = string.format("%s %d minutes", text, minutes) - else - text = string.format("%s 1 minute", text) - end - end - text = string.format("%s.", text) - player:sendTextMessage(MESSAGE_OFFLINE_TRAINING, text) - - local vocation = player:getVocation() - local promotion = vocation:getPromotion() - local topVocation = not promotion and vocation or promotion - - local updateSkill = false - if table.contains({ SKILL_CLUB, SKILL_SWORD, SKILL_AXE, SKILL_DISTANCE }, offlineTrainingSkill) then - local modifier = topVocation:getBaseAttackSpeed() / 1000 / configManager.getFloat(configKeys.RATE_OFFLINE_TRAINING_SPEED) - updateSkill = player:addOfflineTrainingTries(offlineTrainingSkill, (trainingTime / modifier) / (offlineTrainingSkill == SKILL_DISTANCE and 4 or 2)) - elseif offlineTrainingSkill == SKILL_MAGLEVEL then - local gainTicks = (topVocation:getManaGainTicks() / 1000) * 2 - if gainTicks == 0 then - gainTicks = 1 - end - - updateSkill = player:addOfflineTrainingTries(SKILL_MAGLEVEL, trainingTime * (vocation:getManaGainAmount() / gainTicks)) - end - - if updateSkill then - player:addOfflineTrainingTries(SKILL_SHIELD, trainingTime / 4) - end - return true -end - -offlineTraining:register() diff --git a/data-otservbr-global/scripts/globalevents/customs/rain.lua b/data-otservbr-global/scripts/globalevents/customs/rain.lua deleted file mode 100644 index f2520d880ee..00000000000 --- a/data-otservbr-global/scripts/globalevents/customs/rain.lua +++ /dev/null @@ -1,50 +0,0 @@ -if configManager.getBoolean(configKeys.WEATHER_RAIN) then - local weatherStartup = GlobalEvent("WeatherStartup") - - function weatherStartup.onStartup() - local rain = math.random(100) - if rain > 95 then - Game.setStorageValue("Weather", 1) - else - Game.setStorageValue("Weather", 0) - end - return true - end - - weatherStartup:register() - - local weather = GlobalEvent("Weather") - - function weather.onThink(interval, lastExecution) - local rain = math.random(100) - if rain > 95 then - Game.setStorageValue("Weather", 1) - else - Game.setStorageValue("Weather", 0) - end - return true - end - - weather:interval(200000) -- how often to randomize rain / weather - weather:register() - - local weatherRain = GlobalEvent("WeatherRain") - - function weatherRain.onThink(interval, lastExecution) - if Game.getStorageValue("Weather") == 1 then - local players = Game.getPlayers() - if #players == 0 then - return true - end - local player - for i = 1, #players do - player = players[i] - player:sendWeatherEffect(weatherConfig.groundEffect, weatherConfig.fallEffect, weatherConfig.thunderEffect) - end - end - return true - end - - weatherRain:interval(50) -- less rain = greater value - weatherRain:register() -end diff --git a/data-otservbr-global/scripts/world_changes/spawns_npc_by_time.lua b/data-otservbr-global/scripts/world_changes/spawns_npc_by_time.lua index 5323f90cc85..4793055f8a0 100644 --- a/data-otservbr-global/scripts/world_changes/spawns_npc_by_time.lua +++ b/data-otservbr-global/scripts/world_changes/spawns_npc_by_time.lua @@ -12,15 +12,13 @@ function spawnsNpcByTime.onPeriodChange(period) local spawnNpc = Game.createNpc(npcSpawn.name, npcSpawn.position) if spawnNpc then spawnNpc:setMasterPos(npcSpawn.position) - npcSpawn.position:sendMagicEffect(CONST_ME_TELEPORT) - logger.info("[NPC Spawn] {} has spawned", npcSpawn.name) + spawnNpc:getPosition():sendMagicEffect(CONST_ME_TELEPORT) end elseif npcSpawn.despawnPeriod == period then local despawnNpc = Npc(npcSpawn.name) if despawnNpc then despawnNpc:getPosition():sendMagicEffect(CONST_ME_TELEPORT) despawnNpc:remove() - logger.info("[NPC Despawn] {} has despawned", npcSpawn.name) end end end diff --git a/data/XML/familiars.xml b/data/XML/familiars.xml index 3c446167b5b..a73f5394fc2 100644 --- a/data/XML/familiars.xml +++ b/data/XML/familiars.xml @@ -1,32 +1,26 @@ - + - - - + + - - - + + - - - + + - - - diff --git a/data/XML/mounts.xml b/data/XML/mounts.xml index 31e8c8068b5..b8decc87a59 100644 --- a/data/XML/mounts.xml +++ b/data/XML/mounts.xml @@ -218,7 +218,9 @@ - + + + diff --git a/data/XML/outfits.xml b/data/XML/outfits.xml index 7178a5d6908..e18d48e865b 100644 --- a/data/XML/outfits.xml +++ b/data/XML/outfits.xml @@ -1,6 +1,6 @@ - + @@ -89,7 +89,7 @@ - + @@ -117,7 +117,7 @@ - + diff --git a/data/events/scripts/monster.lua b/data/events/scripts/monster.lua index ea991672854..e69de29bb2d 100644 --- a/data/events/scripts/monster.lua +++ b/data/events/scripts/monster.lua @@ -1,19 +0,0 @@ -local function calculateBonus(bonus) - local bonusCount = math.floor(bonus / 100) - local remainder = bonus % 100 - if remainder > 0 then - local probability = math.random(0, 100) - bonusCount = bonusCount + (probability < remainder and 1 or 0) - end - - return bonusCount -end - -local function checkItemType(itemId) - local itemType = ItemType(itemId):getType() - -- Based on enum ItemTypes_t - if (itemType > 0 and itemType < 4) or itemType == 7 or itemType == 8 or itemType == 11 or itemType == 13 or (itemType > 15 and itemType < 22) then - return true - end - return false -end diff --git a/data/events/scripts/scheduler/example.lua b/data/events/scripts/scheduler/example.lua deleted file mode 100644 index d095ed1064f..00000000000 --- a/data/events/scripts/scheduler/example.lua +++ /dev/null @@ -1,25 +0,0 @@ --- [OtServerBr] --- Event scheduler lua scripts, on this file is possible to load any kind --- of global values, create functions or create and register GlobalEvents using the revscript system. --- For example you can load a 'local Example = GlobalEvent("example")' and register it with 'Example:register()', --- adding the 'Example.onStartup()' or 'Example.onThink(interval)' with 'Example:interval(time)'. --- With 'onStartup()' you can load any raid, for example loading a entire map/hunt and the choseen spawns. - --- Examples: --- Loading map: Game.loadMap(DATA_DIRECTORY.. '/world/myMapFolder/myMapFile.otbm') --- Loading spawn: addEvent(function() Game.loadSpawnFile(DATA_DIRECTORY.. '/world/mySpawnFolder/mySpawnFile.xml) end, 30 * 1000) - -local Example_One = GlobalEvent("Example one") -function Example_One.onStartup() - return true -end - -Example_One:register() - -local Example_Two = GlobalEvent("Example two") -function Example_Two.onThink(interval) - return true -end - -Example_Two:interval(10000) -- 10 seconds interval -Example_Two:register() diff --git a/data/global.lua b/data/global.lua index 2d5ffc31cf0..1491987ffad 100644 --- a/data/global.lua +++ b/data/global.lua @@ -56,15 +56,6 @@ AUTH_TYPE = configManager.getString(configKeys.AUTH_TYPE) GLOBAL_CHARM_GUT = 120 -- 20% more chance to get creature products from looting GLOBAL_CHARM_SCAVENGE = 125 -- 25% more chance to get creature products from skinning ---WEATHER -weatherConfig = { - groundEffect = CONST_ME_LOSEENERGY, - fallEffect = CONST_ANI_SMALLICE, - thunderEffect = configManager.getBoolean(configKeys.WEATHER_THUNDER), - minDMG = 1, - maxDMG = 5, -} - -- Event Schedule SCHEDULE_LOOT_RATE = 100 SCHEDULE_EXP_RATE = 100 diff --git a/data/items/items.xml b/data/items/items.xml index 666ee75b1f5..dddb15ad6ad 100644 --- a/data/items/items.xml +++ b/data/items/items.xml @@ -12135,6 +12135,7 @@ + @@ -12142,11 +12143,13 @@ + + @@ -12154,6 +12157,7 @@ + @@ -12161,6 +12165,7 @@ + diff --git a/data/libs/functions/player.lua b/data/libs/functions/player.lua index 810b72c0002..2662db60d11 100644 --- a/data/libs/functions/player.lua +++ b/data/libs/functions/player.lua @@ -316,40 +316,6 @@ function Player.getMarriageDescription(thing) return descr end -function Player.sendWeatherEffect(self, groundEffect, fallEffect, thunderEffect) - local position, random = self:getPosition(), math.random - position.x = position.x + random(-7, 7) - position.y = position.y + random(-5, 5) - local fromPosition = Position(position.x + 1, position.y, position.z) - fromPosition.x = position.x - 7 - fromPosition.y = position.y - 5 - local tile, getGround - for Z = 1, 7 do - fromPosition.z = Z - position.z = Z - tile = Tile(position) - if tile then - -- If there is a tile, stop checking floors - fromPosition:sendDistanceEffect(position, fallEffect) - position:sendMagicEffect(groundEffect, self) - getGround = tile:getGround() - if getGround and ItemType(getGround:getId()):getFluidSource() == 1 then - position:sendMagicEffect(CONST_ME_LOSEENERGY, self) - end - break - end - end - if thunderEffect and tile and not tile:hasFlag(TILESTATE_PROTECTIONZONE) then - if random(2) == 1 then - local topCreature = tile:getTopCreature() - if topCreature and topCreature:isPlayer() and topCreature:getAccountType() < ACCOUNT_TYPE_SENIORTUTOR then - position:sendMagicEffect(CONST_ME_BIGCLOUDS, self) - doTargetCombatHealth(0, self, COMBAT_ENERGYDAMAGE, -weatherConfig.minDMG, -weatherConfig.maxDMG, CONST_ME_NONE) - end - end - end -end - function Player:getFamiliarName() local vocation = FAMILIAR_ID[self:getVocation():getBaseId()] local familiarName diff --git a/data/scripts/actions/items/glooth_bag.lua b/data/scripts/actions/items/glooth_bag.lua new file mode 100644 index 00000000000..a3703ea08dc --- /dev/null +++ b/data/scripts/actions/items/glooth_bag.lua @@ -0,0 +1,40 @@ +local config = { + { chanceFrom = 0, chanceTo = 1875, itemId = 21158, count = 2 }, -- glooth spear + { chanceFrom = 1876, chanceTo = 3418, itemId = 21183 }, -- glooth amulet + { chanceFrom = 3419, chanceTo = 4933, itemId = 21178 }, -- glooth club + { chanceFrom = 4934, chanceTo = 6397, itemId = 21180 }, -- glooth axe + { chanceFrom = 6398, chanceTo = 7829, itemId = 21179 }, -- glooth blade + { chanceFrom = 7830, chanceTo = 8462, itemId = 21295 }, -- glooth backpack + { chanceFrom = 8463, chanceTo = 8975, itemId = 21143, count = 10 }, -- glooth sandwich + { chanceFrom = 8976, chanceTo = 9469, itemId = 21144, count = 10 }, -- bowl of glooth soup + { chanceFrom = 9470, chanceTo = 9922, itemId = 21146, count = 10 }, -- glooth steak + { chanceFrom = 9923, chanceTo = 10000, itemId = 21186 }, -- control unit +} + +local gloothBag = Action() + +function gloothBag.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local chance = math.random(0, 10000) + for i = 1, #config do + local randomItem = config[i] + if chance >= randomItem.chanceFrom and chance <= randomItem.chanceTo then + if randomItem.itemId then + local gift = randomItem.itemId + local count = randomItem.count or 1 + if type(count) == "table" then + count = math.random(count[1], count[2]) + end + + player:addItem(gift, count) + end + + item:getPosition():sendMagicEffect(CONST_ME_HITBYPOISON) + item:remove(1) + return true + end + end + return false +end + +gloothBag:id(21203) +gloothBag:register() diff --git a/data-otservbr-global/scripts/actions/other/offline_training_book.lua b/data/scripts/actions/objects/offline_training_book.lua similarity index 100% rename from data-otservbr-global/scripts/actions/other/offline_training_book.lua rename to data/scripts/actions/objects/offline_training_book.lua diff --git a/data-canary/scripts/actions/other/skill_trainer.lua b/data/scripts/actions/objects/skill_trainer.lua similarity index 100% rename from data-canary/scripts/actions/other/skill_trainer.lua rename to data/scripts/actions/objects/skill_trainer.lua diff --git a/data-canary/scripts/creaturescripts/offline_training.lua b/data/scripts/creaturescripts/others/offline_training.lua similarity index 97% rename from data-canary/scripts/creaturescripts/offline_training.lua rename to data/scripts/creaturescripts/others/offline_training.lua index e6ada9880d1..abfb0b94b3d 100644 --- a/data-canary/scripts/creaturescripts/offline_training.lua +++ b/data/scripts/creaturescripts/others/offline_training.lua @@ -1,4 +1,4 @@ -local offlineTraining = CreatureEvent("Offline Training") +local offlineTraining = CreatureEvent("OfflineTraining") function offlineTraining.onLogin(player) local lastLogout = player:getLastLogout() @@ -72,7 +72,6 @@ function offlineTraining.onLogin(player) if updateSkills then player:addOfflineTrainingTries(SKILL_SHIELD, trainingTime / 4) end - return true end diff --git a/data-otservbr-global/scripts/creaturescripts/players/namelock.lua b/data/scripts/creaturescripts/player/name_lock.lua similarity index 99% rename from data-otservbr-global/scripts/creaturescripts/players/namelock.lua rename to data/scripts/creaturescripts/player/name_lock.lua index c34eab6f181..322e8d135b8 100644 --- a/data-otservbr-global/scripts/creaturescripts/players/namelock.lua +++ b/data/scripts/creaturescripts/player/name_lock.lua @@ -3,6 +3,7 @@ function CheckNamelock(player) if not namelockReason then return true end + player:setMoveLocked(true) player:teleportTo(player:getTown():getTemplePosition()) player:sendTextMessage(MESSAGE_ADMINISTRADOR, "Your name has been locked for the following reason: " .. namelockReason .. ".") diff --git a/src/config/config_enums.hpp b/src/config/config_enums.hpp index a6a3d7c24c0..8c21bdfe1ac 100644 --- a/src/config/config_enums.hpp +++ b/src/config/config_enums.hpp @@ -27,9 +27,9 @@ enum ConfigKey_t : uint16_t { BOOSTED_BOSS_KILL_BONUS, BOOSTED_BOSS_LOOT_BONUS, BOOSTED_BOSS_SLOT, - BOSSTIARY_KILL_MULTIPLIER, BOSS_DEFAULT_TIME_TO_DEFEAT, BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN, + BOSSTIARY_KILL_MULTIPLIER, BUY_AOL_COMMAND_FEE, BUY_BLESS_COMMAND_FEE, CHECK_EXPIRED_MARKET_OFFERS_EACH_MINUTES, @@ -46,8 +46,8 @@ enum ConfigKey_t : uint16_t { DEFAULT_DESPAWNRADIUS, DEFAULT_DESPAWNRANGE, DEFAULT_PRIORITY, - DEPOTCHEST, DEPOT_BOXES, + DEPOTCHEST, DISABLE_LEGACY_RAIDS, DISABLE_MONSTER_ARMOR, DISCORD_SEND_FOOTER, @@ -55,23 +55,22 @@ enum ConfigKey_t : uint16_t { DISCORD_WEBHOOK_URL, EMOTE_SPELLS, ENABLE_PLAYER_PUT_ITEM_IN_AMMO_SLOT, - EXPERIENCE_FROM_PLAYERS, - EXP_FROM_PLAYERS_LEVEL_RANGE, EX_ACTIONS_DELAY_INTERVAL, + EXP_FROM_PLAYERS_LEVEL_RANGE, + EXPERIENCE_FROM_PLAYERS, FAMILIAR_TIME, FORCE_MONSTERTYPE_LOAD, FORGE_AMOUNT_MULTIPLIER, FORGE_BASE_SUCCESS_RATE, FORGE_BONUS_SUCCESS_RATE, - FORGE_FUSION_DUST_COST, FORGE_CONVERGENCE_FUSION_DUST_COST, - FORGE_TRANSFER_DUST_COST, FORGE_CONVERGENCE_TRANSFER_DUST_COST, FORGE_CORE_COST, FORGE_COST_ONE_SLIVER, FORGE_FIENDISH_CREATURES_LIMIT, FORGE_FIENDISH_INTERVAL_TIME, FORGE_FIENDISH_INTERVAL_TYPE, + FORGE_FUSION_DUST_COST, FORGE_INFLUENCED_CREATURES_LIMIT, FORGE_MAX_DUST, FORGE_MAX_ITEM_TIER, @@ -79,6 +78,7 @@ enum ConfigKey_t : uint16_t { FORGE_MIN_SLIVERS, FORGE_SLIVER_AMOUNT, FORGE_TIER_LOSS_REDUCTION, + FORGE_TRANSFER_DUST_COST, FRAG_TIME, FREE_DEPOT_LIMIT, FREE_PREMIUM, @@ -117,12 +117,14 @@ enum ConfigKey_t : uint16_t { LOCATION, LOGIN_PORT, LOGLEVEL, + LOOTPOUCH_MAXLIMIT, LOW_LEVEL_BONUS_EXP, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, LOYALTY_ENABLED, LOYALTY_POINTS_PER_CREATION_DAY, LOYALTY_POINTS_PER_PREMIUM_DAY_PURCHASED, LOYALTY_POINTS_PER_PREMIUM_DAY_SPENT, + M_CONST, MAINTAIN_MODE_MESSAGE, MAP_AUTHOR, MAP_CUSTOM_AUTHOR, @@ -132,16 +134,16 @@ enum ConfigKey_t : uint16_t { MARKET_OFFER_DURATION, MARKET_PREMIUM, MAX_ALLOWED_ON_A_DUMMY, - MAX_CONTAINER, MAX_CONTAINER_ITEM, + MAX_CONTAINER, MAX_DAMAGE_REFLECTION, MAX_ELEMENTAL_RESISTANCE, MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, MAX_MESSAGEBUFFER, MAX_PACKETS_PER_SECOND, - MAX_PLAYERS, MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT, MAX_PLAYERS_PER_ACCOUNT, + MAX_PLAYERS, MAX_SPEED_ATTACKONFIST, METRICS_ENABLE_OSTREAM, METRICS_ENABLE_PROMETHEUS, @@ -159,7 +161,6 @@ enum ConfigKey_t : uint16_t { MYSQL_PASS, MYSQL_SOCK, MYSQL_USER, - M_CONST, OLD_PROTOCOL, ONE_PLAYER_ON_ACCOUNT, ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, @@ -174,8 +175,8 @@ enum ConfigKey_t : uint16_t { PARALLELISM, PARTY_AUTO_SHARE_EXPERIENCE, PARTY_LIST_MAX_DISTANCE, - PARTY_SHARE_LOOT_BOOSTS, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, + PARTY_SHARE_LOOT_BOOSTS, PREMIUM_DEPOT_LIMIT, PREY_BONUS_REROLL_PRICE, PREY_BONUS_TIME, @@ -199,13 +200,13 @@ enum ConfigKey_t : uint16_t { RATE_BOSS_HEALTH, RATE_EXERCISE_TRAINING_SPEED, RATE_EXPERIENCE, - RATE_HEALTH_REGEN, RATE_HEALTH_REGEN_SPEED, + RATE_HEALTH_REGEN, RATE_KILLING_IN_THE_NAME_OF_POINTS, RATE_LOOT, RATE_MAGIC, - RATE_MANA_REGEN, RATE_MANA_REGEN_SPEED, + RATE_MANA_REGEN, RATE_MONSTER_ATTACK, RATE_MONSTER_DEFENSE, RATE_MONSTER_HEALTH, @@ -214,8 +215,8 @@ enum ConfigKey_t : uint16_t { RATE_NPC_HEALTH, RATE_OFFLINE_TRAINING_SPEED, RATE_SKILL, - RATE_SOUL_REGEN, RATE_SOUL_REGEN_SPEED, + RATE_SOUL_REGEN, RATE_SPAWN, RATE_SPELL_COOLDOWN, RATE_USE_STAGES, @@ -244,18 +245,20 @@ enum ConfigKey_t : uint16_t { STAIRHOP_DELAY, STAMINA_GREEN_DELAY, STAMINA_ORANGE_DELAY, - STAMINA_PZ, STAMINA_PZ_GAIN, + STAMINA_PZ, STAMINA_SYSTEM, - STAMINA_TRAINER, STAMINA_TRAINER_DELAY, STAMINA_TRAINER_GAIN, + STAMINA_TRAINER, STASH_ITEMS, STASH_MOVING, - STATUSQUERY_TIMEOUT, STATUS_PORT, + STATUSQUERY_TIMEOUT, STORE_COIN_PACKET, STORE_IMAGES_URL, + STOREINBOX_MAXLIMIT, + T_CONST, TASK_HUNTING_BONUS_REROLL_PRICE, TASK_HUNTING_ENABLED, TASK_HUNTING_FREE_REROLL_TIME, @@ -281,8 +284,8 @@ enum ConfigKey_t : uint16_t { TOGGLE_MAP_CUSTOM, TOGGLE_MOUNT_IN_PZ, TOGGLE_RECEIVE_REWARD, - TOGGLE_SAVE_INTERVAL, TOGGLE_SAVE_INTERVAL_CLEAN_MAP, + TOGGLE_SAVE_INTERVAL, TOGGLE_SERVER_IS_RETRO, TOGGLE_TRAVELS_FREE, TOGGLE_WHEELSYSTEM, @@ -290,7 +293,6 @@ enum ConfigKey_t : uint16_t { TRANSCENDANCE_CHANCE_FORMULA_A, TRANSCENDANCE_CHANCE_FORMULA_B, TRANSCENDANCE_CHANCE_FORMULA_C, - T_CONST, URL, USE_ANY_DATAPACK_FOLDER, VIP_AUTOLOOT_VIP_ONLY, @@ -302,8 +304,6 @@ enum ConfigKey_t : uint16_t { VIP_STAY_ONLINE, VIP_SYSTEM_ENABLED, WARN_UNSAFE_SCRIPTS, - WEATHER_RAIN, - WEATHER_THUNDER, WEEK_KILLS_TO_RED, WHEEL_ATELIER_REVEAL_GREATER_COST, WHEEL_ATELIER_REVEAL_LESSER_COST, @@ -315,6 +315,4 @@ enum ConfigKey_t : uint16_t { WHITE_SKULL_TIME, WORLD_TYPE, XP_DISPLAY_MODE, - STOREINBOX_MAXLIMIT, - LOOTPOUCH_MAXLIMIT, }; diff --git a/src/config/configmanager.cpp b/src/config/configmanager.cpp index ec8ee7a4b82..96c48ae2f69 100644 --- a/src/config/configmanager.cpp +++ b/src/config/configmanager.cpp @@ -46,364 +46,315 @@ bool ConfigManager::load() { // Info that must be loaded one time (unless we reset the modules involved) if (!loaded) { loadBoolConfig(L, BIND_ONLY_GLOBAL_ADDRESS, "bindOnlyGlobalAddress", false); + loadBoolConfig(L, DISABLE_LEGACY_RAIDS, "disableLegacyRaids", false); + loadBoolConfig(L, OLD_PROTOCOL, "allowOldProtocol", true); loadBoolConfig(L, OPTIMIZE_DATABASE, "startupDatabaseOptimization", true); - loadBoolConfig(L, TOGGLE_MAP_CUSTOM, "toggleMapCustom", true); - loadBoolConfig(L, TOGGLE_MAINTAIN_MODE, "toggleMaintainMode", false); loadBoolConfig(L, RANDOM_MONSTER_SPAWN, "randomMonsterSpawn", false); - loadStringConfig(L, MAINTAIN_MODE_MESSAGE, "maintainModeMessage", ""); - - loadStringConfig(L, IP, "ip", "127.0.0.1"); - loadStringConfig(L, MAP_NAME, "mapName", "canary"); - loadStringConfig(L, MAP_DOWNLOAD_URL, "mapDownloadUrl", ""); - loadStringConfig(L, MAP_AUTHOR, "mapAuthor", "Eduardo Dantas"); - - loadStringConfig(L, MAP_CUSTOM_NAME, "mapCustomName", ""); - loadStringConfig(L, MAP_CUSTOM_AUTHOR, "mapCustomAuthor", "OTServBR"); + loadBoolConfig(L, RESET_SESSIONS_ON_STARTUP, "resetSessionsOnStartup", false); + loadBoolConfig(L, TOGGLE_MAINTAIN_MODE, "toggleMaintainMode", false); + loadBoolConfig(L, TOGGLE_MAP_CUSTOM, "toggleMapCustom", true); - loadStringConfig(L, HOUSE_RENT_PERIOD, "houseRentPeriod", "never"); loadFloatConfig(L, HOUSE_PRICE_RENT_MULTIPLIER, "housePriceRentMultiplier", 1.0); loadFloatConfig(L, HOUSE_RENT_RATE, "houseRentRate", 1.0); - loadStringConfig(L, MYSQL_HOST, "mysqlHost", "127.0.0.1"); - loadStringConfig(L, MYSQL_USER, "mysqlUser", "root"); - loadStringConfig(L, MYSQL_PASS, "mysqlPass", ""); - loadStringConfig(L, MYSQL_DB, "mysqlDatabase", "canary"); - loadStringConfig(L, MYSQL_SOCK, "mysqlSock", ""); - loadStringConfig(L, AUTH_TYPE, "authType", "password"); - loadBoolConfig(L, RESET_SESSIONS_ON_STARTUP, "resetSessionsOnStartup", false); - - loadIntConfig(L, SQL_PORT, "mysqlPort", 3306); + loadIntConfig(L, DEPOT_BOXES, "depotBoxes", 20); + loadIntConfig(L, FREE_DEPOT_LIMIT, "freeDepotLimit", 2000); loadIntConfig(L, GAME_PORT, "gameProtocolPort", 7172); loadIntConfig(L, LOGIN_PORT, "loginProtocolPort", 7171); - loadIntConfig(L, STATUS_PORT, "statusProtocolPort", 7171); - loadIntConfig(L, MARKET_OFFER_DURATION, "marketOfferDuration", 30 * 24 * 60 * 60); - - loadIntConfig(L, FREE_DEPOT_LIMIT, "freeDepotLimit", 2000); loadIntConfig(L, PREMIUM_DEPOT_LIMIT, "premiumDepotLimit", 8000); - loadIntConfig(L, DEPOT_BOXES, "depotBoxes", 20); + loadIntConfig(L, SQL_PORT, "mysqlPort", 3306); loadIntConfig(L, STASH_ITEMS, "stashItemCount", 5000); + loadIntConfig(L, STATUS_PORT, "statusProtocolPort", 7171); - loadBoolConfig(L, OLD_PROTOCOL, "allowOldProtocol", true); - loadBoolConfig(L, DISABLE_LEGACY_RAIDS, "disableLegacyRaids", false); + loadStringConfig(L, AUTH_TYPE, "authType", "password"); + loadStringConfig(L, HOUSE_RENT_PERIOD, "houseRentPeriod", "never"); + loadStringConfig(L, IP, "ip", "127.0.0.1"); + loadStringConfig(L, MAINTAIN_MODE_MESSAGE, "maintainModeMessage", ""); + loadStringConfig(L, MAP_AUTHOR, "mapAuthor", "Eduardo Dantas"); + loadStringConfig(L, MAP_CUSTOM_AUTHOR, "mapCustomAuthor", "OTServBR"); + loadStringConfig(L, MAP_CUSTOM_NAME, "mapCustomName", ""); + loadStringConfig(L, MAP_DOWNLOAD_URL, "mapDownloadUrl", ""); + loadStringConfig(L, MAP_NAME, "mapName", "canary"); + loadStringConfig(L, MYSQL_DB, "mysqlDatabase", "canary"); + loadStringConfig(L, MYSQL_HOST, "mysqlHost", "127.0.0.1"); + loadStringConfig(L, MYSQL_PASS, "mysqlPass", ""); + loadStringConfig(L, MYSQL_SOCK, "mysqlSock", ""); + loadStringConfig(L, MYSQL_USER, "mysqlUser", "root"); } - loadBoolConfig(L, ALLOW_CHANGEOUTFIT, "allowChangeOutfit", true); - loadIntConfig(L, MAX_PLAYERS_PER_ACCOUNT, "maxPlayersOnlinePerAccount", 1); - loadIntConfig(L, MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT, "maxPlayersOutsidePZPerAccount", 1); loadBoolConfig(L, AIMBOT_HOTKEY_ENABLED, "hotkeyAimbotEnabled", true); - loadBoolConfig(L, REMOVE_RUNE_CHARGES, "removeChargesFromRunes", true); - loadBoolConfig(L, EXPERIENCE_FROM_PLAYERS, "experienceByKillingPlayers", false); - loadBoolConfig(L, FREE_PREMIUM, "freePremium", false); - loadBoolConfig(L, REPLACE_KICK_ON_LOGIN, "replaceKickOnLogin", true); - loadBoolConfig(L, MARKET_PREMIUM, "premiumToCreateMarketOffer", true); - loadBoolConfig(L, EMOTE_SPELLS, "emoteSpells", false); - loadBoolConfig(L, STAMINA_SYSTEM, "staminaSystem", true); - loadBoolConfig(L, WARN_UNSAFE_SCRIPTS, "warnUnsafeScripts", true); - loadBoolConfig(L, CONVERT_UNSAFE_SCRIPTS, "convertUnsafeScripts", true); + loadBoolConfig(L, ALLOW_BLOCK_SPAWN, "allowBlockSpawn", true); + loadBoolConfig(L, ALLOW_CHANGEOUTFIT, "allowChangeOutfit", true); + loadBoolConfig(L, ALLOW_RELOAD, "allowReload", false); + loadBoolConfig(L, AUTOBANK, "autoBank", false); + loadBoolConfig(L, AUTOLOOT, "autoLoot", false); + loadBoolConfig(L, BOOSTED_BOSS_SLOT, "boostedBossSlot", true); loadBoolConfig(L, CLASSIC_ATTACK_SPEED, "classicAttackSpeed", false); - loadBoolConfig(L, TOGGLE_ATTACK_SPEED_ONFIST, "toggleAttackSpeedOnFist", false); + loadBoolConfig(L, CLEAN_PROTECTION_ZONES, "cleanProtectionZones", false); + loadBoolConfig(L, CONVERT_UNSAFE_SCRIPTS, "convertUnsafeScripts", true); loadBoolConfig(L, DISABLE_MONSTER_ARMOR, "disableMonsterArmor", false); - loadIntConfig(L, MULTIPLIER_ATTACKONFIST, "multiplierSpeedOnFist", 5); - loadIntConfig(L, MAX_SPEED_ATTACKONFIST, "maxSpeedOnFist", 500); - loadBoolConfig(L, SCRIPTS_CONSOLE_LOGS, "showScriptsLogInConsole", true); - loadBoolConfig(L, STASH_MOVING, "stashMoving", false); - loadBoolConfig(L, ALLOW_BLOCK_SPAWN, "allowBlockSpawn", true); - loadBoolConfig(L, REMOVE_WEAPON_AMMO, "removeWeaponAmmunition", true); - loadBoolConfig(L, REMOVE_WEAPON_CHARGES, "removeWeaponCharges", true); - loadBoolConfig(L, REMOVE_BEGINNING_WEAPON_AMMO, "removeBeginningWeaponAmmunition", true); - loadBoolConfig(L, REFUND_BEGINNING_WEAPON_MANA, "refundBeginningWeaponMana", false); - loadBoolConfig(L, REMOVE_POTION_CHARGES, "removeChargesFromPotions", true); - loadBoolConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_MESSAGE, "globalServerSaveNotifyMessage", true); + loadBoolConfig(L, DISCORD_SEND_FOOTER, "discordSendFooter", true); + loadBoolConfig(L, EMOTE_SPELLS, "emoteSpells", false); + loadBoolConfig(L, ENABLE_PLAYER_PUT_ITEM_IN_AMMO_SLOT, "enablePlayerPutItemInAmmoSlot", false); + loadBoolConfig(L, EXPERIENCE_FROM_PLAYERS, "experienceByKillingPlayers", false); + loadBoolConfig(L, FORCE_MONSTERTYPE_LOAD, "forceMonsterTypesOnLoad", true); + loadBoolConfig(L, FREE_PREMIUM, "freePremium", false); loadBoolConfig(L, GLOBAL_SERVER_SAVE_CLEAN_MAP, "globalServerSaveCleanMap", false); loadBoolConfig(L, GLOBAL_SERVER_SAVE_CLOSE, "globalServerSaveClose", false); - loadBoolConfig(L, FORCE_MONSTERTYPE_LOAD, "forceMonsterTypesOnLoad", true); - loadBoolConfig(L, HOUSE_OWNED_BY_ACCOUNT, "houseOwnedByAccount", false); - loadBoolConfig(L, CLEAN_PROTECTION_ZONES, "cleanProtectionZones", false); + loadBoolConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_MESSAGE, "globalServerSaveNotifyMessage", true); loadBoolConfig(L, GLOBAL_SERVER_SAVE_SHUTDOWN, "globalServerSaveShutdown", true); + loadBoolConfig(L, HOUSE_OWNED_BY_ACCOUNT, "houseOwnedByAccount", false); + loadBoolConfig(L, HOUSE_PURSHASED_SHOW_PRICE, "housePurchasedShowPrice", false); + loadBoolConfig(L, INVENTORY_GLOW, "inventoryGlowOnFiveBless", false); + loadBoolConfig(L, LOYALTY_ENABLED, "loyaltyEnabled", true); + loadBoolConfig(L, MARKET_PREMIUM, "premiumToCreateMarketOffer", true); + loadBoolConfig(L, METRICS_ENABLE_OSTREAM, "metricsEnableOstream", false); + loadBoolConfig(L, METRICS_ENABLE_PROMETHEUS, "metricsEnablePrometheus", false); + loadBoolConfig(L, ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, "onlyInvitedCanMoveHouseItems", true); + loadBoolConfig(L, ONLY_PREMIUM_ACCOUNT, "onlyPremiumAccount", false); + loadBoolConfig(L, PARTY_AUTO_SHARE_EXPERIENCE, "partyAutoShareExperience", true); + loadBoolConfig(L, PARTY_SHARE_LOOT_BOOSTS, "partyShareLootBoosts", true); + loadBoolConfig(L, PREY_ENABLED, "preySystemEnabled", true); + loadBoolConfig(L, PREY_FREE_THIRD_SLOT, "preyFreeThirdSlot", false); loadBoolConfig(L, PUSH_WHEN_ATTACKING, "pushWhenAttacking", false); - loadIntConfig(L, MIN_DELAY_BETWEEN_CONDITIONS, "minDelayBetweenConditions", 0); - - loadBoolConfig(L, WEATHER_RAIN, "weatherRain", false); - loadBoolConfig(L, WEATHER_THUNDER, "thunderEffect", false); - loadBoolConfig(L, TOGGLE_FREE_QUEST, "toggleFreeQuest", true); - loadBoolConfig(L, AUTOLOOT, "autoLoot", false); - loadBoolConfig(L, AUTOBANK, "autoBank", false); - loadBoolConfig(L, STAMINA_TRAINER, "staminaTrainer", false); - loadBoolConfig(L, STAMINA_PZ, "staminaPz", false); + loadBoolConfig(L, RATE_USE_STAGES, "rateUseStages", false); + loadBoolConfig(L, REFUND_BEGINNING_WEAPON_MANA, "refundBeginningWeaponMana", false); + loadBoolConfig(L, REMOVE_BEGINNING_WEAPON_AMMO, "removeBeginningWeaponAmmunition", true); + loadBoolConfig(L, REMOVE_POTION_CHARGES, "removeChargesFromPotions", true); + loadBoolConfig(L, REMOVE_RUNE_CHARGES, "removeChargesFromRunes", true); + loadBoolConfig(L, REMOVE_WEAPON_AMMO, "removeWeaponAmmunition", true); + loadBoolConfig(L, REMOVE_WEAPON_CHARGES, "removeWeaponCharges", true); + loadBoolConfig(L, REPLACE_KICK_ON_LOGIN, "replaceKickOnLogin", true); + loadBoolConfig(L, REWARD_CHEST_COLLECT_ENABLED, "rewardChestCollectEnabled", true); + loadBoolConfig(L, SCRIPTS_CONSOLE_LOGS, "showScriptsLogInConsole", true); + loadBoolConfig(L, SKULLED_DEATH_LOSE_STORE_ITEM, "skulledDeathLoseStoreItem", false); loadBoolConfig(L, SORT_LOOT_BY_CHANCE, "sortLootByChance", false); - loadBoolConfig(L, TOGGLE_SAVE_INTERVAL, "toggleSaveInterval", false); - loadBoolConfig(L, TOGGLE_SAVE_INTERVAL_CLEAN_MAP, "toggleSaveIntervalCleanMap", false); + loadBoolConfig(L, STAMINA_PZ, "staminaPz", false); + loadBoolConfig(L, STAMINA_SYSTEM, "staminaSystem", true); + loadBoolConfig(L, STAMINA_TRAINER, "staminaTrainer", false); + loadBoolConfig(L, STASH_MOVING, "stashMoving", false); + loadBoolConfig(L, TASK_HUNTING_ENABLED, "taskHuntingSystemEnabled", true); + loadBoolConfig(L, TASK_HUNTING_FREE_THIRD_SLOT, "taskHuntingFreeThirdSlot", false); + loadBoolConfig(L, TELEPORT_PLAYER_TO_VOCATION_ROOM, "teleportPlayerToVocationRoom", true); loadBoolConfig(L, TELEPORT_SUMMONS, "teleportSummons", false); - loadBoolConfig(L, ALLOW_RELOAD, "allowReload", false); - - loadBoolConfig(L, ONLY_PREMIUM_ACCOUNT, "onlyPremiumAccount", false); - loadBoolConfig(L, RATE_USE_STAGES, "rateUseStages", false); - loadBoolConfig(L, TOGGLE_IMBUEMENT_SHRINE_STORAGE, "toggleImbuementShrineStorage", true); - loadBoolConfig(L, TOGGLE_IMBUEMENT_NON_AGGRESSIVE_FIGHT_ONLY, "toggleImbuementNonAggressiveFightOnly", false); - + loadBoolConfig(L, TOGGLE_ATTACK_SPEED_ONFIST, "toggleAttackSpeedOnFist", false); loadBoolConfig(L, TOGGLE_DOWNLOAD_MAP, "toggleDownloadMap", false); + loadBoolConfig(L, TOGGLE_FREE_QUEST, "toggleFreeQuest", true); + loadBoolConfig(L, TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, "toggleGoldPouchAllowAnything", false); + loadBoolConfig(L, TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY, "toggleGoldPouchQuickLootOnly", false); + loadBoolConfig(L, TOGGLE_HAZARDSYSTEM, "toogleHazardSystem", true); + loadBoolConfig(L, TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, "togglehouseTransferOnRestart", false); + loadBoolConfig(L, TOGGLE_IMBUEMENT_NON_AGGRESSIVE_FIGHT_ONLY, "toggleImbuementNonAggressiveFightOnly", false); + loadBoolConfig(L, TOGGLE_IMBUEMENT_SHRINE_STORAGE, "toggleImbuementShrineStorage", true); + loadBoolConfig(L, TOGGLE_MOUNT_IN_PZ, "toggleMountInProtectionZone", false); + loadBoolConfig(L, TOGGLE_RECEIVE_REWARD, "toggleReceiveReward", false); + loadBoolConfig(L, TOGGLE_SAVE_INTERVAL_CLEAN_MAP, "toggleSaveIntervalCleanMap", false); + loadBoolConfig(L, TOGGLE_SAVE_INTERVAL, "toggleSaveInterval", false); + loadBoolConfig(L, TOGGLE_SERVER_IS_RETRO, "toggleServerIsRetroPVP", false); + loadBoolConfig(L, TOGGLE_TRAVELS_FREE, "toggleTravelsFree", false); + loadBoolConfig(L, TOGGLE_WHEELSYSTEM, "wheelSystemEnabled", true); loadBoolConfig(L, USE_ANY_DATAPACK_FOLDER, "useAnyDatapackFolder", false); - loadBoolConfig(L, INVENTORY_GLOW, "inventoryGlowOnFiveBless", false); + loadBoolConfig(L, VIP_AUTOLOOT_VIP_ONLY, "vipAutoLootVipOnly", false); + loadBoolConfig(L, VIP_KEEP_HOUSE, "vipKeepHouse", false); + loadBoolConfig(L, VIP_STAY_ONLINE, "vipStayOnline", false); + loadBoolConfig(L, VIP_SYSTEM_ENABLED, "vipSystemEnabled", false); + loadBoolConfig(L, WARN_UNSAFE_SCRIPTS, "warnUnsafeScripts", true); loadBoolConfig(L, XP_DISPLAY_MODE, "experienceDisplayRates", true); - loadStringConfig(L, DEFAULT_PRIORITY, "defaultPriority", "high"); - loadStringConfig(L, SERVER_NAME, "serverName", ""); - loadStringConfig(L, SERVER_MOTD, "serverMotd", ""); - loadStringConfig(L, OWNER_NAME, "ownerName", ""); - loadStringConfig(L, OWNER_EMAIL, "ownerEmail", ""); - loadStringConfig(L, URL, "url", ""); - loadStringConfig(L, LOCATION, "location", ""); - loadStringConfig(L, WORLD_TYPE, "worldType", "pvp"); - loadStringConfig(L, STORE_IMAGES_URL, "coinImagesURL", ""); - loadStringConfig(L, DISCORD_WEBHOOK_URL, "discordWebhookURL", ""); - loadBoolConfig(L, DISCORD_SEND_FOOTER, "discordSendFooter", true); - loadStringConfig(L, SAVE_INTERVAL_TYPE, "saveIntervalType", ""); - loadStringConfig(L, GLOBAL_SERVER_SAVE_TIME, "globalServerSaveTime", "06:00"); - loadStringConfig(L, DATA_DIRECTORY, "dataPackDirectory", "data-otservbr-global"); - loadStringConfig(L, CORE_DIRECTORY, "coreDirectory", "data"); - - loadStringConfig(L, FORGE_FIENDISH_INTERVAL_TYPE, "forgeFiendishIntervalType", "hour"); - loadStringConfig(L, FORGE_FIENDISH_INTERVAL_TIME, "forgeFiendishIntervalTime", "1"); - - loadIntConfig(L, MAX_PLAYERS, "maxPlayers", 0); - loadIntConfig(L, PZ_LOCKED, "pzLocked", 60000); - loadIntConfig(L, DEFAULT_DESPAWNRANGE, "deSpawnRange", 2); - loadIntConfig(L, DEFAULT_DESPAWNRADIUS, "deSpawnRadius", 50); - loadIntConfig(L, RATE_EXPERIENCE, "rateExp", 1); - loadIntConfig(L, RATE_SKILL, "rateSkill", 1); - loadIntConfig(L, RATE_LOOT, "rateLoot", 1); - loadIntConfig(L, RATE_MAGIC, "rateMagic", 1); - loadIntConfig(L, RATE_SPAWN, "rateSpawn", 1); - loadIntConfig(L, RATE_KILLING_IN_THE_NAME_OF_POINTS, "rateKillingInTheNameOfPoints", 1); - - loadIntConfig(L, HOUSE_PRICE_PER_SQM, "housePriceEachSQM", 1000); - loadIntConfig(L, HOUSE_BUY_LEVEL, "houseBuyLevel", 0); - loadIntConfig(L, HOUSE_LOSE_AFTER_INACTIVITY, "houseLoseAfterInactivity", 0); - loadBoolConfig(L, HOUSE_PURSHASED_SHOW_PRICE, "housePurchasedShowPrice", false); - loadBoolConfig(L, ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, "onlyInvitedCanMoveHouseItems", true); - - loadIntConfig(L, ACTIONS_DELAY_INTERVAL, "timeBetweenActions", 200); - loadIntConfig(L, EX_ACTIONS_DELAY_INTERVAL, "timeBetweenExActions", 1000); - loadIntConfig(L, MAX_MESSAGEBUFFER, "maxMessageBuffer", 4); - loadIntConfig(L, KICK_AFTER_MINUTES, "kickIdlePlayerAfterMinutes", 15); - loadIntConfig(L, PROTECTION_LEVEL, "protectionLevel", 1); - loadIntConfig(L, DEATH_LOSE_PERCENT, "deathLosePercent", -1); - loadIntConfig(L, STATUSQUERY_TIMEOUT, "statusTimeout", 5000); - loadIntConfig(L, FRAG_TIME, "timeToDecreaseFrags", 24 * 60 * 60 * 1000); - loadIntConfig(L, WHITE_SKULL_TIME, "whiteSkullTime", 15 * 60 * 1000); - loadIntConfig(L, STAIRHOP_DELAY, "stairJumpExhaustion", 2000); - loadIntConfig(L, MAX_CONTAINER, "maxContainer", 500); - loadIntConfig(L, MAX_CONTAINER_ITEM, "maxItem", 5000); - loadIntConfig(L, EXP_FROM_PLAYERS_LEVEL_RANGE, "expFromPlayersLevelRange", 75); - loadIntConfig(L, CHECK_EXPIRED_MARKET_OFFERS_EACH_MINUTES, "checkExpiredMarketOffersEachMinutes", 60); - loadIntConfig(L, MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, "maxMarketOffersAtATimePerPlayer", 100); - loadIntConfig(L, MAX_PACKETS_PER_SECOND, "maxPacketsPerSecond", 25); - loadIntConfig(L, COMPRESSION_LEVEL, "packetCompressionLevel", 6); - loadIntConfig(L, STORE_COIN_PACKET, "coinPacketSize", 25); - loadIntConfig(L, DAY_KILLS_TO_RED, "dayKillsToRedSkull", 3); - loadIntConfig(L, WEEK_KILLS_TO_RED, "weekKillsToRedSkull", 5); - loadIntConfig(L, MONTH_KILLS_TO_RED, "monthKillsToRedSkull", 10); - loadIntConfig(L, RED_SKULL_DURATION, "redSkullDuration", 30); - loadIntConfig(L, BLACK_SKULL_DURATION, "blackSkullDuration", 45); - loadIntConfig(L, ORANGE_SKULL_DURATION, "orangeSkullDuration", 7); - loadIntConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_DURATION, "globalServerSaveNotifyDuration", 5); - - loadIntConfig(L, PARTY_LIST_MAX_DISTANCE, "partyListMaxDistance", 0); - - loadIntConfig(L, PUSH_DELAY, "pushDelay", 1000); - loadIntConfig(L, PUSH_DISTANCE_DELAY, "pushDistanceDelay", 1500); - - loadIntConfig(L, STAMINA_ORANGE_DELAY, "staminaOrangeDelay", 1); - loadIntConfig(L, STAMINA_GREEN_DELAY, "staminaGreenDelay", 5); - loadIntConfig(L, STAMINA_PZ_GAIN, "staminaPzGain", 1); - loadIntConfig(L, STAMINA_TRAINER_DELAY, "staminaTrainerDelay", 5); - loadIntConfig(L, STAMINA_TRAINER_GAIN, "staminaTrainerGain", 1); - loadIntConfig(L, SAVE_INTERVAL_TIME, "saveIntervalTime", 1); - loadIntConfig(L, MAX_ALLOWED_ON_A_DUMMY, "maxAllowedOnADummy", 1); - loadIntConfig(L, FREE_QUEST_STAGE, "freeQuestStage", 1); - loadIntConfig(L, DEPOTCHEST, "depotChest", 4); - loadIntConfig(L, CRITICALCHANCE, "criticalChance", 10); - - loadIntConfig(L, ADVENTURERSBLESSING_LEVEL, "adventurersBlessingLevel", 21); - loadBoolConfig(L, SKULLED_DEATH_LOSE_STORE_ITEM, "skulledDeathLoseStoreItem", false); - loadIntConfig(L, FORGE_MAX_ITEM_TIER, "forgeMaxItemTier", 10); - loadIntConfig(L, FORGE_COST_ONE_SLIVER, "forgeCostOneSliver", 20); - loadIntConfig(L, FORGE_SLIVER_AMOUNT, "forgeSliverAmount", 3); - loadIntConfig(L, FORGE_CORE_COST, "forgeCoreCost", 50); - loadIntConfig(L, FORGE_MAX_DUST, "forgeMaxDust", 225); - loadIntConfig(L, FORGE_FUSION_DUST_COST, "forgeFusionDustCost", 100); - loadIntConfig(L, FORGE_CONVERGENCE_FUSION_DUST_COST, "forgeConvergenceFusionCost", 130); - loadIntConfig(L, FORGE_TRANSFER_DUST_COST, "forgeTransferDustCost", 100); - loadIntConfig(L, FORGE_CONVERGENCE_TRANSFER_DUST_COST, "forgeConvergenceTransferCost", 160); - loadIntConfig(L, FORGE_BASE_SUCCESS_RATE, "forgeBaseSuccessRate", 50); - loadIntConfig(L, FORGE_BONUS_SUCCESS_RATE, "forgeBonusSuccessRate", 15); - loadIntConfig(L, FORGE_TIER_LOSS_REDUCTION, "forgeTierLossReduction", 50); - loadFloatConfig(L, FORGE_AMOUNT_MULTIPLIER, "forgeAmountMultiplier", 3.0); - loadIntConfig(L, FORGE_MIN_SLIVERS, "forgeMinSlivers", 3); - loadIntConfig(L, FORGE_MAX_SLIVERS, "forgeMaxSlivers", 7); - loadIntConfig(L, FORGE_INFLUENCED_CREATURES_LIMIT, "forgeInfluencedLimit", 300); - loadIntConfig(L, FORGE_FIENDISH_CREATURES_LIMIT, "forgeFiendishLimit", 3); - - loadFloatConfig(L, RUSE_CHANCE_FORMULA_A, "ruseChanceFormulaA", 0.0307576); - loadFloatConfig(L, RUSE_CHANCE_FORMULA_B, "ruseChanceFormulaB", 0.440697); - loadFloatConfig(L, RUSE_CHANCE_FORMULA_C, "ruseChanceFormulaC", 0.026); - - loadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_A, "onslaughtChanceFormulaA", 0.05); - loadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, "onslaughtChanceFormulaB", 0.4); - loadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_C, "onslaughtChanceFormulaC", 0.05); - - loadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_A, "momentumChanceFormulaA", 0.05); - loadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_B, "momentumChanceFormulaB", 1.9); - loadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_C, "momentumChanceFormulaC", 0.05); - - loadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_A, "transcendanceChanceFormulaA", 0.0127); - loadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_B, "transcendanceChanceFormulaB", 0.1070); - loadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_C, "transcendanceChanceFormulaC", 0.0073); - - loadIntConfig(L, TRANSCENDANCE_AVATAR_DURATION, "transcendanceAvatarDuration", 7000); - - loadIntConfig(L, DISCORD_WEBHOOK_DELAY_MS, "discordWebhookDelayMs", Webhook::DEFAULT_DELAY_MS); - loadFloatConfig(L, BESTIARY_RATE_CHARM_SHOP_PRICE, "bestiaryRateCharmShopPrice", 1.0); - loadFloatConfig(L, RATE_HEALTH_REGEN, "rateHealthRegen", 1.0); - loadFloatConfig(L, RATE_HEALTH_REGEN_SPEED, "rateHealthRegenSpeed", 1.0); - loadFloatConfig(L, RATE_MANA_REGEN, "rateManaRegen", 1.0); - loadFloatConfig(L, RATE_MANA_REGEN_SPEED, "rateManaRegenSpeed", 1.0); - loadFloatConfig(L, RATE_SOUL_REGEN, "rateSoulRegen", 1.0); - loadFloatConfig(L, RATE_SOUL_REGEN_SPEED, "rateSoulRegenSpeed", 1.0); - loadFloatConfig(L, RATE_SPELL_COOLDOWN, "rateSpellCooldown", 1.0); + loadFloatConfig(L, FORGE_AMOUNT_MULTIPLIER, "forgeAmountMultiplier", 3.0); + loadFloatConfig(L, HAZARD_EXP_BONUS_MULTIPLIER, "hazardExpBonusMultiplier", 2.0); + loadFloatConfig(L, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, "loyaltyBonusPercentageMultiplier", 1.0); + loadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_A, "momentumChanceFormulaA", 0.05); + loadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_B, "momentumChanceFormulaB", 1.9); + loadFloatConfig(L, MOMENTUM_CHANCE_FORMULA_C, "momentumChanceFormulaC", 0.05); + loadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_A, "onslaughtChanceFormulaA", 0.05); + loadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_B, "onslaughtChanceFormulaB", 0.4); + loadFloatConfig(L, ONSLAUGHT_CHANCE_FORMULA_C, "onslaughtChanceFormulaC", 0.05); + loadFloatConfig(L, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, "partyShareLootBoostsDimishingFactor", 0.7f); + loadFloatConfig(L, PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, "pvpRateDamageReductionPerLevel", 0.0); + loadFloatConfig(L, PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, "pvpRateDamageTakenPerLevel", 0.0); loadFloatConfig(L, RATE_ATTACK_SPEED, "rateAttackSpeed", 1.0); - loadFloatConfig(L, RATE_OFFLINE_TRAINING_SPEED, "rateOfflineTrainingSpeed", 1.0); + loadFloatConfig(L, RATE_BOSS_ATTACK, "rateBossAttack", 1.0); + loadFloatConfig(L, RATE_BOSS_DEFENSE, "rateBossDefense", 1.0); + loadFloatConfig(L, RATE_BOSS_HEALTH, "rateBossHealth", 1.0); loadFloatConfig(L, RATE_EXERCISE_TRAINING_SPEED, "rateExerciseTrainingSpeed", 1.0); - loadIntConfig(L, COMBAT_CHAIN_DELAY, "combatChainDelay", 50); - - loadFloatConfig(L, RATE_MONSTER_HEALTH, "rateMonsterHealth", 1.0); + loadFloatConfig(L, RATE_HEALTH_REGEN_SPEED, "rateHealthRegenSpeed", 1.0); + loadFloatConfig(L, RATE_HEALTH_REGEN, "rateHealthRegen", 1.0); + loadFloatConfig(L, RATE_MANA_REGEN_SPEED, "rateManaRegenSpeed", 1.0); + loadFloatConfig(L, RATE_MANA_REGEN, "rateManaRegen", 1.0); loadFloatConfig(L, RATE_MONSTER_ATTACK, "rateMonsterAttack", 1.0); loadFloatConfig(L, RATE_MONSTER_DEFENSE, "rateMonsterDefense", 1.0); - loadFloatConfig(L, RATE_BOSS_HEALTH, "rateBossHealth", 1.0); - loadFloatConfig(L, RATE_BOSS_ATTACK, "rateBossAttack", 1.0); - loadFloatConfig(L, RATE_BOSS_DEFENSE, "rateBossDefense", 1.0); - loadIntConfig(L, BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN, "bossDefaultTimeToFightAgain", 20 * 60 * 60); - loadIntConfig(L, BOSS_DEFAULT_TIME_TO_DEFEAT, "bossDefaultTimeToDefeat", 20 * 60); - - loadIntConfig(L, MIN_ELEMENTAL_RESISTANCE, "minElementalResistance", -200); - loadIntConfig(L, MAX_ELEMENTAL_RESISTANCE, "maxElementalResistance", 200); - loadIntConfig(L, MAX_DAMAGE_REFLECTION, "maxDamageReflection", 200); - - loadFloatConfig(L, RATE_NPC_HEALTH, "rateNpcHealth", 1.0); + loadFloatConfig(L, RATE_MONSTER_HEALTH, "rateMonsterHealth", 1.0); loadFloatConfig(L, RATE_NPC_ATTACK, "rateNpcAttack", 1.0); loadFloatConfig(L, RATE_NPC_DEFENSE, "rateNpcDefense", 1.0); + loadFloatConfig(L, RATE_NPC_HEALTH, "rateNpcHealth", 1.0); + loadFloatConfig(L, RATE_OFFLINE_TRAINING_SPEED, "rateOfflineTrainingSpeed", 1.0); + loadFloatConfig(L, RATE_SOUL_REGEN_SPEED, "rateSoulRegenSpeed", 1.0); + loadFloatConfig(L, RATE_SOUL_REGEN, "rateSoulRegen", 1.0); + loadFloatConfig(L, RATE_SPELL_COOLDOWN, "rateSpellCooldown", 1.0); + loadFloatConfig(L, RUSE_CHANCE_FORMULA_A, "ruseChanceFormulaA", 0.0307576); + loadFloatConfig(L, RUSE_CHANCE_FORMULA_B, "ruseChanceFormulaB", 0.440697); + loadFloatConfig(L, RUSE_CHANCE_FORMULA_C, "ruseChanceFormulaC", 0.026); + loadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_A, "transcendanceChanceFormulaA", 0.0127); + loadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_B, "transcendanceChanceFormulaB", 0.1070); + loadFloatConfig(L, TRANSCENDANCE_CHANCE_FORMULA_C, "transcendanceChanceFormulaC", 0.0073); - loadBoolConfig(L, PREY_ENABLED, "preySystemEnabled", true); - loadBoolConfig(L, PREY_FREE_THIRD_SLOT, "preyFreeThirdSlot", false); - loadIntConfig(L, PREY_REROLL_PRICE_LEVEL, "preyRerollPricePerLevel", 200); - loadIntConfig(L, PREY_SELECTION_LIST_PRICE, "preySelectListPrice", 5); - loadIntConfig(L, PREY_BONUS_TIME, "preyBonusTime", 7200); - loadIntConfig(L, PREY_BONUS_REROLL_PRICE, "preyBonusRerollPrice", 1); - loadIntConfig(L, PREY_FREE_REROLL_TIME, "preyFreeRerollTime", 72000); - - loadBoolConfig(L, TASK_HUNTING_ENABLED, "taskHuntingSystemEnabled", true); - loadBoolConfig(L, TASK_HUNTING_FREE_THIRD_SLOT, "taskHuntingFreeThirdSlot", false); - loadIntConfig(L, TASK_HUNTING_LIMIT_EXHAUST, "taskHuntingLimitedTasksExhaust", 72000); - loadIntConfig(L, TASK_HUNTING_REROLL_PRICE_LEVEL, "taskHuntingRerollPricePerLevel", 200); - loadIntConfig(L, TASK_HUNTING_SELECTION_LIST_PRICE, "taskHuntingSelectListPrice", 5); - loadIntConfig(L, TASK_HUNTING_BONUS_REROLL_PRICE, "taskHuntingBonusRerollPrice", 1); - loadIntConfig(L, TASK_HUNTING_FREE_REROLL_TIME, "taskHuntingFreeRerollTime", 72000); - + loadIntConfig(L, ACTIONS_DELAY_INTERVAL, "timeBetweenActions", 200); + loadIntConfig(L, ADVENTURERSBLESSING_LEVEL, "adventurersBlessingLevel", 21); loadIntConfig(L, BESTIARY_KILL_MULTIPLIER, "bestiaryKillMultiplier", 1); - loadIntConfig(L, BOSSTIARY_KILL_MULTIPLIER, "bosstiaryKillMultiplier", 1); - loadBoolConfig(L, BOOSTED_BOSS_SLOT, "boostedBossSlot", true); - loadIntConfig(L, BOOSTED_BOSS_LOOT_BONUS, "boostedBossLootBonus", 250); + loadIntConfig(L, BLACK_SKULL_DURATION, "blackSkullDuration", 45); loadIntConfig(L, BOOSTED_BOSS_KILL_BONUS, "boostedBossKillBonus", 3); - - loadIntConfig(L, FAMILIAR_TIME, "familiarTime", 30); - - loadBoolConfig(L, TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, "toggleGoldPouchAllowAnything", false); - loadBoolConfig(L, TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY, "toggleGoldPouchQuickLootOnly", false); - loadBoolConfig(L, TOGGLE_SERVER_IS_RETRO, "toggleServerIsRetroPVP", false); - loadBoolConfig(L, TOGGLE_TRAVELS_FREE, "toggleTravelsFree", false); + loadIntConfig(L, BOOSTED_BOSS_LOOT_BONUS, "boostedBossLootBonus", 250); + loadIntConfig(L, BOSS_DEFAULT_TIME_TO_DEFEAT, "bossDefaultTimeToDefeat", 20 * 60); + loadIntConfig(L, BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN, "bossDefaultTimeToFightAgain", 20 * 60 * 60); + loadIntConfig(L, BOSSTIARY_KILL_MULTIPLIER, "bosstiaryKillMultiplier", 1); loadIntConfig(L, BUY_AOL_COMMAND_FEE, "buyAolCommandFee", 0); loadIntConfig(L, BUY_BLESS_COMMAND_FEE, "buyBlessCommandFee", 0); - loadBoolConfig(L, TELEPORT_PLAYER_TO_VOCATION_ROOM, "teleportPlayerToVocationRoom", true); - loadBoolConfig(L, ENABLE_PLAYER_PUT_ITEM_IN_AMMO_SLOT, "enablePlayerPutItemInAmmoSlot", false); - - loadBoolConfig(L, TOGGLE_HAZARDSYSTEM, "toogleHazardSystem", true); - loadIntConfig(L, HAZARD_CRITICAL_INTERVAL, "hazardCriticalInterval", 2000); + loadIntConfig(L, CHECK_EXPIRED_MARKET_OFFERS_EACH_MINUTES, "checkExpiredMarketOffersEachMinutes", 60); + loadIntConfig(L, COMBAT_CHAIN_DELAY, "combatChainDelay", 50); + loadIntConfig(L, COMPRESSION_LEVEL, "packetCompressionLevel", 6); + loadIntConfig(L, CRITICALCHANCE, "criticalChance", 10); + loadIntConfig(L, DAY_KILLS_TO_RED, "dayKillsToRedSkull", 3); + loadIntConfig(L, DEATH_LOSE_PERCENT, "deathLosePercent", -1); + loadIntConfig(L, DEFAULT_DESPAWNRADIUS, "deSpawnRadius", 50); + loadIntConfig(L, DEFAULT_DESPAWNRANGE, "deSpawnRange", 2); + loadIntConfig(L, DEPOTCHEST, "depotChest", 4); + loadIntConfig(L, DISCORD_WEBHOOK_DELAY_MS, "discordWebhookDelayMs", Webhook::DEFAULT_DELAY_MS); + loadIntConfig(L, EX_ACTIONS_DELAY_INTERVAL, "timeBetweenExActions", 1000); + loadIntConfig(L, EXP_FROM_PLAYERS_LEVEL_RANGE, "expFromPlayersLevelRange", 75); + loadIntConfig(L, FAMILIAR_TIME, "familiarTime", 30); + loadIntConfig(L, FORGE_BASE_SUCCESS_RATE, "forgeBaseSuccessRate", 50); + loadIntConfig(L, FORGE_BONUS_SUCCESS_RATE, "forgeBonusSuccessRate", 15); + loadIntConfig(L, FORGE_CONVERGENCE_FUSION_DUST_COST, "forgeConvergenceFusionCost", 130); + loadIntConfig(L, FORGE_CONVERGENCE_TRANSFER_DUST_COST, "forgeConvergenceTransferCost", 160); + loadIntConfig(L, FORGE_CORE_COST, "forgeCoreCost", 50); + loadIntConfig(L, FORGE_COST_ONE_SLIVER, "forgeCostOneSliver", 20); + loadIntConfig(L, FORGE_FIENDISH_CREATURES_LIMIT, "forgeFiendishLimit", 3); + loadIntConfig(L, FORGE_FUSION_DUST_COST, "forgeFusionDustCost", 100); + loadIntConfig(L, FORGE_INFLUENCED_CREATURES_LIMIT, "forgeInfluencedLimit", 300); + loadIntConfig(L, FORGE_MAX_DUST, "forgeMaxDust", 225); + loadIntConfig(L, FORGE_MAX_ITEM_TIER, "forgeMaxItemTier", 10); + loadIntConfig(L, FORGE_MAX_SLIVERS, "forgeMaxSlivers", 7); + loadIntConfig(L, FORGE_MIN_SLIVERS, "forgeMinSlivers", 3); + loadIntConfig(L, FORGE_SLIVER_AMOUNT, "forgeSliverAmount", 3); + loadIntConfig(L, FORGE_TIER_LOSS_REDUCTION, "forgeTierLossReduction", 50); + loadIntConfig(L, FORGE_TRANSFER_DUST_COST, "forgeTransferDustCost", 100); + loadIntConfig(L, FRAG_TIME, "timeToDecreaseFrags", 24 * 60 * 60 * 1000); + loadIntConfig(L, FREE_QUEST_STAGE, "freeQuestStage", 1); + loadIntConfig(L, GLOBAL_SERVER_SAVE_NOTIFY_DURATION, "globalServerSaveNotifyDuration", 5); loadIntConfig(L, HAZARD_CRITICAL_CHANCE, "hazardCriticalChance", 750); + loadIntConfig(L, HAZARD_CRITICAL_INTERVAL, "hazardCriticalInterval", 2000); loadIntConfig(L, HAZARD_CRITICAL_MULTIPLIER, "hazardCriticalMultiplier", 25); loadIntConfig(L, HAZARD_DAMAGE_MULTIPLIER, "hazardDamageMultiplier", 200); loadIntConfig(L, HAZARD_DEFENSE_MULTIPLIER, "hazardDefenseMultiplier", 0); loadIntConfig(L, HAZARD_DODGE_MULTIPLIER, "hazardDodgeMultiplier", 85); + loadIntConfig(L, HAZARD_LOOT_BONUS_MULTIPLIER, "hazardLootBonusMultiplier", 2); + loadIntConfig(L, HAZARD_PODS_DAMAGE, "hazardPodsDamage", 5); loadIntConfig(L, HAZARD_PODS_DROP_MULTIPLIER, "hazardPodsDropMultiplier", 87); loadIntConfig(L, HAZARD_PODS_TIME_TO_DAMAGE, "hazardPodsTimeToDamage", 2000); loadIntConfig(L, HAZARD_PODS_TIME_TO_SPAWN, "hazardPodsTimeToSpawn", 4000); - loadFloatConfig(L, HAZARD_EXP_BONUS_MULTIPLIER, "hazardExpBonusMultiplier", 2.0); - loadIntConfig(L, HAZARD_LOOT_BONUS_MULTIPLIER, "hazardLootBonusMultiplier", 2); - loadIntConfig(L, HAZARD_PODS_DAMAGE, "hazardPodsDamage", 5); loadIntConfig(L, HAZARD_SPAWN_PLUNDER_MULTIPLIER, "hazardSpawnPlunderMultiplier", 25); + loadIntConfig(L, HOUSE_BUY_LEVEL, "houseBuyLevel", 0); + loadIntConfig(L, HOUSE_LOSE_AFTER_INACTIVITY, "houseLoseAfterInactivity", 0); + loadIntConfig(L, HOUSE_PRICE_PER_SQM, "housePriceEachSQM", 1000); + loadIntConfig(L, KICK_AFTER_MINUTES, "kickIdlePlayerAfterMinutes", 15); + loadIntConfig(L, LOOTPOUCH_MAXLIMIT, "lootPouchMaxLimit", 2000); loadIntConfig(L, LOW_LEVEL_BONUS_EXP, "lowLevelBonusExp", 50); - - loadBoolConfig(L, LOYALTY_ENABLED, "loyaltyEnabled", true); loadIntConfig(L, LOYALTY_POINTS_PER_CREATION_DAY, "loyaltyPointsPerCreationDay", 1); - loadIntConfig(L, LOYALTY_POINTS_PER_PREMIUM_DAY_SPENT, "loyaltyPointsPerPremiumDaySpent", 0); loadIntConfig(L, LOYALTY_POINTS_PER_PREMIUM_DAY_PURCHASED, "loyaltyPointsPerPremiumDayPurchased", 0); - loadFloatConfig(L, LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, "loyaltyBonusPercentageMultiplier", 1.0); - - loadBoolConfig(L, TOGGLE_WHEELSYSTEM, "wheelSystemEnabled", true); - loadIntConfig(L, WHEEL_POINTS_PER_LEVEL, "wheelPointsPerLevel", 1); - - loadIntConfig(L, WHEEL_ATELIER_ROTATE_LESSER_COST, "wheelAtelierRotateLesserCost", 125000); - loadIntConfig(L, WHEEL_ATELIER_ROTATE_REGULAR_COST, "wheelAtelierRotateRegularCost", 250000); - loadIntConfig(L, WHEEL_ATELIER_ROTATE_GREATER_COST, "wheelAtelierRotateGreaterCost", 500000); - - loadIntConfig(L, WHEEL_ATELIER_REVEAL_LESSER_COST, "wheelAtelierRevealLesserCost", 125000); - loadIntConfig(L, WHEEL_ATELIER_REVEAL_REGULAR_COST, "wheelAtelierRevealRegularCost", 1000000); - loadIntConfig(L, WHEEL_ATELIER_REVEAL_GREATER_COST, "wheelAtelierRevealGreaterCost", 6000000); - - loadBoolConfig(L, PARTY_AUTO_SHARE_EXPERIENCE, "partyAutoShareExperience", true); - loadBoolConfig(L, PARTY_SHARE_LOOT_BOOSTS, "partyShareLootBoosts", true); - loadFloatConfig(L, PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, "partyShareLootBoostsDimishingFactor", 0.7f); + loadIntConfig(L, LOYALTY_POINTS_PER_PREMIUM_DAY_SPENT, "loyaltyPointsPerPremiumDaySpent", 0); + loadIntConfig(L, MAX_ALLOWED_ON_A_DUMMY, "maxAllowedOnADummy", 1); + loadIntConfig(L, MAX_CONTAINER_ITEM, "maxItem", 5000); + loadIntConfig(L, MAX_CONTAINER, "maxContainer", 500); + loadIntConfig(L, MAX_DAMAGE_REFLECTION, "maxDamageReflection", 200); + loadIntConfig(L, MAX_ELEMENTAL_RESISTANCE, "maxElementalResistance", 200); + loadIntConfig(L, MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, "maxMarketOffersAtATimePerPlayer", 100); + loadIntConfig(L, MAX_MESSAGEBUFFER, "maxMessageBuffer", 4); + loadIntConfig(L, MAX_PACKETS_PER_SECOND, "maxPacketsPerSecond", 25); + loadIntConfig(L, MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT, "maxPlayersOutsidePZPerAccount", 1); + loadIntConfig(L, MAX_PLAYERS_PER_ACCOUNT, "maxPlayersOnlinePerAccount", 1); + loadIntConfig(L, MAX_PLAYERS, "maxPlayers", 0); + loadIntConfig(L, MAX_SPEED_ATTACKONFIST, "maxSpeedOnFist", 500); + loadIntConfig(L, METRICS_OSTREAM_INTERVAL, "metricsOstreamInterval", 1000); + loadIntConfig(L, MIN_DELAY_BETWEEN_CONDITIONS, "minDelayBetweenConditions", 0); + loadIntConfig(L, MIN_ELEMENTAL_RESISTANCE, "minElementalResistance", -200); + loadIntConfig(L, MONTH_KILLS_TO_RED, "monthKillsToRedSkull", 10); + loadIntConfig(L, MULTIPLIER_ATTACKONFIST, "multiplierSpeedOnFist", 5); + loadIntConfig(L, ORANGE_SKULL_DURATION, "orangeSkullDuration", 7); + loadIntConfig(L, PARALLELISM, "parallelism", 2); + loadIntConfig(L, PARTY_LIST_MAX_DISTANCE, "partyListMaxDistance", 0); + loadIntConfig(L, PREY_BONUS_REROLL_PRICE, "preyBonusRerollPrice", 1); + loadIntConfig(L, PREY_BONUS_TIME, "preyBonusTime", 7200); + loadIntConfig(L, PREY_FREE_REROLL_TIME, "preyFreeRerollTime", 72000); + loadIntConfig(L, PREY_REROLL_PRICE_LEVEL, "preyRerollPricePerLevel", 200); + loadIntConfig(L, PREY_SELECTION_LIST_PRICE, "preySelectListPrice", 5); + loadIntConfig(L, PROTECTION_LEVEL, "protectionLevel", 1); + loadIntConfig(L, PUSH_DELAY, "pushDelay", 1000); + loadIntConfig(L, PUSH_DISTANCE_DELAY, "pushDistanceDelay", 1500); + loadIntConfig(L, PVP_MAX_LEVEL_DIFFERENCE, "pvpMaxLevelDifference", 0); + loadIntConfig(L, PZ_LOCKED, "pzLocked", 60000); + loadIntConfig(L, RATE_EXPERIENCE, "rateExp", 1); + loadIntConfig(L, RATE_KILLING_IN_THE_NAME_OF_POINTS, "rateKillingInTheNameOfPoints", 1); + loadIntConfig(L, RATE_LOOT, "rateLoot", 1); + loadIntConfig(L, RATE_MAGIC, "rateMagic", 1); + loadIntConfig(L, RATE_SKILL, "rateSkill", 1); + loadIntConfig(L, RATE_SPAWN, "rateSpawn", 1); + loadIntConfig(L, RED_SKULL_DURATION, "redSkullDuration", 30); + loadIntConfig(L, REWARD_CHEST_MAX_COLLECT_ITEMS, "rewardChestMaxCollectItems", 200); + loadIntConfig(L, SAVE_INTERVAL_TIME, "saveIntervalTime", 1); + loadIntConfig(L, STAIRHOP_DELAY, "stairJumpExhaustion", 2000); + loadIntConfig(L, STAMINA_GREEN_DELAY, "staminaGreenDelay", 5); + loadIntConfig(L, STAMINA_ORANGE_DELAY, "staminaOrangeDelay", 1); + loadIntConfig(L, STAMINA_PZ_GAIN, "staminaPzGain", 1); + loadIntConfig(L, STAMINA_TRAINER_DELAY, "staminaTrainerDelay", 5); + loadIntConfig(L, STAMINA_TRAINER_GAIN, "staminaTrainerGain", 1); + loadIntConfig(L, STATUSQUERY_TIMEOUT, "statusTimeout", 5000); + loadIntConfig(L, STORE_COIN_PACKET, "coinPacketSize", 25); + loadIntConfig(L, STOREINBOX_MAXLIMIT, "storeInboxMaxLimit", 2000); + loadIntConfig(L, T_CONST, "temporaryConst", 2); + loadIntConfig(L, TASK_HUNTING_BONUS_REROLL_PRICE, "taskHuntingBonusRerollPrice", 1); + loadIntConfig(L, TASK_HUNTING_FREE_REROLL_TIME, "taskHuntingFreeRerollTime", 72000); + loadIntConfig(L, TASK_HUNTING_LIMIT_EXHAUST, "taskHuntingLimitedTasksExhaust", 72000); + loadIntConfig(L, TASK_HUNTING_REROLL_PRICE_LEVEL, "taskHuntingRerollPricePerLevel", 200); + loadIntConfig(L, TASK_HUNTING_SELECTION_LIST_PRICE, "taskHuntingSelectListPrice", 5); loadIntConfig(L, TIBIADROME_CONCOCTION_COOLDOWN, "tibiadromeConcoctionCooldown", 24 * 60 * 60); loadIntConfig(L, TIBIADROME_CONCOCTION_DURATION, "tibiadromeConcoctionDuration", 1 * 60 * 60); - loadStringConfig(L, TIBIADROME_CONCOCTION_TICK_TYPE, "tibiadromeConcoctionTickType", "online"); - - loadStringConfig(L, M_CONST, "memoryConst", "1<<16"); - loadIntConfig(L, T_CONST, "temporaryConst", 2); - loadIntConfig(L, PARALLELISM, "parallelism", 2); - - // Vip System - loadBoolConfig(L, VIP_SYSTEM_ENABLED, "vipSystemEnabled", false); + loadIntConfig(L, TRANSCENDANCE_AVATAR_DURATION, "transcendanceAvatarDuration", 7000); loadIntConfig(L, VIP_BONUS_EXP, "vipBonusExp", 0); loadIntConfig(L, VIP_BONUS_LOOT, "vipBonusLoot", 0); loadIntConfig(L, VIP_BONUS_SKILL, "vipBonusSkill", 0); - loadBoolConfig(L, VIP_AUTOLOOT_VIP_ONLY, "vipAutoLootVipOnly", false); - loadBoolConfig(L, VIP_KEEP_HOUSE, "vipKeepHouse", false); - loadBoolConfig(L, VIP_STAY_ONLINE, "vipStayOnline", false); loadIntConfig(L, VIP_FAMILIAR_TIME_COOLDOWN_REDUCTION, "vipFamiliarTimeCooldownReduction", 0); + loadIntConfig(L, WEEK_KILLS_TO_RED, "weekKillsToRedSkull", 5); + loadIntConfig(L, WHEEL_ATELIER_REVEAL_GREATER_COST, "wheelAtelierRevealGreaterCost", 6000000); + loadIntConfig(L, WHEEL_ATELIER_REVEAL_LESSER_COST, "wheelAtelierRevealLesserCost", 125000); + loadIntConfig(L, WHEEL_ATELIER_REVEAL_REGULAR_COST, "wheelAtelierRevealRegularCost", 1000000); + loadIntConfig(L, WHEEL_ATELIER_ROTATE_GREATER_COST, "wheelAtelierRotateGreaterCost", 500000); + loadIntConfig(L, WHEEL_ATELIER_ROTATE_LESSER_COST, "wheelAtelierRotateLesserCost", 125000); + loadIntConfig(L, WHEEL_ATELIER_ROTATE_REGULAR_COST, "wheelAtelierRotateRegularCost", 250000); + loadIntConfig(L, WHEEL_POINTS_PER_LEVEL, "wheelPointsPerLevel", 1); + loadIntConfig(L, WHITE_SKULL_TIME, "whiteSkullTime", 15 * 60 * 1000); - loadBoolConfig(L, REWARD_CHEST_COLLECT_ENABLED, "rewardChestCollectEnabled", true); - loadIntConfig(L, REWARD_CHEST_MAX_COLLECT_ITEMS, "rewardChestMaxCollectItems", 200); - - // PVP System - loadFloatConfig(L, PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, "pvpRateDamageTakenPerLevel", 0.0); - loadFloatConfig(L, PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, "pvpRateDamageReductionPerLevel", 0.0); - loadIntConfig(L, PVP_MAX_LEVEL_DIFFERENCE, "pvpMaxLevelDifference", 0); - - loadBoolConfig(L, TOGGLE_MOUNT_IN_PZ, "toggleMountInProtectionZone", false); - - loadBoolConfig(L, TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, "togglehouseTransferOnRestart", false); - - loadBoolConfig(L, TOGGLE_RECEIVE_REWARD, "toggleReceiveReward", false); - - loadBoolConfig(L, METRICS_ENABLE_PROMETHEUS, "metricsEnablePrometheus", false); + loadStringConfig(L, CORE_DIRECTORY, "coreDirectory", "data"); + loadStringConfig(L, DATA_DIRECTORY, "dataPackDirectory", "data-otservbr-global"); + loadStringConfig(L, DEFAULT_PRIORITY, "defaultPriority", "high"); + loadStringConfig(L, DISCORD_WEBHOOK_URL, "discordWebhookURL", ""); + loadStringConfig(L, FORGE_FIENDISH_INTERVAL_TIME, "forgeFiendishIntervalTime", "1"); + loadStringConfig(L, FORGE_FIENDISH_INTERVAL_TYPE, "forgeFiendishIntervalType", "hour"); + loadStringConfig(L, GLOBAL_SERVER_SAVE_TIME, "globalServerSaveTime", "06:00"); + loadStringConfig(L, LOCATION, "location", ""); + loadStringConfig(L, M_CONST, "memoryConst", "1<<16"); loadStringConfig(L, METRICS_PROMETHEUS_ADDRESS, "metricsPrometheusAddress", "localhost:9464"); - - loadBoolConfig(L, METRICS_ENABLE_OSTREAM, "metricsEnableOstream", false); - loadIntConfig(L, METRICS_OSTREAM_INTERVAL, "metricsOstreamInterval", 1000); - - loadIntConfig(L, STOREINBOX_MAXLIMIT, "storeInboxMaxLimit", 2000); - loadIntConfig(L, LOOTPOUCH_MAXLIMIT, "lootPouchMaxLimit", 2000); + loadStringConfig(L, OWNER_EMAIL, "ownerEmail", ""); + loadStringConfig(L, OWNER_NAME, "ownerName", ""); + loadStringConfig(L, SAVE_INTERVAL_TYPE, "saveIntervalType", ""); + loadStringConfig(L, SERVER_MOTD, "serverMotd", ""); + loadStringConfig(L, SERVER_NAME, "serverName", ""); + loadStringConfig(L, STORE_IMAGES_URL, "coinImagesURL", ""); + loadStringConfig(L, TIBIADROME_CONCOCTION_TICK_TYPE, "tibiadromeConcoctionTickType", "online"); + loadStringConfig(L, URL, "url", ""); + loadStringConfig(L, WORLD_TYPE, "worldType", "pvp"); loaded = true; lua_close(L);